mirror of
https://github.com/a2-4am/pitch-dark.git
synced 2024-06-13 18:29:28 +00:00
fix catalog previous/next buttons when there are more than 2 pages
This commit is contained in:
parent
079989c27f
commit
095d2e6d93
|
@ -212,22 +212,26 @@ isUppercaseKey
|
||||||
catalog_next
|
catalog_next
|
||||||
lda startIndex
|
lda startIndex
|
||||||
clc
|
clc
|
||||||
adc #MAXGAMES ; page forward and refresh
|
adc #MAXGAMES
|
||||||
cmp gameCount
|
cmp gameCount
|
||||||
beq @good
|
bcc +
|
||||||
bcc @good
|
lda #0
|
||||||
jmp catalog_previous
|
+ sta startIndex
|
||||||
@good sta startIndex
|
|
||||||
jmp RefreshCatalog
|
jmp RefreshCatalog
|
||||||
|
|
||||||
catalog_previous
|
catalog_previous
|
||||||
lda startIndex
|
lda startIndex
|
||||||
bne @1
|
|
||||||
jmp catalog_next
|
|
||||||
@1
|
|
||||||
sec
|
sec
|
||||||
sbc #MAXGAMES ; page back and refresh
|
sbc #MAXGAMES
|
||||||
sta startIndex
|
bcs +
|
||||||
|
lda #0
|
||||||
|
- clc
|
||||||
|
adc #MAXGAMES
|
||||||
|
cmp gameCount
|
||||||
|
bcc -
|
||||||
|
sec
|
||||||
|
sbc #MAXGAMES
|
||||||
|
+ sta startIndex
|
||||||
jmp RefreshCatalog
|
jmp RefreshCatalog
|
||||||
|
|
||||||
catalog_main
|
catalog_main
|
||||||
|
|
Loading…
Reference in New Issue
Block a user