e += struct.pack('B', entry['rating']['double_expert'] | (entry['rating']['double_challenge'] << 4))
e += struct.pack('<H', 0) # Always zero.
e += struct.pack('B', (
- (entry['extra_stage_bit1'] << 7) |
- (MdbBin.ExtraStageInfo[entry['extra_stage']].value << 5) |
+ (MdbBin.ExtraStageInfo[entry['extra_stage']].value << 6) |
+ (entry['extra_stage_bit3'] << 5) |
(entry['extra_stage_bit4'] << 4) |
entry['song_type']
))
'double_challenge': entry.double_rating_challenge,
'double_expert': entry.double_rating_expert,
},
- 'extra_stage_bit1': entry.extra_stage_bit1,
'extra_stage': entry.extra_stage.name,
+ 'extra_stage_bit3': entry.extra_stage_bit3,
'extra_stage_bit4': entry.extra_stage_bit4,
'song_type': entry.song_type,
'in_default_view': entry.in_default_view,
- id: always_zero_4
contents: [0x0, 0x0]
# Byte 0 of flags bitmask.
- - id: extra_stage_bit1 # Only true for LoM. (For MAX2, true for KAKUMEI instead.)
- type: b1
- id: extra_stage
type: b2
enum: extra_stage_info
+ - id: extra_stage_bit3 # Only true for LoM.
+ type: b1
- id: extra_stage_bit4 # Seems to never be set, must be 0. (MAX2 sets these to true for all regular songs, and false for other music.)
type: b1
- id: song_type # Seems to be 0xc for regular songs, 0x6 for random. Probably a bitmask.
extra_stage_info:
0x0: none
- 0x1: extra_stage
- 0x2: one_more_extra_stage
+ 0x1: one_more_extra_stage # 1 and 2 are swapped on MAX2.
+ 0x2: extra_stage
0x3: unknown
# Kaitai Struct doesn't have constants/configuration, so this is a way to simulate them.