![]() |
Routines |
| Prev: DC71 | Up: Map | Next: DC92 |
|
The distance on to the next multiple of 8 along his facing is taken from the low three bits of V (here), U, or their negatives (COAST_PLUS_U, COAST_MINUS_V, COAST_MINUS_U); 0 and he stands (STAND_ON_GRID). Otherwise he steps 4 if it is 4 or more, 2 if 2 or 3, and 1 if 1, and walks the step as usual (WALK_ON from offset 13), so he slows down 4, 2, 1 into place.
|
||||||||
| COAST_PLUS_V | DC79 | LD A,(IX+$03) | V's low byte | |||||
|
This entry point is used by the routines at COAST_PLUS_U and COAST_MINUS_V.
|
||||||||
| COAST_TO_GRID | DC7C | AND $07 | On the grid: stand | |||||
| DC7E | JR Z,STAND_ON_GRID | |||||||
| DC80 | NEG | A: how far to the next multiple of 8, 1-7 | ||||||
| DC82 | ADD A,$08 | |||||||
| DC84 | LD C,$04 | 4 or more: step 4 | ||||||
| DC86 | CP C | |||||||
| DC87 | JR NC,COAST_PLUS_V_0 | |||||||
| DC89 | SRL C | 2 or 3: step 2 | ||||||
| DC8B | CP C | |||||||
| DC8C | JR NC,COAST_PLUS_V_0 | |||||||
| DC8E | LD C,A | The last 1 | ||||||
| COAST_PLUS_V_0 | DC8F | LD A,C | Walk that step | |||||
| DC90 | JR WALK_STEP | |||||||
| Prev: DC71 | Up: Map | Next: DC92 |