Expand MatchCallStruct defs, use REMATCH_* enum

This commit is contained in:
Phlosioneer 2019-04-02 03:22:07 -04:00 committed by huderlem
parent 65d8b68f9d
commit 6916f09cd5
5 changed files with 298 additions and 120 deletions

View File

@ -1,10 +1,11 @@
#ifndef GUARD_BATTLE_SETUP_H #ifndef GUARD_BATTLE_SETUP_H
#define GUARD_BATTLE_SETUP_H #define GUARD_BATTLE_SETUP_H
#include "gym_leader_rematch.h"
#define REMATCHES_COUNT 5 #define REMATCHES_COUNT 5
#define REMATCH_TABLE_ENTRIES 78 #define REMATCH_TABLE_ENTRIES 78
#define REMATCH_WALLY_ENTRY 64 #define REMATCH_ELITE_FOUR_ENTRIES REMATCH_SIDNEY
#define REMATCH_ELITE_FOUR_ENTRIES 73
struct RematchTrainer struct RematchTrainer
{ {

View File

@ -445,13 +445,14 @@
#define FLAG_REMATCH_NORMAN 0x1A2 #define FLAG_REMATCH_NORMAN 0x1A2
#define FLAG_REMATCH_WINONA 0x1A3 #define FLAG_REMATCH_WINONA 0x1A3
#define FLAG_REMATCH_TATE_AND_LIZA 0x1A4 #define FLAG_REMATCH_TATE_AND_LIZA 0x1A4
#define FLAG_REMATCH_JUAN 0x1A5 // Note: FLAG_REMATCH_JUAN is handled by FLAG_ENABLE_JUAN_MATCH_CALL instead.
#define FLAG_REMATCH_SIDNEY 0x1A6 #define FLAG_REMATCH_SIDNEY 0x1A5
#define FLAG_REMATCH_PHOEBE 0x1A7 #define FLAG_REMATCH_PHOEBE 0x1A6
#define FLAG_REMATCH_GLACIA 0x1A8 #define FLAG_REMATCH_GLACIA 0x1A7
#define FLAG_REMATCH_DRAKE 0x1A9 #define FLAG_REMATCH_DRAKE 0x1A8
#define FLAG_REMATCH_WALLACE 0x1AA #define FLAG_REMATCH_WALLACE 0x1A9
#define FLAG_UNUSED_0x1AA 0x1AA // Unused Flag
#define FLAG_UNUSED_0x1AB 0x1AB // Unused Flag #define FLAG_UNUSED_0x1AB 0x1AB // Unused Flag
#define FLAG_DEFEATED_DEOXYS 0x1AC #define FLAG_DEFEATED_DEOXYS 0x1AC

View File

@ -75,6 +75,8 @@ enum {
REMATCH_WINONA, REMATCH_WINONA,
REMATCH_TATE_AND_LIZA, REMATCH_TATE_AND_LIZA,
REMATCH_JUAN, REMATCH_JUAN,
// Entries below SIDNEY are considered part of REMATCH_ELITE_FOUR_ENTRIES.
REMATCH_SIDNEY, REMATCH_SIDNEY,
REMATCH_PHOEBE, REMATCH_PHOEBE,
REMATCH_GLACIA, REMATCH_GLACIA,

View File

@ -232,86 +232,84 @@ static const struct TrainerBattleParameter sTrainerBContinueScriptBattleParams[]
const struct RematchTrainer gRematchTable[REMATCH_TABLE_ENTRIES] = const struct RematchTrainer gRematchTable[REMATCH_TABLE_ENTRIES] =
{ {
{{TRAINER_ROSE_1, TRAINER_ROSE_2, TRAINER_ROSE_3, TRAINER_ROSE_4, TRAINER_ROSE_5}, 0x0, 0x21}, [REMATCH_ROSE] = {{TRAINER_ROSE_1, TRAINER_ROSE_2, TRAINER_ROSE_3, TRAINER_ROSE_4, TRAINER_ROSE_5}, 0x0, 0x21},
{{TRAINER_ANDRES_1, TRAINER_ANDRES_2, TRAINER_ANDRES_3, TRAINER_ANDRES_4, TRAINER_ANDRES_5}, 0x0, 0x14}, [REMATCH_ANDRES] = {{TRAINER_ANDRES_1, TRAINER_ANDRES_2, TRAINER_ANDRES_3, TRAINER_ANDRES_4, TRAINER_ANDRES_5}, 0x0, 0x14},
{{TRAINER_DUSTY_1, TRAINER_DUSTY_2, TRAINER_DUSTY_3, TRAINER_DUSTY_4, TRAINER_DUSTY_5}, 0x0, 0x1a}, [REMATCH_DUSTY] = {{TRAINER_DUSTY_1, TRAINER_DUSTY_2, TRAINER_DUSTY_3, TRAINER_DUSTY_4, TRAINER_DUSTY_5}, 0x0, 0x1a},
{{TRAINER_LOLA_1, TRAINER_LOLA_2, TRAINER_LOLA_3, TRAINER_LOLA_4, TRAINER_LOLA_5}, 0x0, 0x18}, [REMATCH_LOLA] = {{TRAINER_LOLA_1, TRAINER_LOLA_2, TRAINER_LOLA_3, TRAINER_LOLA_4, TRAINER_LOLA_5}, 0x0, 0x18},
{{TRAINER_RICKY_1, TRAINER_RICKY_2, TRAINER_RICKY_3, TRAINER_RICKY_4, TRAINER_RICKY_5}, 0x0, 0x18}, [REMATCH_RICKY] = {{TRAINER_RICKY_1, TRAINER_RICKY_2, TRAINER_RICKY_3, TRAINER_RICKY_4, TRAINER_RICKY_5}, 0x0, 0x18},
{{TRAINER_LILA_AND_ROY_1, TRAINER_LILA_AND_ROY_2, TRAINER_LILA_AND_ROY_3, TRAINER_LILA_AND_ROY_4, TRAINER_LILA_AND_ROY_5}, 0x0, 0x27}, [REMATCH_LILA_AND_ROY] = {{TRAINER_LILA_AND_ROY_1, TRAINER_LILA_AND_ROY_2, TRAINER_LILA_AND_ROY_3, TRAINER_LILA_AND_ROY_4, TRAINER_LILA_AND_ROY_5}, 0x0, 0x27},
{{TRAINER_CRISTIN_1, TRAINER_CRISTIN_2, TRAINER_CRISTIN_3, TRAINER_CRISTIN_4, TRAINER_CRISTIN_5}, 0x0, 0x24}, [REMATCH_CRISTIN] = {{TRAINER_CRISTIN_1, TRAINER_CRISTIN_2, TRAINER_CRISTIN_3, TRAINER_CRISTIN_4, TRAINER_CRISTIN_5}, 0x0, 0x24},
{{TRAINER_BROOKE_1, TRAINER_BROOKE_2, TRAINER_BROOKE_3, TRAINER_BROOKE_4, TRAINER_BROOKE_5}, 0x0, 0x1a}, [REMATCH_BROOKE] = {{TRAINER_BROOKE_1, TRAINER_BROOKE_2, TRAINER_BROOKE_3, TRAINER_BROOKE_4, TRAINER_BROOKE_5}, 0x0, 0x1a},
{{TRAINER_WILTON_1, TRAINER_WILTON_2, TRAINER_WILTON_3, TRAINER_WILTON_4, TRAINER_WILTON_5}, 0x0, 0x1a}, [REMATCH_WILTON] = {{TRAINER_WILTON_1, TRAINER_WILTON_2, TRAINER_WILTON_3, TRAINER_WILTON_4, TRAINER_WILTON_5}, 0x0, 0x1a},
{{TRAINER_VALERIE_1, TRAINER_VALERIE_2, TRAINER_VALERIE_3, TRAINER_VALERIE_4, TRAINER_VALERIE_5}, 0x18, 0x14}, [REMATCH_VALERIE] = {{TRAINER_VALERIE_1, TRAINER_VALERIE_2, TRAINER_VALERIE_3, TRAINER_VALERIE_4, TRAINER_VALERIE_5}, 0x18, 0x14},
{{TRAINER_CINDY_1, TRAINER_CINDY_3, TRAINER_CINDY_4, TRAINER_CINDY_5, TRAINER_CINDY_6}, 0x0, 0x13}, [REMATCH_CINDY] = {{TRAINER_CINDY_1, TRAINER_CINDY_3, TRAINER_CINDY_4, TRAINER_CINDY_5, TRAINER_CINDY_6}, 0x0, 0x13},
{{TRAINER_THALIA_1, TRAINER_THALIA_2, TRAINER_THALIA_3, TRAINER_THALIA_4, TRAINER_THALIA_5}, 0x18, 0x38}, [REMATCH_THALIA] = {{TRAINER_THALIA_1, TRAINER_THALIA_2, TRAINER_THALIA_3, TRAINER_THALIA_4, TRAINER_THALIA_5}, 0x18, 0x38},
{{TRAINER_JESSICA_1, TRAINER_JESSICA_2, TRAINER_JESSICA_3, TRAINER_JESSICA_4, TRAINER_JESSICA_5}, 0x0, 0x24}, [REMATCH_JESSICA] = {{TRAINER_JESSICA_1, TRAINER_JESSICA_2, TRAINER_JESSICA_3, TRAINER_JESSICA_4, TRAINER_JESSICA_5}, 0x0, 0x24},
{{TRAINER_WINSTON_1, TRAINER_WINSTON_2, TRAINER_WINSTON_3, TRAINER_WINSTON_4, TRAINER_WINSTON_5}, 0x0, 0x13}, [REMATCH_WINSTON] = {{TRAINER_WINSTON_1, TRAINER_WINSTON_2, TRAINER_WINSTON_3, TRAINER_WINSTON_4, TRAINER_WINSTON_5}, 0x0, 0x13},
{{TRAINER_STEVE_1, TRAINER_STEVE_2, TRAINER_STEVE_3, TRAINER_STEVE_4, TRAINER_STEVE_5}, 0x0, 0x1d}, [REMATCH_STEVE] = {{TRAINER_STEVE_1, TRAINER_STEVE_2, TRAINER_STEVE_3, TRAINER_STEVE_4, TRAINER_STEVE_5}, 0x0, 0x1d},
{{TRAINER_TONY_1, TRAINER_TONY_2, TRAINER_TONY_3, TRAINER_TONY_4, TRAINER_TONY_5}, 0x0, 0x16}, [REMATCH_TONY] = {{TRAINER_TONY_1, TRAINER_TONY_2, TRAINER_TONY_3, TRAINER_TONY_4, TRAINER_TONY_5}, 0x0, 0x16},
{{TRAINER_NOB_1, TRAINER_NOB_2, TRAINER_NOB_3, TRAINER_NOB_4, TRAINER_NOB_5}, 0x0, 0x1e}, [REMATCH_NOB] = {{TRAINER_NOB_1, TRAINER_NOB_2, TRAINER_NOB_3, TRAINER_NOB_4, TRAINER_NOB_5}, 0x0, 0x1e},
{{TRAINER_KOJI_1, TRAINER_KOJI_2, TRAINER_KOJI_3, TRAINER_KOJI_4, TRAINER_KOJI_5}, 0x0, 0x2a}, [REMATCH_KOJI] = {{TRAINER_KOJI_1, TRAINER_KOJI_2, TRAINER_KOJI_3, TRAINER_KOJI_4, TRAINER_KOJI_5}, 0x0, 0x2a},
{{TRAINER_FERNANDO_1, TRAINER_FERNANDO_2, TRAINER_FERNANDO_3, TRAINER_FERNANDO_4, TRAINER_FERNANDO_5}, 0x0, 0x26}, [REMATCH_FERNANDO] = {{TRAINER_FERNANDO_1, TRAINER_FERNANDO_2, TRAINER_FERNANDO_3, TRAINER_FERNANDO_4, TRAINER_FERNANDO_5}, 0x0, 0x26},
{{TRAINER_DALTON_1, TRAINER_DALTON_2, TRAINER_DALTON_3, TRAINER_DALTON_4, TRAINER_DALTON_5}, 0x0, 0x21}, [REMATCH_DALTON] = {{TRAINER_DALTON_1, TRAINER_DALTON_2, TRAINER_DALTON_3, TRAINER_DALTON_4, TRAINER_DALTON_5}, 0x0, 0x21},
{{TRAINER_BERNIE_1, TRAINER_BERNIE_2, TRAINER_BERNIE_3, TRAINER_BERNIE_4, TRAINER_BERNIE_5}, 0x0, 0x1d}, [REMATCH_BERNIE] = {{TRAINER_BERNIE_1, TRAINER_BERNIE_2, TRAINER_BERNIE_3, TRAINER_BERNIE_4, TRAINER_BERNIE_5}, 0x0, 0x1d},
{{TRAINER_ETHAN_1, TRAINER_ETHAN_2, TRAINER_ETHAN_3, TRAINER_ETHAN_4, TRAINER_ETHAN_5}, 0x18, 0xd}, [REMATCH_ETHAN] = {{TRAINER_ETHAN_1, TRAINER_ETHAN_2, TRAINER_ETHAN_3, TRAINER_ETHAN_4, TRAINER_ETHAN_5}, 0x18, 0xd},
{{TRAINER_JOHN_AND_JAY_1, TRAINER_JOHN_AND_JAY_2, TRAINER_JOHN_AND_JAY_3, TRAINER_JOHN_AND_JAY_4, TRAINER_JOHN_AND_JAY_5}, 0x18, 0x1}, [REMATCH_JOHN_AND_JAY] = {{TRAINER_JOHN_AND_JAY_1, TRAINER_JOHN_AND_JAY_2, TRAINER_JOHN_AND_JAY_3, TRAINER_JOHN_AND_JAY_4, TRAINER_JOHN_AND_JAY_5}, 0x18, 0x1},
{{TRAINER_JEFFREY_1, TRAINER_JEFFREY_2, TRAINER_JEFFREY_3, TRAINER_JEFFREY_4, TRAINER_JEFFREY_5}, 0x0, 0x23}, [REMATCH_JEFFREY] = {{TRAINER_JEFFREY_1, TRAINER_JEFFREY_2, TRAINER_JEFFREY_3, TRAINER_JEFFREY_4, TRAINER_JEFFREY_5}, 0x0, 0x23},
{{TRAINER_CAMERON_1, TRAINER_CAMERON_2, TRAINER_CAMERON_3, TRAINER_CAMERON_4, TRAINER_CAMERON_5}, 0x0, 0x26}, [REMATCH_CAMERON] = {{TRAINER_CAMERON_1, TRAINER_CAMERON_2, TRAINER_CAMERON_3, TRAINER_CAMERON_4, TRAINER_CAMERON_5}, 0x0, 0x26},
{{TRAINER_JACKI_1, TRAINER_JACKI_2, TRAINER_JACKI_3, TRAINER_JACKI_4, TRAINER_JACKI_5}, 0x0, 0x26}, [REMATCH_JACKI] = {{TRAINER_JACKI_1, TRAINER_JACKI_2, TRAINER_JACKI_3, TRAINER_JACKI_4, TRAINER_JACKI_5}, 0x0, 0x26},
{{TRAINER_WALTER_1, TRAINER_WALTER_2, TRAINER_WALTER_3, TRAINER_WALTER_4, TRAINER_WALTER_5}, 0x0, 0x24}, [REMATCH_WALTER] = {{TRAINER_WALTER_1, TRAINER_WALTER_2, TRAINER_WALTER_3, TRAINER_WALTER_4, TRAINER_WALTER_5}, 0x0, 0x24},
{{TRAINER_KAREN_1, TRAINER_KAREN_2, TRAINER_KAREN_3, TRAINER_KAREN_4, TRAINER_KAREN_5}, 0x0, 0x1f}, [REMATCH_KAREN] = {{TRAINER_KAREN_1, TRAINER_KAREN_2, TRAINER_KAREN_3, TRAINER_KAREN_4, TRAINER_KAREN_5}, 0x0, 0x1f},
{{TRAINER_JERRY_1, TRAINER_JERRY_2, TRAINER_JERRY_3, TRAINER_JERRY_4, TRAINER_JERRY_5}, 0x0, 0x1f}, [REMATCH_JERRY] = {{TRAINER_JERRY_1, TRAINER_JERRY_2, TRAINER_JERRY_3, TRAINER_JERRY_4, TRAINER_JERRY_5}, 0x0, 0x1f},
{{TRAINER_ANNA_AND_MEG_1, TRAINER_ANNA_AND_MEG_2, TRAINER_ANNA_AND_MEG_3, TRAINER_ANNA_AND_MEG_4, TRAINER_ANNA_AND_MEG_5}, 0x0, 0x20}, [REMATCH_ANNA_AND_MEG] = {{TRAINER_ANNA_AND_MEG_1, TRAINER_ANNA_AND_MEG_2, TRAINER_ANNA_AND_MEG_3, TRAINER_ANNA_AND_MEG_4, TRAINER_ANNA_AND_MEG_5}, 0x0, 0x20},
{{TRAINER_ISABEL_1, TRAINER_ISABEL_2, TRAINER_ISABEL_3, TRAINER_ISABEL_4, TRAINER_ISABEL_5}, 0x0, 0x19}, [REMATCH_ISABEL] = {{TRAINER_ISABEL_1, TRAINER_ISABEL_2, TRAINER_ISABEL_3, TRAINER_ISABEL_4, TRAINER_ISABEL_5}, 0x0, 0x19},
{{TRAINER_MIGUEL_1, TRAINER_MIGUEL_2, TRAINER_MIGUEL_3, TRAINER_MIGUEL_4, TRAINER_MIGUEL_5}, 0x0, 0x12}, [REMATCH_MIGUEL] = {{TRAINER_MIGUEL_1, TRAINER_MIGUEL_2, TRAINER_MIGUEL_3, TRAINER_MIGUEL_4, TRAINER_MIGUEL_5}, 0x0, 0x12},
{{TRAINER_TIMOTHY_1, TRAINER_TIMOTHY_2, TRAINER_TIMOTHY_3, TRAINER_TIMOTHY_4, TRAINER_TIMOTHY_5}, 0x0, 0x1e}, [REMATCH_TIMOTHY] = {{TRAINER_TIMOTHY_1, TRAINER_TIMOTHY_2, TRAINER_TIMOTHY_3, TRAINER_TIMOTHY_4, TRAINER_TIMOTHY_5}, 0x0, 0x1e},
{{TRAINER_SHELBY_1, TRAINER_SHELBY_2, TRAINER_SHELBY_3, TRAINER_SHELBY_4, TRAINER_SHELBY_5}, 0x18, 0xc}, [REMATCH_SHELBY] = {{TRAINER_SHELBY_1, TRAINER_SHELBY_2, TRAINER_SHELBY_3, TRAINER_SHELBY_4, TRAINER_SHELBY_5}, 0x18, 0xc},
{{TRAINER_CALVIN_1, TRAINER_CALVIN_2, TRAINER_CALVIN_3, TRAINER_CALVIN_4, TRAINER_CALVIN_5}, 0x0, 0x11}, [REMATCH_CALVIN] = {{TRAINER_CALVIN_1, TRAINER_CALVIN_2, TRAINER_CALVIN_3, TRAINER_CALVIN_4, TRAINER_CALVIN_5}, 0x0, 0x11},
{{TRAINER_ELLIOT_1, TRAINER_ELLIOT_2, TRAINER_ELLIOT_3, TRAINER_ELLIOT_4, TRAINER_ELLIOT_5}, 0x0, 0x15}, [REMATCH_ELLIOT] = {{TRAINER_ELLIOT_1, TRAINER_ELLIOT_2, TRAINER_ELLIOT_3, TRAINER_ELLIOT_4, TRAINER_ELLIOT_5}, 0x0, 0x15},
{{TRAINER_ISAIAH_1, TRAINER_ISAIAH_2, TRAINER_ISAIAH_3, TRAINER_ISAIAH_4, TRAINER_ISAIAH_5}, 0x0, 0x2b}, [REMATCH_ISAIAH] = {{TRAINER_ISAIAH_1, TRAINER_ISAIAH_2, TRAINER_ISAIAH_3, TRAINER_ISAIAH_4, TRAINER_ISAIAH_5}, 0x0, 0x2b},
{{TRAINER_MARIA_1, TRAINER_MARIA_2, TRAINER_MARIA_3, TRAINER_MARIA_4, TRAINER_MARIA_5}, 0x0, 0x20}, [REMATCH_MARIA] = {{TRAINER_MARIA_1, TRAINER_MARIA_2, TRAINER_MARIA_3, TRAINER_MARIA_4, TRAINER_MARIA_5}, 0x0, 0x20},
{{TRAINER_ABIGAIL_1, TRAINER_ABIGAIL_2, TRAINER_ABIGAIL_3, TRAINER_ABIGAIL_4, TRAINER_ABIGAIL_5}, 0x0, 0x19}, [REMATCH_ABIGAIL] = {{TRAINER_ABIGAIL_1, TRAINER_ABIGAIL_2, TRAINER_ABIGAIL_3, TRAINER_ABIGAIL_4, TRAINER_ABIGAIL_5}, 0x0, 0x19},
{{TRAINER_DYLAN_1, TRAINER_DYLAN_2, TRAINER_DYLAN_3, TRAINER_DYLAN_4, TRAINER_DYLAN_5}, 0x0, 0x20}, [REMATCH_DYLAN] = {{TRAINER_DYLAN_1, TRAINER_DYLAN_2, TRAINER_DYLAN_3, TRAINER_DYLAN_4, TRAINER_DYLAN_5}, 0x0, 0x20},
{{TRAINER_KATELYN_1, TRAINER_KATELYN_2, TRAINER_KATELYN_3, TRAINER_KATELYN_4, TRAINER_KATELYN_5}, 0x0, 0x2b}, [REMATCH_KATELYN] = {{TRAINER_KATELYN_1, TRAINER_KATELYN_2, TRAINER_KATELYN_3, TRAINER_KATELYN_4, TRAINER_KATELYN_5}, 0x0, 0x2b},
{{TRAINER_BENJAMIN_1, TRAINER_BENJAMIN_2, TRAINER_BENJAMIN_3, TRAINER_BENJAMIN_4, TRAINER_BENJAMIN_5}, 0x0, 0x19}, [REMATCH_BENJAMIN] = {{TRAINER_BENJAMIN_1, TRAINER_BENJAMIN_2, TRAINER_BENJAMIN_3, TRAINER_BENJAMIN_4, TRAINER_BENJAMIN_5}, 0x0, 0x19},
{{TRAINER_PABLO_1, TRAINER_PABLO_2, TRAINER_PABLO_3, TRAINER_PABLO_4, TRAINER_PABLO_5}, 0x0, 0x29}, [REMATCH_PABLO] = {{TRAINER_PABLO_1, TRAINER_PABLO_2, TRAINER_PABLO_3, TRAINER_PABLO_4, TRAINER_PABLO_5}, 0x0, 0x29},
{{TRAINER_NICOLAS_1, TRAINER_NICOLAS_2, TRAINER_NICOLAS_3, TRAINER_NICOLAS_4, TRAINER_NICOLAS_5}, 0x18, 0x1}, [REMATCH_NICOLAS] = {{TRAINER_NICOLAS_1, TRAINER_NICOLAS_2, TRAINER_NICOLAS_3, TRAINER_NICOLAS_4, TRAINER_NICOLAS_5}, 0x18, 0x1},
{{TRAINER_ROBERT_1, TRAINER_ROBERT_2, TRAINER_ROBERT_3, TRAINER_ROBERT_4, TRAINER_ROBERT_5}, 0x0, 0x23}, [REMATCH_ROBERT] = {{TRAINER_ROBERT_1, TRAINER_ROBERT_2, TRAINER_ROBERT_3, TRAINER_ROBERT_4, TRAINER_ROBERT_5}, 0x0, 0x23},
{{TRAINER_LAO_1, TRAINER_LAO_2, TRAINER_LAO_3, TRAINER_LAO_4, TRAINER_LAO_5}, 0x0, 0x1c}, [REMATCH_LAO] = {{TRAINER_LAO_1, TRAINER_LAO_2, TRAINER_LAO_3, TRAINER_LAO_4, TRAINER_LAO_5}, 0x0, 0x1c},
{{TRAINER_CYNDY_1, TRAINER_CYNDY_2, TRAINER_CYNDY_3, TRAINER_CYNDY_4, TRAINER_CYNDY_5}, 0x0, 0x1e}, [REMATCH_CYNDY] = {{TRAINER_CYNDY_1, TRAINER_CYNDY_2, TRAINER_CYNDY_3, TRAINER_CYNDY_4, TRAINER_CYNDY_5}, 0x0, 0x1e},
{{TRAINER_MADELINE_1, TRAINER_MADELINE_2, TRAINER_MADELINE_3, TRAINER_MADELINE_4, TRAINER_MADELINE_5}, 0x0, 0x1c}, [REMATCH_MADELINE] = {{TRAINER_MADELINE_1, TRAINER_MADELINE_2, TRAINER_MADELINE_3, TRAINER_MADELINE_4, TRAINER_MADELINE_5}, 0x0, 0x1c},
{{TRAINER_JENNY_1, TRAINER_JENNY_2, TRAINER_JENNY_3, TRAINER_JENNY_4, TRAINER_JENNY_5}, 0x0, 0x27}, [REMATCH_JENNY] = {{TRAINER_JENNY_1, TRAINER_JENNY_2, TRAINER_JENNY_3, TRAINER_JENNY_4, TRAINER_JENNY_5}, 0x0, 0x27},
{{TRAINER_DIANA_1, TRAINER_DIANA_2, TRAINER_DIANA_3, TRAINER_DIANA_4, TRAINER_DIANA_5}, 0x18, 0xd}, [REMATCH_DIANA] = {{TRAINER_DIANA_1, TRAINER_DIANA_2, TRAINER_DIANA_3, TRAINER_DIANA_4, TRAINER_DIANA_5}, 0x18, 0xd},
{{TRAINER_AMY_AND_LIV_1, TRAINER_AMY_AND_LIV_2, TRAINER_AMY_AND_LIV_4, TRAINER_AMY_AND_LIV_5, TRAINER_AMY_AND_LIV_6}, 0x0, 0x12}, [REMATCH_AMY_AND_LIV] = {{TRAINER_AMY_AND_LIV_1, TRAINER_AMY_AND_LIV_2, TRAINER_AMY_AND_LIV_4, TRAINER_AMY_AND_LIV_5, TRAINER_AMY_AND_LIV_6}, 0x0, 0x12},
{{TRAINER_ERNEST_1, TRAINER_ERNEST_2, TRAINER_ERNEST_3, TRAINER_ERNEST_4, TRAINER_ERNEST_5}, 0x0, 0x28}, [REMATCH_ERNEST] = {{TRAINER_ERNEST_1, TRAINER_ERNEST_2, TRAINER_ERNEST_3, TRAINER_ERNEST_4, TRAINER_ERNEST_5}, 0x0, 0x28},
{{TRAINER_CORY_1, TRAINER_CORY_2, TRAINER_CORY_3, TRAINER_CORY_4, TRAINER_CORY_5}, 0x0, 0x17}, [REMATCH_CORY] = {{TRAINER_CORY_1, TRAINER_CORY_2, TRAINER_CORY_3, TRAINER_CORY_4, TRAINER_CORY_5}, 0x0, 0x17},
{{TRAINER_EDWIN_1, TRAINER_EDWIN_2, TRAINER_EDWIN_3, TRAINER_EDWIN_4, TRAINER_EDWIN_5}, 0x0, 0x19}, [REMATCH_EDWIN] = {{TRAINER_EDWIN_1, TRAINER_EDWIN_2, TRAINER_EDWIN_3, TRAINER_EDWIN_4, TRAINER_EDWIN_5}, 0x0, 0x19},
{{TRAINER_LYDIA_1, TRAINER_LYDIA_2, TRAINER_LYDIA_3, TRAINER_LYDIA_4, TRAINER_LYDIA_5}, 0x0, 0x20}, [REMATCH_LYDIA] = {{TRAINER_LYDIA_1, TRAINER_LYDIA_2, TRAINER_LYDIA_3, TRAINER_LYDIA_4, TRAINER_LYDIA_5}, 0x0, 0x20},
{{TRAINER_ISAAC_1, TRAINER_ISAAC_2, TRAINER_ISAAC_3, TRAINER_ISAAC_4, TRAINER_ISAAC_5}, 0x0, 0x20}, [REMATCH_ISAAC] = {{TRAINER_ISAAC_1, TRAINER_ISAAC_2, TRAINER_ISAAC_3, TRAINER_ISAAC_4, TRAINER_ISAAC_5}, 0x0, 0x20},
{{TRAINER_GABRIELLE_1, TRAINER_GABRIELLE_2, TRAINER_GABRIELLE_3, TRAINER_GABRIELLE_4, TRAINER_GABRIELLE_5}, 0x18, 0x11}, [REMATCH_GABRIELLE] = {{TRAINER_GABRIELLE_1, TRAINER_GABRIELLE_2, TRAINER_GABRIELLE_3, TRAINER_GABRIELLE_4, TRAINER_GABRIELLE_5}, 0x18, 0x11},
{{TRAINER_CATHERINE_1, TRAINER_CATHERINE_2, TRAINER_CATHERINE_3, TRAINER_CATHERINE_4, TRAINER_CATHERINE_5}, 0x0, 0x22}, [REMATCH_CATHERINE] = {{TRAINER_CATHERINE_1, TRAINER_CATHERINE_2, TRAINER_CATHERINE_3, TRAINER_CATHERINE_4, TRAINER_CATHERINE_5}, 0x0, 0x22},
{{TRAINER_JACKSON_1, TRAINER_JACKSON_2, TRAINER_JACKSON_3, TRAINER_JACKSON_4, TRAINER_JACKSON_5}, 0x0, 0x22}, [REMATCH_JACKSON] = {{TRAINER_JACKSON_1, TRAINER_JACKSON_2, TRAINER_JACKSON_3, TRAINER_JACKSON_4, TRAINER_JACKSON_5}, 0x0, 0x22},
{{TRAINER_HALEY_1, TRAINER_HALEY_2, TRAINER_HALEY_3, TRAINER_HALEY_4, TRAINER_HALEY_5}, 0x0, 0x13}, [REMATCH_HALEY] = {{TRAINER_HALEY_1, TRAINER_HALEY_2, TRAINER_HALEY_3, TRAINER_HALEY_4, TRAINER_HALEY_5}, 0x0, 0x13},
{{TRAINER_JAMES_1, TRAINER_JAMES_2, TRAINER_JAMES_3, TRAINER_JAMES_4, TRAINER_JAMES_5}, 0x18, 0xb}, [REMATCH_JAMES] = {{TRAINER_JAMES_1, TRAINER_JAMES_2, TRAINER_JAMES_3, TRAINER_JAMES_4, TRAINER_JAMES_5}, 0x18, 0xb},
{{TRAINER_TRENT_1, TRAINER_TRENT_2, TRAINER_TRENT_3, TRAINER_TRENT_4, TRAINER_TRENT_5}, 0x0, 0x1b}, [REMATCH_TRENT] = {{TRAINER_TRENT_1, TRAINER_TRENT_2, TRAINER_TRENT_3, TRAINER_TRENT_4, TRAINER_TRENT_5}, 0x0, 0x1b},
{{TRAINER_SAWYER_1, TRAINER_SAWYER_2, TRAINER_SAWYER_3, TRAINER_SAWYER_4, TRAINER_SAWYER_5}, 0x18, 0xc}, [REMATCH_SAWYER] = {{TRAINER_SAWYER_1, TRAINER_SAWYER_2, TRAINER_SAWYER_3, TRAINER_SAWYER_4, TRAINER_SAWYER_5}, 0x18, 0xc},
{{TRAINER_KIRA_AND_DAN_1, TRAINER_KIRA_AND_DAN_2, TRAINER_KIRA_AND_DAN_3, TRAINER_KIRA_AND_DAN_4, TRAINER_KIRA_AND_DAN_5}, 0x18, 0x3e}, [REMATCH_KIRA_AND_DAN] = {{TRAINER_KIRA_AND_DAN_1, TRAINER_KIRA_AND_DAN_2, TRAINER_KIRA_AND_DAN_3, TRAINER_KIRA_AND_DAN_4, TRAINER_KIRA_AND_DAN_5}, 0x18, 0x3e},
// Wally's entry index is hardcoded. [REMATCH_WALLY_3] = {{TRAINER_WALLY_3, TRAINER_WALLY_4, TRAINER_WALLY_5, TRAINER_WALLY_6, TRAINER_WALLY_6}, 0x18, 0x2b},
[REMATCH_WALLY_ENTRY] = {{TRAINER_WALLY_3, TRAINER_WALLY_4, TRAINER_WALLY_5, TRAINER_WALLY_6, TRAINER_WALLY_6}, 0x18, 0x2b}, [REMATCH_ROXANNE] = {{TRAINER_ROXANNE_1, TRAINER_ROXANNE_2, TRAINER_ROXANNE_3, TRAINER_ROXANNE_4, TRAINER_ROXANNE_5}, 0x0, 0x3},
{{TRAINER_ROXANNE_1, TRAINER_ROXANNE_2, TRAINER_ROXANNE_3, TRAINER_ROXANNE_4, TRAINER_ROXANNE_5}, 0x0, 0x3}, [REMATCH_BRAWLY] = {{TRAINER_BRAWLY_1, TRAINER_BRAWLY_2, TRAINER_BRAWLY_3, TRAINER_BRAWLY_4, TRAINER_BRAWLY_5}, 0x0, 0xb},
{{TRAINER_BRAWLY_1, TRAINER_BRAWLY_2, TRAINER_BRAWLY_3, TRAINER_BRAWLY_4, TRAINER_BRAWLY_5}, 0x0, 0xb}, [REMATCH_WATTSON] = {{TRAINER_WATTSON_1, TRAINER_WATTSON_2, TRAINER_WATTSON_3, TRAINER_WATTSON_4, TRAINER_WATTSON_5}, 0x0, 0x2},
{{TRAINER_WATTSON_1, TRAINER_WATTSON_2, TRAINER_WATTSON_3, TRAINER_WATTSON_4, TRAINER_WATTSON_5}, 0x0, 0x2}, [REMATCH_FLANNERY] = {{TRAINER_FLANNERY_1, TRAINER_FLANNERY_2, TRAINER_FLANNERY_3, TRAINER_FLANNERY_4, TRAINER_FLANNERY_5}, 0x0, 0xc},
{{TRAINER_FLANNERY_1, TRAINER_FLANNERY_2, TRAINER_FLANNERY_3, TRAINER_FLANNERY_4, TRAINER_FLANNERY_5}, 0x0, 0xc}, [REMATCH_NORMAN] = {{TRAINER_NORMAN_1, TRAINER_NORMAN_2, TRAINER_NORMAN_3, TRAINER_NORMAN_4, TRAINER_NORMAN_5}, 0x0, 0x0},
{{TRAINER_NORMAN_1, TRAINER_NORMAN_2, TRAINER_NORMAN_3, TRAINER_NORMAN_4, TRAINER_NORMAN_5}, 0x0, 0x0}, [REMATCH_WINONA] = {{TRAINER_WINONA_1, TRAINER_WINONA_2, TRAINER_WINONA_3, TRAINER_WINONA_4, TRAINER_WINONA_5}, 0x0, 0x4},
{{TRAINER_WINONA_1, TRAINER_WINONA_2, TRAINER_WINONA_3, TRAINER_WINONA_4, TRAINER_WINONA_5}, 0x0, 0x4}, [REMATCH_TATE_AND_LIZA] = {{TRAINER_TATE_AND_LIZA_1, TRAINER_TATE_AND_LIZA_2, TRAINER_TATE_AND_LIZA_3, TRAINER_TATE_AND_LIZA_4, TRAINER_TATE_AND_LIZA_5}, 0x0, 0x6},
{{TRAINER_TATE_AND_LIZA_1, TRAINER_TATE_AND_LIZA_2, TRAINER_TATE_AND_LIZA_3, TRAINER_TATE_AND_LIZA_4, TRAINER_TATE_AND_LIZA_5}, 0x0, 0x6}, [REMATCH_JUAN] = {{TRAINER_JUAN_1, TRAINER_JUAN_2, TRAINER_JUAN_3, TRAINER_JUAN_4, TRAINER_JUAN_5}, 0x0, 0x7},
{{TRAINER_JUAN_1, TRAINER_JUAN_2, TRAINER_JUAN_3, TRAINER_JUAN_4, TRAINER_JUAN_5}, 0x0, 0x7}, [REMATCH_SIDNEY] = {{TRAINER_SIDNEY, TRAINER_SIDNEY, TRAINER_SIDNEY, TRAINER_SIDNEY, TRAINER_SIDNEY}, 0x0, 0x8},
[REMATCH_PHOEBE] = {{TRAINER_PHOEBE, TRAINER_PHOEBE, TRAINER_PHOEBE, TRAINER_PHOEBE, TRAINER_PHOEBE}, 0x0, 0x8},
[REMATCH_ELITE_FOUR_ENTRIES] = {{TRAINER_SIDNEY, TRAINER_SIDNEY, TRAINER_SIDNEY, TRAINER_SIDNEY, TRAINER_SIDNEY}, 0x0, 0x8}, [REMATCH_GLACIA] = {{TRAINER_GLACIA, TRAINER_GLACIA, TRAINER_GLACIA, TRAINER_GLACIA, TRAINER_GLACIA}, 0x0, 0x8},
{{TRAINER_PHOEBE, TRAINER_PHOEBE, TRAINER_PHOEBE, TRAINER_PHOEBE, TRAINER_PHOEBE}, 0x0, 0x8}, [REMATCH_DRAKE] = {{TRAINER_DRAKE, TRAINER_DRAKE, TRAINER_DRAKE, TRAINER_DRAKE, TRAINER_DRAKE}, 0x0, 0x8},
{{TRAINER_GLACIA, TRAINER_GLACIA, TRAINER_GLACIA, TRAINER_GLACIA, TRAINER_GLACIA}, 0x0, 0x8}, [REMATCH_WALLACE] = {{TRAINER_WALLACE, TRAINER_WALLACE, TRAINER_WALLACE, TRAINER_WALLACE, TRAINER_WALLACE}, 0x0, 0x8},
{{TRAINER_DRAKE, TRAINER_DRAKE, TRAINER_DRAKE, TRAINER_DRAKE, TRAINER_DRAKE}, 0x0, 0x8},
{{TRAINER_WALLACE, TRAINER_WALLACE, TRAINER_WALLACE, TRAINER_WALLACE, TRAINER_WALLACE}, 0x0, 0x8},
}; };
static const u16 sBadgeFlags[8] = static const u16 sBadgeFlags[8] =
@ -1547,7 +1545,7 @@ static bool32 sub_80B1D94(s32 rematchTableId)
{ {
if (rematchTableId >= REMATCH_ELITE_FOUR_ENTRIES) if (rematchTableId >= REMATCH_ELITE_FOUR_ENTRIES)
return TRUE; return TRUE;
else if (rematchTableId == REMATCH_WALLY_ENTRY) else if (rematchTableId == REMATCH_WALLY_3)
return (FlagGet(FLAG_DEFEATED_WALLY_VICTORY_ROAD) == FALSE); return (FlagGet(FLAG_DEFEATED_WALLY_VICTORY_ROAD) == FALSE);
else else
return FALSE; return FALSE;
@ -1575,7 +1573,7 @@ static bool32 UpdateRandomTrainerRematches(const struct RematchTrainer *table, u
s32 i; s32 i;
bool32 ret = FALSE; bool32 ret = FALSE;
for (i = 0; i <= REMATCH_WALLY_ENTRY; i++) for (i = 0; i <= REMATCH_WALLY_3; i++)
{ {
if (table[i].mapGroup == mapGroup && table[i].mapNum == mapNum && !sub_80B1D94(i)) if (table[i].mapGroup == mapGroup && table[i].mapNum == mapNum && !sub_80B1D94(i))
{ {

View File

@ -73,22 +73,17 @@ struct MatchCallStruct4 {
const match_call_text_data_t *textData; const match_call_text_data_t *textData;
}; };
// Note: Type1 and Type5 have identical struct layouts.
struct MatchCallStruct5 { struct MatchCallStruct5 {
u8 type; u8 type;
u8 v1; u8 v1;
u16 flag; u16 flag;
u16 v4; u16 rematchTableIdx;
const u8 *desc; const u8 *desc;
const u8 *name; const u8 *name;
const match_call_text_data_t *textData; const match_call_text_data_t *textData;
}; };
#define MATCHCALLDEF(name, type_, ...) \
static const struct MatchCallStruct##type_ name = { \
.type = type_, \
__VA_ARGS__ \
};
typedef union { typedef union {
const struct MatchCallStructCommon *common; const struct MatchCallStructCommon *common;
const struct MatchCallStruct0 *type0; const struct MatchCallStruct0 *type0;
@ -328,7 +323,15 @@ static const match_call_text_data_t sMrStoneTextScripts[] = {
{ NULL, 0xFFFF, 0xFFFF } { NULL, 0xFFFF, 0xFFFF }
}; };
MATCHCALLDEF(sMrStoneMatchCallHeader, 0, 10, 0xffff, gMrStoneMatchCallDesc, gMrStoneMatchCallName, sMrStoneTextScripts); static const struct MatchCallStruct0 sMrStoneMatchCallHeader =
{
.type = 0,
.v1 = 10,
.flag = 0xFFFF,
.desc = gMrStoneMatchCallDesc,
.name = gMrStoneMatchCallName,
.textData = sMrStoneTextScripts
};
static const match_call_text_data_t sNormanTextScripts[] = { static const match_call_text_data_t sNormanTextScripts[] = {
{ gText_Norman_Pokenav_2B5719, FLAG_ENABLE_NORMAN_MATCH_CALL, 0xFFFF }, { gText_Norman_Pokenav_2B5719, FLAG_ENABLE_NORMAN_MATCH_CALL, 0xFFFF },
@ -343,9 +346,25 @@ static const match_call_text_data_t sNormanTextScripts[] = {
{ NULL, 0xFFFF, 0xFFFF } { NULL, 0xFFFF, 0xFFFF }
}; };
MATCHCALLDEF(sNormanMatchCallHeader, 5, 7, FLAG_ENABLE_NORMAN_MATCH_CALL, 0x45, gNormanMatchCallDesc, gNormanMatchCallName, sNormanTextScripts); static const struct MatchCallStruct5 sNormanMatchCallHeader =
{
.type = 5,
.v1 = 7,
.flag = FLAG_ENABLE_NORMAN_MATCH_CALL,
.rematchTableIdx = REMATCH_NORMAN,
.desc = gNormanMatchCallDesc,
.name = gNormanMatchCallName,
.textData = sNormanTextScripts
};
MATCHCALLDEF(sProfBirchMatchCallHeader, 3, 0, FLAG_ENABLE_PROF_BIRCH_MATCH_CALL, gProfBirchMatchCallDesc, gProfBirchMatchCallName) static const struct MatchCallStruct3 sProfBirchMatchCallHeader =
{
.type = 3,
.v1 = 0,
.flag = FLAG_ENABLE_PROF_BIRCH_MATCH_CALL,
.desc = gProfBirchMatchCallDesc,
.name = gProfBirchMatchCallName
};
static const match_call_text_data_t sMomTextScripts[] = { static const match_call_text_data_t sMomTextScripts[] = {
{ gText_Mom_Pokenav_2B227B, 0xffff, 0xffff }, { gText_Mom_Pokenav_2B227B, 0xffff, 0xffff },
@ -354,7 +373,15 @@ static const match_call_text_data_t sMomTextScripts[] = {
{ NULL, 0xffff, 0xffff } { NULL, 0xffff, 0xffff }
}; };
MATCHCALLDEF(sMomMatchCallHeader, 0, 0, FLAG_ENABLE_MOM_MATCH_CALL, gMomMatchCallDesc, gMomMatchCallName, sMomTextScripts); static const struct MatchCallStruct0 sMomMatchCallHeader =
{
.type = 0,
.v1 = 0,
.flag = FLAG_ENABLE_MOM_MATCH_CALL,
.desc = gMomMatchCallDesc,
.name = gMomMatchCallName,
.textData = sMomTextScripts
};
static const match_call_text_data_t sStevenTextScripts[] = { static const match_call_text_data_t sStevenTextScripts[] = {
{ gText_Steven_Pokenav_2B5B95, 0xffff, 0xffff }, { gText_Steven_Pokenav_2B5B95, 0xffff, 0xffff },
@ -367,7 +394,15 @@ static const match_call_text_data_t sStevenTextScripts[] = {
{ NULL, 0xffff, 0xffff }, { NULL, 0xffff, 0xffff },
}; };
MATCHCALLDEF(sStevenMatchCallHeader, 0, 0xd5, FLAG_REGISTERED_STEVEN_POKENAV, gStevenMatchCallDesc, gStevenMatchCallName, sStevenTextScripts); static const struct MatchCallStruct0 sStevenMatchCallHeader =
{
.type = 0,
.v1 = 0xD5,
.flag = FLAG_REGISTERED_STEVEN_POKENAV,
.desc = gStevenMatchCallDesc,
.name = gStevenMatchCallName,
.textData = sStevenTextScripts
};
static const match_call_text_data_t sMayTextScripts[] = { static const match_call_text_data_t sMayTextScripts[] = {
{ gText_May_Pokenav_2B3AB3, 0xFFFF, 0xFFFF }, { gText_May_Pokenav_2B3AB3, 0xFFFF, 0xFFFF },
@ -388,7 +423,15 @@ static const match_call_text_data_t sMayTextScripts[] = {
{ NULL, 0xFFFF, 0xFFFF } { NULL, 0xFFFF, 0xFFFF }
}; };
MATCHCALLDEF(sMayMatchCallHeader, 4, MALE, FLAG_ENABLE_RIVAL_MATCH_CALL, gMayBrendanMatchCallDesc, gExpandedPlaceholder_May, sMayTextScripts); static const struct MatchCallStruct4 sMayMatchCallHeader =
{
.type = 4,
.gender = MALE,
.flag = FLAG_ENABLE_RIVAL_MATCH_CALL,
.desc = gMayBrendanMatchCallDesc,
.name = gExpandedPlaceholder_May,
.textData = sMayTextScripts
};
static const match_call_text_data_t sBrendanTextScripts[] = { static const match_call_text_data_t sBrendanTextScripts[] = {
{ gText_Brendan_Pokenav_2B43EF, 0xFFFF, 0xFFFF }, { gText_Brendan_Pokenav_2B43EF, 0xFFFF, 0xFFFF },
@ -409,7 +452,15 @@ static const match_call_text_data_t sBrendanTextScripts[] = {
{ NULL, 0xFFFF, 0xFFFF } { NULL, 0xFFFF, 0xFFFF }
}; };
MATCHCALLDEF(sBrendanMatchCallHeader, 4, FEMALE, FLAG_ENABLE_RIVAL_MATCH_CALL, gMayBrendanMatchCallDesc, gExpandedPlaceholder_Brendan, sBrendanTextScripts); static const struct MatchCallStruct4 sBrendanMatchCallHeader =
{
.type = 4,
.gender = FEMALE,
.flag = FLAG_ENABLE_RIVAL_MATCH_CALL,
.desc = gMayBrendanMatchCallDesc,
.name = gExpandedPlaceholder_Brendan,
.textData = sBrendanTextScripts
};
static const match_call_text_data_t sWallyTextScripts[] = { static const match_call_text_data_t sWallyTextScripts[] = {
{ gText_Wally_Pokenav_2B4DE2, 0xFFFF, 0xFFFF }, { gText_Wally_Pokenav_2B4DE2, 0xFFFF, 0xFFFF },
@ -429,7 +480,16 @@ const struct MatchCallSubstruct2 sWallyAdditionalData[] = {
{ 0xFFFF, 0xD5 } { 0xFFFF, 0xD5 }
}; };
MATCHCALLDEF(sWallyMatchCallHeader, 2, 0, FLAG_ENABLE_WALLY_MATCH_CALL, REMATCH_WALLY_3, gWallyMatchCallDesc, sWallyTextScripts, sWallyAdditionalData); static const struct MatchCallStruct2 sWallyMatchCallHeader =
{
.type = 2,
.v1 = 0,
.flag = FLAG_ENABLE_WALLY_MATCH_CALL,
.rematchTableIdx = REMATCH_WALLY_3,
.desc = gWallyMatchCallDesc,
.textData = sWallyTextScripts,
.v10 = sWallyAdditionalData
};
static const match_call_text_data_t sScottTextScripts[] = { static const match_call_text_data_t sScottTextScripts[] = {
{ gText_Scott_Pokenav_2B5184, 0xFFFF, 0xFFFF }, { gText_Scott_Pokenav_2B5184, 0xFFFF, 0xFFFF },
@ -443,7 +503,15 @@ static const match_call_text_data_t sScottTextScripts[] = {
}; };
MATCHCALLDEF(sScottMatchCallHeader, 0, 0xD5, FLAG_ENABLE_SCOTT_MATCH_CALL, gScottMatchCallDesc, gScottMatchCallName, sScottTextScripts); static const struct MatchCallStruct0 sScottMatchCallHeader =
{
.type = 0,
.v1 = 0xD5,
.flag = FLAG_ENABLE_SCOTT_MATCH_CALL,
.desc = gScottMatchCallDesc,
.name = gScottMatchCallName,
.textData = sScottTextScripts
};
static const match_call_text_data_t sRoxanneTextScripts[] = { static const match_call_text_data_t sRoxanneTextScripts[] = {
{ gText_Roxanne_Pokenav_2B2456, 0xFFFE, 0xFFFF }, { gText_Roxanne_Pokenav_2B2456, 0xFFFE, 0xFFFF },
@ -453,7 +521,16 @@ static const match_call_text_data_t sRoxanneTextScripts[] = {
{ NULL, 0xFFFF, 0xFFFF } { NULL, 0xFFFF, 0xFFFF }
}; };
MATCHCALLDEF(sRoxanneMatchCallHeader, 5, 10, FLAG_ENABLE_ROXANNE_MATCH_CALL, 0x41, gRoxanneMatchCallDesc, NULL, sRoxanneTextScripts); static const struct MatchCallStruct5 sRoxanneMatchCallHeader =
{
.type = 5,
.v1 = 10,
.flag = FLAG_ENABLE_ROXANNE_MATCH_CALL,
.rematchTableIdx = REMATCH_ROXANNE,
.desc = gRoxanneMatchCallDesc,
.name = NULL,
.textData = sRoxanneTextScripts
};
static const match_call_text_data_t sBrawlyTextScripts[] = { static const match_call_text_data_t sBrawlyTextScripts[] = {
{ gText_Brawly_Pokenav_2B2659, 0xFFFE, 0xFFFF }, { gText_Brawly_Pokenav_2B2659, 0xFFFE, 0xFFFF },
@ -463,7 +540,16 @@ static const match_call_text_data_t sBrawlyTextScripts[] = {
{ NULL, 0xFFFF, 0xFFFF } { NULL, 0xFFFF, 0xFFFF }
}; };
MATCHCALLDEF(sBrawlyMatchCallHeader, 5, 2, FLAG_ENABLE_BRAWLY_MATCH_CALL, 0x42, gBrawlyMatchCallDesc, NULL, sBrawlyTextScripts); static const struct MatchCallStruct5 sBrawlyMatchCallHeader =
{
.type = 5,
.v1 = 2,
.flag = FLAG_ENABLE_BRAWLY_MATCH_CALL,
.rematchTableIdx = REMATCH_BRAWLY,
.desc = gBrawlyMatchCallDesc,
.name = NULL,
.textData = sBrawlyTextScripts
};
static const match_call_text_data_t sWattsonTextScripts[] = { static const match_call_text_data_t sWattsonTextScripts[] = {
{ gText_Wattson_Pokenav_2B2912, 0xFFFE, 0xFFFF }, { gText_Wattson_Pokenav_2B2912, 0xFFFE, 0xFFFF },
@ -473,7 +559,16 @@ static const match_call_text_data_t sWattsonTextScripts[] = {
{ NULL, 0xFFFF, 0xFFFF } { NULL, 0xFFFF, 0xFFFF }
}; };
MATCHCALLDEF(sWattsonMatchCallHeader, 5, 9, FLAG_ENABLE_WATTSON_MATCH_CALL, 0x43, gWattsonMatchCallDesc, NULL, sWattsonTextScripts); static const struct MatchCallStruct5 sWattsonMatchCallHeader =
{
.type = 5,
.v1 = 9,
.flag = FLAG_ENABLE_WATTSON_MATCH_CALL,
.rematchTableIdx = REMATCH_WATTSON,
.desc = gWattsonMatchCallDesc,
.name = NULL,
.textData = sWattsonTextScripts
};
static const match_call_text_data_t sFlanneryTextScripts[] = { static const match_call_text_data_t sFlanneryTextScripts[] = {
{ gText_Flannery_Pokenav_2B2B4D, 0xFFFE, 0xFFFF }, { gText_Flannery_Pokenav_2B2B4D, 0xFFFE, 0xFFFF },
@ -483,7 +578,16 @@ static const match_call_text_data_t sFlanneryTextScripts[] = {
{ NULL, 0xFFFF, 0xFFFF } { NULL, 0xFFFF, 0xFFFF }
}; };
MATCHCALLDEF(sFlanneryMatchCallHeader, 5, 3, FLAG_ENABLE_FLANNERY_MATCH_CALL, 0x44, gFlanneryMatchCallDesc, NULL, sFlanneryTextScripts); static const struct MatchCallStruct5 sFlanneryMatchCallHeader =
{
.type = 5,
.v1 = 3,
.flag = FLAG_ENABLE_FLANNERY_MATCH_CALL,
.rematchTableIdx = REMATCH_FLANNERY,
.desc = gFlanneryMatchCallDesc,
.name = NULL,
.textData = sFlanneryTextScripts
};
static const match_call_text_data_t sWinonaTextScripts[] = { static const match_call_text_data_t sWinonaTextScripts[] = {
{ gText_Winona_Pokenav_2B2DA4, 0xFFFE, 0xFFFF }, { gText_Winona_Pokenav_2B2DA4, 0xFFFE, 0xFFFF },
@ -493,7 +597,16 @@ static const match_call_text_data_t sWinonaTextScripts[] = {
{ NULL, 0xFFFF, 0xFFFF } { NULL, 0xFFFF, 0xFFFF }
}; };
MATCHCALLDEF(sWinonaMatchCallHeader, 5, 11, FLAG_ENABLE_WINONA_MATCH_CALL, 0x46, gWinonaMatchCallDesc, NULL, sWinonaTextScripts); static const struct MatchCallStruct5 sWinonaMatchCallHeader =
{
.type = 5,
.v1 = 11,
.flag = FLAG_ENABLE_WINONA_MATCH_CALL,
.rematchTableIdx = REMATCH_WINONA,
.desc = gWinonaMatchCallDesc,
.name = NULL,
.textData = sWinonaTextScripts
};
static const match_call_text_data_t sTateLizaTextScripts[] = { static const match_call_text_data_t sTateLizaTextScripts[] = {
{ gText_TateLiza_Pokenav_2B2F97, 0xFFFE, 0xFFFF }, { gText_TateLiza_Pokenav_2B2F97, 0xFFFE, 0xFFFF },
@ -503,7 +616,16 @@ static const match_call_text_data_t sTateLizaTextScripts[] = {
{ NULL, 0xFFFF, 0xFFFF } { NULL, 0xFFFF, 0xFFFF }
}; };
MATCHCALLDEF(sTateLizaMatchCallHeader, 5, 13, FLAG_ENABLE_TATE_AND_LIZA_MATCH_CALL, 0x47, gTateLizaMatchCallDesc, NULL, sTateLizaTextScripts); static const struct MatchCallStruct5 sTateLizaMatchCallHeader =
{
.type = 5,
.v1 = 13,
.flag = FLAG_ENABLE_TATE_AND_LIZA_MATCH_CALL,
.rematchTableIdx = REMATCH_TATE_AND_LIZA,
.desc = gTateLizaMatchCallDesc,
.name = NULL,
.textData = sTateLizaTextScripts
};
static const match_call_text_data_t sJuanTextScripts[] = { static const match_call_text_data_t sJuanTextScripts[] = {
{ gText_Juan_Pokenav_2B3249, 0xFFFE, 0xFFFF }, { gText_Juan_Pokenav_2B3249, 0xFFFE, 0xFFFF },
@ -513,42 +635,96 @@ static const match_call_text_data_t sJuanTextScripts[] = {
{ NULL, 0xFFFF, 0xFFFF } { NULL, 0xFFFF, 0xFFFF }
}; };
MATCHCALLDEF(sJuanMatchCallHeader, 5, 14, FLAG_ENABLE_JUAN_MATCH_CALL, 0x48, gJuanMatchCallDesc, NULL, sJuanTextScripts); static const struct MatchCallStruct5 sJuanMatchCallHeader =
{
.type = 5,
.v1 = 14,
.flag = FLAG_ENABLE_JUAN_MATCH_CALL,
.rematchTableIdx = REMATCH_JUAN,
.desc = gJuanMatchCallDesc,
.name = NULL,
.textData = sJuanTextScripts
};
static const match_call_text_data_t sSidneyTextScripts[] = { static const match_call_text_data_t sSidneyTextScripts[] = {
{ gText_Sidney_Pokenav_2B34CC, 0xFFFF, 0xFFFF }, { gText_Sidney_Pokenav_2B34CC, 0xFFFF, 0xFFFF },
{ NULL, 0xFFFF, 0xFFFF } { NULL, 0xFFFF, 0xFFFF }
}; };
MATCHCALLDEF(sSidneyMatchCallHeader, 5, 15, FLAG_REMATCH_JUAN, 0x49, gEliteFourMatchCallDesc, NULL, sSidneyTextScripts); static const struct MatchCallStruct5 sSidneyMatchCallHeader =
{
.type = 5,
.v1 = 15,
.flag = FLAG_REMATCH_SIDNEY,
.rematchTableIdx = REMATCH_SIDNEY,
.desc = gEliteFourMatchCallDesc,
.name = NULL,
.textData = sSidneyTextScripts
};
static const match_call_text_data_t sPhoebeTextScripts[] = { static const match_call_text_data_t sPhoebeTextScripts[] = {
{ gText_Phoebe_Pokenav_2B3561, 0xFFFF, 0xFFFF }, { gText_Phoebe_Pokenav_2B3561, 0xFFFF, 0xFFFF },
{ NULL, 0xFFFF, 0xFFFF } { NULL, 0xFFFF, 0xFFFF }
}; };
MATCHCALLDEF(sPhoebeMatchCallHeader, 5, 15, FLAG_REMATCH_SIDNEY, 0x4A, gEliteFourMatchCallDesc, NULL, sPhoebeTextScripts); static const struct MatchCallStruct5 sPhoebeMatchCallHeader =
{
.type = 5,
.v1 = 15,
.flag = FLAG_REMATCH_PHOEBE,
.rematchTableIdx = REMATCH_PHOEBE,
.desc = gEliteFourMatchCallDesc,
.name = NULL,
.textData = sPhoebeTextScripts
};
static const match_call_text_data_t sGlaciaTextScripts[] = { static const match_call_text_data_t sGlaciaTextScripts[] = {
{ gText_Glacia_Pokenav_2B35E4, 0xFFFF, 0xFFFF }, { gText_Glacia_Pokenav_2B35E4, 0xFFFF, 0xFFFF },
{ NULL, 0xFFFF, 0xFFFF } { NULL, 0xFFFF, 0xFFFF }
}; };
MATCHCALLDEF(sGlaciaMatchCallHeader, 5, 15, FLAG_REMATCH_PHOEBE, 0x4B, gEliteFourMatchCallDesc, NULL, sGlaciaTextScripts); static const struct MatchCallStruct5 sGlaciaMatchCallHeader =
{
.type = 5,
.v1 = 15,
.flag = FLAG_REMATCH_GLACIA,
.rematchTableIdx = REMATCH_GLACIA,
.desc = gEliteFourMatchCallDesc,
.name = NULL,
.textData = sGlaciaTextScripts
};
static const match_call_text_data_t sDrakeTextScripts[] = { static const match_call_text_data_t sDrakeTextScripts[] = {
{ gText_Drake_Pokenav_2B368B, 0xFFFF, 0xFFFF }, { gText_Drake_Pokenav_2B368B, 0xFFFF, 0xFFFF },
{ NULL, 0xFFFF, 0xFFFF } { NULL, 0xFFFF, 0xFFFF }
}; };
MATCHCALLDEF(sDrakeMatchCallHeader, 5, 15, FLAG_REMATCH_GLACIA, 0x4C, gEliteFourMatchCallDesc, NULL, sDrakeTextScripts); static const struct MatchCallStruct5 sDrakeMatchCallHeader =
{
.type = 5,
.v1 = 15,
.flag = FLAG_REMATCH_DRAKE,
.rematchTableIdx = REMATCH_DRAKE,
.desc = gEliteFourMatchCallDesc,
.name = NULL,
.textData = sDrakeTextScripts
};
static const match_call_text_data_t sWallaceTextScripts[] = { static const match_call_text_data_t sWallaceTextScripts[] = {
{ gText_Wallace_Pokenav_2B3790, 0xFFFF, 0xFFFF }, { gText_Wallace_Pokenav_2B3790, 0xFFFF, 0xFFFF },
{ NULL, 0xFFFF, 0xFFFF } { NULL, 0xFFFF, 0xFFFF }
}; };
MATCHCALLDEF(sWallaceMatchCallHeader, 5, 15, FLAG_REMATCH_DRAKE, 0x4D, gChampionMatchCallDesc, NULL, sWallaceTextScripts); static const struct MatchCallStruct5 sWallaceMatchCallHeader =
{
.type = 5,
.v1 = 15,
.flag = FLAG_REMATCH_WALLACE,
.rematchTableIdx = REMATCH_WALLACE,
.desc = gChampionMatchCallDesc,
.name = NULL,
.textData = sWallaceTextScripts
};
static const match_call_t sMatchCallHeaders[] = { static const match_call_t sMatchCallHeaders[] = {
{.type0 = &sMrStoneMatchCallHeader}, {.type0 = &sMrStoneMatchCallHeader},
@ -906,9 +1082,9 @@ static void MatchCall_GetMessage_Type0(match_call_t matchCall, u8 *dest)
static void MatchCall_GetMessage_Type1(match_call_t matchCall, u8 *dest) static void MatchCall_GetMessage_Type1(match_call_t matchCall, u8 *dest)
{ {
if (matchCall.common->type != 5) if (matchCall.common->type != 5)
sub_81D1920(matchCall.type5->textData, dest); sub_81D1920(matchCall.type1->textData, dest);
else else
sub_81D199C(matchCall.type1->textData, matchCall.type1->rematchTableIdx, dest); sub_81D199C(matchCall.type5->textData, matchCall.type5->rematchTableIdx, dest);
} }
static void MatchCall_GetMessage_Type2(match_call_t matchCall, u8 *dest) static void MatchCall_GetMessage_Type2(match_call_t matchCall, u8 *dest)