Skip to content

Commit

Permalink
Merge pull request #139 from dyceron/update-bmsmsd
Browse files Browse the repository at this point in the history
Add `BorderType` enum to bmsmsd
  • Loading branch information
dyceron authored May 14, 2024
2 parents 71851d0 + 14937c1 commit ee5ae24
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions src/mercury_engine_data_structures/formats/bmsmsd.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,23 @@
import functools

import construct
from construct.core import Const, Construct, Enum, Float32l, Hex, Int32sl, Int32ul, Struct
from construct.core import Const, Construct, Enum, FlagsEnum, Float32l, Hex, Int32sl, Int32ul, Struct

from mercury_engine_data_structures.common_types import CVector2D, CVector3D, StrId, make_vector
from mercury_engine_data_structures.formats import BaseResource
from mercury_engine_data_structures.game_check import Game

TileBorders = FlagsEnum(Int32sl,
TOP=1,
BOTTOM=2,
LEFT=4,
RIGHT=8,
OPEN_TOP=16,
OPEN_BOTTOM=32,
OPEN_LEFT=64,
OPEN_RIGHT=128,
)

TileType = Enum(
Int32ul,
NORMAL=1,
Expand All @@ -20,6 +31,7 @@
Int32sl,
METROID=-1,
ACTOR=0,
SHIP=1,
ENERGY_CLOUD=2,
DOOR=3,
CHOZO_SEAL=4,
Expand All @@ -45,7 +57,7 @@
"bottom_left" / CVector2D,
"top_right" / CVector2D,
),
"border_type" / Int32sl,
"tile_borders" / TileBorders,
"tile_type" / TileType,
"icons" / make_vector(
Struct(
Expand Down

0 comments on commit ee5ae24

Please sign in to comment.