From aaf5949c13973c4594b770a7f2282f29efa89d1b Mon Sep 17 00:00:00 2001 From: Maruno17 Date: Wed, 9 Sep 2020 23:03:27 +0100 Subject: [PATCH] Removed unnecessary text drawing in Options screen, misc tweaks --- .../003_SpriteWindow.rb | 22 +++++++++---------- Data/Scripts/010_Scenes/005_Scene_Credits.rb | 2 +- .../005_PokeBattle_SceneMenus.rb | 10 +++++---- Data/Scripts/017_UI/015_PScreen_Options.rb | 3 --- Data/Scripts/022_Compiler/001_Compiler.rb | 8 +++---- 5 files changed, 22 insertions(+), 23 deletions(-) diff --git a/Data/Scripts/009_Objects and windows/003_SpriteWindow.rb b/Data/Scripts/009_Objects and windows/003_SpriteWindow.rb index 18e7924bb..abbac5add 100644 --- a/Data/Scripts/009_Objects and windows/003_SpriteWindow.rb +++ b/Data/Scripts/009_Objects and windows/003_SpriteWindow.rb @@ -384,27 +384,27 @@ end # Sets a bitmap's font to the system font. def pbSetSystemFont(bitmap) - fontname=MessageConfig.pbGetSystemFontName - bitmap.font.name=fontname - if fontname=="Pokemon FireLeaf" || fontname=="Power Red and Green" - bitmap.font.size=29 - elsif fontname=="Pokemon Emerald Small" || fontname=="Power Green Small" - bitmap.font.size=25 + fontname = MessageConfig.pbGetSystemFontName + bitmap.font.name = fontname + if fontname == "Pokemon FireLeaf" || fontname == "Power Red and Green" + bitmap.font.size = 29 + elsif fontname == "Pokemon Emerald Small" || fontname == "Power Green Small" + bitmap.font.size = 25 else - bitmap.font.size=31 + bitmap.font.size = 31 end end # Sets a bitmap's font to the system small font. def pbSetSmallFont(bitmap) - bitmap.font.name=pbSmallFontName - bitmap.font.size=25 + bitmap.font.name = pbSmallFontName + bitmap.font.size = 25 end # Sets a bitmap's font to the system narrow font. def pbSetNarrowFont(bitmap) - bitmap.font.name=pbNarrowFontName - bitmap.font.size=31 + bitmap.font.name = pbNarrowFontName + bitmap.font.size = 31 end #=============================================================================== diff --git a/Data/Scripts/010_Scenes/005_Scene_Credits.rb b/Data/Scripts/010_Scenes/005_Scene_Credits.rb index 5b10e7bf4..24381d873 100644 --- a/Data/Scripts/010_Scenes/005_Scene_Credits.rb +++ b/Data/Scripts/010_Scenes/005_Scene_Credits.rb @@ -127,7 +127,7 @@ _END_ end plugin_credits << "\n" end - CREDIT.gsub!(/{INSERTS_PLUGIN_CREDITS_DO_NOT_REMOVE}/, plugin_credits) + CREDIT.gsub!(/\{INSERTS_PLUGIN_CREDITS_DO_NOT_REMOVE\}/, plugin_credits) credit_lines = CREDIT.split(/\n/) credit_bitmap = Bitmap.new(Graphics.width,32 * credit_lines.size) credit_lines.each_index do |i| 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 7615f0ba2..648581b1d 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 @@ -413,14 +413,16 @@ class FightMenuDisplay < BattleMenuBase def refreshMegaEvolutionButton return if !USE_GRAPHICS - @megaButton.src_rect.y = (@mode-1)*@megaEvoBitmap.height/2 - @megaButton.z = self.z - 1 + @megaButton.src_rect.y = (@mode - 1) * @megaEvoBitmap.height / 2 + @megaButton.z = self.z - 1 + @visibility["megaButton"] = (@mode > 0) end def refreshShiftButton return if !USE_GRAPHICS - @shiftButton.src_rect.y = (@shiftMode-1)*@shiftBitmap.height - @shiftButton.z = self.z - 1 + @shiftButton.src_rect.y = (@shiftMode - 1) * @shiftBitmap.height + @shiftButton.z = self.z - 1 + @visibility["shiftButton"] = (@shiftMode > 0) end def refresh diff --git a/Data/Scripts/017_UI/015_PScreen_Options.rb b/Data/Scripts/017_UI/015_PScreen_Options.rb index f32e6983b..5de10c5df 100644 --- a/Data/Scripts/017_UI/015_PScreen_Options.rb +++ b/Data/Scripts/017_UI/015_PScreen_Options.rb @@ -333,7 +333,6 @@ class Window_PokemonOption < Window_DrawableCommand optionwidth = rect.width*9/20 pbDrawShadowText(self.contents,rect.x,rect.y,optionwidth,rect.height,optionname, @nameBaseColor,@nameShadowColor) - self.contents.draw_text(rect.x,rect.y,optionwidth,rect.height,optionname) return if index==@options.length if @options[index].is_a?(EnumOption) if @options[index].values.length>1 @@ -350,7 +349,6 @@ class Window_PokemonOption < Window_DrawableCommand (ivalue==self[index]) ? @selBaseColor : self.baseColor, (ivalue==self[index]) ? @selShadowColor : self.shadowColor ) - self.contents.draw_text(xpos,rect.y,optionwidth,rect.height,value) xpos += self.contents.text_size(value).width xpos += spacing ivalue += 1 @@ -384,7 +382,6 @@ class Window_PokemonOption < Window_DrawableCommand xpos = optionwidth+rect.x pbDrawShadowText(self.contents,xpos,rect.y,optionwidth,rect.height,value, @selBaseColor,@selShadowColor) - self.contents.draw_text(xpos,rect.y,optionwidth,rect.height,value) end end diff --git a/Data/Scripts/022_Compiler/001_Compiler.rb b/Data/Scripts/022_Compiler/001_Compiler.rb index 4a15c203c..80a06c01d 100644 --- a/Data/Scripts/022_Compiler/001_Compiler.rb +++ b/Data/Scripts/022_Compiler/001_Compiler.rb @@ -1167,15 +1167,15 @@ def pbCompileAllData(mustCompile) yield(_INTL("Compiling shadow move data")) pbCompileShadowMoves yield(_INTL("Compiling messages")) + pbCompileAnimations + pbCompileTrainerEvents(mustCompile) + pbSetTextMessages + MessageTypes.saveMessages else if (!$INEDITOR || LANGUAGES.length<2) && safeExists?("Data/messages.dat") MessageTypes.loadMessageFile("Data/messages.dat") end end - pbCompileAnimations - pbCompileTrainerEvents(mustCompile) - pbSetTextMessages - MessageTypes.saveMessages if !$INEDITOR && LANGUAGES.length>=2 pbLoadMessages("Data/"+LANGUAGES[$PokemonSystem.language][1]) end