From 767ad63ceeb8e50cf6dd6aec34e28b3eedbce49f Mon Sep 17 00:00:00 2001 From: Brenton Bostick Date: Mon, 4 Sep 2023 08:36:17 -0400 Subject: [PATCH] fix typos --- agdk/adpf/app/src/main/cpp/demo_scene.cpp | 4 +-- agdk/adpf/app/src/main/cpp/native_engine.cpp | 2 +- .../AssemblyCode-Link-Objects.cpp | 2 +- .../GameApplication/GameApplication.cpp | 2 +- agdk/agde/Teapot/GameEngine/GLContext.cpp | 4 +-- agdk/agde/Teapot/GameEngine/JNIHelper.h | 12 ++++----- agdk/agde/Teapot/GameEngine/TapCamera.cpp | 26 +++++++++---------- agdk/agde/Teapot/GameEngine/TapCamera.h | 2 +- .../agde/Teapot/GameEngine/TeapotRenderer.cpp | 4 +-- agdk/agde/Teapot/GameEngine/VecMath.h | 2 +- .../Android/app/src/main/cpp/game_consts.hpp | 10 +++---- .../Android/app/src/main/cpp/play_scene.cpp | 10 +++---- .../Android/app/src/main/cpp/sfxman.cpp | 2 +- .../Android/app/src/main/cpp/game_consts.hpp | 10 +++---- .../app/src/main/cpp/native_engine.cpp | 2 +- .../Android/app/src/main/cpp/play_scene.cpp | 10 +++---- agdk/agdktunnel/README.md | 2 +- agdk/agdktunnel/app/src/main/cpp/anim.hpp | 2 +- .../app/src/main/cpp/game_consts.hpp | 10 +++---- .../app/src/main/cpp/input_util.hpp | 4 +-- .../app/src/main/cpp/play_scene.cpp | 18 ++++++------- .../app/src/main/cpp/tunnel_engine.cpp | 2 +- .../app/src/main/proto/tuningfork.proto | 2 +- .../src/android/platform_keycodes_android.h | 4 +-- agdk/common/include/adpf_manager.h | 12 ++++----- agdk/common/include/box_renderer.h | 4 +-- agdk/common/ndk_helper/GLContext.cpp | 4 +-- agdk/common/ndk_helper/JNIHelper.h | 6 ++--- agdk/common/ndk_helper/Shader.cpp | 2 +- agdk/common/ndk_helper/TapCamera.cpp | 26 +++++++++---------- agdk/common/ndk_helper/TapCamera.h | 2 +- agdk/common/ndk_helper/VecMath.h | 2 +- agdk/common/src/adpf_manager.cpp | 16 ++++++------ .../app/src/main/cpp/JNIUtil.h | 2 +- .../app/src/main/cpp/demo_scene.hpp | 2 +- .../game_mode/app/src/main/cpp/demo_scene.cpp | 4 +-- .../app/src/main/cpp/native_engine.cpp | 2 +- .../app/src/main/cpp/welcome_scene.cpp | 6 ++--- .../final/app/src/main/cpp/demo_scene.hpp | 2 +- .../final/app/src/main/cpp/native_engine.cpp | 2 +- 40 files changed, 121 insertions(+), 121 deletions(-) diff --git a/agdk/adpf/app/src/main/cpp/demo_scene.cpp b/agdk/adpf/app/src/main/cpp/demo_scene.cpp index 9788a851..f687f924 100644 --- a/agdk/adpf/app/src/main/cpp/demo_scene.cpp +++ b/agdk/adpf/app/src/main/cpp/demo_scene.cpp @@ -70,7 +70,7 @@ void DemoScene::OnScreenResized(int width, int height) {} //-------------------------------------------------------------------------------- // Process each frame's status updates. // - Initiate the OpenGL rendering. -// - Monitor the device's thermal staus using ADPF API. +// - Monitor the device's thermal status using ADPF API. // - Update physics using BulletPhysics. // - Render cubes. // - Render UI using ImGUI (Show device's thermal status). @@ -440,7 +440,7 @@ void DemoScene::InitializePhysics() { } //-------------------------------------------------------------------------------- -// Update phycis world and render boxes. +// Update physics world and render boxes. //-------------------------------------------------------------------------------- void DemoScene::UpdatePhysics() { // In the sample, it's looping physics update here. diff --git a/agdk/adpf/app/src/main/cpp/native_engine.cpp b/agdk/adpf/app/src/main/cpp/native_engine.cpp index f27d8d4e..76f87b1d 100644 --- a/agdk/adpf/app/src/main/cpp/native_engine.cpp +++ b/agdk/adpf/app/src/main/cpp/native_engine.cpp @@ -74,7 +74,7 @@ NativeEngine::NativeEngine(struct android_app *app) { MY_ASSERT(_singleton == NULL); _singleton = this; - // Initialize Swappy to adjuest swap timing properly. + // Initialize Swappy to adjust swap timing properly. ALOGI("Calling SwappyGL_init"); SwappyGL_init(GetJniEnv(), mApp->activity->javaGameActivity); SwappyGL_setSwapIntervalNS(SWAPPY_SWAP_60FPS); diff --git a/agdk/agde/AssemblyCode-Link-Objects/AssemblyCode-Link-Objects/AssemblyCode-Link-Objects.cpp b/agdk/agde/AssemblyCode-Link-Objects/AssemblyCode-Link-Objects/AssemblyCode-Link-Objects.cpp index d1fc77ec..6161c041 100644 --- a/agdk/agde/AssemblyCode-Link-Objects/AssemblyCode-Link-Objects/AssemblyCode-Link-Objects.cpp +++ b/agdk/agde/AssemblyCode-Link-Objects/AssemblyCode-Link-Objects/AssemblyCode-Link-Objects.cpp @@ -20,7 +20,7 @@ extern "C" int get_id(void); // example of using the functions implemented in static lib and inside this shared lib. -std::string get_platfom_info(void) { +std::string get_platform_info(void) { std::string str("Platform ID = "); str += std::to_string(get_id()) + ", Magic Number = " diff --git a/agdk/agde/Teapot/GameApplication/GameApplication.cpp b/agdk/agde/Teapot/GameApplication/GameApplication.cpp index 64d20dae..f4345f58 100644 --- a/agdk/agde/Teapot/GameApplication/GameApplication.cpp +++ b/agdk/agde/Teapot/GameApplication/GameApplication.cpp @@ -571,7 +571,7 @@ int main(int argc, char **argv) { } else { // Otherwise, choose the first device. if (!InitializeWithFirstDevice(argv[0])) { - // Well that didn't work. Try default init afterall. + // Well that didn't work. Try default init after all. glutInit(&argc, argv); } } diff --git a/agdk/agde/Teapot/GameEngine/GLContext.cpp b/agdk/agde/Teapot/GameEngine/GLContext.cpp index 4413a735..8de22f67 100644 --- a/agdk/agde/Teapot/GameEngine/GLContext.cpp +++ b/agdk/agde/Teapot/GameEngine/GLContext.cpp @@ -214,7 +214,7 @@ namespace ndk_helper { return EGL_SUCCESS; } - int32_t original_widhth = screen_width_; + int32_t original_width = screen_width_; int32_t original_height = screen_height_; // Create surface @@ -223,7 +223,7 @@ namespace ndk_helper { eglQuerySurface(display_, surface_, EGL_WIDTH, &screen_width_); eglQuerySurface(display_, surface_, EGL_HEIGHT, &screen_height_); - if (screen_width_ != original_widhth || screen_height_ != original_height) { + if (screen_width_ != original_width || screen_height_ != original_height) { // Screen resized LOGI("Screen resized"); } diff --git a/agdk/agde/Teapot/GameEngine/JNIHelper.h b/agdk/agde/Teapot/GameEngine/JNIHelper.h index ff66b676..d506b749 100644 --- a/agdk/agde/Teapot/GameEngine/JNIHelper.h +++ b/agdk/agde/Teapot/GameEngine/JNIHelper.h @@ -72,9 +72,9 @@ namespace ndk_helper { } /* - * Read a file from a strorage. + * Read a file from a storage. * First, the method tries to read the file from an external storage. - * If it fails to read, it falls back to use assset manager and try to read + * If it fails to read, it falls back to use asset manager and try to read * the file from APK asset. * * arguments: @@ -165,7 +165,7 @@ namespace ndk_helper { /* * Retrieve external file directory through JNI call * - * return: std::string containing external file diretory + * return: std::string containing external file directory */ std::string GetExternalFilesDir() { return ""; } @@ -315,9 +315,9 @@ namespace ndk_helper { static JNIHelper* GetInstance(); /* - * Read a file from a strorage. + * Read a file from a storage. * First, the method tries to read the file from an external storage. - * If it fails to read, it falls back to use assset manager and try to read + * If it fails to read, it falls back to use asset manager and try to read * the file from APK asset. * * arguments: @@ -403,7 +403,7 @@ namespace ndk_helper { /* * Retrieve external file directory through JNI call * - * return: std::string containing external file diretory + * return: std::string containing external file directory */ std::string GetExternalFilesDir(); diff --git a/agdk/agde/Teapot/GameEngine/TapCamera.cpp b/agdk/agde/Teapot/GameEngine/TapCamera.cpp index b7bae10e..5078c7bc 100644 --- a/agdk/agde/Teapot/GameEngine/TapCamera.cpp +++ b/agdk/agde/Teapot/GameEngine/TapCamera.cpp @@ -45,7 +45,7 @@ namespace ndk_helper { camera_rotation_start_(0.f), camera_rotation_now_(0.f), momentum_(false), - momemtum_steps_(0.f), + momentum_steps_(0.f), flip_z_(0.f) { // Init offset InitParameters(); @@ -87,7 +87,7 @@ namespace ndk_helper { void TapCamera::Update() { if (momentum_) { - float momenttum_steps = momemtum_steps_; + float momentum_steps = momentum_steps_; // Momentum rotation Vec2 v = vec_drag_delta_; @@ -105,8 +105,8 @@ namespace ndk_helper { vec_offset_delta_ = vec_offset_delta_ * MOMENTUM_FACTOR_DECREASE_SHIFT; // Count steps - momemtum_steps_ = momenttum_steps * MOMENTUM_FACTOR_DECREASE; - if (momemtum_steps_ < MOMENTUM_FACTOR_THRESHOLD) { + momentum_steps_ = momentum_steps * MOMENTUM_FACTOR_DECREASE; + if (momentum_steps_ < MOMENTUM_FACTOR_THRESHOLD) { momentum_ = false; } } else { @@ -125,10 +125,10 @@ namespace ndk_helper { void TapCamera::Update(const double time) { if (momentum_) { - const float MOMENTAM_UNIT = 0.0166f; + const float MOMENTUM_UNIT = 0.0166f; // Activate every 16.6msec - if (time - time_stamp_ >= MOMENTAM_UNIT) { - float momenttum_steps = momemtum_steps_; + if (time - time_stamp_ >= MOMENTUM_UNIT) { + float momentum_steps = momentum_steps_; // Momentum rotation Vec2 v = vec_drag_delta_; @@ -146,8 +146,8 @@ namespace ndk_helper { vec_offset_delta_ = vec_offset_delta_ * MOMENTUM_FACTOR_DECREASE_SHIFT; // Count steps - momemtum_steps_ = momenttum_steps * MOMENTUM_FACTOR_DECREASE; - if (momemtum_steps_ < MOMENTUM_FACTOR_THRESHOLD) { + momentum_steps_ = momentum_steps * MOMENTUM_FACTOR_DECREASE; + if (momentum_steps_ < MOMENTUM_FACTOR_THRESHOLD) { momentum_ = false; } time_stamp_ = time; @@ -201,7 +201,7 @@ namespace ndk_helper { dragging_ = false; momentum_ = true; - momemtum_steps_ = 1.0f; + momentum_steps_ = 1.0f; } void TapCamera::Drag(const Vec2 &v) { @@ -215,7 +215,7 @@ namespace ndk_helper { } //---------------------------------------------------------- - // Pinch controll + // Pinch control //---------------------------------------------------------- void TapCamera::BeginPinch(const Vec2 &v1, const Vec2 &v2) { if (dragging_) EndDrag(); @@ -245,7 +245,7 @@ namespace ndk_helper { void TapCamera::EndPinch() { pinching_ = false; momentum_ = true; - momemtum_steps_ = 1.f; + momentum_steps_ = 1.f; vec_offset_ += vec_offset_now_; camera_rotation_ += camera_rotation_now_; vec_offset_now_ = Vec3(); @@ -292,7 +292,7 @@ namespace ndk_helper { } //---------------------------------------------------------- - // Trackball controll + // Trackball control //---------------------------------------------------------- void TapCamera::BallUpdate() { if (dragging_) { diff --git a/agdk/agde/Teapot/GameEngine/TapCamera.h b/agdk/agde/Teapot/GameEngine/TapCamera.h index 617afac6..0e503f03 100644 --- a/agdk/agde/Teapot/GameEngine/TapCamera.h +++ b/agdk/agde/Teapot/GameEngine/TapCamera.h @@ -75,7 +75,7 @@ namespace ndk_helper { Vec2 vec_last_input_; Vec3 vec_offset_last_; Vec3 vec_offset_delta_; - float momemtum_steps_; + float momentum_steps_; Vec2 vec_flip_; float flip_z_; diff --git a/agdk/agde/Teapot/GameEngine/TeapotRenderer.cpp b/agdk/agde/Teapot/GameEngine/TeapotRenderer.cpp index e19c6d48..78c6b637 100644 --- a/agdk/agde/Teapot/GameEngine/TeapotRenderer.cpp +++ b/agdk/agde/Teapot/GameEngine/TeapotRenderer.cpp @@ -210,7 +210,7 @@ bool TeapotRenderer::LoadShaders(SHADER_PARAMS *params, const char *strVsh, glDeleteProgram(program); return false; } else { - LOGI("SUCESS: %s\n", strVsh); + LOGI("SUCCESS: %s\n", strVsh); } // Create and compile fragment shader @@ -220,7 +220,7 @@ bool TeapotRenderer::LoadShaders(SHADER_PARAMS *params, const char *strVsh, glDeleteProgram(program); return false; } else { - LOGI("SUCESS: %s\n", strFsh); + LOGI("SUCCESS: %s\n", strFsh); } // Attach vertex shader to program diff --git a/agdk/agde/Teapot/GameEngine/VecMath.h b/agdk/agde/Teapot/GameEngine/VecMath.h index 0ca64a0c..ec728d48 100644 --- a/agdk/agde/Teapot/GameEngine/VecMath.h +++ b/agdk/agde/Teapot/GameEngine/VecMath.h @@ -909,7 +909,7 @@ namespace ndk_helper { return *this; } - // Non destuctive version + // Non destructive version Quaternion Conjugated() { Quaternion ret; ret.x_ = -x_; diff --git a/agdk/agde/endless-tunnel-pgo/endless-tunnel/Android/app/src/main/cpp/game_consts.hpp b/agdk/agde/endless-tunnel-pgo/endless-tunnel/Android/app/src/main/cpp/game_consts.hpp index 6a3563d1..b7d5350f 100644 --- a/agdk/agde/endless-tunnel-pgo/endless-tunnel/Android/app/src/main/cpp/game_consts.hpp +++ b/agdk/agde/endless-tunnel-pgo/endless-tunnel/Android/app/src/main/cpp/game_consts.hpp @@ -67,12 +67,12 @@ #define PLAYER_MAX_Z TUNNEL_HALF_H - 1.0f #define PLAYER_MIN_Z -(PLAYER_MAX_Z) -// touch control sensivity (ship displacement caused by dragging the screen by a length +// touch control sensitivity (ship displacement caused by dragging the screen by a length // equivalent to its height). -#define TOUCH_CONTROL_SENSIVITY (TUNNEL_HALF_W * 5) +#define TOUCH_CONTROL_SENSITIVITY (TUNNEL_HALF_W * 5) -// joystick control sensivity (maximum velocity attained per axis) -#define JOYSTICK_CONTROL_SENSIVITY 20.0f +// joystick control sensitivity (maximum velocity attained per axis) +#define JOYSTICK_CONTROL_SENSITIVITY 20.0f // how many points equal a raise in difficulty level? #define SCORE_PER_LEVEL 500 @@ -131,7 +131,7 @@ // the speed after colliding with an obstacle #define PLAYER_SPEED_AFTER_COLLISION -20.0f -// how far beind the obstacle the player is placed upon collision +// how far behind the obstacle the player is placed upon collision #define PLAYER_RECEDE_AFTER_COLLISION 2.0f // how long the heart meter blinks for when you've just lost a life diff --git a/agdk/agde/endless-tunnel-pgo/endless-tunnel/Android/app/src/main/cpp/play_scene.cpp b/agdk/agde/endless-tunnel-pgo/endless-tunnel/Android/app/src/main/cpp/play_scene.cpp index a2995b17..66231f61 100644 --- a/agdk/agde/endless-tunnel-pgo/endless-tunnel/Android/app/src/main/cpp/play_scene.cpp +++ b/agdk/agde/endless-tunnel-pgo/endless-tunnel/Android/app/src/main/cpp/play_scene.cpp @@ -523,7 +523,7 @@ void PlayScene::GenObstacles() { void PlayScene::ShiftIfNeeded() { // is it time to discard a section and shift forward? while (mPlayerPos.y > GetSectionEndY(mFirstSection) + SHIFT_THRESH) { - // shift to the next turnnel section + // shift to the next tunnel section mFirstSection++; // discard obstacle corresponding to the deleted section @@ -578,8 +578,8 @@ void PlayScene::OnPointerMove(int pointerId, const struct PointerCoords *coords) UpdateMenuSelFromTouch(x, y); } else if (mSteering == STEERING_TOUCH && pointerId == mPointerId) { - float deltaX = (x - mPointerAnchorX) * TOUCH_CONTROL_SENSIVITY / rangeY; - float deltaY = -(y - mPointerAnchorY) * TOUCH_CONTROL_SENSIVITY / rangeY; + float deltaX = (x - mPointerAnchorX) * TOUCH_CONTROL_SENSITIVITY / rangeY; + float deltaY = -(y - mPointerAnchorY) * TOUCH_CONTROL_SENSITIVITY / rangeY; float rotatedDx = cos(mRollAngle) * deltaX - sin(mRollAngle) * deltaY; float rotatedDy = sin(mRollAngle) * deltaX + cos(mRollAngle) * deltaY; @@ -767,8 +767,8 @@ bool PlayScene::OnBackKeyPressed() { void PlayScene::OnJoy(float joyX, float joyY) { if (!mSteering || mSteering == STEERING_JOY) { - float deltaX = joyX * JOYSTICK_CONTROL_SENSIVITY; - float deltaY = joyY * JOYSTICK_CONTROL_SENSIVITY; + float deltaX = joyX * JOYSTICK_CONTROL_SENSITIVITY; + float deltaY = joyY * JOYSTICK_CONTROL_SENSITIVITY; float rotatedDx = cos(-mRollAngle) * deltaX - sin(-mRollAngle) * deltaY; float rotatedDy = sin(-mRollAngle) * deltaX + cos(-mRollAngle) * deltaY; mShipSteerX = rotatedDx; diff --git a/agdk/agde/endless-tunnel-pgo/endless-tunnel/Android/app/src/main/cpp/sfxman.cpp b/agdk/agde/endless-tunnel-pgo/endless-tunnel/Android/app/src/main/cpp/sfxman.cpp index 7705a9c6..98af77fc 100644 --- a/agdk/agde/endless-tunnel-pgo/endless-tunnel/Android/app/src/main/cpp/sfxman.cpp +++ b/agdk/agde/endless-tunnel-pgo/endless-tunnel/Android/app/src/main/cpp/sfxman.cpp @@ -79,7 +79,7 @@ SfxMan::SfxMan() { // realize the output mix result = (*outputMixObject)->Realize(outputMixObject, SL_BOOLEAN_FALSE); - if (_checkError(result, "realizin goutput mix")) return; + if (_checkError(result, "realizing goutput mix")) return; // get the environmental reverb interface // this could fail if the environmental reverb effect is not available, diff --git a/agdk/agde/endless-tunnel/endless-tunnel/Android/app/src/main/cpp/game_consts.hpp b/agdk/agde/endless-tunnel/endless-tunnel/Android/app/src/main/cpp/game_consts.hpp index 6a3563d1..b7d5350f 100644 --- a/agdk/agde/endless-tunnel/endless-tunnel/Android/app/src/main/cpp/game_consts.hpp +++ b/agdk/agde/endless-tunnel/endless-tunnel/Android/app/src/main/cpp/game_consts.hpp @@ -67,12 +67,12 @@ #define PLAYER_MAX_Z TUNNEL_HALF_H - 1.0f #define PLAYER_MIN_Z -(PLAYER_MAX_Z) -// touch control sensivity (ship displacement caused by dragging the screen by a length +// touch control sensitivity (ship displacement caused by dragging the screen by a length // equivalent to its height). -#define TOUCH_CONTROL_SENSIVITY (TUNNEL_HALF_W * 5) +#define TOUCH_CONTROL_SENSITIVITY (TUNNEL_HALF_W * 5) -// joystick control sensivity (maximum velocity attained per axis) -#define JOYSTICK_CONTROL_SENSIVITY 20.0f +// joystick control sensitivity (maximum velocity attained per axis) +#define JOYSTICK_CONTROL_SENSITIVITY 20.0f // how many points equal a raise in difficulty level? #define SCORE_PER_LEVEL 500 @@ -131,7 +131,7 @@ // the speed after colliding with an obstacle #define PLAYER_SPEED_AFTER_COLLISION -20.0f -// how far beind the obstacle the player is placed upon collision +// how far behind the obstacle the player is placed upon collision #define PLAYER_RECEDE_AFTER_COLLISION 2.0f // how long the heart meter blinks for when you've just lost a life diff --git a/agdk/agde/endless-tunnel/endless-tunnel/Android/app/src/main/cpp/native_engine.cpp b/agdk/agde/endless-tunnel/endless-tunnel/Android/app/src/main/cpp/native_engine.cpp index 67f46957..6b17694e 100644 --- a/agdk/agde/endless-tunnel/endless-tunnel/Android/app/src/main/cpp/native_engine.cpp +++ b/agdk/agde/endless-tunnel/endless-tunnel/Android/app/src/main/cpp/native_engine.cpp @@ -333,7 +333,7 @@ bool NativeEngine::InitContext() { return false; } - LOGD("NativeEngine: successfull initialized context."); + LOGD("NativeEngine: successful initialized context."); return true; } diff --git a/agdk/agde/endless-tunnel/endless-tunnel/Android/app/src/main/cpp/play_scene.cpp b/agdk/agde/endless-tunnel/endless-tunnel/Android/app/src/main/cpp/play_scene.cpp index a2995b17..66231f61 100644 --- a/agdk/agde/endless-tunnel/endless-tunnel/Android/app/src/main/cpp/play_scene.cpp +++ b/agdk/agde/endless-tunnel/endless-tunnel/Android/app/src/main/cpp/play_scene.cpp @@ -523,7 +523,7 @@ void PlayScene::GenObstacles() { void PlayScene::ShiftIfNeeded() { // is it time to discard a section and shift forward? while (mPlayerPos.y > GetSectionEndY(mFirstSection) + SHIFT_THRESH) { - // shift to the next turnnel section + // shift to the next tunnel section mFirstSection++; // discard obstacle corresponding to the deleted section @@ -578,8 +578,8 @@ void PlayScene::OnPointerMove(int pointerId, const struct PointerCoords *coords) UpdateMenuSelFromTouch(x, y); } else if (mSteering == STEERING_TOUCH && pointerId == mPointerId) { - float deltaX = (x - mPointerAnchorX) * TOUCH_CONTROL_SENSIVITY / rangeY; - float deltaY = -(y - mPointerAnchorY) * TOUCH_CONTROL_SENSIVITY / rangeY; + float deltaX = (x - mPointerAnchorX) * TOUCH_CONTROL_SENSITIVITY / rangeY; + float deltaY = -(y - mPointerAnchorY) * TOUCH_CONTROL_SENSITIVITY / rangeY; float rotatedDx = cos(mRollAngle) * deltaX - sin(mRollAngle) * deltaY; float rotatedDy = sin(mRollAngle) * deltaX + cos(mRollAngle) * deltaY; @@ -767,8 +767,8 @@ bool PlayScene::OnBackKeyPressed() { void PlayScene::OnJoy(float joyX, float joyY) { if (!mSteering || mSteering == STEERING_JOY) { - float deltaX = joyX * JOYSTICK_CONTROL_SENSIVITY; - float deltaY = joyY * JOYSTICK_CONTROL_SENSIVITY; + float deltaX = joyX * JOYSTICK_CONTROL_SENSITIVITY; + float deltaY = joyY * JOYSTICK_CONTROL_SENSITIVITY; float rotatedDx = cos(-mRollAngle) * deltaX - sin(-mRollAngle) * deltaY; float rotatedDy = sin(-mRollAngle) * deltaX + cos(-mRollAngle) * deltaY; mShipSteerX = rotatedDx; diff --git a/agdk/agdktunnel/README.md b/agdk/agdktunnel/README.md index 124eab26..61ded731 100644 --- a/agdk/agdktunnel/README.md +++ b/agdk/agdktunnel/README.md @@ -78,7 +78,7 @@ You can ignore subdirectories for OSes you aren't using. ##### Note for macOS developers -Precompiled versions of the `protoc` compiler arenot codesigned or notarized. +Precompiled versions of the `protoc` compiler are not codesigned or notarized. You may need to allow execution of the relevant files using the **System Preferences -> Security & Privacy** control panel, adjust your Gatekeeper settings or compile your own protoc. diff --git a/agdk/agdktunnel/app/src/main/cpp/anim.hpp b/agdk/agdktunnel/app/src/main/cpp/anim.hpp index 5218ff90..49d8e4d4 100644 --- a/agdk/agdktunnel/app/src/main/cpp/anim.hpp +++ b/agdk/agdktunnel/app/src/main/cpp/anim.hpp @@ -19,7 +19,7 @@ #include "shape_renderer.hpp" -/* Renders a the background animation seen on the main screen and menus (the parallax +/* Renders the background animation seen on the main screen and menus (the parallax * rectangles scrolling by). */ void RenderBackgroundAnimation(ShapeRenderer *r); diff --git a/agdk/agdktunnel/app/src/main/cpp/game_consts.hpp b/agdk/agdktunnel/app/src/main/cpp/game_consts.hpp index a85fca31..d6640a8d 100644 --- a/agdk/agdktunnel/app/src/main/cpp/game_consts.hpp +++ b/agdk/agdktunnel/app/src/main/cpp/game_consts.hpp @@ -74,12 +74,12 @@ #define PLAYER_MAX_Z TUNNEL_HALF_H - 1.0f #define PLAYER_MIN_Z -(PLAYER_MAX_Z) -// touch control sensivity (ship displacement caused by dragging the screen by a length +// touch control sensitivity (ship displacement caused by dragging the screen by a length // equivalent to its height). -#define TOUCH_CONTROL_SENSIVITY (TUNNEL_HALF_W * 5) +#define TOUCH_CONTROL_SENSITIVITY (TUNNEL_HALF_W * 5) -// joystick control sensivity (maximum velocity attained per axis) -#define JOYSTICK_CONTROL_SENSIVITY 20.0f +// joystick control sensitivity (maximum velocity attained per axis) +#define JOYSTICK_CONTROL_SENSITIVITY 20.0f // how many points equal a raise in difficulty level? #define SCORE_PER_LEVEL 500 @@ -142,7 +142,7 @@ // the speed after colliding with an obstacle #define PLAYER_SPEED_AFTER_COLLISION -20.0f -// how far beind the obstacle the player is placed upon collision +// how far behind the obstacle the player is placed upon collision #define PLAYER_RECEDE_AFTER_COLLISION 2.0f // how long the heart meter blinks for when you've just lost a life diff --git a/agdk/agdktunnel/app/src/main/cpp/input_util.hpp b/agdk/agdktunnel/app/src/main/cpp/input_util.hpp index 780be52e..f8cfb031 100644 --- a/agdk/agdktunnel/app/src/main/cpp/input_util.hpp +++ b/agdk/agdktunnel/app/src/main/cpp/input_util.hpp @@ -38,8 +38,8 @@ #define KEY_ACTION_DOWN 0 #define KEY_ACTION_UP 1 -#define KEY_CONTROL_VERTICAL_SENSIVITY 20.0f -#define KEY_CONTROL_HORIZONTAL_SENSIVITY 30.0f +#define KEY_CONTROL_VERTICAL_SENSITIVITY 20.0f +#define KEY_CONTROL_HORIZONTAL_SENSITIVITY 30.0f #define UP_MOVEMENT_BIT 1 #define LEFT_MOVEMENT_BIT 2 diff --git a/agdk/agdktunnel/app/src/main/cpp/play_scene.cpp b/agdk/agdktunnel/app/src/main/cpp/play_scene.cpp index ad099895..4196c2f9 100644 --- a/agdk/agdktunnel/app/src/main/cpp/play_scene.cpp +++ b/agdk/agdktunnel/app/src/main/cpp/play_scene.cpp @@ -566,7 +566,7 @@ void PlayScene::GenObstacles() { void PlayScene::ShiftIfNeeded() { // is it time to discard a section and shift forward? while (mPlayerPos.y > GetSectionEndY(mFirstSection) + SHIFT_THRESH) { - // shift to the next turnnel section + // shift to the next tunnel section mFirstSection++; // discard obstacle corresponding to the deleted section @@ -620,8 +620,8 @@ void PlayScene::OnPointerMove(int pointerId, const struct PointerCoords *coords) if (mMenu && mMenuTouchActive) { UpdateMenuSelFromTouch(x, y); } else if (mSteering == STEERING_TOUCH && pointerId == mPointerId) { - float deltaX = (x - mPointerAnchorX) * TOUCH_CONTROL_SENSIVITY / rangeY; - float deltaY = -(y - mPointerAnchorY) * TOUCH_CONTROL_SENSIVITY / rangeY; + float deltaX = (x - mPointerAnchorX) * TOUCH_CONTROL_SENSITIVITY / rangeY; + float deltaY = -(y - mPointerAnchorY) * TOUCH_CONTROL_SENSITIVITY / rangeY; float rotatedDx = cos(mRollAngle) * deltaX - sin(mRollAngle) * deltaY; float rotatedDy = sin(mRollAngle) * deltaX + cos(mRollAngle) * deltaY; @@ -822,8 +822,8 @@ bool PlayScene::OnBackKeyPressed() { void PlayScene::OnJoy(float joyX, float joyY) { if (!mSteering || mSteering == STEERING_JOY) { - float deltaX = joyX * JOYSTICK_CONTROL_SENSIVITY; - float deltaY = joyY * JOYSTICK_CONTROL_SENSIVITY; + float deltaX = joyX * JOYSTICK_CONTROL_SENSITIVITY; + float deltaY = joyY * JOYSTICK_CONTROL_SENSITIVITY; float rotatedDx = cos(-mRollAngle) * deltaX - sin(-mRollAngle) * deltaY; float rotatedDy = sin(-mRollAngle) * deltaX + cos(-mRollAngle) * deltaY; mShipSteerX = rotatedDx; @@ -843,16 +843,16 @@ void PlayScene::OnJoy(float joyX, float joyY) { void PlayScene::OnMovementKey() { float deltaX = 0, deltaY = 0; if (mMotionKeyBitmask & UP_MOVEMENT_BIT) { - deltaY -= KEY_CONTROL_VERTICAL_SENSIVITY; + deltaY -= KEY_CONTROL_VERTICAL_SENSITIVITY; } if (mMotionKeyBitmask & LEFT_MOVEMENT_BIT) { - deltaX -= KEY_CONTROL_HORIZONTAL_SENSIVITY; + deltaX -= KEY_CONTROL_HORIZONTAL_SENSITIVITY; } if (mMotionKeyBitmask & DOWN_MOVEMENT_BIT) { - deltaY += KEY_CONTROL_VERTICAL_SENSIVITY; + deltaY += KEY_CONTROL_VERTICAL_SENSITIVITY; } if (mMotionKeyBitmask & RIGHT_MOVEMENT_BIT) { - deltaX += KEY_CONTROL_HORIZONTAL_SENSIVITY; + deltaX += KEY_CONTROL_HORIZONTAL_SENSITIVITY; } float rotatedDx = cos(-mRollAngle) * deltaX - sin(-mRollAngle) * deltaY; diff --git a/agdk/agdktunnel/app/src/main/cpp/tunnel_engine.cpp b/agdk/agdktunnel/app/src/main/cpp/tunnel_engine.cpp index d93fe3b2..76da9870 100644 --- a/agdk/agdktunnel/app/src/main/cpp/tunnel_engine.cpp +++ b/agdk/agdktunnel/app/src/main/cpp/tunnel_engine.cpp @@ -338,7 +338,7 @@ extern "C" void Java_com_google_sample_agdktunnel_PGSManager_savedStateSnapshotN } extern "C" void Java_com_google_sample_agdktunnel_PGSManager_savedStateCloudDataFound( - JNIEnv */*env*/, jobject /*pgsManagerl*/) { + JNIEnv */*env*/, jobject /*pgsManager*/) { TunnelEngine *instance = TunnelEngine::GetInstance(); instance->GetDataStateMachine()->savedStateCloudDataFound(); } diff --git a/agdk/agdktunnel/app/src/main/proto/tuningfork.proto b/agdk/agdktunnel/app/src/main/proto/tuningfork.proto index 70f4efcd..5d220799 100644 --- a/agdk/agdktunnel/app/src/main/proto/tuningfork.proto +++ b/agdk/agdktunnel/app/src/main/proto/tuningfork.proto @@ -51,7 +51,7 @@ // Requests may receive an error response if this is missing or wrong. optional string api_key = 4; - // Name of the fidelitiy_parameters.bin file in assets/tuningfork + // Name of the fidelity_parameters.bin file in assets/tuningfork // used if no download was ever successful. optional string default_fidelity_parameters_filename = 5; diff --git a/agdk/common/base_game_framework/src/android/platform_keycodes_android.h b/agdk/common/base_game_framework/src/android/platform_keycodes_android.h index 61d5b0c4..5df49153 100644 --- a/agdk/common/base_game_framework/src/android/platform_keycodes_android.h +++ b/agdk/common/base_game_framework/src/android/platform_keycodes_android.h @@ -25,7 +25,7 @@ enum EventKeyCode : int32_t { kKeyCode_Unknown = AKEYCODE_UNKNOWN, kKeyCode_Soft_Left = AKEYCODE_SOFT_LEFT, kKeyCode_Soft_Right = AKEYCODE_SOFT_RIGHT, - kKeyCode_Gome = AKEYCODE_HOME, + kKeyCode_Home = AKEYCODE_HOME, kKeyCode_Back = AKEYCODE_BACK, kKeyCode_Call = AKEYCODE_CALL, kKeyCode_Endcall = AKEYCODE_ENDCALL, @@ -260,7 +260,7 @@ enum EventKeyCode : int32_t { kKeyCode_Tv_Terrestrial_Analog = AKEYCODE_TV_TERRESTRIAL_ANALOG, kKeyCode_Tv_Terrestrial_Digital = AKEYCODE_TV_TERRESTRIAL_DIGITAL, kKeyCode_Tv_Satellite = AKEYCODE_TV_SATELLITE, - kKeyCode_Tv_Satellte_Bs = AKEYCODE_TV_SATELLITE_BS, + kKeyCode_Tv_Satellite_Bs = AKEYCODE_TV_SATELLITE_BS, kKeyCode_Tv_Satellite_Cs = AKEYCODE_TV_SATELLITE_CS, kKeyCode_Tv_Satellite_Service = AKEYCODE_TV_SATELLITE_SERVICE, kKeyCode_Tv_Network = AKEYCODE_TV_NETWORK, diff --git a/agdk/common/include/adpf_manager.h b/agdk/common/include/adpf_manager.h index 283d5487..041d01bd 100644 --- a/agdk/common/include/adpf_manager.h +++ b/agdk/common/include/adpf_manager.h @@ -37,7 +37,7 @@ void nativeUnregisterThermalStatusListener(JNIEnv* env, jclass cls); typedef void (*thermalStateChangeListener)(int32_t, int32_t); /* - * ADPFManager class anages the ADPF APIs. + * ADPFManager class manages the ADPF APIs. */ class ADPFManager { public: @@ -95,13 +95,13 @@ class ADPFManager { float GetThermalHeadroom() { return thermal_headroom_; } // Set and get thermal headroom forecast period. - int32_t GetThermalHeadroomForecast() { return thremal_headroom_forcast_; } + int32_t GetThermalHeadroomForecast() { return thermal_headroom_forecast_; } void SetThermalHeadroomForecast(int32_t forecast) { if (forecast < kThermalHeadroomForecastMin || forecast > kThermalHeadroomForecastMax) { return; } - thremal_headroom_forcast_ = forecast; + thermal_headroom_forecast_ = forecast; UpdateThermalStatusHeadRoom(); } @@ -153,7 +153,7 @@ class ADPFManager { update_target_work_duration_(0), close_session_(0), preferred_update_rate_(0), - thremal_headroom_forcast_(kThermalHeadroomForecastDefault) { + thermal_headroom_forecast_(kThermalHeadroomForecastDefault) { last_clock_ = Clock(); perfhintsession_start_ = 0; } @@ -188,8 +188,8 @@ class ADPFManager { float perfhintsession_start_; - // Theamal headroom forecast duration. - int32_t thremal_headroom_forcast_; + // Thermal headroom forecast duration. + int32_t thermal_headroom_forecast_; }; #endif // ADPF_MANAGER_H_ diff --git a/agdk/common/include/box_renderer.h b/agdk/common/include/box_renderer.h index 3bee60e2..bd670fce 100644 --- a/agdk/common/include/box_renderer.h +++ b/agdk/common/include/box_renderer.h @@ -67,7 +67,7 @@ struct SHADER_PARAMS { GLuint matrix_view_; }; -// Box renerer implementation. +// Box renderer implementation. class BoxRenderer { public: // Ctor. @@ -82,7 +82,7 @@ class BoxRenderer { // Update camera etc for each frame. void Update(float dTime); - // Bind camera interface to the rendrer. + // Bind camera interface to the renderer. bool Bind(ndk_helper::TapCamera *camera); // Unload shaders and buffers. diff --git a/agdk/common/ndk_helper/GLContext.cpp b/agdk/common/ndk_helper/GLContext.cpp index 4413a735..8de22f67 100644 --- a/agdk/common/ndk_helper/GLContext.cpp +++ b/agdk/common/ndk_helper/GLContext.cpp @@ -214,7 +214,7 @@ namespace ndk_helper { return EGL_SUCCESS; } - int32_t original_widhth = screen_width_; + int32_t original_width = screen_width_; int32_t original_height = screen_height_; // Create surface @@ -223,7 +223,7 @@ namespace ndk_helper { eglQuerySurface(display_, surface_, EGL_WIDTH, &screen_width_); eglQuerySurface(display_, surface_, EGL_HEIGHT, &screen_height_); - if (screen_width_ != original_widhth || screen_height_ != original_height) { + if (screen_width_ != original_width || screen_height_ != original_height) { // Screen resized LOGI("Screen resized"); } diff --git a/agdk/common/ndk_helper/JNIHelper.h b/agdk/common/ndk_helper/JNIHelper.h index e05dedd0..4dd11662 100644 --- a/agdk/common/ndk_helper/JNIHelper.h +++ b/agdk/common/ndk_helper/JNIHelper.h @@ -137,9 +137,9 @@ namespace ndk_helper { static JNIHelper* GetInstance(); /* - * Read a file from a strorage. + * Read a file from a storage. * First, the method tries to read the file from an external storage. - * If it fails to read, it falls back to use assset manager and try to read + * If it fails to read, it falls back to use asset manager and try to read * the file from APK asset. * * arguments: @@ -168,7 +168,7 @@ namespace ndk_helper { /* * Retrieve external file directory through JNI call * - * return: std::string containing external file diretory + * return: std::string containing external file directory */ std::string GetExternalFilesDir(); diff --git a/agdk/common/ndk_helper/Shader.cpp b/agdk/common/ndk_helper/Shader.cpp index b5a34f42..445eea55 100644 --- a/agdk/common/ndk_helper/Shader.cpp +++ b/agdk/common/ndk_helper/Shader.cpp @@ -65,7 +65,7 @@ namespace ndk_helper { it++; } - LOGI("Patched Shdader:\n%s", str.c_str()); + LOGI("Patched Shader:\n%s", str.c_str()); std::vector v(str.begin(), str.end()); str.clear(); diff --git a/agdk/common/ndk_helper/TapCamera.cpp b/agdk/common/ndk_helper/TapCamera.cpp index beea1185..662bf58d 100644 --- a/agdk/common/ndk_helper/TapCamera.cpp +++ b/agdk/common/ndk_helper/TapCamera.cpp @@ -44,7 +44,7 @@ namespace ndk_helper { camera_rotation_start_(0.f), camera_rotation_now_(0.f), momentum_(false), - momemtum_steps_(0.f), + momentum_steps_(0.f), flip_z_(0.f) { // Init offset InitParameters(); @@ -86,7 +86,7 @@ namespace ndk_helper { void TapCamera::Update() { if (momentum_) { - float momenttum_steps = momemtum_steps_; + float momentum_steps = momentum_steps_; // Momentum rotation Vec2 v = vec_drag_delta_; @@ -104,8 +104,8 @@ namespace ndk_helper { vec_offset_delta_ = vec_offset_delta_ * MOMENTUM_FACTOR_DECREASE_SHIFT; // Count steps - momemtum_steps_ = momenttum_steps * MOMENTUM_FACTOR_DECREASE; - if (momemtum_steps_ < MOMENTUM_FACTOR_THRESHOLD) { + momentum_steps_ = momentum_steps * MOMENTUM_FACTOR_DECREASE; + if (momentum_steps_ < MOMENTUM_FACTOR_THRESHOLD) { momentum_ = false; } } else { @@ -124,10 +124,10 @@ namespace ndk_helper { void TapCamera::Update(const double time) { if (momentum_) { - const float MOMENTAM_UNIT = 0.0166f; + const float MOMENTUM_UNIT = 0.0166f; // Activate every 16.6msec - if (time - time_stamp_ >= MOMENTAM_UNIT) { - float momenttum_steps = momemtum_steps_; + if (time - time_stamp_ >= MOMENTUM_UNIT) { + float momentum_steps = momentum_steps_; // Momentum rotation Vec2 v = vec_drag_delta_; @@ -145,8 +145,8 @@ namespace ndk_helper { vec_offset_delta_ = vec_offset_delta_ * MOMENTUM_FACTOR_DECREASE_SHIFT; // Count steps - momemtum_steps_ = momenttum_steps * MOMENTUM_FACTOR_DECREASE; - if (momemtum_steps_ < MOMENTUM_FACTOR_THRESHOLD) { + momentum_steps_ = momentum_steps * MOMENTUM_FACTOR_DECREASE; + if (momentum_steps_ < MOMENTUM_FACTOR_THRESHOLD) { momentum_ = false; } time_stamp_ = time; @@ -200,7 +200,7 @@ namespace ndk_helper { dragging_ = false; momentum_ = true; - momemtum_steps_ = 1.0f; + momentum_steps_ = 1.0f; } void TapCamera::Drag(const Vec2 &v) { @@ -214,7 +214,7 @@ namespace ndk_helper { } //---------------------------------------------------------- - // Pinch controll + // Pinch control //---------------------------------------------------------- void TapCamera::BeginPinch(const Vec2 &v1, const Vec2 &v2) { if (dragging_) EndDrag(); @@ -244,7 +244,7 @@ namespace ndk_helper { void TapCamera::EndPinch() { pinching_ = false; momentum_ = true; - momemtum_steps_ = 1.f; + momentum_steps_ = 1.f; vec_offset_ += vec_offset_now_; camera_rotation_ += camera_rotation_now_; vec_offset_now_ = Vec3(); @@ -291,7 +291,7 @@ namespace ndk_helper { } //---------------------------------------------------------- - // Trackball controll + // Trackball control //---------------------------------------------------------- void TapCamera::BallUpdate() { if (dragging_) { diff --git a/agdk/common/ndk_helper/TapCamera.h b/agdk/common/ndk_helper/TapCamera.h index da9139b4..cae5ff84 100644 --- a/agdk/common/ndk_helper/TapCamera.h +++ b/agdk/common/ndk_helper/TapCamera.h @@ -74,7 +74,7 @@ namespace ndk_helper { Vec2 vec_last_input_; Vec3 vec_offset_last_; Vec3 vec_offset_delta_; - float momemtum_steps_; + float momentum_steps_; Vec2 vec_flip_; float flip_z_; diff --git a/agdk/common/ndk_helper/VecMath.h b/agdk/common/ndk_helper/VecMath.h index 7af03848..d5872308 100644 --- a/agdk/common/ndk_helper/VecMath.h +++ b/agdk/common/ndk_helper/VecMath.h @@ -908,7 +908,7 @@ namespace ndk_helper { return *this; } - // Non destuctive version + // Non destructive version Quaternion Conjugated() { Quaternion ret; ret.x_ = -x_; diff --git a/agdk/common/src/adpf_manager.cpp b/agdk/common/src/adpf_manager.cpp index 1e3e5f7c..5e130d90 100644 --- a/agdk/common/src/adpf_manager.cpp +++ b/agdk/common/src/adpf_manager.cpp @@ -23,7 +23,7 @@ void nativeThermalStatusChanged(JNIEnv *env, jclass cls, jint thermalState) { ADPFManager::getInstance().SetThermalStatus(thermalState); } -// Native API to register/unregiser thethermal status change listener. +// Native API to register/unregister the thermal status change listener. // The function is called from Activity implementation in Java. void thermal_callback(void *data, AThermalStatus status) { ADPFManager::getInstance().SetThermalStatus(status); @@ -46,7 +46,7 @@ void nativeUnregisterThermalStatusListener(JNIEnv *env, jclass cls) { if (__builtin_available(android 31, *)) { auto ret = AThermal_unregisterThermalStatusListener( manager, thermal_callback, nullptr); - ALOGI("Thermal Status callback unregisterred to:%d", ret); + ALOGI("Thermal Status callback unregistered to:%d", ret); } } } @@ -93,7 +93,7 @@ bool ADPFManager::InitializePowerManager() { JNIEnv *env = NativeEngine::GetInstance()->GetJniEnv(); obj_power_service_ = GetService(env, "POWER_SERVICE"); - // Retrive API reference. + // Retrieve API reference. jclass cls_power_service = env->GetObjectClass(obj_power_service_); get_thermal_headroom_ = env->GetMethodID(cls_power_service, "getThermalHeadroom", "(I)F"); @@ -117,7 +117,7 @@ bool ADPFManager::InitializeBatteryManager() { JNIEnv *env = NativeEngine::GetInstance()->GetJniEnv(); obj_battery_service_ = GetService(env, "BATTERY_SERVICE"); - // Retrive API reference. + // Retrieve API reference. jclass cls_battery_service = env->GetObjectClass(obj_battery_service_); get_long_property_ = env->GetMethodID(cls_battery_service, "getLongProperty", "(I)J"); @@ -163,7 +163,7 @@ float ADPFManager::UpdateThermalStatusHeadRoom() { // Use NDK API to retrieve thermal status headroom. if (__builtin_available(android 31, *)) { thermal_headroom_ = AThermal_getThermalHeadroom(thermal_manager_, - thremal_headroom_forcast_); + thremal_headroom_forecast_); } return thermal_headroom_; } @@ -175,7 +175,7 @@ float ADPFManager::UpdateThermalStatusHeadRoom() { // Get thermal headroom! thermal_headroom_ = env->CallFloatMethod( - obj_power_service_, get_thermal_headroom_, thremal_headroom_forcast_); + obj_power_service_, get_thermal_headroom_, thermal_headroom_forecast_); ALOGE("Current thermal Headroom %f", thermal_headroom_); return thermal_headroom_; } @@ -192,7 +192,7 @@ bool ADPFManager::InitializePerformanceHintManager() { jmethodID mid_createhintsession = env->GetMethodID(cls_perfhint_service, "createHintSession", "([IJ)Landroid/os/PerformanceHintManager$Session;"); - jmethodID mid_preferedupdaterate = env->GetMethodID( + jmethodID mid_preferredupdaterate = env->GetMethodID( cls_perfhint_service, "getPreferredUpdateRateNanos", "()J"); // Create int array which contain current tid. @@ -209,7 +209,7 @@ bool ADPFManager::InitializePerformanceHintManager() { } else { obj_perfhint_session_ = env->NewGlobalRef(obj_hintsession); preferred_update_rate_ = - env->CallLongMethod(obj_perfhint_service_, mid_preferedupdaterate); + env->CallLongMethod(obj_perfhint_service_, mid_preferredupdaterate); // Retrieve mid of Session APIs. jclass cls_perfhint_session = env->GetObjectClass(obj_perfhint_session_); diff --git a/agdk/game_controller/app/src/main/cpp/JNIUtil.h b/agdk/game_controller/app/src/main/cpp/JNIUtil.h index 021a5f28..f74a973b 100644 --- a/agdk/game_controller/app/src/main/cpp/JNIUtil.h +++ b/agdk/game_controller/app/src/main/cpp/JNIUtil.h @@ -27,7 +27,7 @@ // This data comes from a binary resource linked to the library. -// It conatins Java classes compressed into DEX format for dynamic loading. +// It contains Java classes compressed into DEX format for dynamic loading. extern const char _binary_classes_dex_start; extern const char _binary_classes_dex_end; diff --git a/agdk/game_controller/app/src/main/cpp/demo_scene.hpp b/agdk/game_controller/app/src/main/cpp/demo_scene.hpp index 26e930be..f6da236a 100644 --- a/agdk/game_controller/app/src/main/cpp/demo_scene.hpp +++ b/agdk/game_controller/app/src/main/cpp/demo_scene.hpp @@ -23,7 +23,7 @@ class GameAssetManager; -/* Basic scene implentation for our demo UI display */ +/* Basic scene implementation for our demo UI display */ class DemoScene : public Scene { private: // We want to register a touch down as the equivalent of diff --git a/agdk/game_mode/app/src/main/cpp/demo_scene.cpp b/agdk/game_mode/app/src/main/cpp/demo_scene.cpp index ecaa9ab1..9fb52140 100644 --- a/agdk/game_mode/app/src/main/cpp/demo_scene.cpp +++ b/agdk/game_mode/app/src/main/cpp/demo_scene.cpp @@ -105,7 +105,7 @@ void DemoScene::OnStartGraphics() { transition_start_ = Clock(); // 2. Game State: Finish Loading, showing the attract screen which is not - // interruptible + // interruptable GameModeManager::getInstance().SetGameState( false, GAME_STATE_GAMEPLAY_UNINTERRUPTIBLE); } @@ -500,7 +500,7 @@ void DemoScene::DeleteRigidBodies() { } //-------------------------------------------------------------------------------- -// Update phycis world and render boxes. +// Update physics world and render boxes. //-------------------------------------------------------------------------------- void DemoScene::UpdatePhysics() { if (recreate_physics_obj_) { diff --git a/agdk/game_mode/app/src/main/cpp/native_engine.cpp b/agdk/game_mode/app/src/main/cpp/native_engine.cpp index b2e7665d..7663f96d 100644 --- a/agdk/game_mode/app/src/main/cpp/native_engine.cpp +++ b/agdk/game_mode/app/src/main/cpp/native_engine.cpp @@ -78,7 +78,7 @@ NativeEngine::NativeEngine(struct android_app *app) { MY_ASSERT(_singleton == NULL); _singleton = this; - // Initialize Swappy to adjuest swap timing properly. + // Initialize Swappy to adjust swap timing properly. ALOGI("Calling SwappyGL_init"); SwappyGL_init(GetJniEnv(), mApp->activity->javaGameActivity); SwappyGL_setSwapIntervalNS(SWAPPY_SWAP_60FPS); diff --git a/agdk/game_mode/app/src/main/cpp/welcome_scene.cpp b/agdk/game_mode/app/src/main/cpp/welcome_scene.cpp index 56b04a9e..d8ef4490 100644 --- a/agdk/game_mode/app/src/main/cpp/welcome_scene.cpp +++ b/agdk/game_mode/app/src/main/cpp/welcome_scene.cpp @@ -56,9 +56,9 @@ void WelcomeScene::OnInstall() { void WelcomeScene::OnStartGraphics() { // 2. Game State: Finish Loading, showing the attract screen which is - // interruptible + // interruptable GameModeManager::getInstance().SetGameState( - false, GAME_STATE_GAMEPLAY_INTERRUPTIBLE); + false, GAME_STATE_GAMEPLAY_INTERRUPTABLE); } void WelcomeScene::OnKillGraphics() { @@ -77,7 +77,7 @@ void WelcomeScene::OnScreenResized(int width, int height) {} //-------------------------------------------------------------------------------- // Process each frame's status updates. // - Initiate the OpenGL rendering. -// - Monitor the device's thermal staus using ADPF API. +// - Monitor the device's thermal status using ADPF API. // - Update physics using BulletPhysics. // - Render cubes. // - Render UI using ImGUI (Show device's thermal status). diff --git a/codelabs/native-gamepad/final/app/src/main/cpp/demo_scene.hpp b/codelabs/native-gamepad/final/app/src/main/cpp/demo_scene.hpp index e6e901a1..c15071db 100644 --- a/codelabs/native-gamepad/final/app/src/main/cpp/demo_scene.hpp +++ b/codelabs/native-gamepad/final/app/src/main/cpp/demo_scene.hpp @@ -22,7 +22,7 @@ class GameAssetManager; -/* Basic scene implentation for our demo UI display */ +/* Basic scene implementation for our demo UI display */ class DemoScene : public Scene { protected: // is a touch pointer (a.k.a. finger) down at the moment? diff --git a/codelabs/native-gamepad/final/app/src/main/cpp/native_engine.cpp b/codelabs/native-gamepad/final/app/src/main/cpp/native_engine.cpp index 7494f2d7..6ba27f34 100644 --- a/codelabs/native-gamepad/final/app/src/main/cpp/native_engine.cpp +++ b/codelabs/native-gamepad/final/app/src/main/cpp/native_engine.cpp @@ -355,7 +355,7 @@ bool NativeEngine::InitContext() { return false; } - LOGD("NativeEngine: successfull initialized context."); + LOGD("NativeEngine: successful initialized context."); return true; }