summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/engine/bank1.asm16
-rwxr-xr-xsrc/engine/home.asm14
2 files changed, 15 insertions, 15 deletions
diff --git a/src/engine/bank1.asm b/src/engine/bank1.asm
index cad9830..41cc9f7 100755
--- a/src/engine/bank1.asm
+++ b/src/engine/bank1.asm
@@ -235,7 +235,7 @@ StartDuel: ; 409f (1:409f)
INCBIN "baserom.gbc",$420b,$4225 - $420b
Func_4225: ; 4225 (1:4225)
- ld a, wPlayerDuelistType & $ff
+ ld a, DUELVAR_DUELIST_TYPE
call GetTurnDuelistVariable
ld [$cc0d], a
ld a, [$cc06]
@@ -404,7 +404,7 @@ PlayerEndTurn: ; 439a (1:439a)
ret
PlayerRetreat: ; 43ab (1:43ab)
- ld a, wPlayerArenaCardStatus & $ff
+ ld a, DUELVAR_ARENA_CARD_STATUS
call GetTurnDuelistVariable
and a,$0f
cp a, $01
@@ -462,7 +462,7 @@ Func_441f: ; 441f (1:441f)
jp Func_4295
OpenHandMenu: ; 4425 (1:4425)
- ld a, wPlayerNumberOfCardsInHand & $ff
+ ld a, DUELVAR_NUMBER_OF_CARDS_IN_HAND
call GetTurnDuelistVariable
or a
jr nz, Func_4436
@@ -512,7 +512,7 @@ Func_471f: ; 471f (1:471f)
ld [wNumMenuItems], a
ldh a, [hWhoseTurn]
ld h, a
- ld l, wPlayerArenaCard & $ff
+ ld l, DUELVAR_ARENA_CARD
ld a, [hl]
call $1376
.asm_4736
@@ -599,7 +599,7 @@ INCBIN "baserom.gbc",$67b2,$7107 - $67b2
InitializeDuelVariables: ; 7107 (1:7107)
ldh a, [hWhoseTurn]
ld h, a
- ld l, wPlayerDuelistType & $ff
+ ld l, DUELVAR_DUELIST_TYPE
ld a, [hl]
push hl
push af
@@ -612,8 +612,8 @@ InitializeDuelVariables: ; 7107 (1:7107)
pop af
pop hl
ld [hl], a
- ld bc, DECK_SIZE ; lb bc, wPlayerCardLocations & $ff, DECK_SIZE
- ld l, wPlayerDeckCards & $ff
+ ld bc, DECK_SIZE ; lb bc, DUELVAR_CARD_LOCATIONS, DECK_SIZE
+ ld l, DUELVAR_DECK_CARDS
.initDuelVariablesLoop
; zero card locations and cards in hand, and init order of cards in deck
push hl
@@ -625,7 +625,7 @@ InitializeDuelVariables: ; 7107 (1:7107)
inc b
dec c
jr nz, .initDuelVariablesLoop
- ld l, wPlayerArenaCard & $ff
+ ld l, DUELVAR_ARENA_CARD
ld c, 1 + BENCH_SIZE + 1
.initPlayArea
; initialize to $ff card in arena as well as cards in bench (plus a terminator?)
diff --git a/src/engine/home.asm b/src/engine/home.asm
index bf26b1c..aa6e9a8 100755
--- a/src/engine/home.asm
+++ b/src/engine/home.asm
@@ -2131,10 +2131,10 @@ ShuffleDeck: ; 10bc (0:10bc)
ld h, a
ld d, a
ld a, DECK_SIZE
- ld l, wPlayerNumberOfCardsNotInDeck & $ff
+ ld l, DUELVAR_NUMBER_OF_CARDS_NOT_IN_DECK
sub [hl]
ld b, a
- ld a, wPlayerDeckCards & $ff
+ ld a, DUELVAR_DECK_CARDS
add [hl]
ld l, a ; hl = position in the wPlayerDeckCards or wOpponentDeckCards array of the first (top) card in the deck
ld a, b ; a = number of cards in the deck
@@ -2146,7 +2146,7 @@ ShuffleDeck: ; 10bc (0:10bc)
; returns c if deck is empty, nc if a card was succesfully drawn
DrawCardFromDeck: ; 10cf (0:10cf)
push hl
- ld a, wPlayerNumberOfCardsNotInDeck & $ff
+ ld a, DUELVAR_NUMBER_OF_CARDS_NOT_IN_DECK
call GetTurnDuelistVariable
cp DECK_SIZE
jr nc, .emptyDeck
@@ -2154,7 +2154,7 @@ DrawCardFromDeck: ; 10cf (0:10cf)
inc a
ld [hl], a
; point to top card in the deck
- add (wPlayerDeckCards - 1) & $ff
+ add DUELVAR_DECK_CARDS - 1
ld l, a
; grab card number (0-59) from wPlayerDeckCards or wOpponentDeckCards array
ld a, [hl]
@@ -2186,10 +2186,10 @@ AddCardToHand: ; 1123 (0:1123)
; write $1 (hand) into the location of this card
ld [hl], $1
; increment number of cards in hand
- ld l, wPlayerNumberOfCardsInHand & $ff
+ ld l, DUELVAR_NUMBER_OF_CARDS_IN_HAND
inc [hl]
; add card to hand
- ld a, (wPlayerHand - 1) & $ff
+ ld a, DUELVAR_HAND - 1
add [hl]
ld l, a
ld [hl], e
@@ -3732,7 +3732,7 @@ LoadOpponentDeck: ; 2b78 (0:2b78)
.validDeck
; set opponent as controlled by AI
- ld a, wOpponentDuelistType & $ff
+ ld a, DUELVAR_DUELIST_TYPE
call GetTurnDuelistVariable
ld a, [wOpponentDeckId]
or $80