Updated Power Green fonts, repositioned all text accordingly

This commit is contained in:
Maruno17
2022-02-20 23:29:09 +00:00
parent dd78075657
commit 19e50bd507
37 changed files with 353 additions and 332 deletions

View File

@@ -10,13 +10,17 @@ def pbSetWindowText(string)
end end
class Bitmap class Bitmap
attr_accessor :text_offset_y
alias mkxp_draw_text draw_text unless method_defined?(:mkxp_draw_text) alias mkxp_draw_text draw_text unless method_defined?(:mkxp_draw_text)
def draw_text(x, y, width, height = nil, text = "", align = 0) def draw_text(x, y, width, height = nil, text = "", align = 0)
if x.is_a?(Rect) if x.is_a?(Rect)
x.y -= (@text_offset_y || 0)
# rect, string & alignment # rect, string & alignment
mkxp_draw_text(x, y, width) mkxp_draw_text(x, y, width)
else else
y -= (@text_offset_y || 0)
height = text_size(text).height height = text_size(text).height
mkxp_draw_text(x, y, width, height, text, align) mkxp_draw_text(x, y, width, height, text, align)
end end

View File

@@ -4,11 +4,14 @@ module MessageConfig
DARK_TEXT_MAIN_COLOR = Color.new(80, 80, 88) DARK_TEXT_MAIN_COLOR = Color.new(80, 80, 88)
DARK_TEXT_SHADOW_COLOR = Color.new(160, 160, 168) DARK_TEXT_SHADOW_COLOR = Color.new(160, 160, 168)
FONT_NAME = "Power Green" FONT_NAME = "Power Green"
FONT_SIZE = 29 FONT_SIZE = 27
FONT_Y_OFFSET = 8
SMALL_FONT_NAME = "Power Green Small" SMALL_FONT_NAME = "Power Green Small"
SMALL_FONT_SIZE = 25 SMALL_FONT_SIZE = 21
SMALL_FONT_Y_OFFSET = 8
NARROW_FONT_NAME = "Power Green Narrow" NARROW_FONT_NAME = "Power Green Narrow"
NARROW_FONT_SIZE = 29 NARROW_FONT_SIZE = 27
NARROW_FONT_Y_OFFSET = 8
# 0 = Pause cursor is displayed at end of text # 0 = Pause cursor is displayed at end of text
# 1 = Pause cursor is displayed at bottom right # 1 = Pause cursor is displayed at bottom right
# 2 = Pause cursor is displayed at lower middle side # 2 = Pause cursor is displayed at lower middle side
@@ -408,18 +411,21 @@ end
def pbSetSystemFont(bitmap) def pbSetSystemFont(bitmap)
bitmap.font.name = MessageConfig.pbGetSystemFontName bitmap.font.name = MessageConfig.pbGetSystemFontName
bitmap.font.size = MessageConfig::FONT_SIZE bitmap.font.size = MessageConfig::FONT_SIZE
bitmap.text_offset_y = MessageConfig::FONT_Y_OFFSET
end end
# Sets a bitmap's font to the system small font. # Sets a bitmap's font to the system small font.
def pbSetSmallFont(bitmap) def pbSetSmallFont(bitmap)
bitmap.font.name = MessageConfig.pbGetSmallFontName bitmap.font.name = MessageConfig.pbGetSmallFontName
bitmap.font.size = MessageConfig::SMALL_FONT_SIZE bitmap.font.size = MessageConfig::SMALL_FONT_SIZE
bitmap.text_offset_y = MessageConfig::SMALL_FONT_Y_OFFSET
end end
# Sets a bitmap's font to the system narrow font. # Sets a bitmap's font to the system narrow font.
def pbSetNarrowFont(bitmap) def pbSetNarrowFont(bitmap)
bitmap.font.name = MessageConfig.pbGetNarrowFontName bitmap.font.name = MessageConfig.pbGetNarrowFontName
bitmap.font.size = MessageConfig::NARROW_FONT_SIZE bitmap.font.size = MessageConfig::NARROW_FONT_SIZE
bitmap.text_offset_y = MessageConfig::NARROW_FONT_Y_OFFSET
end end
#=============================================================================== #===============================================================================

View File

@@ -1,7 +1,7 @@
#=============================================================================== #===============================================================================
# #
#=============================================================================== #===============================================================================
# Represents a window with no formatting capabilities. Its text color can be set, # Represents a window with no formatting capabilities. Its text color can be set,
# though, and line breaks are supported, but the text is generally unformatted. # though, and line breaks are supported, but the text is generally unformatted.
class Window_UnformattedTextPokemon < SpriteWindow_Base class Window_UnformattedTextPokemon < SpriteWindow_Base
attr_reader :text attr_reader :text
@@ -101,7 +101,7 @@ class Window_UnformattedTextPokemon < SpriteWindow_Base
self.contents = pbDoEnsureBitmap(self.contents, self.width - self.borderX, self.contents = pbDoEnsureBitmap(self.contents, self.width - self.borderX,
self.height - self.borderY) self.height - self.borderY)
self.contents.clear self.contents.clear
drawTextEx(self.contents, 0, 4, self.contents.width, 0, drawTextEx(self.contents, 0, -2, self.contents.width, 0, # TEXT OFFSET
@text.gsub(/\r/, ""), @baseColor, @shadowColor) @text.gsub(/\r/, ""), @baseColor, @shadowColor)
end end
end end
@@ -317,7 +317,6 @@ class Window_AdvancedTextPokemon < SpriteWindow_Base
chy = ch[2] + ch[4] chy = ch[2] + ch[4]
width = chx if width < chx width = chx if width < chx
height = chy if height < chy height = chy if height < chy
ch[2] += 4
if !ch[5] && ch[0] == "\n" if !ch[5] && ch[0] == "\n"
numlines += 1 numlines += 1
if numlines >= visiblelines if numlines >= visiblelines
@@ -345,7 +344,6 @@ class Window_AdvancedTextPokemon < SpriteWindow_Base
chy = ch[2] + ch[4] chy = ch[2] + ch[4]
width = chx if width < chx width = chx if width < chx
height = chy if height < chy height = chy if height < chy
ch[2] += 4
@textchars.push(ch[5] ? "" : ch[0]) @textchars.push(ch[5] ? "" : ch[0])
end end
end end
@@ -715,7 +713,10 @@ class Window_InputNumberPokemon < SpriteWindow_Base
def textHelper(x, y, text, i) def textHelper(x, y, text, i)
textwidth = self.contents.text_size(text).width textwidth = self.contents.text_size(text).width
pbDrawShadowText(self.contents, x + (12 - (textwidth / 2)), y, textwidth + 4, 32, text, @baseColor, @shadowColor) pbDrawShadowText(self.contents,
x + (12 - (textwidth / 2)),
y - 2 + (self.contents.text_offset_y || 0), # TEXT OFFSET (the - 2)
textwidth + 4, 32, text, @baseColor, @shadowColor)
if @index == i && @active && @frame / 15 == 0 if @index == i && @active && @frame / 15 == 0
self.contents.fill_rect(x + (12 - (textwidth / 2)), y + 30, textwidth, 2, @baseColor) self.contents.fill_rect(x + (12 - (textwidth / 2)), y + 30, textwidth, 2, @baseColor)
end end
@@ -735,7 +736,7 @@ class SpriteWindow_Selectable < SpriteWindow_Base
super(x, y, width, height) super(x, y, width, height)
@item_max = 1 @item_max = 1
@column_max = 1 @column_max = 1
@virtualOy = 0 @virtualOy = 2 # TEXT OFFSET
@index = -1 @index = -1
@row_height = 32 @row_height = 32
@column_spacing = 32 @column_spacing = 32
@@ -803,7 +804,7 @@ class SpriteWindow_Selectable < SpriteWindow_Base
def top_row=(row) def top_row=(row)
row = row_max - 1 if row > row_max - 1 row = row_max - 1 if row > row_max - 1
row = 0 if row < 0 row = 0 if row < 0
@virtualOy = row * @row_height @virtualOy = (row * @row_height) + 2 # TEXT OFFSET (the + 2)
end end
def top_item def top_item
@@ -1106,7 +1107,7 @@ class Window_DrawableCommand < SpriteWindow_SelectableEx
def drawCursor(index, rect) def drawCursor(index, rect)
if self.index == index if self.index == index
pbCopyBitmap(self.contents, @selarrow.bitmap, rect.x, rect.y) pbCopyBitmap(self.contents, @selarrow.bitmap, rect.x, rect.y + 2) # TEXT OFFSET (counters the offset above)
end end
return Rect.new(rect.x + 16, rect.y, rect.width - 16, rect.height) return Rect.new(rect.x + 16, rect.y, rect.width - 16, rect.height)
end end
@@ -1223,8 +1224,8 @@ class Window_CommandPokemon < Window_DrawableCommand
def drawItem(index, _count, rect) def drawItem(index, _count, rect)
pbSetSystemFont(self.contents) if @starting pbSetSystemFont(self.contents) if @starting
rect = drawCursor(index, rect) rect = drawCursor(index, rect)
pbDrawShadowText(self.contents, rect.x, rect.y, rect.width, rect.height, pbDrawShadowText(self.contents, rect.x, rect.y + (self.contents.text_offset_y || 0),
@commands[index], self.baseColor, self.shadowColor) rect.width, rect.height, @commands[index], self.baseColor, self.shadowColor)
end end
end end

View File

