![]() |
Routines |
| Prev: C065 | Up: Map | Next: C083 |
|
Used by the routines at SPAWN_CREATURE, CREATURE_UPDATE, MONSTER112_UPDATE, HIT_SPLITS, COLOUR_CARRIED, WANDERING_MONSTER, SPEED_BONUS, HITS_BONUS and PLACE_BONUS.
Compares cells only, the columns and the rows: carry if both differences are less than C. Used with C = 2 (his own cell or a neighbour), 3, 4 and 5, to decide what is near enough to matter -- and what is far enough to be forgotten.
|
||||||||||||||
| NEAR_KNIGHT | C069 | LD A,(KNIGHT_COLUMN) | the columns: not near, no carry | |||||||||||
| C06C | SUB (IX+$02) | |||||||||||||
| C06F | JP P,NEAR_KNIGHT_0 | |||||||||||||
| C072 | NEG | |||||||||||||
| NEAR_KNIGHT_0 | C074 | CP C | ||||||||||||
| C075 | RET NC | |||||||||||||
| C076 | LD A,(KNIGHT_ROW) | the rows: carry if near | ||||||||||||
| C079 | SUB (IX+$04) | |||||||||||||
| C07C | JP P,NEAR_KNIGHT_1 | |||||||||||||
| C07F | NEG | |||||||||||||
| NEAR_KNIGHT_1 | C081 | CP C | ||||||||||||
| C082 | RET | |||||||||||||
| Prev: C065 | Up: Map | Next: C083 |