diff --git a/bemani/format/afp/swf.py b/bemani/format/afp/swf.py index e28bb64..69b8775 100644 --- a/bemani/format/afp/swf.py +++ b/bemani/format/afp/swf.py @@ -1570,7 +1570,11 @@ class SWF(TrackedCoverage, VerboseOutput): self.vprint(f"{prefix} Create object request") update_request = False - if flags & 0x4: + if flags & 0x18000004: + # Technically only flag 0x4 is the "use transform matrix" flag, but when they + # added perspective to the format, they also just made setting the TZ or the + # 3x3 transform portion of a 4x4 matrix equivalent. So if those exist, this + # implicitly is enabled. self.vprint(f"{prefix} Use transform matrix") projection = AP2PlaceObjectTag.PROJECTION_AFFINE transform_information = True diff --git a/bemani/format/afp/types/generic.py b/bemani/format/afp/types/generic.py index 076ea4e..61d0d1e 100644 --- a/bemani/format/afp/types/generic.py +++ b/bemani/format/afp/types/generic.py @@ -247,21 +247,17 @@ class Matrix: new.a31 = other.a31 new.a32 = other.a32 new.a33 = other.a33 - new.a41 = other.a41 - new.a42 = other.a42 - new.a43 = other.a43 - else: - if other.__scale_set: - new.a = other.a - new.d = other.d - if other.__rotate_set: - new.b = other.b - new.c = other.c - if other.__translate_xy_set: - new.tx = other.tx - new.ty = other.ty - if other.__translate_z_set: - new.tz = other.tz + if other.__scale_set: + new.a = other.a + new.d = other.d + if other.__rotate_set: + new.b = other.b + new.c = other.c + if other.__translate_xy_set: + new.tx = other.tx + new.ty = other.ty + if other.__translate_z_set: + new.tz = other.tz return new