@@ -663,7 +663,7 @@ def getFormattedText(bitmap, xDst, yDst, widthDst, heightDst, text, lineheight =
elsif isspace elsif isspace
hadspace = true hadspace = true
end end
texty = (lineheight * y) + yDst + yStart texty = (lineheight * y) + yDst + yStart - 2 # TEXT OFFSET
colors = getLastColors(colorstack, opacitystack, defaultcolors) colors = getLastColors(colorstack, opacitystack, defaultcolors)
# Push character # Push character
if heightDst < 0 || texty < yDst + heightDst if heightDst < 0 || texty < yDst + heightDst
@@ -1083,8 +1083,8 @@ def drawTextEx(bitmap, x, y, width, numlines, text, baseColor, shadowColor)
end end
def drawFormattedTextEx(bitmap, x, y, width, text, baseColor = nil, shadowColor = nil, lineheight = 32) def drawFormattedTextEx(bitmap, x, y, width, text, baseColor = nil, shadowColor = nil, lineheight = 32)
base = baseColor ? baseColor.clone : Color.new(12 * 8, 12 * 8, 12 * 8) base = baseColor ? baseColor.clone : Color.new(96, 96, 96)
shadow = shadowColor ? shadowColor.clone : Color.new(26 * 8, 26 * 8, 25 * 8) shadow = shadowColor ? shadowColor.clone : Color.new(208, 208, 200)
text = "<c2=" + colorToRgb16(base) + colorToRgb16(shadow) + ">" + text text = "<c2=" + colorToRgb16(base) + colorToRgb16(shadow) + ">" + text
chars = getFormattedText(bitmap, x, y, width, -1, text, lineheight) chars = getFormattedText(bitmap, x, y, width, -1, text, lineheight)
drawFormattedChars(bitmap, chars) drawFormattedChars(bitmap, chars)
@@ -1100,7 +1100,6 @@ def pbDrawShadowText(bitmap, x, y, width, height, string, baseColor, shadowColor
return if !bitmap || !string return if !bitmap || !string
width = (width < 0) ? bitmap.text_size(string).width + 1 : width width = (width < 0) ? bitmap.text_size(string).width + 1 : width
height = (height < 0) ? bitmap.text_size(string).height + 1 : height height = (height < 0) ? bitmap.text_size(string).height + 1 : height
y += 4
if shadowColor && shadowColor.alpha > 0 if shadowColor && shadowColor.alpha > 0
bitmap.font.color = shadowColor bitmap.font.color = shadowColor
bitmap.draw_text(x + 2, y, width, height, string, align) bitmap.draw_text(x + 2, y, width, height, string, align)
@@ -1148,7 +1147,7 @@ def pbDrawTextPositions(bitmap, textpos)
textpos.each do |i| textpos.each do |i|
textsize = bitmap.text_size(i[0]) textsize = bitmap.text_size(i[0])
x = i[1] x = i[1]
y = i[2] + 6 y = i[2]
case i[3] case i[3]
when true, 1 # right align when true, 1 # right align
x -= textsize.width x -= textsize.width

View File

@@ -55,7 +55,7 @@ end
def pbTextBitmap(text, maxwidth = Graphics.width) def pbTextBitmap(text, maxwidth = Graphics.width)
tmp = Bitmap.new(maxwidth, Graphics.height) tmp = Bitmap.new(maxwidth, Graphics.height)
pbSetSystemFont(tmp) pbSetSystemFont(tmp)
drawFormattedTextEx(tmp, 0, 0, maxwidth, text, Color.new(248, 248, 248), Color.new(168, 184, 184)) drawFormattedTextEx(tmp, 0, 4, maxwidth, text, Color.new(248, 248, 248), Color.new(168, 184, 184))
return tmp return tmp
end end

View File

@@ -352,7 +352,7 @@ class Battle::Scene::FightMenu < Battle::Scene::MenuBase
@buttons.each_with_index do |button, i| @buttons.each_with_index do |button, i|
next if !@visibility["button_#{i}"] next if !@visibility["button_#{i}"]
x = button.x - self.x + (button.src_rect.width / 2) x = button.x - self.x + (button.src_rect.width / 2)
y = button.y - self.y + 2 y = button.y - self.y + 14
moveNameBase = TEXT_BASE_COLOR moveNameBase = TEXT_BASE_COLOR
if GET_MOVE_TEXT_COLOR_FROM_MOVE_BUTTON && moves[i].display_type(@battler) if GET_MOVE_TEXT_COLOR_FROM_MOVE_BUTTON && moves[i].display_type(@battler)
# NOTE: This takes a color from a particular pixel in the button # NOTE: This takes a color from a particular pixel in the button
@@ -411,7 +411,7 @@ class Battle::Scene::FightMenu < Battle::Scene::MenuBase
ppFraction = [(4.0 * move.pp / move.total_pp).ceil, 3].min ppFraction = [(4.0 * move.pp / move.total_pp).ceil, 3].min
textPos = [] textPos = []
textPos.push([_INTL("PP: {1}/{2}", move.pp, move.total_pp), textPos.push([_INTL("PP: {1}/{2}", move.pp, move.total_pp),
448, 44, 2, PP_COLORS[ppFraction * 2], PP_COLORS[(ppFraction * 2) + 1]]) 448, 56, 2, PP_COLORS[ppFraction * 2], PP_COLORS[(ppFraction * 2) + 1]])
pbDrawTextPositions(@infoOverlay.bitmap, textPos) pbDrawTextPositions(@infoOverlay.bitmap, textPos)
end end
end end
@@ -544,7 +544,7 @@ class Battle::Scene::TargetMenu < Battle::Scene::MenuBase
@buttons.each_with_index do |button, i| @buttons.each_with_index do |button, i|
next if !button || nil_or_empty?(@texts[i]) next if !button || nil_or_empty?(@texts[i])
x = button.x - self.x + (button.src_rect.width / 2) x = button.x - self.x + (button.src_rect.width / 2)
y = button.y - self.y + 2 y = button.y - self.y + 14
textpos.push([@texts[i], x, y, 2, TEXT_BASE_COLOR, TEXT_SHADOW_COLOR]) textpos.push([@texts[i], x, y, 2, TEXT_BASE_COLOR, TEXT_SHADOW_COLOR])
end end
pbDrawTextPositions(@overlay.bitmap, textpos) pbDrawTextPositions(@overlay.bitmap, textpos)

View File

@@ -81,7 +81,7 @@ class Battle::Scene::PokemonDataBox < SpriteWrapper
@expBarBitmap = AnimatedBitmap.new(_INTL("Graphics/Pictures/Battle/overlay_exp")) @expBarBitmap = AnimatedBitmap.new(_INTL("Graphics/Pictures/Battle/overlay_exp"))
# Create sprite to draw HP numbers on # Create sprite to draw HP numbers on
@hpNumbers = BitmapSprite.new(124, 16, viewport) @hpNumbers = BitmapSprite.new(124, 16, viewport)
pbSetSmallFont(@hpNumbers.bitmap) # pbSetSmallFont(@hpNumbers.bitmap)
@sprites["hpNumbers"] = @hpNumbers @sprites["hpNumbers"] = @hpNumbers
# Create sprite wrapper that displays HP bar # Create sprite wrapper that displays HP bar
@hpBar = SpriteWrapper.new(viewport) @hpBar = SpriteWrapper.new(viewport)
@@ -216,13 +216,13 @@ class Battle::Scene::PokemonDataBox < SpriteWrapper
nameWidth = self.bitmap.text_size(@battler.name).width nameWidth = self.bitmap.text_size(@battler.name).width
nameOffset = 0 nameOffset = 0
nameOffset = nameWidth - 116 if nameWidth > 116 nameOffset = nameWidth - 116 if nameWidth > 116
textPos.push([@battler.name, @spriteBaseX + 8 - nameOffset, 0, false, NAME_BASE_COLOR, NAME_SHADOW_COLOR]) textPos.push([@battler.name, @spriteBaseX + 8 - nameOffset, 12, false, NAME_BASE_COLOR, NAME_SHADOW_COLOR])
# Draw Pokémon's gender symbol # Draw Pokémon's gender symbol
case @battler.displayGender case @battler.displayGender
when 0 # Male when 0 # Male
textPos.push([_INTL(""), @spriteBaseX + 126, 0, false, MALE_BASE_COLOR, MALE_SHADOW_COLOR]) textPos.push([_INTL(""), @spriteBaseX + 126, 12, false, MALE_BASE_COLOR, MALE_SHADOW_COLOR])
when 1 # Female when 1 # Female
textPos.push([_INTL(""), @spriteBaseX + 126, 0, false, FEMALE_BASE_COLOR, FEMALE_SHADOW_COLOR]) textPos.push([_INTL(""), @spriteBaseX + 126, 12, false, FEMALE_BASE_COLOR, FEMALE_SHADOW_COLOR])
end end
pbDrawTextPositions(self.bitmap, textPos) pbDrawTextPositions(self.bitmap, textPos)
# Draw Pokémon's level # Draw Pokémon's level
@@ -457,10 +457,10 @@ class Battle::Scene::AbilitySplashBar < SpriteWrapper
textPos = [] textPos = []
textX = (@side == 0) ? 10 : self.bitmap.width - 8 textX = (@side == 0) ? 10 : self.bitmap.width - 8
# Draw Pokémon's name # Draw Pokémon's name
textPos.push([_INTL("{1}'s", @battler.name), textX, -4, @side == 1, textPos.push([_INTL("{1}'s", @battler.name), textX, 8, @side == 1,
TEXT_BASE_COLOR, TEXT_SHADOW_COLOR, true]) TEXT_BASE_COLOR, TEXT_SHADOW_COLOR, true])
# Draw Pokémon's ability # Draw Pokémon's ability
textPos.push([@battler.abilityName, textX, 26, @side == 1, textPos.push([@battler.abilityName, textX, 38, @side == 1,
TEXT_BASE_COLOR, TEXT_SHADOW_COLOR, true]) TEXT_BASE_COLOR, TEXT_SHADOW_COLOR, true])
pbDrawTextPositions(self.bitmap, textPos) pbDrawTextPositions(self.bitmap, textPos)
end end

View File

@@ -83,8 +83,8 @@ class Battle::Scene::SafariDataBox < SpriteWrapper
base = Color.new(72, 72, 72) base = Color.new(72, 72, 72)
shadow = Color.new(184, 184, 184) shadow = Color.new(184, 184, 184)
textpos = [] textpos = []
textpos.push([_INTL("Safari Balls"), 30, 2, false, base, shadow]) textpos.push([_INTL("Safari Balls"), 30, 14, false, base, shadow])
textpos.push([_INTL("Left: {1}", @battle.ballCount), 30, 32, false, base, shadow]) textpos.push([_INTL("Left: {1}", @battle.ballCount), 30, 44, false, base, shadow])
pbDrawTextPositions(self.bitmap, textpos) pbDrawTextPositions(self.bitmap, textpos)
end end

View File

@@ -241,15 +241,15 @@ class Battle::Scene
window.contents.clear window.contents.clear
pbSetSystemFont(window.contents) pbSetSystemFont(window.contents)
textpos = [ textpos = [
[battler1.name, 64, -6, 2, Color.new(248, 0, 0), Color.new(208, 208, 200)], [battler1.name, 64, 6, 2, Color.new(248, 0, 0), Color.new(208, 208, 200)],
[_INTL("VS"), 144, -6, 2, Color.new(72, 72, 72), Color.new(208, 208, 200)], [_INTL("VS"), 144, 6, 2, Color.new(72, 72, 72), Color.new(208, 208, 200)],
[battler2.name, 224, -6, 2, Color.new(72, 72, 72), Color.new(208, 208, 200)], [battler2.name, 224, 6, 2, Color.new(72, 72, 72), Color.new(208, 208, 200)],
[_INTL("Mind"), 144, 42, 2, Color.new(72, 72, 72), Color.new(208, 208, 200)], [_INTL("Mind"), 144, 54, 2, Color.new(72, 72, 72), Color.new(208, 208, 200)],
[_INTL("Skill"), 144, 74, 2, Color.new(72, 72, 72), Color.new(208, 208, 200)], [_INTL("Skill"), 144, 86, 2, Color.new(72, 72, 72), Color.new(208, 208, 200)],
[_INTL("Body"), 144, 106, 2, Color.new(72, 72, 72), Color.new(208, 208, 200)], [_INTL("Body"), 144, 118, 2, Color.new(72, 72, 72), Color.new(208, 208, 200)],
[sprintf("%d", total1), 64, 154, 2, Color.new(72, 72, 72), Color.new(208, 208, 200)], [sprintf("%d", total1), 64, 166, 2, Color.new(72, 72, 72), Color.new(208, 208, 200)],
[_INTL("Judgment"), 144, 154, 2, Color.new(72, 72, 72), Color.new(208, 208, 200)], [_INTL("Judgment"), 144, 166, 2, Color.new(72, 72, 72), Color.new(208, 208, 200)],
[sprintf("%d", total2), 224, 154, 2, Color.new(72, 72, 72), Color.new(208, 208, 200)] [sprintf("%d", total2), 224, 166, 2, Color.new(72, 72, 72), Color.new(208, 208, 200)]
] ]
pbDrawTextPositions(window.contents, textpos) pbDrawTextPositions(window.contents, textpos)
images = [] images = []

View File

@@ -283,9 +283,9 @@ SpecialBattleIntroAnimations.register("vs_animation", 50, # Priority 50
trainer.tone = Tone.new(0, 0, 0) trainer.tone = Tone.new(0, 0, 0)
trainername = foe[0].name trainername = foe[0].name
textpos = [ textpos = [
[$player.name, Graphics.width / 4, (Graphics.height / 1.5) + 4, 2, [$player.name, Graphics.width / 4, (Graphics.height / 1.5) + 16, 2,
Color.new(248, 248, 248), Color.new(72, 72, 72)], Color.new(248, 248, 248), Color.new(72, 72, 72)],
[trainername, (Graphics.width / 4) + (Graphics.width / 2), (Graphics.height / 1.5) + 4, 2, [trainername, (Graphics.width / 4) + (Graphics.width / 2), (Graphics.height / 1.5) + 16, 2,
Color.new(248, 248, 248), Color.new(72, 72, 72)] Color.new(248, 248, 248), Color.new(72, 72, 72)]
] ]
pbDrawTextPositions(overlay.bitmap, textpos) pbDrawTextPositions(overlay.bitmap, textpos)

View File

@@ -70,13 +70,13 @@ def pbDisplayMail(mail, _bearer = nil)
shadowForLightBG = Color.new(168, 168, 176) shadowForLightBG = Color.new(168, 168, 176)
if mail.message && mail.message != "" if mail.message && mail.message != ""
isDark = isDarkBackground(sprites["card"].bitmap, Rect.new(48, 48, Graphics.width - 96, 32 * 7)) isDark = isDarkBackground(sprites["card"].bitmap, Rect.new(48, 48, Graphics.width - 96, 32 * 7))
drawTextEx(overlay, 48, 52, Graphics.width - (48 * 2), 7, mail.message, drawTextEx(overlay, 48, 52, Graphics.width - 94, 7, mail.message,
(isDark) ? baseForDarkBG : baseForLightBG, (isDark) ? baseForDarkBG : baseForLightBG,
(isDark) ? shadowForDarkBG : shadowForLightBG) (isDark) ? shadowForDarkBG : shadowForLightBG)
end end
if mail.sender && mail.sender != "" if mail.sender && mail.sender != ""
isDark = isDarkBackground(sprites["card"].bitmap, Rect.new(336, 322, 144, 32 * 1)) isDark = isDarkBackground(sprites["card"].bitmap, Rect.new(336, 322, 144, 32 * 1))
drawTextEx(overlay, 336, 326, 144, 1, mail.sender, drawTextEx(overlay, 336, 328, 144, 1, mail.sender,
(isDark) ? baseForDarkBG : baseForLightBG, (isDark) ? baseForDarkBG : baseForLightBG,
(isDark) ? shadowForDarkBG : shadowForLightBG) (isDark) ? shadowForDarkBG : shadowForLightBG)
end end

View File

@@ -311,16 +311,16 @@ class HallOfFame_Scene
dexnumber = _ISPRINTF("No. {1:03d}", number) dexnumber = _ISPRINTF("No. {1:03d}", number)
end end
textPositions = [ textPositions = [
[dexnumber, 32, Graphics.height - 86, 0, BASECOLOR, SHADOWCOLOR], [dexnumber, 32, Graphics.height - 74, 0, BASECOLOR, SHADOWCOLOR],
[pokename, Graphics.width - 192, Graphics.height - 86, 2, BASECOLOR, SHADOWCOLOR], [pokename, Graphics.width - 192, Graphics.height - 74, 2, BASECOLOR, SHADOWCOLOR],
[_INTL("Lv. {1}", pokemon.egg? ? "?" : pokemon.level), [_INTL("Lv. {1}", pokemon.egg? ? "?" : pokemon.level),
64, Graphics.height - 54, 0, BASECOLOR, SHADOWCOLOR], 64, Graphics.height - 42, 0, BASECOLOR, SHADOWCOLOR],
[_INTL("IDNo.{1}", pokemon.egg? ? "?????" : idno), [_INTL("IDNo.{1}", pokemon.egg? ? "?????" : idno),
Graphics.width - 192, Graphics.height - 54, 2, BASECOLOR, SHADOWCOLOR] Graphics.width - 192, Graphics.height - 42, 2, BASECOLOR, SHADOWCOLOR]
] ]
if hallNumber > -1 if hallNumber > -1
textPositions.push([_INTL("Hall of Fame No."), (Graphics.width / 2) - 104, -6, 0, BASECOLOR, SHADOWCOLOR]) textPositions.push([_INTL("Hall of Fame No."), (Graphics.width / 2) - 104, 6, 0, BASECOLOR, SHADOWCOLOR])
textPositions.push([hallNumber.to_s, (Graphics.width / 2) + 104, -6, 1, BASECOLOR, SHADOWCOLOR]) textPositions.push([hallNumber.to_s, (Graphics.width / 2) + 104, 6, 1, BASECOLOR, SHADOWCOLOR])
end end
pbDrawTextPositions(overlay, textPositions) pbDrawTextPositions(overlay, textPositions)
end end
@@ -329,7 +329,7 @@ class HallOfFame_Scene
overlay = @sprites["overlay"].bitmap overlay = @sprites["overlay"].bitmap
overlay.clear overlay.clear
pbDrawTextPositions(overlay, [[_INTL("Welcome to the Hall of Fame!"), pbDrawTextPositions(overlay, [[_INTL("Welcome to the Hall of Fame!"),
Graphics.width / 2, Graphics.height - 80, 2, BASECOLOR, SHADOWCOLOR]]) Graphics.width / 2, Graphics.height - 68, 2, BASECOLOR, SHADOWCOLOR]])
end end
def pbAnimationLoop def pbAnimationLoop

View File

@@ -25,8 +25,8 @@ class Window_DexesList < Window_CommandPokemon
allown = (@commands2[index][1] >= @commands2[index][2]) allown = (@commands2[index][1] >= @commands2[index][2])
pbDrawImagePositions( pbDrawImagePositions(
self.contents, self.contents,
[["Graphics/Pictures/Pokedex/icon_menuseenown", rect.x + 236, rect.y + 2, (allseen) ? 24 : 0, 0, 24, 24], [["Graphics/Pictures/Pokedex/icon_menuseenown", rect.x + 236, rect.y + 6, (allseen) ? 24 : 0, 0, 24, 24],
["Graphics/Pictures/Pokedex/icon_menuseenown", rect.x + 332, rect.y + 2, (allown) ? 24 : 0, 24, 24, 24]] ["Graphics/Pictures/Pokedex/icon_menuseenown", rect.x + 332, rect.y + 6, (allown) ? 24 : 0, 24, 24, 24]]
) )
end end
end end

View File

@@ -40,9 +40,9 @@ class Window_Pokedex < Window_DrawableCommand
indexNumber -= 1 if @commands[index][5] indexNumber -= 1 if @commands[index][5]
if $player.seen?(species) if $player.seen?(species)
if $player.owned?(species) if $player.owned?(species)
pbCopyBitmap(self.contents, @pokeballOwn.bitmap, rect.x - 6, rect.y + 8) pbCopyBitmap(self.contents, @pokeballOwn.bitmap, rect.x - 6, rect.y + 10)
else else
pbCopyBitmap(self.contents, @pokeballSeen.bitmap, rect.x - 6, rect.y + 8) pbCopyBitmap(self.contents, @pokeballSeen.bitmap, rect.x - 6, rect.y + 10)
end end
text = sprintf("%03d%s %s", indexNumber, " ", @commands[index][1]) text = sprintf("%03d%s %s", indexNumber, " ", @commands[index][1])
else else
@@ -424,17 +424,17 @@ class PokemonPokedex_Scene
end end
end end
textpos = [ textpos = [
[dexname, Graphics.width / 2, -2, 2, Color.new(248, 248, 248), Color.new(0, 0, 0)] [dexname, Graphics.width / 2, 10, 2, Color.new(248, 248, 248), Color.new(0, 0, 0)]
] ]
textpos.push([GameData::Species.get(iconspecies).name, 112, 46, 2, base, shadow]) if iconspecies textpos.push([GameData::Species.get(iconspecies).name, 112, 58, 2, base, shadow]) if iconspecies
if @searchResults if @searchResults
textpos.push([_INTL("Search results"), 112, 302, 2, base, shadow]) textpos.push([_INTL("Search results"), 112, 314, 2, base, shadow])
textpos.push([@dexlist.length.to_s, 112, 334, 2, base, shadow]) textpos.push([@dexlist.length.to_s, 112, 346, 2, base, shadow])
else else
textpos.push([_INTL("Seen:"), 42, 302, 0, base, shadow]) textpos.push([_INTL("Seen:"), 42, 314, 0, base, shadow])
textpos.push([$player.pokedex.seen_count(pbGetPokedexRegion).to_s, 182, 302, 1, base, shadow]) textpos.push([$player.pokedex.seen_count(pbGetPokedexRegion).to_s, 182, 314, 1, base, shadow])
textpos.push([_INTL("Owned:"), 42, 334, 0, base, shadow]) textpos.push([_INTL("Owned:"), 42, 346, 0, base, shadow])
textpos.push([$player.pokedex.owned_count(pbGetPokedexRegion).to_s, 182, 334, 1, base, shadow]) textpos.push([$player.pokedex.owned_count(pbGetPokedexRegion).to_s, 182, 346, 1, base, shadow])
end end
# Draw all text # Draw all text
pbDrawTextPositions(overlay, textpos) pbDrawTextPositions(overlay, textpos)
@@ -477,36 +477,36 @@ class PokemonPokedex_Scene
shadow = Color.new(72, 72, 72) shadow = Color.new(72, 72, 72)
# Write various bits of text # Write various bits of text
textpos = [ textpos = [
[_INTL("Search Mode"), Graphics.width / 2, -2, 2, base, shadow], [_INTL("Search Mode"), Graphics.width / 2, 10, 2, base, shadow],
[_INTL("Order"), 136, 52, 2, base, shadow], [_INTL("Order"), 136, 64, 2, base, shadow],
[_INTL("Name"), 58, 110, 2, base, shadow], [_INTL("Name"), 58, 122, 2, base, shadow],
[_INTL("Type"), 58, 162, 2, base, shadow], [_INTL("Type"), 58, 174, 2, base, shadow],
[_INTL("Height"), 58, 214, 2, base, shadow], [_INTL("Height"), 58, 226, 2, base, shadow],
[_INTL("Weight"), 58, 266, 2, base, shadow], [_INTL("Weight"), 58, 278, 2, base, shadow],
[_INTL("Color"), 326, 110, 2, base, shadow], [_INTL("Color"), 326, 122, 2, base, shadow],
[_INTL("Shape"), 454, 162, 2, base, shadow], [_INTL("Shape"), 454, 174, 2, base, shadow],
[_INTL("Reset"), 80, 338, 2, base, shadow, 1], [_INTL("Reset"), 80, 346, 2, base, shadow, 1],
[_INTL("Start"), Graphics.width / 2, 338, 2, base, shadow, 1], [_INTL("Start"), Graphics.width / 2, 346, 2, base, shadow, 1],
[_INTL("Cancel"), Graphics.width - 80, 338, 2, base, shadow, 1] [_INTL("Cancel"), Graphics.width - 80, 346, 2, base, shadow, 1]
] ]
# Write order, name and color parameters # Write order, name and color parameters
textpos.push([@orderCommands[params[0]], 344, 58, 2, base, shadow, 1]) textpos.push([@orderCommands[params[0]], 344, 66, 2, base, shadow, 1])
textpos.push([(params[1] < 0) ? "----" : @nameCommands[params[1]], 176, 116, 2, base, shadow, 1]) textpos.push([(params[1] < 0) ? "----" : @nameCommands[params[1]], 176, 124, 2, base, shadow, 1])
textpos.push([(params[8] < 0) ? "----" : @colorCommands[params[8]].name, 444, 116, 2, base, shadow, 1]) textpos.push([(params[8] < 0) ? "----" : @colorCommands[params[8]].name, 444, 124, 2, base, shadow, 1])
# Draw type icons # Draw type icons
if params[2] >= 0 if params[2] >= 0
type_number = @typeCommands[params[2]].icon_position type_number = @typeCommands[params[2]].icon_position
typerect = Rect.new(0, type_number * 32, 96, 32) typerect = Rect.new(0, type_number * 32, 96, 32)
overlay.blt(128, 168, @typebitmap.bitmap, typerect) overlay.blt(128, 168, @typebitmap.bitmap, typerect)
else else
textpos.push(["----", 176, 168, 2, base, shadow, 1]) textpos.push(["----", 176, 176, 2, base, shadow, 1])
end end
if params[3] >= 0 if params[3] >= 0
type_number = @typeCommands[params[3]].icon_position type_number = @typeCommands[params[3]].icon_position
typerect = Rect.new(0, type_number * 32, 96, 32) typerect = Rect.new(0, type_number * 32, 96, 32)
overlay.blt(256, 168, @typebitmap.bitmap, typerect) overlay.blt(256, 168, @typebitmap.bitmap, typerect)
else else
textpos.push(["----", 304, 168, 2, base, shadow, 1]) textpos.push(["----", 304, 176, 2, base, shadow, 1])
end end
# Write height and weight limits # Write height and weight limits
ht1 = (params[4] < 0) ? 0 : (params[4] >= @heightCommands.length) ? 999 : @heightCommands[params[4]] ht1 = (params[4] < 0) ? 0 : (params[4] >= @heightCommands.length) ? 999 : @heightCommands[params[4]]
@@ -519,16 +519,16 @@ class PokemonPokedex_Scene
ht2 = (params[5] < 0) ? 99 * 12 : (ht2 / 0.254).round ht2 = (params[5] < 0) ? 99 * 12 : (ht2 / 0.254).round
wt1 = (params[6] >= @weightCommands.length) ? 99_990 : (wt1 / 0.254).round wt1 = (params[6] >= @weightCommands.length) ? 99_990 : (wt1 / 0.254).round
wt2 = (params[7] < 0) ? 99_990 : (wt2 / 0.254).round wt2 = (params[7] < 0) ? 99_990 : (wt2 / 0.254).round
textpos.push([sprintf("%d'%02d''", ht1 / 12, ht1 % 12), 166, 220, 2, base, shadow, 1]) textpos.push([sprintf("%d'%02d''", ht1 / 12, ht1 % 12), 166, 228, 2, base, shadow, 1])
textpos.push([sprintf("%d'%02d''", ht2 / 12, ht2 % 12), 294, 220, 2, base, shadow, 1]) textpos.push([sprintf("%d'%02d''", ht2 / 12, ht2 % 12), 294, 228, 2, base, shadow, 1])
textpos.push([sprintf("%.1f", wt1 / 10.0), 166, 272, 2, base, shadow, 1]) textpos.push([sprintf("%.1f", wt1 / 10.0), 166, 280, 2, base, shadow, 1])
textpos.push([sprintf("%.1f", wt2 / 10.0), 294, 272, 2, base, shadow, 1]) textpos.push([sprintf("%.1f", wt2 / 10.0), 294, 280, 2, base, shadow, 1])
hwoffset = true hwoffset = true
else else
textpos.push([sprintf("%.1f", ht1 / 10.0), 166, 220, 2, base, shadow, 1]) textpos.push([sprintf("%.1f", ht1 / 10.0), 166, 228, 2, base, shadow, 1])
textpos.push([sprintf("%.1f", ht2 / 10.0), 294, 220, 2, base, shadow, 1]) textpos.push([sprintf("%.1f", ht2 / 10.0), 294, 228, 2, base, shadow, 1])
textpos.push([sprintf("%.1f", wt1 / 10.0), 166, 272, 2, base, shadow, 1]) textpos.push([sprintf("%.1f", wt1 / 10.0), 166, 280, 2, base, shadow, 1])
textpos.push([sprintf("%.1f", wt2 / 10.0), 294, 272, 2, base, shadow, 1]) textpos.push([sprintf("%.1f", wt2 / 10.0), 294, 280, 2, base, shadow, 1])
end end
overlay.blt(344, 214, @hwbitmap.bitmap, Rect.new(0, (hwoffset) ? 44 : 0, 32, 44)) overlay.blt(344, 214, @hwbitmap.bitmap, Rect.new(0, (hwoffset) ? 44 : 0, 32, 44))
overlay.blt(344, 266, @hwbitmap.bitmap, Rect.new(32, (hwoffset) ? 44 : 0, 32, 44)) overlay.blt(344, 266, @hwbitmap.bitmap, Rect.new(32, (hwoffset) ? 44 : 0, 32, 44))
@@ -549,13 +549,13 @@ class PokemonPokedex_Scene
shadow = Color.new(72, 72, 72) shadow = Color.new(72, 72, 72)
# Write various bits of text # Write various bits of text
textpos = [ textpos = [
[_INTL("Search Mode"), Graphics.width / 2, -2, 2, base, shadow], [_INTL("Search Mode"), Graphics.width / 2, 10, 2, base, shadow],
[_INTL("OK"), 80, 338, 2, base, shadow, 1], [_INTL("OK"), 80, 346, 2, base, shadow, 1],
[_INTL("Cancel"), Graphics.width - 80, 338, 2, base, shadow, 1] [_INTL("Cancel"), Graphics.width - 80, 346, 2, base, shadow, 1]
] ]
title = [_INTL("Order"), _INTL("Name"), _INTL("Type"), _INTL("Height"), title = [_INTL("Order"), _INTL("Name"), _INTL("Type"), _INTL("Height"),
_INTL("Weight"), _INTL("Color"), _INTL("Shape")][mode] _INTL("Weight"), _INTL("Color"), _INTL("Shape")][mode]
textpos.push([title, 102, (mode == 6) ? 58 : 52, 0, base, shadow]) textpos.push([title, 102, (mode == 6) ? 70 : 64, 0, base, shadow])
case mode case mode
when 0 # Order when 0 # Order
xstart = 46 xstart = 46
@@ -615,7 +615,7 @@ class PokemonPokedex_Scene
when 2 # Type icons when 2 # Type icons
2.times do |i| 2.times do |i|
if !sel[i] || sel[i] < 0 if !sel[i] || sel[i] < 0
textpos.push(["----", 298 + (128 * i), 58, 2, base, shadow, 1]) textpos.push(["----", 298 + (128 * i), 66, 2, base, shadow, 1])
else else
type_number = @typeCommands[sel[i]].icon_position type_number = @typeCommands[sel[i]].icon_position
typerect = Rect.new(0, type_number * 32, 96, 32) typerect = Rect.new(0, type_number * 32, 96, 32)
@@ -636,8 +636,8 @@ class PokemonPokedex_Scene
txt1 = sprintf("%.1f", ht1 / 10.0) txt1 = sprintf("%.1f", ht1 / 10.0)
txt2 = sprintf("%.1f", ht2 / 10.0) txt2 = sprintf("%.1f", ht2 / 10.0)
end end
textpos.push([txt1, 286, 58, 2, base, shadow, 1]) textpos.push([txt1, 286, 66, 2, base, shadow, 1])
textpos.push([txt2, 414, 58, 2, base, shadow, 1]) textpos.push([txt2, 414, 66, 2, base, shadow, 1])
overlay.blt(462, 52, @hwbitmap.bitmap, Rect.new(0, (hwoffset) ? 44 : 0, 32, 44)) overlay.blt(462, 52, @hwbitmap.bitmap, Rect.new(0, (hwoffset) ? 44 : 0, 32, 44))
when 4 # Weight range when 4 # Weight range
wt1 = (sel[0] < 0) ? 0 : (sel[0] >= @weightCommands.length) ? 9999 : @weightCommands[sel[0]] wt1 = (sel[0] < 0) ? 0 : (sel[0] >= @weightCommands.length) ? 9999 : @weightCommands[sel[0]]
@@ -653,14 +653,14 @@ class PokemonPokedex_Scene
txt1 = sprintf("%.1f", wt1 / 10.0) txt1 = sprintf("%.1f", wt1 / 10.0)
txt2 = sprintf("%.1f", wt2 / 10.0) txt2 = sprintf("%.1f", wt2 / 10.0)
end end
textpos.push([txt1, 286, 58, 2, base, shadow, 1]) textpos.push([txt1, 286, 66, 2, base, shadow, 1])
textpos.push([txt2, 414, 58, 2, base, shadow, 1]) textpos.push([txt2, 414, 66, 2, base, shadow, 1])
overlay.blt(462, 52, @hwbitmap.bitmap, Rect.new(32, (hwoffset) ? 44 : 0, 32, 44)) overlay.blt(462, 52, @hwbitmap.bitmap, Rect.new(32, (hwoffset) ? 44 : 0, 32, 44))
when 5 # Color when 5 # Color
if sel[0] < 0 if sel[0] < 0
textpos.push(["----", 362, 58, 2, base, shadow, 1]) textpos.push(["----", 362, 66, 2, base, shadow, 1])
else else
textpos.push([cmds[sel[0]].name, 362, 58, 2, base, shadow, 1]) textpos.push([cmds[sel[0]].name, 362, 66, 2, base, shadow, 1])
end end
when 6 # Shape icon when 6 # Shape icon
if sel[0] >= 0 if sel[0] >= 0
@@ -670,9 +670,9 @@ class PokemonPokedex_Scene
else else
if sel[0] < 0 if sel[0] < 0
text = ["----", "-", "----", "", "", "----", ""][mode] text = ["----", "-", "----", "", "", "----", ""][mode]
textpos.push([text, 362, 58, 2, base, shadow, 1]) textpos.push([text, 362, 66, 2, base, shadow, 1])
else else
textpos.push([cmds[sel[0]], 362, 58, 2, base, shadow, 1]) textpos.push([cmds[sel[0]], 362, 66, 2, base, shadow, 1])
end end
end end
# Draw selected option(s) button graphic # Draw selected option(s) button graphic
@@ -682,8 +682,8 @@ class PokemonPokedex_Scene
xpos2 = xstart + ((sel[1] + 1) * xgap) xpos2 = xstart + ((sel[1] + 1) * xgap)
xpos2 = xstart + (cols * xgap) if sel[1] < 0 xpos2 = xstart + (cols * xgap) if sel[1] < 0
xpos2 = xstart if sel[1] >= cols - 1 xpos2 = xstart if sel[1] >= cols - 1
ypos1 = ystart + 172 ypos1 = ystart + 180
ypos2 = ystart + 28 ypos2 = ystart + 36
overlay.blt(16, 120, @searchsliderbitmap.bitmap, Rect.new(0, 192, 32, 44)) if sel[1] < cols - 1 overlay.blt(16, 120, @searchsliderbitmap.bitmap, Rect.new(0, 192, 32, 44)) if sel[1] < cols - 1
overlay.blt(464, 120, @searchsliderbitmap.bitmap, Rect.new(32, 192, 32, 44)) if sel[1] >= 0 overlay.blt(464, 120, @searchsliderbitmap.bitmap, Rect.new(32, 192, 32, 44)) if sel[1] >= 0
overlay.blt(16, 264, @searchsliderbitmap.bitmap, Rect.new(0, 192, 32, 44)) if sel[0] >= 0 overlay.blt(16, 264, @searchsliderbitmap.bitmap, Rect.new(0, 192, 32, 44)) if sel[0] >= 0
@@ -698,9 +698,13 @@ class PokemonPokedex_Scene
sel.length.times do |i| sel.length.times do |i|
selrect = Rect.new(0, selbuttony, @selbitmap.bitmap.width, selbuttonheight) selrect = Rect.new(0, selbuttony, @selbitmap.bitmap.width, selbuttonheight)
if sel[i] >= 0 if sel[i] >= 0
overlay.blt(xstart + ((sel[i] % cols) * xgap), ystart + ((sel[i] / cols).floor * ygap), @selbitmap.bitmap, selrect) overlay.blt(xstart + ((sel[i] % cols) * xgap),
ystart + ((sel[i] / cols).floor * ygap),
@selbitmap.bitmap, selrect)
else else
overlay.blt(xstart + ((cols - 1) * xgap), ystart + ((cmds.length / cols).floor * ygap), @selbitmap.bitmap, selrect) overlay.blt(xstart + ((cols - 1) * xgap),
ystart + ((cmds.length / cols).floor * ygap),
@selbitmap.bitmap, selrect)
end end
end end
end end
@@ -709,34 +713,44 @@ class PokemonPokedex_Scene
when 0, 1 # Order, name when 0, 1 # Order, name
cmds.length.times do |i| cmds.length.times do |i|
x = xstart + halfwidth + ((i % cols) * xgap) x = xstart + halfwidth + ((i % cols) * xgap)
y = ystart + 6 + ((i / cols).floor * ygap) y = ystart + 14 + ((i / cols).floor * ygap)
textpos.push([cmds[i], x, y, 2, base, shadow, 1]) textpos.push([cmds[i], x, y, 2, base, shadow, 1])
end end
if mode != 0 if mode != 0
textpos.push([(mode == 1) ? "-" : "----", textpos.push([(mode == 1) ? "-" : "----",
xstart + halfwidth + ((cols - 1) * xgap), ystart + 6 + ((cmds.length / cols).floor * ygap), 2, base, shadow, 1]) xstart + halfwidth + ((cols - 1) * xgap),
ystart + 14 + ((cmds.length / cols).floor * ygap),
2, base, shadow, 1])
end end
when 2 # Type when 2 # Type
typerect = Rect.new(0, 0, 96, 32) typerect = Rect.new(0, 0, 96, 32)
cmds.length.times do |i| cmds.length.times do |i|
typerect.y = @typeCommands[i].icon_position * 32 typerect.y = @typeCommands[i].icon_position * 32
overlay.blt(xstart + 14 + ((i % cols) * xgap), ystart + 6 + ((i / cols).floor * ygap), @typebitmap.bitmap, typerect) overlay.blt(xstart + 14 + ((i % cols) * xgap),
ystart + 6 + ((i / cols).floor * ygap),
@typebitmap.bitmap, typerect)
end end
textpos.push(["----", textpos.push(["----",
xstart + halfwidth + ((cols - 1) * xgap), ystart + 6 + ((cmds.length / cols).floor * ygap), 2, base, shadow, 1]) xstart + halfwidth + ((cols - 1) * xgap),
ystart + 14 + ((cmds.length / cols).floor * ygap),
2, base, shadow, 1])
when 5 # Color when 5 # Color
cmds.length.times do |i| cmds.length.times do |i|
x = xstart + halfwidth + ((i % cols) * xgap) x = xstart + halfwidth + ((i % cols) * xgap)
y = ystart + 6 + ((i / cols).floor * ygap) y = ystart + 14 + ((i / cols).floor * ygap)
textpos.push([cmds[i].name, x, y, 2, base, shadow, 1]) textpos.push([cmds[i].name, x, y, 2, base, shadow, 1])
end end
textpos.push(["----", textpos.push(["----",
xstart + halfwidth + ((cols - 1) * xgap), ystart + 6 + ((cmds.length / cols).floor * ygap), 2, base, shadow, 1]) xstart + halfwidth + ((cols - 1) * xgap),
ystart + 14 + ((cmds.length / cols).floor * ygap),
2, base, shadow, 1])
when 6 # Shape when 6 # Shape
shaperect = Rect.new(0, 0, 60, 60) shaperect = Rect.new(0, 0, 60, 60)
cmds.length.times do |i| cmds.length.times do |i|
shaperect.y = @shapeCommands[i].icon_position * 60 shaperect.y = @shapeCommands[i].icon_position * 60
overlay.blt(xstart + 4 + ((i % cols) * xgap), ystart + 4 + ((i / cols).floor * ygap), @shapebitmap.bitmap, shaperect) overlay.blt(xstart + 4 + ((i % cols) * xgap),
ystart + 4 + ((i / cols).floor * ygap),
@shapebitmap.bitmap, shaperect)
end end
end end
# Draw all text # Draw all text

View File

@@ -215,18 +215,18 @@ class PokemonPokedexInfo_Scene
end end
textpos = [ textpos = [
[_INTL("{1}{2} {3}", indexText, " ", species_data.name), [_INTL("{1}{2} {3}", indexText, " ", species_data.name),
246, 36, 0, Color.new(248, 248, 248), Color.new(0, 0, 0)] 246, 48, 0, Color.new(248, 248, 248), Color.new(0, 0, 0)]
] ]
if @show_battled_count if @show_battled_count
textpos.push([_INTL("Number Battled"), 314, 152, 0, base, shadow]) textpos.push([_INTL("Number Battled"), 314, 164, 0, base, shadow])
textpos.push([$player.pokedex.battled_count(@species).to_s, 452, 184, 1, base, shadow]) textpos.push([$player.pokedex.battled_count(@species).to_s, 452, 196, 1, base, shadow])
else else
textpos.push([_INTL("Height"), 314, 152, 0, base, shadow]) textpos.push([_INTL("Height"), 314, 164, 0, base, shadow])
textpos.push([_INTL("Weight"), 314, 184, 0, base, shadow]) textpos.push([_INTL("Weight"), 314, 196, 0, base, shadow])
end end
if $player.owned?(@species) if $player.owned?(@species)
# Write the category # Write the category
textpos.push([_INTL("{1} Pokémon", species_data.category), 246, 68, 0, base, shadow]) textpos.push([_INTL("{1} Pokémon", species_data.category), 246, 80, 0, base, shadow])
# Write the height and weight # Write the height and weight
if !@show_battled_count if !@show_battled_count
height = species_data.height height = species_data.height
@@ -234,15 +234,15 @@ class PokemonPokedexInfo_Scene
if System.user_language[3..4] == "US" # If the user is in the United States if System.user_language[3..4] == "US" # If the user is in the United States
inches = (height / 0.254).round inches = (height / 0.254).round
pounds = (weight / 0.45359).round pounds = (weight / 0.45359).round
textpos.push([_ISPRINTF("{1:d}'{2:02d}\"", inches / 12, inches % 12), 460, 152, 1, base, shadow]) textpos.push([_ISPRINTF("{1:d}'{2:02d}\"", inches / 12, inches % 12), 460, 164, 1, base, shadow])
textpos.push([_ISPRINTF("{1:4.1f} lbs.", pounds / 10.0), 494, 184, 1, base, shadow]) textpos.push([_ISPRINTF("{1:4.1f} lbs.", pounds / 10.0), 494, 196, 1, base, shadow])
else else
textpos.push([_ISPRINTF("{1:.1f} m", height / 10.0), 470, 152, 1, base, shadow]) textpos.push([_ISPRINTF("{1:.1f} m", height / 10.0), 470, 164, 1, base, shadow])
textpos.push([_ISPRINTF("{1:.1f} kg", weight / 10.0), 482, 184, 1, base, shadow]) textpos.push([_ISPRINTF("{1:.1f} kg", weight / 10.0), 482, 196, 1, base, shadow])
end end
end end
# Draw the Pokédex entry text # Draw the Pokédex entry text
drawTextEx(overlay, 40, 244, Graphics.width - (40 * 2), 4, # overlay, x, y, width, num lines drawTextEx(overlay, 40, 246, Graphics.width - (40 * 2), 4, # overlay, x, y, width, num lines
species_data.pokedex_entry, base, shadow) species_data.pokedex_entry, base, shadow)
# Draw the footprint # Draw the footprint
footprintfile = GameData::Species.footprint_filename(@species, @form) footprintfile = GameData::Species.footprint_filename(@species, @form)
@@ -261,15 +261,15 @@ class PokemonPokedexInfo_Scene
end end
else else
# Write the category # Write the category
textpos.push([_INTL("????? Pokémon"), 246, 68, 0, base, shadow]) textpos.push([_INTL("????? Pokémon"), 246, 80, 0, base, shadow])
# Write the height and weight # Write the height and weight
if !@show_battled_count if !@show_battled_count
if System.user_language[3..4] == "US" # If the user is in the United States if System.user_language[3..4] == "US" # If the user is in the United States
textpos.push([_INTL("???'??\""), 460, 152, 1, base, shadow]) textpos.push([_INTL("???'??\""), 460, 164, 1, base, shadow])
textpos.push([_INTL("????.? lbs."), 494, 184, 1, base, shadow]) textpos.push([_INTL("????.? lbs."), 494, 196, 1, base, shadow])
else else
textpos.push([_INTL("????.? m"), 470, 152, 1, base, shadow]) textpos.push([_INTL("????.? m"), 470, 164, 1, base, shadow])
textpos.push([_INTL("????.? kg"), 482, 184, 1, base, shadow]) textpos.push([_INTL("????.? kg"), 482, 196, 1, base, shadow])
end end
end end
end end
@@ -372,11 +372,11 @@ class PokemonPokedexInfo_Scene
overlay, overlay,
[[sprintf("Graphics/Pictures/Pokedex/overlay_areanone"), 108, 188]] [[sprintf("Graphics/Pictures/Pokedex/overlay_areanone"), 108, 188]]
) )
textpos.push([_INTL("Area unknown"), Graphics.width / 2, (Graphics.height / 2) - 6, 2, base, shadow]) textpos.push([_INTL("Area unknown"), Graphics.width / 2, (Graphics.height / 2) + 6, 2, base, shadow])
end end
textpos.push([pbGetMessage(MessageTypes::RegionNames, @region), 414, 38, 2, base, shadow]) textpos.push([pbGetMessage(MessageTypes::RegionNames, @region), 414, 50, 2, base, shadow])
textpos.push([_INTL("{1}'s area", GameData::Species.get(@species).name), textpos.push([_INTL("{1}'s area", GameData::Species.get(@species).name),
Graphics.width / 2, 346, 2, base, shadow]) Graphics.width / 2, 358, 2, base, shadow])
pbDrawTextPositions(overlay, textpos) pbDrawTextPositions(overlay, textpos)
end end
@@ -394,8 +394,8 @@ class PokemonPokedexInfo_Scene
end end
end end
textpos = [ textpos = [
[GameData::Species.get(@species).name, Graphics.width / 2, Graphics.height - 94, 2, base, shadow], [GameData::Species.get(@species).name, Graphics.width / 2, Graphics.height - 82, 2, base, shadow],
[formname, Graphics.width / 2, Graphics.height - 62, 2, base, shadow] [formname, Graphics.width / 2, Graphics.height - 50, 2, base, shadow]
] ]
# Draw all text # Draw all text
pbDrawTextPositions(overlay, textpos) pbDrawTextPositions(overlay, textpos)

