mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-11-16 11:37:40 +01:00
Merge branch 'master' into trailingSpaces
This commit is contained in:
commit
a6ab2eb883
BIN
graphics/battle_interface/healthbox_doubles_frameend.png
Normal file
BIN
graphics/battle_interface/healthbox_doubles_frameend.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.5 KiB |
BIN
graphics/battle_interface/healthbox_doubles_frameend_bar.png
Normal file
BIN
graphics/battle_interface/healthbox_doubles_frameend_bar.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.6 KiB |
Binary file not shown.
Before Width: | Height: | Size: 84 B |
Binary file not shown.
Before Width: | Height: | Size: 92 B |
@ -86,6 +86,7 @@
|
|||||||
#define EASY_CHAT_BATTLE_WORDS_COUNT 6
|
#define EASY_CHAT_BATTLE_WORDS_COUNT 6
|
||||||
#define MOVE_NAME_LENGTH 12
|
#define MOVE_NAME_LENGTH 12
|
||||||
#define NUM_QUESTIONNAIRE_WORDS 4
|
#define NUM_QUESTIONNAIRE_WORDS 4
|
||||||
|
#define QUIZ_QUESTION_LEN 9
|
||||||
|
|
||||||
#define MALE 0
|
#define MALE 0
|
||||||
#define FEMALE 1
|
#define FEMALE 1
|
||||||
|
@ -21,8 +21,6 @@
|
|||||||
#define QUIZ_AUTHOR_NAME_PLAYER 1
|
#define QUIZ_AUTHOR_NAME_PLAYER 1
|
||||||
#define QUIZ_AUTHOR_NAME_OTHER_PLAYER 2
|
#define QUIZ_AUTHOR_NAME_OTHER_PLAYER 2
|
||||||
|
|
||||||
#define QUIZ_QUESTION_LEN 9
|
|
||||||
|
|
||||||
// Constants for how many good Pokéblocks the Contest Lady was given
|
// Constants for how many good Pokéblocks the Contest Lady was given
|
||||||
// This determines how her performance is described when her TV show comes on
|
// This determines how her performance is described when her TV show comes on
|
||||||
#define CONTEST_LADY_NORMAL 0
|
#define CONTEST_LADY_NORMAL 0
|
||||||
|
@ -761,7 +761,7 @@ struct LilycoveLadyQuiz
|
|||||||
{
|
{
|
||||||
/*0x000*/ u8 id;
|
/*0x000*/ u8 id;
|
||||||
/*0x001*/ u8 state;
|
/*0x001*/ u8 state;
|
||||||
/*0x002*/ u16 question[9];
|
/*0x002*/ u16 question[QUIZ_QUESTION_LEN];
|
||||||
/*0x014*/ u16 correctAnswer;
|
/*0x014*/ u16 correctAnswer;
|
||||||
/*0x016*/ u16 playerAnswer;
|
/*0x016*/ u16 playerAnswer;
|
||||||
/*0x018*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
/*0x018*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||||
|
@ -103,11 +103,11 @@ enum
|
|||||||
HEALTHBOX_GFX_63, //hp bar red [7 pixels]
|
HEALTHBOX_GFX_63, //hp bar red [7 pixels]
|
||||||
HEALTHBOX_GFX_64, //hp bar red [8 pixels]
|
HEALTHBOX_GFX_64, //hp bar red [8 pixels]
|
||||||
HEALTHBOX_GFX_65, //hp bar frame end
|
HEALTHBOX_GFX_65, //hp bar frame end
|
||||||
HEALTHBOX_GFX_66, //status ball [full]
|
HEALTHBOX_GFX_STATUS_BALL, // Full
|
||||||
HEALTHBOX_GFX_67, //status ball [empty]
|
HEALTHBOX_GFX_STATUS_BALL_EMPTY,
|
||||||
HEALTHBOX_GFX_68, //status ball [fainted]
|
HEALTHBOX_GFX_STATUS_BALL_FAINTED,
|
||||||
HEALTHBOX_GFX_69, //status ball [statused]
|
HEALTHBOX_GFX_STATUS_BALL_STATUSED,
|
||||||
HEALTHBOX_GFX_70, //status ball [unused extra]
|
HEALTHBOX_GFX_STATUS_BALL_CAUGHT,
|
||||||
HEALTHBOX_GFX_STATUS_PSN_BATTLER1, //status2 "PSN"
|
HEALTHBOX_GFX_STATUS_PSN_BATTLER1, //status2 "PSN"
|
||||||
HEALTHBOX_GFX_72,
|
HEALTHBOX_GFX_72,
|
||||||
HEALTHBOX_GFX_73,
|
HEALTHBOX_GFX_73,
|
||||||
@ -153,8 +153,8 @@ enum
|
|||||||
HEALTHBOX_GFX_STATUS_BRN_BATTLER3, //status4 "BRN"
|
HEALTHBOX_GFX_STATUS_BRN_BATTLER3, //status4 "BRN"
|
||||||
HEALTHBOX_GFX_114,
|
HEALTHBOX_GFX_114,
|
||||||
HEALTHBOX_GFX_115,
|
HEALTHBOX_GFX_115,
|
||||||
HEALTHBOX_GFX_116, //unknown_D12FEC
|
HEALTHBOX_GFX_FRAME_END,
|
||||||
HEALTHBOX_GFX_117, //unknown_D1300C
|
HEALTHBOX_GFX_FRAME_END_BAR,
|
||||||
};
|
};
|
||||||
|
|
||||||
// strings
|
// strings
|
||||||
@ -636,7 +636,7 @@ static const struct SpritePalette sStatusSummaryBallsSpritePal =
|
|||||||
|
|
||||||
static const struct SpriteSheet sStatusSummaryBallsSpriteSheet =
|
static const struct SpriteSheet sStatusSummaryBallsSpriteSheet =
|
||||||
{
|
{
|
||||||
gBattleInterface_BallDisplayGfx, 0x80, TAG_STATUS_SUMMARY_BALLS_TILE
|
&gHealthboxElementsGfxTable[HEALTHBOX_GFX_STATUS_BALL], 0x80, TAG_STATUS_SUMMARY_BALLS_TILE
|
||||||
};
|
};
|
||||||
|
|
||||||
// unused oam data
|
// unused oam data
|
||||||
@ -1225,7 +1225,7 @@ static void UpdateHpTextInHealthboxInDoubles(u8 healthboxSpriteId, s16 value, u8
|
|||||||
windowTileData = AddTextPrinterAndCreateWindowOnHealthbox(text, 0, 5, 0, &windowId);
|
windowTileData = AddTextPrinterAndCreateWindowOnHealthbox(text, 0, 5, 0, &windowId);
|
||||||
HpTextIntoHealthboxObject((void*)(OBJ_VRAM0) + spriteTileNum + 0xC0, windowTileData, 2);
|
HpTextIntoHealthboxObject((void*)(OBJ_VRAM0) + spriteTileNum + 0xC0, windowTileData, 2);
|
||||||
RemoveWindowOnHealthbox(windowId);
|
RemoveWindowOnHealthbox(windowId);
|
||||||
CpuCopy32(GetHealthboxElementGfxPtr(HEALTHBOX_GFX_116),
|
CpuCopy32(GetHealthboxElementGfxPtr(HEALTHBOX_GFX_FRAME_END),
|
||||||
(void*)(OBJ_VRAM0 + 0x680) + (gSprites[healthboxSpriteId].oam.tileNum * TILE_SIZE_4BPP),
|
(void*)(OBJ_VRAM0 + 0x680) + (gSprites[healthboxSpriteId].oam.tileNum * TILE_SIZE_4BPP),
|
||||||
0x20);
|
0x20);
|
||||||
}
|
}
|
||||||
@ -1291,7 +1291,7 @@ static void UpdateHpTextInHealthboxInDoubles(u8 healthboxSpriteId, s16 value, u8
|
|||||||
{
|
{
|
||||||
if (GetBattlerSide(battlerId) == B_SIDE_PLAYER) // Impossible to reach part, because the battlerId is from the opponent's side.
|
if (GetBattlerSide(battlerId) == B_SIDE_PLAYER) // Impossible to reach part, because the battlerId is from the opponent's side.
|
||||||
{
|
{
|
||||||
CpuCopy32(GetHealthboxElementGfxPtr(HEALTHBOX_GFX_116),
|
CpuCopy32(GetHealthboxElementGfxPtr(HEALTHBOX_GFX_FRAME_END),
|
||||||
(void*)(OBJ_VRAM0) + ((gSprites[healthboxSpriteId].oam.tileNum + 52) * TILE_SIZE_4BPP),
|
(void*)(OBJ_VRAM0) + ((gSprites[healthboxSpriteId].oam.tileNum + 52) * TILE_SIZE_4BPP),
|
||||||
0x20);
|
0x20);
|
||||||
}
|
}
|
||||||
@ -1399,7 +1399,7 @@ void SwapHpBarsWithHpText(void)
|
|||||||
{
|
{
|
||||||
UpdateStatusIconInHealthbox(gHealthboxSpriteIds[i]);
|
UpdateStatusIconInHealthbox(gHealthboxSpriteIds[i]);
|
||||||
UpdateHealthboxAttribute(gHealthboxSpriteIds[i], &gPlayerParty[gBattlerPartyIndexes[i]], HEALTHBOX_HEALTH_BAR);
|
UpdateHealthboxAttribute(gHealthboxSpriteIds[i], &gPlayerParty[gBattlerPartyIndexes[i]], HEALTHBOX_HEALTH_BAR);
|
||||||
CpuCopy32(GetHealthboxElementGfxPtr(HEALTHBOX_GFX_117), (void*)(OBJ_VRAM0 + 0x680 + gSprites[gHealthboxSpriteIds[i]].oam.tileNum * TILE_SIZE_4BPP), 32);
|
CpuCopy32(GetHealthboxElementGfxPtr(HEALTHBOX_GFX_FRAME_END_BAR), (void*)(OBJ_VRAM0 + 0x680 + gSprites[gHealthboxSpriteIds[i]].oam.tileNum * TILE_SIZE_4BPP), 32);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -1962,7 +1962,7 @@ static void TryAddPokeballIconToHealthbox(u8 healthboxSpriteId, bool8 noStatus)
|
|||||||
healthBarSpriteId = gSprites[healthboxSpriteId].hMain_HealthBarSpriteId;
|
healthBarSpriteId = gSprites[healthboxSpriteId].hMain_HealthBarSpriteId;
|
||||||
|
|
||||||
if (noStatus)
|
if (noStatus)
|
||||||
CpuCopy32(GetHealthboxElementGfxPtr(HEALTHBOX_GFX_70), (void*)(OBJ_VRAM0 + (gSprites[healthBarSpriteId].oam.tileNum + 8) * TILE_SIZE_4BPP), 32);
|
CpuCopy32(GetHealthboxElementGfxPtr(HEALTHBOX_GFX_STATUS_BALL_CAUGHT), (void*)(OBJ_VRAM0 + (gSprites[healthBarSpriteId].oam.tileNum + 8) * TILE_SIZE_4BPP), 32);
|
||||||
else
|
else
|
||||||
CpuFill32(0, (void*)(OBJ_VRAM0 + (gSprites[healthBarSpriteId].oam.tileNum + 8) * TILE_SIZE_4BPP), 32);
|
CpuFill32(0, (void*)(OBJ_VRAM0 + (gSprites[healthBarSpriteId].oam.tileNum + 8) * TILE_SIZE_4BPP), 32);
|
||||||
}
|
}
|
||||||
|
@ -20,7 +20,7 @@ static const u16 sLilycoveLadyGfxId[] =
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Quiz Lady data
|
// Quiz Lady data
|
||||||
static const u16 sQuizLadyQuestion1[] =
|
static const u16 sQuizLadyQuestion1[QUIZ_QUESTION_LEN] =
|
||||||
{
|
{
|
||||||
EC_WORD_WHICH,
|
EC_WORD_WHICH,
|
||||||
EC_WORD_STORES,
|
EC_WORD_STORES,
|
||||||
@ -33,7 +33,7 @@ static const u16 sQuizLadyQuestion1[] =
|
|||||||
EC_WORD_POKENAV
|
EC_WORD_POKENAV
|
||||||
};
|
};
|
||||||
|
|
||||||
static const u16 sQuizLadyQuestion2[] =
|
static const u16 sQuizLadyQuestion2[QUIZ_QUESTION_LEN] =
|
||||||
{
|
{
|
||||||
EC_WORD_WHICH,
|
EC_WORD_WHICH,
|
||||||
EC_WORD_ISN_T,
|
EC_WORD_ISN_T,
|
||||||
@ -46,7 +46,7 @@ static const u16 sQuizLadyQuestion2[] =
|
|||||||
EC_WORD_DARK
|
EC_WORD_DARK
|
||||||
};
|
};
|
||||||
|
|
||||||
static const u16 sQuizLadyQuestion3[] =
|
static const u16 sQuizLadyQuestion3[QUIZ_QUESTION_LEN] =
|
||||||
{
|
{
|
||||||
EC_WORD_HOW,
|
EC_WORD_HOW,
|
||||||
EC_WORD_DO,
|
EC_WORD_DO,
|
||||||
@ -59,7 +59,7 @@ static const u16 sQuizLadyQuestion3[] =
|
|||||||
EC_WORD_CUTE_CHARM
|
EC_WORD_CUTE_CHARM
|
||||||
};
|
};
|
||||||
|
|
||||||
static const u16 sQuizLadyQuestion4[] =
|
static const u16 sQuizLadyQuestion4[QUIZ_QUESTION_LEN] =
|
||||||
{
|
{
|
||||||
EC_WORD_WHICH,
|
EC_WORD_WHICH,
|
||||||
EC_WORD_IS,
|
EC_WORD_IS,
|
||||||
@ -72,7 +72,7 @@ static const u16 sQuizLadyQuestion4[] =
|
|||||||
EC_WORD_MACHINE
|
EC_WORD_MACHINE
|
||||||
};
|
};
|
||||||
|
|
||||||
static const u16 sQuizLadyQuestion5[] =
|
static const u16 sQuizLadyQuestion5[QUIZ_QUESTION_LEN] =
|
||||||
{
|
{
|
||||||
EC_WORD_WHICH,
|
EC_WORD_WHICH,
|
||||||
EC_WORD_ITEM,
|
EC_WORD_ITEM,
|
||||||
@ -85,7 +85,7 @@ static const u16 sQuizLadyQuestion5[] =
|
|||||||
EC_WORD_PHONE
|
EC_WORD_PHONE
|
||||||
};
|
};
|
||||||
|
|
||||||
static const u16 sQuizLadyQuestion6[] =
|
static const u16 sQuizLadyQuestion6[QUIZ_QUESTION_LEN] =
|
||||||
{
|
{
|
||||||
EC_WORD_WHICH,
|
EC_WORD_WHICH,
|
||||||
EC_WORD_WILL,
|
EC_WORD_WILL,
|
||||||
@ -98,7 +98,7 @@ static const u16 sQuizLadyQuestion6[] =
|
|||||||
EC_WORD_SWIFT_SWIM
|
EC_WORD_SWIFT_SWIM
|
||||||
};
|
};
|
||||||
|
|
||||||
static const u16 sQuizLadyQuestion7[] =
|
static const u16 sQuizLadyQuestion7[QUIZ_QUESTION_LEN] =
|
||||||
{
|
{
|
||||||
EC_WORD_WHICH,
|
EC_WORD_WHICH,
|
||||||
EC_WORD_OF,
|
EC_WORD_OF,
|
||||||
@ -111,7 +111,7 @@ static const u16 sQuizLadyQuestion7[] =
|
|||||||
EC_WORD_ROCK
|
EC_WORD_ROCK
|
||||||
};
|
};
|
||||||
|
|
||||||
static const u16 sQuizLadyQuestion8[] =
|
static const u16 sQuizLadyQuestion8[QUIZ_QUESTION_LEN] =
|
||||||
{
|
{
|
||||||
EC_WORD_WHICH,
|
EC_WORD_WHICH,
|
||||||
EC_WORD_WILL,
|
EC_WORD_WILL,
|
||||||
@ -124,7 +124,7 @@ static const u16 sQuizLadyQuestion8[] =
|
|||||||
EC_WORD_WONDER_GUARD
|
EC_WORD_WONDER_GUARD
|
||||||
};
|
};
|
||||||
|
|
||||||
static const u16 sQuizLadyQuestion9[] =
|
static const u16 sQuizLadyQuestion9[QUIZ_QUESTION_LEN] =
|
||||||
{
|
{
|
||||||
EC_WORD_WHICH,
|
EC_WORD_WHICH,
|
||||||
EC_WORD_WILL,
|
EC_WORD_WILL,
|
||||||
@ -137,7 +137,7 @@ static const u16 sQuizLadyQuestion9[] =
|
|||||||
EC_WORD_SHED_SKIN
|
EC_WORD_SHED_SKIN
|
||||||
};
|
};
|
||||||
|
|
||||||
static const u16 sQuizLadyQuestion10[] =
|
static const u16 sQuizLadyQuestion10[QUIZ_QUESTION_LEN] =
|
||||||
{
|
{
|
||||||
EC_WORD_WHICH,
|
EC_WORD_WHICH,
|
||||||
EC_WORD_GOES,
|
EC_WORD_GOES,
|
||||||
@ -150,7 +150,7 @@ static const u16 sQuizLadyQuestion10[] =
|
|||||||
EC_WORD_POKENAV
|
EC_WORD_POKENAV
|
||||||
};
|
};
|
||||||
|
|
||||||
static const u16 sQuizLadyQuestion11[] =
|
static const u16 sQuizLadyQuestion11[QUIZ_QUESTION_LEN] =
|
||||||
{
|
{
|
||||||
EC_WORD_WHICH,
|
EC_WORD_WHICH,
|
||||||
EC_WORD_STORES,
|
EC_WORD_STORES,
|
||||||
@ -163,7 +163,7 @@ static const u16 sQuizLadyQuestion11[] =
|
|||||||
EC_WORD_TELEVISION
|
EC_WORD_TELEVISION
|
||||||
};
|
};
|
||||||
|
|
||||||
static const u16 sQuizLadyQuestion12[] =
|
static const u16 sQuizLadyQuestion12[QUIZ_QUESTION_LEN] =
|
||||||
{
|
{
|
||||||
EC_WORD_WHICH,
|
EC_WORD_WHICH,
|
||||||
EC_WORD_MACHINE,
|
EC_WORD_MACHINE,
|
||||||
@ -176,7 +176,7 @@ static const u16 sQuizLadyQuestion12[] =
|
|||||||
EC_WORD_TELEVISION
|
EC_WORD_TELEVISION
|
||||||
};
|
};
|
||||||
|
|
||||||
static const u16 sQuizLadyQuestion13[] =
|
static const u16 sQuizLadyQuestion13[QUIZ_QUESTION_LEN] =
|
||||||
{
|
{
|
||||||
EC_WORD_A,
|
EC_WORD_A,
|
||||||
EC_WORD_POKEMON,
|
EC_WORD_POKEMON,
|
||||||
@ -189,7 +189,7 @@ static const u16 sQuizLadyQuestion13[] =
|
|||||||
EC_WORD_LETTER
|
EC_WORD_LETTER
|
||||||
};
|
};
|
||||||
|
|
||||||
static const u16 sQuizLadyQuestion14[] =
|
static const u16 sQuizLadyQuestion14[QUIZ_QUESTION_LEN] =
|
||||||
{
|
{
|
||||||
EC_WORD_STEEL,
|
EC_WORD_STEEL,
|
||||||
EC_WORD_IS,
|
EC_WORD_IS,
|
||||||
@ -202,7 +202,7 @@ static const u16 sQuizLadyQuestion14[] =
|
|||||||
EC_EMPTY_WORD
|
EC_EMPTY_WORD
|
||||||
};
|
};
|
||||||
|
|
||||||
static const u16 sQuizLadyQuestion15[] =
|
static const u16 sQuizLadyQuestion15[QUIZ_QUESTION_LEN] =
|
||||||
{
|
{
|
||||||
EC_WORD_DARK,
|
EC_WORD_DARK,
|
||||||
EC_WORD_IS,
|
EC_WORD_IS,
|
||||||
@ -215,7 +215,7 @@ static const u16 sQuizLadyQuestion15[] =
|
|||||||
EC_EMPTY_WORD
|
EC_EMPTY_WORD
|
||||||
};
|
};
|
||||||
|
|
||||||
static const u16 sQuizLadyQuestion16[] =
|
static const u16 sQuizLadyQuestion16[QUIZ_QUESTION_LEN] =
|
||||||
{
|
{
|
||||||
EC_WORD_GHOST,
|
EC_WORD_GHOST,
|
||||||
EC_WORD_IS,
|
EC_WORD_IS,
|
||||||
|
@ -355,7 +355,6 @@ const u16 gBattleInterface_BallStatusBarPal[] = INCBIN_U16("graphics/battle_inte
|
|||||||
|
|
||||||
const u16 gBattleInterface_BallDisplayPal[] = INCBIN_U16("graphics/battle_interface/ball_display.gbapal");
|
const u16 gBattleInterface_BallDisplayPal[] = INCBIN_U16("graphics/battle_interface/ball_display.gbapal");
|
||||||
|
|
||||||
//Originally an array?
|
|
||||||
const u8 gHealthboxElementsGfxTable[] = INCBIN_U8("graphics/battle_interface/hpbar.4bpp",
|
const u8 gHealthboxElementsGfxTable[] = INCBIN_U8("graphics/battle_interface/hpbar.4bpp",
|
||||||
"graphics/battle_interface/expbar.4bpp",
|
"graphics/battle_interface/expbar.4bpp",
|
||||||
"graphics/battle_interface/status_psn.4bpp",
|
"graphics/battle_interface/status_psn.4bpp",
|
||||||
@ -365,17 +364,14 @@ const u8 gHealthboxElementsGfxTable[] = INCBIN_U8("graphics/battle_interface/hpb
|
|||||||
"graphics/battle_interface/status_brn.4bpp",
|
"graphics/battle_interface/status_brn.4bpp",
|
||||||
"graphics/battle_interface/misc.4bpp",
|
"graphics/battle_interface/misc.4bpp",
|
||||||
"graphics/battle_interface/hpbar_anim.4bpp",
|
"graphics/battle_interface/hpbar_anim.4bpp",
|
||||||
"graphics/battle_interface/misc_frameend.4bpp");
|
"graphics/battle_interface/misc_frameend.4bpp",
|
||||||
|
"graphics/battle_interface/ball_display.4bpp",
|
||||||
const u8 gBattleInterface_BallDisplayGfx[] = INCBIN_U8("graphics/battle_interface/ball_display.4bpp");
|
"graphics/battle_interface/ball_display_unused_extra.4bpp",
|
||||||
|
"graphics/battle_interface/status2.4bpp", // these three duplicate sets of graphics are for the opponent pokemon
|
||||||
//Originally an array?
|
"graphics/battle_interface/status3.4bpp", // and are also for use in double battles. they use dynamic palettes so
|
||||||
const u8 gUnknown_08C1249C[] = INCBIN_U8("graphics/battle_interface/ball_display_unused_extra.4bpp");
|
"graphics/battle_interface/status4.4bpp", // coloring them is an extreme headache and wont be done for now
|
||||||
const u8 gBattleInterfaceGfx_Status2[] = INCBIN_U8("graphics/battle_interface/status2.4bpp"); // these three duplicate sets of graphics are for the opponent pokemon
|
"graphics/battle_interface/healthbox_doubles_frameend.4bpp",
|
||||||
const u8 gBattleInterfaceGfx_Status3[] = INCBIN_U8("graphics/battle_interface/status3.4bpp"); // and are also for use in double battles. they use dynamic palettes so
|
"graphics/battle_interface/healthbox_doubles_frameend_bar.4bpp");
|
||||||
const u8 gBattleInterfaceGfx_Status4[] = INCBIN_U8("graphics/battle_interface/status4.4bpp"); // coloring them is an extreme headache and wont be done for now
|
|
||||||
const u8 gUnknown_D12FEC[] = INCBIN_U8("graphics/unknown/unknown_D12FEC.4bpp");
|
|
||||||
const u8 gUnknown_D1300C[] = INCBIN_U8("graphics/unknown/unknown_D1300C.4bpp");
|
|
||||||
const u32 gBattleInterfaceGfx_UnusedWindow3[] = INCBIN_U32("graphics/battle_interface/unused_window3.4bpp.lz");
|
const u32 gBattleInterfaceGfx_UnusedWindow3[] = INCBIN_U32("graphics/battle_interface/unused_window3.4bpp.lz");
|
||||||
const u32 gBattleInterfaceGfx_UnusedWindow4[] = INCBIN_U32("graphics/battle_interface/unused_window4.4bpp.lz");
|
const u32 gBattleInterfaceGfx_UnusedWindow4[] = INCBIN_U32("graphics/battle_interface/unused_window4.4bpp.lz");
|
||||||
|
|
||||||
|
@ -65,15 +65,15 @@ void InitLilycoveLady(void)
|
|||||||
id >>= 1;
|
id >>= 1;
|
||||||
switch (id)
|
switch (id)
|
||||||
{
|
{
|
||||||
case LILYCOVE_LADY_QUIZ:
|
case LILYCOVE_LADY_QUIZ:
|
||||||
InitLilycoveQuizLady();
|
InitLilycoveQuizLady();
|
||||||
break;
|
break;
|
||||||
case LILYCOVE_LADY_FAVOR:
|
case LILYCOVE_LADY_FAVOR:
|
||||||
InitLilycoveFavorLady();
|
InitLilycoveFavorLady();
|
||||||
break;
|
break;
|
||||||
case LILYCOVE_LADY_CONTEST:
|
case LILYCOVE_LADY_CONTEST:
|
||||||
InitLilycoveContestLady();
|
InitLilycoveContestLady();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -81,15 +81,15 @@ void ResetLilycoveLadyForRecordMix(void)
|
|||||||
{
|
{
|
||||||
switch (GetLilycoveLadyId())
|
switch (GetLilycoveLadyId())
|
||||||
{
|
{
|
||||||
case LILYCOVE_LADY_QUIZ:
|
case LILYCOVE_LADY_QUIZ:
|
||||||
ResetQuizLadyForRecordMix();
|
ResetQuizLadyForRecordMix();
|
||||||
break;
|
break;
|
||||||
case LILYCOVE_LADY_FAVOR:
|
case LILYCOVE_LADY_FAVOR:
|
||||||
ResetFavorLadyForRecordMix();
|
ResetFavorLadyForRecordMix();
|
||||||
break;
|
break;
|
||||||
case LILYCOVE_LADY_CONTEST:
|
case LILYCOVE_LADY_CONTEST:
|
||||||
ResetContestLadyForRecordMix();
|
ResetContestLadyForRecordMix();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -100,15 +100,15 @@ void InitLilycoveLadyRandomly(void)
|
|||||||
|
|
||||||
switch (lady)
|
switch (lady)
|
||||||
{
|
{
|
||||||
case LILYCOVE_LADY_QUIZ:
|
case LILYCOVE_LADY_QUIZ:
|
||||||
InitLilycoveQuizLady();
|
InitLilycoveQuizLady();
|
||||||
break;
|
break;
|
||||||
case LILYCOVE_LADY_FAVOR:
|
case LILYCOVE_LADY_FAVOR:
|
||||||
InitLilycoveFavorLady();
|
InitLilycoveFavorLady();
|
||||||
break;
|
break;
|
||||||
case LILYCOVE_LADY_CONTEST:
|
case LILYCOVE_LADY_CONTEST:
|
||||||
InitLilycoveContestLady();
|
InitLilycoveContestLady();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -119,10 +119,10 @@ void Script_GetLilycoveLadyId(void)
|
|||||||
|
|
||||||
static u8 GetNumAcceptedItems(const u16 *itemsArray)
|
static u8 GetNumAcceptedItems(const u16 *itemsArray)
|
||||||
{
|
{
|
||||||
u8 items;
|
u8 numItems;
|
||||||
|
|
||||||
for (items = 0; *itemsArray != ITEM_NONE; items ++, itemsArray ++);
|
for (numItems = 0; *itemsArray != ITEM_NONE; numItems++, itemsArray++);
|
||||||
return items;
|
return numItems;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void FavorLadyPickFavorAndBestItem(void)
|
static void FavorLadyPickFavorAndBestItem(void)
|
||||||
@ -160,17 +160,11 @@ u8 GetFavorLadyState(void)
|
|||||||
{
|
{
|
||||||
sFavorLadyPtr = &gSaveBlock1Ptr->lilycoveLady.favor;
|
sFavorLadyPtr = &gSaveBlock1Ptr->lilycoveLady.favor;
|
||||||
if (sFavorLadyPtr->state == LILYCOVE_LADY_STATE_PRIZE)
|
if (sFavorLadyPtr->state == LILYCOVE_LADY_STATE_PRIZE)
|
||||||
{
|
|
||||||
return LILYCOVE_LADY_STATE_PRIZE;
|
return LILYCOVE_LADY_STATE_PRIZE;
|
||||||
}
|
|
||||||
else if (sFavorLadyPtr->state == LILYCOVE_LADY_STATE_COMPLETED)
|
else if (sFavorLadyPtr->state == LILYCOVE_LADY_STATE_COMPLETED)
|
||||||
{
|
|
||||||
return LILYCOVE_LADY_STATE_COMPLETED;
|
return LILYCOVE_LADY_STATE_COMPLETED;
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
|
||||||
return LILYCOVE_LADY_STATE_READY;
|
return LILYCOVE_LADY_STATE_READY;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static const u8 *GetFavorLadyRequest(u8 idx)
|
static const u8 *GetFavorLadyRequest(u8 idx)
|
||||||
@ -209,7 +203,7 @@ void BufferFavorLadyItemName(void)
|
|||||||
|
|
||||||
static void SetFavorLadyPlayerName(const u8 *src, u8 *dest)
|
static void SetFavorLadyPlayerName(const u8 *src, u8 *dest)
|
||||||
{
|
{
|
||||||
memset(dest, 0xFF, 8);
|
memset(dest, EOS, PLAYER_NAME_LENGTH + 1);
|
||||||
StringCopy7(dest, src);
|
StringCopy7(dest, src);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -254,9 +248,7 @@ static bool8 DoesFavorLadyLikeItem(u16 itemId)
|
|||||||
sFavorLadyPtr->numItemsGiven++;
|
sFavorLadyPtr->numItemsGiven++;
|
||||||
sFavorLadyPtr->likedItem = TRUE;
|
sFavorLadyPtr->likedItem = TRUE;
|
||||||
if (sFavorLadyPtr->bestItem == itemId)
|
if (sFavorLadyPtr->bestItem == itemId)
|
||||||
{
|
|
||||||
sFavorLadyPtr->numItemsGiven = LILYCOVE_LADY_GIFT_THRESHOLD;
|
sFavorLadyPtr->numItemsGiven = LILYCOVE_LADY_GIFT_THRESHOLD;
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
sFavorLadyPtr->likedItem = FALSE;
|
sFavorLadyPtr->likedItem = FALSE;
|
||||||
@ -312,9 +304,7 @@ static void QuizLadyPickQuestion(void)
|
|||||||
|
|
||||||
questionId = Random() % ARRAY_COUNT(sQuizLadyQuizQuestions);
|
questionId = Random() % ARRAY_COUNT(sQuizLadyQuizQuestions);
|
||||||
for (i = 0; i < QUIZ_QUESTION_LEN; i ++)
|
for (i = 0; i < QUIZ_QUESTION_LEN; i ++)
|
||||||
{
|
|
||||||
sQuizLadyPtr->question[i] = sQuizLadyQuizQuestions[questionId][i];
|
sQuizLadyPtr->question[i] = sQuizLadyQuizQuestions[questionId][i];
|
||||||
}
|
|
||||||
sQuizLadyPtr->correctAnswer = sQuizLadyQuizAnswers[questionId];
|
sQuizLadyPtr->correctAnswer = sQuizLadyQuizAnswers[questionId];
|
||||||
sQuizLadyPtr->prize = sQuizLadyPrizes[questionId];
|
sQuizLadyPtr->prize = sQuizLadyPrizes[questionId];
|
||||||
sQuizLadyPtr->questionId = questionId;
|
sQuizLadyPtr->questionId = questionId;
|
||||||
@ -328,16 +318,16 @@ static void InitLilycoveQuizLady(void)
|
|||||||
sQuizLadyPtr = &gSaveBlock1Ptr->lilycoveLady.quiz;
|
sQuizLadyPtr = &gSaveBlock1Ptr->lilycoveLady.quiz;
|
||||||
sQuizLadyPtr->id = LILYCOVE_LADY_QUIZ;
|
sQuizLadyPtr->id = LILYCOVE_LADY_QUIZ;
|
||||||
sQuizLadyPtr->state = LILYCOVE_LADY_STATE_READY;
|
sQuizLadyPtr->state = LILYCOVE_LADY_STATE_READY;
|
||||||
|
|
||||||
for (i = 0; i < QUIZ_QUESTION_LEN; i ++)
|
for (i = 0; i < QUIZ_QUESTION_LEN; i ++)
|
||||||
{
|
sQuizLadyPtr->question[i] = EC_EMPTY_WORD;
|
||||||
sQuizLadyPtr->question[i] = -1;
|
|
||||||
}
|
sQuizLadyPtr->correctAnswer = EC_EMPTY_WORD;
|
||||||
sQuizLadyPtr->correctAnswer = -1;
|
sQuizLadyPtr->playerAnswer = EC_EMPTY_WORD;
|
||||||
sQuizLadyPtr->playerAnswer = -1;
|
|
||||||
for (i = 0; i < TRAINER_ID_LENGTH; i ++)
|
for (i = 0; i < TRAINER_ID_LENGTH; i ++)
|
||||||
{
|
|
||||||
sQuizLadyPtr->playerTrainerId[i] = 0;
|
sQuizLadyPtr->playerTrainerId[i] = 0;
|
||||||
}
|
|
||||||
sQuizLadyPtr->prize = ITEM_NONE;
|
sQuizLadyPtr->prize = ITEM_NONE;
|
||||||
sQuizLadyPtr->waitingForChallenger = FALSE;
|
sQuizLadyPtr->waitingForChallenger = FALSE;
|
||||||
sQuizLadyPtr->prevQuestionId = ARRAY_COUNT(sQuizLadyQuizQuestions);
|
sQuizLadyPtr->prevQuestionId = ARRAY_COUNT(sQuizLadyQuizQuestions);
|
||||||
@ -351,48 +341,37 @@ static void ResetQuizLadyForRecordMix(void)
|
|||||||
sQuizLadyPtr->id = LILYCOVE_LADY_QUIZ;
|
sQuizLadyPtr->id = LILYCOVE_LADY_QUIZ;
|
||||||
sQuizLadyPtr->state = LILYCOVE_LADY_STATE_READY;
|
sQuizLadyPtr->state = LILYCOVE_LADY_STATE_READY;
|
||||||
sQuizLadyPtr->waitingForChallenger = FALSE;
|
sQuizLadyPtr->waitingForChallenger = FALSE;
|
||||||
sQuizLadyPtr->playerAnswer = -1;
|
sQuizLadyPtr->playerAnswer = EC_EMPTY_WORD;
|
||||||
}
|
}
|
||||||
|
|
||||||
u8 GetQuizLadyState(void)
|
u8 GetQuizLadyState(void)
|
||||||
{
|
{
|
||||||
sQuizLadyPtr = &gSaveBlock1Ptr->lilycoveLady.quiz;
|
sQuizLadyPtr = &gSaveBlock1Ptr->lilycoveLady.quiz;
|
||||||
if (sQuizLadyPtr->state == LILYCOVE_LADY_STATE_PRIZE)
|
if (sQuizLadyPtr->state == LILYCOVE_LADY_STATE_PRIZE)
|
||||||
{
|
|
||||||
return LILYCOVE_LADY_STATE_PRIZE;
|
return LILYCOVE_LADY_STATE_PRIZE;
|
||||||
}
|
|
||||||
else if (sQuizLadyPtr->state == LILYCOVE_LADY_STATE_COMPLETED)
|
else if (sQuizLadyPtr->state == LILYCOVE_LADY_STATE_COMPLETED)
|
||||||
{
|
|
||||||
return LILYCOVE_LADY_STATE_COMPLETED;
|
return LILYCOVE_LADY_STATE_COMPLETED;
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
|
||||||
return LILYCOVE_LADY_STATE_READY;
|
return LILYCOVE_LADY_STATE_READY;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
u8 GetQuizAuthor(void)
|
u8 GetQuizAuthor(void)
|
||||||
{
|
{
|
||||||
int i;
|
s32 i, j;
|
||||||
int j;
|
|
||||||
u8 authorNameId;
|
u8 authorNameId;
|
||||||
struct LilycoveLadyQuiz *quiz;
|
struct LilycoveLadyQuiz *quiz = &gSaveBlock1Ptr->lilycoveLady.quiz;
|
||||||
|
|
||||||
quiz = &gSaveBlock1Ptr->lilycoveLady.quiz;
|
|
||||||
if (IsEasyChatAnswerUnlocked(quiz->correctAnswer) == FALSE)
|
if (IsEasyChatAnswerUnlocked(quiz->correctAnswer) == FALSE)
|
||||||
{
|
{
|
||||||
i = quiz->questionId;
|
i = quiz->questionId;
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
if (++ i >= (int)(ARRAY_COUNT(sQuizLadyQuizQuestions)))
|
if (++i >= (int)ARRAY_COUNT(sQuizLadyQuizQuestions))
|
||||||
{
|
|
||||||
i = 0;
|
i = 0;
|
||||||
}
|
|
||||||
} while (IsEasyChatAnswerUnlocked(sQuizLadyQuizAnswers[i]) == FALSE);
|
} while (IsEasyChatAnswerUnlocked(sQuizLadyQuizAnswers[i]) == FALSE);
|
||||||
for (j = 0; j < QUIZ_QUESTION_LEN; j ++)
|
|
||||||
{
|
for (j = 0; j < QUIZ_QUESTION_LEN; j++)
|
||||||
quiz->question[j] = sQuizLadyQuizQuestions[i][j];
|
quiz->question[j] = sQuizLadyQuizQuestions[i][j];
|
||||||
}
|
|
||||||
quiz->correctAnswer = sQuizLadyQuizAnswers[i];
|
quiz->correctAnswer = sQuizLadyQuizAnswers[i];
|
||||||
quiz->prize = sQuizLadyPrizes[i];
|
quiz->prize = sQuizLadyPrizes[i];
|
||||||
quiz->questionId = i;
|
quiz->questionId = i;
|
||||||
@ -400,17 +379,11 @@ u8 GetQuizAuthor(void)
|
|||||||
}
|
}
|
||||||
authorNameId = BufferQuizAuthorName();
|
authorNameId = BufferQuizAuthorName();
|
||||||
if (authorNameId == QUIZ_AUTHOR_NAME_LADY)
|
if (authorNameId == QUIZ_AUTHOR_NAME_LADY)
|
||||||
{
|
|
||||||
return QUIZ_AUTHOR_LADY;
|
return QUIZ_AUTHOR_LADY;
|
||||||
}
|
|
||||||
else if (authorNameId == QUIZ_AUTHOR_NAME_OTHER_PLAYER || IsQuizTrainerIdNotPlayer())
|
else if (authorNameId == QUIZ_AUTHOR_NAME_OTHER_PLAYER || IsQuizTrainerIdNotPlayer())
|
||||||
{
|
|
||||||
return QUIZ_AUTHOR_OTHER_PLAYER;
|
return QUIZ_AUTHOR_OTHER_PLAYER;
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
|
||||||
return QUIZ_AUTHOR_PLAYER;
|
return QUIZ_AUTHOR_PLAYER;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static u8 BufferQuizAuthorName(void)
|
static u8 BufferQuizAuthorName(void)
|
||||||
@ -434,7 +407,7 @@ static u8 BufferQuizAuthorName(void)
|
|||||||
if (nameLen == GetPlayerNameLength(gSaveBlock2Ptr->playerName))
|
if (nameLen == GetPlayerNameLength(gSaveBlock2Ptr->playerName))
|
||||||
{
|
{
|
||||||
u8 *name = sQuizLadyPtr->playerName;
|
u8 *name = sQuizLadyPtr->playerName;
|
||||||
for (i = 0; i < nameLen; i ++)
|
for (i = 0; i < nameLen; i++)
|
||||||
{
|
{
|
||||||
name = sQuizLadyPtr->playerName;
|
name = sQuizLadyPtr->playerName;
|
||||||
if (name[i] != gSaveBlock2Ptr->playerName[i])
|
if (name[i] != gSaveBlock2Ptr->playerName[i])
|
||||||
@ -456,7 +429,7 @@ static bool8 IsQuizTrainerIdNotPlayer(void)
|
|||||||
|
|
||||||
sQuizLadyPtr = &gSaveBlock1Ptr->lilycoveLady.quiz;
|
sQuizLadyPtr = &gSaveBlock1Ptr->lilycoveLady.quiz;
|
||||||
notPlayer = FALSE;
|
notPlayer = FALSE;
|
||||||
for (i = 0; i < TRAINER_ID_LENGTH; i ++)
|
for (i = 0; i < TRAINER_ID_LENGTH; i++)
|
||||||
{
|
{
|
||||||
if (sQuizLadyPtr->playerTrainerId[i] != gSaveBlock2Ptr->playerTrainerId[i])
|
if (sQuizLadyPtr->playerTrainerId[i] != gSaveBlock2Ptr->playerTrainerId[i])
|
||||||
{
|
{
|
||||||
@ -472,7 +445,7 @@ static u8 GetPlayerNameLength(const u8 *playerName)
|
|||||||
u8 len;
|
u8 len;
|
||||||
const u8 *ptr;
|
const u8 *ptr;
|
||||||
|
|
||||||
for (len = 0, ptr = playerName; *ptr != EOS; len ++, ptr ++);
|
for (len = 0, ptr = playerName; *ptr != EOS; len++, ptr++);
|
||||||
return len;
|
return len;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -532,7 +505,7 @@ void SetQuizLadyState_GivePrize(void)
|
|||||||
void ClearQuizLadyPlayerAnswer(void)
|
void ClearQuizLadyPlayerAnswer(void)
|
||||||
{
|
{
|
||||||
sQuizLadyPtr = &gSaveBlock1Ptr->lilycoveLady.quiz;
|
sQuizLadyPtr = &gSaveBlock1Ptr->lilycoveLady.quiz;
|
||||||
sQuizLadyPtr->playerAnswer = -1;
|
sQuizLadyPtr->playerAnswer = EC_EMPTY_WORD;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Script_QuizLadyOpenBagMenu(void)
|
void Script_QuizLadyOpenBagMenu(void)
|
||||||
@ -544,13 +517,9 @@ void QuizLadyPickNewQuestion(void)
|
|||||||
{
|
{
|
||||||
sQuizLadyPtr = &gSaveBlock1Ptr->lilycoveLady.quiz;
|
sQuizLadyPtr = &gSaveBlock1Ptr->lilycoveLady.quiz;
|
||||||
if (BufferQuizAuthorNameAndCheckIfLady())
|
if (BufferQuizAuthorNameAndCheckIfLady())
|
||||||
{
|
|
||||||
sQuizLadyPtr->prevQuestionId = sQuizLadyPtr->questionId;
|
sQuizLadyPtr->prevQuestionId = sQuizLadyPtr->questionId;
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
|
||||||
sQuizLadyPtr->prevQuestionId = ARRAY_COUNT(sQuizLadyQuizQuestions);
|
sQuizLadyPtr->prevQuestionId = ARRAY_COUNT(sQuizLadyQuizQuestions);
|
||||||
}
|
|
||||||
QuizLadyPickQuestion();
|
QuizLadyPickQuestion();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -559,11 +528,9 @@ void ClearQuizLadyQuestionAndAnswer(void)
|
|||||||
u8 i;
|
u8 i;
|
||||||
|
|
||||||
sQuizLadyPtr = &gSaveBlock1Ptr->lilycoveLady.quiz;
|
sQuizLadyPtr = &gSaveBlock1Ptr->lilycoveLady.quiz;
|
||||||
for (i = 0; i < QUIZ_QUESTION_LEN; i ++)
|
for (i = 0; i < QUIZ_QUESTION_LEN; i++)
|
||||||
{
|
sQuizLadyPtr->question[i] = EC_EMPTY_WORD;
|
||||||
sQuizLadyPtr->question[i] = -1;
|
sQuizLadyPtr->correctAnswer = EC_EMPTY_WORD;
|
||||||
}
|
|
||||||
sQuizLadyPtr->correctAnswer = -1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void QuizLadySetCustomQuestion(void)
|
void QuizLadySetCustomQuestion(void)
|
||||||
@ -583,10 +550,8 @@ void QuizLadyRecordCustomQuizData(void)
|
|||||||
|
|
||||||
sQuizLadyPtr = &gSaveBlock1Ptr->lilycoveLady.quiz;
|
sQuizLadyPtr = &gSaveBlock1Ptr->lilycoveLady.quiz;
|
||||||
sQuizLadyPtr->prize = gSpecialVar_ItemId;
|
sQuizLadyPtr->prize = gSpecialVar_ItemId;
|
||||||
for (i = 0; i < TRAINER_ID_LENGTH; i ++)
|
for (i = 0; i < TRAINER_ID_LENGTH; i++)
|
||||||
{
|
|
||||||
sQuizLadyPtr->playerTrainerId[i] = gSaveBlock2Ptr->playerTrainerId[i];
|
sQuizLadyPtr->playerTrainerId[i] = gSaveBlock2Ptr->playerTrainerId[i];
|
||||||
}
|
|
||||||
StringCopy7(sQuizLadyPtr->playerName, gSaveBlock2Ptr->playerName);
|
StringCopy7(sQuizLadyPtr->playerName, gSaveBlock2Ptr->playerName);
|
||||||
sQuizLadyPtr->language = gGameLanguage;
|
sQuizLadyPtr->language = gGameLanguage;
|
||||||
}
|
}
|
||||||
@ -617,18 +582,15 @@ void QuizLadyClearQuestionForRecordMix(const LilycoveLady *lilycoveLady)
|
|||||||
if (lilycoveLady->quiz.prevQuestionId < ARRAY_COUNT(sQuizLadyQuizQuestions)
|
if (lilycoveLady->quiz.prevQuestionId < ARRAY_COUNT(sQuizLadyQuizQuestions)
|
||||||
&& sQuizLadyPtr->id == LILYCOVE_LADY_QUIZ)
|
&& sQuizLadyPtr->id == LILYCOVE_LADY_QUIZ)
|
||||||
{
|
{
|
||||||
for (i = 0; i < 4; i ++)
|
for (i = 0; i < 4; i++)
|
||||||
{
|
{
|
||||||
if (lilycoveLady->quiz.prevQuestionId != sQuizLadyPtr->questionId)
|
if (lilycoveLady->quiz.prevQuestionId != sQuizLadyPtr->questionId)
|
||||||
{
|
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
sQuizLadyPtr->questionId = Random() % ARRAY_COUNT(sQuizLadyQuizQuestions);
|
sQuizLadyPtr->questionId = Random() % ARRAY_COUNT(sQuizLadyQuizQuestions);
|
||||||
}
|
}
|
||||||
if (lilycoveLady->quiz.prevQuestionId == sQuizLadyPtr->questionId)
|
if (lilycoveLady->quiz.prevQuestionId == sQuizLadyPtr->questionId)
|
||||||
{
|
sQuizLadyPtr->questionId = (sQuizLadyPtr->questionId + 1) % (int)ARRAY_COUNT(sQuizLadyQuizQuestions);
|
||||||
sQuizLadyPtr->questionId = (sQuizLadyPtr->questionId + 1) % (int)(ARRAY_COUNT(sQuizLadyQuizQuestions));
|
|
||||||
}
|
|
||||||
sQuizLadyPtr->prevQuestionId = lilycoveLady->quiz.prevQuestionId;
|
sQuizLadyPtr->prevQuestionId = lilycoveLady->quiz.prevQuestionId;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -656,11 +618,10 @@ static void ResetContestLadyForRecordMix(void)
|
|||||||
sContestLadyPtr = &gSaveBlock1Ptr->lilycoveLady.contest;
|
sContestLadyPtr = &gSaveBlock1Ptr->lilycoveLady.contest;
|
||||||
sContestLadyPtr->id = LILYCOVE_LADY_CONTEST;
|
sContestLadyPtr->id = LILYCOVE_LADY_CONTEST;
|
||||||
sContestLadyPtr->givenPokeblock = FALSE;
|
sContestLadyPtr->givenPokeblock = FALSE;
|
||||||
|
|
||||||
if (sContestLadyPtr->numGoodPokeblocksGiven == LILYCOVE_LADY_GIFT_THRESHOLD
|
if (sContestLadyPtr->numGoodPokeblocksGiven == LILYCOVE_LADY_GIFT_THRESHOLD
|
||||||
|| sContestLadyPtr->numOtherPokeblocksGiven == LILYCOVE_LADY_GIFT_THRESHOLD)
|
|| sContestLadyPtr->numOtherPokeblocksGiven == LILYCOVE_LADY_GIFT_THRESHOLD)
|
||||||
{
|
|
||||||
ResetContestLadyContestData();
|
ResetContestLadyContestData();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ContestLadySavePlayerNameIfHighSheen(u8 sheen)
|
static void ContestLadySavePlayerNameIfHighSheen(u8 sheen)
|
||||||
@ -683,41 +644,41 @@ bool8 GivePokeblockToContestLady(struct Pokeblock *pokeblock)
|
|||||||
sContestLadyPtr = &gSaveBlock1Ptr->lilycoveLady.contest;
|
sContestLadyPtr = &gSaveBlock1Ptr->lilycoveLady.contest;
|
||||||
switch (sContestLadyPtr->category)
|
switch (sContestLadyPtr->category)
|
||||||
{
|
{
|
||||||
case CONTEST_CATEGORY_COOL:
|
case CONTEST_CATEGORY_COOL:
|
||||||
if (pokeblock->spicy != 0)
|
if (pokeblock->spicy != 0)
|
||||||
{
|
{
|
||||||
sheen = pokeblock->spicy;
|
sheen = pokeblock->spicy;
|
||||||
correctFlavor = TRUE;
|
correctFlavor = TRUE;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case CONTEST_CATEGORY_BEAUTY:
|
case CONTEST_CATEGORY_BEAUTY:
|
||||||
if (pokeblock->dry != 0)
|
if (pokeblock->dry != 0)
|
||||||
{
|
{
|
||||||
sheen = pokeblock->dry;
|
sheen = pokeblock->dry;
|
||||||
correctFlavor = TRUE;
|
correctFlavor = TRUE;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case CONTEST_CATEGORY_CUTE:
|
case CONTEST_CATEGORY_CUTE:
|
||||||
if (pokeblock->sweet != 0)
|
if (pokeblock->sweet != 0)
|
||||||
{
|
{
|
||||||
sheen = pokeblock->sweet;
|
sheen = pokeblock->sweet;
|
||||||
correctFlavor = TRUE;
|
correctFlavor = TRUE;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case CONTEST_CATEGORY_SMART:
|
case CONTEST_CATEGORY_SMART:
|
||||||
if (pokeblock->bitter != 0)
|
if (pokeblock->bitter != 0)
|
||||||
{
|
{
|
||||||
sheen = pokeblock->bitter;
|
sheen = pokeblock->bitter;
|
||||||
correctFlavor = TRUE;
|
correctFlavor = TRUE;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case CONTEST_CATEGORY_TOUGH:
|
case CONTEST_CATEGORY_TOUGH:
|
||||||
if (pokeblock->sour != 0)
|
if (pokeblock->sour != 0)
|
||||||
{
|
{
|
||||||
sheen = pokeblock->sour;
|
sheen = pokeblock->sour;
|
||||||
correctFlavor = TRUE;
|
correctFlavor = TRUE;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (correctFlavor == TRUE)
|
if (correctFlavor == TRUE)
|
||||||
{
|
{
|
||||||
@ -731,18 +692,18 @@ bool8 GivePokeblockToContestLady(struct Pokeblock *pokeblock)
|
|||||||
return correctFlavor;
|
return correctFlavor;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void BufferContestLadyCategoryAndMonName(u8 *dest1, u8 *dest2)
|
static void BufferContestLadyCategoryAndMonName(u8 *category, u8 *nickname)
|
||||||
{
|
{
|
||||||
sContestLadyPtr = &gSaveBlock1Ptr->lilycoveLady.contest;
|
sContestLadyPtr = &gSaveBlock1Ptr->lilycoveLady.contest;
|
||||||
StringCopy(dest1, sContestLadyCategoryNames[sContestLadyPtr->category]);
|
StringCopy(category, sContestLadyCategoryNames[sContestLadyPtr->category]);
|
||||||
StringCopy10(dest2, sContestLadyMonNames[sContestLadyPtr->category]);
|
StringCopy10(nickname, sContestLadyMonNames[sContestLadyPtr->category]);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BufferContestLadyMonName(u8 *dest1, u8 *dest2)
|
void BufferContestLadyMonName(u8 *category, u8 *nickname)
|
||||||
{
|
{
|
||||||
sContestLadyPtr = &gSaveBlock1Ptr->lilycoveLady.contest;
|
sContestLadyPtr = &gSaveBlock1Ptr->lilycoveLady.contest;
|
||||||
*dest1 = sContestLadyPtr->category;
|
*category = sContestLadyPtr->category;
|
||||||
StringCopy(dest2, sContestLadyMonNames[sContestLadyPtr->category]);
|
StringCopy(nickname, sContestLadyMonNames[sContestLadyPtr->category]);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BufferContestLadyPlayerName(u8 *dest)
|
void BufferContestLadyPlayerName(u8 *dest)
|
||||||
@ -779,9 +740,7 @@ bool8 HasPlayerGivenContestLadyPokeblock(void)
|
|||||||
{
|
{
|
||||||
sContestLadyPtr = &gSaveBlock1Ptr->lilycoveLady.contest;
|
sContestLadyPtr = &gSaveBlock1Ptr->lilycoveLady.contest;
|
||||||
if (sContestLadyPtr->givenPokeblock == TRUE)
|
if (sContestLadyPtr->givenPokeblock == TRUE)
|
||||||
{
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -792,9 +751,8 @@ bool8 ShouldContestLadyShowGoOnAir(void)
|
|||||||
sContestLadyPtr = &gSaveBlock1Ptr->lilycoveLady.contest;
|
sContestLadyPtr = &gSaveBlock1Ptr->lilycoveLady.contest;
|
||||||
if (sContestLadyPtr->numGoodPokeblocksGiven >= LILYCOVE_LADY_GIFT_THRESHOLD
|
if (sContestLadyPtr->numGoodPokeblocksGiven >= LILYCOVE_LADY_GIFT_THRESHOLD
|
||||||
|| sContestLadyPtr->numOtherPokeblocksGiven >= LILYCOVE_LADY_GIFT_THRESHOLD)
|
|| sContestLadyPtr->numOtherPokeblocksGiven >= LILYCOVE_LADY_GIFT_THRESHOLD)
|
||||||
{
|
|
||||||
putOnAir = TRUE;
|
putOnAir = TRUE;
|
||||||
}
|
|
||||||
return putOnAir;
|
return putOnAir;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user