Prev: 41328 Up: Map Next: 41375
41357: Run Object Handler
Used by the routine at UpdateEnemies.
Jumps to the routine that handles an object, which is picked from the table at ObjectHandlers by the type of the object.
Input
IX Address of the object
RunObjectHandler 41357 LD A,(IX+0) Fetch the type of the object.
41360 SUB 19 Take off 19, the first type with a handler.
41362 LD E,A Put the result in DE.
41363 LD D,0
41365 LD HL,44837 Use the table of handlers.
41368 ADD HL,DE Add the offset twice to get the address of the entry.
41369 ADD HL,DE
41370 LD A,(HL) Fetch the address of the handler into HL.
41371 INC HL
41372 LD H,(HL)
41373 LD L,A
41374 JP (HL) Jump to the handler.
Prev: 41328 Up: Map Next: 41375