![]() |
Routines |
| Prev: 45539 | Up: Map | Next: 45656 |
|
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 | 45598 | LD HL,29363 | Point HL at the game event flags (GameEventFlags). | |
| 45601 | BIT 6,(HL) | Is "special put-down / room-transition event" (bit 6 of GameEventFlags) set? If not, return. | ||
| 45603 | RET Z | |||
| 45604 | RES 6,(HL) | Clear "special put-down / room-transition event" (bit 6 of GameEventFlags). | ||
| 45606 | LD DE,14 | Each entity record is 0014 bytes long, then load that length into DE. | ||
| 45609 | LD IX,35689 | Point IX at the simple entity table (StateData_SimpleEntities). | ||
|
Scan for rising entities: nudge right while x < 109, else clear the rise latch.
|
||||
| Process_Rising_Entities_Scan | 45613 | LD A,(IX+0) | Fetch the current entity's type for the type test. | |
| 45616 | CP 255 | Is the current entity's entity type equal to 255? If so, return. | ||
| 45618 | RET Z | |||
| 45619 | BIT 4,(IX+2) | Is bit 4 of the current entity's flags byte 2 set? If not, jump to Process_Rising_Entities_NextEntity. | ||
| 45623 | JR Z,Process_Rising_Entities_NextEntity | |||
| 45625 | LD A,(IX+7) | Load A with the current entity's x-coordinate. | ||
| 45628 | CP 109 | Is the current entity's x-coordinate less than 109? If not, jump to Process_Rising_Entities_ClearRiseBits. | ||
| 45630 | JR NC,Process_Rising_Entities_ClearRiseBits | |||
| 45632 | INC (IX+7) | Move this entity one character right. | ||
| 45635 | INC (IX+8) | |||
| 45638 | SET 6,(HL) | Set "special put-down / room-transition event" (bit 6 of GameEventFlags). | ||
| 45640 | RET | Return. | ||
|
Advance to the next entity in the rising-entity walk.
|
||||
| Process_Rising_Entities_NextEntity | 45641 | ADD IX,DE | Advance IX to the next entity record. | |
| 45643 | 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 | 45645 | RES 4,(IX+2) | Reset bit 4 of the current entity's flags byte 2. | |
| 45649 | SET 5,(IX+2) | Set bit 5 of the current entity's flags byte 2. | ||
| 45653 | SET 0,(HL) | Set "room / script event raised" (bit 0 of GameEventFlags). | ||
| 45655 | RET | Return. | ||
| Prev: 45539 | Up: Map | Next: 45656 |