Prev: 62F7 Up: Map Next: 637E
631E: New Game
Message_SprayBugs 631E DEFM $47 "SPRAY THE BUGS"
631F DEFM "SPRAY THE BUG","S"+$80
Start New Game.
GameStart 632D CALL CreateWindow Call CreateWindow.
6330 LD HL,$7048 HL=7048.
6333 LD DE,$631E DE=Message_SprayBugs.
6336 CALL GameOverPrint_Pause Call GameOverPrint_Pause.
6339 LD HL,$5E05 Write 00 to E6 bytes from 1UP_Score_1.
633C LD (HL),$00
633E LD D,H
633F LD E,L
6340 INC DE
6341 LD BC,$00E6
6344 LDIR
6346 CALL ResetPlayerData Call ResetPlayerData.
6349 CALL ResetModifiedCode Call ResetModifiedCode.
634C CALL LevelNew Call LevelNew.
This entry point is used by the routines at NewActor and 721A.
Message_SprayBugs_0 634F LD SP,$5D00 SP=5D00.
6352 EI Enable interrupts.
6353 LD IX,$5E8C IX=State_Flower.
6357 XOR A Write 00 to CurrentBug_ID to reset the enemy counter.
6358 LD ($5E16),A
This entry point is used by the routines at FrameUpdate and NewActor.
MainLoop 635B LD A,($5C78) Compare FRAMES and LastFrame.
635E LD C,A
635F LD A,($5E1F)
If interrupts are enabled, then FrameUpdate will be called and DI executed.
6362 CP C If they are not equal call FrameUpdate.
6363 CALL NZ,FrameUpdate
6366 LD HL,$7130 HL=generate new actor routine.
6369 PUSH HL Stash HL on the stack.
636A LD HL,$637E HL=JumpTable_Main.
636D LD A,(IX+$00) Calculate the jump table offset.
6370 RLCA
6371 AND %01111110
PerformJump 6373 LD C,A BC=offset.
6374 LD B,$00
6376 ADD HL,BC HL=Jump table + offset.
6377 LD A,(HL) HL=Fetch the jump address.
6378 INC HL
6379 LD H,(HL)
637A LD L,A
637B JP $5CB0 Jump to 5CB0 which does an indirect jump to the jump address.
View the equivalent code in;
Prev: 62F7 Up: Map Next: 637E