View File

@@ -19,8 +19,7 @@ class PokemonPartyConfirmCancelSprite < SpriteWrapper
@overlaysprite = BitmapSprite.new(@bgsprite.bitmap.width, @bgsprite.bitmap.height, viewport) @overlaysprite = BitmapSprite.new(@bgsprite.bitmap.width, @bgsprite.bitmap.height, viewport)
@overlaysprite.z = self.z + 1 @overlaysprite.z = self.z + 1
pbSetSystemFont(@overlaysprite.bitmap) pbSetSystemFont(@overlaysprite.bitmap)
@yoffset = 8 textpos = [[text, 56, (narrowbox) ? 8 : 14, 2, Color.new(248, 248, 248), Color.new(40, 40, 40)]]
textpos = [[text, 56, (narrowbox) ? -4 : 2, 2, Color.new(248, 248, 248), Color.new(40, 40, 40)]]
pbDrawTextPositions(@overlaysprite.bitmap, textpos) pbDrawTextPositions(@overlaysprite.bitmap, textpos)
self.x = x self.x = x
self.y = y self.y = y
@@ -126,8 +125,8 @@ class Window_CommandPokemonColor < Window_CommandPokemon
base = Color.new(0, 80, 160) base = Color.new(0, 80, 160)
shadow = Color.new(128, 192, 240) shadow = Color.new(128, 192, 240)
end end
pbDrawShadowText(self.contents, rect.x, rect.y, rect.width, rect.height, pbDrawShadowText(self.contents, rect.x, rect.y + (self.contents.text_offset_y || 0),
@commands[index], base, shadow) rect.width, rect.height, @commands[index], base, shadow)
end end
end end
@@ -365,11 +364,11 @@ class PokemonPartyPanel < SpriteWrapper
pbSetSystemFont(@overlaysprite.bitmap) pbSetSystemFont(@overlaysprite.bitmap)
textpos = [] textpos = []
# Draw Pokémon name # Draw Pokémon name
textpos.push([@pokemon.name, 96, 10, 0, basecolor, shadowcolor]) textpos.push([@pokemon.name, 96, 22, 0, basecolor, shadowcolor])
if !@pokemon.egg? if !@pokemon.egg?
if !@text || @text.length == 0 if !@text || @text.length == 0
# Draw HP numbers # Draw HP numbers
textpos.push([sprintf("% 3d /% 3d", @pokemon.hp, @pokemon.totalhp), 224, 54, 1, basecolor, shadowcolor]) textpos.push([sprintf("% 3d /% 3d", @pokemon.hp, @pokemon.totalhp), 224, 66, 1, basecolor, shadowcolor])
# Draw HP bar # Draw HP bar
if @pokemon.hp > 0 if @pokemon.hp > 0
w = @pokemon.hp * 96 / @pokemon.totalhp.to_f w = @pokemon.hp * 96 / @pokemon.totalhp.to_f
@@ -397,9 +396,9 @@ class PokemonPartyPanel < SpriteWrapper
end end
# Draw gender symbol # Draw gender symbol
if @pokemon.male? if @pokemon.male?
textpos.push([_INTL(""), 224, 10, 0, Color.new(0, 112, 248), Color.new(120, 184, 232)]) textpos.push([_INTL(""), 224, 22, 0, Color.new(0, 112, 248), Color.new(120, 184, 232)])
elsif @pokemon.female? elsif @pokemon.female?
textpos.push([_INTL(""), 224, 10, 0, Color.new(232, 32, 16), Color.new(248, 168, 184)]) textpos.push([_INTL(""), 224, 22, 0, Color.new(232, 32, 16), Color.new(248, 168, 184)])
end end
# Draw shiny icon # Draw shiny icon
if @pokemon.shiny? if @pokemon.shiny?
@@ -414,13 +413,13 @@ class PokemonPartyPanel < SpriteWrapper
[["Graphics/Pictures/Party/overlay_lv", 20, 70, 0, 0, 22, 14]]) [["Graphics/Pictures/Party/overlay_lv", 20, 70, 0, 0, 22, 14]])
pbSetSmallFont(@overlaysprite.bitmap) pbSetSmallFont(@overlaysprite.bitmap)
pbDrawTextPositions(@overlaysprite.bitmap, pbDrawTextPositions(@overlaysprite.bitmap,
[[@pokemon.level.to_s, 42, 57, 0, basecolor, shadowcolor]]) [[@pokemon.level.to_s, 42, 68, 0, basecolor, shadowcolor]])
end end
# Draw annotation text # Draw annotation text
if @text && @text.length > 0 if @text && @text.length > 0
pbSetSystemFont(@overlaysprite.bitmap) pbSetSystemFont(@overlaysprite.bitmap)
pbDrawTextPositions(@overlaysprite.bitmap, pbDrawTextPositions(@overlaysprite.bitmap,
[[@text, 96, 52, 0, basecolor, shadowcolor]]) [[@text, 96, 62, 0, basecolor, shadowcolor]])
end end
end end
@refreshing = false @refreshing = false

