# Note: Returns an AnimatedBitmap, not a Bitmap
def pbLoadPokemonBitmapSpecies(pokemon,species,back=false)
ret = nil
if pokemon.egg?
[COLOR="red"]bitmapFileName = sprintf("Graphics/Battlers/Eggs/%segg_%d",getConstantName(PBSpecies,species),pokemon.form) rescue nil
if !pbResolveBitmap(bitmapFileName)
bitmapFileName = sprintf("Graphics/Battlers/Eggs/%03degg_%d",species,pokemon.form)
if !pbResolveBitmap(bitmapFileName)
bitmapFileName = sprintf("Graphics/Battlers/Eggs/%segg",getConstantName(PBSpecies,species)) rescue nil
if !pbResolveBitmap(bitmapFileName)
bitmapFileName = sprintf("Graphics/Battlers/Eggs/%03degg",species)
if !pbResolveBitmap(bitmapFileName)
bitmapFileName = sprintf("Graphics/Battlers/Eggs/egg")
end[/COLOR]
end
end
end
bitmapFileName = pbResolveBitmap(bitmapFileName)
else
bitmapFileName = pbCheckPokemonBitmapFiles([species,back,(pokemon.isFemale?),
pokemon.isShiny?,(pokemon.form rescue 0),(pokemon.isShadow? rescue false)])
# Alter bitmap if supported
alterBitmap = (MultipleForms.getFunction(species,"alterBitmap") rescue nil)
end
if bitmapFileName && alterBitmap
animatedBitmap = AnimatedBitmap.new(bitmapFileName)
copiedBitmap = animatedBitmap.copy
animatedBitmap.dispose
copiedBitmap.each {|bitmap| alterBitmap.call(pokemon,bitmap) }
ret = copiedBitmap
elsif bitmapFileName
ret = AnimatedBitmap.new(bitmapFileName)
end
return ret
end
# Note: Returns an AnimatedBitmap, not a Bitmap
def pbLoadSpeciesBitmap(species,female=false,form=0,shiny=false,shadow=false,back=false,egg=false)
ret = nil
if egg
[COLOR="Red"] bitmapFileName = sprintf("Graphics/Battlers/Eggs/%segg_%d",getConstantName(PBSpecies,species),form) rescue nil
if !pbResolveBitmap(bitmapFileName)
bitmapFileName = sprintf("Graphics/Battlers/Eggs/%03degg_%d",species,form)
if !pbResolveBitmap(bitmapFileName)
bitmapFileName = sprintf("Graphics/Battlers/Eggs/%segg",getConstantName(PBSpecies,species)) rescue nil
if !pbResolveBitmap(bitmapFileName)
bitmapFileName = sprintf("Graphics/Battlers/Eggs/%03degg",species)
if !pbResolveBitmap(bitmapFileName)
bitmapFileName = sprintf("Graphics/Battlers/Eggs/egg")
end[/COLOR]
end
end
end
bitmapFileName = pbResolveBitmap(bitmapFileName)
else
bitmapFileName = pbCheckPokemonBitmapFiles([species,back,female,shiny,form,shadow])
end
if bitmapFileName
ret = AnimatedBitmap.new(bitmapFileName)
end
return ret
end