Routines |
Prev: 54132 | Up: Map | Next: 54162 |
|
||||||||||||||||
54148 | LD A,B | Load y-coordinate into A | ||||||||||||||
54149 | ADD A,A | Multiply this by 8... | ||||||||||||||
54150 | ADD A,A | ... | ||||||||||||||
54151 | ADD A,A | ... | ||||||||||||||
54152 | LD L,A | Copy 8 times y-coordinate into HL... | ||||||||||||||
54153 | LD H,0 | ... | ||||||||||||||
54155 | ADD HL,HL | Multiply by 4... | ||||||||||||||
54156 | ADD HL,HL | ...to give 32 times original y-coordinate in HL | ||||||||||||||
The operand of the instruction at 54157 determines whether we are dealing with the attribute file (88), or the current terrain interaction data (94). It is modified by the instructions at 54164 and 54172.
|
||||||||||||||||
54157 | LD D,88 | Point DE at start of data, plus x-coordinate offset in C... | ||||||||||||||
54159 | LD E,C | ... | ||||||||||||||
54160 | ADD HL,DE | Add 32 times y-coordinate as offset in HL | ||||||||||||||
54161 | RET | Return |
Prev: 54132 | Up: Map | Next: 54162 |