Prev: F314 Up: Map Next: F3A0
F336: Invaders : Initialise
Input
Output
Invaders_Init F336 LD HL,(Inv_TypePtr)
F339 LD DE,Inv_FirstInvType
F33C AND A
F33D SBC HL,DE
F33F LD A,L
F340 RR A
F342 ADD A,$1D
F344 LD (Wally_RoomNo),A
F347 CALL ScreenClearEffect
F34A CALL Draw_CeilingWallFloor Draw the room's border.
F34D LD DE,$0F00 Draw left hand door in the wall.
F350 LD HL,item_dc31
F353 CALL FurnitureDraw
F356 CALL Wally_Draw Draw Wally.
F359 LD HL,Invaders_Data Draw each invader.
F35C LD B,$18
Invaders_Init_0 F35E LD A,(HL)
F35F LD E,A
F360 INC HL
F361 LD D,(HL)
F362 INC HL
F363 CP $FE
F365 JR Z,Invaders_Init_3
F367 LD (BitmapX),DE
F36B PUSH HL
F36C LD DE,(Inv_DataPtr)
F370 INC DE
F371 AND A
F372 SBC HL,DE
F374 JR NC,Invaders_Init_1
F376 LD A,(Inv_NextFrame)
F379 JR Invaders_Init_2
Invaders_Init_1 F37B LD A,(Inv_CurrentFrame)
Invaders_Init_2 F37E POP HL
F37F CALL Bitmap16Draw
Invaders_Init_3 F382 DJNZ Invaders_Init_0
F384 LD HL,Arcade_ExplosionSlots Reset all explosion animations to 'not active'.
Invaders_Init_4 F387 LD A,(HL) Check for end of data marker.
F388 CP $FE
F38A JR Z,Invaders_Init_5
F38C LD (HL),$FF
F38E INC HL
F38F INC HL
F390 INC HL
F391 JR Invaders_Init_4
Invaders_Init_5 F393 LD B,$03 Number of possible bombs.
F395 LD HL,Arcade_BombData Reset all bombs to 'not active'.
Invaders_Init_6 F398 LD (HL),$FF
F39A INC HL
F39B INC HL
F39C INC HL
F39D DJNZ Invaders_Init_6
F39F RET
Prev: F314 Up: Map Next: F3A0