View File

@@ -340,22 +340,22 @@ class PokemonSummary_Scene
_INTL("MOVES"), _INTL("MOVES"),
_INTL("RIBBONS")][page - 1] _INTL("RIBBONS")][page - 1]
textpos = [ textpos = [
[pagename, 26, 10, 0, base, shadow], [pagename, 26, 22, 0, base, shadow],
[@pokemon.name, 46, 56, 0, base, shadow], [@pokemon.name, 46, 68, 0, base, shadow],
[@pokemon.level.to_s, 46, 86, 0, Color.new(64, 64, 64), Color.new(176, 176, 176)], [@pokemon.level.to_s, 46, 98, 0, Color.new(64, 64, 64), Color.new(176, 176, 176)],
[_INTL("Item"), 66, 312, 0, base, shadow] [_INTL("Item"), 66, 324, 0, base, shadow]
] ]
# Write the held item's name # Write the held item's name
if @pokemon.hasItem? if @pokemon.hasItem?
textpos.push([@pokemon.item.name, 16, 346, 0, Color.new(64, 64, 64), Color.new(176, 176, 176)]) textpos.push([@pokemon.item.name, 16, 358, 0, Color.new(64, 64, 64), Color.new(176, 176, 176)])
else else
textpos.push([_INTL("None"), 16, 346, 0, Color.new(192, 200, 208), Color.new(208, 216, 224)]) textpos.push([_INTL("None"), 16, 358, 0, Color.new(192, 200, 208), Color.new(208, 216, 224)])
end end
# Write the gender symbol # Write the gender symbol
if @pokemon.male? if @pokemon.male?
textpos.push([_INTL(""), 178, 56, 0, Color.new(24, 112, 216), Color.new(136, 168, 208)]) textpos.push([_INTL(""), 178, 68, 0, Color.new(24, 112, 216), Color.new(136, 168, 208)])
elsif @pokemon.female? elsif @pokemon.female?
textpos.push([_INTL(""), 178, 56, 0, Color.new(248, 56, 32), Color.new(224, 152, 144)]) textpos.push([_INTL(""), 178, 68, 0, Color.new(248, 56, 32), Color.new(224, 152, 144)])
end end
# Draw all text # Draw all text
pbDrawTextPositions(overlay, textpos) pbDrawTextPositions(overlay, textpos)
@@ -388,12 +388,12 @@ class PokemonSummary_Scene
end end
# Write various bits of text # Write various bits of text
textpos = [ textpos = [
[_INTL("Dex No."), 238, 74, 0, base, shadow], [_INTL("Dex No."), 238, 86, 0, base, shadow],
[_INTL("Species"), 238, 106, 0, base, shadow], [_INTL("Species"), 238, 118, 0, base, shadow],
[@pokemon.speciesName, 435, 106, 2, Color.new(64, 64, 64), Color.new(176, 176, 176)], [@pokemon.speciesName, 435, 118, 2, Color.new(64, 64, 64), Color.new(176, 176, 176)],
[_INTL("Type"), 238, 138, 0, base, shadow], [_INTL("Type"), 238, 150, 0, base, shadow],
[_INTL("OT"), 238, 170, 0, base, shadow], [_INTL("OT"), 238, 182, 0, base, shadow],
[_INTL("ID No."), 238, 202, 0, base, shadow] [_INTL("ID No."), 238, 214, 0, base, shadow]
] ]
# Write the Regional/National Dex number # Write the Regional/National Dex number
dexnum = 0 dexnum = 0
@@ -412,15 +412,15 @@ class PokemonSummary_Scene
end end
end end
if dexnum <= 0 if dexnum <= 0
textpos.push(["???", 435, 74, 2, dexNumBase, dexNumShadow]) textpos.push(["???", 435, 86, 2, dexNumBase, dexNumShadow])
else else
dexnum -= 1 if dexnumshift dexnum -= 1 if dexnumshift
textpos.push([sprintf("%03d", dexnum), 435, 74, 2, dexNumBase, dexNumShadow]) textpos.push([sprintf("%03d", dexnum), 435, 86, 2, dexNumBase, dexNumShadow])
end end
# Write Original Trainer's name and ID number # Write Original Trainer's name and ID number
if @pokemon.owner.name.empty? if @pokemon.owner.name.empty?
textpos.push([_INTL("RENTAL"), 435, 170, 2, Color.new(64, 64, 64), Color.new(176, 176, 176)]) textpos.push([_INTL("RENTAL"), 435, 182, 2, Color.new(64, 64, 64), Color.new(176, 176, 176)])
textpos.push(["?????", 435, 202, 2, Color.new(64, 64, 64), Color.new(176, 176, 176)]) textpos.push(["?????", 435, 214, 2, Color.new(64, 64, 64), Color.new(176, 176, 176)])
else else
ownerbase = Color.new(64, 64, 64) ownerbase = Color.new(64, 64, 64)
ownershadow = Color.new(176, 176, 176) ownershadow = Color.new(176, 176, 176)
@@ -432,12 +432,13 @@ class PokemonSummary_Scene
ownerbase = Color.new(248, 56, 32) ownerbase = Color.new(248, 56, 32)
ownershadow = Color.new(224, 152, 144) ownershadow = Color.new(224, 152, 144)
end end
textpos.push([@pokemon.owner.name, 435, 170, 2, ownerbase, ownershadow]) textpos.push([@pokemon.owner.name, 435, 182, 2, ownerbase, ownershadow])
textpos.push([sprintf("%05d", @pokemon.owner.public_id), 435, 202, 2, Color.new(64, 64, 64), Color.new(176, 176, 176)]) textpos.push([sprintf("%05d", @pokemon.owner.public_id), 435, 214, 2,
Color.new(64, 64, 64), Color.new(176, 176, 176)])
end end
# Write Exp text OR heart gauge message (if a Shadow Pokémon) # Write Exp text OR heart gauge message (if a Shadow Pokémon)
if @pokemon.shadowPokemon? if @pokemon.shadowPokemon?
textpos.push([_INTL("Heart Gauge"), 238, 234, 0, base, shadow]) textpos.push([_INTL("Heart Gauge"), 238, 246, 0, base, shadow])
heartmessage = [_INTL("The door to its heart is open! Undo the final lock!"), heartmessage = [_INTL("The door to its heart is open! Undo the final lock!"),
_INTL("The door to its heart is almost fully open."), _INTL("The door to its heart is almost fully open."),
_INTL("The door to its heart is nearly open."), _INTL("The door to its heart is nearly open."),
@@ -445,13 +446,13 @@ class PokemonSummary_Scene
_INTL("The door to its heart is opening up."), _INTL("The door to its heart is opening up."),
_INTL("The door to its heart is tightly shut.")][@pokemon.heartStage] _INTL("The door to its heart is tightly shut.")][@pokemon.heartStage]
memo = sprintf("<c3=404040,B0B0B0>%s\n", heartmessage) memo = sprintf("<c3=404040,B0B0B0>%s\n", heartmessage)
drawFormattedTextEx(overlay, 234, 304, 264, memo) drawFormattedTextEx(overlay, 234, 308, 264, memo)
else else
endexp = @pokemon.growth_rate.minimum_exp_for_level(@pokemon.level + 1) endexp = @pokemon.growth_rate.minimum_exp_for_level(@pokemon.level + 1)
textpos.push([_INTL("Exp. Points"), 238, 234, 0, base, shadow]) textpos.push([_INTL("Exp. Points"), 238, 246, 0, base, shadow])
textpos.push([@pokemon.exp.to_s_formatted, 488, 266, 1, Color.new(64, 64, 64), Color.new(176, 176, 176)]) textpos.push([@pokemon.exp.to_s_formatted, 488, 278, 1, Color.new(64, 64, 64), Color.new(176, 176, 176)])
textpos.push([_INTL("To Next Lv."), 238, 298, 0, base, shadow]) textpos.push([_INTL("To Next Lv."), 238, 310, 0, base, shadow])
textpos.push([(endexp - @pokemon.exp).to_s_formatted, 488, 330, 1, Color.new(64, 64, 64), Color.new(176, 176, 176)]) textpos.push([(endexp - @pokemon.exp).to_s_formatted, 488, 342, 1, Color.new(64, 64, 64), Color.new(176, 176, 176)])
end end
# Draw all text # Draw all text
pbDrawTextPositions(overlay, textpos) pbDrawTextPositions(overlay, textpos)
@@ -487,15 +488,15 @@ class PokemonSummary_Scene
pbDrawImagePositions(overlay, imagepos) pbDrawImagePositions(overlay, imagepos)
# Write various bits of text # Write various bits of text
textpos = [ textpos = [
[_INTL("TRAINER MEMO"), 26, 10, 0, base, shadow], [_INTL("TRAINER MEMO"), 26, 22, 0, base, shadow],
[@pokemon.name, 46, 56, 0, base, shadow], [@pokemon.name, 46, 68, 0, base, shadow],
[_INTL("Item"), 66, 312, 0, base, shadow] [_INTL("Item"), 66, 324, 0, base, shadow]
] ]
# Write the held item's name # Write the held item's name
if @pokemon.hasItem? if @pokemon.hasItem?
textpos.push([@pokemon.item.name, 16, 346, 0, Color.new(64, 64, 64), Color.new(176, 176, 176)]) textpos.push([@pokemon.item.name, 16, 358, 0, Color.new(64, 64, 64), Color.new(176, 176, 176)])
else else
textpos.push([_INTL("None"), 16, 346, 0, Color.new(192, 200, 208), Color.new(208, 216, 224)]) textpos.push([_INTL("None"), 16, 358, 0, Color.new(192, 200, 208), Color.new(208, 216, 224)])
end end
# Draw all text # Draw all text
pbDrawTextPositions(overlay, textpos) pbDrawTextPositions(overlay, textpos)
@@ -524,7 +525,7 @@ class PokemonSummary_Scene
eggstate = _INTL("Sounds can be heard coming from inside! It will hatch soon!") if @pokemon.steps_to_hatch < 1275 eggstate = _INTL("Sounds can be heard coming from inside! It will hatch soon!") if @pokemon.steps_to_hatch < 1275
memo += sprintf("<c3=404040,B0B0B0>%s\n", eggstate) memo += sprintf("<c3=404040,B0B0B0>%s\n", eggstate)
# Draw all text # Draw all text
drawFormattedTextEx(overlay, 232, 82, 268, memo) drawFormattedTextEx(overlay, 232, 86, 268, memo)
# Draw the Pokémon's markings # Draw the Pokémon's markings
drawMarkings(overlay, 84, 292) drawMarkings(overlay, 84, 292)
end end
@@ -620,7 +621,7 @@ class PokemonSummary_Scene
memo += sprintf("<c3=404040,B0B0B0>%s\n", characteristics[best_stat][best_iv % 5]) memo += sprintf("<c3=404040,B0B0B0>%s\n", characteristics[best_stat][best_iv % 5])
end end
# Write all text # Write all text
drawFormattedTextEx(overlay, 232, 82, 268, memo) drawFormattedTextEx(overlay, 232, 86, 268, memo)
end end
def drawPageThree def drawPageThree
@@ -638,25 +639,25 @@ class PokemonSummary_Scene
end end
# Write various bits of text # Write various bits of text
textpos = [ textpos = [
[_INTL("HP"), 292, 70, 2, base, statshadows[:HP]], [_INTL("HP"), 292, 82, 2, base, statshadows[:HP]],
[sprintf("%d/%d", @pokemon.hp, @pokemon.totalhp), 462, 70, 1, Color.new(64, 64, 64), Color.new(176, 176, 176)], [sprintf("%d/%d", @pokemon.hp, @pokemon.totalhp), 462, 82, 1, Color.new(64, 64, 64), Color.new(176, 176, 176)],
[_INTL("Attack"), 248, 114, 0, base, statshadows[:ATTACK]], [_INTL("Attack"), 248, 126, 0, base, statshadows[:ATTACK]],
[sprintf("%d", @pokemon.attack), 456, 114, 1, Color.new(64, 64, 64), Color.new(176, 176, 176)], [sprintf("%d", @pokemon.attack), 456, 126, 1, Color.new(64, 64, 64), Color.new(176, 176, 176)],
[_INTL("Defense"), 248, 146, 0, base, statshadows[:DEFENSE]], [_INTL("Defense"), 248, 158, 0, base, statshadows[:DEFENSE]],
[sprintf("%d", @pokemon.defense), 456, 146, 1, Color.new(64, 64, 64), Color.new(176, 176, 176)], [sprintf("%d", @pokemon.defense), 456, 158, 1, Color.new(64, 64, 64), Color.new(176, 176, 176)],
[_INTL("Sp. Atk"), 248, 178, 0, base, statshadows[:SPECIAL_ATTACK]], [_INTL("Sp. Atk"), 248, 190, 0, base, statshadows[:SPECIAL_ATTACK]],
[sprintf("%d", @pokemon.spatk), 456, 178, 1, Color.new(64, 64, 64), Color.new(176, 176, 176)], [sprintf("%d", @pokemon.spatk), 456, 190, 1, Color.new(64, 64, 64), Color.new(176, 176, 176)],
[_INTL("Sp. Def"), 248, 210, 0, base, statshadows[:SPECIAL_DEFENSE]], [_INTL("Sp. Def"), 248, 222, 0, base, statshadows[:SPECIAL_DEFENSE]],
[sprintf("%d", @pokemon.spdef), 456, 210, 1, Color.new(64, 64, 64), Color.new(176, 176, 176)], [sprintf("%d", @pokemon.spdef), 456, 222, 1, Color.new(64, 64, 64), Color.new(176, 176, 176)],
[_INTL("Speed"), 248, 242, 0, base, statshadows[:SPEED]], [_INTL("Speed"), 248, 254, 0, base, statshadows[:SPEED]],
[sprintf("%d", @pokemon.speed), 456, 242, 1, Color.new(64, 64, 64), Color.new(176, 176, 176)], [sprintf("%d", @pokemon.speed), 456, 254, 1, Color.new(64, 64, 64), Color.new(176, 176, 176)],
[_INTL("Ability"), 224, 278, 0, base, shadow] [_INTL("Ability"), 224, 290, 0, base, shadow]
] ]
# Draw ability name and description # Draw ability name and description
ability = @pokemon.ability ability = @pokemon.ability
if ability if ability
textpos.push([ability.name, 362, 278, 0, Color.new(64, 64, 64), Color.new(176, 176, 176)]) textpos.push([ability.name, 362, 290, 0, Color.new(64, 64, 64), Color.new(176, 176, 176)])
drawTextEx(overlay, 224, 320, 282, 2, ability.description, Color.new(64, 64, 64), Color.new(176, 176, 176)) drawTextEx(overlay, 224, 322, 282, 2, ability.description, Color.new(64, 64, 64), Color.new(176, 176, 176))
end end
# Draw all text # Draw all text
pbDrawTextPositions(overlay, textpos) pbDrawTextPositions(overlay, textpos)
@@ -693,12 +694,12 @@ class PokemonSummary_Scene
textpos = [] textpos = []
imagepos = [] imagepos = []
# Write move names, types and PP amounts for each known move # Write move names, types and PP amounts for each known move
yPos = 92 yPos = 104
Pokemon::MAX_MOVES.times do |i| Pokemon::MAX_MOVES.times do |i|
move = @pokemon.moves[i] move = @pokemon.moves[i]
if move if move
type_number = GameData::Type.get(move.display_type(@pokemon)).icon_position type_number = GameData::Type.get(move.display_type(@pokemon)).icon_position
imagepos.push(["Graphics/Pictures/types", 248, yPos + 8, 0, type_number * 28, 64, 28]) imagepos.push(["Graphics/Pictures/types", 248, yPos - 4, 0, type_number * 28, 64, 28])
textpos.push([move.name, 316, yPos, 0, moveBase, moveShadow]) textpos.push([move.name, 316, yPos, 0, moveBase, moveShadow])
if move.total_pp > 0 if move.total_pp > 0
textpos.push([_INTL("PP"), 342, yPos + 32, 0, moveBase, moveShadow]) textpos.push([_INTL("PP"), 342, yPos + 32, 0, moveBase, moveShadow])
@@ -746,14 +747,14 @@ class PokemonSummary_Scene
end end
# Write various bits of text # Write various bits of text
textpos = [ textpos = [
[_INTL("MOVES"), 26, 10, 0, base, shadow], [_INTL("MOVES"), 26, 22, 0, base, shadow],
[_INTL("CATEGORY"), 20, 116, 0, base, shadow], [_INTL("CATEGORY"), 20, 128, 0, base, shadow],
[_INTL("POWER"), 20, 148, 0, base, shadow], [_INTL("POWER"), 20, 160, 0, base, shadow],
[_INTL("ACCURACY"), 20, 180, 0, base, shadow] [_INTL("ACCURACY"), 20, 192, 0, base, shadow]
] ]
imagepos = [] imagepos = []
# Write move names, types and PP amounts for each known move # Write move names, types and PP amounts for each known move
yPos = 92 yPos = 104
yPos -= 76 if move_to_learn yPos -= 76 if move_to_learn
limit = (move_to_learn) ? Pokemon::MAX_MOVES + 1 : Pokemon::MAX_MOVES limit = (move_to_learn) ? Pokemon::MAX_MOVES + 1 : Pokemon::MAX_MOVES
limit.times do |i| limit.times do |i|
@@ -764,7 +765,7 @@ class PokemonSummary_Scene
end end
if move if move
type_number = GameData::Type.get(move.display_type(@pokemon)).icon_position type_number = GameData::Type.get(move.display_type(@pokemon)).icon_position
imagepos.push(["Graphics/Pictures/types", 248, yPos + 8, 0, type_number * 28, 64, 28]) imagepos.push(["Graphics/Pictures/types", 248, yPos - 4, 0, type_number * 28, 64, 28])
textpos.push([move.name, 316, yPos, 0, moveBase, moveShadow]) textpos.push([move.name, 316, yPos, 0, moveBase, moveShadow])
if move.total_pp > 0 if move.total_pp > 0
textpos.push([_INTL("PP"), 342, yPos + 32, 0, moveBase, moveShadow]) textpos.push([_INTL("PP"), 342, yPos + 32, 0, moveBase, moveShadow])
@@ -810,14 +811,14 @@ class PokemonSummary_Scene
textpos = [] textpos = []
# Write power and accuracy values for selected move # Write power and accuracy values for selected move
case selected_move.display_damage(@pokemon) case selected_move.display_damage(@pokemon)
when 0 then textpos.push(["---", 216, 148, 1, base, shadow]) # Status move when 0 then textpos.push(["---", 216, 160, 1, base, shadow]) # Status move
when 1 then textpos.push(["???", 216, 148, 1, base, shadow]) # Variable power move when 1 then textpos.push(["???", 216, 160, 1, base, shadow]) # Variable power move
else textpos.push([selected_move.display_damage(@pokemon).to_s, 216, 148, 1, base, shadow]) else textpos.push([selected_move.display_damage(@pokemon).to_s, 216, 160, 1, base, shadow])
end end
if selected_move.display_accuracy(@pokemon) == 0 if selected_move.display_accuracy(@pokemon) == 0
textpos.push(["---", 216, 180, 1, base, shadow]) textpos.push(["---", 216, 192, 1, base, shadow])
else else
textpos.push(["#{selected_move.display_accuracy(@pokemon)}%", 216 + overlay.text_size("%").width, 180, 1, base, shadow]) textpos.push(["#{selected_move.display_accuracy(@pokemon)}%", 216 + overlay.text_size("%").width, 192, 1, base, shadow])
end end
# Draw all text # Draw all text
pbDrawTextPositions(overlay, textpos) pbDrawTextPositions(overlay, textpos)
@@ -825,7 +826,7 @@ class PokemonSummary_Scene
imagepos = [["Graphics/Pictures/category", 166, 124, 0, selected_move.display_category(@pokemon) * 28, 64, 28]] imagepos = [["Graphics/Pictures/category", 166, 124, 0, selected_move.display_category(@pokemon) * 28, 64, 28]]
pbDrawImagePositions(overlay, imagepos) pbDrawImagePositions(overlay, imagepos)
# Draw selected move's description # Draw selected move's description
drawTextEx(overlay, 4, 222, 230, 5, selected_move.description, base, shadow) drawTextEx(overlay, 4, 224, 230, 5, selected_move.description, base, shadow)
end end
def drawPageFive def drawPageFive
@@ -834,8 +835,8 @@ class PokemonSummary_Scene
@sprites["downarrow"].visible = false @sprites["downarrow"].visible = false
# Write various bits of text # Write various bits of text
textpos = [ textpos = [
[_INTL("No. of Ribbons:"), 234, 326, 0, Color.new(64, 64, 64), Color.new(176, 176, 176)], [_INTL("No. of Ribbons:"), 234, 338, 0, Color.new(64, 64, 64), Color.new(176, 176, 176)],
[@pokemon.numRibbons.to_s, 450, 326, 1, Color.new(64, 64, 64), Color.new(176, 176, 176)] [@pokemon.numRibbons.to_s, 450, 338, 1, Color.new(64, 64, 64), Color.new(176, 176, 176)]
] ]
# Draw all text # Draw all text
pbDrawTextPositions(overlay, textpos) pbDrawTextPositions(overlay, textpos)
@@ -874,11 +875,11 @@ class PokemonSummary_Scene
pbDrawImagePositions(overlay, imagepos) pbDrawImagePositions(overlay, imagepos)
# Draw name of selected ribbon # Draw name of selected ribbon
textpos = [ textpos = [
[name, 18, 280, 0, nameBase, nameShadow] [name, 18, 292, 0, nameBase, nameShadow]
] ]
pbDrawTextPositions(overlay, textpos) pbDrawTextPositions(overlay, textpos)
# Draw selected ribbon's description # Draw selected ribbon's description
drawTextEx(overlay, 18, 322, 480, 2, desc, base, shadow) drawTextEx(overlay, 18, 324, 480, 2, desc, base, shadow)
end end
def pbGoToPrevious def pbGoToPrevious
@@ -1083,9 +1084,9 @@ class PokemonSummary_Scene
@markingbitmap.bitmap, markrect) @markingbitmap.bitmap, markrect)
end end
textpos = [ textpos = [
[_INTL("Mark {1}", pokemon.name), 366, 90, 2, base, shadow], [_INTL("Mark {1}", pokemon.name), 366, 102, 2, base, shadow],
[_INTL("OK"), 366, 242, 2, base, shadow], [_INTL("OK"), 366, 254, 2, base, shadow],
[_INTL("Cancel"), 366, 292, 2, base, shadow] [_INTL("Cancel"), 366, 304, 2, base, shadow]
] ]
pbDrawTextPositions(@sprites["markingoverlay"].bitmap, textpos) pbDrawTextPositions(@sprites["markingoverlay"].bitmap, textpos)
redraw = false redraw = false

