peasant: be sure not to mess with state if loading from savegame
This commit is contained in:
parent
467d1f5bef
commit
bc106806ab
|
@ -216,6 +216,9 @@ just_go_there:
|
||||||
;************************
|
;************************
|
||||||
level_over:
|
level_over:
|
||||||
|
|
||||||
|
cmp #NEW_FROM_LOAD ; see if loading save game
|
||||||
|
beq exiting_cliff
|
||||||
|
|
||||||
; new location
|
; new location
|
||||||
; in theory this can only be TROGDOR
|
; in theory this can only be TROGDOR
|
||||||
|
|
||||||
|
@ -227,7 +230,7 @@ level_over:
|
||||||
lda #0
|
lda #0
|
||||||
sta PEASANT_XADD
|
sta PEASANT_XADD
|
||||||
sta PEASANT_YADD
|
sta PEASANT_YADD
|
||||||
|
exiting_cliff:
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -256,6 +256,8 @@ oops_new_location:
|
||||||
;========================
|
;========================
|
||||||
level_over:
|
level_over:
|
||||||
|
|
||||||
|
; NOTE: check for load from savegame if modify game state
|
||||||
|
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -329,6 +329,11 @@ oops_new_location:
|
||||||
; exit level
|
; exit level
|
||||||
;========================
|
;========================
|
||||||
level_over:
|
level_over:
|
||||||
|
|
||||||
|
cmp #NEW_FROM_LOAD ; skip ahead if load from disk
|
||||||
|
beq really_level_over
|
||||||
|
|
||||||
|
|
||||||
lda MAP_LOCATION
|
lda MAP_LOCATION
|
||||||
cmp #LOCATION_OUTSIDE_INN
|
cmp #LOCATION_OUTSIDE_INN
|
||||||
bne really_level_over
|
bne really_level_over
|
||||||
|
|
|
@ -491,7 +491,7 @@ load_loop:
|
||||||
cpx #(END_OF_SAVE-WHICH_LOAD+1)
|
cpx #(END_OF_SAVE-WHICH_LOAD+1)
|
||||||
bne load_loop
|
bne load_loop
|
||||||
|
|
||||||
lda #NEW_FROM_DISK ; load whole level from disk
|
lda #NEW_FROM_LOAD ; load whole level from disk
|
||||||
sta LEVEL_OVER
|
sta LEVEL_OVER
|
||||||
|
|
||||||
done_load:
|
done_load:
|
||||||
|
|
|
@ -423,7 +423,7 @@ no_draw_gary_flies:
|
||||||
|
|
||||||
lda LEVEL_OVER
|
lda LEVEL_OVER
|
||||||
bmi oops_new_location
|
bmi oops_new_location
|
||||||
bne game_over
|
bne level_over
|
||||||
|
|
||||||
; delay
|
; delay
|
||||||
|
|
||||||
|
@ -459,7 +459,7 @@ at_old_well:
|
||||||
|
|
||||||
lda #NEW_FROM_DISK ; needed?
|
lda #NEW_FROM_DISK ; needed?
|
||||||
sta LEVEL_OVER
|
sta LEVEL_OVER
|
||||||
jmp game_over
|
jmp level_over
|
||||||
|
|
||||||
skip_level_specific:
|
skip_level_specific:
|
||||||
|
|
||||||
|
@ -470,7 +470,8 @@ skip_level_specific:
|
||||||
;************************
|
;************************
|
||||||
; exit level
|
; exit level
|
||||||
;************************
|
;************************
|
||||||
game_over:
|
level_over:
|
||||||
|
; note: check reason for load if changing gamestate
|
||||||
|
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
|
|
@ -353,6 +353,8 @@ oops_new_location:
|
||||||
; exit level
|
; exit level
|
||||||
;========================
|
;========================
|
||||||
level_over:
|
level_over:
|
||||||
|
cmp #NEW_FROM_LOAD ; skip to end if loading save game
|
||||||
|
bne really_level_over
|
||||||
|
|
||||||
; specical case if going outside inn
|
; specical case if going outside inn
|
||||||
; we don't want to end up behind inn
|
; we don't want to end up behind inn
|
||||||
|
|
|
@ -226,7 +226,7 @@ game_loop:
|
||||||
|
|
||||||
lda LEVEL_OVER
|
lda LEVEL_OVER
|
||||||
bmi oops_new_location
|
bmi oops_new_location
|
||||||
bne game_over
|
bne level_over
|
||||||
|
|
||||||
;=====================
|
;=====================
|
||||||
; always draw peasant
|
; always draw peasant
|
||||||
|
@ -279,7 +279,10 @@ oops_new_location:
|
||||||
;************************
|
;************************
|
||||||
; exit level
|
; exit level
|
||||||
;************************
|
;************************
|
||||||
game_over:
|
level_over:
|
||||||
|
|
||||||
|
; FIXME: check for load from savegame if modifying game state
|
||||||
|
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -333,7 +333,7 @@ not_ned_cottage:
|
||||||
|
|
||||||
lda LEVEL_OVER
|
lda LEVEL_OVER
|
||||||
bmi oops_new_location
|
bmi oops_new_location
|
||||||
bne game_over
|
bne level_over
|
||||||
|
|
||||||
|
|
||||||
; delay
|
; delay
|
||||||
|
@ -351,7 +351,9 @@ oops_new_location:
|
||||||
;************************
|
;************************
|
||||||
; exit level
|
; exit level
|
||||||
;************************
|
;************************
|
||||||
game_over:
|
level_over:
|
||||||
|
|
||||||
|
; note: check for load from savegame if change state
|
||||||
|
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue