Prev: 25335 Up: Map Next: 25470
25374: New Game
Message_SprayBugs 25374 DEFM 71 "SPRAY THE BUGS"
25375 DEFM "SPRAY THE BUG","S"+128
Start New Game.
GameStart 25389 CALL CreateWindow Call CreateWindow.
25392 LD HL,28744 HL=28744.
25395 LD DE,25374 DE=Message_SprayBugs.
25398 CALL GameOverPrint_Pause Call GameOverPrint_Pause.
25401 LD HL,24069 Write 0 to 230 bytes from 1UP_Score_1.
25404 LD (HL),0
25406 LD D,H
25407 LD E,L
25408 INC DE
25409 LD BC,230
25412 LDIR
25414 CALL ResetPlayerData Call ResetPlayerData.
25417 CALL ResetModifiedCode Call ResetModifiedCode.
25420 CALL LevelNew Call LevelNew.
This entry point is used by the routines at NewActor and 29210.
Message_SprayBugs_0 25423 LD SP,23808 SP=23808.
25426 EI Enable interrupts.
25427 LD IX,24204 IX=State_Flower.
25431 XOR A Write 0 to CurrentBug_ID to reset the enemy counter.
25432 LD (24086),A
This entry point is used by the routines at FrameUpdate and NewActor.
MainLoop 25435 LD A,(23672) Compare FRAMES and LastFrame.
25438 LD C,A
25439 LD A,(24095)
If interrupts are enabled, then FrameUpdate will be called and DI executed.
25442 CP C If they are not equal call FrameUpdate.
25443 CALL NZ,FrameUpdate
25446 LD HL,28976 HL=generate new actor routine.
25449 PUSH HL Stash HL on the stack.
25450 LD HL,25470 HL=JumpTable_Main.
25453 LD A,(IX+0) Calculate the jump table offset.
25456 RLCA
25457 AND %01111110
PerformJump 25459 LD C,A BC=offset.
25460 LD B,0
25462 ADD HL,BC HL=Jump table + offset.
25463 LD A,(HL) HL=Fetch the jump address.
25464 INC HL
25465 LD H,(HL)
25466 LD L,A
25467 JP 23728 Jump to 23728 which does an indirect jump to the jump address.
View the equivalent code in;
Prev: 25335 Up: Map Next: 25470