View File

@@ -66,7 +66,7 @@ class Window_PokemonBag < Window_DrawableCommand
rect = Rect.new(rect.x + 16, rect.y + 16, rect.width - 16, rect.height) rect = Rect.new(rect.x + 16, rect.y + 16, rect.width - 16, rect.height)
thispocket = @bag.pockets[@pocket] thispocket = @bag.pockets[@pocket]
if index == self.itemCount - 1 if index == self.itemCount - 1
textpos.push([_INTL("CLOSE BAG"), rect.x, rect.y - 2, false, self.baseColor, self.shadowColor]) textpos.push([_INTL("CLOSE BAG"), rect.x, rect.y + 2, false, self.baseColor, self.shadowColor])
else else
item = (@filterlist) ? thispocket[@filterlist[@pocket][index]][0] : thispocket[index][0] item = (@filterlist) ? thispocket[@filterlist[@pocket][index]][0] : thispocket[index][0]
baseColor = self.baseColor baseColor = self.baseColor
@@ -76,7 +76,7 @@ class Window_PokemonBag < Window_DrawableCommand
shadowColor = Color.new(248, 144, 144) shadowColor = Color.new(248, 144, 144)
end end
textpos.push( textpos.push(
[@adapter.getDisplayName(item), rect.x, rect.y - 2, false, baseColor, shadowColor] [@adapter.getDisplayName(item), rect.x, rect.y + 2, false, baseColor, shadowColor]
) )
if GameData::Item.get(item).is_important? if GameData::Item.get(item).is_important?
if @bag.registered?(item) if @bag.registered?(item)
@@ -94,7 +94,7 @@ class Window_PokemonBag < Window_DrawableCommand
qty = (@filterlist) ? thispocket[@filterlist[@pocket][index]][1] : thispocket[index][1] qty = (@filterlist) ? thispocket[@filterlist[@pocket][index]][1] : thispocket[index][1]
qtytext = _ISPRINTF("x{1: 3d}", qty) qtytext = _ISPRINTF("x{1: 3d}", qty)
xQty = rect.x + rect.width - self.contents.text_size(qtytext).width - 16 xQty = rect.x + rect.width - self.contents.text_size(qtytext).width - 16
textpos.push([qtytext, xQty, rect.y - 2, false, baseColor, shadowColor]) textpos.push([qtytext, xQty, rect.y + 2, false, baseColor, shadowColor])
end end
end end
pbDrawTextPositions(self.contents, textpos) pbDrawTextPositions(self.contents, textpos)
@@ -200,7 +200,7 @@ class PokemonBag_Scene
@sprites["itemlist"].shadowColor = ITEMLISTSHADOWCOLOR @sprites["itemlist"].shadowColor = ITEMLISTSHADOWCOLOR
@sprites["itemicon"] = ItemIconSprite.new(48, Graphics.height - 48, nil, @viewport) @sprites["itemicon"] = ItemIconSprite.new(48, Graphics.height - 48, nil, @viewport)
@sprites["itemtext"] = Window_UnformattedTextPokemon.newWithSize( @sprites["itemtext"] = Window_UnformattedTextPokemon.newWithSize(
"", 72, 270, Graphics.width - 72 - 24, 128, @viewport "", 72, 272, Graphics.width - 72 - 24, 128, @viewport
) )
@sprites["itemtext"].baseColor = ITEMTEXTBASECOLOR @sprites["itemtext"].baseColor = ITEMTEXTBASECOLOR
@sprites["itemtext"].shadowColor = ITEMTEXTSHADOWCOLOR @sprites["itemtext"].shadowColor = ITEMTEXTSHADOWCOLOR
@@ -293,7 +293,7 @@ class PokemonBag_Scene
# Draw the pocket name # Draw the pocket name
pbDrawTextPositions( pbDrawTextPositions(
overlay, overlay,
[[PokemonBag.pocket_names[@bag.last_viewed_pocket - 1], 94, 176, 2, POCKETNAMEBASECOLOR, POCKETNAMESHADOWCOLOR]] [[PokemonBag.pocket_names[@bag.last_viewed_pocket - 1], 94, 186, 2, POCKETNAMEBASECOLOR, POCKETNAMESHADOWCOLOR]]
) )
# Draw slider arrows # Draw slider arrows
showslider = false showslider = false

