Prev: F199 Up: Map Next: F1C8
F1B4: Take ten from LIFE
Used by the routine at OBJECTS_MEET.
The author's DECLI1; DECLIF, at offset 2, takes what A holds. LIFE is two decimal digits (LIFE_TENS and LIFE_UNITS), and it stops at 00, which ends the game (MAIN_LOOP). Bit 0 of IY+$17 asks for it to be printed again. Ten or one goes when something is met (OBJECTS_MEET), three when the creature in state 4 strikes (CHE3D), and, when the knight lands from a long fall, what it lasted beyond 20 steps (CREATURE_UPDATE). The alternate registers do the work, so the caller's are kept.
Input
A How much LIFE to take, at DECLIF
DECLI1 F1B4 LD A,$0A Ten
This entry point is used by the routines at CHE3D, CREATURE_UPDATE and OBJECTS_MEET.
DECLIF F1B6 SET 0,(IY+GAME_FLAGS-V) DECLIF: LIFE to be printed again; take A from its digits
F1BA EXX
F1BB LD B,$FF
F1BD LD HL,(LIFE_TENS)
F1C0 CALL DE1
F1C3 LD (LIFE_TENS),HL
F1C6 EXX
F1C7 RET
Prev: F199 Up: Map Next: F1C8