Prev: C880 Up: Map Next: C8D2
C881: Start the game
Used by the routine at C800.
C881 CALL $E801 Clear the screen.
C884 LD HL,$69EA Get the flags (offset 4) for the first room.
C887 LD DE,$000C Increment by 0C bytes per room.
C88A LD B,$30 Number of rooms to set up.
C88C SET 3,(HL) Set bit 3 for this room
C88E ADD HL,DE Move to the next room.
C88F DJNZ $C88C Loop until all rooms are done.
C891 CALL $EF1E Make all moving objects visible.
C894 CALL $F345
Update the high score if necessary.
C897 LD HL,$C866 Put the current score in HL. (C866)
C89A LD DE,$C925 Put the current high score in DE. (C925)
C89D LD B,$04 4 digits to look at.
C89F LD A,(DE) Get the next high score digit.
C8A0 CP (HL) Is it lower than the current one?
C8A1 JR C,$C8AB Jump if so.
C8A3 JR NZ,$C8B6 Otherwise, skip if it isn't equal.
C8A5 INC DE Move to the next digit.
C8A6 INC HL
C8A7 DJNZ $C89F Loop while there are more digits to look at, then jump forward.
C8A9 JR $C8B6
The high score should be updated.
C8AB LD HL,$C866 Copy the current score to the highest score.
C8AE LD DE,$C925
C8B1 LD BC,$0004
C8B4 LDIR
C8B6 CALL $D378 Update the display area.
C8B9 LD HL,$CE56 Set 0 screns visited.
C8BC LD (HL),$00
C8BE DEC HL
C8BF LD (HL),$27
C8C1 LD HL,$C8D2 Make the current game stats the same as the defaults.
C8C4 LD DE,$C866
C8C7 LD BC,$001B
C8CA LDIR
C8CC LD A,$2B Switch to the start room and return.
C8CE CALL $CBBD
C8D1 RET
Prev: C880 Up: Map Next: C8D2