![]() |
Routines |
| Prev: B1E3 | Up: Map | Next: B258 |
|
Used by the routine at GameStart.
Walk entities marked as rising (lifts / bubblers), nudge their Y fields up and clear the rise latch at the top.
|
||||
| Process_Rising_Entities | B21E | LD HL,$72B3 | Point HL at the game event flags (GameEventFlags). | |
| B221 | BIT 6,(HL) | Is "special put-down / room-transition event" (bit 06 of GameEventFlags) set? If not, return. | ||
| B223 | RET Z | |||
| B224 | RES 6,(HL) | Clear "special put-down / room-transition event" (bit 06 of GameEventFlags). | ||
| B226 | LD DE,$000E | Each entity record is 000E bytes long, then load that length into DE. | ||
| B229 | LD IX,$8B69 | Point IX at the simple entity table (StateData_SimpleEntities). | ||
|
Scan for rising entities: nudge right while x < 6D, else clear the rise latch.
|
||||
| Process_Rising_Entities_Scan | B22D | LD A,(IX+$00) | Fetch the current entity's type for the type test. | |
| B230 | CP $FF | Is the current entity's entity type equal to FF? If so, return. | ||
| B232 | RET Z | |||
| B233 | BIT 4,(IX+$02) | Is bit 04 of the current entity's flags byte 2 set? If not, jump to Process_Rising_Entities_NextEntity. | ||
| B237 | JR Z,Process_Rising_Entities_NextEntity | |||
| B239 | LD A,(IX+$07) | Load A with the current entity's x-coordinate. | ||
| B23C | CP $6D | Is the current entity's x-coordinate less than 6D? If not, jump to Process_Rising_Entities_ClearRiseBits. | ||
| B23E | JR NC,Process_Rising_Entities_ClearRiseBits | |||
| B240 | INC (IX+$07) | Move this entity one character right. | ||
| B243 | INC (IX+$08) | |||
| B246 | SET 6,(HL) | Set "special put-down / room-transition event" (bit 06 of GameEventFlags). | ||
| B248 | RET | Return. | ||
|
Advance to the next entity in the rising-entity walk.
|
||||
| Process_Rising_Entities_NextEntity | B249 | ADD IX,DE | Advance IX to the next entity record. | |
| B24B | JR Process_Rising_Entities_Scan | Jump to Process_Rising_Entities_Scan to advance to the next rising entity. | ||
|
Clear the rising flag, set the risen flag, and raise a room/script event.
|
||||
| Process_Rising_Entities_ClearRiseBits | B24D | RES 4,(IX+$02) | Reset bit 04 of the current entity's flags byte 2. | |
| B251 | SET 5,(IX+$02) | Set bit 05 of the current entity's flags byte 2. | ||
| B255 | SET 0,(HL) | Set "room / script event raised" (bit 00 of GameEventFlags). | ||
| B257 | RET | Return. | ||
| Prev: B1E3 | Up: Map | Next: B258 |