Routines |
Prev: 47966 | Up: Map | Next: 48133 |
Used by the routines at 35735, 36116, 36390, 36471, 36542, 36610, 36947, 36950, 36984, 36990, 37085, 37639, 37753, 38074, 38165, 38540, 38554, 41498, 41617, 48133, 48142, 48148, 48158, 48220, 48246, 48260, 48267, 48274, 48307, 48336, 48365, 48487, 48567, 48593, 48641, 48686, 48692, 48698, 48704, 48920, 49010, 51765, 52029, 52038, 52047, 52142, 52243, 52309, 52860, 52870, 52889 and 52967.
|
||||||||||||
48096 | INC HL | Advance script data pointer by two bytes | ||||||||||
48097 | INC HL | |||||||||||
This entry point is used by the routines at 35577, 35735, 36008, 36036, 36116, 36367, 36390, 36471, 36638, 37085, 37639, 37718, 37753, 37778, 38074, 38554, 41550, 48285, 48295, 48307, 48324, 48336, 48353, 48365, 48388, 48934, 49010, 51765, 51779, 51904, 51924, 51944, 51954, 51960, 52053, 52148, 52243, 52908, 52914, 52967 and 53083.
|
||||||||||||
48098 | INC HL | Advance script data pointer by one byte | ||||||||||
48099 | LD A,(HL) | Load A with byte at this location | ||||||||||
48100 | DEC HL | Move HL back one byte | ||||||||||
48101 | OR A | If byte loaded into A was zero (i.e. a script instruction) then skip ahead to 48117 | ||||||||||
48102 | JR Z,48117 | |||||||||||
HL pointing to a graphic layout data address, rather than a script instruction
|
||||||||||||
48104 | LD (34277),HL | Store current position in script at 34277 | ||||||||||
48107 | LD A,(HL) | Load word at location HL into graphic layout address in current entity's complex state data entry (IX) | ||||||||||
48108 | LD (IX+2),A | |||||||||||
48111 | INC HL | |||||||||||
48112 | LD A,(HL) | |||||||||||
48113 | LD (IX+3),A | |||||||||||
48116 | RET | Return | ||||||||||
HL pointing to a script instruction
|
||||||||||||
48117 | LD A,(HL) | Load A with script "instruction" | ||||||||||
48118 | PUSH HL | Store HL (pointer to current position in script data) | ||||||||||
48119 | LD HL,47966 | Point HL at table of script routine start addresses | ||||||||||
48122 | ADD A,A | Load BC with double index of script instruction and add as offset in HL to point to start address of required script routine | ||||||||||
48123 | LD C,A | |||||||||||
48124 | LD B,0 | |||||||||||
48126 | ADD HL,BC | |||||||||||
48127 | LD C,(HL) | Load BC with address at this location | ||||||||||
48128 | INC HL | |||||||||||
48129 | LD B,(HL) | |||||||||||
48130 | POP HL | Restore HL (pointer to current position in script data) | ||||||||||
48131 | PUSH BC | Push address in BC onto stack and "return" to this address | ||||||||||
48132 | RET |
Prev: 47966 | Up: Map | Next: 48133 |