Fixes displaced hat/hair in pokemarts

This commit is contained in:
infinitefusion
2024-07-03 20:42:11 -04:00
parent dee677224d
commit 6180590860
9 changed files with 46 additions and 3 deletions

View File

@@ -36,6 +36,7 @@ class Game_Map
attr_reader :display_x # display x-coordinate * 128
attr_reader :display_y # display y-coordinate * 128
attr_accessor :need_refresh # refresh request flag
attr_accessor :scroll_direction
TILE_WIDTH = 32
TILE_HEIGHT = 32

View File

@@ -178,6 +178,12 @@ class Game_Player < Game_Character
self.map.display_y = y * Game_Map::REAL_RES_Y - SCREEN_CENTER_Y
end
def isCentered()
x_centered = self.map.display_x == x * Game_Map::REAL_RES_X - SCREEN_CENTER_X
y_centered = self.map.display_y == y * Game_Map::REAL_RES_Y - SCREEN_CENTER_Y
return x_centered && y_centered
end
#-----------------------------------------------------------------------------
# * Move to Designated Position
# x : x-coordinate