![]() |
Routines |
| Prev: 7254 | Up: Map | Next: 730D |
|
Used by the routine at Handler_LevelReset.
|
||||
|
Skip over anything fancy if the game is in demo mode.
|
||||
| Handler_LevelComplete | 72C9 | LD A,($66F3) | Jump to InitialiseLevel if *Flag_ActiveDemoMode is active. | |
| 72CC | OR A | |||
| 72CD | JP NZ,InitialiseLevel | |||
|
The alien mothership only appears in phase 04 so skip over all the clearing routine unless this is phase 04.
|
||||
| 72D0 | LD A,($66F1) | If *Phase is not equal to 04 call PrintHeader and then jump to LevelComplete_DrawShip. | ||
| 72D3 | CP $04 | |||
| 72D5 | CALL NZ,PrintHeader | |||
| 72D8 | JR NZ,LevelComplete_DrawShip | |||
|
Clear the mothership phase playfield.
|
||||
| 72DA | CALL PrintLives | Call PrintLives. | ||
| 72DD | LD HL,$5940 | HL=5940 (attribute buffer location). | ||
| 72E0 | LD C,$02 | Set a row counter in C for 02 rows. | ||
| ClearMothership_RowLoop | 72E2 | LD B,$E0 | Set a column counter in B for E0 columns. | |
| ClearMothership_Loop | 72E4 | PUSH BC | Stash the row, column counters and attribute buffer pointer on the stack. | |
| 72E5 | PUSH HL | |||
| 72E6 | LD A,(HL) | Jump to ClearMothership_Next if the attribute byte being pointed to is either INK:RED, PAPER:BLACK (02) or INK:BLACK, PAPER:RED (10). | ||
| 72E7 | CP $02 | |||
| 72E9 | JR Z,ClearMothership_Next | |||
| 72EB | CP $10 | |||
| 72ED | JR Z,ClearMothership_Next | |||
| 72EF | CP $16 | Is the attribute byte being pointed to INK:YELLOW, PAPER:RED? | ||
| 72F1 | LD A,$00 | Set A to BLACK (00). | ||
| 72F3 | JR NZ,ClearMothership_Write | Jump to ClearMothership_Write if the attribute byte being pointed to is INK:YELLOW, PAPER:RED. | ||
| 72F5 | LD A,$10 | Set A to INK:BLACK, PAPER:RED (10). | ||
| ClearMothership_Write | 72F7 | LD (HL),A | Write the attribute value in A to the attribute buffer. | |
| 72F8 | CALL ConvertAttributeToScreenBufferAddress | Call ConvertAttributeToScreenBufferAddress. | ||
| 72FB | XOR A | Set A to 00 (clearing/ empty value). | ||
| 72FC | LD B,$08 | Set a line counter in B (08 lines in a character block). | ||
| ClearMothership_ClearLine_Loop | 72FE | LD (HL),A | Write the empty data to the screen buffer pointer. | |
| 72FF | INC H | Move down one pixel line in the screen buffer. | ||
| 7300 | DJNZ ClearMothership_ClearLine_Loop | Decrease the line counter by one and loop back to ClearMothership_ClearLine_Loop until all 08 lines of the character block have been erased. | ||
| ClearMothership_Next | 7302 | POP HL | Restore the attribute buffer pointer from the stack. | |
| 7303 | INC HL | Move to the next attribute byte. | ||
| 7304 | POP BC | Restore the row and column counters from the stack. | ||
| 7305 | DJNZ ClearMothership_Loop | Decrease the column counter by one and loop back to ClearMothership_Loop until all of the column blocks have been erased. | ||
| 7307 | DEC C | Decrease the row counter by one. | ||
| 7308 | JR NZ,ClearMothership_RowLoop | Jump back to ClearMothership_RowLoop until all of the rows have been processed. | ||
|
Redraw the players ship on the screen.
|
||||
| LevelComplete_DrawShip | 730A | CALL DrawShip | Call DrawShip. | |
|
Continue on to Handler_DisplayMothershipBonus.
|
||||
| Prev: 7254 | Up: Map | Next: 730D |