Prev: 6C3C Up: Map Next: 6C7A
6C58: Initialise New Game
Used by the routines at StartGame, 64E8 and NextLevel.
GameInit 6C58 LD A,($5F2D) A=1UP_Level.
6C5B RLCA A=A * 2.
6C5C AND %01110000 Keep only bits 4-6.
6C5E ADD A,$10 Add 10.
6C60 LD ($5F2F),A Write this to 1UP_Nasties.
6C63 LD HL,$5F55 Write 0A to BufferIngredients.
6C66 LD (HL),$0A
6C68 INC HL Write 20 to 5F56.
6C69 LD (HL),$20
The number of Nasties to spawn maxes at 99.
6C6B LD HL,$5F30 A=1UP_Ingredients.
6C6E LD A,(HL)
6C6F ADD A,$01 A=A + 01 (with "Decimal Adjust after Addition").
6C71 DAA
6C72 CP $99 If A is already 99 jump to GameInit_Return.
6C74 JR C,GameInit_Return
6C76 LD A,$99 A=99.
GameInit_Return 6C78 LD (HL),A Write A to HL.
6C79 RET Return.
Prev: 6C3C Up: Map Next: 6C7A