mirror of
https://github.com/a2-4am/4cade.git
synced 2024-12-27 12:30:30 +00:00
Merge branch 'master' of https://github.com/a2-4am/4cade
This commit is contained in:
commit
14d0666e13
@ -7,7 +7,7 @@
|
||||
;
|
||||
; LC RAM BANK 1
|
||||
; D000..E789 - persistent data structures (gGlobalPrefsStore, gGamesListStore)
|
||||
; E962..FFF1 - main program code
|
||||
; E976..FFF1 - main program code
|
||||
; FFF2..FFF9 - API functions and global constants available for main program
|
||||
; code, prelaunchers, transition effects, &c.
|
||||
; (Wait/UnwaitForVBL, MockingboardStuff, MachineStatus)
|
||||
|
24
src/okvs.a
24
src/okvs.a
@ -95,11 +95,13 @@ okvs_init
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; okvs_len
|
||||
; okvs_len_imm
|
||||
;
|
||||
; in: A/Y = handle to storage space
|
||||
; out: $WCOUNT contains number of keys in this store
|
||||
; X preserved
|
||||
; A, Y clobbered
|
||||
; Z set if no keys
|
||||
; $00/$01 clobbered
|
||||
; $02/$03 clobbered
|
||||
;------------------------------------------------------------------------------
|
||||
@ -107,11 +109,13 @@ okvs_len
|
||||
jsr GetStoreAddressFromAY
|
||||
; PTR -> store
|
||||
; Y = 0
|
||||
okvs_len_imm
|
||||
lda (PTR), y ; get number of keys in store (word)
|
||||
sta WCOUNT
|
||||
iny
|
||||
lda (PTR), y
|
||||
sta WCOUNT+1
|
||||
ora WCOUNT
|
||||
rts
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
@ -242,16 +246,8 @@ okvs_get
|
||||
jsr GetStoreAddress
|
||||
; PTR -> store
|
||||
; Y = 0
|
||||
lda (PTR),y ; A = number of keys in store
|
||||
sta WCOUNT
|
||||
iny
|
||||
lda (PTR),y
|
||||
sta WCOUNT+1
|
||||
bne +
|
||||
dey
|
||||
lda (PTR),y
|
||||
jsr okvs_len_imm
|
||||
beq @fail ; no keys, fail immediately
|
||||
+
|
||||
jsr incptr4
|
||||
; PTR -> first record
|
||||
+LDPARAMPTR 3, SRC ; SRC -> key we want to find
|
||||
@ -433,16 +429,8 @@ okvs_iter_values
|
||||
jsr GetStoreAddress
|
||||
; PTR -> store
|
||||
; Y = 0
|
||||
lda (PTR),y ; get number of keys in store (word)
|
||||
sta WCOUNT
|
||||
iny
|
||||
lda (PTR),y
|
||||
sta WCOUNT+1
|
||||
bne +
|
||||
dey
|
||||
lda (PTR),y
|
||||
jsr okvs_len_imm
|
||||
beq @exit ; no keys, exit immediately
|
||||
+
|
||||
+LDPARAMPTR 3, @callback
|
||||
jsr incptr4
|
||||
; PTR -> first record
|
||||
|
Loading…
Reference in New Issue
Block a user