Fixed crash in map rendering, fixed crash when resizing screen

This commit is contained in:
Maruno17
2021-01-17 21:49:05 +00:00
parent 9364a543e7
commit fec8d7adcd
2 changed files with 6 additions and 6 deletions

View File

@@ -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

View File

@@ -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")],