mirror of
https://github.com/pret/poketcg2.git
synced 2026-04-26 00:43:32 -05:00
Refactor leftovers from #53
This commit is contained in:
parent
324944f56d
commit
09162211bd
|
|
@ -30,5 +30,3 @@ DEF NUM_GAME_EVENTS EQU const_value ; 6
|
|||
const OWMODE_MUSIC_POSTLOAD ; $10
|
||||
const OWMODE_AFTER_DUEL_PRELOAD ; $11
|
||||
const OWMODE_PAUSE_MENU ; $12
|
||||
|
||||
; DEF NUM_OWMODES EQU const_value ; $13
|
||||
|
|
|
|||
|
|
@ -1284,18 +1284,20 @@ Func_31447:
|
|||
farcall ZeroOutVarValue
|
||||
pop af
|
||||
jr nz, .done
|
||||
; cup winner, so switch the cup state from start to end/inactive
|
||||
; by incrementing if cup 1, 2
|
||||
; or by (verbosely) decremmenting if cup 3
|
||||
; due to the constants' ordering
|
||||
ld a, VAR_GR_CHALLENGE_CUP_STATE
|
||||
farcall GetVarValue
|
||||
cp CHALLENGE_CUP_3_START
|
||||
jr z, .adjust
|
||||
jr z, .won_cup3
|
||||
inc a
|
||||
ld c, a
|
||||
ld a, VAR_GR_CHALLENGE_CUP_STATE
|
||||
farcall SetVarValue
|
||||
jr .done
|
||||
; keep the state var < 7
|
||||
; verbose: dec a between inc a :: ld c, a above should suffice
|
||||
.adjust
|
||||
.won_cup3
|
||||
ld a, VAR_GR_CHALLENGE_CUP_STATE
|
||||
ld c, CHALLENGE_CUP_3_UNLOCKED
|
||||
farcall SetVarValue
|
||||
|
|
|
|||
|
|
@ -2326,18 +2326,20 @@ Func_3d210:
|
|||
farcall ZeroOutVarValue
|
||||
pop af
|
||||
jr nz, .done
|
||||
; cup winner, so switch the cup state from start to end
|
||||
; by incrementing if cup 1, 2
|
||||
; or by (verbosely) decremmenting if cup 3
|
||||
; due to the constants' ordering
|
||||
ld a, VAR_TCG_CHALLENGE_CUP_STATE
|
||||
farcall GetVarValue
|
||||
cp CHALLENGE_CUP_3_START
|
||||
jr z, .adjust
|
||||
jr z, .won_cup3
|
||||
inc a
|
||||
ld c, a
|
||||
ld a, VAR_TCG_CHALLENGE_CUP_STATE
|
||||
farcall SetVarValue
|
||||
jr .done
|
||||
; keep the state var < 7
|
||||
; verbose: dec a between inc a :: ld c, a above should suffice
|
||||
.adjust
|
||||
.won_cup3
|
||||
ld a, VAR_TCG_CHALLENGE_CUP_STATE
|
||||
ld c, CHALLENGE_CUP_3_UNLOCKED
|
||||
farcall SetVarValue
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user