Prev: 54772 Up: Map Next: 54813
54785: Script Routine: (56) Collectible action
Slide the collectible right when the cell above is clear.
Input
IX Address of complex state data for an entity
ScriptRoutine_CollectibleIncXIfClearAbove 54785 CALL Test_EntityAbove Call Test_EntityAbove to test whether a solid entity sits above.
54788 JR C,ScriptRoutine_CollectibleIncXIfClearAbove_IncX Is the space above clear (carry set)? If so, jump to ScriptRoutine_CollectibleIncXIfClearAbove_IncX.
54790 CP 50 Is A less than 50? If so, jump to ScriptRoutine_CollectibleIncXIfClearAbove_IncX.
54792 JR C,ScriptRoutine_CollectibleIncXIfClearAbove_IncX
54794 SET 0,(IX+9) Set bit 0 of the current entity's direction / state.
54798 LD HL,54230 Point HL at the dialogue/message table (54230).
54801 JP ScriptInstruction Jump to ScriptInstruction to execute the script instruction at HL.
Nudge the collectible one character right when the space above is clear (or close).
ScriptRoutine_CollectibleIncXIfClearAbove_IncX 54804 INC (IX+7) Move this entity one character right.
54807 INC (IX+8)
54810 JP AdvanceScriptInstruction Jump to AdvanceScriptInstruction to run the next script instruction.
Prev: 54772 Up: Map Next: 54813