![]() |
Routines |
| Prev: C2EC | Up: Map | Next: C35D |
|
Used by the routine at COLLECTABLE.
Jumped to by COLLECTABLE when the fifth collectable reaches its place. Clears the buffer, fills the attributes with bright cyan, prints the six lines of WON_CONGRATULATIONS -- congratulations, the quest done (with a misspelling), and the next adventure named as Mire Mare -- clearing the screen-shown flag (FRAME_DRAWN) first, so that the list also draws the border and shows the screen -- then plays TUNE_WON to its end and goes on to the game-over screen.
Mire Mare was to be the next Sabreman game; it was never released.
|
||||
| WON | C302 | CALL CLEAR_BUFFER | clear the buffer; bright cyan on black | |
| C305 | LD A,$45 | |||
| C307 | CALL FILL_ATTRS | |||
| C30A | LD DE,WON_COLOURS | colours from WON_COLOURS, positions from WON_XY, strings from WON_CONGRATULATIONS: six lines | ||
| C30D | EXX | |||
| C30E | LD HL,WON_XY | |||
| C311 | LD DE,WON_CONGRATULATIONS | |||
| C314 | LD B,$06 | |||
| C316 | XOR A | the first list since the flag was cleared: border and screen too | ||
| C317 | LD (FRAME_DRAWN),A | |||
| C31A | CALL DISPLAY_TEXT_LIST | |||
| C31D | LD DE,TUNE_WON | the winning tune | ||
| C320 | CALL PLAY_TUNE | |||
|
This entry point is used by the routine at RESTART_PLAYER.
The game is over: from RESTART_PLAYER when the last life is lost, and after the win.
|
||||
| GAME_OVER | C323 | CALL CLEAR_BUFFER | clear the buffer; bright yellow on black | |
| C326 | LD A,$46 | |||
| C328 | CALL FILL_ATTRS | |||
| C32B | CALL PRINT_BORDER | border | ||
| C32E | LD DE,OVER_COLOURS | GAME OVER, PERCENTAGE OF QUEST and COMPLETED: colours from OVER_COLOURS, positions from OVER_XY, strings from OVER_GAME_OVER. The screen was shown once already this game, so the list only draws into the buffer | ||
| C331 | EXX | |||
| C332 | LD HL,OVER_XY | |||
| C335 | LD DE,OVER_GAME_OVER | |||
| C338 | LD B,$03 | |||
| C33A | CALL DISPLAY_TEXT_LIST | |||
| C33D | CALL PERCENTAGE | the percentage, into the buffer (PERCENTAGE) | ||
| C340 | XOR A | show it all. Clearing the flag here is redundant: the menu clears it again | ||
| C341 | LD (FRAME_DRAWN),A | |||
| C344 | CALL SHOW_BUFFER | |||
| C347 | LD DE,TUNE_OVER | the game-over tune | ||
| C34A | CALL PLAY_TUNE | |||
| C34D | LD B,$40 | about four seconds: 64 times 8192 turns of a 26 T-state loop | ||
| WON_0 | C34F | LD HL,$2000 | ||
| WON_1 | C352 | DEC HL | ||
| C353 | LD A,H | |||
| C354 | OR L | |||
| C355 | JR NZ,WON_1 | |||
| C357 | DJNZ WON_0 | |||
| C359 | POP HL | drop the return address -- the main loop's, or the one back into START -- and start again from the menu | ||
| C35A | JP AFTER_GAME | |||
| Prev: C2EC | Up: Map | Next: C35D |