From 4c35a7ecfefa21ffbacd0a6b3420ffecc7e55a3c Mon Sep 17 00:00:00 2001 From: Maruno17 Date: Sun, 7 Mar 2021 23:08:05 +0000 Subject: [PATCH] Fixed up text positioning and window sizes, fixed crash when choosing how many items to toss from the Bag --- .../005_SpriteWindow_text.rb | 34 ++--- .../009_Objects and windows/010_DrawText.rb | 3 +- .../009_Objects and windows/012_TextEntry.rb | 24 ++-- .../004_PokeBattle_SceneElements.rb | 10 +- .../005_PokeBattle_SceneMenus.rb | 6 +- .../002_PokeBattle_SafariZone.rb | 4 +- .../005_PokeBattle_BattleArena.rb | 18 +-- .../013_Overworld/003_PField_Visuals.rb | 4 +- Data/Scripts/016_Pokemon/001_Pokemon.rb | 8 ++ .../Scripts/017_UI/002_PScreen_PokedexMenu.rb | 8 +- .../Scripts/017_UI/003_PScreen_PokedexMain.rb | 68 ++++----- .../017_UI/004_PScreen_PokedexEntry.rb | 36 ++--- Data/Scripts/017_UI/005_PScreen_Party.rb | 16 +-- Data/Scripts/017_UI/006_PScreen_Summary.rb | 130 +++++++++--------- Data/Scripts/017_UI/007_PScreen_Bag.rb | 13 +- Data/Scripts/017_UI/008_PScreen_Pokegear.rb | 2 +- Data/Scripts/017_UI/009_PScreen_RegionMap.rb | 6 +- .../Scripts/017_UI/012_PScreen_TrainerCard.rb | 24 ++-- Data/Scripts/017_UI/013_PScreen_Load.rb | 26 ++-- Data/Scripts/017_UI/015_PScreen_Options.rb | 13 +- Data/Scripts/017_UI/016_PScreen_ReadyMenu.rb | 6 +- .../017_UI/017_PScreen_PokemonStorage.rb | 22 +-- .../Scripts/017_UI/018_PScreen_ItemStorage.rb | 93 +++++++------ .../017_UI/023_PScreen_MoveRelearner.rb | 18 +-- .../017_UI/024_PScreen_PurifyChamber.rb | 12 +- Data/Scripts/017_UI/025_PScreen_Mart.rb | 6 +- Data/Scripts/017_UI/027_PScreen_HallOfFame.rb | 14 +- .../002_PMinigame_TripleTriad.rb | 8 +- .../003_Debug_MenuExtraCode.rb | 112 ++------------- .../002_AnimEditor_ControlsButtons.rb | 2 +- .../010_Editor_TilesetTerrainTags.rb | 34 ++--- 31 files changed, 342 insertions(+), 438 deletions(-) diff --git a/Data/Scripts/009_Objects and windows/005_SpriteWindow_text.rb b/Data/Scripts/009_Objects and windows/005_SpriteWindow_text.rb index 65d043de1..3d896c71d 100644 --- a/Data/Scripts/009_Objects and windows/005_SpriteWindow_text.rb +++ b/Data/Scripts/009_Objects and windows/005_SpriteWindow_text.rb @@ -61,16 +61,16 @@ class Window_UnformattedTextPokemon < SpriteWindow_Base self.text=text end - def resizeToFit(text,maxwidth=-1) # maxwidth is maximum acceptable window width - dims=resizeToFitInternal(text,maxwidth) - self.width=dims[0]+self.borderX+SpriteWindow_Base::TEXTPADDING - self.height=dims[1]+self.borderY + def resizeToFit(text, maxwidth = -1) # maxwidth is maximum acceptable window width + dims = resizeToFitInternal(text,maxwidth) + self.width = dims[0] + self.borderX + SpriteWindow_Base::TEXTPADDING + self.height = dims[1] + self.borderY - 4 refresh end - def resizeHeightToFit(text,width=-1) # width is current window width - dims=resizeToFitInternal(text,width) - self.width=width<0 ? Graphics.width : width + def resizeHeightToFit(text, width = -1) # width is current window width + dims = resizeToFitInternal(text,width) + self.width = (width < 0) ? Graphics.width : width self.height = dims[1] + self.borderY - 4 refresh end @@ -215,7 +215,7 @@ class Window_AdvancedTextPokemon < SpriteWindow_Base oldstarting = @starting @starting = true self.width = dims[0]+self.borderX+SpriteWindow_Base::TEXTPADDING - self.height = dims[1]+self.borderY + self.height = dims[1]+self.borderY - 4 @starting = oldstarting redrawText end @@ -225,7 +225,7 @@ class Window_AdvancedTextPokemon < SpriteWindow_Base oldstarting = @starting @starting = true self.width = [dims[0]+self.borderX+SpriteWindow_Base::TEXTPADDING,maxwidth].min - self.height = [dims[1]+self.borderY,maxheight].min + self.height = [dims[1]+self.borderY - 4,maxheight].min @starting = oldstarting redrawText end @@ -246,8 +246,8 @@ class Window_AdvancedTextPokemon < SpriteWindow_Base dims = resizeToFitInternal(text,width) oldstarting = @starting @starting = true - self.width = (width<0) ? Graphics.width : width - self.height = dims[1]+self.borderY + self.width = (width < 0) ? Graphics.width : width + self.height = dims[1] + self.borderY - 4 @starting = oldstarting redrawText end @@ -317,6 +317,7 @@ class Window_AdvancedTextPokemon < SpriteWindow_Base chy = ch[2]+ch[4] width = chx if width=visiblelines @@ -344,6 +345,7 @@ class Window_AdvancedTextPokemon < SpriteWindow_Base chy = ch[2]+ch[4] width = chx if width0 bitmap.font.color=shadowColor bitmap.draw_text(x+2,y,width,height,string,align) diff --git a/Data/Scripts/009_Objects and windows/012_TextEntry.rb b/Data/Scripts/009_Objects and windows/012_TextEntry.rb index 48899eefa..49a771f37 100644 --- a/Data/Scripts/009_Objects and windows/012_TextEntry.rb +++ b/Data/Scripts/009_Objects and windows/012_TextEntry.rb @@ -49,16 +49,16 @@ class Window_CharacterEntry < Window_DrawableCommand def drawItem(index,_count,rect) rect=drawCursor(index,rect) if index==@charset.length # -1 - pbDrawShadowText(self.contents,rect.x,rect.y + 6,rect.width,rect.height,"[ ]", + pbDrawShadowText(self.contents,rect.x,rect.y,rect.width,rect.height,"[ ]", self.baseColor,self.shadowColor) elsif index==@charset.length+1 # -2 - pbDrawShadowText(self.contents,rect.x,rect.y + 6,rect.width,rect.height,@othercharset, + pbDrawShadowText(self.contents,rect.x,rect.y,rect.width,rect.height,@othercharset, self.baseColor,self.shadowColor) elsif index==@charset.length+2 # -3 - pbDrawShadowText(self.contents,rect.x,rect.y + 6,rect.width,rect.height,_INTL("OK"), + pbDrawShadowText(self.contents,rect.x,rect.y,rect.width,rect.height,_INTL("OK"), self.baseColor,self.shadowColor) else - pbDrawShadowText(self.contents,rect.x,rect.y + 6,rect.width,rect.height,@charset[index], + pbDrawShadowText(self.contents,rect.x,rect.y,rect.width,rect.height,@charset[index], self.baseColor,self.shadowColor) end end @@ -249,7 +249,7 @@ class Window_TextEntry < SpriteWindow_Base bitmap=self.contents bitmap.clear x=0 - y=6 + y=0 if @heading textwidth=bitmap.text_size(@heading).width pbDrawShadowText(bitmap,x,y, textwidth+4, 32, @heading,@baseColor,@shadowColor) @@ -780,9 +780,9 @@ class PokemonEntryScene pbSetSystemFont(@sprites["gender"].bitmap) textpos=[] if pokemon.male? - textpos.push([_INTL("♂"),0,0,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? - textpos.push([_INTL("♀"),0,0,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 pbDrawTextPositions(@sprites["gender"].bitmap,textpos) end @@ -1014,7 +1014,7 @@ class PokemonEntryScene2 textPos=[] for y in 0...COLUMNS for x in 0...ROWS - textPos.push([@@Characters[i][0][pos],44+x*32,18+y*38,2, + textPos.push([@@Characters[i][0][pos],44+x*32,12+y*38,2, Color.new(16,24,32), Color.new(160,160,160)]) pos+=1 end @@ -1058,9 +1058,9 @@ class PokemonEntryScene2 pbSetSystemFont(@sprites["gender"].bitmap) textpos=[] if pokemon.male? - textpos.push([_INTL("♂"),0,0,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? - textpos.push([_INTL("♀"),0,0,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 pbDrawTextPositions(@sprites["gender"].bitmap,textpos) end @@ -1135,12 +1135,12 @@ class PokemonEntryScene2 bgoverlay.clear pbSetSystemFont(bgoverlay) textPositions=[ - [@helptext,160,12,false,Color.new(16,24,32),Color.new(168,184,184)] + [@helptext,160,6,false,Color.new(16,24,32),Color.new(168,184,184)] ] chars=@helper.textChars x=166 for ch in chars - textPositions.push([ch,x,48,false,Color.new(16,24,32),Color.new(168,184,184)]) + textPositions.push([ch,x,42,false,Color.new(16,24,32),Color.new(168,184,184)]) x+=24 end pbDrawTextPositions(bgoverlay,textPositions) diff --git a/Data/Scripts/012_Battle/005_Battle scene/004_PokeBattle_SceneElements.rb b/Data/Scripts/012_Battle/005_Battle scene/004_PokeBattle_SceneElements.rb index 456d71384..e7b68de1e 100644 --- a/Data/Scripts/012_Battle/005_Battle scene/004_PokeBattle_SceneElements.rb +++ b/Data/Scripts/012_Battle/005_Battle scene/004_PokeBattle_SceneElements.rb @@ -213,13 +213,13 @@ class PokemonDataBox < SpriteWrapper nameWidth = self.bitmap.text_size(@battler.name).width nameOffset = 0 nameOffset = nameWidth-116 if nameWidth>116 - textPos.push([@battler.name,@spriteBaseX+8-nameOffset,6,false,NAME_BASE_COLOR,NAME_SHADOW_COLOR]) + textPos.push([@battler.name,@spriteBaseX+8-nameOffset,0,false,NAME_BASE_COLOR,NAME_SHADOW_COLOR]) # Draw Pokémon's gender symbol case @battler.displayGender when 0 # Male - textPos.push([_INTL("♂"),@spriteBaseX+126,6,false,MALE_BASE_COLOR,MALE_SHADOW_COLOR]) + textPos.push([_INTL("♂"),@spriteBaseX+126,0,false,MALE_BASE_COLOR,MALE_SHADOW_COLOR]) when 1 # Female - textPos.push([_INTL("♀"),@spriteBaseX+126,6,false,FEMALE_BASE_COLOR,FEMALE_SHADOW_COLOR]) + textPos.push([_INTL("♀"),@spriteBaseX+126,0,false,FEMALE_BASE_COLOR,FEMALE_SHADOW_COLOR]) end pbDrawTextPositions(self.bitmap,textPos) # Draw Pokémon's level @@ -451,10 +451,10 @@ class AbilitySplashBar < SpriteWrapper textPos = [] textX = (@side==0) ? 10 : self.bitmap.width-8 # Draw Pokémon's name - textPos.push([_INTL("{1}'s",@battler.name),textX,2,@side==1, + textPos.push([_INTL("{1}'s",@battler.name),textX,-4,@side==1, TEXT_BASE_COLOR,TEXT_SHADOW_COLOR,true]) # Draw Pokémon's ability - textPos.push([@battler.abilityName,textX,32,@side==1, + textPos.push([@battler.abilityName,textX,26,@side==1, TEXT_BASE_COLOR,TEXT_SHADOW_COLOR,true]) pbDrawTextPositions(self.bitmap,textPos) end diff --git a/Data/Scripts/012_Battle/005_Battle scene/005_PokeBattle_SceneMenus.rb b/Data/Scripts/012_Battle/005_Battle scene/005_PokeBattle_SceneMenus.rb index b8db1c960..6de8b753a 100644 --- a/Data/Scripts/012_Battle/005_Battle scene/005_PokeBattle_SceneMenus.rb +++ b/Data/Scripts/012_Battle/005_Battle scene/005_PokeBattle_SceneMenus.rb @@ -348,7 +348,7 @@ class FightMenuDisplay < BattleMenuBase @buttons.each_with_index do |button,i| next if !@visibility["button_#{i}"] x = button.x-self.x+button.src_rect.width/2 - y = button.y-self.y+8 + y = button.y-self.y+2 moveNameBase = TEXT_BASE_COLOR if moves[i].type # NOTE: This takes a colour from a particular pixel in the button @@ -407,7 +407,7 @@ class FightMenuDisplay < BattleMenuBase ppFraction = [(4.0*move.pp/move.total_pp).ceil,3].min textPos = [] textPos.push([_INTL("PP: {1}/{2}",move.pp,move.total_pp), - 448,50,2,PP_COLORS[ppFraction*2],PP_COLORS[ppFraction*2+1]]) + 448,44,2,PP_COLORS[ppFraction*2],PP_COLORS[ppFraction*2+1]]) pbDrawTextPositions(@infoOverlay.bitmap,textPos) end end @@ -539,7 +539,7 @@ class TargetMenuDisplay < BattleMenuBase @buttons.each_with_index do |button,i| next if !button || @texts[i].nil? || @texts[i]=="" x = button.x-self.x+button.src_rect.width/2 - y = button.y-self.y+8 + y = button.y-self.y+2 textpos.push([@texts[i],x,y,2,TEXT_BASE_COLOR,TEXT_SHADOW_COLOR]) end pbDrawTextPositions(@overlay.bitmap,textpos) diff --git a/Data/Scripts/012_Battle/006_Other battle types/002_PokeBattle_SafariZone.rb b/Data/Scripts/012_Battle/006_Other battle types/002_PokeBattle_SafariZone.rb index cbb5e6a73..5cd23935c 100644 --- a/Data/Scripts/012_Battle/006_Other battle types/002_PokeBattle_SafariZone.rb +++ b/Data/Scripts/012_Battle/006_Other battle types/002_PokeBattle_SafariZone.rb @@ -87,8 +87,8 @@ class SafariDataBox < SpriteWrapper base = Color.new(72,72,72) shadow = Color.new(184,184,184) textpos = [] - textpos.push([_INTL("Safari Balls"),30,8,false,base,shadow]) - textpos.push([_INTL("Left: {1}",@battle.ballCount),30,38,false,base,shadow]) + textpos.push([_INTL("Safari Balls"),30,2,false,base,shadow]) + textpos.push([_INTL("Left: {1}",@battle.ballCount),30,32,false,base,shadow]) pbDrawTextPositions(self.bitmap,textpos) end diff --git a/Data/Scripts/012_Battle/006_Other battle types/005_PokeBattle_BattleArena.rb b/Data/Scripts/012_Battle/006_Other battle types/005_PokeBattle_BattleArena.rb index 61818ca32..b61e02464 100644 --- a/Data/Scripts/012_Battle/006_Other battle types/005_PokeBattle_BattleArena.rb +++ b/Data/Scripts/012_Battle/006_Other battle types/005_PokeBattle_BattleArena.rb @@ -200,15 +200,15 @@ class PokeBattle_Scene window.contents.clear pbSetSystemFont(window.contents) textpos = [ - [battler1.name,64,0,2,Color.new(248,0,0),Color.new(208,208,200)], - [_INTL("VS"),144,0,2,Color.new(72,72,72),Color.new(208,208,200)], - [battler2.name,224,0,2,Color.new(72,72,72),Color.new(208,208,200)], - [_INTL("Mind"),144,48,2,Color.new(72,72,72),Color.new(208,208,200)], - [_INTL("Skill"),144,80,2,Color.new(72,72,72),Color.new(208,208,200)], - [_INTL("Body"),144,112,2,Color.new(72,72,72),Color.new(208,208,200)], - [sprintf("%d",total1),64,160,2,Color.new(72,72,72),Color.new(208,208,200)], - [_INTL("Judgment"),144,160,2,Color.new(72,72,72),Color.new(208,208,200)], - [sprintf("%d",total2),224,160,2,Color.new(72,72,72),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)], + [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("Skill"),144,74,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)], + [sprintf("%d",total1),64,154,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)], + [sprintf("%d",total2),224,154,2,Color.new(72,72,72),Color.new(208,208,200)] ] pbDrawTextPositions(window.contents,textpos) images = [] diff --git a/Data/Scripts/013_Overworld/003_PField_Visuals.rb b/Data/Scripts/013_Overworld/003_PField_Visuals.rb index fc512fbcc..a10ffce76 100644 --- a/Data/Scripts/013_Overworld/003_PField_Visuals.rb +++ b/Data/Scripts/013_Overworld/003_PField_Visuals.rb @@ -222,9 +222,9 @@ def pbBattleAnimationOverride(viewport,battletype=0,foe=nil) trainer.tone = Tone.new(0,0,0) trainername = foe[0].name textpos = [ - [$Trainer.name,Graphics.width/4,(Graphics.height/1.5)+10,2, + [$Trainer.name,Graphics.width/4,(Graphics.height/1.5)+4,2, Color.new(248,248,248),Color.new(12*6,12*6,12*6)], - [trainername,(Graphics.width/4)+(Graphics.width/2),(Graphics.height/1.5)+10,2, + [trainername,(Graphics.width/4)+(Graphics.width/2),(Graphics.height/1.5)+4,2, Color.new(248,248,248),Color.new(12*6,12*6,12*6)] ] pbDrawTextPositions(overlay.bitmap,textpos) diff --git a/Data/Scripts/016_Pokemon/001_Pokemon.rb b/Data/Scripts/016_Pokemon/001_Pokemon.rb index cb40e648c..2990022e6 100644 --- a/Data/Scripts/016_Pokemon/001_Pokemon.rb +++ b/Data/Scripts/016_Pokemon/001_Pokemon.rb @@ -653,6 +653,14 @@ class Pokemon return move_data && species_data.tutor_moves.include?(move_data.id) end + def can_relearn_move? + return false if egg? || shadowPokemon? + this_level = self.level + getMoveList.each { |m| return true if m[0] <= this_level && !hasMove?(m[1]) } + @first_moves.each { |m| return true if !pkmn.hasMove?(m) } + return false + end + #============================================================================= # Ribbons #============================================================================= diff --git a/Data/Scripts/017_UI/002_PScreen_PokedexMenu.rb b/Data/Scripts/017_UI/002_PScreen_PokedexMenu.rb index b792c61eb..13eaece82 100644 --- a/Data/Scripts/017_UI/002_PScreen_PokedexMenu.rb +++ b/Data/Scripts/017_UI/002_PScreen_PokedexMenu.rb @@ -17,15 +17,15 @@ class Window_DexesList < Window_CommandPokemon def drawItem(index,count,rect) super(index,count,rect) if index>=0 && index<@commands2.length - pbDrawShadowText(self.contents,rect.x+254,rect.y + 6,64,rect.height, + pbDrawShadowText(self.contents,rect.x+254,rect.y,64,rect.height, sprintf("%d",@commands2[index][0]),self.baseColor,self.shadowColor,1) - pbDrawShadowText(self.contents,rect.x+350,rect.y + 6,64,rect.height, + pbDrawShadowText(self.contents,rect.x+350,rect.y,64,rect.height, sprintf("%d",@commands2[index][1]),self.baseColor,self.shadowColor,1) allseen = (@commands2[index][0]>=@commands2[index][2]) allown = (@commands2[index][1]>=@commands2[index][2]) pbDrawImagePositions(self.contents,[ - ["Graphics/Pictures/Pokedex/icon_menuseenown",rect.x+236,rect.y+4,(allseen) ? 24 : 0,0,24,24], - ["Graphics/Pictures/Pokedex/icon_menuseenown",rect.x+332,rect.y+4,(allown) ? 24 : 0,24,24,24] + ["Graphics/Pictures/Pokedex/icon_menuseenown",rect.x+236,rect.y+2,(allseen) ? 24 : 0,0,24,24], + ["Graphics/Pictures/Pokedex/icon_menuseenown",rect.x+332,rect.y+2,(allown) ? 24 : 0,24,24,24] ]) end end diff --git a/Data/Scripts/017_UI/003_PScreen_PokedexMain.rb b/Data/Scripts/017_UI/003_PScreen_PokedexMain.rb index 49219e210..0e7ae4783 100644 --- a/Data/Scripts/017_UI/003_PScreen_PokedexMain.rb +++ b/Data/Scripts/017_UI/003_PScreen_PokedexMain.rb @@ -48,7 +48,7 @@ class Window_Pokedex < Window_DrawableCommand else text = sprintf("%03d ----------",indexNumber) end - pbDrawShadowText(self.contents,rect.x+36,rect.y+6 + 6,rect.width,rect.height, + pbDrawShadowText(self.contents,rect.x+36,rect.y+6,rect.width,rect.height, text,self.baseColor,self.shadowColor) end @@ -392,17 +392,17 @@ class PokemonPokedex_Scene end end textpos = [ - [dexname,Graphics.width/2,2,2,Color.new(248,248,248),Color.new(0,0,0)] + [dexname,Graphics.width/2,-2,2,Color.new(248,248,248),Color.new(0,0,0)] ] - textpos.push([GameData::Species.get(iconspecies).name,112,52,2,base,shadow]) if iconspecies + textpos.push([GameData::Species.get(iconspecies).name,112,46,2,base,shadow]) if iconspecies if @searchResults - textpos.push([_INTL("Search results"),112,308,2,base,shadow]) - textpos.push([@dexlist.length.to_s,112,340,2,base,shadow]) + textpos.push([_INTL("Search results"),112,302,2,base,shadow]) + textpos.push([@dexlist.length.to_s,112,334,2,base,shadow]) else - textpos.push([_INTL("Seen:"),42,308,0,base,shadow]) - textpos.push([$Trainer.seen_count(pbGetPokedexRegion).to_s,182,308,1,base,shadow]) - textpos.push([_INTL("Owned:"),42,340,0,base,shadow]) - textpos.push([$Trainer.owned_count(pbGetPokedexRegion).to_s,182,340,1,base,shadow]) + textpos.push([_INTL("Seen:"),42,302,0,base,shadow]) + textpos.push([$Trainer.seen_count(pbGetPokedexRegion).to_s,182,302,1,base,shadow]) + textpos.push([_INTL("Owned:"),42,334,0,base,shadow]) + textpos.push([$Trainer.owned_count(pbGetPokedexRegion).to_s,182,334,1,base,shadow]) end # Draw all text pbDrawTextPositions(overlay,textpos) @@ -445,36 +445,36 @@ class PokemonPokedex_Scene shadow = Color.new(72,72,72) # Write various bits of text textpos = [ - [_INTL("Search Mode"),Graphics.width/2,2,2,base,shadow], - [_INTL("Order"),136,58,2,base,shadow], - [_INTL("Name"),58,116,2,base,shadow], - [_INTL("Type"),58,168,2,base,shadow], - [_INTL("Height"),58,220,2,base,shadow], - [_INTL("Weight"),58,272,2,base,shadow], - [_INTL("Color"),326,116,2,base,shadow], - [_INTL("Shape"),454,168,2,base,shadow], + [_INTL("Search Mode"),Graphics.width/2,-2,2,base,shadow], + [_INTL("Order"),136,52,2,base,shadow], + [_INTL("Name"),58,110,2,base,shadow], + [_INTL("Type"),58,162,2,base,shadow], + [_INTL("Height"),58,214,2,base,shadow], + [_INTL("Weight"),58,266,2,base,shadow], + [_INTL("Color"),326,110,2,base,shadow], + [_INTL("Shape"),454,162,2,base,shadow], [_INTL("Reset"),80,338,2,base,shadow,1], [_INTL("Start"),Graphics.width/2,338,2,base,shadow,1], [_INTL("Cancel"),Graphics.width-80,338,2,base,shadow,1] ] # Write order, name and color parameters - textpos.push([@orderCommands[params[0]],344,60,2,base,shadow,1]) - textpos.push([(params[1]<0) ? "----" : @nameCommands[params[1]],176,118,2,base,shadow,1]) - textpos.push([(params[8]<0) ? "----" : @colorCommands[params[8]].name,444,118,2,base,shadow,1]) + textpos.push([@orderCommands[params[0]],344,58,2,base,shadow,1]) + textpos.push([(params[1]<0) ? "----" : @nameCommands[params[1]],176,116,2,base,shadow,1]) + textpos.push([(params[8]<0) ? "----" : @colorCommands[params[8]].name,444,116,2,base,shadow,1]) # Draw type icons if params[2]>=0 type_number = @typeCommands[params[2]].id_number typerect = Rect.new(0,type_number*32,96,32) overlay.blt(128,168,@typebitmap.bitmap,typerect) else - textpos.push(["----",176,170,2,base,shadow,1]) + textpos.push(["----",176,168,2,base,shadow,1]) end if params[3]>=0 type_number = @typeCommands[params[3]].id_number typerect = Rect.new(0,type_number*32,96,32) overlay.blt(256,168,@typebitmap.bitmap,typerect) else - textpos.push(["----",304,170,2,base,shadow,1]) + textpos.push(["----",304,168,2,base,shadow,1]) end # Write height and weight limits ht1 = (params[4]<0) ? 0 : (params[4]>=@heightCommands.length) ? 999 : @heightCommands[params[4]] @@ -487,16 +487,16 @@ class PokemonPokedex_Scene ht2 = (params[5]<0) ? 99*12 : (ht2/0.254).round wt1 = (params[6]>=@weightCommands.length) ? 99990 : (wt1/0.254).round wt2 = (params[7]<0) ? 99990 : (wt2/0.254).round - textpos.push([sprintf("%d'%02d''",ht1/12,ht1%12),166,222,2,base,shadow,1]) - textpos.push([sprintf("%d'%02d''",ht2/12,ht2%12),294,222,2,base,shadow,1]) - textpos.push([sprintf("%.1f",wt1/10.0),166,274,2,base,shadow,1]) - textpos.push([sprintf("%.1f",wt2/10.0),294,274,2,base,shadow,1]) + textpos.push([sprintf("%d'%02d''",ht1/12,ht1%12),166,220,2,base,shadow,1]) + textpos.push([sprintf("%d'%02d''",ht2/12,ht2%12),294,220,2,base,shadow,1]) + textpos.push([sprintf("%.1f",wt1/10.0),166,272,2,base,shadow,1]) + textpos.push([sprintf("%.1f",wt2/10.0),294,272,2,base,shadow,1]) hwoffset = true else - textpos.push([sprintf("%.1f",ht1/10.0),166,222,2,base,shadow,1]) - textpos.push([sprintf("%.1f",ht2/10.0),294,222,2,base,shadow,1]) - textpos.push([sprintf("%.1f",wt1/10.0),166,274,2,base,shadow,1]) - textpos.push([sprintf("%.1f",wt2/10.0),294,274,2,base,shadow,1]) + textpos.push([sprintf("%.1f",ht1/10.0),166,220,2,base,shadow,1]) + textpos.push([sprintf("%.1f",ht2/10.0),294,220,2,base,shadow,1]) + textpos.push([sprintf("%.1f",wt1/10.0),166,272,2,base,shadow,1]) + textpos.push([sprintf("%.1f",wt2/10.0),294,272,2,base,shadow,1]) end 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)) @@ -517,13 +517,13 @@ class PokemonPokedex_Scene shadow = Color.new(72,72,72) # Write various bits of text textpos = [ - [_INTL("Search Mode"),Graphics.width/2,2,2,base,shadow], + [_INTL("Search Mode"),Graphics.width/2,-2,2,base,shadow], [_INTL("OK"),80,338,2,base,shadow,1], [_INTL("Cancel"),Graphics.width-80,338,2,base,shadow,1] ] title = [_INTL("Order"),_INTL("Name"),_INTL("Type"),_INTL("Height"), _INTL("Weight"),_INTL("Color"),_INTL("Shape")][mode] - textpos.push([title,102,(mode==6) ? 64 : 58,0,base,shadow]) + textpos.push([title,102,(mode==6) ? 58 : 52,0,base,shadow]) case mode when 0 # Order xstart = 46; ystart = 128 @@ -627,8 +627,8 @@ class PokemonPokedex_Scene xpos2 = xstart+(sel[1]+1)*xgap xpos2 = xstart+cols*xgap if sel[1]<0 xpos2 = xstart if sel[1]>=cols-1 - ypos1 = ystart+64-4+112 - ypos2 = ystart+32-4 + ypos1 = ystart+172 + ypos2 = ystart+28 overlay.blt(16,120,@searchsliderbitmap.bitmap,Rect.new(0,192,32,44)) if sel[1]=0 overlay.blt(16,264,@searchsliderbitmap.bitmap,Rect.new(0,192,32,44)) if sel[0]>=0 diff --git a/Data/Scripts/017_UI/004_PScreen_PokedexEntry.rb b/Data/Scripts/017_UI/004_PScreen_PokedexEntry.rb index 789125ee7..db99c3c19 100644 --- a/Data/Scripts/017_UI/004_PScreen_PokedexEntry.rb +++ b/Data/Scripts/017_UI/004_PScreen_PokedexEntry.rb @@ -219,24 +219,24 @@ class PokemonPokedexInfo_Scene end textpos = [ [_INTL("{1}{2} {3}", indexText, " ", species_data.name), - 246, 42, 0, Color.new(248, 248, 248), Color.new(0, 0, 0)], - [_INTL("Height"), 314, 158, 0, base, shadow], - [_INTL("Weight"), 314, 190, 0, base, shadow] + 246, 36, 0, Color.new(248, 248, 248), Color.new(0, 0, 0)], + [_INTL("Height"), 314, 152, 0, base, shadow], + [_INTL("Weight"), 314, 184, 0, base, shadow] ] if $Trainer.owned?(@species) # Write the category - textpos.push([_INTL("{1} Pokémon", species_data.category), 246, 74, 0, base, shadow]) + textpos.push([_INTL("{1} Pokémon", species_data.category), 246, 68, 0, base, shadow]) # Write the height and weight height = species_data.height weight = species_data.weight if System.user_language[3..4] == "US" # If the user is in the United States inches = (height / 0.254).round pounds = (weight / 0.45359).round - textpos.push([_ISPRINTF("{1:d}'{2:02d}\"", inches / 12, inches % 12), 460, 158, 1, base, shadow]) - textpos.push([_ISPRINTF("{1:4.1f} lbs.", pounds / 10.0), 494, 190, 1, base, shadow]) + textpos.push([_ISPRINTF("{1:d}'{2:02d}\"", inches / 12, inches % 12), 460, 152, 1, base, shadow]) + textpos.push([_ISPRINTF("{1:4.1f} lbs.", pounds / 10.0), 494, 184, 1, base, shadow]) else - textpos.push([_ISPRINTF("{1:.1f} m", height / 10.0), 470, 158, 1, base, shadow]) - textpos.push([_ISPRINTF("{1:.1f} kg", weight / 10.0), 482, 190, 1, base, shadow]) + textpos.push([_ISPRINTF("{1:.1f} m", height / 10.0), 470, 152, 1, base, shadow]) + textpos.push([_ISPRINTF("{1:.1f} kg", weight / 10.0), 482, 184, 1, base, shadow]) end # Draw the Pokédex entry text drawTextEx(overlay, 40, 240, Graphics.width - (40 * 2), 4, # overlay, x, y, width, num lines @@ -261,14 +261,14 @@ class PokemonPokedexInfo_Scene overlay.blt(396, 120, @typebitmap.bitmap, type2rect) if type1 != type2 else # Write the category - textpos.push([_INTL("????? Pokémon"), 246, 74, 0, base, shadow]) + textpos.push([_INTL("????? Pokémon"), 246, 68, 0, base, shadow]) # Write the height and weight if System.user_language[3..4] == "US" # If the user is in the United States - textpos.push([_INTL("???'??\""), 460, 158, 1, base, shadow]) - textpos.push([_INTL("????.? lbs."), 494, 190, 1, base, shadow]) + textpos.push([_INTL("???'??\""), 460, 152, 1, base, shadow]) + textpos.push([_INTL("????.? lbs."), 494, 184, 1, base, shadow]) else - textpos.push([_INTL("????.? m"), 470, 158, 1, base, shadow]) - textpos.push([_INTL("????.? kg"), 482, 190, 1, base, shadow]) + textpos.push([_INTL("????.? m"), 470, 152, 1, base, shadow]) + textpos.push([_INTL("????.? kg"), 482, 184, 1, base, shadow]) end end # Draw all text @@ -354,11 +354,11 @@ class PokemonPokedexInfo_Scene pbDrawImagePositions(overlay,[ [sprintf("Graphics/Pictures/Pokedex/overlay_areanone"),108,188] ]) - textpos.push([_INTL("Area unknown"),Graphics.width/2,Graphics.height/2,2,base,shadow]) + textpos.push([_INTL("Area unknown"),Graphics.width/2,Graphics.height/2 - 6,2,base,shadow]) end - textpos.push([pbGetMessage(MessageTypes::RegionNames,@region),414,44,2,base,shadow]) + textpos.push([pbGetMessage(MessageTypes::RegionNames,@region),414,38,2,base,shadow]) textpos.push([_INTL("{1}'s area",GameData::Species.get(@species).name), - Graphics.width/2,352,2,base,shadow]) + Graphics.width/2,346,2,base,shadow]) pbDrawTextPositions(overlay,textpos) end @@ -375,8 +375,8 @@ class PokemonPokedexInfo_Scene end end textpos = [ - [GameData::Species.get(@species).name,Graphics.width/2,Graphics.height-88,2,base,shadow], - [formname,Graphics.width/2,Graphics.height-56,2,base,shadow], + [GameData::Species.get(@species).name,Graphics.width/2,Graphics.height-94,2,base,shadow], + [formname,Graphics.width/2,Graphics.height-62,2,base,shadow], ] # Draw all text pbDrawTextPositions(overlay,textpos) diff --git a/Data/Scripts/017_UI/005_PScreen_Party.rb b/Data/Scripts/017_UI/005_PScreen_Party.rb index 539ed285c..8d7a60f95 100644 --- a/Data/Scripts/017_UI/005_PScreen_Party.rb +++ b/Data/Scripts/017_UI/005_PScreen_Party.rb @@ -20,7 +20,7 @@ class PokemonPartyConfirmCancelSprite < SpriteWrapper @overlaysprite.z = self.z+1 pbSetSystemFont(@overlaysprite.bitmap) @yoffset = 8 - textpos = [[text,56,(narrowbox) ? 2 : 8,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) self.x = x self.y = y @@ -126,7 +126,7 @@ class Window_CommandPokemonColor < Window_CommandPokemon base = Color.new(0,80,160) shadow = Color.new(128,192,240) end - pbDrawShadowText(self.contents,rect.x,rect.y + 6,rect.width,rect.height, + pbDrawShadowText(self.contents,rect.x,rect.y,rect.width,rect.height, @commands[index],base,shadow) end end @@ -357,11 +357,11 @@ class PokemonPartyPanel < SpriteWrapper pbSetSystemFont(@overlaysprite.bitmap) textpos = [] # Draw Pokémon name - textpos.push([@pokemon.name,96,16,0,basecolor,shadowcolor]) + textpos.push([@pokemon.name,96,10,0,basecolor,shadowcolor]) if !@pokemon.egg? if !@text || @text.length==0 # Draw HP numbers - textpos.push([sprintf("% 3d /% 3d",@pokemon.hp,@pokemon.totalhp),224,60,1,basecolor,shadowcolor]) + textpos.push([sprintf("% 3d /% 3d",@pokemon.hp,@pokemon.totalhp),224,54,1,basecolor,shadowcolor]) # Draw HP bar if @pokemon.hp>0 w = @pokemon.hp*96*1.0/@pokemon.totalhp @@ -390,9 +390,9 @@ class PokemonPartyPanel < SpriteWrapper end # Draw gender symbol if @pokemon.male? - textpos.push([_INTL("♂"),224,16,0,Color.new(0,112,248),Color.new(120,184,232)]) + textpos.push([_INTL("♂"),224,10,0,Color.new(0,112,248),Color.new(120,184,232)]) elsif @pokemon.female? - textpos.push([_INTL("♀"),224,16,0,Color.new(232,32,16),Color.new(248,168,184)]) + textpos.push([_INTL("♀"),224,10,0,Color.new(232,32,16),Color.new(248,168,184)]) end # Draw shiny icon if @pokemon.shiny? @@ -407,14 +407,14 @@ class PokemonPartyPanel < SpriteWrapper "Graphics/Pictures/Party/overlay_lv",20,70,0,0,22,14]]) pbSetSmallFont(@overlaysprite.bitmap) pbDrawTextPositions(@overlaysprite.bitmap,[ - [@pokemon.level.to_s,42,63,0,basecolor,shadowcolor] + [@pokemon.level.to_s,42,57,0,basecolor,shadowcolor] ]) end # Draw annotation text if @text && @text.length>0 pbSetSystemFont(@overlaysprite.bitmap) pbDrawTextPositions(@overlaysprite.bitmap,[ - [@text,96,58,0,basecolor,shadowcolor] + [@text,96,52,0,basecolor,shadowcolor] ]) end end diff --git a/Data/Scripts/017_UI/006_PScreen_Summary.rb b/Data/Scripts/017_UI/006_PScreen_Summary.rb index af344b40b..982c41c43 100644 --- a/Data/Scripts/017_UI/006_PScreen_Summary.rb +++ b/Data/Scripts/017_UI/006_PScreen_Summary.rb @@ -338,22 +338,22 @@ class PokemonSummary_Scene _INTL("MOVES"), _INTL("RIBBONS")][page-1] textpos = [ - [pagename,26,16,0,base,shadow], - [@pokemon.name,46,62,0,base,shadow], - [@pokemon.level.to_s,46,92,0,Color.new(64,64,64),Color.new(176,176,176)], - [_INTL("Item"),66,318,0,base,shadow] + [pagename,26,10,0,base,shadow], + [@pokemon.name,46,56,0,base,shadow], + [@pokemon.level.to_s,46,86,0,Color.new(64,64,64),Color.new(176,176,176)], + [_INTL("Item"),66,312,0,base,shadow] ] # Write the held item's name if @pokemon.hasItem? - textpos.push([@pokemon.item.name,16,352,0,Color.new(64,64,64),Color.new(176,176,176)]) + textpos.push([@pokemon.item.name,16,346,0,Color.new(64,64,64),Color.new(176,176,176)]) else - textpos.push([_INTL("None"),16,352,0,Color.new(192,200,208),Color.new(208,216,224)]) + textpos.push([_INTL("None"),16,346,0,Color.new(192,200,208),Color.new(208,216,224)]) end # Write the gender symbol if @pokemon.male? - textpos.push([_INTL("♂"),178,62,0,Color.new(24,112,216),Color.new(136,168,208)]) + textpos.push([_INTL("♂"),178,56,0,Color.new(24,112,216),Color.new(136,168,208)]) elsif @pokemon.female? - textpos.push([_INTL("♀"),178,62,0,Color.new(248,56,32),Color.new(224,152,144)]) + textpos.push([_INTL("♀"),178,56,0,Color.new(248,56,32),Color.new(224,152,144)]) end # Draw all text pbDrawTextPositions(overlay,textpos) @@ -386,12 +386,12 @@ class PokemonSummary_Scene end # Write various bits of text textpos = [ - [_INTL("Dex No."),238,80,0,base,shadow], - [_INTL("Species"),238,112,0,base,shadow], - [@pokemon.speciesName,435,112,2,Color.new(64,64,64),Color.new(176,176,176)], - [_INTL("Type"),238,144,0,base,shadow], - [_INTL("OT"),238,176,0,base,shadow], - [_INTL("ID No."),238,208,0,base,shadow], + [_INTL("Dex No."),238,74,0,base,shadow], + [_INTL("Species"),238,106,0,base,shadow], + [@pokemon.speciesName,435,106,2,Color.new(64,64,64),Color.new(176,176,176)], + [_INTL("Type"),238,138,0,base,shadow], + [_INTL("OT"),238,170,0,base,shadow], + [_INTL("ID No."),238,202,0,base,shadow], ] # Write the Regional/National Dex number dexnum = GameData::Species.get(@pokemon.species).id_number @@ -410,15 +410,15 @@ class PokemonSummary_Scene end end if dexnum<=0 - textpos.push(["???",435,80,2,dexNumBase,dexNumShadow]) + textpos.push(["???",435,74,2,dexNumBase,dexNumShadow]) else dexnum -= 1 if dexnumshift - textpos.push([sprintf("%03d",dexnum),435,80,2,dexNumBase,dexNumShadow]) + textpos.push([sprintf("%03d",dexnum),435,74,2,dexNumBase,dexNumShadow]) end # Write Original Trainer's name and ID number if @pokemon.owner.name.empty? - textpos.push([_INTL("RENTAL"),435,176,2,Color.new(64,64,64),Color.new(176,176,176)]) - textpos.push(["?????",435,208,2,Color.new(64,64,64),Color.new(176,176,176)]) + textpos.push([_INTL("RENTAL"),435,170,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)]) else ownerbase = Color.new(64,64,64) ownershadow = Color.new(176,176,176) @@ -430,12 +430,12 @@ class PokemonSummary_Scene ownerbase = Color.new(248, 56, 32) ownershadow = Color.new(224, 152, 144) end - textpos.push([@pokemon.owner.name,435,176,2,ownerbase,ownershadow]) - textpos.push([sprintf("%05d",@pokemon.owner.public_id),435,208,2,Color.new(64,64,64),Color.new(176,176,176)]) + textpos.push([@pokemon.owner.name,435,170,2,ownerbase,ownershadow]) + textpos.push([sprintf("%05d",@pokemon.owner.public_id),435,202,2,Color.new(64,64,64),Color.new(176,176,176)]) end # Write Exp text OR heart gauge message (if a Shadow Pokémon) if @pokemon.shadowPokemon? - textpos.push([_INTL("Heart Gauge"),238,240,0,base,shadow]) + textpos.push([_INTL("Heart Gauge"),238,234,0,base,shadow]) 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 nearly open."), @@ -446,10 +446,10 @@ class PokemonSummary_Scene drawFormattedTextEx(overlay,234,304,264,memo) else endexp = @pokemon.growth_rate.minimum_exp_for_level(@pokemon.level + 1) - textpos.push([_INTL("Exp. Points"),238,240,0,base,shadow]) - textpos.push([@pokemon.exp.to_s_formatted,488,272,1,Color.new(64,64,64),Color.new(176,176,176)]) - textpos.push([_INTL("To Next Lv."),238,304,0,base,shadow]) - textpos.push([(endexp-@pokemon.exp).to_s_formatted,488,336,1,Color.new(64,64,64),Color.new(176,176,176)]) + textpos.push([_INTL("Exp. Points"),238,234,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([_INTL("To Next Lv."),238,298,0,base,shadow]) + textpos.push([(endexp-@pokemon.exp).to_s_formatted,488,330,1,Color.new(64,64,64),Color.new(176,176,176)]) end # Draw all text pbDrawTextPositions(overlay,textpos) @@ -493,15 +493,15 @@ class PokemonSummary_Scene pbDrawImagePositions(overlay,imagepos) # Write various bits of text textpos = [ - [_INTL("TRAINER MEMO"),26,16,0,base,shadow], - [@pokemon.name,46,62,0,base,shadow], - [_INTL("Item"),66,318,0,base,shadow] + [_INTL("TRAINER MEMO"),26,10,0,base,shadow], + [@pokemon.name,46,56,0,base,shadow], + [_INTL("Item"),66,312,0,base,shadow] ] # Write the held item's name if @pokemon.hasItem? - textpos.push([@pokemon.item.name,16,352,0,Color.new(64,64,64),Color.new(176,176,176)]) + textpos.push([@pokemon.item.name,16,346,0,Color.new(64,64,64),Color.new(176,176,176)]) else - textpos.push([_INTL("None"),16,352,0,Color.new(192,200,208),Color.new(208,216,224)]) + textpos.push([_INTL("None"),16,346,0,Color.new(192,200,208),Color.new(208,216,224)]) end # Draw all text pbDrawTextPositions(overlay,textpos) @@ -530,7 +530,7 @@ class PokemonSummary_Scene eggstate = _INTL("Sounds can be heard coming from inside! It will hatch soon!") if @pokemon.steps_to_hatch < 1275 memo += sprintf("%s\n",eggstate) # Draw all text - drawFormattedTextEx(overlay,232,78,268,memo) + drawFormattedTextEx(overlay,232,82,268,memo) # Draw the Pokémon's markings drawMarkings(overlay,84,292) end @@ -627,7 +627,7 @@ class PokemonSummary_Scene memo += sprintf("%s\n", characteristics[best_stat][best_iv % 5]) end # Write all text - drawFormattedTextEx(overlay,232,78,268,memo) + drawFormattedTextEx(overlay,232,82,268,memo) end def drawPageThree @@ -645,24 +645,24 @@ class PokemonSummary_Scene end # Write various bits of text textpos = [ - [_INTL("HP"),292,76,2,base,statshadows[:HP]], - [sprintf("%d/%d",@pokemon.hp,@pokemon.totalhp),462,76,1,Color.new(64,64,64),Color.new(176,176,176)], - [_INTL("Attack"),248,120,0,base,statshadows[:ATTACK]], - [sprintf("%d",@pokemon.attack),456,120,1,Color.new(64,64,64),Color.new(176,176,176)], - [_INTL("Defense"),248,152,0,base,statshadows[:DEFENSE]], - [sprintf("%d",@pokemon.defense),456,152,1,Color.new(64,64,64),Color.new(176,176,176)], - [_INTL("Sp. Atk"),248,184,0,base,statshadows[:SPECIAL_ATTACK]], - [sprintf("%d",@pokemon.spatk),456,184,1,Color.new(64,64,64),Color.new(176,176,176)], - [_INTL("Sp. Def"),248,216,0,base,statshadows[:SPECIAL_DEFENSE]], - [sprintf("%d",@pokemon.spdef),456,216,1,Color.new(64,64,64),Color.new(176,176,176)], - [_INTL("Speed"),248,248,0,base,statshadows[:SPEED]], - [sprintf("%d",@pokemon.speed),456,248,1,Color.new(64,64,64),Color.new(176,176,176)], - [_INTL("Ability"),224,284,0,base,shadow] + [_INTL("HP"),292,70,2,base,statshadows[:HP]], + [sprintf("%d/%d",@pokemon.hp,@pokemon.totalhp),462,70,1,Color.new(64,64,64),Color.new(176,176,176)], + [_INTL("Attack"),248,114,0,base,statshadows[:ATTACK]], + [sprintf("%d",@pokemon.attack),456,114,1,Color.new(64,64,64),Color.new(176,176,176)], + [_INTL("Defense"),248,146,0,base,statshadows[:DEFENSE]], + [sprintf("%d",@pokemon.defense),456,146,1,Color.new(64,64,64),Color.new(176,176,176)], + [_INTL("Sp. Atk"),248,178,0,base,statshadows[:SPECIAL_ATTACK]], + [sprintf("%d",@pokemon.spatk),456,178,1,Color.new(64,64,64),Color.new(176,176,176)], + [_INTL("Sp. Def"),248,210,0,base,statshadows[:SPECIAL_DEFENSE]], + [sprintf("%d",@pokemon.spdef),456,210,1,Color.new(64,64,64),Color.new(176,176,176)], + [_INTL("Speed"),248,242,0,base,statshadows[:SPEED]], + [sprintf("%d",@pokemon.speed),456,242,1,Color.new(64,64,64),Color.new(176,176,176)], + [_INTL("Ability"),224,278,0,base,shadow] ] # Draw ability name and description ability = @pokemon.ability if ability - textpos.push([ability.name,362,284,0,Color.new(64,64,64),Color.new(176,176,176)]) + textpos.push([ability.name,362,278,0,Color.new(64,64,64),Color.new(176,176,176)]) drawTextEx(overlay,224,316,282,2,ability.description,Color.new(64,64,64),Color.new(176,176,176)) end # Draw all text @@ -700,12 +700,12 @@ class PokemonSummary_Scene textpos = [] imagepos = [] # Write move names, types and PP amounts for each known move - yPos = 98 + yPos = 92 for i in 0...Pokemon::MAX_MOVES move=@pokemon.moves[i] if move type_number = GameData::Type.get(move.type).id_number - imagepos.push(["Graphics/Pictures/types", 248, yPos + 2, 0, type_number * 28, 64, 28]) + imagepos.push(["Graphics/Pictures/types", 248, yPos + 8, 0, type_number * 28, 64, 28]) textpos.push([move.name,316,yPos,0,moveBase,moveShadow]) if move.total_pp>0 textpos.push([_INTL("PP"),342,yPos+32,0,moveBase,moveShadow]) @@ -750,14 +750,14 @@ class PokemonSummary_Scene end # Write various bits of text textpos = [ - [_INTL("MOVES"),26,16,0,base,shadow], - [_INTL("CATEGORY"),20,122,0,base,shadow], - [_INTL("POWER"),20,154,0,base,shadow], - [_INTL("ACCURACY"),20,186,0,base,shadow] + [_INTL("MOVES"),26,10,0,base,shadow], + [_INTL("CATEGORY"),20,116,0,base,shadow], + [_INTL("POWER"),20,148,0,base,shadow], + [_INTL("ACCURACY"),20,180,0,base,shadow] ] imagepos = [] # Write move names, types and PP amounts for each known move - yPos = 98 + yPos = 92 yPos -= 76 if move_to_learn limit = (move_to_learn) ? Pokemon::MAX_MOVES + 1 : Pokemon::MAX_MOVES for i in 0...limit @@ -768,7 +768,7 @@ class PokemonSummary_Scene end if move type_number = GameData::Type.get(move.type).id_number - imagepos.push(["Graphics/Pictures/types", 248, yPos + 2, 0, type_number * 28, 64, 28]) + imagepos.push(["Graphics/Pictures/types", 248, yPos + 8, 0, type_number * 28, 64, 28]) textpos.push([move.name,316,yPos,0,moveBase,moveShadow]) if move.total_pp>0 textpos.push([_INTL("PP"),342,yPos+32,0,moveBase,moveShadow]) @@ -815,14 +815,14 @@ class PokemonSummary_Scene textpos = [] # Write power and accuracy values for selected move case selected_move.base_damage - when 0 then textpos.push(["---", 216, 154, 1, base, shadow]) # Status move - when 1 then textpos.push(["???", 216, 154, 1, base, shadow]) # Variable power move - else textpos.push([selected_move.base_damage.to_s, 216, 154, 1, base, shadow]) + when 0 then textpos.push(["---", 216, 148, 1, base, shadow]) # Status move + when 1 then textpos.push(["???", 216, 148, 1, base, shadow]) # Variable power move + else textpos.push([selected_move.base_damage.to_s, 216, 148, 1, base, shadow]) end if selected_move.accuracy == 0 - textpos.push(["---", 216, 186, 1, base, shadow]) + textpos.push(["---", 216, 180, 1, base, shadow]) else - textpos.push(["#{selected_move.accuracy}%", 216 + overlay.text_size("%").width, 186, 1, base, shadow]) + textpos.push(["#{selected_move.accuracy}%", 216 + overlay.text_size("%").width, 180, 1, base, shadow]) end # Draw all text pbDrawTextPositions(overlay, textpos) @@ -839,8 +839,8 @@ class PokemonSummary_Scene @sprites["downarrow"].visible = false # Write various bits of text textpos = [ - [_INTL("No. of Ribbons:"),234,332,0,Color.new(64,64,64),Color.new(176,176,176)], - [@pokemon.numRibbons.to_s,450,332,1,Color.new(64,64,64),Color.new(176,176,176)], + [_INTL("No. of Ribbons:"),234,326,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)], ] # Draw all text pbDrawTextPositions(overlay,textpos) @@ -879,7 +879,7 @@ class PokemonSummary_Scene pbDrawImagePositions(overlay,imagepos) # Draw name of selected ribbon textpos = [ - [name,18,286,0,nameBase,nameShadow] + [name,18,280,0,nameBase,nameShadow] ] pbDrawTextPositions(overlay,textpos) # Draw selected ribbon's description @@ -1089,9 +1089,9 @@ class PokemonSummary_Scene @sprites["markingoverlay"].bitmap.blt(300+58*(i%3),154+50*(i/3),@markingbitmap.bitmap,markrect) end textpos = [ - [_INTL("Mark {1}",pokemon.name),366,96,2,base,shadow], - [_INTL("OK"),366,248,2,base,shadow], - [_INTL("Cancel"),366,298,2,base,shadow] + [_INTL("Mark {1}",pokemon.name),366,90,2,base,shadow], + [_INTL("OK"),366,242,2,base,shadow], + [_INTL("Cancel"),366,292,2,base,shadow] ] pbDrawTextPositions(@sprites["markingoverlay"].bitmap,textpos) redraw = false diff --git a/Data/Scripts/017_UI/007_PScreen_Bag.rb b/Data/Scripts/017_UI/007_PScreen_Bag.rb index 37c3a0875..f4ef2d9c9 100644 --- a/Data/Scripts/017_UI/007_PScreen_Bag.rb +++ b/Data/Scripts/017_UI/007_PScreen_Bag.rb @@ -64,10 +64,9 @@ class Window_PokemonBag < Window_DrawableCommand def drawItem(index,_count,rect) textpos = [] rect = Rect.new(rect.x+16,rect.y+16,rect.width-16,rect.height) - ypos = rect.y+4 thispocket = @bag.pockets[@pocket] if index==self.itemCount-1 - textpos.push([_INTL("CLOSE BAG"),rect.x,ypos,false,self.baseColor,self.shadowColor]) + textpos.push([_INTL("CLOSE BAG"),rect.x,rect.y-2,false,self.baseColor,self.shadowColor]) else item = (@filterlist) ? thispocket[@filterlist[@pocket][index]][0] : thispocket[index][0] baseColor = self.baseColor @@ -77,23 +76,23 @@ class Window_PokemonBag < Window_DrawableCommand shadowColor = Color.new(248,144,144) end textpos.push( - [@adapter.getDisplayName(item),rect.x,ypos,false,baseColor,shadowColor] + [@adapter.getDisplayName(item),rect.x,rect.y-2,false,baseColor,shadowColor] ) if GameData::Item.get(item).is_important? if @bag.pbIsRegistered?(item) pbDrawImagePositions(self.contents,[ - ["Graphics/Pictures/Bag/icon_register",rect.x+rect.width-72,ypos+4,0,0,-1,24] + ["Graphics/Pictures/Bag/icon_register",rect.x+rect.width-72,rect.y+8,0,0,-1,24] ]) elsif pbCanRegisterItem?(item) pbDrawImagePositions(self.contents,[ - ["Graphics/Pictures/Bag/icon_register",rect.x+rect.width-72,ypos+4,0,24,-1,24] + ["Graphics/Pictures/Bag/icon_register",rect.x+rect.width-72,rect.y+8,0,24,-1,24] ]) end else qty = (@filterlist) ? thispocket[@filterlist[@pocket][index]][1] : thispocket[index][1] qtytext = _ISPRINTF("x{1: 3d}",qty) xQty = rect.x+rect.width-self.contents.text_size(qtytext).width-16 - textpos.push([qtytext,xQty,ypos,false,baseColor,shadowColor]) + textpos.push([qtytext,xQty,rect.y-2,false,baseColor,shadowColor]) end end pbDrawTextPositions(self.contents,textpos) @@ -282,7 +281,7 @@ class PokemonBag_Scene overlay.clear # Draw the pocket name pbDrawTextPositions(overlay,[ - [PokemonBag.pocketNames[@bag.lastpocket],94,180,2,POCKETNAMEBASECOLOR,POCKETNAMESHADOWCOLOR] + [PokemonBag.pocketNames[@bag.lastpocket],94,176,2,POCKETNAMEBASECOLOR,POCKETNAMESHADOWCOLOR] ]) # Draw slider arrows showslider = false diff --git a/Data/Scripts/017_UI/008_PScreen_Pokegear.rb b/Data/Scripts/017_UI/008_PScreen_Pokegear.rb index 2188258a0..248671f94 100644 --- a/Data/Scripts/017_UI/008_PScreen_Pokegear.rb +++ b/Data/Scripts/017_UI/008_PScreen_Pokegear.rb @@ -42,7 +42,7 @@ class PokegearButton < SpriteWrapper rect.y = @button.height/2 if @selected self.bitmap.blt(0,0,@button.bitmap,rect) textpos = [ - [@name,self.bitmap.width/2,10,2,Color.new(248,248,248),Color.new(40,40,40)], + [@name,self.bitmap.width/2,4,2,Color.new(248,248,248),Color.new(40,40,40)], ] pbDrawTextPositions(self.bitmap,textpos) imagepos = [ diff --git a/Data/Scripts/017_UI/009_PScreen_RegionMap.rb b/Data/Scripts/017_UI/009_PScreen_RegionMap.rb index 0aed94f7b..73182f33a 100644 --- a/Data/Scripts/017_UI/009_PScreen_RegionMap.rb +++ b/Data/Scripts/017_UI/009_PScreen_RegionMap.rb @@ -47,9 +47,9 @@ class MapBottomSprite < SpriteWrapper def refresh self.bitmap.clear textpos = [ - [@mapname,18,-2,0,Color.new(248,248,248),Color.new(0,0,0)], - [@maplocation,18,354,0,Color.new(248,248,248),Color.new(0,0,0)], - [@mapdetails,Graphics.width-16,354,1,Color.new(248,248,248),Color.new(0,0,0)] + [@mapname,18,-8,0,Color.new(248,248,248),Color.new(0,0,0)], + [@maplocation,18,348,0,Color.new(248,248,248),Color.new(0,0,0)], + [@mapdetails,Graphics.width-16,348,1,Color.new(248,248,248),Color.new(0,0,0)] ] pbDrawTextPositions(self.bitmap,textpos) end diff --git a/Data/Scripts/017_UI/012_PScreen_TrainerCard.rb b/Data/Scripts/017_UI/012_PScreen_TrainerCard.rb index 504760e3c..a208432bc 100644 --- a/Data/Scripts/017_UI/012_PScreen_TrainerCard.rb +++ b/Data/Scripts/017_UI/012_PScreen_TrainerCard.rb @@ -49,18 +49,18 @@ class PokemonTrainerCard_Scene $PokemonGlobal.startTime.day, $PokemonGlobal.startTime.year) textPositions = [ - [_INTL("Name"),34,64,0,baseColor,shadowColor], - [$Trainer.name,302,64,1,baseColor,shadowColor], - [_INTL("ID No."),332,64,0,baseColor,shadowColor], - [sprintf("%05d",$Trainer.public_ID),468,64,1,baseColor,shadowColor], - [_INTL("Money"),34,112,0,baseColor,shadowColor], - [_INTL("${1}",$Trainer.money.to_s_formatted),302,112,1,baseColor,shadowColor], - [_INTL("Pokédex"),34,160,0,baseColor,shadowColor], - [sprintf("%d/%d",$Trainer.owned_count,$Trainer.seen_count),302,160,1,baseColor,shadowColor], - [_INTL("Time"),34,208,0,baseColor,shadowColor], - [time,302,208,1,baseColor,shadowColor], - [_INTL("Started"),34,256,0,baseColor,shadowColor], - [starttime,302,256,1,baseColor,shadowColor] + [_INTL("Name"),34,58,0,baseColor,shadowColor], + [$Trainer.name,302,58,1,baseColor,shadowColor], + [_INTL("ID No."),332,58,0,baseColor,shadowColor], + [sprintf("%05d",$Trainer.public_ID),468,58,1,baseColor,shadowColor], + [_INTL("Money"),34,106,0,baseColor,shadowColor], + [_INTL("${1}",$Trainer.money.to_s_formatted),302,106,1,baseColor,shadowColor], + [_INTL("Pokédex"),34,154,0,baseColor,shadowColor], + [sprintf("%d/%d",$Trainer.owned_count,$Trainer.seen_count),302,154,1,baseColor,shadowColor], + [_INTL("Time"),34,202,0,baseColor,shadowColor], + [time,302,202,1,baseColor,shadowColor], + [_INTL("Started"),34,250,0,baseColor,shadowColor], + [starttime,302,250,1,baseColor,shadowColor] ] pbDrawTextPositions(overlay,textPositions) x = 72 diff --git a/Data/Scripts/017_UI/013_PScreen_Load.rb b/Data/Scripts/017_UI/013_PScreen_Load.rb index 1dc90748a..085cdbac5 100644 --- a/Data/Scripts/017_UI/013_PScreen_Load.rb +++ b/Data/Scripts/017_UI/013_PScreen_Load.rb @@ -62,31 +62,31 @@ class PokemonLoadPanel < SpriteWrapper end textpos = [] if @isContinue - textpos.push([@title,16*2,5*2,0,TEXTCOLOR,TEXTSHADOWCOLOR]) - textpos.push([_INTL("Badges:"),16*2,56*2,0,TEXTCOLOR,TEXTSHADOWCOLOR]) - textpos.push([@trainer.badge_count.to_s,103*2,56*2,1,TEXTCOLOR,TEXTSHADOWCOLOR]) - textpos.push([_INTL("Pokédex:"),16*2,72*2,0,TEXTCOLOR,TEXTSHADOWCOLOR]) - textpos.push([@trainer.seen_count.to_s,103*2,72*2,1,TEXTCOLOR,TEXTSHADOWCOLOR]) - textpos.push([_INTL("Time:"),16*2,88*2,0,TEXTCOLOR,TEXTSHADOWCOLOR]) + textpos.push([@title,16*2,2*2,0,TEXTCOLOR,TEXTSHADOWCOLOR]) + textpos.push([_INTL("Badges:"),16*2,53*2,0,TEXTCOLOR,TEXTSHADOWCOLOR]) + textpos.push([@trainer.badge_count.to_s,103*2,53*2,1,TEXTCOLOR,TEXTSHADOWCOLOR]) + textpos.push([_INTL("Pokédex:"),16*2,69*2,0,TEXTCOLOR,TEXTSHADOWCOLOR]) + textpos.push([@trainer.seen_count.to_s,103*2,69*2,1,TEXTCOLOR,TEXTSHADOWCOLOR]) + textpos.push([_INTL("Time:"),16*2,85*2,0,TEXTCOLOR,TEXTSHADOWCOLOR]) hour = @totalsec / 60 / 60 min = @totalsec / 60 % 60 if hour>0 - textpos.push([_INTL("{1}h {2}m",hour,min),103*2,88*2,1,TEXTCOLOR,TEXTSHADOWCOLOR]) + textpos.push([_INTL("{1}h {2}m",hour,min),103*2,85*2,1,TEXTCOLOR,TEXTSHADOWCOLOR]) else - textpos.push([_INTL("{1}m",min),103*2,88*2,1,TEXTCOLOR,TEXTSHADOWCOLOR]) + textpos.push([_INTL("{1}m",min),103*2,85*2,1,TEXTCOLOR,TEXTSHADOWCOLOR]) end if @trainer.male? - textpos.push([@trainer.name,56*2,32*2,0,MALETEXTCOLOR,MALETEXTSHADOWCOLOR]) + textpos.push([@trainer.name,56*2,29*2,0,MALETEXTCOLOR,MALETEXTSHADOWCOLOR]) elsif @trainer.female? - textpos.push([@trainer.name,56*2,32*2,0,FEMALETEXTCOLOR,FEMALETEXTSHADOWCOLOR]) + textpos.push([@trainer.name,56*2,29*2,0,FEMALETEXTCOLOR,FEMALETEXTSHADOWCOLOR]) else - textpos.push([@trainer.name,56*2,32*2,0,TEXTCOLOR,TEXTSHADOWCOLOR]) + textpos.push([@trainer.name,56*2,29*2,0,TEXTCOLOR,TEXTSHADOWCOLOR]) end mapname = pbGetMapNameFromId(@mapid) mapname.gsub!(/\\PN/,@trainer.name) - textpos.push([mapname,193*2,5*2,1,TEXTCOLOR,TEXTSHADOWCOLOR]) + textpos.push([mapname,193*2,2*2,1,TEXTCOLOR,TEXTSHADOWCOLOR]) else - textpos.push([@title,16*2,4*2,0,TEXTCOLOR,TEXTSHADOWCOLOR]) + textpos.push([@title,16*2,1*2,0,TEXTCOLOR,TEXTSHADOWCOLOR]) end pbDrawTextPositions(self.bitmap,textpos) end diff --git a/Data/Scripts/017_UI/015_PScreen_Options.rb b/Data/Scripts/017_UI/015_PScreen_Options.rb index 8c543eaeb..c40c7ddd0 100644 --- a/Data/Scripts/017_UI/015_PScreen_Options.rb +++ b/Data/Scripts/017_UI/015_PScreen_Options.rb @@ -208,8 +208,7 @@ class Window_PokemonOption < Window_DrawableCommand rect = drawCursor(index,rect) optionname = (index==@options.length) ? _INTL("Cancel") : @options[index].name optionwidth = rect.width*9/20 - text_y = rect.y + 6 - pbDrawShadowText(self.contents,rect.x,text_y,optionwidth,rect.height,optionname, + pbDrawShadowText(self.contents,rect.x,rect.y,optionwidth,rect.height,optionname, @nameBaseColor,@nameShadowColor) return if index==@options.length if @options[index].is_a?(EnumOption) @@ -223,7 +222,7 @@ class Window_PokemonOption < Window_DrawableCommand xpos = optionwidth+rect.x ivalue = 0 for value in @options[index].values - pbDrawShadowText(self.contents,xpos,text_y,optionwidth,rect.height,value, + pbDrawShadowText(self.contents,xpos,rect.y,optionwidth,rect.height,value, (ivalue==self[index]) ? @selBaseColor : self.baseColor, (ivalue==self[index]) ? @selShadowColor : self.shadowColor ) @@ -232,14 +231,14 @@ class Window_PokemonOption < Window_DrawableCommand ivalue += 1 end else - pbDrawShadowText(self.contents,rect.x+optionwidth,text_y,optionwidth,rect.height, + pbDrawShadowText(self.contents,rect.x+optionwidth,rect.y,optionwidth,rect.height, optionname,self.baseColor,self.shadowColor) end elsif @options[index].is_a?(NumberOption) value = _INTL("Type {1}/{2}",@options[index].optstart+self[index], @options[index].optend-@options[index].optstart+1) xpos = optionwidth+rect.x - pbDrawShadowText(self.contents,xpos,text_y,optionwidth,rect.height,value, + pbDrawShadowText(self.contents,xpos,rect.y,optionwidth,rect.height,value, @selBaseColor,@selShadowColor) elsif @options[index].is_a?(SliderOption) value = sprintf(" %d",@options[index].optend) @@ -253,12 +252,12 @@ class Window_PokemonOption < Window_DrawableCommand 8,16,@selBaseColor) value = sprintf("%d",@options[index].optstart+self[index]) xpos += optionwidth-self.contents.text_size(value).width - pbDrawShadowText(self.contents,xpos,text_y,optionwidth,rect.height,value, + pbDrawShadowText(self.contents,xpos,rect.y,optionwidth,rect.height,value, @selBaseColor,@selShadowColor) else value = @options[index].values[self[index]] xpos = optionwidth+rect.x - pbDrawShadowText(self.contents,xpos,text_y,optionwidth,rect.height,value, + pbDrawShadowText(self.contents,xpos,rect.y,optionwidth,rect.height,value, @selBaseColor,@selShadowColor) end end diff --git a/Data/Scripts/017_UI/016_PScreen_ReadyMenu.rb b/Data/Scripts/017_UI/016_PScreen_ReadyMenu.rb index cf9a74a8c..4edfdc436 100644 --- a/Data/Scripts/017_UI/016_PScreen_ReadyMenu.rb +++ b/Data/Scripts/017_UI/016_PScreen_ReadyMenu.rb @@ -71,16 +71,16 @@ class ReadyMenuButton < SpriteWrapper self.bitmap.blt(0,0,@button.bitmap,rect) textx = (@command[2]) ? 164 : (GameData::Item.get(@command[0]).is_important?) ? 146 : 124 textpos = [ - [@command[1],textx,18,2,Color.new(248,248,248),Color.new(40,40,40),1], + [@command[1],textx,16,2,Color.new(248,248,248),Color.new(40,40,40),1], ] if !@command[2] if !GameData::Item.get(@command[0]).is_important? qty = $PokemonBag.pbQuantity(@command[0]) if qty>99 - textpos.push([_INTL(">99"),230,18,1, + textpos.push([_INTL(">99"),230,16,1, Color.new(248,248,248),Color.new(40,40,40),1]) else - textpos.push([_INTL("x{1}",qty),230,18,1, + textpos.push([_INTL("x{1}",qty),230,16,1, Color.new(248,248,248),Color.new(40,40,40),1]) end end diff --git a/Data/Scripts/017_UI/017_PScreen_PokemonStorage.rb b/Data/Scripts/017_UI/017_PScreen_PokemonStorage.rb index addec65c8..81f5314d3 100644 --- a/Data/Scripts/017_UI/017_PScreen_PokemonStorage.rb +++ b/Data/Scripts/017_UI/017_PScreen_PokemonStorage.rb @@ -409,7 +409,7 @@ class PokemonBoxSprite < SpriteWrapper pbSetSystemFont(@contents) widthval = @contents.text_size(boxname).width xval = 162-(widthval/2) - pbDrawShadowText(@contents,xval,8 + 6,widthval,32, + pbDrawShadowText(@contents,xval,8,widthval,32, boxname,Color.new(248,248,248),Color.new(40,48,48)) @refreshBox = false end @@ -1316,8 +1316,8 @@ class PokemonStorageScene @sprites["markingoverlay"].bitmap.blt(336+58*(i%3),106+50*(i/3),@markingbitmap.bitmap,markrect) end textpos = [ - [_INTL("OK"),402,210,2,base,shadow,1], - [_INTL("Cancel"),402,274,2,base,shadow,1] + [_INTL("OK"),402,208,2,base,shadow,1], + [_INTL("Cancel"),402,272,2,base,shadow,1] ] pbDrawTextPositions(@sprites["markingoverlay"].bitmap,textpos) pbMarkingSetArrow(@sprites["arrow"],index) @@ -1412,26 +1412,26 @@ class PokemonStorageScene nonshadow = Color.new(224,224,224) pokename = pokemon.name textstrings = [ - [pokename,10,8,false,base,shadow] + [pokename,10,2,false,base,shadow] ] if !pokemon.egg? imagepos = [] if pokemon.male? - textstrings.push([_INTL("♂"),148,8,false,Color.new(24,112,216),Color.new(136,168,208)]) + textstrings.push([_INTL("♂"),148,2,false,Color.new(24,112,216),Color.new(136,168,208)]) elsif pokemon.female? - textstrings.push([_INTL("♀"),148,8,false,Color.new(248,56,32),Color.new(224,152,144)]) + textstrings.push([_INTL("♀"),148,2,false,Color.new(248,56,32),Color.new(224,152,144)]) end imagepos.push(["Graphics/Pictures/Storage/overlay_lv",6,246]) - textstrings.push([pokemon.level.to_s,28,234,false,base,shadow]) + textstrings.push([pokemon.level.to_s,28,228,false,base,shadow]) if pokemon.ability - textstrings.push([pokemon.ability.name,86,306,2,base,shadow]) + textstrings.push([pokemon.ability.name,86,300,2,base,shadow]) else - textstrings.push([_INTL("No ability"),86,306,2,nonbase,nonshadow]) + textstrings.push([_INTL("No ability"),86,300,2,nonbase,nonshadow]) end if pokemon.item - textstrings.push([pokemon.item.name,86,342,2,base,shadow]) + textstrings.push([pokemon.item.name,86,336,2,base,shadow]) else - textstrings.push([_INTL("No item"),86,342,2,nonbase,nonshadow]) + textstrings.push([_INTL("No item"),86,336,2,nonbase,nonshadow]) end if pokemon.shiny? imagepos.push(["Graphics/Pictures/shiny",156,198]) diff --git a/Data/Scripts/017_UI/018_PScreen_ItemStorage.rb b/Data/Scripts/017_UI/018_PScreen_ItemStorage.rb index 3792efad2..f61490a6c 100644 --- a/Data/Scripts/017_UI/018_PScreen_ItemStorage.rb +++ b/Data/Scripts/017_UI/018_PScreen_ItemStorage.rb @@ -30,20 +30,19 @@ class Window_PokemonItemStorage < Window_DrawableCommand def drawItem(index,_count,rect) rect = drawCursor(index,rect) - ypos = rect.y textpos = [] if index==@bag.length - textpos.push([_INTL("CANCEL"),rect.x,ypos,false,self.baseColor,self.shadowColor]) + textpos.push([_INTL("CANCEL"),rect.x,rect.y-6,false,self.baseColor,self.shadowColor]) else item = @bag[index][0] itemname = @adapter.getDisplayName(item) baseColor = (index==@sortIndex) ? Color.new(248,24,24) : self.baseColor - textpos.push([itemname,rect.x,ypos,false,self.baseColor,self.shadowColor]) + textpos.push([itemname,rect.x,rect.y-6,false,self.baseColor,self.shadowColor]) if !GameData::Item.get(item).is_important? # Not a Key item or HM (or infinite TM) qty = _ISPRINTF("x{1: 2d}",@bag[index][1]) sizeQty = self.contents.text_size(qty).width xQty = rect.x+rect.width-sizeQty-2 - textpos.push([qty,xQty,ypos,false,baseColor,self.shadowColor]) + textpos.push([qty,xQty,rect.y-6,false,baseColor,self.shadowColor]) end end pbDrawTextPositions(self.contents,textpos) @@ -283,50 +282,50 @@ module UIHelper helpwindow.letterbyletter = false curnumber = initnum ret = 0 - using(numwindow = Window_UnformattedTextPokemon.new("x000")) { - numwindow.viewport = helpwindow.viewport - numwindow.letterbyletter = false - numwindow.text = _ISPRINTF("x{1:03d}",curnumber) - numwindow.resizeToFit(numwindow.text,Graphics.width) - pbBottomRight(numwindow) - helpwindow.resizeHeightToFit(helpwindow.text,Graphics.width-numwindow.width) - pbBottomLeft(helpwindow) - loop do - Graphics.update - Input.update - numwindow.update - (block_given?) ? yield : helpwindow.update - if Input.trigger?(Input::BACK) - ret = 0 - pbPlayCancelSE - break - elsif Input.trigger?(Input::USE) - ret = curnumber - pbPlayDecisionSE - break - elsif Input.repeat?(Input::UP) - curnumber += 1 - curnumber = 1 if curnumber>maximum - numwindow.text = _ISPRINTF("x{1:03d}",curnumber) - pbPlayCursorSE - elsif Input.repeat?(Input::DOWN) - curnumber -= 1 - curnumber = maximum if curnumber<1 - numwindow.text = _ISPRINTF("x{1:03d}",curnumber) - pbPlayCursorSE - elsif Input.repeat?(Input::LEFT) - curnumber -= 10 - curnumber = 1 if curnumber<1 - numwindow.text = _ISPRINTF("x{1:03d}",curnumber) - pbPlayCursorSE - elsif Input.repeat?(Input::RIGHT) - curnumber += 10 - curnumber = maximum if curnumber>maximum - numwindow.text = _ISPRINTF("x{1:03d}",curnumber) - pbPlayCursorSE - end + numwindow = Window_UnformattedTextPokemon.new("x000") + numwindow.viewport = helpwindow.viewport + numwindow.letterbyletter = false + numwindow.text = _ISPRINTF("x{1:03d}",curnumber) + numwindow.resizeToFit(numwindow.text,Graphics.width) + pbBottomRight(numwindow) + helpwindow.resizeHeightToFit(helpwindow.text,Graphics.width-numwindow.width) + pbBottomLeft(helpwindow) + loop do + Graphics.update + Input.update + numwindow.update + helpwindow.update + if Input.trigger?(Input::BACK) + ret = 0 + pbPlayCancelSE + break + elsif Input.trigger?(Input::USE) + ret = curnumber + pbPlayDecisionSE + break + elsif Input.repeat?(Input::UP) + curnumber += 1 + curnumber = 1 if curnumber>maximum + numwindow.text = _ISPRINTF("x{1:03d}",curnumber) + pbPlayCursorSE + elsif Input.repeat?(Input::DOWN) + curnumber -= 1 + curnumber = maximum if curnumber<1 + numwindow.text = _ISPRINTF("x{1:03d}",curnumber) + pbPlayCursorSE + elsif Input.repeat?(Input::LEFT) + curnumber -= 10 + curnumber = 1 if curnumber<1 + numwindow.text = _ISPRINTF("x{1:03d}",curnumber) + pbPlayCursorSE + elsif Input.repeat?(Input::RIGHT) + curnumber += 10 + curnumber = maximum if curnumber>maximum + numwindow.text = _ISPRINTF("x{1:03d}",curnumber) + pbPlayCursorSE end - } + end + numwindow.dispose helpwindow.visible = oldvisible return ret end diff --git a/Data/Scripts/017_UI/023_PScreen_MoveRelearner.rb b/Data/Scripts/017_UI/023_PScreen_MoveRelearner.rb index 1a4deff04..be99bee47 100644 --- a/Data/Scripts/017_UI/023_PScreen_MoveRelearner.rb +++ b/Data/Scripts/017_UI/023_PScreen_MoveRelearner.rb @@ -63,16 +63,16 @@ class MoveRelearner_Scene overlay.blt(436,70,@typebitmap.bitmap,type2rect) end textpos=[ - [_INTL("Teach which move?"),16,8,0,Color.new(88,88,80),Color.new(168,184,184)] + [_INTL("Teach which move?"),16,2,0,Color.new(88,88,80),Color.new(168,184,184)] ] imagepos=[] - yPos=82 + yPos=76 for i in 0...VISIBLEMOVES moveobject=@moves[@sprites["commands"].top_item+i] if moveobject moveData=GameData::Move.get(moveobject) type_number = GameData::Type.get(moveData.type).id_number - imagepos.push(["Graphics/Pictures/types", 12, yPos + 2, 0, type_number * 28, 64, 28]) + imagepos.push(["Graphics/Pictures/types", 12, yPos + 8, 0, type_number * 28, 64, 28]) textpos.push([moveData.name,80,yPos,0,Color.new(248,248,248),Color.new(0,0,0)]) if moveData.total_pp>0 textpos.push([_INTL("PP"),112,yPos+32,0,Color.new(64,64,64),Color.new(176,176,176)]) @@ -92,13 +92,13 @@ class MoveRelearner_Scene basedamage=selMoveData.base_damage category=selMoveData.category accuracy=selMoveData.accuracy - textpos.push([_INTL("CATEGORY"),272,114,0,Color.new(248,248,248),Color.new(0,0,0)]) - textpos.push([_INTL("POWER"),272,146,0,Color.new(248,248,248),Color.new(0,0,0)]) + textpos.push([_INTL("CATEGORY"),272,108,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([basedamage<=1 ? basedamage==1 ? "???" : "---" : sprintf("%d",basedamage), - 468,146,2,Color.new(64,64,64),Color.new(176,176,176)]) - textpos.push([_INTL("ACCURACY"),272,178,0,Color.new(248,248,248),Color.new(0,0,0)]) + 468,140,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([accuracy==0 ? "---" : "#{accuracy}%", - 468,178,2,Color.new(64,64,64),Color.new(176,176,176)]) + 468,172,2,Color.new(64,64,64),Color.new(176,176,176)]) pbDrawTextPositions(overlay,textpos) imagepos.push(["Graphics/Pictures/category",436,116,0,category*28,64,28]) if @sprites["commands"].index<@moves.length-1 @@ -127,7 +127,7 @@ class MoveRelearner_Scene pbDrawMoveList end if Input.trigger?(Input::BACK) - return 0 + return nil elsif Input.trigger?(Input::USE) return @moves[@sprites["commands"].index] end diff --git a/Data/Scripts/017_UI/024_PScreen_PurifyChamber.rb b/Data/Scripts/017_UI/024_PScreen_PurifyChamber.rb index 1ced75cb9..668654dba 100644 --- a/Data/Scripts/017_UI/024_PScreen_PurifyChamber.rb +++ b/Data/Scripts/017_UI/024_PScreen_PurifyChamber.rb @@ -643,10 +643,10 @@ class Window_PurifyChamberSets < Window_DrawableCommand rect=drawCursor(index,rect) if index==@switching 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 textpos.push([(index+1).to_s,rect.x, - rect.y,false,self.baseColor,self.shadowColor]) + rect.y-6,false,self.baseColor,self.shadowColor]) end if @chamber.setCount(index)>0 pbDrawGauge(self.contents,Rect.new(rect.x+16,rect.y+6,48,8), @@ -934,14 +934,14 @@ class PurifyChamberSetView < SpriteWrapper textpos=[] if pkmn if pkmn.type1==pkmn.type2 - textpos.push([_INTL("{1} Lv.{2} {3}",pkmn.name,pkmn.level,GameData::Type.get(pkmn.type1).name),2,0,0, + textpos.push([_INTL("{1} Lv.{2} {3}",pkmn.name,pkmn.level,GameData::Type.get(pkmn.type1).name),2,-6,0, Color.new(248,248,248),Color.new(128,128,128)]) else textpos.push([_INTL("{1} Lv.{2} {3}/{4}",pkmn.name,pkmn.level,GameData::Type.get(pkmn.type1).name, - GameData::Type.get(pkmn.type2).name),2,0,0, + GameData::Type.get(pkmn.type2).name),2,-6,0, Color.new(248,248,248),Color.new(128,128,128)]) end - textpos.push([_INTL("FLOW"),2+@info.bitmap.width/2,24,0, + textpos.push([_INTL("FLOW"),2+@info.bitmap.width/2,18,0, Color.new(248,248,248),Color.new(128,128,128)]) # draw heart gauge pbDrawGauge(@info.bitmap, Rect.new(@info.bitmap.width*3/4,8,@info.bitmap.width*1/4,8), @@ -951,7 +951,7 @@ class PurifyChamberSetView < SpriteWrapper Color.new(0,0,248),@chamber.chamberFlow(@set),6) end if @chamber.setCount(@set)>0 - textpos.push([_INTL("TEMPO"),2,24,0, + textpos.push([_INTL("TEMPO"),2,18,0, Color.new(248,248,248),Color.new(128,128,128)]) # draw tempo gauge pbDrawGauge(@info.bitmap,Rect.new(@info.bitmap.width*1/4,24+8,@info.bitmap.width*1/4,8), diff --git a/Data/Scripts/017_UI/025_PScreen_Mart.rb b/Data/Scripts/017_UI/025_PScreen_Mart.rb index 02badde39..1384371e9 100644 --- a/Data/Scripts/017_UI/025_PScreen_Mart.rb +++ b/Data/Scripts/017_UI/025_PScreen_Mart.rb @@ -154,15 +154,15 @@ class Window_PokemonMart < Window_DrawableCommand rect = drawCursor(index, rect) ypos = rect.y if index == count-1 - textpos.push([_INTL("CANCEL"), rect.x, ypos + 2, false, self.baseColor, self.shadowColor]) + textpos.push([_INTL("CANCEL"), rect.x, ypos - 4, false, self.baseColor, self.shadowColor]) else item = @stock[index] itemname = @adapter.getDisplayName(item) qty = @adapter.getDisplayPrice(item) sizeQty = self.contents.text_size(qty).width xQty = rect.x + rect.width - sizeQty - 2 - 16 - textpos.push([itemname, rect.x, ypos + 2, false, self.baseColor, self.shadowColor]) - textpos.push([qty, xQty, ypos + 2, false, self.baseColor, self.shadowColor]) + textpos.push([itemname, rect.x, ypos - 4, false, self.baseColor, self.shadowColor]) + textpos.push([qty, xQty, ypos - 4, false, self.baseColor, self.shadowColor]) end pbDrawTextPositions(self.contents, textpos) end diff --git a/Data/Scripts/017_UI/027_PScreen_HallOfFame.rb b/Data/Scripts/017_UI/027_PScreen_HallOfFame.rb index ea6fc3ce2..2b0e225b2 100644 --- a/Data/Scripts/017_UI/027_PScreen_HallOfFame.rb +++ b/Data/Scripts/017_UI/027_PScreen_HallOfFame.rb @@ -309,16 +309,16 @@ class HallOfFame_Scene dexnumber = _ISPRINTF("No. {1:03d}",species_data.id_number) end textPositions=[ - [dexnumber,32,Graphics.height-80,0,BASECOLOR,SHADOWCOLOR], - [pokename,Graphics.width-192,Graphics.height-80,2,BASECOLOR,SHADOWCOLOR], + [dexnumber,32,Graphics.height-86,0,BASECOLOR,SHADOWCOLOR], + [pokename,Graphics.width-192,Graphics.height-86,2,BASECOLOR,SHADOWCOLOR], [_INTL("Lv. {1}",pokemon.egg? ? "?" : pokemon.level), - 64,Graphics.height-48,0,BASECOLOR,SHADOWCOLOR], + 64,Graphics.height-54,0,BASECOLOR,SHADOWCOLOR], [_INTL("IDNo.{1}",pokemon.egg? ? "?????" : idno), - Graphics.width-192,Graphics.height-48,2,BASECOLOR,SHADOWCOLOR] + Graphics.width-192,Graphics.height-54,2,BASECOLOR,SHADOWCOLOR] ] if (hallNumber>-1) - textPositions.push([_INTL("Hall of Fame No."),Graphics.width/2-104,0,0,BASECOLOR,SHADOWCOLOR]) - textPositions.push([hallNumber.to_s,Graphics.width/2+104,0,1,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]) end pbDrawTextPositions(overlay,textPositions) end @@ -327,7 +327,7 @@ class HallOfFame_Scene overlay=@sprites["overlay"].bitmap overlay.clear pbDrawTextPositions(overlay,[[_INTL("Welcome to the Hall of Fame!"), - Graphics.width/2,Graphics.height-80,2,BASECOLOR,SHADOWCOLOR]]) + Graphics.width/2,Graphics.height-80,-4,BASECOLOR,SHADOWCOLOR]]) end def pbAnimationLoop diff --git a/Data/Scripts/018_Minigames/002_PMinigame_TripleTriad.rb b/Data/Scripts/018_Minigames/002_PMinigame_TripleTriad.rb index 40f361a04..81073b646 100644 --- a/Data/Scripts/018_Minigames/002_PMinigame_TripleTriad.rb +++ b/Data/Scripts/018_Minigames/002_PMinigame_TripleTriad.rb @@ -192,8 +192,8 @@ class TriadScene @sprites["overlay"].bitmap = BitmapWrapper.new(Graphics.width,Graphics.height) pbSetSystemFont(@sprites["overlay"].bitmap) pbDrawTextPositions(@sprites["overlay"].bitmap,[ - [@battle.opponentName,52,4,2,Color.new(248,248,248),Color.new(96,96,96)], - [@battle.playerName,Graphics.width-52,4,2,Color.new(248,248,248),Color.new(96,96,96)] + [@battle.opponentName,52,-2,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)] ]) @sprites["score"] = Sprite.new(@viewport) @sprites["score"].bitmap = BitmapWrapper.new(Graphics.width,Graphics.height) @@ -567,7 +567,7 @@ class TriadScene oppscore += @opponentCardIndexes.length end pbDrawTextPositions(bitmap,[ - [_INTL("{1}-{2}",oppscore,playerscore),Graphics.width/2,4,2,Color.new(248,248,248),Color.new(96,96,96)] + [_INTL("{1}-{2}",oppscore,playerscore),Graphics.width/2,-2,2,Color.new(248,248,248),Color.new(96,96,96)] ]) end @@ -1052,7 +1052,7 @@ def pbBuyTriads GameData::Species.each do |s| next if s.form != 0 next if !$Trainer.owned?(s.species) - price = TriadCard.new(i).price + price = TriadCard.new(s.id).price commands.push([price, s.name, _INTL("{1} - ${2}", s.name, price.to_s_formatted), s.id]) end if commands.length == 0 diff --git a/Data/Scripts/021_Debug/001_Debug menus/003_Debug_MenuExtraCode.rb b/Data/Scripts/021_Debug/001_Debug menus/003_Debug_MenuExtraCode.rb index 171a9a699..52eb8291b 100644 --- a/Data/Scripts/021_Debug/001_Debug menus/003_Debug_MenuExtraCode.rb +++ b/Data/Scripts/021_Debug/001_Debug menus/003_Debug_MenuExtraCode.rb @@ -105,10 +105,9 @@ class SpriteWindow_DebugVariables < Window_DrawableCommand idWidth = totalWidth*15/100 nameWidth = totalWidth*65/100 statusWidth = totalWidth*20/100 - text_y = rect.y + 6 - self.shadowtext(rect.x,text_y,idWidth,rect.height,id_text) - self.shadowtext(rect.x+idWidth,text_y,nameWidth,rect.height,name,0,(codeswitch) ? 1 : 0) - self.shadowtext(rect.x+idWidth+nameWidth,text_y,statusWidth,rect.height,status,1,colors) + self.shadowtext(rect.x,rect.y,idWidth,rect.height,id_text) + self.shadowtext(rect.x+idWidth,rect.y,nameWidth,rect.height,name,0,(codeswitch) ? 1 : 0) + self.shadowtext(rect.x+idWidth+nameWidth,rect.y,statusWidth,rect.height,status,1,colors) end end @@ -234,11 +233,11 @@ def pbDebugDayCare sprites["overlay"].bitmap.clear textpos = [] for i in 0...2 - textpos.push([_INTL("Pokémon {1}",i+1),Graphics.width/4+i*Graphics.width/2,8,2,base,shadow]) + textpos.push([_INTL("Pokémon {1}",i+1),Graphics.width/4+i*Graphics.width/2,2,2,base,shadow]) end for i in 0...pbDayCareDeposited next if !$PokemonGlobal.daycare[i][0] - y = 40 + y = 34 pkmn = $PokemonGlobal.daycare[i][0] initlevel = $PokemonGlobal.daycare[i][1] leveldiff = pkmn.level-initlevel @@ -270,12 +269,12 @@ def pbDebugDayCare textpos.push(["Cost: $#{cost}",8+i*Graphics.width/2,y,0,base,shadow]) end if pbEggGenerated? - textpos.push(["Egg waiting for collection",Graphics.width/2,216,2,Color.new(248,248,0),shadow]) + textpos.push(["Egg waiting for collection",Graphics.width/2,210,2,Color.new(248,248,0),shadow]) elsif pbDayCareDeposited==2 if pbDayCareGetCompat==0 - textpos.push(["Pokémon cannot breed",Graphics.width/2,216,2,Color.new(248,96,96),shadow]) + textpos.push(["Pokémon cannot breed",Graphics.width/2,210,2,Color.new(248,96,96),shadow]) else - textpos.push(["Pokémon can breed",Graphics.width/2,216,2,Color.new(64,248,64),shadow]) + textpos.push(["Pokémon can breed",Graphics.width/2,210,2,Color.new(64,248,64),shadow]) end end pbDrawTextPositions(sprites["overlay"].bitmap,textpos) @@ -397,13 +396,12 @@ class SpriteWindow_DebugRoamers < Window_DrawableCommand rect = drawCursor(index,rect) nameWidth = rect.width*50/100 statusWidth = rect.width*50/100 - text_y = rect.y + 6 if index==self.itemCount-2 # Advance roaming - self.shadowtext(_INTL("[All roam to new locations]"),rect.x,text_y,nameWidth,rect.height) + self.shadowtext(_INTL("[All roam to new locations]"),rect.x,rect.y,nameWidth,rect.height) elsif index==self.itemCount-1 # Advance roaming - self.shadowtext(_INTL("[Clear all current roamer locations]"),rect.x,text_y,nameWidth,rect.height) + self.shadowtext(_INTL("[Clear all current roamer locations]"),rect.x,rect.y,nameWidth,rect.height) else pkmn = Settings::ROAMING_SPECIES[index] name = GameData::Species.get(pkmn[0]).name + " (Lv. #{pkmn[1]})" @@ -432,8 +430,8 @@ class SpriteWindow_DebugRoamers < Window_DrawableCommand else status = "[NOT ROAMING][Switch #{pkmn[2]} is off]" end - self.shadowtext(name,rect.x,text_y,nameWidth,rect.height) - self.shadowtext(status,rect.x+nameWidth,text_y,statusWidth,rect.height,1,statuscolor) + self.shadowtext(name,rect.x,rect.y,nameWidth,rect.height) + self.shadowtext(status,rect.x+nameWidth,rect.y,statusWidth,rect.height,1,statuscolor) end end end @@ -528,92 +526,6 @@ end -#=============================================================================== -# -#=============================================================================== -class PokemonDataCopy - attr_accessor :dataOldHash - attr_accessor :dataNewHash - attr_accessor :dataTime - attr_accessor :data - - def crc32(x) - return Zlib::crc32(x) - end - - def readfile(filename) - File.open(filename, "rb") { |f| f.read } - end - - def writefile(str,filename) - File.open(filename, "wb") { |f| f.write(str) } - end - - def filetime(filename) - File.open(filename, "r") { |f| f.mtime } - end - - def initialize(data,datasave) - @datafile = data - @datasave = datasave - @data = readfile(@datafile) - @dataOldHash = crc32(@data) - @dataTime = filetime(@datafile) - end - - def changed? - ts = readfile(@datafile) - tsDate = filetime(@datafile) - tsHash = crc32(ts) - return (tsHash!=@dataNewHash && tsHash!=@dataOldHash && tsDate>@dataTime) - end - - def save(newtilesets) - newdata = Marshal.dump(newtilesets) - if !changed? - @data = newdata - @dataNewHash = crc32(newdata) - writefile(newdata,@datafile) - else - @dataOldHash = crc32(@data) - @dataNewHash = crc32(newdata) - @dataTime = filetime(@datafile) - @data = newdata - writefile(newdata,@datafile) - end - save_data(self,@datasave) - end -end - - - -class PokemonDataWrapper - attr_reader :data - - def initialize(file,savefile,prompt) - @savefile = savefile - @file = file - if pbRgssExists?(@savefile) - @ts = load_data(@savefile) - if !@ts.changed? || prompt.call==true - @data = Marshal.load(StringInput.new(@ts.data)) - else - @ts = PokemonDataCopy.new(@file,@savefile) - @data = load_data(@file) - end - else - @ts = PokemonDataCopy.new(@file,@savefile) - @data = load_data(@file) - end - end - - def save - @ts.save(@data) - end -end - - - #=============================================================================== # Text import/export for localisation #=============================================================================== diff --git a/Data/Scripts/021_Debug/002_Animation editor/002_AnimEditor_ControlsButtons.rb b/Data/Scripts/021_Debug/002_Animation editor/002_AnimEditor_ControlsButtons.rb index f90e755b7..88d32fe2b 100644 --- a/Data/Scripts/021_Debug/002_Animation editor/002_AnimEditor_ControlsButtons.rb +++ b/Data/Scripts/021_Debug/002_Animation editor/002_AnimEditor_ControlsButtons.rb @@ -6,7 +6,7 @@ module ShadowText elsif align==1 x+=(w/2)-(width/2) end - pbDrawShadowText(bitmap,x,y+6,w,h,t, + pbDrawShadowText(bitmap,x,y,w,h,t, disabled ? Color.new(26*8,26*8,25*8) : Color.new(12*8,12*8,12*8), Color.new(26*8,26*8,25*8)) end diff --git a/Data/Scripts/021_Debug/010_Editor_TilesetTerrainTags.rb b/Data/Scripts/021_Debug/010_Editor_TilesetTerrainTags.rb index 96571f5a0..8e609f3b5 100644 --- a/Data/Scripts/021_Debug/010_Editor_TilesetTerrainTags.rb +++ b/Data/Scripts/021_Debug/010_Editor_TilesetTerrainTags.rb @@ -1,17 +1,3 @@ -#=============================================================================== -# -#=============================================================================== -def pbTilesetWrapper - return PokemonDataWrapper.new( - "Data/Tilesets.rxdata", - "Data/TilesetsTemp.rxdata", - Proc.new{ - pbMessage(_INTL("The editor has detected that the tileset data was recently edited in RPG Maker XP.")) - next !pbConfirmMessage(_INTL("Do you want to load those recent edits?")) - } - ) -end - #=============================================================================== # Edits the terrain tags of tiles in tilesets. #=============================================================================== @@ -28,8 +14,8 @@ class PokemonTilesetScene def initialize @viewport = Viewport.new(0, 0, Graphics.width, Graphics.height) @viewport.z = 99999 - @tilesetwrapper = pbTilesetWrapper - @tileset = @tilesetwrapper.data[1] + @tilesets_data = load_data("Data/Tilesets.rxdata") + @tileset = @tilesets_data[1] @tilehelper = TileDrawingHelper.fromTileset(@tileset) @sprites = {} @sprites["title"] = Window_UnformattedTextPokemon.newWithSize(_INTL("Tileset Editor\r\nPgUp/PgDn: SCROLL\r\nZ: MENU"), @@ -65,7 +51,7 @@ class PokemonTilesetScene @tilehelper.bltTile(@sprites["overlay"].bitmap, xx * TILE_SIZE, yy * TILE_SIZE, xx * TILES_PER_AUTOTILE) end terr = (ypos < TILESET_START_ID) ? @tileset.terrain_tags[xx * TILES_PER_AUTOTILE] : @tileset.terrain_tags[ypos + xx] - textpos.push(["#{terr}", xx * TILE_SIZE + TILE_SIZE / 2, yy * TILE_SIZE, 2, TEXT_COLOR, TEXT_SHADOW_COLOR]) + textpos.push(["#{terr}", xx * TILE_SIZE + TILE_SIZE / 2, yy * TILE_SIZE - 6, 2, TEXT_COLOR, TEXT_SHADOW_COLOR]) end end pbDrawTextPositions(@sprites["overlay"].bitmap, textpos) @@ -98,8 +84,8 @@ class PokemonTilesetScene terrain_tag_name = sprintf("%d: %s", terrain_tag, terrain_tag_name) end textpos = [ - [_INTL("Terrain Tag:"), tile_x + TILE_SIZE, tile_y + TILE_SIZE * 2 + 16, 2, Color.new(248, 248, 248), Color.new(40, 40, 40)], - [terrain_tag_name, tile_x + TILE_SIZE, tile_y + TILE_SIZE * 2 + 48, 2, Color.new(248, 248, 248), Color.new(40, 40, 40)] + [_INTL("Terrain Tag:"), tile_x + TILE_SIZE, tile_y + TILE_SIZE * 2 + 10, 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)] ] # Draw all text pbDrawTextPositions(overlay, textpos) @@ -107,12 +93,12 @@ class PokemonTilesetScene def pbChooseTileset commands = [] - for i in 1...@tilesetwrapper.data.length - commands.push(sprintf("%03d %s", i, @tilesetwrapper.data[i].name)) + for i in 1...@tilesets_data.length + commands.push(sprintf("%03d %s", i, @tilesets_data[i].name)) end ret = pbShowCommands(nil, commands, -1) if ret >= 0 - @tileset = @tilesetwrapper.data[ret + 1] + @tileset = @tilesets_data[ret + 1] @tilehelper.dispose @tilehelper = TileDrawingHelper.fromTileset(@tileset) @sprites["tileset"].setBitmap("Graphics/Tilesets/#{@tileset.tileset_name}") @@ -193,8 +179,8 @@ class PokemonTilesetScene end elsif Input.trigger?(Input::BACK) if pbConfirmMessage(_INTL("Save changes?")) - @tilesetwrapper.save - $data_tilesets = @tilesetwrapper.data + save_data("Data/Tilesets.rxdata", @tilesets_data) + $data_tilesets = @tilesets_data if $game_map && $MapFactory $MapFactory.setup($game_map.map_id) $game_player.center($game_player.x, $game_player.y)