Refactor with suggested changes

This commit is contained in:
earthoul
2025-12-15 18:49:21 +09:00
parent dc8c1bf669
commit 492430caa3
13 changed files with 20 additions and 24 deletions

View File

@@ -4,9 +4,9 @@ INCLUDE "constants/animation_constants.asm"
INCLUDE "constants/attack_animation_constants.asm"
INCLUDE "constants/card_constants.asm"
INCLUDE "constants/card_data_constants.asm"
INCLUDE "constants/challenge_cup_constants.asm"
INCLUDE "constants/coin_constants.asm"
INCLUDE "constants/credits_constants.asm"
INCLUDE "constants/cup_constants.asm"
INCLUDE "constants/deck_ai_constants.asm"
INCLUDE "constants/deck_constants.asm"
INCLUDE "constants/duel_constants.asm"

View File

@@ -35,7 +35,7 @@
const_def
const DEBUGMENU_POWER_ON ; 0
const DEBUGMENU_COIN ; 1
const DEBGUMENU_CONFIG ; 2
const DEBUGMENU_CONFIG ; 2
const DEBUGMENU_EFFECT_VIEWER ; 3
const DEBUGMENU_CREDITS ; 4
const DEBUGMENU_DUEL ; 5

View File

@@ -157,7 +157,8 @@ AutoDeckMachine2Entries:
MachineAtrociousWeezingDeckDescriptionText
; dark lightning
auto_deck MachineTheBenchIsAlsoASurpriseDeckList, \
MachineTheBenchIsAlsoASurpriseDeckText, MachineTheBenchIsAlsoASurpriseDeckDescriptionText
MachineTheBenchIsAlsoASurpriseDeckText, \
MachineTheBenchIsAlsoASurpriseDeckDescriptionText
auto_deck MachineEnergyConservationDeckList, \
MachineEnergyConservationDeckText, \
MachineEnergyConservationDeckDescriptionText

View File

@@ -5,10 +5,7 @@ MACRO blackbox_promo
ENDM
MACRO blackbox_promo_recipe
REPT _NARG
dw \1 ; input card id
SHIFT
ENDR
dw \# ; input card ids
dw 0 ; end of list
ENDM
@@ -111,7 +108,7 @@ BlackboxPromoCards:
; phantoms, ishihara tradings, and game center prizes (but a few exceptions)
; used as special cases in black box, but actually redundant
; might be intended for non-recipe promos?
; could've been intended for non-recipe promos?
SpecialPromoCards:
dw VENUSAUR_LV64
dw MARILL
@@ -120,14 +117,14 @@ SpecialPromoCards:
dw MACHAMP_LV54
dw ALAKAZAM_LV45
dw GENGAR_LV40
dw MEWTWO_LV30 ; weird, out of the pattern
dw MEWTWO_LV30 ; not as special as the others
dw MEW_LV15
dw MEW_LV8
dw SURFING_PIKACHU_LV13
dw SURFING_PIKACHU_ALT_LV13
dw FLYING_PIKACHU_LV12
dw FLYING_PIKACHU_ALT_LV12
dw DRAGONITE_LV43 ; weird, out of the pattern
dw DRAGONITE_LV43 ; not as special as the others
dw TOGEPI
dw LUGIA
dw HERE_COMES_TEAM_ROCKET

View File

@@ -1,7 +1,7 @@
; exclude Legendaries, GR Mewtwo, Phantoms, Bill's Computer and related ones
TCGChallengeCupPromoPrizes:
dw ARCANINE_LV34
dw ARCANINE_LV34
dw PIKACHU_LV16
dw PIKACHU_ALT_LV16
dw SURFING_PIKACHU_LV13

View File

@@ -1,4 +1,4 @@
; deck id, bitmask
; deck id and bitmask for SetGrandMasterCupOpponents
GrandMasterCupOpps:
db EVEN3_YEARS_ON_A_ROCK_DECK_ID, %01111111 ; GRANDMASTERCUP_GENE
db RAGING_BILLOW_OF_FISTS_DECK_ID, %01111111 ; GRANDMASTERCUP_MITCH

View File

@@ -884,7 +884,7 @@ OpenPrizeCardPageIfFaceUp:
or a
ret z ; not face-up
ld a, SFX_CURSOR
ld a, MENU_CONFIRM
call PlaySFXConfirmOrCancel
ld a, [wd0c1]
@@ -7516,4 +7516,3 @@ AutoDeckMachineMenuParams:
db SYM_CURSOR_R ; cursor tile number
db SYM_SPACE ; tile behind cursor
dw NULL ; function pointer if non-0
; 0xbb04, end of bank 2

View File

@@ -91,7 +91,7 @@ HandleStartupDebugMenuOption:
.FunctionMap
key_func DEBUGMENU_POWER_ON, _CoreGameLoop
key_func DEBUGMENU_COIN, SetAllCoinsObtainedAndShowCoinMenu
key_func DEBGUMENU_CONFIG, DebugShowConfigMenu
key_func DEBUGMENU_CONFIG, DebugShowConfigMenu
key_func DEBUGMENU_EFFECT_VIEWER, DebugMenuEffectViewer
key_func DEBUGMENU_CREDITS, _PlayCredits
key_func DEBUGMENU_DUEL, StartDebugDuelVsRandomOpponent

View File

@@ -3760,4 +3760,3 @@ Func_2bd92:
tx DarkSpecialDeckMachineText
tx RareCardDeckMachineText
tx MysteriousCardDeckMachineTextPadded
; 0x2bdeb, end of bank a

View File

@@ -7267,7 +7267,7 @@ Func_3f858:
ld b, a
ld a, [wTextBoxFrameColor]
ld c, a
cp16bc_lb 0, 3
cp16bc_bytes 0, 3
jr nz, .asm_3f87b
farcall Func_1352a
ret

View File

@@ -833,7 +833,7 @@ CheckIfListInBCIsSubsetOfListInHL:
ret
; for each card in bc,
; drop the first occurence of it in hl and shift the rest
; drop the first occurrence of it in hl and shift the rest
; set carry if not found
RemoveCardsInBCFromHL:
push af

View File

@@ -72,7 +72,7 @@ MACRO? cp16bc_long
:
ENDM
MACRO? cp16_lb
MACRO? cp16_bytes
ld a, d
cp \1
jr c, :+
@@ -82,7 +82,7 @@ MACRO? cp16_lb
:
ENDM
MACRO? cp16bc_lb
MACRO? cp16bc_bytes
ld a, b
cp \1
jr c, :+
@@ -92,6 +92,10 @@ MACRO? cp16bc_lb
:
ENDM
MACRO? cpcoord
cp16_bytes \1, \2
ENDM
MACRO? cphl
inc hl
ld a, [hld]
@@ -102,10 +106,6 @@ MACRO? cphl
:
ENDM
MACRO? cpcoord
cp16_lb \1, \2
ENDM
MACRO? add_r16_r8
add LOW(\1)
ld LOW(\1), \2