![]() |
Routines |
| Prev: F050 | Up: Map | Next: F0D2 |
|
Used by the routine at START.
Reached from the start-up (START) and never left. The title is room 79 drawn (DRAW_CURRENT_ROOM), coloured (ATTRI), with the title page printed over it (TITLE_PAGE_TEXT) and, in Release 2, 9-JOY beside the controls; then it waits for a key. ROOM is kept round the drawing, though the copy from the master a moment later sets it anyway.
A key starts a game (NEW_GAME, at offset 36). The master copies made at start-up (MASTER_OBJECTS) go back: the object table's first 1200 bytes, and the 61 bytes of variables from IY on. TELE, the author's name for offset 54, puts the knight's record back as a game starts it and enters the room ROOM names (ROOMST). That call returns only when the game is over: LIFE gone, the quest's last room reached, or 0 pressed with SYMBOL SHIFT (MAIN_LOOP). Then SAVE_OBJECT_POSITIONS puts the room's things back into the object table, and room 1 is drawn as the backdrop for GAME OVER, which waits for the keys to be let go and one pressed (WAIT) before the title comes round again.
TELE is also where the thing that carries the knight off (type 9, MAIN_LOOP) goes, with ROOM set to 30, so he arrives as a new game starts him. The knight's +$0E is kept through the copy: its bits 5 and 6 say which way his sprites face, and they are turned round in place (MIMAN), so the record must go on agreeing with them.
In Release 1 the routine begins by setting IY, turning interrupts off and making the start-up's copies, which Release 2 moved into START, and there is no 9-JOY. The name the author gave this routine is lost but for its last letter, G (SYMBOL_TABLE). Krumlinde's name for it is RTN_Title_Screen_Loop.
|
||||
| TITLE_SCREEN | F065 | LD A,(ROOM) | The title: room 79, with ROOM kept round it | |
| F068 | PUSH AF | |||
| F069 | LD (IY+ROOM-V),$4F | |||
| F06D | CALL DRAW_CURRENT_ROOM | |||
| F070 | POP AF | |||
| F071 | LD (ROOM),A | |||
| F074 | CALL ATTRI | Coloured | ||
| F077 | CALL TITLE_PAGE_TEXT | The title page's text | ||
| F07A | CALL PRINT | And Release 2's note that 9 turns the joystick on | ||
| F07D | DEFB $C8,$C8,$50 | Print at x 200, y 80 | ||
| F080 | DEFB $24,$26,$0A,$0F,$19 | "9-JOY" | ||
| F085 | DEFB $A4 | End of the string | ||
| F086 | CALL PAUS | |||
| NEW_GAME | F089 | LD HL,MASTER_OBJECTS | NEW_GAME: the object table's master copy back | |
| F08C | LD DE,OBJECTS | |||
| F08F | LD BC,$04B0 | |||
| F092 | LDIR | |||
| F094 | LD DE,OBJECT_COUNT | And the variables' (HL runs on from the one to the other) | ||
| F097 | LD C,$3D | |||
| F099 | LDIR | |||
|
This entry point is used by the routine at MAIN_LOOP.
|
||||
| TELE | F09B | LD A,(KNIGHT_FLAGS) | TELE: the knight's record from the master, but for his +$0E | |
| F09E | LD HL,MASTER_KNIGHT | |||
| F0A1 | LD DE,KNIGHT | |||
| F0A4 | LD BC,$0014 | |||
| F0A7 | LDIR | |||
| F0A9 | LD (KNIGHT_FLAGS),A | |||
| F0AC | CALL ROOMST | Play: back here when the game is over | ||
| F0AF | CALL SAVE_OBJECT_POSITIONS | The room's things back into the object table, and the creatures' sprites turned back | ||
| F0B2 | LD (IY+ROOM-V),$01 | Room 1 as GAME OVER's backdrop | ||
| F0B6 | CALL DRAW_CURRENT_ROOM | |||
| F0B9 | CALL PRINT | GAME OVER | ||
| F0BC | DEFB $C8,$5A,$64 | Print at x 90, y 100 | ||
| F0BF | DEFB $07,$01,$0D,$05,$00,$0F,$16,$05 | "GAME OVER" | ||
| F0C7 | DEFB $12 | |||
| F0C8 | DEFB $A4 | End of the string | ||
| F0C9 | CALL ATTRI | |||
| F0CC | CALL WAIT | Wait for the keys to be let go and one pressed; the title again | ||
| F0CF | JP TITLE_SCREEN | |||
| Prev: F050 | Up: Map | Next: F0D2 |