diff options
Diffstat (limited to 'src/engine')
| -rw-r--r-- | src/engine/bank01.asm | 107 | ||||
| -rw-r--r-- | src/engine/bank03.asm | 22 | ||||
| -rw-r--r-- | src/engine/bank04.asm | 17 | ||||
| -rw-r--r-- | src/engine/bank06.asm | 2 | ||||
| -rw-r--r-- | src/engine/effect_functions.asm | 18 | ||||
| -rw-r--r-- | src/engine/home.asm | 14 | 
6 files changed, 90 insertions, 90 deletions
| diff --git a/src/engine/bank01.asm b/src/engine/bank01.asm index a1bb6f6..fd7a211 100644 --- a/src/engine/bank01.asm +++ b/src/engine/bank01.asm @@ -391,7 +391,7 @@ PrintDuelMenuAndHandleInput: ; 4295 (1:4295)  	ldh a, [hKeysPressed]  	bit SELECT_F, a  	jp nz, DuelMenuShortcut_BothActivePokemon -	ld a, [wcbe7] +	ld a, [wDebugSkipDuelMenuInput]  	or a  	jr nz, .handle_input  	call HandleDuelMenuInput @@ -877,7 +877,7 @@ CheckIfEnoughEnergiesToRetreat: ; 45f4 (1:45f4)  	ld a, [wTotalAttachedEnergies]  	cp c  	ret c -	ld [wcbcd], a +	ld [wNumRetreatEnergiesSelected], a  	ld a, c  	ld [wEnergyCardsRequiredToRetreat], a  	or a @@ -894,24 +894,24 @@ DisplayRetreatScreen: ; 4611 (1:4611)  	or a  	ret z ; return if no energy cards are required at all  	xor a -	ld [wcbcd], a +	ld [wNumRetreatEnergiesSelected], a  	call CreateArenaOrBenchEnergyCardList  	call SortCardsInDuelTempListByID  	ld a, LOW(hTempRetreatCostCards) -	ld [wcbd5], a +	ld [wTempRetreatCostCardsPos], a  	xor a  	call DisplayEnergyDiscardScreen  	ld a, [wEnergyCardsRequiredToRetreat] -	ld [wcbfa], a +	ld [wEnergyDiscardMenuDenominator], a  .select_energies_loop -	ld a, [wcbcd] -	ld [wcbfb], a +	ld a, [wNumRetreatEnergiesSelected] +	ld [wEnergyDiscardMenuNumerator], a  	call HandleEnergyDiscardMenuInput  	ret c  	ldh a, [hTempCardIndex_ff98]  	call LoadCardDataToBuffer2_FromDeckIndex  	; append selected energy card to hTempRetreatCostCards -	ld hl, wcbd5 +	ld hl, wTempRetreatCostCardsPos  	ld c, [hl]  	inc [hl]  	ldh a, [hTempCardIndex_ff98] @@ -923,7 +923,7 @@ DisplayRetreatScreen: ; 4611 (1:4611)  	jr nz, .not_double  	inc c  .not_double -	ld hl, wcbcd +	ld hl, wNumRetreatEnergiesSelected  	ld a, [hl]  	add c  	ld [hl], a @@ -937,7 +937,7 @@ DisplayRetreatScreen: ; 4611 (1:4611)  	jr .select_energies_loop  .enough  	; terminate hTempRetreatCostCards array with $ff -	ld a, [wcbd5] +	ld a, [wTempRetreatCostCardsPos]  	ld c, a  	ld a, $ff  	ld [$ff00+c], a @@ -959,9 +959,9 @@ DisplayEnergyDiscardScreen: ; 4673 (1:4673)  	ld [hl], 0 ; wCurPlayAreaY  	call PrintPlayAreaCardInformation  	xor a -	ld [wcbfb], a +	ld [wEnergyDiscardMenuNumerator], a  	inc a -	ld [wcbfa], a +	ld [wEnergyDiscardMenuDenominator], a  ;	fallthrough  ; display the menu that belongs to the energy discard screen that lets the player @@ -982,30 +982,30 @@ DisplayEnergyDiscardMenu: ; 4693 (1:4693)  	ld [wCardListIndicatorYPosition], a  	ret -; if [wcbfa] non-0: -   ; prints "[wcbfb]/[wcbfa]" at 16,16, where [wcbfb] is the total amount -   ; of energy cards already selected to discard, and [wcbfa] is the total -   ; amount of energies that are required to discard. -; if [wcbfa] == 0: -	; prints only "[wcbfb]" +; if [wEnergyDiscardMenuDenominator] non-0: +   ; prints "[wEnergyDiscardMenuNumerator]/[wEnergyDiscardMenuDenominator]" at 16,16 +   ; where [wEnergyDiscardMenuNumerator] is the number of energy cards already selected to discard +   ; and [wEnergyDiscardMenuDenominator] is the total number of energies that are required to discard. +; if [wEnergyDiscardMenuDenominator] == 0: +	; prints only "[wEnergyDiscardMenuNumerator]"  HandleEnergyDiscardMenuInput: ; 46b7 (1:46b7)  	lb bc, 16, 16 -	ld a, [wcbfa] +	ld a, [wEnergyDiscardMenuDenominator]  	or a  	jr z, .print_single_number -	ld a, [wcbfb] +	ld a, [wEnergyDiscardMenuNumerator]  	add SYM_0  	call WriteByteToBGMap0  	inc b  	ld a, SYM_SLASH  	call WriteByteToBGMap0  	inc b -	ld a, [wcbfa] +	ld a, [wEnergyDiscardMenuDenominator]  	add SYM_0  	call WriteByteToBGMap0  	jr .wait_input  .print_single_number -	ld a, [wcbfb] +	ld a, [wEnergyDiscardMenuNumerator]  	inc b  	call WriteTwoDigitNumberInTxSymbolFormat  .wait_input @@ -2010,7 +2010,7 @@ ChooseInitialArenaAndBenchPokemon: ; 4cd5 (1:4cd5)  	ld a, PRACTICEDUEL_PUT_STARYU_IN_BENCH  	call DoPracticeDuelAction  .bench_loop -	ld a, $1 +	ld a, TRUE  	ldtx hl, ChooseYourBenchPokemonText  	call DisplayPlaceInitialPokemonCardsScreen  	jr c, .bench_done @@ -2912,15 +2912,15 @@ PrintPracticeDuelInstructionsForCurrentTurn: ; 5382 (1:5382)  ; a numbered instruction text, that is later printed without text delay.  PrintPracticeDuelInstructions: ; 5396 (1:5396)  	xor a -	ld [wcbca], a +	ld [wPracticeDuelTextY], a  	ld a, l -	ld [wcc01], a +	ld [wPracticeDuelTextPointer], a  	ld a, h -	ld [wcc01 + 1], a +	ld [wPracticeDuelTextPointer + 1], a  .print_instructions_loop -	call Func_53fa +	call PrintNextPracticeDuelInstruction  	ld a, [hli] -	ld [wcbca], a +	ld [wPracticeDuelTextY], a  	or a  	jr z, PrintPracticeDuelLetsPlayTheGame  	ld e, [hl] @@ -2941,7 +2941,7 @@ PrintPracticeDuelInstructions: ; 5396 (1:5396)  	call SetNoLineSeparation  	ld l, e  	ld h, d -	ld a, [wcbca] +	ld a, [wPracticeDuelTextY]  	ld e, a  	ld d, 1  	call InitTextPrinting_ProcessTextFromID @@ -2961,8 +2961,8 @@ PrintPracticeDuelInstructions_Fast: ; 53da (1:53da)  	ld a, [hli]  	or a  	jr z, PrintPracticeDuelLetsPlayTheGame -	ld e, a -	ld d, 1 +	ld e, a ; y +	ld d, 1 ; x  	call PrintPracticeDuelNumberedInstruction  	jr PrintPracticeDuelInstructions_Fast @@ -2984,27 +2984,28 @@ PrintPracticeDuelNumberedInstruction: ; 53e6 (1:53e6)  	pop hl  	ret -Func_53fa: ; 53fa (1:53fa) +; print a single instruction bullet for the current turn +PrintNextPracticeDuelInstruction: ; 53fa (1:53fa)  	ld a, $01  	ldh [hffb0], a  	push hl  	call PrintPracticeDuelInstructionsTextBoxLabel -	ld hl, wcc01 +	ld hl, wPracticeDuelTextPointer  	ld a, [hli]  	ld h, [hl]  	ld l, a -.asm_5408 -	ld a, [wcbca] +.next +	ld a, [wPracticeDuelTextY]  	cp [hl] -	jr c, .asm_541a +	jr c, .done  	ld a, [hli]  	or a -	jr z, .asm_541a -	ld e, a -	ld d, $01 +	jr z, .done +	ld e, a ; y +	ld d, 1 ; x  	call PrintPracticeDuelNumberedInstruction -	jr .asm_5408 -.asm_541a +	jr .next +.done  	pop hl  	xor a  	ldh [hffb0], a @@ -3144,7 +3145,7 @@ DuelMenuData: ; 54e9 (1:54e9)     ; a = 1 -> prompted to place Pokemon card in bench  ; return carry if no card was placed (only allowed for bench)  DisplayPlaceInitialPokemonCardsScreen: ; 5502 (1:5502) -	ld [wcbfd], a +	ld [wPlacingInitialBenchPokemon], a  	push hl  	call CreateHandCardList  	call InitAndDrawCardListScreenLayout @@ -3156,7 +3157,7 @@ DisplayPlaceInitialPokemonCardsScreen: ; 5502 (1:5502)  	call DisplayCardList  	jr nc, .card_selected  	; attempted to exit screen -	ld a, [wcbfd] +	ld a, [wPlacingInitialBenchPokemon]  	or a  	; player is forced to place a Pokemon card in the arena  	jr z, .display_card_list @@ -3253,7 +3254,7 @@ InitAndDrawCardListScreenLayout: ; 559a (1:559a)  	ld [hli], a  	ld [hl], a  	ld [wSortCardListByID], a -	ld hl, wcbd8 +	ld hl, wPrintSortNumberInCardListPtr  	ld [hli], a  	ld [hl], a  	ld [wCardListItemSelectionMenuType], a @@ -3521,7 +3522,7 @@ CardListFunction: ; 5719 (1:5719)  	ret  Func_5735: ; 5735 (1:5735) -	ld hl, wcbd8 +	ld hl, wPrintSortNumberInCardListPtr  	ld de, PrintSortNumberInCardList  	ld [hl], e  	inc hl @@ -3531,7 +3532,7 @@ Func_5735: ; 5735 (1:5735)  	ret  Func_5744: ; 5744 (1:5744) -	ld hl, wcbd8 +	ld hl, wPrintSortNumberInCardListPtr  	jp CallIndirect  ; goes through list in wDuelTempList + 10 @@ -3705,7 +3706,7 @@ Func_5805: ; 5805 (1:5805)  	ldtx hl, WillDrawNPrizesText  	call DrawWideTextBox_PrintText  	call CountPrizes -	ld [wcbfc], a +	ld [wTempNumRemainingPrizeCards], a  	ld a, DUELVARS_DUELIST_TYPE  	call GetTurnDuelistVariable  	cp DUELIST_TYPE_LINK_OPP @@ -3727,7 +3728,7 @@ Func_5805: ; 5805 (1:5805)  	cp $ff  	call nz, AddCardToHand  .asm_586f -	ld a, [wcbfc] +	ld a, [wTempNumRemainingPrizeCards]  	ld hl, wNumberPrizeCardsToTake  	cp [hl]  	jr nc, .asm_587e @@ -5002,7 +5003,7 @@ _HasAlivePokemonInPlayArea: ; 5fde (1:5fde)  	ld b, 0  	inc c  	xor a -	ld [wcbd3], a +	ld [wPlayAreaScreenLoaded], a  	ld [wcbd4], a  	jr .next_pkmn  .loop @@ -5031,13 +5032,13 @@ DisplayPlayAreaScreen: ; 600e (1:600e)  	ld [wNoItemSelectionMenuKeys], a  	ldh a, [hTempCardIndex_ff98]  	push af -	ld a, [wcbd3] +	ld a, [wPlayAreaScreenLoaded]  	or a  	jr nz, .skip_ahead  	xor a  	ld [wSelectedDuelSubMenuItem], a  	inc a -	ld [wcbd3], a +	ld [wPlayAreaScreenLoaded], a  .asm_6022  	call ZeroObjectPositionsAndToggleOAMCopy  	call EmptyScreen @@ -6501,12 +6502,12 @@ PrintAttachedEnergyToPokemon: ; 68e4 (1:68e4)  	call DrawWideTextBox_WaitForInput  	ret -; print the PokemonEvolvedIntoPokemonText, given the Pokemon card to evolve in wccee, +; print the PokemonEvolvedIntoPokemonText, given the Pokemon card to evolve in wPreEvolutionPokemonCard,  ; and the evolved Pokemon card in hTempCardIndex_ff98. also play a sound effect.  PrintPokemonEvolvedIntoPokemon: ; 68fa (1:68fa)  	ld a, SFX_5E  	call PlaySFX -	ld a, [wccee] +	ld a, [wPreEvolutionPokemonCard]  	call LoadCardNameToTxRam2  	ldh a, [hTempCardIndex_ff98]  	call LoadCardNameToTxRam2_b diff --git a/src/engine/bank03.asm b/src/engine/bank03.asm index 55127a7..c103ba2 100644 --- a/src/engine/bank03.asm +++ b/src/engine/bank03.asm @@ -182,7 +182,7 @@ Func_c158: ; c158 (3:4158)  	ld a, [wLoadedNPCTempIndex]  	ld l, LOADED_NPC_DIRECTION  	call GetItemInLoadedNPCIndex -	ld a, [wd0c5] +	ld a, [wNPCDuelistDirection]  	ld [hl], a  	farcall UpdateNPCAnimation  .asm_c179 @@ -259,9 +259,9 @@ Func_c1ed: ; c1ed (3:41ed)  Func_c1f8: ; c1f8 (3:41f8)  	xor a -	ld [wd0b8], a -	ld [wd0b9], a -	ld [wd0ba], a +	ld [wSelectedPauseMenuItem], a +	ld [wSelectedPCMenuItem], a +	ld [wSelectedGiftCenterMenuItem], a  	ld [wConfigCursorYPos], a  	ld [wd0c2], a  	ld [wDefaultSong], a @@ -1128,14 +1128,14 @@ PauseMenu: ; c75a (3:475a)  	call HandleMenuInput  	jr nc, .wait_input  	ld a, e -	ld [wd0b8], a +	ld [wSelectedPauseMenuItem], a  	ldh a, [hCurMenuItem]  	cp e  	jr nz, .exit  	cp $5  	jr z, .exit  	call Func_c2a3 -	ld a, [wd0b8] +	ld a, [wSelectedPauseMenuItem]  	ld hl, PauseMenuPointerTable  	call JumpToFunctionInTable  	ld hl, Func_c797 @@ -1146,7 +1146,7 @@ PauseMenu: ; c75a (3:475a)  	ret  Func_c797: ; c797 (3:4797) -	ld a, [wd0b8] +	ld a, [wSelectedPauseMenuItem]  	ld hl, Unknown_10d98  	farcall InitAndPrintPauseMenu  	ret @@ -1212,14 +1212,14 @@ PCMenu: ; c7ea (3:47ea)  	call HandleMenuInput  	jr nc, .wait_input  	ld a, e -	ld [wd0b9], a +	ld [wSelectedPCMenuItem], a  	ldh a, [hCurMenuItem]  	cp e  	jr nz, .exit  	cp $4  	jr z, .exit  	call Func_c2a3 -	ld a, [wd0b9] +	ld a, [wSelectedPCMenuItem]  	ld hl, PointerTable_c846  	call JumpToFunctionInTable  	ld hl, Func_c84e @@ -1243,7 +1243,7 @@ PointerTable_c846: ; c846 (3:4846)  	dw PCMenu_Print  Func_c84e: ; c84e (3:484e) -	ld a, [wd0b9] +	ld a, [wSelectedPCMenuItem]  	ld hl, Unknown_10da9  	farcall InitAndPrintPauseMenu  	ret @@ -2104,7 +2104,7 @@ ScriptCommand_StartDuel: ; cd01 (3:4d01)  	ld [wNPCDuelistCopy], a  	push af  	farcall Func_1c557 -	ld [wd0c5], a +	ld [wNPCDuelistDirection], a  	pop af  	farcall SetNPCOpponentNameAndPortrait  	ld a, GAME_EVENT_DUEL diff --git a/src/engine/bank04.asm b/src/engine/bank04.asm index 3563c62..81e45d3 100644 --- a/src/engine/bank04.asm +++ b/src/engine/bank04.asm @@ -2214,7 +2214,7 @@ Unknown_10da9: ; 10da9 (4:4da9)  Func_10dba: ; 10dba (4:4dba)  	ld a, $1  	farcall Func_c29b -	ld a, [wd0ba] +	ld a, [wSelectedGiftCenterMenuItem]  	ld hl, Unknown_10e17  	farcall InitAndPrintPauseMenu  .asm_10dca @@ -2222,7 +2222,7 @@ Func_10dba: ; 10dba (4:4dba)  	call HandleMenuInput  	jr nc, .asm_10dca  	ld a, e -	ld [wd0ba], a +	ld [wSelectedGiftCenterMenuItem], a  	ldh a, [hCurMenuItem]  	cp e  	jr z, .asm_10ddd @@ -3473,7 +3473,6 @@ ENDM  ; also works as a test in order check whether  ; the saved values is SRAM are legal, within the given value range  WRAMToSRAMMapper: ; 11498 (4:5498) -; pointer, number of bytes, unknown  	wram_sram_map wMedalCount,                        1, $00, $ff ; sMedalCount  	wram_sram_map wCurOverworldMap,                   1, $00, $ff ; sCurOverworldMap  	wram_sram_map wPlayTimeCounter + 0,               1, $00, $ff ; sPlayTimeCounter @@ -3492,17 +3491,17 @@ WRAMToSRAMMapper: ; 11498 (4:5498)  	wram_sram_map wd698,                              4, $00, $ff ; sb818  	wram_sram_map wOWMapEvents,          NUM_MAP_EVENTS, $00, $ff ; sOWMapEvents  	wram_sram_map .EmptySRAMSlot,                     1, $00, $ff ; sb827 -	wram_sram_map wd0b8,                              1, $00, $ff ; sb828 -	wram_sram_map wd0b9,                              1, $00, $ff ; sb829 -	wram_sram_map wConfigCursorYPos,                              1, $00, $ff ; sb82a -	wram_sram_map wd0ba,                              1, $00, $ff ; sb82b +	wram_sram_map wSelectedPauseMenuItem,             1, $00, $ff ; sSelectedPauseMenuItem +	wram_sram_map wSelectedPCMenuItem,                1, $00, $ff ; sSelectedPCMenuItem +	wram_sram_map wConfigCursorYPos,                  1, $00, $ff ; sConfigCursorYPos +	wram_sram_map wSelectedGiftCenterMenuItem,        1, $00, $ff ; sSelectedGiftCenterMenuItem  	wram_sram_map wPCPackSelection,                   1,   0,  14 ; sPCPackSelection  	wram_sram_map wPCPacks,                NUM_PC_PACKS, $00, $ff ; sPCPacks  	wram_sram_map wDefaultSong,                       1, $00, $ff ; sDefaultSong -	wram_sram_map wcad5,                              1, $00, $ff ; sb83d +	wram_sram_map wDebugPauseAllowed,                 1, $00, $ff ; sDebugPauseAllowed  	wram_sram_map wRonaldIsInMap,                     1, $00, $ff ; sRonaldIsInMap  	wram_sram_map wMastersBeatenList,                10, $00, $ff ; sMastersBeatenList -	wram_sram_map wd0c5,                              1, $00, $ff ; sb849 +	wram_sram_map wNPCDuelistDirection,               1, $00, $ff ; sNPCDuelistDirection  	wram_sram_map wMultichoiceTextboxResult_ChooseDeckToDuelAgainst, 1, $00, $ff ; sMultichoiceTextboxResult_ChooseDeckToDuelAgainst  	wram_sram_map wd10e,                              1, $00, $ff ; sb84b  	wram_sram_map .EmptySRAMSlot,                    15, $00, $ff ; sb84c diff --git a/src/engine/bank06.asm b/src/engine/bank06.asm index 93042d6..6ee69a3 100644 --- a/src/engine/bank06.asm +++ b/src/engine/bank06.asm @@ -2126,7 +2126,7 @@ Func_199e0: ; 199e0 (6:59e0)  	ret  Func_19a12: ; 19a12 (6:5a12) -	ld hl, wcce9 +	ld hl, wDeckName  	ld a, [hli]  	ld h, [hl]  	ld l, a diff --git a/src/engine/effect_functions.asm b/src/engine/effect_functions.asm index 7abd585..ce3a517 100644 --- a/src/engine/effect_functions.asm +++ b/src/engine/effect_functions.asm @@ -3735,10 +3735,10 @@ Wildfire_PlayerSelectEffect: ; 2d4a9 (b:54a9)  ; just increase a counter and store it.  ; this will be the output used by Wildfire_DiscardEnergyEffect.  	xor a -	ld [wcbfa], a +	ld [wEnergyDiscardMenuDenominator], a  .loop  	ldh a, [hCurSelectionItem] -	ld [wcbfb], a +	ld [wEnergyDiscardMenuNumerator], a  	bank1call HandleEnergyDiscardMenuInput  	jr c, .done  	ld hl, hCurSelectionItem @@ -3954,14 +3954,14 @@ FireSpin_PlayerSelectEffect: ; 2d5cd (b:55cd)  	bank1call DisplayEnergyDiscardScreen  	ld a, 2 -	ld [wcbfa], a +	ld [wEnergyDiscardMenuDenominator], a  .loop_input  	bank1call HandleEnergyDiscardMenuInput  	ret c  	call GetNextPositionInTempList  	ldh a, [hTempCardIndex_ff98]  	ld [hl], a -	ld hl, wcbfb +	ld hl, wEnergyDiscardMenuNumerator  	inc [hl]  	ldh a, [hCurSelectionItem]  	cp 2 @@ -10865,7 +10865,7 @@ SuperEnergyRemoval_PlayerSelection: ; 2fce4 (b:7ce4)  	ldh a, [hTempPlayAreaLocation_ff9d]  	bank1call DisplayEnergyDiscardScreen  	ld a, 2 -	ld [wcbfa], a +	ld [wEnergyDiscardMenuDenominator], a  .loop_discard_energy_selection  	bank1call HandleEnergyDiscardMenuInput @@ -10875,14 +10875,14 @@ SuperEnergyRemoval_PlayerSelection: ; 2fce4 (b:7ce4)  	call AskWhetherToQuitSelectingCards  	jr nc, .done ; finish operation  	; player selected to continue selection -	ld a, [wcbfb] +	ld a, [wEnergyDiscardMenuNumerator]  	push af  	ldh a, [hTempPlayAreaLocation_ff9d]  	bank1call DisplayEnergyDiscardScreen  	ld a, 2 -	ld [wcbfa], a +	ld [wEnergyDiscardMenuDenominator], a  	pop af -	ld [wcbfb], a +	ld [wEnergyDiscardMenuNumerator], a  	jr .loop_discard_energy_selection  .energy_selected @@ -10891,7 +10891,7 @@ SuperEnergyRemoval_PlayerSelection: ; 2fce4 (b:7ce4)  	ldh a, [hTempCardIndex_ff98]  	ld [hl], a  	call RemoveCardFromDuelTempList -	ld hl, wcbfb +	ld hl, wEnergyDiscardMenuNumerator  	inc [hl]  	ldh a, [hCurSelectionItem]  	cp 5 diff --git a/src/engine/home.asm b/src/engine/home.asm index cf9117d..cb77945 100644 --- a/src/engine/home.asm +++ b/src/engine/home.asm @@ -768,7 +768,7 @@ DoAFrames: ; 0536 (0:0536)  	ret  ; updates background, sprites and other game variables, halts until vblank, and reads user input -; if wcad5 is not 0, the game can be paused (and resumed) by pressing the SELECT button +; if wDebugPauseAllowed is not 0, the game can be paused (and resumed) by pressing the SELECT button  DoFrame: ; 053f (0:053f)  	push af  	push hl @@ -779,7 +779,7 @@ DoFrame: ; 053f (0:053f)  	call WaitForVBlank  	call ReadJoypad  	call HandleDPadRepeat -	ld a, [wcad5] +	ld a, [wDebugPauseAllowed]  	or a  	jr z, .done  	ldh a, [hKeysPressed] @@ -3035,7 +3035,7 @@ CopyDeckData: ; 1072 (0:1072)  	jr nz, .card_quantity_loop  	jr .next_card  .done -	ld hl, wcce9 +	ld hl, wDeckName  	ld a, [de]  	inc de  	ld [hli], a @@ -3778,7 +3778,7 @@ EvolvePokemonCard: ; 13ac (0:13ac)  	ld e, a  	add DUELVARS_ARENA_CARD  	call GetTurnDuelistVariable -	ld [wccee], a ; save pre-evolved Pokemon card into wccee +	ld [wPreEvolutionPokemonCard], a ; save pre-evolved Pokemon card into wPreEvolutionPokemonCard  	call LoadCardDataToBuffer2_FromDeckIndex  	ldh a, [hTempCardIndex_ff98]  	ld [hl], a @@ -10669,7 +10669,7 @@ GameEvent_GiftCenter: ; 3876 (0:3876)  	call PauseSong  	ld a, MUSIC_CARD_POP  	call PlaySong -	ld a, $3 +	ld a, GAME_EVENT_GIFT_CENTER  	ld [wd0c2], a  	ld a, [wd10e]  	or $10 @@ -10685,7 +10685,7 @@ GameEvent_GiftCenter: ; 3876 (0:3876)  	ret  GameEvent_BattleCenter: ; 38a3 (0:38a3) -	ld a, $2 +	ld a, GAME_EVENT_BATTLE_CENTER  	ld [wd0c2], a  	xor a  	ld [wd112], a @@ -10700,7 +10700,7 @@ GameEvent_BattleCenter: ; 38a3 (0:38a3)  	ret  GameEvent_Duel: ; 38c0 (0:38c0) -	ld a, $1 +	ld a, GAME_EVENT_DUEL  	ld [wd0c2], a  	xor a  	ld [wd112], a | 
