foundry.core.player_animations package#

Submodules#

foundry.core.player_animations.PlayerAnimation module#

class PlayerAnimation(animations: bytearray, offset: int)#

Bases: object

A representation of a single player animation.

Attributes:
animations: bytearray

The frames inside animation.

offset: int

The page offset of its graphics, which applies to each power up of the player’s.

animations: bytearray#
offset: int#
to_bytes() tuple[bytes, bytes]#

foundry.core.player_animations.PlayerAnimationData module#

class PlayerAnimationData(animation: PlayerAnimation, graphics_set: GraphicsSet, palette_group: PaletteGroup, palette_index: int, is_kicking: bool = False)#

Bases: object

animation: PlayerAnimation#
property frames: list[int]#
graphics_set: GraphicsSet#
property horizontal_flip: list[bool]#
is_kicking: bool#
palette_group: PaletteGroup#
palette_index: int#

foundry.core.player_animations.util module#

get_animations_palette_index(is_mario: bool, power_up: int) int#
load_animations(frame_data: bytes, offset_data: bytes) list[foundry.core.player_animations.PlayerAnimation.PlayerAnimation]#
load_animations_graphic_set(animation: PlayerAnimation, power_up: int, offsets: list[int]) GraphicsSet#
load_player_animation(animation: PlayerAnimation, palette_group: PaletteGroup, is_mario: bool, power_up: int, offsets: list[int], is_kicking: bool = False)#
load_player_animation_data(animations: list[foundry.core.player_animations.PlayerAnimation.PlayerAnimation], palette_group: PaletteGroup, is_mario: bool, power_up: int, offsets: list[int]) list[foundry.core.player_animations.PlayerAnimationData.PlayerAnimationData]#
load_player_animations() list[foundry.core.player_animations.PlayerAnimation.PlayerAnimation]#
load_power_up_offsets() list[int]#
load_power_up_palettes() PaletteGroup#
save_player_animations_to_rom(power_up_offsets: bytes, palette_group: bytes, animations: bytes, page_offsets: bytes)#

Module contents#

A series of constants useful for acquiring the player’s animations.