![]() |
Routines |
| Prev: CDD2 | Up: Map | Next: CE22 |
|
||||||||||||||
| CDF5 | PUSH HL | Save HL and BC | ||||||||||||
| CDF6 | PUSH BC | |||||||||||||
| CDF7 | LD A,(HL) | Set A to the tile type pointed by HL | ||||||||||||
| CDF8 | LD B,$05 | Set B to the number of tiles of type 'wall' | ||||||||||||
| CDFA | LD HL,$CE22 | Set HL to the address pointer of the list of tiles 'wall' | ||||||||||||
|
Check if the tile type in A is in the list of B elements pointed by HL
|
||||||||||||||
| CDFD | LD C,$FF | Check if A is equal to (HL) | ||||||||||||
| CDFF | CPI | |||||||||||||
| CE01 | JP Z,$CE0E | Jump if so | ||||||||||||
| CE04 | DJNZ $CDFF | Jump back and check next element | ||||||||||||
|
is not in the list
|
||||||||||||||
| CE06 | POP BC | Restore BC | ||||||||||||
| CE07 | POP HL | Restore HL | ||||||||||||
| CE08 | LD A,$01 | Set flag Z=0 | ||||||||||||
| CE0A | OR A | |||||||||||||
| CE0B | LD A,$00 | Set A = $00 | ||||||||||||
| CE0D | RET | |||||||||||||
|
is in the list
|
||||||||||||||
| CE0E | XOR A | Set flag Z=1 | ||||||||||||
| CE0F | DEC HL | Set A to the tile type found | ||||||||||||
| CE10 | LD A,(HL) | |||||||||||||
| CE11 | LD ($A25D),A | Set A25D the tile type found | ||||||||||||
| CE14 | POP BC | Restore BC and HL | ||||||||||||
| CE15 | POP HL | |||||||||||||
| CE16 | RET | |||||||||||||
| CE17 | PUSH HL | Save HL and BC | ||||||||||||
| CE18 | PUSH BC | |||||||||||||
| CE19 | LD A,(HL) | Set A to the tile type pointed by HL | ||||||||||||
| CE1A | LD B,$09 | Set B to the number of tiles of type 'background' | ||||||||||||
| CE1C | LD HL,$CE27 | Set HL to the address pointer of the list of tiles 'background' | ||||||||||||
| CE1F | JP $CDFD | Jump to check tile | ||||||||||||
| Prev: CDD2 | Up: Map | Next: CE22 |