![]() |
Routines |
| Prev: C76D | Up: Map | Next: C7E0 |
|
Draws a section of a block, once for each of the entities that overlap it. Purpose not yet known.
|
||||||||
| DrawBlockSection | C7AC | LD A,$00 | A is 00. | |||||
| C7AE | SUB (IX+$00) | Subtract field 00 of the entity. | ||||||
| C7B1 | JR NC,DrawBlockSection_Skip | Jump to C7B7 if the carry flag is reset. | ||||||
| C7B3 | CP $F1 | Jump to DrawBlockSection_Next if it is below F1. | ||||||
| C7B5 | JR C,DrawBlockSection_Next | |||||||
| DrawBlockSection_Skip | C7B7 | LD A,B | B moves into A. | |||||
| C7B8 | CALL DrawBlockBytes | Call DrawBlockBytes. | ||||||
| C7BB | LD A,($C7AD) | Read the byte at C7AD. | ||||||
| C7BE | LD B,A | A moves into B. | ||||||
| C7BF | LD A,(IX+$00) | Read field 00 of the entity. | ||||||
| C7C2 | ADD A,(IX+$02) | Add the high byte of the x coordinate. | ||||||
| C7C5 | SUB B | Subtract B. | ||||||
| C7C6 | SUB $11 | Subtract 11. | ||||||
| C7C8 | JR C,DrawBlockSection_Return | Jump to DrawBlockSection_Return if the carry flag is set. | ||||||
| DrawBlockSection_Next | C7CA | POP HL | Bring back HL. | |||||
| C7CB | LD C,(IY+$06) | Read field 06 of the other entity into C. | ||||||
| C7CE | SLA C | Shift C left. | ||||||
| C7D0 | SLA C | Shift C left. | ||||||
| C7D2 | LD B,$00 | B is 00. | ||||||
| C7D4 | ADD HL,BC | HL takes BC. | ||||||
| C7D5 | JP DrawBlockRowData_Limit | Jump to C76B. | ||||||
| C7D8 | CP $10 | Jump to DrawBlockSection_Next if it is 10 or more. | ||||||
| C7DA | JR NC,DrawBlockSection_Next | |||||||
| C7DC | JR DrawBlockSection_Skip | Jump to C7B7. | ||||||
| DrawBlockSection_Return | C7DE | POP HL | Bring back HL. | |||||
| C7DF | RET | Return. | ||||||
| Prev: C76D | Up: Map | Next: C7E0 |