textelite 1.1 finalize load/save, add it to examplesd disk

This commit is contained in:
Irmen de Jong 2020-10-20 21:49:06 +02:00
parent 3eaf111e7d
commit 2ba6c9ccbe
3 changed files with 1 additions and 4 deletions

Binary file not shown.

Binary file not shown.

View File

@ -9,9 +9,6 @@
; Note: this program is compatible with C64 and CX16. ; Note: this program is compatible with C64 and CX16.
; TODO error check on load, now wipes cash and fuel etc when load fails
; TODO finalize and test save/load game function
main { main {
const ubyte numforLave = 7 ; Lave is 7th generated planet in galaxy one const ubyte numforLave = 7 ; Lave is 7th generated planet in galaxy one
@ -102,6 +99,7 @@ trader {
txt.print("\ni/o error: ") txt.print("\ni/o error: ")
diskio.status(8) diskio.status(8)
txt.chrout('\n') txt.chrout('\n')
return
} }
ship.cash = savedata.cash ship.cash = savedata.cash
@ -109,7 +107,6 @@ trader {
ship.fuel = savedata.fuel ship.fuel = savedata.fuel
memcopy(&savedata.cargo0, ship.cargohold, len(ship.cargohold)) memcopy(&savedata.cargo0, ship.cargohold, len(ship.cargohold))
galaxy.travel_to(savedata.galaxy, savedata.planet) galaxy.travel_to(savedata.galaxy, savedata.planet)
; TODO CHECK IF GALAXY AND MARKET ARE OKAY AFTER LOAD
planet.display(false) planet.display(false)
} }