View File

@@ -45,7 +45,7 @@ class PokegearButton < SpriteWrapper
rect.y = @button.height / 2 if @selected rect.y = @button.height / 2 if @selected
self.bitmap.blt(0, 0, @button.bitmap, rect) self.bitmap.blt(0, 0, @button.bitmap, rect)
textpos = [ textpos = [
[@name, rect.width / 2, (rect.height / 2) - 22, 2, TEXT_BASE_COLOR, TEXT_SHADOW_COLOR] [@name, rect.width / 2, (rect.height / 2) - 10, 2, TEXT_BASE_COLOR, TEXT_SHADOW_COLOR]
] ]
pbDrawTextPositions(self.bitmap, textpos) pbDrawTextPositions(self.bitmap, textpos)
imagepos = [ imagepos = [

View File

@@ -39,9 +39,9 @@ class MapBottomSprite < SpriteWrapper
def refresh def refresh
bitmap.clear bitmap.clear
textpos = [ textpos = [
[@mapname, 18, -8, 0, TEXT_MAIN_COLOR, TEXT_SHADOW_COLOR], [@mapname, 18, 4, 0, TEXT_MAIN_COLOR, TEXT_SHADOW_COLOR],
[@maplocation, 18, 348, 0, TEXT_MAIN_COLOR, TEXT_SHADOW_COLOR], [@maplocation, 18, 360, 0, TEXT_MAIN_COLOR, TEXT_SHADOW_COLOR],
[@mapdetails, Graphics.width - 16, 348, 1, TEXT_MAIN_COLOR, TEXT_SHADOW_COLOR] [@mapdetails, Graphics.width - 16, 360, 1, TEXT_MAIN_COLOR, TEXT_SHADOW_COLOR]
] ]
pbDrawTextPositions(bitmap, textpos) pbDrawTextPositions(bitmap, textpos)
end end
@@ -251,7 +251,7 @@ class PokemonRegionMap_Scene
text = (@mode == 0) ? _INTL("ACTION: Fly") : _INTL("ACTION: Cancel Fly") text = (@mode == 0) ? _INTL("ACTION: Fly") : _INTL("ACTION: Cancel Fly")
pbDrawTextPositions( pbDrawTextPositions(
@sprites["help"].bitmap, @sprites["help"].bitmap,
[[text, Graphics.width - 16, -8, 1, Color.new(248, 248, 248), Color.new(0, 0, 0)]] [[text, Graphics.width - 16, 4, 1, Color.new(248, 248, 248), Color.new(0, 0, 0)]]
) )
@sprites.each do |key, sprite| @sprites.each do |key, sprite|
next if !key.include?("point") next if !key.include?("point")

View File

@@ -49,18 +49,18 @@ class PokemonTrainerCard_Scene
$PokemonGlobal.startTime.day, $PokemonGlobal.startTime.day,
$PokemonGlobal.startTime.year) $PokemonGlobal.startTime.year)
textPositions = [ textPositions = [
[_INTL("Name"), 34, 58, 0, baseColor, shadowColor], [_INTL("Name"), 34, 70, 0, baseColor, shadowColor],
[$player.name, 302, 58, 1, baseColor, shadowColor], [$player.name, 302, 70, 1, baseColor, shadowColor],
[_INTL("ID No."), 332, 58, 0, baseColor, shadowColor], [_INTL("ID No."), 332, 70, 0, baseColor, shadowColor],
[sprintf("%05d", $player.public_ID), 468, 58, 1, baseColor, shadowColor], [sprintf("%05d", $player.public_ID), 468, 70, 1, baseColor, shadowColor],
[_INTL("Money"), 34, 106, 0, baseColor, shadowColor], [_INTL("Money"), 34, 118, 0, baseColor, shadowColor],
[_INTL("${1}", $player.money.to_s_formatted), 302, 106, 1, baseColor, shadowColor], [_INTL("${1}", $player.money.to_s_formatted), 302, 118, 1, baseColor, shadowColor],
[_INTL("Pokédex"), 34, 154, 0, baseColor, shadowColor], [_INTL("Pokédex"), 34, 166, 0, baseColor, shadowColor],
[sprintf("%d/%d", $player.pokedex.owned_count, $player.pokedex.seen_count), 302, 154, 1, baseColor, shadowColor], [sprintf("%d/%d", $player.pokedex.owned_count, $player.pokedex.seen_count), 302, 166, 1, baseColor, shadowColor],
[_INTL("Time"), 34, 202, 0, baseColor, shadowColor], [_INTL("Time"), 34, 214, 0, baseColor, shadowColor],
[time, 302, 202, 1, baseColor, shadowColor], [time, 302, 214, 1, baseColor, shadowColor],
[_INTL("Started"), 34, 250, 0, baseColor, shadowColor], [_INTL("Started"), 34, 262, 0, baseColor, shadowColor],
[starttime, 302, 250, 1, baseColor, shadowColor] [starttime, 302, 262, 1, baseColor, shadowColor]
] ]
pbDrawTextPositions(overlay, textPositions) pbDrawTextPositions(overlay, textPositions)
x = 72 x = 72

View File

@@ -49,44 +49,44 @@ class PokemonLoadPanel < SpriteWrapper
return if disposed? return if disposed?
@refreshing = true @refreshing = true
if !self.bitmap || self.bitmap.disposed? if !self.bitmap || self.bitmap.disposed?
self.bitmap = BitmapWrapper.new(@bgbitmap.width, 111 * 2) self.bitmap = BitmapWrapper.new(@bgbitmap.width, 222)
pbSetSystemFont(self.bitmap) pbSetSystemFont(self.bitmap)
end end
if @refreshBitmap if @refreshBitmap
@refreshBitmap = false @refreshBitmap = false
self.bitmap&.clear self.bitmap&.clear
if @isContinue if @isContinue
self.bitmap.blt(0, 0, @bgbitmap.bitmap, Rect.new(0, (@selected) ? 111 * 2 : 0, @bgbitmap.width, 111 * 2)) self.bitmap.blt(0, 0, @bgbitmap.bitmap, Rect.new(0, (@selected) ? 222 : 0, @bgbitmap.width, 222))
else else
self.bitmap.blt(0, 0, @bgbitmap.bitmap, Rect.new(0, (111 * 2 * 2) + ((@selected) ? 23 * 2 : 0), @bgbitmap.width, 23 * 2)) self.bitmap.blt(0, 0, @bgbitmap.bitmap, Rect.new(0, 444 + ((@selected) ? 46 : 0), @bgbitmap.width, 46))
end end
textpos = [] textpos = []
if @isContinue if @isContinue
textpos.push([@title, 16 * 2, 2 * 2, 0, TEXTCOLOR, TEXTSHADOWCOLOR]) textpos.push([@title, 32, 16, 0, TEXTCOLOR, TEXTSHADOWCOLOR])
textpos.push([_INTL("Badges:"), 16 * 2, 53 * 2, 0, TEXTCOLOR, TEXTSHADOWCOLOR]) textpos.push([_INTL("Badges:"), 32, 118, 0, TEXTCOLOR, TEXTSHADOWCOLOR])
textpos.push([@trainer.badge_count.to_s, 103 * 2, 53 * 2, 1, TEXTCOLOR, TEXTSHADOWCOLOR]) textpos.push([@trainer.badge_count.to_s, 206, 118, 1, TEXTCOLOR, TEXTSHADOWCOLOR])
textpos.push([_INTL("Pokédex:"), 16 * 2, 69 * 2, 0, TEXTCOLOR, TEXTSHADOWCOLOR]) textpos.push([_INTL("Pokédex:"), 32, 150, 0, TEXTCOLOR, TEXTSHADOWCOLOR])
textpos.push([@trainer.pokedex.seen_count.to_s, 103 * 2, 69 * 2, 1, TEXTCOLOR, TEXTSHADOWCOLOR]) textpos.push([@trainer.pokedex.seen_count.to_s, 206, 150, 1, TEXTCOLOR, TEXTSHADOWCOLOR])
textpos.push([_INTL("Time:"), 16 * 2, 85 * 2, 0, TEXTCOLOR, TEXTSHADOWCOLOR]) textpos.push([_INTL("Time:"), 32, 182, 0, TEXTCOLOR, TEXTSHADOWCOLOR])
hour = @totalsec / 60 / 60 hour = @totalsec / 60 / 60
min = @totalsec / 60 % 60 min = @totalsec / 60 % 60
if hour > 0 if hour > 0
textpos.push([_INTL("{1}h {2}m", hour, min), 103 * 2, 85 * 2, 1, TEXTCOLOR, TEXTSHADOWCOLOR]) textpos.push([_INTL("{1}h {2}m", hour, min), 206, 182, 1, TEXTCOLOR, TEXTSHADOWCOLOR])
else else
textpos.push([_INTL("{1}m", min), 103 * 2, 85 * 2, 1, TEXTCOLOR, TEXTSHADOWCOLOR]) textpos.push([_INTL("{1}m", min), 206, 182, 1, TEXTCOLOR, TEXTSHADOWCOLOR])
end end
if @trainer.male? if @trainer.male?
textpos.push([@trainer.name, 56 * 2, 29 * 2, 0, MALETEXTCOLOR, MALETEXTSHADOWCOLOR]) textpos.push([@trainer.name, 112, 70, 0, MALETEXTCOLOR, MALETEXTSHADOWCOLOR])
elsif @trainer.female? elsif @trainer.female?
textpos.push([@trainer.name, 56 * 2, 29 * 2, 0, FEMALETEXTCOLOR, FEMALETEXTSHADOWCOLOR]) textpos.push([@trainer.name, 112, 70, 0, FEMALETEXTCOLOR, FEMALETEXTSHADOWCOLOR])
else else
textpos.push([@trainer.name, 56 * 2, 29 * 2, 0, TEXTCOLOR, TEXTSHADOWCOLOR]) textpos.push([@trainer.name, 112, 70, 0, TEXTCOLOR, TEXTSHADOWCOLOR])
end end
mapname = pbGetMapNameFromId(@mapid) mapname = pbGetMapNameFromId(@mapid)
mapname.gsub!(/\\PN/, @trainer.name) mapname.gsub!(/\\PN/, @trainer.name)
textpos.push([mapname, 193 * 2, 2 * 2, 1, TEXTCOLOR, TEXTSHADOWCOLOR]) textpos.push([mapname, 386, 16, 1, TEXTCOLOR, TEXTSHADOWCOLOR])
else else
textpos.push([@title, 16 * 2, 1 * 2, 0, TEXTCOLOR, TEXTSHADOWCOLOR]) textpos.push([@title, 32, 14, 0, TEXTCOLOR, TEXTSHADOWCOLOR])
end end
pbDrawTextPositions(self.bitmap, textpos) pbDrawTextPositions(self.bitmap, textpos)
end end
@@ -104,16 +104,16 @@ class PokemonLoad_Scene
@viewport = Viewport.new(0, 0, Graphics.width, Graphics.height) @viewport = Viewport.new(0, 0, Graphics.width, Graphics.height)
@viewport.z = 99998 @viewport.z = 99998
addBackgroundOrColoredPlane(@sprites, "background", "loadbg", Color.new(248, 248, 248), @viewport) addBackgroundOrColoredPlane(@sprites, "background", "loadbg", Color.new(248, 248, 248), @viewport)
y = 16 * 2 y = 32
commands.length.times do |i| commands.length.times do |i|
@sprites["panel#{i}"] = PokemonLoadPanel.new( @sprites["panel#{i}"] = PokemonLoadPanel.new(
i, commands[i], (show_continue) ? (i == 0) : false, trainer, i, commands[i], (show_continue) ? (i == 0) : false, trainer,
frame_count, stats, map_id, @viewport frame_count, stats, map_id, @viewport
) )
@sprites["panel#{i}"].x = 24 * 2 @sprites["panel#{i}"].x = 48
@sprites["panel#{i}"].y = y @sprites["panel#{i}"].y = y
@sprites["panel#{i}"].pbRefresh @sprites["panel#{i}"].pbRefresh
y += (show_continue && i == 0) ? 112 * 2 : 24 * 2 y += (show_continue && i == 0) ? 224 : 48
end end
@sprites["cmdwindow"] = Window_CommandPokemon.new([]) @sprites["cmdwindow"] = Window_CommandPokemon.new([])
@sprites["cmdwindow"].viewport = @viewport @sprites["cmdwindow"].viewport = @viewport
@@ -140,25 +140,25 @@ class PokemonLoad_Scene
@sprites["panel#{oldi}"].pbRefresh @sprites["panel#{oldi}"].pbRefresh
@sprites["panel#{newi}"].selected = true @sprites["panel#{newi}"].selected = true
@sprites["panel#{newi}"].pbRefresh @sprites["panel#{newi}"].pbRefresh
while @sprites["panel#{newi}"].y > Graphics.height - (40 * 2) while @sprites["panel#{newi}"].y > Graphics.height - 80
@commands.length.times do |i| @commands.length.times do |i|
@sprites["panel#{i}"].y -= 24 * 2 @sprites["panel#{i}"].y -= 48
end end
6.times do |i| 6.times do |i|
break if !@sprites["party#{i}"] break if !@sprites["party#{i}"]
@sprites["party#{i}"].y -= 24 * 2 @sprites["party#{i}"].y -= 48
end end
@sprites["player"].y -= 24 * 2 if @sprites["player"] @sprites["player"].y -= 48 if @sprites["player"]
end end
while @sprites["panel#{newi}"].y < 16 * 2 while @sprites["panel#{newi}"].y < 32
@commands.length.times do |i| @commands.length.times do |i|
@sprites["panel#{i}"].y += 24 * 2 @sprites["panel#{i}"].y += 48
end end
6.times do |i| 6.times do |i|
break if !@sprites["party#{i}"] break if !@sprites["party#{i}"]
@sprites["party#{i}"].y += 24 * 2 @sprites["party#{i}"].y += 48
end end
@sprites["player"].y += 24 * 2 if @sprites["player"] @sprites["player"].y += 48 if @sprites["player"]
end end
end end
end end
@@ -171,15 +171,15 @@ class PokemonLoad_Scene
@sprites["player"] = TrainerWalkingCharSprite.new(filename, @viewport) @sprites["player"] = TrainerWalkingCharSprite.new(filename, @viewport)
charwidth = @sprites["player"].bitmap.width charwidth = @sprites["player"].bitmap.width
charheight = @sprites["player"].bitmap.height charheight = @sprites["player"].bitmap.height
@sprites["player"].x = (56 * 2) - (charwidth / 8) @sprites["player"].x = 112 - (charwidth / 8)
@sprites["player"].y = (56 * 2) - (charheight / 8) @sprites["player"].y = 112 - (charheight / 8)
@sprites["player"].src_rect = Rect.new(0, 0, charwidth / 4, charheight / 4) @sprites["player"].src_rect = Rect.new(0, 0, charwidth / 4, charheight / 4)
end end
trainer.party.each_with_index do |pkmn, i| trainer.party.each_with_index do |pkmn, i|
@sprites["party#{i}"] = PokemonIconSprite.new(pkmn, @viewport) @sprites["party#{i}"] = PokemonIconSprite.new(pkmn, @viewport)
@sprites["party#{i}"].setOffset(PictureOrigin::CENTER) @sprites["party#{i}"].setOffset(PictureOrigin::CENTER)
@sprites["party#{i}"].x = (167 + (33 * (i % 2))) * 2 @sprites["party#{i}"].x = 334 + (66 * (i % 2))
@sprites["party#{i}"].y = (56 + (25 * (i / 2))) * 2 @sprites["party#{i}"].y = 112 + (50 * (i / 2))
@sprites["party#{i}"].z = 99999 @sprites["party#{i}"].z = 99999
end end
end end

View File

