Fixed battle graphics being incorrectly positioned, fixed mispositioned number choice window text

This commit is contained in:
Maruno17
2020-11-27 21:14:38 +00:00
parent eb22e49d9b
commit 01f451b398
4 changed files with 27 additions and 27 deletions

View File

@@ -1,27 +1,29 @@
module PokeBattle_SceneConstants
USE_ABILITY_SPLASH = true
# Text colors
MESSAGE_BASE_COLOR = Color.new(80,80,88)
MESSAGE_SHADOW_COLOR = Color.new(160,160,168)
MESSAGE_BASE_COLOR = Color.new(80, 80, 88)
MESSAGE_SHADOW_COLOR = Color.new(160, 160, 168)
# The number of party balls to show in each side's lineup.
NUM_BALLS = 6
# Centre bottom of the player's side base graphic
PLAYER_BASE_X = 128
PLAYER_BASE_Y = Graphics.height - 80
PLAYER_BASE_Y = SCREEN_HEIGHT - 80
# Centre middle of the foe's side base graphic
FOE_BASE_X = Graphics.width - 128
FOE_BASE_Y = (Graphics.height * 3/4) - 112
FOE_BASE_X = SCREEN_WIDTH - 128
FOE_BASE_Y = (SCREEN_HEIGHT * 3 / 4) - 112
# Returns where the centre bottom of a battler's sprite should be, given its
# index and the number of battlers on its side, assuming the battler has
# metrics of 0 (those are added later).
def self.pbBattlerPosition(index,sideSize=1)
def self.pbBattlerPosition(index, sideSize = 1)
# Start at the centre of the base for the appropriate side
if (index&1)==0; ret = [PLAYER_BASE_X,PLAYER_BASE_Y]
else; ret = [FOE_BASE_X,FOE_BASE_Y]
if (index & 1) == 0
ret = [PLAYER_BASE_X, PLAYER_BASE_Y]
else
ret = [FOE_BASE_X, FOE_BASE_Y]
end
# Shift depending on index (no shifting needed for sideSize of 1)
case sideSize
@@ -37,19 +39,21 @@ module PokeBattle_SceneConstants
# Returns where the centre bottom of a trainer's sprite should be, given its
# side (0/1), index and the number of trainers on its side.
def self.pbTrainerPosition(side,index=0,sideSize=1)
def self.pbTrainerPosition(side, index = 0, sideSize = 1)
# Start at the centre of the base for the appropriate side
if side==0; ret = [PLAYER_BASE_X,PLAYER_BASE_Y-16]
else; ret = [FOE_BASE_X,FOE_BASE_Y+6]
if side == 0
ret = [PLAYER_BASE_X, PLAYER_BASE_Y - 16]
else
ret = [FOE_BASE_X, FOE_BASE_Y + 6]
end
# Shift depending on index (no shifting needed for sideSize of 1)
case sideSize
when 2
ret[0] += [-48, 48, 32, -32][2*index+side]
ret[1] += [ 0, 0, 0, -16][2*index+side]
ret[0] += [-48, 48, 32, -32][2 * index + side]
ret[1] += [ 0, 0, 0, -16][2 * index + side]
when 3
ret[0] += [-80, 80, 0, 0, 80, -80][2*index+side]
ret[1] += [ 0, 0, 0, -8, 0, -16][2*index+side]
ret[0] += [-80, 80, 0, 0, 80, -80][2 * index + side]
ret[1] += [ 0, 0, 0, -8, 0, -16][2 * index + side]
end
return ret
end