Skip to content

Commit

Permalink
hasBack for player sprites
Browse files Browse the repository at this point in the history
  • Loading branch information
HailSanta authored and HailSanta committed Jan 20, 2024
1 parent f89df67 commit e7b5879
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/build/sprite/sprites.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
MAX_COMPONENTS_XML,
NPC_SPRITE_MEDADATA_XML_FILENAME,
PALETTE_GROUPS_XML,
HAS_BACK_XML,
PALETTE_XML,
PLAYER_SPRITE_MEDADATA_XML_FILENAME,
SPECIAL_RASTER,
Expand Down Expand Up @@ -141,13 +142,12 @@ def player_raster_from_xml(xml: ET.Element, back: bool = False) -> PlayerRaster:


def player_xml_to_bytes(xml: ET.Element, asset_stack: Tuple[Path, ...]) -> List[bytes]:
has_back = False

out_bytes = b""
back_out_bytes = b""

max_components = int(xml.attrib[MAX_COMPONENTS_XML])
num_variations = int(xml.attrib[PALETTE_GROUPS_XML])
has_back = xml.attrib[HAS_BACK_XML] == "true"

# Animations
animations: List[List[AnimComponent]] = []
Expand Down
2 changes: 2 additions & 0 deletions tools/splat_ext/pm_sprites.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@

MAX_COMPONENTS_XML = "maxComponents"
PALETTE_GROUPS_XML = "paletteGroups"
HAS_BACK_XML = "hasBack"
PALETTE_XML = "palette"
BACK_PALETTE_XML = "backPalette"

Expand Down Expand Up @@ -397,6 +398,7 @@ def get_sprite_name_from_offset(offset: int, offsets: List[int], names: List[str
{
MAX_COMPONENTS_XML: str(cur_sprite.max_components),
PALETTE_GROUPS_XML: str(cur_sprite.num_variations),
HAS_BACK_XML: str(has_back).lower(),
},
)

Expand Down

0 comments on commit e7b5879

Please sign in to comment.