upgrade navigation on browse screen and start adding minor arcana
This commit is contained in:
parent
0f8152a803
commit
2bc8134741
@ -123,9 +123,20 @@ Spreads:
|
|||||||
db 18, " Month by month "
|
db 18, " Month by month "
|
||||||
|
|
||||||
.end
|
.end
|
||||||
|
AdjacentCards:
|
||||||
|
.Downs:
|
||||||
|
db 26
|
||||||
|
db 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
|
||||||
|
db 22, 23, 24, 25, 25, 25, 25, 25, 25, 25, 25, 25,
|
||||||
|
db 0, 1, 2, 3
|
||||||
|
.Ups:
|
||||||
|
db 26
|
||||||
|
db 22, 23, 24, 25, 25, 25, 25, 25, 25, 25
|
||||||
|
db 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 9, 9,
|
||||||
|
db 10, 11, 12, 13,
|
||||||
|
|
||||||
Cards:
|
Cards:
|
||||||
db 22 ; length
|
db 26 ; length
|
||||||
db BANK(TheFool)
|
db BANK(TheFool)
|
||||||
dw TheFool
|
dw TheFool
|
||||||
db BANK(TheMagician)
|
db BANK(TheMagician)
|
||||||
@ -171,6 +182,16 @@ Cards:
|
|||||||
db BANK(TheWorld)
|
db BANK(TheWorld)
|
||||||
dw TheWorld
|
dw TheWorld
|
||||||
|
|
||||||
|
db BANK(Cups11Page)
|
||||||
|
dw Cups11Page
|
||||||
|
db BANK(Cups11Page)
|
||||||
|
dw Cups11Page
|
||||||
|
db BANK(Cups11Page)
|
||||||
|
dw Cups11Page
|
||||||
|
db BANK(Cups11Page)
|
||||||
|
dw Cups11Page
|
||||||
|
|
||||||
|
|
||||||
SECTION "First Eight Cards", ROMX
|
SECTION "First Eight Cards", ROMX
|
||||||
INCLUDE "00TheFool.inc"
|
INCLUDE "00TheFool.inc"
|
||||||
INCLUDE "01TheMagician.inc"
|
INCLUDE "01TheMagician.inc"
|
||||||
@ -202,3 +223,4 @@ INCLUDE "19TheSun.inc"
|
|||||||
SECTION "FIFTH EIGHT CARDS", ROMX
|
SECTION "FIFTH EIGHT CARDS", ROMX
|
||||||
INCLUDE "20Judgement.inc"
|
INCLUDE "20Judgement.inc"
|
||||||
INCLUDE "21TheWorld.inc"
|
INCLUDE "21TheWorld.inc"
|
||||||
|
INCLUDE "cups11page.inc"
|
@ -118,17 +118,42 @@ CardBrowseUpdate:
|
|||||||
jp z, :+ ; skip the following code if right is not pressed
|
jp z, :+ ; skip the following code if right is not pressed
|
||||||
dec a
|
dec a
|
||||||
:
|
:
|
||||||
.doneWithButtons
|
ld [vSelectedCardIndex], a
|
||||||
|
ld hl, Cards
|
||||||
|
call ArrayClampLooping
|
||||||
|
ld [vSelectedCardIndex], a
|
||||||
|
|
||||||
|
ld hl, rMYBTNP
|
||||||
|
bit 2, [hl] ; up
|
||||||
|
jp z, :+
|
||||||
|
ld hl, AdjacentCards.Ups+1
|
||||||
|
ld b, 0
|
||||||
|
ld c, a
|
||||||
|
add hl, bc
|
||||||
|
ld a, [hl]
|
||||||
|
:
|
||||||
|
|
||||||
|
ld hl, rMYBTNP
|
||||||
|
bit 3, [hl] ; up
|
||||||
|
jp z, :+
|
||||||
|
ld hl, AdjacentCards.Downs+1
|
||||||
|
ld b, 0
|
||||||
|
ld c, a
|
||||||
|
add hl, bc
|
||||||
|
ld a, [hl]
|
||||||
|
:
|
||||||
|
|
||||||
ld [vSelectedCardIndex], a
|
ld [vSelectedCardIndex], a
|
||||||
ld hl, Cards
|
ld hl, Cards
|
||||||
call ArrayClampLooping
|
call ArrayClampLooping
|
||||||
ld [vSelectedCardIndex], a
|
ld [vSelectedCardIndex], a
|
||||||
|
|
||||||
|
.doneWithButtons
|
||||||
|
|
||||||
ld a, [vSelectedCardIndex]
|
ld a, [vSelectedCardIndex]
|
||||||
ld hl, vPreviousCardIndex
|
ld hl, vPreviousCardIndex
|
||||||
cp a, [hl]
|
cp a, [hl]
|
||||||
ret z ; if the selected card diddn't change, nothing to do
|
ret z ; if the selected card didn't change, nothing to do
|
||||||
|
|
||||||
.attemptCardChange
|
.attemptCardChange
|
||||||
|
|
||||||
@ -184,44 +209,54 @@ DrawDeckMinimap:
|
|||||||
ld hl, Cards
|
ld hl, Cards
|
||||||
ld c, [hl] ; count of cards
|
ld c, [hl] ; count of cards
|
||||||
srl c
|
srl c
|
||||||
set 0, c
|
;set 0, c
|
||||||
|
|
||||||
ld hl, vSelectedCardIndex
|
ld hl, vSelectedCardIndex
|
||||||
ld d, [hl] ; selected card!
|
ld d, [hl] ; selected card!
|
||||||
ld b, $ff ; start at -1 lol
|
ld b, $ff ; start at -1 lol
|
||||||
ld hl, _SCRN0 + 32 + 11
|
ld hl, _SCRN0 + 32 + 10
|
||||||
|
|
||||||
|
; for this loop, c holds the total tile count
|
||||||
|
; d holds the card which is currently selected
|
||||||
|
; b holds the index of the TILE (two cards) we're currently drawing
|
||||||
|
; hl points to the place we're drawing
|
||||||
.loop
|
.loop
|
||||||
|
inc hl
|
||||||
inc b
|
inc b
|
||||||
ld a, b
|
ld a, b
|
||||||
cp a, 5
|
cp a, 5 ; after we've drawn 5 tiles (10 cards), draw a newline
|
||||||
jp nz, .noNewLine
|
jp nz, :+
|
||||||
ld [hl], $13
|
ld [hl], $13
|
||||||
ld hl, _SCRN0 + 32*2 + 11
|
ld hl, _SCRN0 + 32*2 + 11
|
||||||
|
:
|
||||||
|
cp a, 11 ; after we've drawn 11 tiles (5 + 6) draw a newline
|
||||||
|
jp nz, :+
|
||||||
|
ld [hl], $13
|
||||||
|
ld hl, _SCRN0 + 32*3 + 11
|
||||||
|
:
|
||||||
|
; add more conditions here to define newlines!
|
||||||
.noNewLine
|
.noNewLine
|
||||||
ld a, b
|
ld a, b
|
||||||
cp a, c
|
cp a, c
|
||||||
jp nc, .doneDrawing
|
jp nc, .doneDrawing ; if b - c doesn't underflow, then we're done; jump to the end
|
||||||
|
|
||||||
ld a, d
|
ld a, d
|
||||||
srl a
|
srl a ; divide current index by two
|
||||||
cp a, b
|
cp a, b ; check if the currently selected card is in current tile
|
||||||
jp z, .drawSelectedCard
|
jp z, .drawSelectedCard
|
||||||
.drawUnselectedCards
|
.drawUnselectedCards ; if it's not, then draw unselected cards
|
||||||
ld [hl], $12
|
ld [hl], $12
|
||||||
inc hl
|
jp .loop
|
||||||
jp .loop
|
.drawSelectedCard ; if it's in this tile, draw it
|
||||||
.drawSelectedCard
|
bit 0, d
|
||||||
bit 0, d
|
jp nz, .drawSelectedSecond ; if the 1 bit of the current selection is zero, draw the left-selected-tile
|
||||||
jp nz, .drawSelectedSecond
|
ld [hl], $14
|
||||||
ld [hl], $14
|
jp .loop
|
||||||
inc hl
|
.drawSelectedSecond ; if the 1 bit is nonzero draw the right-selected-tile
|
||||||
jp .loop
|
ld [hl], $15
|
||||||
.drawSelectedSecond
|
jp .loop
|
||||||
ld [hl], $15
|
|
||||||
inc hl
|
|
||||||
jp .loop
|
|
||||||
.doneDrawing
|
.doneDrawing
|
||||||
ld [hl], $13
|
ld [hl], $13 ; when we're done, draw a cap
|
||||||
ret
|
ret
|
||||||
|
|
||||||
CardBrowse.UpdatePrintUI:
|
CardBrowse.UpdatePrintUI:
|
||||||
@ -305,13 +340,13 @@ CardBrowse.UITilemap:
|
|||||||
db $0e, $0a, $0a, $0a, $0a, $0a, $0a, $0a, $0a, $0f, $09, $02, $02, $02, $02, $02, $02, $02, $02, $08
|
db $0e, $0a, $0a, $0a, $0a, $0a, $0a, $0a, $0a, $0f, $09, $02, $02, $02, $02, $02, $02, $02, $02, $08
|
||||||
db $0b, $00, $00, $00, $00, $00, $00, $00, $00, $0c, $03, $00, $00, $00, $00, $00, $00, $00, $00, $04
|
db $0b, $00, $00, $00, $00, $00, $00, $00, $00, $0c, $03, $00, $00, $00, $00, $00, $00, $00, $00, $04
|
||||||
db $0b, $00, $00, $00, $00, $00, $00, $00, $00, $0c, $03, $00, $00, $00, $00, $00, $00, $00, $00, $04
|
db $0b, $00, $00, $00, $00, $00, $00, $00, $00, $0c, $03, $00, $00, $00, $00, $00, $00, $00, $00, $04
|
||||||
|
db $0b, $00, $00, $00, $00, $00, $00, $00, $00, $0c, $03, $00, $00, $00, $00, $00, $00, $00, $00, $04
|
||||||
db $0b, $00, $00, $00, $00, $00, $00, $00, $00, $0c, $06, $05, $05, $05, $05, $05, $05, $05, $05, $07
|
db $0b, $00, $00, $00, $00, $00, $00, $00, $00, $0c, $06, $05, $05, $05, $05, $05, $05, $05, $05, $07
|
||||||
db $0b, $00, $00, $00, $00, $00, $00, $00, $00, $0c, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01
|
db $0b, $00, $00, $00, $00, $00, $00, $00, $00, $0c, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01
|
||||||
db $0b, $00, $00, $00, $00, $00, $00, $00, $00, $0c, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01
|
db $0b, $00, $00, $00, $00, $00, $00, $00, $00, $0c, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01
|
||||||
db $0b, $00, $00, $00, $00, $00, $00, $00, $00, $0c, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01
|
db $0b, $00, $00, $00, $00, $00, $00, $00, $00, $0c, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01
|
||||||
db $0b, $00, $00, $00, $00, $00, $00, $00, $00, $0c, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01
|
db $0b, $00, $00, $00, $00, $00, $00, $00, $00, $0c, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01
|
||||||
db $0b, $00, $00, $00, $00, $00, $00, $00, $00, $0c, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01
|
db $0b, $00, $00, $00, $00, $00, $00, $00, $00, $0c, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01
|
||||||
db $0b, $00, $00, $00, $00, $00, $00, $00, $00, $0c, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01
|
|
||||||
db $0b, $00, $00, $00, $00, $00, $00, $00, $00, $0c, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02
|
db $0b, $00, $00, $00, $00, $00, $00, $00, $00, $0c, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02
|
||||||
db $0b, $00, $00, $00, $00, $00, $00, $00, $00, $0c, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
|
db $0b, $00, $00, $00, $00, $00, $00, $00, $00, $0c, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
|
||||||
db $0b, $00, $00, $00, $00, $00, $00, $00, $00, $0c, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
|
db $0b, $00, $00, $00, $00, $00, $00, $00, $00, $0c, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
|
||||||
|
@ -91,6 +91,21 @@ CardReadUpdate:
|
|||||||
ret
|
ret
|
||||||
.doneWithB
|
.doneWithB
|
||||||
|
|
||||||
|
ld hl, rMYBTNP
|
||||||
|
bit 4, [hl]
|
||||||
|
jp z, .doneWithA
|
||||||
|
ld a, [vSelectedCardIndex]
|
||||||
|
ld b, 0
|
||||||
|
ld c, a
|
||||||
|
ld hl, DECK_FLIPS+1
|
||||||
|
add hl, bc
|
||||||
|
ld a, [hl]
|
||||||
|
xor a, %10000000
|
||||||
|
ld [hl], a
|
||||||
|
|
||||||
|
jr .attemptCardChange
|
||||||
|
.doneWithA
|
||||||
|
|
||||||
|
|
||||||
ld a, [vSelectedSpreadCard]
|
ld a, [vSelectedSpreadCard]
|
||||||
ld hl, rMYBTNP
|
ld hl, rMYBTNP
|
||||||
@ -102,6 +117,8 @@ CardReadUpdate:
|
|||||||
jp z, :+ ; skip the following code if right is not pressed
|
jp z, :+ ; skip the following code if right is not pressed
|
||||||
inc a
|
inc a
|
||||||
:
|
:
|
||||||
|
|
||||||
|
.doneWithButtons
|
||||||
ld [vSelectedSpreadCard], a
|
ld [vSelectedSpreadCard], a
|
||||||
ld a, [vCurrentSpread]
|
ld a, [vCurrentSpread]
|
||||||
ld l, a
|
ld l, a
|
||||||
@ -115,6 +132,7 @@ CardReadUpdate:
|
|||||||
cp a, [hl]
|
cp a, [hl]
|
||||||
ret z ; if the selected card diddn't change, nothing to do
|
ret z ; if the selected card diddn't change, nothing to do
|
||||||
|
|
||||||
|
.attemptCardChange
|
||||||
ld a, [vBlocked]
|
ld a, [vBlocked]
|
||||||
cp a, 0
|
cp a, 0
|
||||||
ret nz
|
ret nz
|
||||||
|
Binary file not shown.
@ -4,7 +4,7 @@
|
|||||||
; then the 16bit address of the tile set
|
; then the 16bit address of the tile set
|
||||||
; then a 16bit value of the offset between tile map and end
|
; then a 16bit value of the offset between tile map and end
|
||||||
; then the 16bit address of the tile map
|
; then the 16bit address of the tile map
|
||||||
TheFool:
|
Cups11Page:
|
||||||
db 10, "PAGE OF "
|
db 10, "PAGE OF "
|
||||||
db 10, "CUPS "
|
db 10, "CUPS "
|
||||||
|
|
||||||
|
BIN
source.zip
BIN
source.zip
Binary file not shown.
Loading…
Reference in New Issue
Block a user