← CB18 Per-type singleton flag Map CB3C → Logic records – the five inhabitants
CB2C: Secondary object's logic record
The ball gem's movement state. No other secondary object uses it.
obj2_record CB2C DEFB $00 Heading, one of eight numbered clockwise: 0 for up, through to 7 for up-left
CB2D DEFB $00 Movement speed
CB2E DEFS $05 Unused
CB33 DEFB $00 Wander timer: frames left before a fresh heading
CB34 DEFB $00 Object type, 0 for an empty pool slot
CB35 DEFB $00,$00 Two counters a handler times its own state on. The ball gem runs them as one 16-bit travel count, low byte first. The orb keeps its hunt timer in the first byte and its hold timer in the second.
CB37 DEFB $00 Animation frame: the index into the handler's frame table
CB38 DEFB $00 Reaction state: 0 for the run state, 1 for spawn, 2 for dying. Values 3 to 5 belong to the type's own handler.
CB39 DEFB $00 Singleton flag: 1 for a type allowed only one live instance
CB3A DEFB $00 Animation timer: a frame lasts two game frames.
CB3B DEFB $00 Scratch. The wheel keeps its last vertical heading here.
← CB18 Per-type singleton flag Map CB3C → Logic records – the five inhabitants
Fork me on GitHub