![]() |
Routines |
| Prev: E03D | Up: Map | Next: E08F |
|
Used by the routine at MakeTiles.
Frees any slots of objects that are not on one of the two columns and two rows that are on the screen.
|
||||||||||
| FreeDistantSlots | E062 | LD A,($DDF7) | The next column. | |||||||
| E065 | LD C,A | C=A. | ||||||||
| E066 | LD DE,$001A | DE=1A. | ||||||||
| E069 | LD HL,($CE57) | Fetch the word at MapPosition into HL. | ||||||||
| E06C | INC H | Advance H. | ||||||||
| FreeDistantSlots_Loop | E06D | LD A,(IX+$00) | Read offset 00 of IX. | |||||||
| E070 | INC A | Advance A. | ||||||||
| E071 | JR Z,FreeDistantSlots_Next | Jump to FreeDistantSlots_Next if the zero flag is set. | ||||||||
| E073 | LD A,(IX+$01) | Read offset 01 of IX. | ||||||||
| E076 | CP L | Jump to FreeDistantSlots_Row if A is L. | ||||||||
| E077 | JR Z,FreeDistantSlots_Row | |||||||||
| E079 | CP C | Jump to FreeDistantSlots_Free if A is not C. | ||||||||
| E07A | JR NZ,FreeDistantSlots_Free | |||||||||
| FreeDistantSlots_Row | E07C | LD A,(IX+$04) | Read offset 04 of IX. | |||||||
| E07F | CP H | Jump to FreeDistantSlots_Next if A is H. | ||||||||
| E080 | JR Z,FreeDistantSlots_Next | |||||||||
| E082 | INC A | Advance A. | ||||||||
| E083 | CP H | Jump to FreeDistantSlots_Next if A is H. | ||||||||
| E084 | JR Z,FreeDistantSlots_Next | |||||||||
| FreeDistantSlots_Free | E086 | LD (IX+$00),$FF | Store FF at offset 00 of IX. | |||||||
| FreeDistantSlots_Next | E08A | ADD IX,DE | IX gains DE. | |||||||
| E08C | DJNZ FreeDistantSlots_Loop | Decrease B and jump to FreeDistantSlots_Loop until none remain. | ||||||||
| E08E | RET | Return. | ||||||||
| Prev: E03D | Up: Map | Next: E08F |