File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -231,10 +231,10 @@ bool Game_Player::IsTeleporting() const {
231
231
void Game_Player::Center (int x, int y) {
232
232
int center_x = (DisplayUi->GetWidth () / (TILE_SIZE / 16 ) - TILE_SIZE * 2 ) * 8 - Game_Map::GetPanX ();
233
233
int center_y = (DisplayUi->GetHeight () / (TILE_SIZE / 16 ) - TILE_SIZE) * 8 - Game_Map::GetPanY ();
234
- int max_x = (Game_Map::GetWidth () - DisplayUi->GetWidth () / TILE_SIZE) * ( SCREEN_TILE_WIDTH) ;
235
- int max_y = (Game_Map::GetHeight () - DisplayUi->GetHeight () / TILE_SIZE) * ( SCREEN_TILE_WIDTH) ;
234
+ int max_x = (Game_Map::GetWidth () - DisplayUi->GetWidth () / TILE_SIZE) * SCREEN_TILE_WIDTH;
235
+ int max_y = (Game_Map::GetHeight () - DisplayUi->GetHeight () / TILE_SIZE) * SCREEN_TILE_WIDTH;
236
236
Game_Map::SetDisplayX (max (0 , min ((x * SCREEN_TILE_WIDTH - center_x), max_x)));
237
- Game_Map::SetDisplayY (max (0 , min ((y * SCREEN_TILE_WIDTH - center_y), max_y)));
237
+ Game_Map::SetDisplayY (max (0 , min ((y * SCREEN_TILE_WIDTH - center_y), max_y)));
238
238
}
239
239
240
240
void Game_Player::MoveTo (int x, int y) {
You can’t perform that action at this time.
0 commit comments