Prev: B2AA Up: Map Next: B440
B41A: Update Berk Controller
Used by the routine at GameStart.
Copy room/x/x-extent from the camera-follow entity (StateData_Berk) into BerkRoomIndexCopy/BerkXCoordinateCopy/BerkXExtentCopy, then call Update_Berk_ReadControls with that IX.
Update_Berk_Controller B41A LD IX,$909B Point IX at the camera-follow entity (StateData_Berk).
B41E LD A,(IX+$04) Load A with the current entity's room index.
B421 LD ($7305),A Set Berk's room-index copy (BerkRoomIndexCopy).
B424 LD A,(IX+$07) Load A with the current entity's x-coordinate.
B427 LD ($7303),A Set Berk's X-coordinate copy (BerkXCoordinateCopy).
B42A LD A,(IX+$08) Load A with the current entity's x-extent.
B42D LD ($7304),A Set Berk's X-extent copy (BerkXExtentCopy).
B430 LD HL,($72B1) Load HL with Berk's script position pointer (Pointer_BerkScriptPosition).
B433 LD ($72CF),HL Store HL in the active script cursor (Pointer_ActiveScriptCursor).
B436 CALL Update_Berk_ReadControls Call Update_Berk_ReadControls to read Berk's controls and choose a script.
B439 LD HL,($72CF) Load HL with the active script cursor (Pointer_ActiveScriptCursor).
B43C LD ($72B1),HL Store HL in Berk's script position pointer (Pointer_BerkScriptPosition).
B43F RET Return.
Prev: B2AA Up: Map Next: B440