Prev: F440 Up: Map Next: F46C
F44C: Play Life
Used by the routine at RunGame.
Plays a life. The height of the stack of units is restored and the code that tests and sets the bit for a destroyed object in the map table is changed (at E118, A9B8 and ABDE) so that player two uses bit 6 rather than bit 7. The life is started with BeginLife.
PlayLife F44C LD A,($F600) The height of the stack of units that the ship carries.
F44F LD ($C905),A Update the stack height.
F452 LD A,($CA1C) The current player.
F455 LD B,A B=A.
F456 LD A,$7E A=7E.
F458 BIT 0,B Jump to PlayLife_Store if bit 0 of B is clear.
F45A JR Z,PlayLife_Store
F45C LD A,$76 A=76.
PlayLife_Store F45E LD ($E118),A Which bit is tested for a destroyed map cell.
F461 OR %11110000 Set the bits of A that are set in F0.
F463 LD ($A9B8),A Which bit is set on a destroyed map cell.
F466 LD ($ABDE),A Which bit is set on a destroyed map cell.
F469 CALL BeginLife Call BeginLife.
Continue on to RunLife.
Prev: F440 Up: Map Next: F46C