![]() |
Routines |
| Prev: D61D | Up: Map | Next: D65B |
|
Send the collectible out of the room downward.
|
||||||||
| ScriptRoutine_CollectibleLeaveRoomDown | D639 | LD A,(IX+$04) | Load A with the current entity's room index. | |||||
| D63C | CP $01 | Is the current entity's room index equal to 01? If so, jump to ScriptRoutine_CollectibleLeaveRoomDown_SetDirBit3Script. | ||||||
| D63E | JR Z,ScriptRoutine_CollectibleLeaveRoomDown_SetDirBit3Script | |||||||
| D640 | CALL Adjust_CameraX | Call Adjust_CameraX to adjust the camera X coordinate. | ||||||
| D643 | JR C,ScriptRoutine_CollectibleLeaveRoomDown_DecYAndRoom | Jump to ScriptRoutine_CollectibleLeaveRoomDown_DecYAndRoom if the result underflowed. | ||||||
|
Blocked leaving downward: set direction bit 03 and run the stop script at D3D6.
|
||||||||
| ScriptRoutine_CollectibleLeaveRoomDown_SetDirBit3Script | D645 | SET 3,(IX+$09) | Set bit 03 of the current entity's direction / state. | |||||
| D649 | LD HL,$D3D6 | Point HL at the dialogue/message table (D3D6). | ||||||
| D64C | JP ScriptInstruction | Jump to ScriptInstruction to execute the script instruction at HL. | ||||||
|
Leave downward: move up one character and back one room.
|
||||||||
| ScriptRoutine_CollectibleLeaveRoomDown_DecYAndRoom | D64F | DEC (IX+$05) | Move this entity one character up. | |||||
| D652 | DEC (IX+$06) | |||||||
| D655 | DEC (IX+$04) | Move this entity back one room. | ||||||
| D658 | JP AdvanceScriptInstruction | Jump to AdvanceScriptInstruction to run the next script instruction. | ||||||
| Prev: D61D | Up: Map | Next: D65B |