diff --git a/game.cpp b/game.cpp index 5a3d7b5..658aaa5 100644 --- a/game.cpp +++ b/game.cpp @@ -421,9 +421,9 @@ public: Character() { - mCamera.position.x = UNITS_PER_SQUARE * 1; - mCamera.position.y = UNITS_PER_SQUARE * 5; - mCamera.direction = 200; + mCamera.position.x = 2468;//UNITS_PER_SQUARE * 1; + mCamera.position.y = 6736;//UNITS_PER_SQUARE * 5; + mCamera.direction = -100;//200; mCamera.fovAngle = UNITS_PER_SQUARE / 4; mCamera.height = UNITS_PER_SQUARE / 2; mCamera.resolution.x = 110 / SUBSAMPLE; @@ -489,13 +489,21 @@ void draw() render(player.mCamera,heightFunc,pixelFunc,c); -Vector2D v; -v.x = 5 * UNITS_PER_SQUARE; -v.y = 7 * UNITS_PER_SQUARE; -PixelInfo pos = mapToScreen(v,UNITS_PER_SQUARE / 4,player.mCamera); + Vector2D v; + v.x = 5 * UNITS_PER_SQUARE; + v.y = 7 * UNITS_PER_SQUARE; + PixelInfo pos = mapToScreen(v,UNITS_PER_SQUARE / 4,player.mCamera); -if (pos.depth > 0) - drawSprite(sprite,pos.position.x,pos.position.y,perspectiveScale(32,pos.depth)); + if (pos.depth > 0) + drawSprite(sprite,pos.position.x * SUBSAMPLE,pos.position.y,perspectiveScale(32,pos.depth)); + + p.display.setColor(rgbToIndex(7,7,3)); + p.display.setCursor(1,1); + p.display.print(player.mCamera.position.x); + p.display.print(" "); + p.display.print(player.mCamera.position.y); + p.display.print(" "); + p.display.print(player.mCamera.direction); } int main()