![]() |
Routines |
| Prev: 51053 | Up: Map | Next: 51168 |
|
Draws a section of a block, once for each of the entities that overlap it. Purpose not yet known.
|
||||||||
| DrawBlockSection | 51116 | LD A,0 | A is 0. | |||||
| 51118 | SUB (IX+0) | Subtract field 0 of the entity. | ||||||
| 51121 | JR NC,DrawBlockSection_Skip | Jump to 51127 if the carry flag is reset. | ||||||
| 51123 | CP 241 | Jump to DrawBlockSection_Next if it is below 241. | ||||||
| 51125 | JR C,DrawBlockSection_Next | |||||||
| DrawBlockSection_Skip | 51127 | LD A,B | B moves into A. | |||||
| 51128 | CALL DrawBlockBytes | Call DrawBlockBytes. | ||||||
| 51131 | LD A,(51117) | Read the byte at 51117. | ||||||
| 51134 | LD B,A | A moves into B. | ||||||
| 51135 | LD A,(IX+0) | Read field 0 of the entity. | ||||||
| 51138 | ADD A,(IX+2) | Add the high byte of the x coordinate. | ||||||
| 51141 | SUB B | Subtract B. | ||||||
| 51142 | SUB 17 | Subtract 17. | ||||||
| 51144 | JR C,DrawBlockSection_Return | Jump to DrawBlockSection_Return if the carry flag is set. | ||||||
| DrawBlockSection_Next | 51146 | POP HL | Bring back HL. | |||||
| 51147 | LD C,(IY+6) | Read field 6 of the other entity into C. | ||||||
| 51150 | SLA C | Shift C left. | ||||||
| 51152 | SLA C | Shift C left. | ||||||
| 51154 | LD B,0 | B is 0. | ||||||
| 51156 | ADD HL,BC | HL takes BC. | ||||||
| 51157 | JP DrawBlockRowData_Limit | Jump to 51051. | ||||||
| 51160 | CP 16 | Jump to DrawBlockSection_Next if it is 16 or more. | ||||||
| 51162 | JR NC,DrawBlockSection_Next | |||||||
| 51164 | JR DrawBlockSection_Skip | Jump to 51127. | ||||||
| DrawBlockSection_Return | 51166 | POP HL | Bring back HL. | |||||
| 51167 | RET | Return. | ||||||
| Prev: 51053 | Up: Map | Next: 51168 |