Prev: 32403 Up: Map Next: 32486
32434: Update Fixed Entities
Used by the routine at MainLoop.
Called whenever FRAMES has changed. Runs the handlers of the three entities at Player, ticks the clock with ClockTick and records the new value of FRAMES in LastFrame. InHandlers is set while the handlers are running.
UpdateFixedEntities 32434 DI Disable interrupts.
32435 PUSH IX Stash IX on the stack.
32437 LD A,1 Set the flag in InHandlers that shows the handlers are running.
32439 LD (24068),A
32442 LD IX,60048 Point IX at the player at Player.
UpdateFixedEntities_Loop 32446 LD HL,32453 Point HL at the address for the handler to return to at UpdateFixedEntities_Next.
32449 PUSH HL Stash the return address on the stack.
32450 JP ProcessAction_Dispatch Jump to ProcessAction_Dispatch to run the handler.
UpdateFixedEntities_Next 32453 LD DE,8 DE=0008 (the size of an entity).
32456 ADD IX,DE Move IX on to the next entity.
32458 PUSH IX Copy IX to HL (using the stack).
32460 POP HL
32461 LD DE,60072 Point DE at the end of the fixed entities at ItemEntities.
32464 AND A Loop back to UpdateFixedEntities_Loop until all three entities are done.
32465 SBC HL,DE
32467 JR C,UpdateFixedEntities_Loop
32469 CALL ClockTick Call ClockTick to update the clock.
32472 LD A,(23672) Write FRAMES to LastFrame.
32475 LD (24067),A
32478 XOR A Clear the flag in InHandlers that shows the handlers are running.
32479 LD (24068),A
32482 POP IX Restore IX from the stack.
32484 EI Enable interrupts.
32485 RET Return.
Prev: 32403 Up: Map Next: 32486