![]() |
Routines |
| Prev: 69A1 | Up: Map | Next: 6A1C |
|
Used by the routine at Action_Load.
Load a game position from tape and redraw the room.
|
||||
| LoadFromTape | 69DC | LD HL,$63B2 | Print LOADING. Start tape.. | |
| 69DF | CALL PrintStringAndANewline | |||
| 69E2 | LD IX,$61AB | The loaded game is written over the object locations. | ||
| 69E6 | LD DE,$00B4 | Load a data block of B4 bytes over the object locations. | ||
| 69E9 | LD A,$FF | |||
| 69EB | SCF | Ask the ROM to load the block rather than verify it. | ||
| 69EC | CALL $0556 | Call LD_BYTES. | ||
| 69EF | JR C,LoadFromTape_Step1 | Restore the saved bytes when the tape block has loaded. | ||
| 69F1 | LD HL,$63C7 | Print Tape error.. | ||
| 69F4 | CALL PrintStringAndANewline | |||
| 69F7 | RET | Return. | ||
| LoadFromTape_Step1 | 69F8 | LD A,($62DC) | Fetch how many locations the save file stores. | |
| 69FB | OR A | Return if the save file stores no locations. | ||
| 69FC | RET Z | |||
| 69FD | LD B,A | Prepare to copy each saved location back into the game. | ||
| 69FE | LD IX,($62DE) | |||
| 6A02 | LD DE,$622D | |||
| 6A05 | JR LoadFromTape_Step2 | |||
| LoadFromTape_Loop1 | 6A07 | INC IX | Step to the next saved-location pointer. | |
| 6A09 | INC IX | |||
| 6A0B | INC DE | |||
| LoadFromTape_Step2 | 6A0C | LD L,(IX+$00) | Read the address of this saved location. | |
| 6A0F | LD H,(IX+$01) | |||
| 6A12 | LD A,(DE) | Read the byte saved for that location. | ||
| 6A13 | LD (HL),A | Write it back into the game. | ||
| 6A14 | DJNZ LoadFromTape_Loop1 | Repeat for the remaining saved locations. | ||
| 6A16 | LD E,$00 | Show the room picture even if it has been seen before. | ||
| 6A18 | CALL Handler_DisplayRoom | Call Handler_DisplayRoom to display the room. | ||
| 6A1B | RET | Return. | ||
| Prev: 69A1 | Up: Map | Next: 6A1C |