mirror of
https://github.com/a2-4am/pitch-dark.git
synced 2024-09-27 04:54:48 +00:00
detect Z4 and Z5 saves
This commit is contained in:
parent
fef3ca735c
commit
cdd806d495
@ -219,19 +219,12 @@ CheckForSavedGames
|
|||||||
jsr GetFileInfo
|
jsr GetFileInfo
|
||||||
!word gPathname
|
!word gPathname
|
||||||
bcs @no ; no file -> no saved games
|
bcs @no ; no file -> no saved games
|
||||||
lda blocks+1
|
lda auxtype ; if low byte of auxtype is $3x, then saved and x is the last save slot
|
||||||
bne @yes ; file exists and is quite large -> assume saved games
|
|
||||||
lda blocks
|
|
||||||
cmp #$06 ; file exists but is small -> no saved games (.Z4/.Z5 files have a 5 block 'empty' .sav file)
|
|
||||||
bcc @no
|
|
||||||
@yes lda auxtype ; if low byte of auxtype is $3x, x is the last save slot
|
|
||||||
and #$F0
|
and #$F0
|
||||||
cmp #$30
|
cmp #$30
|
||||||
bne +
|
bne @no
|
||||||
lda auxtype
|
@yes lda auxtype
|
||||||
and #$0F
|
and #$0F
|
||||||
+HIDE_NEXT_2_BYTES
|
|
||||||
+ lda #$FF ; no save slot
|
|
||||||
sta gLastSavedGameSlot
|
sta gLastSavedGameSlot
|
||||||
lda #1
|
lda #1
|
||||||
+HIDE_NEXT_2_BYTES
|
+HIDE_NEXT_2_BYTES
|
||||||
|
Loading…
Reference in New Issue
Block a user