------------------------------------------- SET SCREEN POSITION ------------------------------------------
| 191 | } |
| 192 | //------------------------------------------- SET SCREEN POSITION ------------------------------------------ |
| 193 | void GameImpl::setScreenPosition(int x, int y) |
| 194 | { |
| 195 | this->setLastError(); |
| 196 | if ( !data->hasGUI ) return; |
| 197 | |
| 198 | Position scrSize(BW::BWDATA::GameScreenBuffer.width(), BW::BWDATA::GameScreenBuffer.height()-108); |
| 199 | Position mapSize( TilePosition(Map::getWidth(), Map::getHeight()) ); |
| 200 | |
| 201 | // Sets the screen's position relative to the map |
| 202 | Position movePos(x,y); |
| 203 | movePos.setMin(0, 0); |
| 204 | movePos.setMax( mapSize - scrSize); |
| 205 | |
| 206 | movePos &= 0xFFFFFFF8; |
| 207 | BW::BWDATA::MoveToX = movePos.x; |
| 208 | BW::BWDATA::MoveToY = movePos.y; |
| 209 | BW::BWDATA::Game.screenTilePosition = BW::TilePosition(movePos); |
| 210 | BW::BWFXN_UpdateScreenPosition(); |
| 211 | } |
| 212 | //---------------------------------------------- PING MINIMAP ---------------------------------------------- |
| 213 | void GameImpl::pingMinimap(int x, int y) |
| 214 | { |
no test coverage detected