![]() |
Routines |
| Prev: 42442 | Up: Map | Next: 42567 |
|
Used by the routine at Action_Load.
|
||||
|
Print "LOADING. Press PLAY.".
|
||||
| LoadTape | 42501 | LD HL,43285 | HL=Messaging_LoadingPressPlay. | |
| 42504 | CALL PrintStringAndNewline | Call PrintStringAndNewline. | ||
| 42507 | LD IX,42604 | Load the starting address into IX at Table_ItemEventLocations. | ||
| 42511 | LD DE,390 | Set the block length in DE to 390 bytes. | ||
| 42514 | LD A,255 | Set A to 255 which indicates this is a data block. | ||
| 42516 | SCF | Set the carry flag to indicate this is loading. | ||
| 42517 | CALL 1366 | Call LD_BYTES. | ||
| 42520 | JR C,LoadTape_Success | Jump to LoadTape_Success if the data block loaded. | ||
|
Print "Tape error.
Press any key to restart.".
|
||||
| 42522 | LD HL,43306 | HL=Messaging_TapeError. | ||
| 42525 | CALL PrintStringAndNewline | Call PrintStringAndNewline. | ||
| 42528 | SCF | Set the carry flag to signal that loading failed. | ||
| 42529 | RET | Return. | ||
|
There is nothing to unpack when no configurable exits were saved.
|
||||
| LoadTape_Success | 42530 | LD A,(42992) | Read the configurable-exit count into A. | |
| 42533 | OR A | Return if there are no configurable exits to unpack. | ||
| 42534 | RET Z | |||
| 42535 | LD B,A | Copy the configurable-exit count into B. | ||
| 42536 | LD IX,(42972) | IX=*Pointer_ConfigurableExits. | ||
| 42540 | LD DE,42897 | DE=Buffer_LoadSave. | ||
| 42543 | JR LoadTape_Write | Jump to LoadTape_Write. | ||
|
The next saved exit address.
|
||||
| LoadTape_WriteLoop | 42545 | INC IX | Move IX on to the next exit address. | |
| 42547 | INC IX | |||
| 42549 | INC DE | Move DE on to the next packed exit byte. | ||
| LoadTape_Write | 42550 | LD L,(IX+0) | Fetch the exit address from *IX into HL. | |
| 42553 | LD H,(IX+1) | |||
| 42556 | LD A,(DE) | Write that packed exit byte back into the game. | ||
| 42557 | LD (HL),A | |||
| 42558 | DJNZ LoadTape_WriteLoop | Decrease the unpack counter and loop back to LoadTape_WriteLoop until every exit byte is restored. | ||
| 42560 | LD E,0 | E=0. | ||
| 42562 | CALL Handler_DisplayRoomImage | Call Handler_DisplayRoomImage. | ||
| 42565 | AND A | Clear the carry flag to signal that loading succeeded. | ||
| 42566 | RET | Return. | ||
|
View the equivalent code in;
|
||||
| Prev: 42442 | Up: Map | Next: 42567 |