Prev: AC69 Up: Map Next: ACA8
AC6D: Save Game
Used by the routines at Action_Save and Action_Quit.
Copy the configurable exits into the save buffer and write them to tape.
SaveGame AC6D LD A,($AEFA) Read the configurable-exit count into A.
AC70 OR A Jump to SaveGame_StartTape if A is zero.
AC71 JR Z,SaveGame_StartTape
B counts the exits, IX walks their addresses and DE the save buffer.
AC73 LD B,A Take the exit count and point at the exit table and the save buffer.
AC74 LD IX,($AEE6)
AC78 LD DE,$AE9B
AC7B JR SaveGame_0 Start with the first configurable exit.
SaveGame_CopyExit AC7D INC IX Copy each configurable exit's current destination into the save buffer.
AC7F INC IX
AC81 INC DE
SaveGame_0 AC82 LD L,(IX+$00)
AC85 LD H,(IX+$01)
AC88 LD A,(HL)
AC89 LD (DE),A
AC8A DJNZ SaveGame_CopyExit
SaveGame_StartTape AC8C LD HL,$B05A Print "SAVING. Start tape,press any key." and start a new line.
AC8F CALL PrintStringAndANewline
AC92 CALL GetUserInput Call GetUserInput to read the player's key.
AC95 LD IX,$AD76 Point IX at the item-location table.
AC99 LD DE,$0186 Save 0186 bytes from the item-location table to tape as a data block.
AC9C LD A,$FF
AC9E CALL $04C2
ACA1 LD HL,$B07C Print "Stop tape.Saving complete." and start a new line.
ACA4 CALL PrintStringAndANewline
ACA7 RET Return.
Prev: AC69 Up: Map Next: ACA8