Prev: F45D Up: Map Next: F4A6
F46F: Reset everything for next stage.
Used by the routine at Inv_BulletUpdate.
Invaders_NextStage F46F LD HL,(Inv_TypePtr) See if reached the last stage.
F472 LD A,(HL)
F473 CP $FF If not then reset invaders for next stage.
F475 JR NZ,Invaders_NextStage_1
F477 LD A,(WallyLives) Cap the max number of lives, player ca only have upto three lives.
F47A CP $03
F47C JR Z,Invaders_NextStage_0
F47E INC A Increase the number of lives and update on screen.
F47F LD (WallyLives),A
F482 CALL LifeDraw_Erase
Invaders_NextStage_0 F485 LD HL,Inv_FirstInvType Go back to first stage again.
Invaders_NextStage_1 F488 LD A,(HL) Reset invaders to current stage / animations.
F489 LD (Inv_CurrentFrame),A
F48C LD (Inv_StartFrame),A
F490 INC A
F491 LD (Inv_NextFrame),A
F494 LD A,(HL)
F495 LD (Inv_EndFrame),A
F498 INC HL Point to the next stage ready for next time level is cleared.
F499 LD (Inv_TypePtr),HL
F49C CALL Invaders_Init_XPos
F49F CALL Invaders_Init_YPos
F4A2 CALL Invaders_Init
Prev: F45D Up: Map Next: F4A6