diff --git a/game.cpp b/game.cpp index a882c0a..0991e82 100644 --- a/game.cpp +++ b/game.cpp @@ -33,7 +33,7 @@ public: mCamera.position.y = 6811; mCamera.direction = 660; mCamera.fovAngle = UNITS_PER_SQUARE / 4; - mCamera.height = UNITS_PER_SQUARE / 2; + mCamera.height = 0; mCamera.resolution.x = 55; mCamera.resolution.y = 88; } @@ -80,6 +80,7 @@ int main() const int16_t step = 50; const int16_t step2 = 10; + const int16_t step3 = 10; Vector2D d = angleToDirection(player.mCamera.direction); @@ -102,6 +103,11 @@ int main() else if (p.leftBtn()) player.mCamera.direction -= step2; + if (p.bBtn()) + player.mCamera.height += step3; + else if (p.cBtn()) + player.mCamera.height -= step3; + player.mCamera.position.x = clamp(player.mCamera.position.x,UNITS_PER_SQUARE / 2,10 * UNITS_PER_SQUARE - UNITS_PER_SQUARE / 2); player.mCamera.position.y = clamp(player.mCamera.position.y,UNITS_PER_SQUARE / 2,10 * UNITS_PER_SQUARE - UNITS_PER_SQUARE / 2); }