Skip to content

Commit

Permalink
Rename fields
Browse files Browse the repository at this point in the history
  • Loading branch information
Miepee committed Jul 13, 2024
1 parent c577613 commit a99dc0c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 20 deletions.
4 changes: 0 additions & 4 deletions src/mercury_engine_data_structures/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,11 @@
from pathlib import Path
from typing import Optional

import construct

from mercury_engine_data_structures import formats
from mercury_engine_data_structures.construct_extensions.json import convert_to_raw_python
from mercury_engine_data_structures.file_tree_editor import FileTreeEditor
from mercury_engine_data_structures.game_check import Game

construct.setGlobalPrintFullStrings(True)


def game_argument_type(s: str) -> Game:
try:
Expand Down
30 changes: 14 additions & 16 deletions src/mercury_engine_data_structures/formats/bmsem.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
from construct import (
Array,
Const,
Hex,
Construct,
Float32l,
Int16ul,
Check,
Int32ul,
Struct,
)
Expand All @@ -13,24 +15,20 @@
from mercury_engine_data_structures.formats import BaseResource
from mercury_engine_data_structures.game_check import Game

VectorArray = Array(3, Float32l)

BMSEM = Struct(
_magic=Const(b"MSEM"),
unk1=Int16ul,
unk2=Int16ul,
things= make_vector(Struct(
"layer_name" / StrId,
"objects" / make_vector(Struct(
"whatever_name" / StrId,
# "unk1" / Int32ul
"inner_things" / make_vector(Struct(
"first_part" / StrId,
"second_part" / StrId,
"unk3" / Int32ul,
"unk4" / Int32ul,
"unk6" / Int32ul,
"unk7" / Int32ul
_version=Const(0x00030001, Hex(Int32ul)),
groups=make_vector(Struct(
"group_name" / StrId,
"layers" / make_vector(Struct(
"layer_name" / StrId,
"entries" / make_vector(Struct(
"collision_camera" / StrId,
"song" / StrId, # Is empty if cc is "default".
"unk1" / Float32l, # Always either 2.0 or 1.5
"unk2" / Float32l, # Always same number as unk1
"unk3" / Int32ul, # Always 1
"unk4" / Int32ul # Always 0
))
))
)),
Expand Down

0 comments on commit a99dc0c

Please sign in to comment.