diff --git a/src/mercury_engine_data_structures/formats/bmsmsd.py b/src/mercury_engine_data_structures/formats/bmsmsd.py index 1e19bdb5..c8dd9ad3 100644 --- a/src/mercury_engine_data_structures/formats/bmsmsd.py +++ b/src/mercury_engine_data_structures/formats/bmsmsd.py @@ -1,12 +1,19 @@ import functools import construct -from construct.core import Const, Construct, Float32l, Hex, Int32sl, Int32ul, Struct +from construct.core import Const, Construct, Enum, 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 +TileType = Enum( + Int32ul, + BLUE=1, + RED=2, + PURPLE=4 +) + # BMSMSD BMSMSD = Struct( "_magic" / Const(b"MMSD"), @@ -27,7 +34,7 @@ "top_right" / CVector2D, ), "border_type" / Int32sl, - "tile_type" / Int32sl, + "tile_type" / TileType, "icons" / make_vector( Struct( "actor_name" / StrId, diff --git a/tests/formats/test_bmsmsd.py b/tests/formats/test_bmsmsd.py index 6e11cf29..e51e6385 100644 --- a/tests/formats/test_bmsmsd.py +++ b/tests/formats/test_bmsmsd.py @@ -9,5 +9,5 @@ @pytest.mark.parametrize("bmsmsd_path", all_sr_bmsmsd) -def test_bmtun(samus_returns_tree, bmsmsd_path): +def test_bmsmsd(samus_returns_tree, bmsmsd_path): parse_build_compare_editor(Bmsmsd, samus_returns_tree, bmsmsd_path)