mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-07 13:15:01 +00:00
Moved global/map metadata constants and schema into modules
This commit is contained in:
@@ -27,7 +27,7 @@ class PokemonPokedexInfo_Scene
|
||||
@sprites["infosprite"].x = 104
|
||||
@sprites["infosprite"].y = 136
|
||||
@mapdata = pbLoadTownMapData
|
||||
mappos = ($game_map) ? pbGetMetadata($game_map.map_id,MetadataMapPosition) : nil
|
||||
mappos = ($game_map) ? pbGetMetadata($game_map.map_id,MapMetadata::MAP_POSITION) : nil
|
||||
if @region<0 # Use player's current region
|
||||
@region = (mappos) ? mappos[0] : 0 # Region 0 default
|
||||
end
|
||||
@@ -311,7 +311,7 @@ class PokemonPokedexInfo_Scene
|
||||
for enc in encdata.keys
|
||||
enctypes = encdata[enc][1]
|
||||
if pbFindEncounter(enctypes,@species)
|
||||
mappos = pbGetMetadata(enc,MetadataMapPosition)
|
||||
mappos = pbGetMetadata(enc,MapMetadata::MAP_POSITION)
|
||||
if mappos && mappos[0]==@region
|
||||
showpoint = true
|
||||
for loc in @mapdata[@region][2]
|
||||
@@ -319,7 +319,7 @@ class PokemonPokedexInfo_Scene
|
||||
loc[7] && !$game_switches[loc[7]]
|
||||
end
|
||||
if showpoint
|
||||
mapsize = pbGetMetadata(enc,MetadataMapSize)
|
||||
mapsize = pbGetMetadata(enc,MapMetadata::MAP_SIZE)
|
||||
if mapsize && mapsize[0] && mapsize[0]>0
|
||||
sqwidth = mapsize[0]
|
||||
sqheight = (mapsize[1].length*1.0/mapsize[0]).ceil
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -159,7 +159,7 @@ class PokemonLoad_Scene
|
||||
|
||||
def pbSetParty(trainer)
|
||||
return if !trainer || !trainer.party
|
||||
meta = pbGetMetadata(0,MetadataPlayerA+trainer.metaID)
|
||||
meta = pbGetMetadata(0,Metadata::PLAYER_A+trainer.metaID)
|
||||
if meta
|
||||
filename = pbGetPlayerCharset(meta,1,trainer,true)
|
||||
@sprites["player"] = TrainerWalkingCharSprite.new(filename,@viewport)
|
||||
|
||||
Reference in New Issue
Block a user