From fec8d7adcddf8f6e41b367a0b03f6ddc68dbcee6 Mon Sep 17 00:00:00 2001 From: Maruno17 Date: Sun, 17 Jan 2021 21:49:05 +0000 Subject: [PATCH] Fixed crash in map rendering, fixed crash when resizing screen --- Data/Scripts/005_Map renderer/001_Tilemap_XP.rb | 8 ++++---- Data/Scripts/017_UI/015_PScreen_Options.rb | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Data/Scripts/005_Map renderer/001_Tilemap_XP.rb b/Data/Scripts/005_Map renderer/001_Tilemap_XP.rb index 5f197cacf..185257a2e 100644 --- a/Data/Scripts/005_Map renderer/001_Tilemap_XP.rb +++ b/Data/Scripts/005_Map renderer/001_Tilemap_XP.rb @@ -804,13 +804,13 @@ class CustomTilemap xsize = @map_data.xsize ysize = @map_data.ysize minX = (@ox / @tileWidth) - 1 - minX.clamp(0, xsize - 1) + minX = minX.clamp(0, xsize - 1) maxX = ((@ox + @viewport.rect.width) / @tileWidth) + 1 - maxX.clamp(0, xsize - 1) + maxX = maxX.clamp(0, xsize - 1) minY = (@oy / @tileHeight) - 1 - minY.clamp(0, ysize - 1) + minY = minY.clamp(0, ysize - 1) maxY = ((@oy + @viewport.rect.height) / @tileHeight) + 1 - maxY.clamp(0, ysize - 1) + maxY = maxY.clamp(0, ysize - 1) count = 0 if minX < maxX && minY < maxY @usedsprites = usesprites || @usedsprites diff --git a/Data/Scripts/017_UI/015_PScreen_Options.rb b/Data/Scripts/017_UI/015_PScreen_Options.rb index 5de10c5df..a8f64c98b 100644 --- a/Data/Scripts/017_UI/015_PScreen_Options.rb +++ b/Data/Scripts/017_UI/015_PScreen_Options.rb @@ -486,14 +486,14 @@ class PokemonOption_Scene proc { $PokemonSystem.textskin }, proc { |value| $PokemonSystem.textskin = value - MessageConfig.pbSetSpeechFrame("Graphics/Windowskins/"+$SpeechFrames[value]) + MessageConfig.pbSetSpeechFrame("Graphics/Windowskins/" + $SpeechFrames[value]) } ), NumberOption.new(_INTL("Menu Frame"),1,$TextFrames.length, proc { $PokemonSystem.frame }, proc { |value| $PokemonSystem.frame = value - MessageConfig.pbSetSystemFrame($TextFrames[value]) + MessageConfig.pbSetSystemFrame("Graphics/Windowskins/" + $TextFrames[value]) } ), EnumOption.new(_INTL("Font Style"),[_INTL("Em"),_INTL("R/S"),_INTL("FRLG"),_INTL("DP")],