diff --git a/Data/Scripts/010_Data/001_Hardcoded data/010_Status.rb b/Data/Scripts/010_Data/001_Hardcoded data/010_Status.rb index 3b4e53845..ee86d45f9 100644 --- a/Data/Scripts/010_Data/001_Hardcoded data/010_Status.rb +++ b/Data/Scripts/010_Data/001_Hardcoded data/010_Status.rb @@ -13,6 +13,8 @@ module GameData DATA = {} + ICON_SIZE = [44, 16] + extend ClassMethodsSymbols include InstanceMethods diff --git a/Data/Scripts/010_Data/002_PBS data/005_Move.rb b/Data/Scripts/010_Data/002_PBS data/005_Move.rb index c20ecbfa6..5323c1d4b 100644 --- a/Data/Scripts/010_Data/002_PBS data/005_Move.rb +++ b/Data/Scripts/010_Data/002_PBS data/005_Move.rb @@ -35,6 +35,8 @@ module GameData "Description" => [:real_description, "q"] } + CATEGORY_ICON_SIZE = [64, 28] + extend ClassMethodsSymbols include InstanceMethods diff --git a/Data/Scripts/016_UI/005_UI_Party.rb b/Data/Scripts/016_UI/005_UI_Party.rb index 3f874cd88..407301ed9 100644 --- a/Data/Scripts/016_UI/005_UI_Party.rb +++ b/Data/Scripts/016_UI/005_UI_Party.rb @@ -173,8 +173,6 @@ class PokemonPartyPanel < Sprite TEXT_BASE_COLOR = Color.new(248, 248, 248) TEXT_SHADOW_COLOR = Color.new(40, 40, 40) HP_BAR_WIDTH = 96 - STATUS_ICON_WIDTH = 44 - STATUS_ICON_HEIGHT = 16 def initialize(pokemon, index, viewport = nil) super(viewport) @@ -427,7 +425,7 @@ class PokemonPartyPanel < Sprite status = GameData::Status.count end return if status < 0 - statusrect = Rect.new(0, STATUS_ICON_HEIGHT * status, STATUS_ICON_WIDTH, STATUS_ICON_HEIGHT) + statusrect = Rect.new(0, status * GameData::Status::ICON_SIZE[1], *GameData::Status::ICON_SIZE) @overlaysprite.bitmap.blt(78, 68, @statuses.bitmap, statusrect) end diff --git a/Data/Scripts/016_UI/006_UI_Summary.rb b/Data/Scripts/016_UI/006_UI_Summary.rb index 360369db4..1483ae8b5 100644 --- a/Data/Scripts/016_UI/006_UI_Summary.rb +++ b/Data/Scripts/016_UI/006_UI_Summary.rb @@ -328,7 +328,8 @@ class PokemonSummary_Scene status = GameData::Status.count end if status >= 0 - imagepos.push([_INTL("Graphics/UI/statuses"), 124, 100, 0, 16 * status, 44, 16]) + imagepos.push([_INTL("Graphics/UI/statuses"), 124, 100, + 0, status * GameData::Status::ICON_SIZE[1], *GameData::Status::ICON_SIZE]) end # Show Pokérus cured icon if @pokemon.pokerusStage == 2 @@ -837,7 +838,8 @@ class PokemonSummary_Scene # Draw all text pbDrawTextPositions(overlay, textpos) # Draw selected move's damage category icon - imagepos = [["Graphics/UI/category", 166, 124, 0, selected_move.display_category(@pokemon) * 28, 64, 28]] + imagepos = [["Graphics/UI/category", 166, 124, + 0, selected_move.display_category(@pokemon) * CATEGORY_ICON_SIZE[1], *CATEGORY_ICON_SIZE]] pbDrawImagePositions(overlay, imagepos) # Draw selected move's description drawTextEx(overlay, 4, 224, 230, 5, selected_move.description, base, shadow) diff --git a/Data/Scripts/016_UI/022_UI_MoveRelearner.rb b/Data/Scripts/016_UI/022_UI_MoveRelearner.rb index 8e70f5f56..b9bba5d79 100644 --- a/Data/Scripts/016_UI/022_UI_MoveRelearner.rb +++ b/Data/Scripts/016_UI/022_UI_MoveRelearner.rb @@ -95,7 +95,7 @@ class MoveRelearner_Scene textpos.push([accuracy == 0 ? "---" : "#{accuracy}%", 468, 184, :center, Color.new(64, 64, 64), Color.new(176, 176, 176)]) pbDrawTextPositions(overlay, textpos) - imagepos.push(["Graphics/UI/category", 436, 116, 0, category * 28, 64, 28]) + imagepos.push(["Graphics/UI/category", 436, 116, 0, category * CATEGORY_ICON_SIZE[1], *CATEGORY_ICON_SIZE]) if @sprites["commands"].index < @moves.length - 1 imagepos.push(["Graphics/UI/Move Reminder/buttons", 48, 350, 0, 0, 76, 32]) end