← C872 Saved probe-tile pointer Map C897 → Bias a replacement heading for the wheel
C874: Test whether a candidate tile blocks movement
Tests whether a candidate playfield tile blocks movement.
Input
A byte offset added to the saved probe-tile pointer (probe_tile_ptr)
Output
A 1 if the tile is solid (blocks movement), 0 if passable
object_tile_check C874 PUSH HL
C875 PUSH DE
C876 LD HL,(probe_tile_ptr) Read the tile ID at offset A past the probe pointer.
C879 LD E,A
C87A LD D,$00
C87C ADD HL,DE
C87D LD A,(HL)
C87E CP $20 Empty space is passable.
C880 JR Z,tile_passable
C882 CP $45 Lower IDs are solid walls and border.
C884 JR C,tile_solid
C886 CP $59 Tiles below the brick range are passable.
C888 JR C,tile_passable
C88A CP $E4 Tiles above the brick range are passable. Brick tiles fall through as solid.
C88C JR NC,tile_passable
tile_solid C88E LD A,$01 Report the tile as solid.
C890 POP DE
C891 POP HL
C892 RET
tile_passable C893 XOR A Passable: return 0.
C894 POP DE
C895 POP HL
C896 RET
← C872 Saved probe-tile pointer Map C897 → Bias a replacement heading for the wheel
Fork me on GitHub