From 689a99707914437721051873d9e54ae2594f720f Mon Sep 17 00:00:00 2001 From: Jennifer Taylor Date: Tue, 6 Apr 2021 23:01:42 +0000 Subject: [PATCH] Support 1-byte integer PUSH from tricoro. --- bemani/format/afp.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bemani/format/afp.py b/bemani/format/afp.py index f54d91b..69bd735 100644 --- a/bemani/format/afp.py +++ b/bemani/format/afp.py @@ -1461,6 +1461,12 @@ class SWF: propertyval = struct.unpack(">B", datachunk[offset_ptr:(offset_ptr + 1)])[0] + 0x800 offset_ptr += 1 vprint(f"{prefix} ORGFUNC2 CONST NAME: {AP2PropertyType.property_to_name(propertyval)}") + elif obj_to_create == 0x37: + # Integer object but one byte. + ival = struct.unpack(">B", datachunk[offset_ptr:(offset_ptr + 1)])[0] + offset_ptr += 1 + + vprint(f"{prefix} INTEGER: {ival}") else: raise Exception(f"Unsupported object {hex(obj_to_create)} to push!")