![]() |
Routines |
| Prev: 32291 | Up: Map | Next: 32403 |
|
Used by the routine at MainLoop.
Calls the handler of an entity. The handler's address is read from HandlerTable, indexed by the first byte of the entity record, and entered through the 233 (JP (HL)) at 23728. The entry point at ProcessAction_Dispatch is used when the return address has already been stacked, and the one at ProcessAction_Lookup when the table of handlers in HL is not HandlerTable.
|
||||||||||
| ProcessAction | 32382 | PUSH HL | Stash the return address on the stack. | |||||||
|
This entry point is used by the routine at UpdateFixedEntities.
|
||||||||||
| ProcessAction_Dispatch | 32383 | LD HL,32486 | Point HL at the handler table at HandlerTable. | |||||||
|
This entry point is used by the routine at ProcessRoomItem.
Double the first byte of the entity to create an offset in BC.
|
||||||||||
| ProcessAction_Lookup | 32386 | LD C,(IX+0) | Fetch the first byte of the entity, which is its sprite ID. | |||||||
|
This entry point is used by the routine at DrawGraphic.
|
||||||||||
| ProcessAction_Offset | 32389 | LD B,0 | B=0. | |||||||
| 32391 | SLA C | Double BC, which gives two bytes for each sprite ID. | ||||||||
| 32393 | RL B | |||||||||
| 32395 | ADD HL,BC | Find the entry for the entity in the handler table. | ||||||||
| 32396 | LD A,(HL) | Fetch the address of the handler. | ||||||||
| 32397 | INC HL | |||||||||
| 32398 | LD H,(HL) | |||||||||
| 32399 | LD L,A | |||||||||
| 32400 | JP 23728 | Jump to the handler, using the 233 (JP (HL)) at 23728. | ||||||||
| Prev: 32291 | Up: Map | Next: 32403 |