Moved global/map metadata constants and schema into modules

This commit is contained in:
Maruno17
2020-10-16 22:05:38 +01:00
parent 71a4d09224
commit e82b5409fb
25 changed files with 170 additions and 164 deletions

View File

@@ -77,7 +77,7 @@ class PokemonRegionMap_Scene
@viewport.z = 99999
@sprites = {}
@mapdata = pbLoadTownMapData
playerpos = (!$game_map) ? nil : pbGetMetadata($game_map.map_id,MetadataMapPosition)
playerpos = (!$game_map) ? nil : pbGetMetadata($game_map.map_id,MapMetadata::MAP_POSITION)
if !playerpos
mapindex = 0
@map = @mapdata[0]
@@ -93,7 +93,7 @@ class PokemonRegionMap_Scene
@map = @mapdata[playerpos[0]]
@mapX = playerpos[1]
@mapY = playerpos[2]
mapsize = (!$game_map) ? nil : pbGetMetadata($game_map.map_id,MetadataMapSize)
mapsize = (!$game_map) ? nil : pbGetMetadata($game_map.map_id,MapMetadata::MAP_SIZE)
if mapsize && mapsize[0] && mapsize[0]>0
sqwidth = mapsize[0]
sqheight = (mapsize[1].length*1.0/mapsize[0]).ceil