@@ -193,14 +193,14 @@ class Window_PokemonOption < Window_DrawableCommand
when EnumOption when EnumOption
if @options[index].values.length > 1 if @options[index].values.length > 1
totalwidth = 0 totalwidth = 0
@options[index].each_value do |value| @options[index].values.each do |value|
totalwidth += self.contents.text_size(value).width totalwidth += self.contents.text_size(value).width
end end
spacing = (rect.width - rect.x - optionwidth - totalwidth) / (@options[index].values.length - 1) spacing = (rect.width - rect.x - optionwidth - totalwidth) / (@options[index].values.length - 1)
spacing = 0 if spacing < 0 spacing = 0 if spacing < 0
xpos = optionwidth + rect.x xpos = optionwidth + rect.x
ivalue = 0 ivalue = 0
@options[index].each_value do |value| @options[index].values.each do |value|
pbDrawShadowText(self.contents, xpos, rect.y, optionwidth, rect.height, value, pbDrawShadowText(self.contents, xpos, rect.y, optionwidth, rect.height, value,
(ivalue == self[index]) ? SEL_VALUE_BASE_COLOR : self.baseColor, (ivalue == self[index]) ? SEL_VALUE_BASE_COLOR : self.baseColor,
(ivalue == self[index]) ? SEL_VALUE_SHADOW_COLOR : self.shadowColor) (ivalue == self[index]) ? SEL_VALUE_SHADOW_COLOR : self.shadowColor)

View File

@@ -71,15 +71,15 @@ class ReadyMenuButton < SpriteWrapper
self.bitmap.blt(0, 0, @button.bitmap, rect) self.bitmap.blt(0, 0, @button.bitmap, rect)
textx = (@command[2]) ? 164 : (GameData::Item.get(@command[0]).is_important?) ? 146 : 124 textx = (@command[2]) ? 164 : (GameData::Item.get(@command[0]).is_important?) ? 146 : 124
textpos = [ textpos = [
[@command[1], textx, 16, 2, Color.new(248, 248, 248), Color.new(40, 40, 40), 1] [@command[1], textx, 24, 2, Color.new(248, 248, 248), Color.new(40, 40, 40), 1]
] ]
if !@command[2] && !GameData::Item.get(@command[0]).is_important? if !@command[2] && !GameData::Item.get(@command[0]).is_important?
qty = $bag.quantity(@command[0]) qty = $bag.quantity(@command[0])
if qty > 99 if qty > 99
textpos.push([_INTL(">99"), 230, 16, 1, textpos.push([_INTL(">99"), 230, 24, 1,
Color.new(248, 248, 248), Color.new(40, 40, 40), 1]) Color.new(248, 248, 248), Color.new(40, 40, 40), 1])
else else
textpos.push([_INTL("x{1}", qty), 230, 16, 1, textpos.push([_INTL("x{1}", qty), 230, 24, 1,
Color.new(248, 248, 248), Color.new(40, 40, 40), 1]) Color.new(248, 248, 248), Color.new(40, 40, 40), 1])
end end
end end

View File

@@ -409,7 +409,7 @@ class PokemonBoxSprite < SpriteWrapper
pbSetSystemFont(@contents) pbSetSystemFont(@contents)
widthval = @contents.text_size(boxname).width widthval = @contents.text_size(boxname).width
xval = 162 - (widthval / 2) xval = 162 - (widthval / 2)
pbDrawShadowText(@contents, xval, 8, widthval, 32, pbDrawShadowText(@contents, xval, 14, widthval, 32,
boxname, Color.new(248, 248, 248), Color.new(40, 48, 48)) boxname, Color.new(248, 248, 248), Color.new(40, 48, 48))
@refreshBox = false @refreshBox = false
end end
@@ -531,7 +531,7 @@ class PokemonBoxPartySprite < SpriteWrapper
@contents.blt(0, 0, @boxbitmap.bitmap, Rect.new(0, 0, 172, 352)) @contents.blt(0, 0, @boxbitmap.bitmap, Rect.new(0, 0, 172, 352))
pbDrawTextPositions( pbDrawTextPositions(
self.bitmap, self.bitmap,
[[_INTL("Back"), 86, 240, 2, Color.new(248, 248, 248), Color.new(80, 80, 80), 1]] [[_INTL("Back"), 86, 248, 2, Color.new(248, 248, 248), Color.new(80, 80, 80), 1]]
) )
xvalues = [] # [18, 90, 18, 90, 18, 90] xvalues = [] # [18, 90, 18, 90, 18, 90]
yvalues = [] # [2, 18, 66, 82, 130, 146] yvalues = [] # [2, 18, 66, 82, 130, 146]
@@ -1326,8 +1326,8 @@ class PokemonStorageScene
@markingbitmap.bitmap, markrect) @markingbitmap.bitmap, markrect)
end end
textpos = [ textpos = [
[_INTL("OK"), 402, 208, 2, base, shadow, 1], [_INTL("OK"), 402, 216, 2, base, shadow, 1],
[_INTL("Cancel"), 402, 272, 2, base, shadow, 1] [_INTL("Cancel"), 402, 280, 2, base, shadow, 1]
] ]
pbDrawTextPositions(@sprites["markingoverlay"].bitmap, textpos) pbDrawTextPositions(@sprites["markingoverlay"].bitmap, textpos)
pbMarkingSetArrow(@sprites["arrow"], index) pbMarkingSetArrow(@sprites["arrow"], index)
@@ -1400,8 +1400,8 @@ class PokemonStorageScene
buttonshadow = Color.new(80, 80, 80) buttonshadow = Color.new(80, 80, 80)
pbDrawTextPositions( pbDrawTextPositions(
overlay, overlay,
[[_INTL("Party: {1}", (@storage.party.length rescue 0)), 270, 326, 2, buttonbase, buttonshadow, 1], [[_INTL("Party: {1}", (@storage.party.length rescue 0)), 270, 334, 2, buttonbase, buttonshadow, 1],
[_INTL("Exit"), 446, 326, 2, buttonbase, buttonshadow, 1]] [_INTL("Exit"), 446, 334, 2, buttonbase, buttonshadow, 1]]
) )
pokemon = nil pokemon = nil
if @screen.pbHeldPokemon if @screen.pbHeldPokemon
@@ -1420,26 +1420,26 @@ class PokemonStorageScene
nonshadow = Color.new(224, 224, 224) nonshadow = Color.new(224, 224, 224)
pokename = pokemon.name pokename = pokemon.name
textstrings = [ textstrings = [
[pokename, 10, 2, false, base, shadow] [pokename, 10, 14, false, base, shadow]
] ]
if !pokemon.egg? if !pokemon.egg?
imagepos = [] imagepos = []
if pokemon.male? if pokemon.male?
textstrings.push([_INTL(""), 148, 2, false, Color.new(24, 112, 216), Color.new(136, 168, 208)]) textstrings.push([_INTL(""), 148, 14, false, Color.new(24, 112, 216), Color.new(136, 168, 208)])
elsif pokemon.female? elsif pokemon.female?
textstrings.push([_INTL(""), 148, 2, false, Color.new(248, 56, 32), Color.new(224, 152, 144)]) textstrings.push([_INTL(""), 148, 14, false, Color.new(248, 56, 32), Color.new(224, 152, 144)])
end end
imagepos.push(["Graphics/Pictures/Storage/overlay_lv", 6, 246]) imagepos.push(["Graphics/Pictures/Storage/overlay_lv", 6, 246])
textstrings.push([pokemon.level.to_s, 28, 228, false, base, shadow]) textstrings.push([pokemon.level.to_s, 28, 240, false, base, shadow])
if pokemon.ability if pokemon.ability
textstrings.push([pokemon.ability.name, 86, 300, 2, base, shadow]) textstrings.push([pokemon.ability.name, 86, 312, 2, base, shadow])
else else
textstrings.push([_INTL("No ability"), 86, 300, 2, nonbase, nonshadow]) textstrings.push([_INTL("No ability"), 86, 312, 2, nonbase, nonshadow])
end end
if pokemon.item if pokemon.item
textstrings.push([pokemon.item.name, 86, 336, 2, base, shadow]) textstrings.push([pokemon.item.name, 86, 348, 2, base, shadow])
else else
textstrings.push([_INTL("No item"), 86, 336, 2, nonbase, nonshadow]) textstrings.push([_INTL("No item"), 86, 348, 2, nonbase, nonshadow])
end end
if pokemon.shiny? if pokemon.shiny?
imagepos.push(["Graphics/Pictures/shiny", 156, 198]) imagepos.push(["Graphics/Pictures/shiny", 156, 198])

View File

@@ -32,17 +32,17 @@ class Window_PokemonItemStorage < Window_DrawableCommand
rect = drawCursor(index, rect) rect = drawCursor(index, rect)
textpos = [] textpos = []
if index == @bag.length if index == @bag.length
textpos.push([_INTL("CANCEL"), rect.x, rect.y - 6, false, self.baseColor, self.shadowColor]) textpos.push([_INTL("CANCEL"), rect.x, rect.y, false, self.baseColor, self.shadowColor])
else else
item = @bag[index][0] item = @bag[index][0]
itemname = @adapter.getDisplayName(item) itemname = @adapter.getDisplayName(item)
baseColor = (index == @sortIndex) ? Color.new(248, 24, 24) : self.baseColor baseColor = (index == @sortIndex) ? Color.new(248, 24, 24) : self.baseColor
textpos.push([itemname, rect.x, rect.y - 6, false, self.baseColor, self.shadowColor]) textpos.push([itemname, rect.x, rect.y, false, self.baseColor, self.shadowColor])
if !GameData::Item.get(item).is_important? # Not a Key item/HM/TM if !GameData::Item.get(item).is_important? # Not a Key item/HM/TM
qty = _ISPRINTF("x{1: 2d}", @bag[index][1]) qty = _ISPRINTF("x{1: 2d}", @bag[index][1])
sizeQty = self.contents.text_size(qty).width sizeQty = self.contents.text_size(qty).width
xQty = rect.x + rect.width - sizeQty - 2 xQty = rect.x + rect.width - sizeQty - 2
textpos.push([qty, xQty, rect.y - 6, false, baseColor, self.shadowColor]) textpos.push([qty, xQty, rect.y, false, baseColor, self.shadowColor])
end end
end end
pbDrawTextPositions(self.contents, textpos) pbDrawTextPositions(self.contents, textpos)
@@ -90,7 +90,7 @@ class ItemStorage_Scene
@sprites["pocketwindow"].y = 16 @sprites["pocketwindow"].y = 16
pbSetNarrowFont(@sprites["pocketwindow"].bitmap) pbSetNarrowFont(@sprites["pocketwindow"].bitmap)
# Item description # Item description
@sprites["itemtextwindow"] = Window_UnformattedTextPokemon.newWithSize("", 84, 270, Graphics.width - 84, 128, @viewport) @sprites["itemtextwindow"] = Window_UnformattedTextPokemon.newWithSize("", 84, 272, Graphics.width - 84, 128, @viewport)
@sprites["itemtextwindow"].baseColor = ITEMTEXTBASECOLOR @sprites["itemtextwindow"].baseColor = ITEMTEXTBASECOLOR
@sprites["itemtextwindow"].shadowColor = ITEMTEXTSHADOWCOLOR @sprites["itemtextwindow"].shadowColor = ITEMTEXTSHADOWCOLOR
@sprites["itemtextwindow"].windowskin = nil @sprites["itemtextwindow"].windowskin = nil
@@ -132,7 +132,7 @@ class ItemStorage_Scene
def pbRefresh def pbRefresh
bm = @sprites["pocketwindow"].bitmap bm = @sprites["pocketwindow"].bitmap
# Draw title at upper left corner ("Toss Item/Withdraw Item") # Draw title at upper left corner ("Toss Item/Withdraw Item")
drawTextEx(bm, 0, 4, bm.width, 2, @title, TITLEBASECOLOR, TITLESHADOWCOLOR) drawTextEx(bm, 0, 8, bm.width, 2, @title, TITLEBASECOLOR, TITLESHADOWCOLOR)
itemwindow = @sprites["itemwindow"] itemwindow = @sprites["itemwindow"]
# Draw item icon # Draw item icon
@sprites["icon"].item = itemwindow.item @sprites["icon"].item = itemwindow.item

View File

@@ -176,15 +176,15 @@ class Window_PokemonMart < Window_DrawableCommand
rect = drawCursor(index, rect) rect = drawCursor(index, rect)
ypos = rect.y ypos = rect.y
if index == count - 1 if index == count - 1
textpos.push([_INTL("CANCEL"), rect.x, ypos - 4, false, self.baseColor, self.shadowColor]) textpos.push([_INTL("CANCEL"), rect.x, ypos + 2, false, self.baseColor, self.shadowColor])
else else
item = @stock[index] item = @stock[index]
itemname = @adapter.getDisplayName(item) itemname = @adapter.getDisplayName(item)
qty = @adapter.getDisplayPrice(item) qty = @adapter.getDisplayPrice(item)
sizeQty = self.contents.text_size(qty).width sizeQty = self.contents.text_size(qty).width
xQty = rect.x + rect.width - sizeQty - 2 - 16 xQty = rect.x + rect.width - sizeQty - 2 - 16
textpos.push([itemname, rect.x, ypos - 4, false, self.baseColor, self.shadowColor]) textpos.push([itemname, rect.x, ypos + 2, false, self.baseColor, self.shadowColor])
textpos.push([qty, xQty, ypos - 4, false, self.baseColor, self.shadowColor]) textpos.push([qty, xQty, ypos + 2, false, self.baseColor, self.shadowColor])
end end
pbDrawTextPositions(self.contents, textpos) pbDrawTextPositions(self.contents, textpos)
end end
@@ -228,7 +228,7 @@ class PokemonMart_Scene
@sprites["icon"] = ItemIconSprite.new(36, Graphics.height - 50, nil, @viewport) @sprites["icon"] = ItemIconSprite.new(36, Graphics.height - 50, nil, @viewport)
winAdapter = buying ? BuyAdapter.new(adapter) : SellAdapter.new(adapter) winAdapter = buying ? BuyAdapter.new(adapter) : SellAdapter.new(adapter)
@sprites["itemwindow"] = Window_PokemonMart.new( @sprites["itemwindow"] = Window_PokemonMart.new(
stock, winAdapter, Graphics.width - 316 - 16, 12, 330 + 16, Graphics.height - 126 stock, winAdapter, Graphics.width - 316 - 16, 10, 330 + 16, Graphics.height - 124
) )
@sprites["itemwindow"].viewport = @viewport @sprites["itemwindow"].viewport = @viewport
@sprites["itemwindow"].index = 0 @sprites["itemwindow"].index = 0

View File

@@ -59,24 +59,23 @@ class MoveRelearner_Scene
overlay.blt(type_x, 70, @typebitmap.bitmap, type_rect) overlay.blt(type_x, 70, @typebitmap.bitmap, type_rect)
end end
textpos = [ textpos = [
[_INTL("Teach which move?"), 16, 2, 0, Color.new(88, 88, 80), Color.new(168, 184, 184)] [_INTL("Teach which move?"), 16, 14, 0, Color.new(88, 88, 80), Color.new(168, 184, 184)]
] ]
imagepos = [] imagepos = []
yPos = 76 yPos = 88
VISIBLEMOVES.times do |i| VISIBLEMOVES.times do |i|
moveobject = @moves[@sprites["commands"].top_item + i] moveobject = @moves[@sprites["commands"].top_item + i]
if moveobject if moveobject
moveData = GameData::Move.get(moveobject) moveData = GameData::Move.get(moveobject)
type_number = GameData::Type.get(moveData.display_type(@pokemon)).icon_position type_number = GameData::Type.get(moveData.display_type(@pokemon)).icon_position
imagepos.push(["Graphics/Pictures/types", 12, yPos + 8, 0, type_number * 28, 64, 28]) imagepos.push(["Graphics/Pictures/types", 12, yPos - 4, 0, type_number * 28, 64, 28])
textpos.push([moveData.name, 80, yPos, 0, Color.new(248, 248, 248), Color.new(0, 0, 0)]) textpos.push([moveData.name, 80, yPos, 0, Color.new(248, 248, 248), Color.new(0, 0, 0)])
textpos.push([_INTL("PP"), 112, yPos + 32, 0, Color.new(64, 64, 64), Color.new(176, 176, 176)])
if moveData.total_pp > 0 if moveData.total_pp > 0
textpos.push([_INTL("PP"), 112, yPos + 32, 0, Color.new(64, 64, 64), Color.new(176, 176, 176)])
textpos.push([_INTL("{1}/{1}", moveData.total_pp), 230, yPos + 32, 1, textpos.push([_INTL("{1}/{1}", moveData.total_pp), 230, yPos + 32, 1,
Color.new(64, 64, 64), Color.new(176, 176, 176)]) Color.new(64, 64, 64), Color.new(176, 176, 176)])
else else
textpos.push(["-", 80, yPos, 0, Color.new(64, 64, 64), Color.new(176, 176, 176)]) textpos.push(["--", 230, yPos + 32, 1, Color.new(64, 64, 64), Color.new(176, 176, 176)])
textpos.push(["--", 228, yPos + 32, 1, Color.new(64, 64, 64), Color.new(176, 176, 176)])
end end
end end
yPos += 64 yPos += 64
@@ -88,13 +87,13 @@ class MoveRelearner_Scene
basedamage = selMoveData.display_damage(@pokemon) basedamage = selMoveData.display_damage(@pokemon)
category = selMoveData.display_category(@pokemon) category = selMoveData.display_category(@pokemon)
accuracy = selMoveData.display_accuracy(@pokemon) accuracy = selMoveData.display_accuracy(@pokemon)
textpos.push([_INTL("CATEGORY"), 272, 108, 0, Color.new(248, 248, 248), Color.new(0, 0, 0)]) textpos.push([_INTL("CATEGORY"), 272, 120, 0, Color.new(248, 248, 248), Color.new(0, 0, 0)])
textpos.push([_INTL("POWER"), 272, 140, 0, Color.new(248, 248, 248), Color.new(0, 0, 0)]) textpos.push([_INTL("POWER"), 272, 152, 0, Color.new(248, 248, 248), Color.new(0, 0, 0)])
textpos.push([basedamage <= 1 ? basedamage == 1 ? "???" : "---" : sprintf("%d", basedamage), textpos.push([basedamage <= 1 ? basedamage == 1 ? "???" : "---" : sprintf("%d", basedamage),
468, 140, 2, Color.new(64, 64, 64), Color.new(176, 176, 176)]) 468, 152, 2, Color.new(64, 64, 64), Color.new(176, 176, 176)])
textpos.push([_INTL("ACCURACY"), 272, 172, 0, Color.new(248, 248, 248), Color.new(0, 0, 0)]) textpos.push([_INTL("ACCURACY"), 272, 184, 0, Color.new(248, 248, 248), Color.new(0, 0, 0)])
textpos.push([accuracy == 0 ? "---" : "#{accuracy}%", textpos.push([accuracy == 0 ? "---" : "#{accuracy}%",
468, 172, 2, Color.new(64, 64, 64), Color.new(176, 176, 176)]) 468, 184, 2, Color.new(64, 64, 64), Color.new(176, 176, 176)])
pbDrawTextPositions(overlay, textpos) pbDrawTextPositions(overlay, textpos)
imagepos.push(["Graphics/Pictures/category", 436, 116, 0, category * 28, 64, 28]) imagepos.push(["Graphics/Pictures/category", 436, 116, 0, category * 28, 64, 28])
if @sprites["commands"].index < @moves.length - 1 if @sprites["commands"].index < @moves.length - 1
@@ -104,7 +103,7 @@ class MoveRelearner_Scene
imagepos.push(["Graphics/Pictures/reminderButtons", 134, 350, 76, 0, 76, 32]) imagepos.push(["Graphics/Pictures/reminderButtons", 134, 350, 76, 0, 76, 32])
end end
pbDrawImagePositions(overlay, imagepos) pbDrawImagePositions(overlay, imagepos)
drawTextEx(overlay, 272, 214, 230, 5, selMoveData.description, drawTextEx(overlay, 272, 216, 230, 5, selMoveData.description,
Color.new(64, 64, 64), Color.new(176, 176, 176)) Color.new(64, 64, 64), Color.new(176, 176, 176))
end end

