Added battle debug menu (access with F9)

This commit is contained in:
Maruno17
2021-12-05 20:24:20 +00:00
parent 3650a078e7
commit 95916e242e
7 changed files with 1776 additions and 4 deletions

View File

@@ -132,6 +132,16 @@ class Battle::Scene
@sprites["dataBox_#{idxBattler}"].refresh if @sprites["dataBox_#{idxBattler}"]
end
def pbRefreshEverything
pbCreateBackdropSprites
@battle.battlers.each_with_index do |battler, i|
next if !battler
pbChangePokemon(i, @sprites["pokemon_#{i}"].pkmn)
@sprites["dataBox_#{i}"].initializeDataBoxGraphic(@battle.pbSideSize(i))
@sprites["dataBox_#{i}"].refresh
end
end
#=============================================================================
# Party lineup
#=============================================================================
@@ -305,7 +315,7 @@ class Battle::Scene
# Sprites
#=============================================================================
def pbAddSprite(id,x,y,filename,viewport)
sprite = IconSprite.new(x,y,viewport)
sprite = @sprites[id] || IconSprite.new(x,y,viewport)
if filename
sprite.setBitmap(filename) rescue nil
end

View File

@@ -52,7 +52,8 @@ class Battle::Scene::PokemonDataBox < SpriteWrapper
bgFilename = ["Graphics/Pictures/Battle/databox_thin",
"Graphics/Pictures/Battle/databox_thin_foe"][@battler.index%2]
end
@databoxBitmap = AnimatedBitmap.new(bgFilename)
@databoxBitmap.dispose if @databoxBitmap
@databoxBitmap = AnimatedBitmap.new(bgFilename)
# Determine the co-ordinates of the data box and the left edge padding width
if onPlayerSide
@spriteX = Graphics.width - 244