Prev: B79C Up: Map Next: B7F3
B7A1: Berk Read Controls: Down Branches
Used by the routine at Update_Berk_ReadControls.
Continue the down-control handler: bit tests, interact calls and put-down script launches.
Skip ahead to Berk_ReadControls_DownPartT when the carry flag is clear.
Berk_ReadControls_DownBranch B7A1 JR NC,Berk_ReadControls_DownPartT Jump to Berk_ReadControls_DownPartT if the previous compare did not take carry.
This entry point is used by the routine at Update_Berk_ReadControls.
Test direction/state bit 01; otherwise continue the active script.
Berk_ReadControls_DownBitTest B7A3 BIT 1,(IX+$09) Is bit 01 of the current entity's direction / state set?.
B7A7 JP NZ,AdvanceScriptInstruction If not, jump to AdvanceScriptInstruction.
Face-left put-down when the bit test passed.
B7AA SET 2,(IX+$03) Set bit 02 of the current entity's flags byte 3.
B7AE LD HL,$BA83 Point HL at BerkPutDownScript_WalkLeftFace.
B7B1 JP ScriptInstruction Jump to ScriptInstruction to execute the script instruction at HL.
This entry point is used by the routine at Update_Berk_ReadControls.
Shared down-branch: test direction bit 01 again, else run walk-right put-down.
Berk_ReadControls_DownPartT B7B4 BIT 0,(IX+$09) Is bit 01 of the current entity's direction / state set?.
B7B8 JP NZ,AdvanceScriptInstruction If not, jump to AdvanceScriptInstruction.
B7BB SET 2,(IX+$03) Set bit 02 of the current entity's flags byte 3.
B7BF LD HL,$BA77 Point HL at BerkPutDownScript_WalkRightFace.
B7C2 JP ScriptInstruction Jump to ScriptInstruction to execute the script instruction at HL.
This entry point is used by the routine at Update_Berk_ReadControls.
Choose interact vs continue from the referenced entity's y-extent.
Berk_ReadControls_DownPartU B7C5 LD A,(IX+$06) Load A with the current entity's y-extent.
B7C8 CP $1B Is the y-extent equal to 1B?.
B7CA JR Z,Berk_ReadControls_DownPartV If so, jump to Berk_ReadControls_DownPartV.
B7CC CP $23 Is the y-extent less than 23?.
B7CE JP C,AdvanceScriptInstruction If so, jump to AdvanceScriptInstruction.
Interact, then either abort or copy the collided entity and run a put-down.
Berk_ReadControls_DownPartV B7D1 CALL Berk_Interact_With_Entity Call Berk_Interact_With_Entity to let Berk interact with an entity.
B7D4 JR C,Berk_ReadControls_DownBitTest If carry is set, jump to Berk_ReadControls_DownBitTest.
B7D6 JR NZ,Berk_ReadControls_DownPartT If not zero, jump to Berk_ReadControls_DownPartT.
B7D8 LD BC,($72AA) Load BC with the last-collided entity pointer (Pointer_LastCollidedEntity).
B7DC LD ($72AC),BC Store BC in the current-entity pointer (Pointer_CurrentEntity).
B7E0 LD HL,$BA1F Point HL at BerkPutDownScript_DownInteract.
B7E3 JP ScriptInstruction Jump to ScriptInstruction to execute the script instruction at HL.
This entry point is used by the routine at Update_Berk_ReadControls.
High y-extent interact path leading to the BerkPutDownScript_DownHighY put-down.
Berk_ReadControls_DownPartW B7E6 CALL Berk_Interact_With_Entity Call Berk_Interact_With_Entity to let Berk interact with an entity.
B7E9 JR C,Berk_ReadControls_DownBitTest If carry is set, jump to Berk_ReadControls_DownBitTest.
B7EB JR NZ,Berk_ReadControls_DownPartT If not zero, jump to Berk_ReadControls_DownPartT.
B7ED LD HL,$BB5D Point HL at BerkPutDownScript_DownHighY.
B7F0 JP ScriptInstruction Jump to ScriptInstruction to execute the script instruction at HL.
Prev: B79C Up: Map Next: B7F3