View File

@@ -655,11 +655,9 @@ class Window_PurifyChamberSets < Window_DrawableCommand
textpos = [] textpos = []
rect = drawCursor(index, rect) rect = drawCursor(index, rect)
if index == @switching if index == @switching
textpos.push([(index + 1).to_s, rect.x, textpos.push([(index + 1).to_s, rect.x, rect.y, false, Color.new(248, 0, 0), self.shadowColor])
rect.y - 6, false, Color.new(248, 0, 0), self.shadowColor])
else else
textpos.push([(index + 1).to_s, rect.x, textpos.push([(index + 1).to_s, rect.x, rect.y, false, self.baseColor, self.shadowColor])
rect.y - 6, false, self.baseColor, self.shadowColor])
end end
if @chamber.setCount(index) > 0 if @chamber.setCount(index) > 0
pbDrawGauge(self.contents, Rect.new(rect.x + 16, rect.y + 6, 48, 8), pbDrawGauge(self.contents, Rect.new(rect.x + 16, rect.y + 6, 48, 8),
@@ -949,14 +947,14 @@ class PurifyChamberSetView < SpriteWrapper
if pkmn.types.length == 1 if pkmn.types.length == 1
textpos.push([_INTL("{1} Lv.{2} {3}", pkmn.name, pkmn.level, textpos.push([_INTL("{1} Lv.{2} {3}", pkmn.name, pkmn.level,
GameData::Type.get(pkmn.types[0]).name), GameData::Type.get(pkmn.types[0]).name),
2, -6, 0, Color.new(248, 248, 248), Color.new(128, 128, 128)]) 2, 6, 0, Color.new(248, 248, 248), Color.new(128, 128, 128)])
else else
textpos.push([_INTL("{1} Lv.{2} {3}/{4}", pkmn.name, pkmn.level, textpos.push([_INTL("{1} Lv.{2} {3}/{4}", pkmn.name, pkmn.level,
GameData::Type.get(pkmn.types[0]).name, GameData::Type.get(pkmn.types[0]).name,
GameData::Type.get(pkmn.types[1]).name), GameData::Type.get(pkmn.types[1]).name),
2, -6, 0, Color.new(248, 248, 248), Color.new(128, 128, 128)]) 2, 6, 0, Color.new(248, 248, 248), Color.new(128, 128, 128)])
end end
textpos.push([_INTL("FLOW"), 2 + (@info.bitmap.width / 2), 18, 0, textpos.push([_INTL("FLOW"), 2 + (@info.bitmap.width / 2), 30, 0,
Color.new(248, 248, 248), Color.new(128, 128, 128)]) Color.new(248, 248, 248), Color.new(128, 128, 128)])
# draw heart gauge # draw heart gauge
pbDrawGauge(@info.bitmap, Rect.new(@info.bitmap.width * 3 / 4, 8, @info.bitmap.width * 1 / 4, 8), pbDrawGauge(@info.bitmap, Rect.new(@info.bitmap.width * 3 / 4, 8, @info.bitmap.width * 1 / 4, 8),
@@ -966,7 +964,7 @@ class PurifyChamberSetView < SpriteWrapper
Color.new(0, 0, 248), @chamber.chamberFlow(@set), 6) Color.new(0, 0, 248), @chamber.chamberFlow(@set), 6)
end end
if @chamber.setCount(@set) > 0 if @chamber.setCount(@set) > 0
textpos.push([_INTL("TEMPO"), 2, 18, 0, textpos.push([_INTL("TEMPO"), 2, 30, 0,
Color.new(248, 248, 248), Color.new(128, 128, 128)]) Color.new(248, 248, 248), Color.new(128, 128, 128)])
# draw tempo gauge # draw tempo gauge
pbDrawGauge(@info.bitmap, Rect.new(@info.bitmap.width * 1 / 4, 24 + 8, @info.bitmap.width * 1 / 4, 8), pbDrawGauge(@info.bitmap, Rect.new(@info.bitmap.width * 1 / 4, 24 + 8, @info.bitmap.width * 1 / 4, 8),

View File

@@ -151,9 +151,9 @@ class PokemonEntryScene
pbSetSystemFont(@sprites["gender"].bitmap) pbSetSystemFont(@sprites["gender"].bitmap)
textpos = [] textpos = []
if pokemon.male? if pokemon.male?
textpos.push([_INTL(""), 0, -6, false, Color.new(0, 128, 248), Color.new(168, 184, 184)]) textpos.push([_INTL(""), 0, 6, false, Color.new(0, 128, 248), Color.new(168, 184, 184)])
elsif pokemon.female? elsif pokemon.female?
textpos.push([_INTL(""), 0, -6, false, Color.new(248, 24, 24), Color.new(168, 184, 184)]) textpos.push([_INTL(""), 0, 6, false, Color.new(248, 24, 24), Color.new(168, 184, 184)])
end end
pbDrawTextPositions(@sprites["gender"].bitmap, textpos) pbDrawTextPositions(@sprites["gender"].bitmap, textpos)
end end
@@ -389,7 +389,7 @@ class PokemonEntryScene2
COLUMNS.times do |y| COLUMNS.times do |y|
ROWS.times do |x| ROWS.times do |x|
pos = (y * ROWS) + x pos = (y * ROWS) + x
textPos.push([@@Characters[i][0][pos], 44 + (x * 32), 12 + (y * 38), 2, textPos.push([@@Characters[i][0][pos], 44 + (x * 32), 24 + (y * 38), 2,
Color.new(16, 24, 32), Color.new(160, 160, 160)]) Color.new(16, 24, 32), Color.new(160, 160, 160)])
end end
end end
@@ -436,9 +436,9 @@ class PokemonEntryScene2
pbSetSystemFont(@sprites["gender"].bitmap) pbSetSystemFont(@sprites["gender"].bitmap)
textpos = [] textpos = []
if pokemon.male? if pokemon.male?
textpos.push([_INTL(""), 0, -6, false, Color.new(0, 128, 248), Color.new(168, 184, 184)]) textpos.push([_INTL(""), 0, 6, false, Color.new(0, 128, 248), Color.new(168, 184, 184)])
elsif pokemon.female? elsif pokemon.female?
textpos.push([_INTL(""), 0, -6, false, Color.new(248, 24, 24), Color.new(168, 184, 184)]) textpos.push([_INTL(""), 0, 6, false, Color.new(248, 24, 24), Color.new(168, 184, 184)])
end end
pbDrawTextPositions(@sprites["gender"].bitmap, textpos) pbDrawTextPositions(@sprites["gender"].bitmap, textpos)
end end
@@ -513,12 +513,12 @@ class PokemonEntryScene2
bgoverlay.clear bgoverlay.clear
pbSetSystemFont(bgoverlay) pbSetSystemFont(bgoverlay)
textPositions = [ textPositions = [
[@helptext, 160, 6, false, Color.new(16, 24, 32), Color.new(168, 184, 184)] [@helptext, 160, 18, false, Color.new(16, 24, 32), Color.new(168, 184, 184)]
] ]
chars = @helper.textChars chars = @helper.textChars
x = 166 x = 166
chars.each do |ch| chars.each do |ch|
textPositions.push([ch, x, 42, false, Color.new(16, 24, 32), Color.new(168, 184, 184)]) textPositions.push([ch, x, 54, false, Color.new(16, 24, 32), Color.new(168, 184, 184)])
x += 24 x += 24
end end
pbDrawTextPositions(bgoverlay, textPositions) pbDrawTextPositions(bgoverlay, textPositions)

View File

@@ -199,8 +199,8 @@ class TriadScene
pbSetSystemFont(@sprites["overlay"].bitmap) pbSetSystemFont(@sprites["overlay"].bitmap)
pbDrawTextPositions( pbDrawTextPositions(
@sprites["overlay"].bitmap, @sprites["overlay"].bitmap,
[[@battle.opponentName, 52, -2, 2, Color.new(248, 248, 248), Color.new(96, 96, 96)], [[@battle.opponentName, 52, 10, 2, Color.new(248, 248, 248), Color.new(96, 96, 96)],
[@battle.playerName, Graphics.width - 52, -2, 2, Color.new(248, 248, 248), Color.new(96, 96, 96)]] [@battle.playerName, Graphics.width - 52, 10, 2, Color.new(248, 248, 248), Color.new(96, 96, 96)]]
) )
@sprites["score"] = Sprite.new(@viewport) @sprites["score"] = Sprite.new(@viewport)
@sprites["score"].bitmap = BitmapWrapper.new(Graphics.width, Graphics.height) @sprites["score"].bitmap = BitmapWrapper.new(Graphics.width, Graphics.height)
@@ -577,7 +577,7 @@ class TriadScene
end end
pbDrawTextPositions( pbDrawTextPositions(
bitmap, bitmap,
[[_INTL("{1}-{2}", oppscore, playerscore), Graphics.width / 2, -2, 2, Color.new(248, 248, 248), Color.new(96, 96, 96)]] [[_INTL("{1}-{2}", oppscore, playerscore), Graphics.width / 2, 10, 2, Color.new(248, 248, 248), Color.new(96, 96, 96)]]
) )
end end

View File

@@ -83,12 +83,12 @@ class VoltorbFlip
pbUpdateRowNumbers(0, 0, i) pbUpdateRowNumbers(0, 0, i)
pbUpdateColumnNumbers(0, 0, i) pbUpdateColumnNumbers(0, 0, i)
end end
pbDrawShadowText(@sprites["text"].bitmap, 8, 16, 118, 26, pbDrawShadowText(@sprites["text"].bitmap, 8, 22, 118, 26,
_INTL("Your coins"), Color.new(60, 60, 60), Color.new(150, 190, 170), 1) _INTL("Your coins"), Color.new(60, 60, 60), Color.new(150, 190, 170), 1)
pbDrawShadowText(@sprites["text"].bitmap, 8, 82, 118, 26, pbDrawShadowText(@sprites["text"].bitmap, 8, 88, 118, 26,
_INTL("Prize coins"), Color.new(60, 60, 60), Color.new(150, 190, 170), 1) _INTL("Prize coins"), Color.new(60, 60, 60), Color.new(150, 190, 170), 1)
# Draw current level # Draw current level
pbDrawShadowText(@sprites["level"].bitmap, 8, 148, 118, 28, pbDrawShadowText(@sprites["level"].bitmap, 8, 154, 118, 28,
_INTL("Level {1}", @level.to_s), Color.new(60, 60, 60), Color.new(150, 190, 170), 1) _INTL("Level {1}", @level.to_s), Color.new(60, 60, 60), Color.new(150, 190, 170), 1)
# Displays total and current coins # Displays total and current coins
pbUpdateCoins pbUpdateCoins
@@ -314,7 +314,7 @@ class VoltorbFlip
end end
# Update level text # Update level text
@sprites["level"].bitmap.clear @sprites["level"].bitmap.clear
pbDrawShadowText(@sprites["level"].bitmap, 8, 150, 118, 28, "Level " + @level.to_s, pbDrawShadowText(@sprites["level"].bitmap, 8, 154, 118, 28, "Level " + @level.to_s,
Color.new(60, 60, 60), Color.new(150, 190, 170), 1) Color.new(60, 60, 60), Color.new(150, 190, 170), 1)
@points = 0 @points = 0
pbUpdateCoins pbUpdateCoins
@@ -365,7 +365,7 @@ class VoltorbFlip
pbMessage(_INTL("\\se[Voltorb Flip gain coins]{1} received {2} Coins!", $player.name, @points.to_s_formatted)) pbMessage(_INTL("\\se[Voltorb Flip gain coins]{1} received {2} Coins!", $player.name, @points.to_s_formatted))
# Update level text # Update level text
@sprites["level"].bitmap.clear @sprites["level"].bitmap.clear
pbDrawShadowText(@sprites["level"].bitmap, 8, 150, 118, 28, _INTL("Level {1}", @level.to_s), pbDrawShadowText(@sprites["level"].bitmap, 8, 154, 118, 28, _INTL("Level {1}", @level.to_s),
Color.new(60, 60, 60), Color.new(150, 190, 170), 1) Color.new(60, 60, 60), Color.new(150, 190, 170), 1)
old_coins = $player.coins old_coins = $player.coins
$player.coins += @points $player.coins += @points

View File

@@ -88,7 +88,7 @@ class PokemonTilesetScene
TILES_PER_ROW.times do |xx| TILES_PER_ROW.times do |xx|
tile_id = tile_ID_from_coordinates(xx, @top_y + yy) tile_id = tile_ID_from_coordinates(xx, @top_y + yy)
terr = @tileset.terrain_tags[tile_id] terr = @tileset.terrain_tags[tile_id]
textpos.push([terr.to_s, (xx * TILE_SIZE) + (TILE_SIZE / 2), (yy * TILE_SIZE) - 6, 2, TEXT_COLOR, TEXT_SHADOW_COLOR]) textpos.push([terr.to_s, (xx * TILE_SIZE) + (TILE_SIZE / 2), (yy * TILE_SIZE) + 6, 2, TEXT_COLOR, TEXT_SHADOW_COLOR])
end end
end end
pbDrawTextPositions(@sprites["overlay"].bitmap, textpos) pbDrawTextPositions(@sprites["overlay"].bitmap, textpos)
@@ -123,8 +123,8 @@ class PokemonTilesetScene
terrain_tag_name = terrain_tag.to_s terrain_tag_name = terrain_tag.to_s
end end
textpos = [ textpos = [
[_INTL("Terrain Tag:"), tile_x + TILE_SIZE, tile_y + (TILE_SIZE * 2) + 10, 2, Color.new(248, 248, 248), Color.new(40, 40, 40)], [_INTL("Terrain Tag:"), tile_x + TILE_SIZE, tile_y + (TILE_SIZE * 2) + 22, 2, Color.new(248, 248, 248), Color.new(40, 40, 40)],
[terrain_tag_name, tile_x + TILE_SIZE, tile_y + (TILE_SIZE * 2) + 42, 2, Color.new(248, 248, 248), Color.new(40, 40, 40)] [terrain_tag_name, tile_x + TILE_SIZE, tile_y + (TILE_SIZE * 2) + 54, 2, Color.new(248, 248, 248), Color.new(40, 40, 40)]
] ]
# Draw all text # Draw all text
pbDrawTextPositions(overlay, textpos) pbDrawTextPositions(overlay, textpos)

View File

@@ -7,9 +7,9 @@ module ShadowText
when 1 when 1
x += (w / 2) - (width / 2) x += (w / 2) - (width / 2)
end end
pbDrawShadowText(bitmap, x, y, w, h, t, pbDrawShadowText(bitmap, x, y + 6, w, h, t,
disabled ? Color.new(26 * 8, 26 * 8, 25 * 8) : Color.new(12 * 8, 12 * 8, 12 * 8), disabled ? Color.new(208, 208, 200) : Color.new(96, 96, 96),
Color.new(26 * 8, 26 * 8, 25 * 8)) Color.new(208, 208, 200))
end end
end end

Binary file not shown.

Binary file not shown.

Binary file not shown.