6.4 update (minus sprites)

This commit is contained in:
infinitefusion
2024-12-21 09:43:11 -05:00
parent f70c2cfde4
commit 1e325366d2
1717 changed files with 140299 additions and 27845 deletions

View File

@@ -51,22 +51,29 @@ class PokemonSprite < SpriteWrapper
end
def setPokemonBitmap(pokemon, back = false)
# Dispose of existing icon bitmap if it exists
@_iconbitmap.dispose if @_iconbitmap
@_iconbitmap = (pokemon) ? GameData::Species.sprite_bitmap_from_pokemon(pokemon, back) : nil
if @_iconbitmap
if pokemon.hat
add_hat_to_bitmap(@_iconbitmap.bitmap,pokemon.hat,pokemon.hat_x,pokemon.hat_y)
else
end
self.bitmap = @_iconbitmap.bitmap
@_iconbitmap = nil
return if !pokemon
base_bitmap = (pokemon) ? GameData::Species.sprite_bitmap_from_pokemon(pokemon, back) : nil
if pokemon.hat
new_bitmap = Bitmap.new(base_bitmap.width, base_bitmap.height)
new_bitmap.blt(0, 0, base_bitmap.bitmap, base_bitmap.bitmap.rect)
add_hat_to_bitmap(new_bitmap, pokemon.hat, pokemon.hat_x, pokemon.hat_y)
@_iconbitmap = SpriteWrapper.new
@_iconbitmap.bitmap = new_bitmap
else
@_iconbitmap.bitmap=nil
# No hat, just use the base bitmap
@_iconbitmap = base_bitmap
end
# Assign the bitmap to the sprite
self.bitmap = (@_iconbitmap) ? @_iconbitmap.bitmap : nil
self.color = Color.new(0, 0, 0, 0)
changeOrigin
end
def setPokemonBitmapFromId(id, back = false, shiny = false, bodyShiny = false, headShiny = false,spriteform_body=nil,spriteform_head=nil)
@_iconbitmap.dispose if @_iconbitmap
@_iconbitmap = GameData::Species.sprite_bitmap_from_pokemon_id(id, back, shiny, bodyShiny, headShiny)