Prev: 62528 Up: Map Next: 62572
62540: 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 57624, 43448 and 43998) so that player two uses bit 6 rather than bit 7. The life is started with BeginLife.
PlayLife 62540 LD A,(62976) The height of the stack of units that the ship carries.
62543 LD (51461),A Update the stack height.
62546 LD A,(51740) The current player.
62549 LD B,A B=A.
62550 LD A,126 A=126.
62552 BIT 0,B Jump to PlayLife_Store if bit 0 of B is clear.
62554 JR Z,PlayLife_Store
62556 LD A,118 A=118.
PlayLife_Store 62558 LD (57624),A Which bit is tested for a destroyed map cell.
62561 OR %11110000 Set the bits of A that are set in 240.
62563 LD (43448),A Which bit is set on a destroyed map cell.
62566 LD (43998),A Which bit is set on a destroyed map cell.
62569 CALL BeginLife Call BeginLife.
Continue on to RunLife.
Prev: 62528 Up: Map Next: 62572