From c89a99b8dd32ec8679df408e7dc099b1ddf162ab Mon Sep 17 00:00:00 2001 From: Jennifer Taylor Date: Tue, 12 May 2020 20:59:56 +0000 Subject: [PATCH] Support attributes in PSmap code generator. --- bemani/utils/psmap.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bemani/utils/psmap.py b/bemani/utils/psmap.py index 9b27719..78c802f 100644 --- a/bemani/utils/psmap.py +++ b/bemani/utils/psmap.py @@ -170,6 +170,12 @@ def parse_psmap(data: bytes, offset: str, rootname: str) -> Node: node = Node.bool_array(name, [False] * elements) else: node = Node.bool(name, False) + elif nodetype == 0x2F: + # Special case, this is an attribute + if name[-1] != '@': + raise Exception(f'Attribute name {name} expected to end with @') + root.set_attribute(name[:-1], '') + continue else: raise Exception(f'Unimplemented node type 0x{nodetype:02x}')