mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-06 06:01:46 +00:00
Fixed battle graphics being incorrectly positioned, fixed mispositioned number choice window text
This commit is contained in:
@@ -33,11 +33,11 @@ end
|
||||
class Spriteset_Map
|
||||
attr_reader :map
|
||||
attr_accessor :tilemap
|
||||
@@viewport0 = Viewport.new(0,0,Graphics.width,Graphics.height) # Panorama
|
||||
@@viewport0 = Viewport.new(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT) # Panorama
|
||||
@@viewport0.z = -100
|
||||
@@viewport1 = Viewport.new(0,0,Graphics.width,Graphics.height) # Map, events, player, fog
|
||||
@@viewport1 = Viewport.new(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT) # Map, events, player, fog
|
||||
@@viewport1.z = 0
|
||||
@@viewport3 = Viewport.new(0,0,Graphics.width,Graphics.height) # Flashing
|
||||
@@viewport3 = Viewport.new(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT) # Flashing
|
||||
@@viewport3.z = 500
|
||||
|
||||
def Spriteset_Map.viewport # For access by Spriteset_Global
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
class Spriteset_Global
|
||||
attr_reader :playersprite
|
||||
@@viewport2 = Viewport.new(0, 0, Graphics.width, Graphics.height)
|
||||
@@viewport2 = Viewport.new(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT)
|
||||
@@viewport2.z = 200
|
||||
|
||||
def initialize
|
||||
|
||||
@@ -663,11 +663,11 @@ class Window_InputNumberPokemon < SpriteWindow_Base
|
||||
self.contents.clear
|
||||
s=sprintf("%0*d",@digits_max,@number.abs)
|
||||
if @sign
|
||||
textHelper(0,0,@negative ? "-" : "+",0)
|
||||
textHelper(0,6,@negative ? "-" : "+",0)
|
||||
end
|
||||
for i in 0...@digits_max
|
||||
index=i+(@sign ? 1 : 0)
|
||||
textHelper(index*24,0,s[i,1],index)
|
||||
textHelper(index*24,6,s[i,1],index)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -715,13 +715,9 @@ class Window_InputNumberPokemon < SpriteWindow_Base
|
||||
|
||||
def textHelper(x,y,text,i)
|
||||
textwidth=self.contents.text_size(text).width
|
||||
self.contents.font.color=@shadowColor
|
||||
pbDrawShadow(self.contents,x+(12-textwidth/2),y, textwidth+4, 32, text)
|
||||
self.contents.font.color=@baseColor
|
||||
self.contents.draw_text(x+(12-textwidth/2),y, textwidth+4, 32, text)
|
||||
pbDrawShadowText(self.contents, x+(12-textwidth/2), y, textwidth+4, 32, text, @baseColor, @shadowColor)
|
||||
if @index==i && @active && @frame/15==0
|
||||
colors=getDefaultTextColors(self.windowskin)
|
||||
self.contents.fill_rect(x+(12-textwidth/2),y+30,textwidth,2,colors[0])
|
||||
self.contents.fill_rect(x+(12-textwidth/2), y+24, textwidth, 2, @baseColor)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -9,19 +9,21 @@ module PokeBattle_SceneConstants
|
||||
|
||||
# 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)
|
||||
# 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
|
||||
@@ -39,8 +41,10 @@ module PokeBattle_SceneConstants
|
||||
# side (0/1), index and the number of trainers on its side.
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user