mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-08 21:54:58 +00:00
Rewrote Town Map screen
This commit is contained in:
@@ -2,6 +2,13 @@
|
||||
#
|
||||
#===============================================================================
|
||||
class PokemonPokedexInfo_Scene
|
||||
LEFT = 0
|
||||
TOP = 0
|
||||
RIGHT = 29
|
||||
BOTTOM = 19
|
||||
SQUARE_WIDTH = 16
|
||||
SQUARE_HEIGHT = 16
|
||||
|
||||
def pbStartScene(dexlist, index, region)
|
||||
@viewport = Viewport.new(0, 0, Graphics.width, Graphics.height)
|
||||
@viewport.z = 99999
|
||||
@@ -31,8 +38,8 @@ class PokemonPokedexInfo_Scene
|
||||
pbDrawImagePositions(
|
||||
@sprites["areamap"].bitmap,
|
||||
[["Graphics/UI/Town Map/#{hidden[4]}",
|
||||
hidden[2] * PokemonRegionMap_Scene::SQUARE_WIDTH,
|
||||
hidden[3] * PokemonRegionMap_Scene::SQUARE_HEIGHT]]
|
||||
hidden[2] * SQUARE_WIDTH,
|
||||
hidden[3] * SQUARE_HEIGHT]]
|
||||
)
|
||||
end
|
||||
@sprites["areahighlight"] = BitmapSprite.new(Graphics.width, Graphics.height, @viewport)
|
||||
@@ -315,12 +322,12 @@ class PokemonPokedexInfo_Scene
|
||||
# defined point in town_map.txt, and which either have no Self Switch
|
||||
# controlling their visibility or whose Self Switch is ON)
|
||||
visible_points = []
|
||||
@mapdata.point.each do |loc|
|
||||
next if loc[7] && !$game_switches[loc[7]] # Point is not visible
|
||||
visible_points.push([loc[0], loc[1]])
|
||||
@mapdata.points.each do |loc|
|
||||
next if loc[:switch] && !$game_switches[loc[:switch]] # Point is not visible
|
||||
visible_points.push(loc[:position])
|
||||
end
|
||||
# Find all points with a visible area for @species
|
||||
town_map_width = 1 + PokemonRegionMap_Scene::RIGHT - PokemonRegionMap_Scene::LEFT
|
||||
town_map_width = 1 + RIGHT - LEFT
|
||||
ret = []
|
||||
GameData::Encounter.each_of_version($PokemonGlobal.encounter_version) do |enc_data|
|
||||
next if !pbFindEncounter(enc_data.types, @species) # Species isn't in encounter table
|
||||
@@ -362,9 +369,9 @@ class PokemonPokedexInfo_Scene
|
||||
# Draw coloured squares on each point of the Town Map with a nest
|
||||
pointcolor = Color.new(0, 248, 248)
|
||||
pointcolorhl = Color.new(192, 248, 248)
|
||||
town_map_width = 1 + PokemonRegionMap_Scene::RIGHT - PokemonRegionMap_Scene::LEFT
|
||||
sqwidth = PokemonRegionMap_Scene::SQUARE_WIDTH
|
||||
sqheight = PokemonRegionMap_Scene::SQUARE_HEIGHT
|
||||
town_map_width = 1 + RIGHT - LEFT
|
||||
sqwidth = SQUARE_WIDTH
|
||||
sqheight = SQUARE_HEIGHT
|
||||
points.length.times do |j|
|
||||
next if !points[j]
|
||||
x = (j % town_map_width) * sqwidth
|
||||
|
||||
Reference in New Issue
Block a user