diff --git a/inGameAppState.cpp b/inGameAppState.cpp index d05c086..47a028e 100755 --- a/inGameAppState.cpp +++ b/inGameAppState.cpp @@ -80,7 +80,7 @@ namespace battleship{ Camera *cam = Root::getSingleton()->getCamera(); cam->setPosition(Map::getSingleton()->getSpawnPoint(playerId - 1) + Vector3(1, 1, 1) * configData::CAMERA_DISTANCE); - cam->lookAt(Vector3(0, -1, 1).norm(), Vector3(0, 1, 1).norm()); + cam->lookAt(Vector3(0, -1, -1).norm(), Vector3(0, 1, -1).norm()); mainPlayer = Game::getSingleton()->getPlayer(playerId); diff --git a/map.cpp b/map.cpp index 1e65566..a216b0a 100755 --- a/map.cpp +++ b/map.cpp @@ -123,8 +123,8 @@ namespace battleship{ for(u8 *p = asset->image; p != asset->image + size; p += numChannels, pxId += numChannels, numIter++){ Vector2 coords = Vector2( - -(numIter % asset->width - .5 * asset->width), - numIter / asset->width - .5 * asset->height + numIter % asset->width - .5 * asset->width, + -(numIter / asset->width - .5 * asset->height) ); float losFactor = .6, pxCol[3]{ losFactor * oldImageData[pxId + 0], diff --git a/minimapButton.cpp b/minimapButton.cpp index e282a24..7949da1 100644 --- a/minimapButton.cpp +++ b/minimapButton.cpp @@ -20,8 +20,8 @@ namespace battleship{ void MinimapButton::onClick(){ Vector2 clickPos = getCursorPos(); - float posXRatio = 1. - (clickPos.x - pos.x) / size.x; - float posYRatio = 1. - (clickPos.y - pos.y) / size.y; + float posXRatio = (clickPos.x - pos.x) / size.x; + float posYRatio = (clickPos.y - pos.y) / size.y; Camera *cam = Root::getSingleton()->getCamera(); Vector3 mapSize = Map::getSingleton()->getMapSize();