Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix typos #64

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions agdk/adpf/app/src/main/cpp/demo_scene.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion agdk/adpf/app/src/main/cpp/native_engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "
Expand Down
2 changes: 1 addition & 1 deletion agdk/agde/Teapot/GameApplication/GameApplication.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down
4 changes: 2 additions & 2 deletions agdk/agde/Teapot/GameEngine/GLContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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");
}
Expand Down
12 changes: 6 additions & 6 deletions agdk/agde/Teapot/GameEngine/JNIHelper.h
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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 ""; }

Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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();

Expand Down
26 changes: 13 additions & 13 deletions agdk/agde/Teapot/GameEngine/TapCamera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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_;
Expand All @@ -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 {
Expand All @@ -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_;
Expand All @@ -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;
Expand Down Expand Up @@ -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) {
Expand All @@ -215,7 +215,7 @@ namespace ndk_helper {
}

//----------------------------------------------------------
// Pinch controll
// Pinch control
//----------------------------------------------------------
void TapCamera::BeginPinch(const Vec2 &v1, const Vec2 &v2) {
if (dragging_) EndDrag();
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -292,7 +292,7 @@ namespace ndk_helper {
}

//----------------------------------------------------------
// Trackball controll
// Trackball control
//----------------------------------------------------------
void TapCamera::BallUpdate() {
if (dragging_) {
Expand Down
2 changes: 1 addition & 1 deletion agdk/agde/Teapot/GameEngine/TapCamera.h
Original file line number Diff line number Diff line change
Expand Up @@ -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_;
Expand Down
4 changes: 2 additions & 2 deletions agdk/agde/Teapot/GameEngine/TeapotRenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion agdk/agde/Teapot/GameEngine/VecMath.h
Original file line number Diff line number Diff line change
Expand Up @@ -909,7 +909,7 @@ namespace ndk_helper {
return *this;
}

// Non destuctive version
// Non destructive version
Quaternion Conjugated() {
Quaternion ret;
ret.x_ = -x_;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ bool NativeEngine::InitContext() {
return false;
}

LOGD("NativeEngine: successfull initialized context.");
LOGD("NativeEngine: successful initialized context.");

return true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion agdk/agdktunnel/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion agdk/agdktunnel/app/src/main/cpp/anim.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down