Prev: 72E1 Up: Map Next: 7367
730E: Handler: Room 06
Handles room 06 logic (the starting screen). The current level in B controls which objects are initialised or activated on each pass, progressively setting up more objects as the level increases.
Levels Baddies
01 Spider
02 Cat, UFO
03 Spider, Cat, Helicopter
04 Spider, Cat, Helicopter, Plane
05+ Cat, Helicopter, Plane, Walking Paratrooper
Input
B Current level
Handler_Room06 730E LD A,B Copy the current level into A.
Add the spider during levels 01 03 and 04.
730F LD IX,$DAC8 IX=Sprite02_3Wide_X_Position.
7313 PUSH AF Stash the current level on the stack.
7314 CP $01 Call Handler_Spider if this is level 01, 03 or 04.
7316 CALL Z,Handler_Spider
7319 CP $03
731B CALL Z,Handler_Spider
731E CP $04
7320 CALL Z,Handler_Spider
7323 POP AF Restore the current level from the stack.
Add a cat (return early if still in level 01).
7324 LD IX,$DACC IX=Sprite03_3Wide_X_Position.
7328 CP $01 Return if this is level 01.
732A RET Z
732B PUSH AF Stash the current level on the stack.
732C CALL Handler_Cat Call Handler_Cat.
732F POP AF Restore the current level from the stack.
Add the UFO if level 02 or the helicopter for level 03 and above.
7330 LD IX,$DAD0 IX=Sprite04_3Wide_X_Position.
7334 CP $02 Is this level 02?
7336 PUSH AF Stash the current level on the stack.
7337 CALL Z,Handler_UFO Call Handler_UFO if this is level 02.
733A POP AF Restore the current level from the stack.
733B RET Z Return if this was level 02.
733C PUSH AF Stash the current level on the stack.
733D CALL Handler_Helicopter Call Handler_Helicopter.
7340 POP AF Restore the current level from the stack.
7341 CP $03 Return if this is level 03.
7343 RET Z Return.
Add the fourth object (plane) during level 04.
7344 LD IX,$DAD4 IX=Sprite05_3Wide_X_Position.
7348 PUSH AF Stash the current level on the stack.
7349 LD IY,$750D IY=Helicopter_State_Data_2.
734D CP $04 Call Handler_Helicopter_Entry if this is level 04.
734F CALL Z,Handler_Helicopter_Entry
7352 POP AF Restore the current level from the stack.
7353 CP $04 Return if this is level 04.
7355 RET Z Return.
Add the walking paratrooper from level 05 onwards.
7356 LD IX,$DAD8 IX=Sprite06_3Wide_X_Position.
735A PUSH AF Stash the current level on the stack.
735B CALL Handler_Walking_Paratrooper Call Handler_Walking_Paratrooper.
735E POP AF Restore the current level from the stack.
Update the fourth object (plane).
735F LD IX,$DAD4 IX=Sprite05_3Wide_X_Position.
7363 CALL Handler_Plane Call Handler_Plane.
7366 RET Return.
Prev: 72E1 Up: Map Next: 7367