From f2be6d2bb877f00d9f45be9814a7300e801c06cd Mon Sep 17 00:00:00 2001 From: Jennifer Taylor Date: Mon, 17 May 2021 03:48:05 +0000 Subject: [PATCH] Initial RE of new tags and flags seen in some IIDX versions. --- bemani/format/afp/swf.py | 135 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 131 insertions(+), 4 deletions(-) diff --git a/bemani/format/afp/swf.py b/bemani/format/afp/swf.py index 6259d7f..1abc16a 100644 --- a/bemani/format/afp/swf.py +++ b/bemani/format/afp/swf.py @@ -201,6 +201,18 @@ class AP2DefineButtonTag(Tag): } +class AP2PlaceCameraTag(Tag): + def __init__(self) -> None: + # TODO: I need to figure out what camera placements actually DO, and take the + # values that I parsed out store them here... + super().__init__(None) + + def as_dict(self, *args: Any, **kwargs: Any) -> Dict[str, Any]: + return { + **super().as_dict(*args, **kwargs), + } + + class AP2DefineTextTag(Tag): def __init__(self, id: int, lines: List[AP2TextLine]) -> None: super().__init__(id) @@ -1017,12 +1029,22 @@ class SWF(TrackedCoverage, VerboseOutput): datachunk = ap2data[dataoffset:(dataoffset + size)] flags, depth, object_id = struct.unpack(" 0: + catchup = 4 - misalignment + self.add_coverage(dataoffset + running_pointer, catchup) + running_pointer += catchup + + if flags & 0x8000000: + # TODO: Some unknown float. This might be the "tz" value for a 3D matrix. + unhandled_flags &= ~0x8000000 + unk_5 = struct.unpack("