mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-13 15:13:42 +01:00
Merge pull request #1910 from GriffinRichards/misc-constants
Use miscellaneous missing constants
This commit is contained in:
commit
10a10e914b
@ -6,6 +6,8 @@
|
||||
#define CONTEST_LAST_APPEAL (CONTEST_NUM_APPEALS - 1)
|
||||
#define MAX_CONTEST_MOVE_HEARTS 8
|
||||
|
||||
#define CONTESTANT_NONE 0xFF
|
||||
|
||||
#define LINK_CONTEST_FLAG_IS_LINK (1 << 0)
|
||||
#define LINK_CONTEST_FLAG_IS_WIRELESS (1 << 1)
|
||||
#define LINK_CONTEST_FLAG_HAS_RS_PLAYER (1 << 2)
|
||||
|
@ -13,16 +13,13 @@
|
||||
#include "constants/abilities.h"
|
||||
#include "constants/battle_ai.h"
|
||||
#include "constants/battle_move_effects.h"
|
||||
#include "constants/items.h"
|
||||
#include "constants/moves.h"
|
||||
|
||||
#define AI_ACTION_DONE 0x0001
|
||||
#define AI_ACTION_FLEE 0x0002
|
||||
#define AI_ACTION_WATCH 0x0004
|
||||
#define AI_ACTION_DO_NOT_ATTACK 0x0008
|
||||
#define AI_ACTION_UNK5 0x0010
|
||||
#define AI_ACTION_UNK6 0x0020
|
||||
#define AI_ACTION_UNK7 0x0040
|
||||
#define AI_ACTION_UNK8 0x0080
|
||||
#define AI_ACTION_DONE (1 << 0)
|
||||
#define AI_ACTION_FLEE (1 << 1)
|
||||
#define AI_ACTION_WATCH (1 << 2)
|
||||
#define AI_ACTION_DO_NOT_ATTACK (1 << 3)
|
||||
|
||||
#define AI_THINKING_STRUCT ((struct AI_ThinkingStruct *)(gBattleResources->ai))
|
||||
#define BATTLE_HISTORY ((struct BattleHistory *)(gBattleResources->battleHistory))
|
||||
@ -283,7 +280,6 @@ static const u16 sIgnoredPowerfulMoveEffects[] =
|
||||
IGNORED_MOVES_END
|
||||
};
|
||||
|
||||
// code
|
||||
void BattleAI_HandleItemUseBeforeAISetup(u8 defaultScoreMoves)
|
||||
{
|
||||
s32 i;
|
||||
@ -302,7 +298,7 @@ void BattleAI_HandleItemUseBeforeAISetup(u8 defaultScoreMoves)
|
||||
{
|
||||
for (i = 0; i < MAX_TRAINER_ITEMS; i++)
|
||||
{
|
||||
if (gTrainers[gTrainerBattleOpponent_A].items[i] != 0)
|
||||
if (gTrainers[gTrainerBattleOpponent_A].items[i] != ITEM_NONE)
|
||||
{
|
||||
BATTLE_HISTORY->trainerItems[BATTLE_HISTORY->itemsNo] = gTrainers[gTrainerBattleOpponent_A].items[i];
|
||||
BATTLE_HISTORY->itemsNo++;
|
||||
|
@ -687,7 +687,7 @@ u8 GetMostSuitableMonToSwitchInto(void)
|
||||
|
||||
invalidMons = 0;
|
||||
|
||||
while (invalidMons != 0x3F) // All mons are invalid.
|
||||
while (invalidMons != (1 << PARTY_SIZE) - 1) // All mons are invalid.
|
||||
{
|
||||
bestDmg = TYPE_MUL_NO_EFFECT;
|
||||
bestMonId = PARTY_SIZE;
|
||||
@ -741,7 +741,7 @@ u8 GetMostSuitableMonToSwitchInto(void)
|
||||
}
|
||||
else
|
||||
{
|
||||
invalidMons = 0x3F; // No viable mon to switch.
|
||||
invalidMons = (1 << PARTY_SIZE) - 1; // No viable mon to switch.
|
||||
}
|
||||
}
|
||||
|
||||
@ -862,7 +862,7 @@ static bool8 ShouldUseItem(void)
|
||||
shouldUse = TRUE;
|
||||
break;
|
||||
case AI_ITEM_HEAL_HP:
|
||||
paramOffset = GetItemEffectParamOffset(item, 4, 4);
|
||||
paramOffset = GetItemEffectParamOffset(item, 4, ITEM4_HEAL_HP);
|
||||
if (paramOffset == 0)
|
||||
break;
|
||||
if (gBattleMons[gActiveBattler].hp == 0)
|
||||
@ -935,7 +935,7 @@ static bool8 ShouldUseItem(void)
|
||||
{
|
||||
BtlController_EmitTwoReturnValues(BUFFER_B, B_ACTION_USE_ITEM, 0);
|
||||
*(gBattleStruct->chosenItem + (gActiveBattler / 2) * 2) = item;
|
||||
gBattleResources->battleHistory->trainerItems[i] = 0;
|
||||
gBattleResources->battleHistory->trainerItems[i] = ITEM_NONE;
|
||||
return shouldUse;
|
||||
}
|
||||
}
|
||||
|
@ -3578,13 +3578,13 @@ static void AnimFlyingParticle(struct Sprite *sprite)
|
||||
{
|
||||
sprite->data[4] = 0;
|
||||
sprite->data[2] = gBattleAnimArgs[3];
|
||||
sprite->x = 0xFFF0;
|
||||
sprite->x = -16;
|
||||
}
|
||||
else
|
||||
{
|
||||
sprite->data[4] = 1;
|
||||
sprite->data[2] = -gBattleAnimArgs[3];
|
||||
sprite->x = 0x100;
|
||||
sprite->x = DISPLAY_WIDTH + 16;
|
||||
}
|
||||
|
||||
sprite->data[1] = gBattleAnimArgs[1];
|
||||
@ -3623,7 +3623,7 @@ static void AnimFlyingParticle_Step(struct Sprite *sprite)
|
||||
sprite->data[0] = (sprite->data[3] * a) & 0xFF;
|
||||
if (!sprite->data[4])
|
||||
{
|
||||
if (sprite->x2 + sprite->x <= 0xF7)
|
||||
if (sprite->x2 + sprite->x < DISPLAY_WIDTH + 8)
|
||||
return;
|
||||
}
|
||||
else
|
||||
|
@ -3056,7 +3056,7 @@ static void AnimFlatterConfetti(struct Sprite *sprite)
|
||||
if (sprite->data[2] == ANIM_ATTACKER)
|
||||
sprite->x = -8;
|
||||
else
|
||||
sprite->x = 248;
|
||||
sprite->x = DISPLAY_WIDTH + 8;
|
||||
|
||||
sprite->y = 104;
|
||||
sprite->callback = AnimFlatterConfetti_Step;
|
||||
@ -3414,8 +3414,8 @@ static void AnimTask_AcidArmor_Step(u8 taskId)
|
||||
var0 *= 2;
|
||||
while (var0 >= 0)
|
||||
{
|
||||
gScanlineEffectRegBuffers[0][var0] = bgX + 240;
|
||||
gScanlineEffectRegBuffers[1][var0] = bgX + 240;
|
||||
gScanlineEffectRegBuffers[0][var0] = bgX + DISPLAY_WIDTH;
|
||||
gScanlineEffectRegBuffers[1][var0] = bgX + DISPLAY_WIDTH;
|
||||
var0 -= 2;
|
||||
}
|
||||
|
||||
|
@ -481,10 +481,10 @@ static void SetDigScanlineEffect(u8 useBG1, s16 y, s16 endY)
|
||||
y++;
|
||||
}
|
||||
|
||||
while (y < 160)
|
||||
while (y < DISPLAY_HEIGHT)
|
||||
{
|
||||
gScanlineEffectRegBuffers[0][y] = bgX + 240;
|
||||
gScanlineEffectRegBuffers[1][y] = bgX + 240;
|
||||
gScanlineEffectRegBuffers[0][y] = bgX + DISPLAY_WIDTH;
|
||||
gScanlineEffectRegBuffers[1][y] = bgX + DISPLAY_WIDTH;
|
||||
y++;
|
||||
}
|
||||
|
||||
|
@ -1305,11 +1305,11 @@ static void MovePoisonGasCloud(struct Sprite *sprite)
|
||||
sprite->data[3] = sprite->y += sprite->y2;
|
||||
sprite->data[4] = sprite->y + 4;
|
||||
if (IsContest())
|
||||
sprite->data[2] = -0x10;
|
||||
sprite->data[2] = -16;
|
||||
else if (GET_BATTLER_SIDE2(gBattleAnimTarget) != B_SIDE_PLAYER)
|
||||
sprite->data[2] = 0x100;
|
||||
sprite->data[2] = DISPLAY_WIDTH + 16;
|
||||
else
|
||||
sprite->data[2] = -0x10;
|
||||
sprite->data[2] = -16;
|
||||
|
||||
sprite->data[7]++;
|
||||
sprite->x2 = sprite->y2 = 0;
|
||||
|
@ -2117,7 +2117,7 @@ void AnimTask_SwapMonSpriteToFromSubstitute(u8 taskId)
|
||||
|
||||
gTasks[taskId].data[0] &= 0xFF;
|
||||
x = gSprites[spriteId].x + gSprites[spriteId].x2 + 32;
|
||||
if (x > 304)
|
||||
if (x > DISPLAY_WIDTH + 64)
|
||||
gTasks[taskId].data[10]++;
|
||||
break;
|
||||
case 1:
|
||||
|
@ -182,7 +182,7 @@ static void BattleIntroSlide1(u8 taskId)
|
||||
if ((gBattle_WIN0V & 0xFF00) == 0x3000)
|
||||
{
|
||||
gTasks[taskId].tState++;
|
||||
gTasks[taskId].data[2] = 240;
|
||||
gTasks[taskId].data[2] = DISPLAY_WIDTH;
|
||||
gTasks[taskId].data[3] = 32;
|
||||
gIntroSlideFlags &= ~1;
|
||||
}
|
||||
@ -213,13 +213,13 @@ static void BattleIntroSlide1(u8 taskId)
|
||||
gTasks[taskId].data[2] -= 2;
|
||||
|
||||
// Scanline settings have already been set in CB2_InitBattleInternal()
|
||||
for (i = 0; i < 80; i++)
|
||||
for (i = 0; i < DISPLAY_HEIGHT / 2; i++)
|
||||
gScanlineEffectRegBuffers[gScanlineEffect.srcBuffer][i] = gTasks[taskId].data[2];
|
||||
|
||||
for (; i < 160; i++)
|
||||
for (; i < DISPLAY_HEIGHT; i++)
|
||||
gScanlineEffectRegBuffers[gScanlineEffect.srcBuffer][i] = -gTasks[taskId].data[2];
|
||||
|
||||
if (!gTasks[taskId].data[2])
|
||||
if (gTasks[taskId].data[2] == 0)
|
||||
{
|
||||
gScanlineEffect.state = 3;
|
||||
gTasks[taskId].tState++;
|
||||
@ -290,7 +290,7 @@ static void BattleIntroSlide2(u8 taskId)
|
||||
if ((gBattle_WIN0V & 0xFF00) == 0x3000)
|
||||
{
|
||||
gTasks[taskId].tState++;
|
||||
gTasks[taskId].data[2] = 240;
|
||||
gTasks[taskId].data[2] = DISPLAY_WIDTH;
|
||||
gTasks[taskId].data[3] = 32;
|
||||
gTasks[taskId].data[5] = 1;
|
||||
gIntroSlideFlags &= ~1;
|
||||
@ -322,13 +322,13 @@ static void BattleIntroSlide2(u8 taskId)
|
||||
gTasks[taskId].data[2] -= 2;
|
||||
|
||||
// Scanline settings have already been set in CB2_InitBattleInternal()
|
||||
for (i = 0; i < 80; i++)
|
||||
for (i = 0; i < DISPLAY_HEIGHT / 2; i++)
|
||||
gScanlineEffectRegBuffers[gScanlineEffect.srcBuffer][i] = gTasks[taskId].data[2];
|
||||
|
||||
for (; i < 160; i++)
|
||||
for (; i < DISPLAY_HEIGHT; i++)
|
||||
gScanlineEffectRegBuffers[gScanlineEffect.srcBuffer][i] = -gTasks[taskId].data[2];
|
||||
|
||||
if (!gTasks[taskId].data[2])
|
||||
if (gTasks[taskId].data[2] == 0)
|
||||
{
|
||||
gScanlineEffect.state = 3;
|
||||
gTasks[taskId].tState++;
|
||||
@ -383,7 +383,7 @@ static void BattleIntroSlide3(u8 taskId)
|
||||
if ((gBattle_WIN0V & 0xFF00) == 0x3000)
|
||||
{
|
||||
gTasks[taskId].tState++;
|
||||
gTasks[taskId].data[2] = 240;
|
||||
gTasks[taskId].data[2] = DISPLAY_WIDTH;
|
||||
gTasks[taskId].data[3] = 32;
|
||||
gTasks[taskId].data[5] = 1;
|
||||
gIntroSlideFlags &= ~1;
|
||||
@ -410,13 +410,13 @@ static void BattleIntroSlide3(u8 taskId)
|
||||
gTasks[taskId].data[2] -= 2;
|
||||
|
||||
// Scanline settings have already been set in CB2_InitBattleInternal()
|
||||
for (i = 0; i < 80; i++)
|
||||
for (i = 0; i < DISPLAY_HEIGHT / 2; i++)
|
||||
gScanlineEffectRegBuffers[gScanlineEffect.srcBuffer][i] = gTasks[taskId].data[2];
|
||||
|
||||
for (; i < 160; i++)
|
||||
for (; i < DISPLAY_HEIGHT; i++)
|
||||
gScanlineEffectRegBuffers[gScanlineEffect.srcBuffer][i] = -gTasks[taskId].data[2];
|
||||
|
||||
if (!gTasks[taskId].data[2])
|
||||
if (gTasks[taskId].data[2] == 0)
|
||||
{
|
||||
gScanlineEffect.state = 3;
|
||||
gTasks[taskId].tState++;
|
||||
@ -479,7 +479,7 @@ static void BattleIntroSlideLink(u8 taskId)
|
||||
if ((gBattle_WIN0V & 0xFF00) == 0x3000)
|
||||
{
|
||||
gTasks[taskId].tState++;
|
||||
gTasks[taskId].data[2] = 240;
|
||||
gTasks[taskId].data[2] = DISPLAY_WIDTH;
|
||||
gTasks[taskId].data[3] = 32;
|
||||
gIntroSlideFlags &= ~1;
|
||||
}
|
||||
@ -492,13 +492,13 @@ static void BattleIntroSlideLink(u8 taskId)
|
||||
gTasks[taskId].data[2] -= 2;
|
||||
|
||||
// Scanline settings have already been set in CB2_InitBattleInternal()
|
||||
for (i = 0; i < 80; i++)
|
||||
for (i = 0; i < DISPLAY_HEIGHT / 2; i++)
|
||||
gScanlineEffectRegBuffers[gScanlineEffect.srcBuffer][i] = gTasks[taskId].data[2];
|
||||
|
||||
for (; i < 160; i++)
|
||||
for (; i < DISPLAY_HEIGHT; i++)
|
||||
gScanlineEffectRegBuffers[gScanlineEffect.srcBuffer][i] = -gTasks[taskId].data[2];
|
||||
|
||||
if (!gTasks[taskId].data[2])
|
||||
if (gTasks[taskId].data[2] == 0)
|
||||
{
|
||||
gScanlineEffect.state = 3;
|
||||
gTasks[taskId].tState++;
|
||||
@ -544,7 +544,7 @@ static void BattleIntroSlidePartner(u8 taskId)
|
||||
if ((gBattle_WIN0V & 0xFF00) == 0x2000)
|
||||
{
|
||||
gTasks[taskId].tState++;
|
||||
gTasks[taskId].data[2] = 240;
|
||||
gTasks[taskId].data[2] = DISPLAY_WIDTH;
|
||||
gIntroSlideFlags &= ~1;
|
||||
}
|
||||
break;
|
||||
@ -557,7 +557,7 @@ static void BattleIntroSlidePartner(u8 taskId)
|
||||
|
||||
gBattle_BG1_X = gTasks[taskId].data[2];
|
||||
gBattle_BG2_X = -gTasks[taskId].data[2];
|
||||
if (!gTasks[taskId].data[2])
|
||||
if (gTasks[taskId].data[2] == 0)
|
||||
gTasks[taskId].tState++;
|
||||
break;
|
||||
case 4:
|
||||
|
@ -644,19 +644,16 @@ static void CB2_InitBattleInternal(void)
|
||||
gBattle_WIN0V = WIN_RANGE(DISPLAY_HEIGHT / 2, DISPLAY_HEIGHT / 2 + 1);
|
||||
ScanlineEffect_Clear();
|
||||
|
||||
i = 0;
|
||||
while (i < 80)
|
||||
for (i = 0; i < DISPLAY_HEIGHT / 2; i++)
|
||||
{
|
||||
gScanlineEffectRegBuffers[0][i] = 0xF0;
|
||||
gScanlineEffectRegBuffers[1][i] = 0xF0;
|
||||
i++;
|
||||
}
|
||||
|
||||
while (i < 160)
|
||||
for (; i < DISPLAY_HEIGHT; i++)
|
||||
{
|
||||
gScanlineEffectRegBuffers[0][i] = 0xFF10;
|
||||
gScanlineEffectRegBuffers[1][i] = 0xFF10;
|
||||
i++;
|
||||
}
|
||||
|
||||
ScanlineEffect_SetParams(sIntroScanlineParams16Bit);
|
||||
|
@ -7812,9 +7812,18 @@ static void Cmd_metronome(void)
|
||||
{
|
||||
s32 i;
|
||||
|
||||
#if MOVES_COUNT < 512
|
||||
// Original GF method of move selection is to pick a random
|
||||
// number between 1-511. 355-511 are not valid moves, so if it
|
||||
// picks in this range it retries. If MOVES_COUNT exceeds 511 we
|
||||
// instead use a simpler solution.
|
||||
gCurrentMove = (Random() & 0x1FF) + 1;
|
||||
if (gCurrentMove >= MOVES_COUNT)
|
||||
continue;
|
||||
#else
|
||||
// Just pick a valid move value (between 1 and MOVES_COUNT-1)
|
||||
gCurrentMove = (Random() % (MOVES_COUNT - 1)) + 1;
|
||||
#endif
|
||||
|
||||
for (i = 0; i < MAX_MON_MOVES; i++); // ?
|
||||
|
||||
|
@ -342,7 +342,11 @@ void HandleAction_UseItem(void)
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = AI_HEAL_CONFUSION;
|
||||
if (*(gBattleStruct->AI_itemFlags + gBattlerAttacker / 2) & (1 << AI_HEAL_CONFUSION))
|
||||
{
|
||||
if (*(gBattleStruct->AI_itemFlags + gBattlerAttacker / 2) & 0x3E)
|
||||
if (*(gBattleStruct->AI_itemFlags + gBattlerAttacker / 2) & ((1 << AI_HEAL_PARALYSIS)
|
||||
| (1 << AI_HEAL_FREEZE)
|
||||
| (1 << AI_HEAL_BURN)
|
||||
| (1 << AI_HEAL_POISON)
|
||||
| (1 << AI_HEAL_SLEEP)))
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = AI_HEAL_SLEEP;
|
||||
}
|
||||
else
|
||||
|
@ -3109,10 +3109,10 @@ static void DrawBlenderCenter(struct BgAffineSrcData *dest)
|
||||
{
|
||||
struct BgAffineSrcData affineSrc;
|
||||
|
||||
affineSrc.texX = 0x7800;
|
||||
affineSrc.texY = 0x5000;
|
||||
affineSrc.scrX = 0x78 - sBerryBlender->bg_X;
|
||||
affineSrc.scrY = 0x50 - sBerryBlender->bg_Y;
|
||||
affineSrc.texX = (DISPLAY_WIDTH / 2) << 8;
|
||||
affineSrc.texY = (DISPLAY_HEIGHT / 2) << 8;
|
||||
affineSrc.scrX = DISPLAY_WIDTH / 2 - sBerryBlender->bg_X;
|
||||
affineSrc.scrY = DISPLAY_HEIGHT / 2 - sBerryBlender->bg_Y;
|
||||
affineSrc.sx = sBerryBlender->centerScale;
|
||||
affineSrc.sy = sBerryBlender->centerScale;
|
||||
affineSrc.alpha = sBerryBlender->arrowPos;
|
||||
|
@ -310,6 +310,8 @@ static void HandleInitBackgrounds(void)
|
||||
ShowBg(3);
|
||||
}
|
||||
|
||||
#define BG_TILE 0x42
|
||||
|
||||
static bool8 LoadBerryTagGfx(void)
|
||||
{
|
||||
u16 i;
|
||||
@ -333,15 +335,16 @@ static bool8 LoadBerryTagGfx(void)
|
||||
sBerryTag->gfxState++;
|
||||
break;
|
||||
case 3:
|
||||
// Palette of the bg tiles changes depending on the player's gender
|
||||
if (gSaveBlock2Ptr->playerGender == MALE)
|
||||
{
|
||||
for (i = 0; i < ARRAY_COUNT(sBerryTag->tilemapBuffers[1]); i++)
|
||||
sBerryTag->tilemapBuffers[1][i] = 0x4042;
|
||||
sBerryTag->tilemapBuffers[1][i] = (4 << 12) | BG_TILE;
|
||||
}
|
||||
else
|
||||
{
|
||||
for (i = 0; i < ARRAY_COUNT(sBerryTag->tilemapBuffers[1]); i++)
|
||||
sBerryTag->tilemapBuffers[1][i] = 0x5042;
|
||||
sBerryTag->tilemapBuffers[1][i] = (5 << 12) | BG_TILE;
|
||||
}
|
||||
sBerryTag->gfxState++;
|
||||
break;
|
||||
@ -545,6 +548,9 @@ static void Task_HandleInput(u8 taskId)
|
||||
}
|
||||
}
|
||||
|
||||
#define tBerryY data[0]
|
||||
#define tBgOp data[1]
|
||||
|
||||
static void TryChangeDisplayedBerry(u8 taskId, s8 toMove)
|
||||
{
|
||||
s16 *data = gTasks[taskId].data;
|
||||
@ -553,11 +559,11 @@ static void TryChangeDisplayedBerry(u8 taskId, s8 toMove)
|
||||
if (newPocketPosition < ITEM_TO_BERRY(MAX_BERRY_INDEX) && BagGetItemIdByPocketPosition(POCKET_BERRIES, newPocketPosition) != ITEM_NONE)
|
||||
{
|
||||
if (toMove < 0)
|
||||
data[1] = 2;
|
||||
tBgOp = BG_COORD_SUB;
|
||||
else
|
||||
data[1] = 1;
|
||||
tBgOp = BG_COORD_ADD;
|
||||
|
||||
data[0] = 0;
|
||||
tBerryY = 0;
|
||||
PlaySE(SE_SELECT);
|
||||
HandleBagCursorPositionChange(toMove);
|
||||
gTasks[taskId].func = Task_DisplayAnotherBerry;
|
||||
@ -586,101 +592,103 @@ static void HandleBagCursorPositionChange(s8 toMove)
|
||||
sBerryTag->berryId = ItemIdToBerryType(BagGetItemIdByPocketPosition(POCKET_BERRIES, *scrollPos + *cursorPos));
|
||||
}
|
||||
|
||||
#define DISPLAY_SPEED 16
|
||||
|
||||
static void Task_DisplayAnotherBerry(u8 taskId)
|
||||
{
|
||||
u16 i;
|
||||
s16 posY;
|
||||
s16 y;
|
||||
s16 *data = gTasks[taskId].data;
|
||||
data[0] += 0x10;
|
||||
data[0] &= 0xFF;
|
||||
tBerryY += DISPLAY_SPEED;
|
||||
tBerryY &= 0xFF;
|
||||
|
||||
if (data[1] == 1)
|
||||
if (tBgOp == BG_COORD_ADD)
|
||||
{
|
||||
switch (data[0])
|
||||
switch (tBerryY)
|
||||
{
|
||||
case 0x30:
|
||||
case 3 * DISPLAY_SPEED:
|
||||
FillWindowPixelBuffer(WIN_BERRY_NAME, PIXEL_FILL(0));
|
||||
break;
|
||||
case 0x40:
|
||||
case 4 * DISPLAY_SPEED:
|
||||
PrintBerryNumberAndName();
|
||||
break;
|
||||
case 0x50:
|
||||
case 5 * DISPLAY_SPEED:
|
||||
DestroyBerrySprite();
|
||||
CreateBerrySprite();
|
||||
break;
|
||||
case 0x60:
|
||||
case 6 * DISPLAY_SPEED:
|
||||
FillWindowPixelBuffer(WIN_SIZE_FIRM, PIXEL_FILL(0));
|
||||
break;
|
||||
case 0x70:
|
||||
case 7 * DISPLAY_SPEED:
|
||||
PrintBerrySize();
|
||||
break;
|
||||
case 0x80:
|
||||
case 8 * DISPLAY_SPEED:
|
||||
PrintBerryFirmness();
|
||||
break;
|
||||
case 0x90:
|
||||
case 9 * DISPLAY_SPEED:
|
||||
SetFlavorCirclesVisiblity();
|
||||
break;
|
||||
case 0xA0:
|
||||
case 10 * DISPLAY_SPEED:
|
||||
FillWindowPixelBuffer(WIN_DESC, PIXEL_FILL(0));
|
||||
break;
|
||||
case 0xB0:
|
||||
case 11 * DISPLAY_SPEED:
|
||||
PrintBerryDescription1();
|
||||
break;
|
||||
case 0xC0:
|
||||
case 12 * DISPLAY_SPEED:
|
||||
PrintBerryDescription2();
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
else // BG_COORD_SUB
|
||||
{
|
||||
switch (data[0])
|
||||
switch (tBerryY)
|
||||
{
|
||||
case 0x30:
|
||||
case 3 * DISPLAY_SPEED:
|
||||
FillWindowPixelBuffer(WIN_DESC, PIXEL_FILL(0));
|
||||
break;
|
||||
case 0x40:
|
||||
case 4 * DISPLAY_SPEED:
|
||||
PrintBerryDescription2();
|
||||
break;
|
||||
case 0x50:
|
||||
case 5 * DISPLAY_SPEED:
|
||||
PrintBerryDescription1();
|
||||
break;
|
||||
case 0x60:
|
||||
case 6 * DISPLAY_SPEED:
|
||||
SetFlavorCirclesVisiblity();
|
||||
break;
|
||||
case 0x70:
|
||||
case 7 * DISPLAY_SPEED:
|
||||
FillWindowPixelBuffer(WIN_SIZE_FIRM, PIXEL_FILL(0));
|
||||
break;
|
||||
case 0x80:
|
||||
case 8 * DISPLAY_SPEED:
|
||||
PrintBerryFirmness();
|
||||
break;
|
||||
case 0x90:
|
||||
case 9 * DISPLAY_SPEED:
|
||||
PrintBerrySize();
|
||||
break;
|
||||
case 0xA0:
|
||||
case 10 * DISPLAY_SPEED:
|
||||
DestroyBerrySprite();
|
||||
CreateBerrySprite();
|
||||
break;
|
||||
case 0xB0:
|
||||
case 11 * DISPLAY_SPEED:
|
||||
FillWindowPixelBuffer(WIN_BERRY_NAME, PIXEL_FILL(0));
|
||||
break;
|
||||
case 0xC0:
|
||||
case 12 * DISPLAY_SPEED:
|
||||
PrintBerryNumberAndName();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (data[1] == 1)
|
||||
posY = -data[0];
|
||||
if (tBgOp == BG_COORD_ADD)
|
||||
y = -tBerryY;
|
||||
else
|
||||
posY = data[0];
|
||||
y = tBerryY;
|
||||
|
||||
gSprites[sBerryTag->berrySpriteId].y2 = posY;
|
||||
gSprites[sBerryTag->berrySpriteId].y2 = y;
|
||||
for (i = 0; i < FLAVOR_COUNT; i++)
|
||||
gSprites[sBerryTag->flavorCircleIds[i]].y2 = posY;
|
||||
gSprites[sBerryTag->flavorCircleIds[i]].y2 = y;
|
||||
|
||||
ChangeBgY(1, 0x1000, data[1]);
|
||||
ChangeBgY(2, 0x1000, data[1]);
|
||||
ChangeBgY(1, 0x1000, tBgOp);
|
||||
ChangeBgY(2, 0x1000, tBgOp);
|
||||
|
||||
if (data[0] == 0)
|
||||
if (tBerryY == 0)
|
||||
gTasks[taskId].func = Task_HandleInput;
|
||||
}
|
||||
|
@ -725,7 +725,7 @@ void TryContestEModeLinkup(void)
|
||||
u8 CreateTask_ReestablishCableClubLink(void)
|
||||
{
|
||||
if (FuncIsActiveTask(Task_ReestablishLink) != FALSE)
|
||||
return 0xFF;
|
||||
return TASK_NONE;
|
||||
|
||||
switch (gSpecialVar_0x8004)
|
||||
{
|
||||
|
@ -1112,10 +1112,10 @@ static void InitContestResources(void)
|
||||
|
||||
for (i = 0; i < CONTESTANT_COUNT; i++)
|
||||
{
|
||||
eContestantStatus[i].nextTurnOrder = 0xFF;
|
||||
eContestantStatus[i].nextTurnOrder = CONTESTANT_NONE;
|
||||
eContest.prevTurnOrder[i] = gContestantTurnOrder[i];
|
||||
}
|
||||
// Calling this here while all the nextTurnOrder values are 0xFF will actually
|
||||
// Calling this here while all the nextTurnOrder values are CONTESTANT_NONE will actually
|
||||
// just reverse the turn order.
|
||||
ApplyNextTurnOrder();
|
||||
memset(gContestResources->tv, 0, sizeof(*gContestResources->tv) * CONTESTANT_COUNT);
|
||||
@ -2889,7 +2889,7 @@ void SetContestants(u8 contestType, u8 rank)
|
||||
opponents[opponentsCount++] = i;
|
||||
}
|
||||
}
|
||||
opponents[opponentsCount] = 0xFF;
|
||||
opponents[opponentsCount] = CONTESTANT_NONE;
|
||||
|
||||
// Choose three random opponents from the list
|
||||
for (i = 0; i < CONTESTANT_COUNT - 1; i++)
|
||||
@ -2898,7 +2898,7 @@ void SetContestants(u8 contestType, u8 rank)
|
||||
s32 j;
|
||||
|
||||
gContestMons[i] = gContestOpponents[opponents[rnd]];
|
||||
for (j = rnd; opponents[j] != 0xFF; j++)
|
||||
for (j = rnd; opponents[j] != CONTESTANT_NONE; j++)
|
||||
opponents[j] = opponents[j + 1];
|
||||
opponentsCount--;
|
||||
}
|
||||
@ -2938,7 +2938,7 @@ void SetLinkAIContestants(u8 contestType, u8 rank, bool32 isPostgame)
|
||||
|| (contestType == CONTEST_CATEGORY_TOUGH && gContestOpponents[i].aiPool_Tough))
|
||||
opponents[opponentsCount++] = i;
|
||||
}
|
||||
opponents[opponentsCount] = 0xFF;
|
||||
opponents[opponentsCount] = CONTESTANT_NONE;
|
||||
|
||||
// Fill remaining contestant slots with random AI opponents from the list
|
||||
for (i = 0; i < CONTESTANT_COUNT - gNumLinkContestPlayers; i++)
|
||||
@ -2948,7 +2948,7 @@ void SetLinkAIContestants(u8 contestType, u8 rank, bool32 isPostgame)
|
||||
gContestMons[gNumLinkContestPlayers + i] = gContestOpponents[opponents[rnd]];
|
||||
StripPlayerNameForLinkContest(gContestMons[gNumLinkContestPlayers + i].trainerName);
|
||||
StripMonNameForLinkContest(gContestMons[gNumLinkContestPlayers + i].nickname, GAME_LANGUAGE);
|
||||
for (j = rnd; opponents[j] != 0xFF; j++)
|
||||
for (j = rnd; opponents[j] != CONTESTANT_NONE; j++)
|
||||
opponents[j] = opponents[j + 1];
|
||||
opponentsCount--;
|
||||
}
|
||||
@ -4368,7 +4368,7 @@ void SortContestants(bool8 useRanking)
|
||||
// Note that ranking is calculated so that shared places still take up a ranking
|
||||
// space. A ranking like [1, 2, 2, 3] is not possible; it would be [1, 2, 2, 4]
|
||||
// instead.
|
||||
memset(scratch, 0xFF, sizeof(scratch));
|
||||
memset(scratch, CONTESTANT_NONE, sizeof(scratch));
|
||||
for (i = 0; i < CONTESTANT_COUNT; i++)
|
||||
{
|
||||
u8 j = eContestantStatus[i].ranking;
|
||||
@ -4376,7 +4376,7 @@ void SortContestants(bool8 useRanking)
|
||||
while (1)
|
||||
{
|
||||
u8 *ptr = &scratch[j];
|
||||
if (*ptr == 0xFF)
|
||||
if (*ptr == CONTESTANT_NONE)
|
||||
{
|
||||
*ptr = i;
|
||||
gContestantTurnOrder[i] = j;
|
||||
@ -4634,7 +4634,7 @@ static void ApplyNextTurnOrder(void)
|
||||
// First, look for the first unassigned contestant.
|
||||
for (j = 0; j < CONTESTANT_COUNT; j++)
|
||||
{
|
||||
if (!isContestantOrdered[j] && eContestantStatus[j].nextTurnOrder == 0xFF)
|
||||
if (!isContestantOrdered[j] && eContestantStatus[j].nextTurnOrder == CONTESTANT_NONE)
|
||||
{
|
||||
nextContestant = j;
|
||||
j++;
|
||||
@ -4645,7 +4645,7 @@ static void ApplyNextTurnOrder(void)
|
||||
// Then, look for a better candidate, with a higher turn order.
|
||||
for (; j < CONTESTANT_COUNT; j++)
|
||||
{
|
||||
if (!isContestantOrdered[j] && eContestantStatus[j].nextTurnOrder == 0xFF
|
||||
if (!isContestantOrdered[j] && eContestantStatus[j].nextTurnOrder == CONTESTANT_NONE
|
||||
&& gContestantTurnOrder[nextContestant] > gContestantTurnOrder[j])
|
||||
nextContestant = j;
|
||||
}
|
||||
@ -4659,7 +4659,7 @@ static void ApplyNextTurnOrder(void)
|
||||
for (i = 0; i < CONTESTANT_COUNT; i++)
|
||||
{
|
||||
eContestAppealResults.turnOrder[i] = newTurnOrder[i];
|
||||
eContestantStatus[i].nextTurnOrder = 0xFF;
|
||||
eContestantStatus[i].nextTurnOrder = CONTESTANT_NONE;
|
||||
eContestantStatus[i].turnOrderMod = 0;
|
||||
gContestantTurnOrder[i] = newTurnOrder[i];
|
||||
}
|
||||
|
@ -6,6 +6,8 @@
|
||||
#include "contest_effect.h"
|
||||
#include "constants/moves.h"
|
||||
|
||||
#define AI_ACTION_DONE (1 << 0)
|
||||
|
||||
extern const u8 *gAIScriptPtr;
|
||||
extern const u8 *gContestAI_ScriptsTable[];
|
||||
|
||||
@ -362,9 +364,9 @@ static void ContestAI_DoAIProcessing(void)
|
||||
else
|
||||
{
|
||||
eContestAI.moveScores[eContestAI.nextMoveIndex] = 0; // don't consider a move that doesn't exist.
|
||||
eContestAI.aiAction |= 1;
|
||||
eContestAI.aiAction |= AI_ACTION_DONE;
|
||||
}
|
||||
if (eContestAI.aiAction & 1)
|
||||
if (eContestAI.aiAction & AI_ACTION_DONE)
|
||||
{
|
||||
eContestAI.nextMoveIndex++;
|
||||
if (eContestAI.nextMoveIndex < MAX_MON_MOVES)
|
||||
@ -372,7 +374,7 @@ static void ContestAI_DoAIProcessing(void)
|
||||
else
|
||||
// aiState = CONTESTAI_FINISHED
|
||||
eContestAI.aiState++;
|
||||
eContestAI.aiAction &= 0xFE; // TODO: Define action flags
|
||||
eContestAI.aiAction &= ~AI_ACTION_DONE;
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -1667,7 +1669,7 @@ static void ContestAICmd_call(void)
|
||||
static void ContestAICmd_end(void)
|
||||
{
|
||||
if (!AIStackPop())
|
||||
eContestAI.aiAction |= 1;
|
||||
eContestAI.aiAction |= AI_ACTION_DONE;
|
||||
}
|
||||
|
||||
static void AIStackPushVar(const u8 *ptr)
|
||||
|
@ -147,7 +147,7 @@ static void ContestEffect_StartleFrontMon(void)
|
||||
break;
|
||||
}
|
||||
eContestAppealResults.jamQueue[0] = i;
|
||||
eContestAppealResults.jamQueue[1] = 0xFF;
|
||||
eContestAppealResults.jamQueue[1] = CONTESTANT_NONE;
|
||||
idx = WasAtLeastOneOpponentJammed();
|
||||
}
|
||||
if (idx == 0)
|
||||
@ -171,7 +171,7 @@ static void ContestEffect_StartlePrevMons(void)
|
||||
eContestAppealResults.jamQueue[j++] = i;
|
||||
}
|
||||
|
||||
eContestAppealResults.jamQueue[j] = 0xFF;
|
||||
eContestAppealResults.jamQueue[j] = CONTESTANT_NONE;
|
||||
idx = WasAtLeastOneOpponentJammed();
|
||||
}
|
||||
if (idx == 0)
|
||||
@ -214,7 +214,7 @@ static void ContestEffect_StartlePrevMons2(void)
|
||||
u8 rval, jam;
|
||||
|
||||
eContestAppealResults.jamQueue[0] = i;
|
||||
eContestAppealResults.jamQueue[1] = 0xFF;
|
||||
eContestAppealResults.jamQueue[1] = CONTESTANT_NONE;
|
||||
rval = Random() % 10;
|
||||
|
||||
if (rval == 0)
|
||||
@ -291,7 +291,7 @@ static void ContestEffect_StartleMonWithJudgesAttention(void)
|
||||
else
|
||||
eContestAppealResults.jam = 10;
|
||||
eContestAppealResults.jamQueue[0] = i;
|
||||
eContestAppealResults.jamQueue[1] = 0xFF;
|
||||
eContestAppealResults.jamQueue[1] = CONTESTANT_NONE;
|
||||
if (WasAtLeastOneOpponentJammed())
|
||||
numStartled++;
|
||||
}
|
||||
@ -396,7 +396,7 @@ static void ContestEffect_MakeFollowingMonsNervous(void)
|
||||
s16 oddsMod[CONTESTANT_COUNT];
|
||||
s16 odds[CONTESTANT_COUNT];
|
||||
|
||||
memset(contestantIds, 0xFF, ARRAY_COUNT(contestantIds));
|
||||
memset(contestantIds, CONTESTANT_NONE, ARRAY_COUNT(contestantIds));
|
||||
for (i = 0, numAfter = 0; i < CONTESTANT_COUNT; i++)
|
||||
{
|
||||
if (eContestAppealResults.turnOrder[eContestAppealResults.contestant] < eContestAppealResults.turnOrder[i] &&
|
||||
@ -434,7 +434,7 @@ static void ContestEffect_MakeFollowingMonsNervous(void)
|
||||
}
|
||||
if (odds[0] != 0)
|
||||
{
|
||||
for (i = 0; contestantIds[i] != 0xFF; i++)
|
||||
for (i = 0; contestantIds[i] != CONTESTANT_NONE; i++)
|
||||
{
|
||||
if (Random() % 100 < odds[i] + oddsMod[contestantIds[i]])
|
||||
{
|
||||
@ -507,7 +507,7 @@ static void ContestEffect_BadlyStartlesMonsInGoodCondition(void)
|
||||
else
|
||||
eContestAppealResults.jam = 10;
|
||||
eContestAppealResults.jamQueue[0] = i;
|
||||
eContestAppealResults.jamQueue[1] = 0xFF;
|
||||
eContestAppealResults.jamQueue[1] = CONTESTANT_NONE;
|
||||
if (WasAtLeastOneOpponentJammed())
|
||||
numHit++;
|
||||
}
|
||||
@ -758,7 +758,7 @@ static void ContestEffect_NextAppealEarlier(void)
|
||||
for (i = 0; i < CONTESTANT_COUNT; i++)
|
||||
turnOrder[i] = eContestantStatus[i].nextTurnOrder;
|
||||
|
||||
turnOrder[eContestAppealResults.contestant] = 0xFF;
|
||||
turnOrder[eContestAppealResults.contestant] = CONTESTANT_NONE;
|
||||
|
||||
for (i = 0; i < CONTESTANT_COUNT; i++)
|
||||
{
|
||||
@ -800,7 +800,7 @@ static void ContestEffect_NextAppealLater(void)
|
||||
for (i = 0; i < CONTESTANT_COUNT; i++)
|
||||
turnOrder[i] = eContestantStatus[i].nextTurnOrder;
|
||||
|
||||
turnOrder[eContestAppealResults.contestant] = 0xFF;
|
||||
turnOrder[eContestAppealResults.contestant] = CONTESTANT_NONE;
|
||||
|
||||
for (i = CONTESTANT_COUNT - 1; i > -1; i--)
|
||||
{
|
||||
@ -858,12 +858,12 @@ static void ContestEffect_ScrambleNextTurnOrder(void)
|
||||
|
||||
for (j = 0; j < CONTESTANT_COUNT; j++)
|
||||
{
|
||||
if (unselectedContestants[j] != 0xFF)
|
||||
if (unselectedContestants[j] != CONTESTANT_NONE)
|
||||
{
|
||||
if (rval == 0)
|
||||
{
|
||||
turnOrder[j] = i;
|
||||
unselectedContestants[j] = 0xFF;
|
||||
unselectedContestants[j] = CONTESTANT_NONE;
|
||||
break;
|
||||
}
|
||||
else
|
||||
@ -909,7 +909,7 @@ static void ContestEffect_BadlyStartleMonsWithGoodAppeals(void)
|
||||
else
|
||||
eContestAppealResults.jam = 10;
|
||||
eContestAppealResults.jamQueue[0] = i;
|
||||
eContestAppealResults.jamQueue[1] = 0xFF;
|
||||
eContestAppealResults.jamQueue[1] = CONTESTANT_NONE;
|
||||
if (WasAtLeastOneOpponentJammed())
|
||||
numJammed++;
|
||||
}
|
||||
@ -977,7 +977,7 @@ static void JamByMoveCategory(u8 category)
|
||||
else
|
||||
eContestAppealResults.jam = 10;
|
||||
eContestAppealResults.jamQueue[0] = i;
|
||||
eContestAppealResults.jamQueue[1] = 0xFF;
|
||||
eContestAppealResults.jamQueue[1] = CONTESTANT_NONE;
|
||||
if (WasAtLeastOneOpponentJammed())
|
||||
numJammed++;
|
||||
}
|
||||
@ -1016,7 +1016,7 @@ static bool8 WasAtLeastOneOpponentJammed(void)
|
||||
s16 jamBuffer[CONTESTANT_COUNT] = {0};
|
||||
int i;
|
||||
|
||||
for (i = 0; eContestAppealResults.jamQueue[i] != 0xFF; i++)
|
||||
for (i = 0; eContestAppealResults.jamQueue[i] != CONTESTANT_NONE; i++)
|
||||
{
|
||||
u8 contestant = eContestAppealResults.jamQueue[i];
|
||||
if (CanUnnerveContestant(contestant))
|
||||
|
@ -2011,7 +2011,7 @@ void GiveMonContestRibbon(void)
|
||||
{
|
||||
case CONTEST_CATEGORY_COOL:
|
||||
ribbonData = GetMonData(&gPlayerParty[gContestMonPartyIndex], MON_DATA_COOL_RIBBON);
|
||||
if (ribbonData <= gSpecialVar_ContestRank && ribbonData < 4)
|
||||
if (ribbonData <= gSpecialVar_ContestRank && ribbonData <= CONTEST_RANK_MASTER)
|
||||
{
|
||||
ribbonData++;
|
||||
SetMonData(&gPlayerParty[gContestMonPartyIndex], MON_DATA_COOL_RIBBON, &ribbonData);
|
||||
@ -2021,7 +2021,7 @@ void GiveMonContestRibbon(void)
|
||||
break;
|
||||
case CONTEST_CATEGORY_BEAUTY:
|
||||
ribbonData = GetMonData(&gPlayerParty[gContestMonPartyIndex], MON_DATA_BEAUTY_RIBBON);
|
||||
if (ribbonData <= gSpecialVar_ContestRank && ribbonData < 4)
|
||||
if (ribbonData <= gSpecialVar_ContestRank && ribbonData <= CONTEST_RANK_MASTER)
|
||||
{
|
||||
ribbonData++;
|
||||
SetMonData(&gPlayerParty[gContestMonPartyIndex], MON_DATA_BEAUTY_RIBBON, &ribbonData);
|
||||
@ -2031,7 +2031,7 @@ void GiveMonContestRibbon(void)
|
||||
break;
|
||||
case CONTEST_CATEGORY_CUTE:
|
||||
ribbonData = GetMonData(&gPlayerParty[gContestMonPartyIndex], MON_DATA_CUTE_RIBBON);
|
||||
if (ribbonData <= gSpecialVar_ContestRank && ribbonData < 4)
|
||||
if (ribbonData <= gSpecialVar_ContestRank && ribbonData <= CONTEST_RANK_MASTER)
|
||||
{
|
||||
ribbonData++;
|
||||
SetMonData(&gPlayerParty[gContestMonPartyIndex], MON_DATA_CUTE_RIBBON, &ribbonData);
|
||||
@ -2041,7 +2041,7 @@ void GiveMonContestRibbon(void)
|
||||
break;
|
||||
case CONTEST_CATEGORY_SMART:
|
||||
ribbonData = GetMonData(&gPlayerParty[gContestMonPartyIndex], MON_DATA_SMART_RIBBON);
|
||||
if (ribbonData <= gSpecialVar_ContestRank && ribbonData < 4)
|
||||
if (ribbonData <= gSpecialVar_ContestRank && ribbonData <= CONTEST_RANK_MASTER)
|
||||
{
|
||||
ribbonData++;
|
||||
SetMonData(&gPlayerParty[gContestMonPartyIndex], MON_DATA_SMART_RIBBON, &ribbonData);
|
||||
@ -2051,7 +2051,7 @@ void GiveMonContestRibbon(void)
|
||||
break;
|
||||
case CONTEST_CATEGORY_TOUGH:
|
||||
ribbonData = GetMonData(&gPlayerParty[gContestMonPartyIndex], MON_DATA_TOUGH_RIBBON);
|
||||
if (ribbonData <= gSpecialVar_ContestRank && ribbonData < 4)
|
||||
if (ribbonData <= gSpecialVar_ContestRank && ribbonData <= CONTEST_RANK_MASTER)
|
||||
{
|
||||
ribbonData++;
|
||||
SetMonData(&gPlayerParty[gContestMonPartyIndex], MON_DATA_TOUGH_RIBBON, &ribbonData);
|
||||
|
@ -1370,7 +1370,7 @@ static void SpriteCB_Player(struct Sprite *sprite)
|
||||
break;
|
||||
case 4:
|
||||
StartSpriteAnimIfDifferent(sprite, 0);
|
||||
if (sprite->x > 120)
|
||||
if (sprite->x > DISPLAY_WIDTH / 2)
|
||||
sprite->x--;
|
||||
break;
|
||||
case 5:
|
||||
|
@ -138,11 +138,14 @@ enum {
|
||||
#define CONTEST_AI_SET_20 (CONTEST_AI_COMMON | CONTEST_AI_DUMMY_12 | CONTEST_AI_DUMMY_25)
|
||||
#define CONTEST_AI_SET_21 (CONTEST_AI_COMMON | CONTEST_AI_DUMMY_7 | CONTEST_AI_DUMMY_25)
|
||||
|
||||
// All AI contestants have the same trainer ID
|
||||
#define CONTEST_AI_TRAINER_ID 0xFFFF
|
||||
|
||||
const struct ContestWinner gDefaultContestWinners[] =
|
||||
{
|
||||
[CONTEST_WINNER_HALL_1 - 1] = {
|
||||
.personality = 0,
|
||||
.trainerId = 0xFFFF,
|
||||
.trainerId = CONTEST_AI_TRAINER_ID,
|
||||
.species = SPECIES_ELECTRIKE,
|
||||
.contestCategory = CONTEST_CATEGORY_CUTE,
|
||||
.monName = _("ELECTER"),
|
||||
@ -151,7 +154,7 @@ const struct ContestWinner gDefaultContestWinners[] =
|
||||
},
|
||||
[CONTEST_WINNER_HALL_2 - 1] = {
|
||||
.personality = 0,
|
||||
.trainerId = 0xFFFF,
|
||||
.trainerId = CONTEST_AI_TRAINER_ID,
|
||||
.species = SPECIES_TROPIUS,
|
||||
.contestCategory = CONTEST_CATEGORY_COOL,
|
||||
.monName = _("TROPO"),
|
||||
@ -160,7 +163,7 @@ const struct ContestWinner gDefaultContestWinners[] =
|
||||
},
|
||||
[CONTEST_WINNER_HALL_3 - 1] = {
|
||||
.personality = 0,
|
||||
.trainerId = 0xFFFF,
|
||||
.trainerId = CONTEST_AI_TRAINER_ID,
|
||||
.species = SPECIES_XATU,
|
||||
.contestCategory = CONTEST_CATEGORY_BEAUTY,
|
||||
.monName = _("TUXA"),
|
||||
@ -169,7 +172,7 @@ const struct ContestWinner gDefaultContestWinners[] =
|
||||
},
|
||||
[CONTEST_WINNER_HALL_4 - 1] = {
|
||||
.personality = 0,
|
||||
.trainerId = 0xFFFF,
|
||||
.trainerId = CONTEST_AI_TRAINER_ID,
|
||||
.species = SPECIES_PLUSLE,
|
||||
.contestCategory = CONTEST_CATEGORY_TOUGH,
|
||||
.monName = _("PULSE"),
|
||||
@ -178,7 +181,7 @@ const struct ContestWinner gDefaultContestWinners[] =
|
||||
},
|
||||
[CONTEST_WINNER_HALL_5 - 1] = {
|
||||
.personality = 0,
|
||||
.trainerId = 0xFFFF,
|
||||
.trainerId = CONTEST_AI_TRAINER_ID,
|
||||
.species = SPECIES_SHUPPET,
|
||||
.contestCategory = CONTEST_CATEGORY_SMART,
|
||||
.monName = _("SHUPUP"),
|
||||
@ -187,7 +190,7 @@ const struct ContestWinner gDefaultContestWinners[] =
|
||||
},
|
||||
[CONTEST_WINNER_HALL_6 - 1] = {
|
||||
.personality = 0,
|
||||
.trainerId = 0xFFFF,
|
||||
.trainerId = CONTEST_AI_TRAINER_ID,
|
||||
.species = SPECIES_ZANGOOSE,
|
||||
.contestCategory = CONTEST_CATEGORY_COOL,
|
||||
.monName = _("GOOZAN"),
|
||||
@ -196,7 +199,7 @@ const struct ContestWinner gDefaultContestWinners[] =
|
||||
},
|
||||
[CONTEST_WINNER_HALL_UNUSED_1 - 1] = {
|
||||
.personality = 0,
|
||||
.trainerId = 0xFFFF,
|
||||
.trainerId = CONTEST_AI_TRAINER_ID,
|
||||
.species = SPECIES_LOUDRED,
|
||||
.contestCategory = CONTEST_CATEGORY_BEAUTY,
|
||||
.monName = _("LOUDED"),
|
||||
@ -205,7 +208,7 @@ const struct ContestWinner gDefaultContestWinners[] =
|
||||
},
|
||||
[CONTEST_WINNER_HALL_UNUSED_2 - 1] = {
|
||||
.personality = 0,
|
||||
.trainerId = 0xFFFF,
|
||||
.trainerId = CONTEST_AI_TRAINER_ID,
|
||||
.species = SPECIES_DELCATTY,
|
||||
.contestCategory = CONTEST_CATEGORY_CUTE,
|
||||
.monName = _("KITSY"),
|
||||
@ -242,7 +245,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 4,
|
||||
.sheen = 50,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_EDITH] = {
|
||||
.species = SPECIES_ILLUMISE,
|
||||
@ -270,7 +273,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 2,
|
||||
.sheen = 60,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_EVAN] = {
|
||||
.species = SPECIES_DUSTOX,
|
||||
@ -298,7 +301,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 4,
|
||||
.sheen = 70,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_KELSEY] = {
|
||||
.species = SPECIES_SEEDOT,
|
||||
@ -326,7 +329,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 7,
|
||||
.sheen = 80,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_MADISON] = {
|
||||
.species = SPECIES_TAILLOW,
|
||||
@ -354,7 +357,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 4,
|
||||
.sheen = 90,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_RAYMOND] = {
|
||||
.species = SPECIES_NINCADA,
|
||||
@ -382,7 +385,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 8,
|
||||
.sheen = 100,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_GRANT] = {
|
||||
.species = SPECIES_SHROOMISH,
|
||||
@ -410,7 +413,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 2,
|
||||
.sheen = 50,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_PAIGE] = {
|
||||
.species = SPECIES_SPHEAL,
|
||||
@ -438,7 +441,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 10,
|
||||
.sheen = 60,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_ALEC] = {
|
||||
.species = SPECIES_SLAKOTH,
|
||||
@ -466,7 +469,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 18,
|
||||
.sheen = 70,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_SYDNEY] = {
|
||||
.species = SPECIES_WHISMUR,
|
||||
@ -494,7 +497,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 7,
|
||||
.sheen = 80,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_MORRIS] = {
|
||||
.species = SPECIES_MAKUHITA,
|
||||
@ -522,7 +525,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 1,
|
||||
.sheen = 90,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_MARIAH] = {
|
||||
.species = SPECIES_ARON,
|
||||
@ -550,7 +553,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 2,
|
||||
.sheen = 100,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_RUSSELL] = {
|
||||
.species = SPECIES_CROBAT,
|
||||
@ -578,7 +581,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 10,
|
||||
.sheen = 50,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_MELANIE] = {
|
||||
.species = SPECIES_GULPIN,
|
||||
@ -606,7 +609,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 5,
|
||||
.sheen = 60,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_CHANCE] = {
|
||||
.species = SPECIES_MANECTRIC,
|
||||
@ -634,7 +637,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 1,
|
||||
.sheen = 70,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_AGATHA] = {
|
||||
.species = SPECIES_BULBASAUR,
|
||||
@ -662,7 +665,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 4,
|
||||
.sheen = 50,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_BEAU] = {
|
||||
.species = SPECIES_BUTTERFREE,
|
||||
@ -690,7 +693,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 4,
|
||||
.sheen = 60,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_KAY] = {
|
||||
.species = SPECIES_PIDGEOTTO,
|
||||
@ -718,7 +721,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 3,
|
||||
.sheen = 70,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_CALE] = {
|
||||
.species = SPECIES_DIGLETT,
|
||||
@ -746,7 +749,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 10,
|
||||
.sheen = 80,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_CAITLIN] = {
|
||||
.species = SPECIES_POLIWAG,
|
||||
@ -774,7 +777,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 10,
|
||||
.sheen = 90,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_COLBY] = {
|
||||
.species = SPECIES_TOTODILE,
|
||||
@ -802,7 +805,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 5,
|
||||
.sheen = 100,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_KYLIE] = {
|
||||
.species = SPECIES_LEDYBA,
|
||||
@ -830,7 +833,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 2,
|
||||
.sheen = 90,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_LIAM] = {
|
||||
.species = SPECIES_DELIBIRD,
|
||||
@ -858,7 +861,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 3,
|
||||
.sheen = 80,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_MILO] = {
|
||||
.species = SPECIES_LARVITAR,
|
||||
@ -886,7 +889,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 10,
|
||||
.sheen = 70,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_KARINA] = {
|
||||
.species = SPECIES_ROSELIA,
|
||||
@ -914,7 +917,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 20,
|
||||
.sheen = 100,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_BOBBY] = {
|
||||
.species = SPECIES_DODRIO,
|
||||
@ -942,7 +945,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 35,
|
||||
.sheen = 110,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_CLAIRE] = {
|
||||
.species = SPECIES_TRAPINCH,
|
||||
@ -970,7 +973,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 25,
|
||||
.sheen = 120,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_WILLIE] = {
|
||||
.species = SPECIES_CACNEA,
|
||||
@ -998,7 +1001,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 25,
|
||||
.sheen = 130,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_CASSIDY] = {
|
||||
.species = SPECIES_SANDSLASH,
|
||||
@ -1026,7 +1029,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 100,
|
||||
.sheen = 140,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_MORGAN] = {
|
||||
.species = SPECIES_BALTOY,
|
||||
@ -1054,7 +1057,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 35,
|
||||
.sheen = 150,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_SUMMER] = {
|
||||
.species = SPECIES_MEDICHAM,
|
||||
@ -1082,7 +1085,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 40,
|
||||
.sheen = 100,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_MILES] = {
|
||||
.species = SPECIES_SPINDA,
|
||||
@ -1110,7 +1113,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 25,
|
||||
.sheen = 110,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_AUDREY] = {
|
||||
.species = SPECIES_SWABLU,
|
||||
@ -1138,7 +1141,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 25,
|
||||
.sheen = 120,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_AVERY] = {
|
||||
.species = SPECIES_SPOINK,
|
||||
@ -1166,7 +1169,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 30,
|
||||
.sheen = 130,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_ARIANA] = {
|
||||
.species = SPECIES_KECLEON,
|
||||
@ -1194,7 +1197,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 35,
|
||||
.sheen = 140,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_ASHTON] = {
|
||||
.species = SPECIES_GOLDEEN,
|
||||
@ -1222,7 +1225,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 25,
|
||||
.sheen = 150,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_SANDRA] = {
|
||||
.species = SPECIES_BARBOACH,
|
||||
@ -1250,7 +1253,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 15,
|
||||
.sheen = 100,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_CARSON] = {
|
||||
.species = SPECIES_SKARMORY,
|
||||
@ -1278,7 +1281,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 20,
|
||||
.sheen = 110,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_KATRINA] = {
|
||||
.species = SPECIES_LOTAD,
|
||||
@ -1306,7 +1309,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 75,
|
||||
.sheen = 120,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_LUKE] = {
|
||||
.species = SPECIES_SLOWBRO,
|
||||
@ -1334,7 +1337,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 20,
|
||||
.sheen = 100,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_RAUL] = {
|
||||
.species = SPECIES_FARFETCHD,
|
||||
@ -1362,7 +1365,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 20,
|
||||
.sheen = 110,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_JADA] = {
|
||||
.species = SPECIES_SEEL,
|
||||
@ -1390,7 +1393,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 20,
|
||||
.sheen = 120,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_ZEEK] = {
|
||||
.species = SPECIES_DROWZEE,
|
||||
@ -1418,7 +1421,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 45,
|
||||
.sheen = 130,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_DIEGO] = {
|
||||
.species = SPECIES_HITMONCHAN,
|
||||
@ -1446,7 +1449,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 45,
|
||||
.sheen = 140,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_ALIYAH] = {
|
||||
.species = SPECIES_BLISSEY,
|
||||
@ -1474,7 +1477,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 20,
|
||||
.sheen = 150,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_NATALIA] = {
|
||||
.species = SPECIES_ELEKID,
|
||||
@ -1502,7 +1505,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 25,
|
||||
.sheen = 140,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_DEVIN] = {
|
||||
.species = SPECIES_SNUBBULL,
|
||||
@ -1530,7 +1533,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 20,
|
||||
.sheen = 130,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_TYLOR] = {
|
||||
.species = SPECIES_MISDREAVUS,
|
||||
@ -1558,7 +1561,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 20,
|
||||
.sheen = 120,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_RONNIE] = {
|
||||
.species = SPECIES_LAIRON,
|
||||
@ -1586,7 +1589,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 90,
|
||||
.sheen = 200,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_CLAUDIA] = {
|
||||
.species = SPECIES_SHIFTRY,
|
||||
@ -1614,7 +1617,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 70,
|
||||
.sheen = 210,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_ELIAS] = {
|
||||
.species = SPECIES_NINJASK,
|
||||
@ -1642,7 +1645,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 70,
|
||||
.sheen = 220,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_JADE] = {
|
||||
.species = SPECIES_SWELLOW,
|
||||
@ -1670,7 +1673,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 40,
|
||||
.sheen = 230,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_FRANCIS] = {
|
||||
.species = SPECIES_MIGHTYENA,
|
||||
@ -1698,7 +1701,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 70,
|
||||
.sheen = 240,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_ALISHA] = {
|
||||
.species = SPECIES_BEAUTIFLY,
|
||||
@ -1726,7 +1729,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 100,
|
||||
.sheen = 250,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_SAUL] = {
|
||||
.species = SPECIES_SEAKING,
|
||||
@ -1754,7 +1757,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 90,
|
||||
.sheen = 200,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_FELICIA] = {
|
||||
.species = SPECIES_CASTFORM,
|
||||
@ -1782,7 +1785,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 65,
|
||||
.sheen = 210,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_EMILIO] = {
|
||||
.species = SPECIES_MACHOKE,
|
||||
@ -1810,7 +1813,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 50,
|
||||
.sheen = 220,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_KARLA] = {
|
||||
.species = SPECIES_LOMBRE,
|
||||
@ -1838,7 +1841,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 70,
|
||||
.sheen = 230,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_DARRYL] = {
|
||||
.species = SPECIES_SEVIPER,
|
||||
@ -1866,7 +1869,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 100,
|
||||
.sheen = 240,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_SELENA] = {
|
||||
.species = SPECIES_WAILMER,
|
||||
@ -1894,7 +1897,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 30,
|
||||
.sheen = 250,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_NOEL] = {
|
||||
.species = SPECIES_MAGIKARP,
|
||||
@ -1922,7 +1925,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 160,
|
||||
.sheen = 255,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_LACEY] = {
|
||||
.species = SPECIES_LUNATONE,
|
||||
@ -1950,7 +1953,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 50,
|
||||
.sheen = 210,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_CORBIN] = {
|
||||
.species = SPECIES_ABSOL,
|
||||
@ -1978,7 +1981,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 35,
|
||||
.sheen = 220,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_GRACIE] = {
|
||||
.species = SPECIES_EXEGGUTOR,
|
||||
@ -2006,7 +2009,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 80,
|
||||
.sheen = 200,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_COLTIN] = {
|
||||
.species = SPECIES_CUBONE,
|
||||
@ -2034,7 +2037,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 100,
|
||||
.sheen = 210,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_ELLIE] = {
|
||||
.species = SPECIES_HITMONLEE,
|
||||
@ -2062,7 +2065,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 100,
|
||||
.sheen = 220,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_MARCUS] = {
|
||||
.species = SPECIES_SQUIRTLE,
|
||||
@ -2090,7 +2093,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 95,
|
||||
.sheen = 230,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_KIARA] = {
|
||||
.species = SPECIES_KANGASKHAN,
|
||||
@ -2118,7 +2121,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 100,
|
||||
.sheen = 240,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_BRYCE] = {
|
||||
.species = SPECIES_PINECO,
|
||||
@ -2146,7 +2149,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 80,
|
||||
.sheen = 250,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_JAMIE] = {
|
||||
.species = SPECIES_DUNSPARCE,
|
||||
@ -2174,7 +2177,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 110,
|
||||
.sheen = 240,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_JORGE] = {
|
||||
.species = SPECIES_HOUNDOOM,
|
||||
@ -2202,7 +2205,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 80,
|
||||
.sheen = 230,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_DEVON] = {
|
||||
.species = SPECIES_MILTANK,
|
||||
@ -2230,7 +2233,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 40,
|
||||
.sheen = 220,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_JUSTINA] = {
|
||||
.species = SPECIES_GYARADOS,
|
||||
@ -2258,7 +2261,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 160,
|
||||
.sheen = 255,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_RALPH] = {
|
||||
.species = SPECIES_LOUDRED,
|
||||
@ -2286,7 +2289,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 160,
|
||||
.sheen = 255,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_ROSA] = {
|
||||
.species = SPECIES_SKITTY,
|
||||
@ -2314,7 +2317,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 60,
|
||||
.sheen = 255,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_KEATON] = {
|
||||
.species = SPECIES_SLAKING,
|
||||
@ -2342,7 +2345,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 150,
|
||||
.sheen = 255,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_MAYRA] = {
|
||||
.species = SPECIES_ALTARIA,
|
||||
@ -2370,7 +2373,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 90,
|
||||
.sheen = 255,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_LAMAR] = {
|
||||
.species = SPECIES_KIRLIA,
|
||||
@ -2398,7 +2401,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 80,
|
||||
.sheen = 255,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_AUBREY] = {
|
||||
.species = SPECIES_BELLOSSOM,
|
||||
@ -2426,7 +2429,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 40,
|
||||
.sheen = 255,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_NIGEL] = {
|
||||
.species = SPECIES_SABLEYE,
|
||||
@ -2454,7 +2457,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 160,
|
||||
.sheen = 255,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_CAMILLE] = {
|
||||
.species = SPECIES_NATU,
|
||||
@ -2482,7 +2485,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 170,
|
||||
.sheen = 255,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_DEON] = {
|
||||
.species = SPECIES_SHARPEDO,
|
||||
@ -2510,7 +2513,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 100,
|
||||
.sheen = 255,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_JANELLE] = {
|
||||
.species = SPECIES_LUVDISC,
|
||||
@ -2538,7 +2541,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 190,
|
||||
.sheen = 255,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_HEATH] = {
|
||||
.species = SPECIES_HERACROSS,
|
||||
@ -2566,7 +2569,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 140,
|
||||
.sheen = 255,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_SASHA] = {
|
||||
.species = SPECIES_ELECTRODE,
|
||||
@ -2594,7 +2597,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 50,
|
||||
.sheen = 255,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_FRANKIE] = {
|
||||
.species = SPECIES_PICHU,
|
||||
@ -2622,7 +2625,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 120,
|
||||
.sheen = 255,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_HELEN] = {
|
||||
.species = SPECIES_WOBBUFFET,
|
||||
@ -2650,7 +2653,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 210,
|
||||
.sheen = 255,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_CAMILE] = {
|
||||
.species = SPECIES_GENGAR,
|
||||
@ -2678,7 +2681,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 180,
|
||||
.sheen = 255,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_MARTIN] = {
|
||||
.species = SPECIES_PORYGON,
|
||||
@ -2706,7 +2709,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 130,
|
||||
.sheen = 255,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_SERGIO] = {
|
||||
.species = SPECIES_DRAGONITE,
|
||||
@ -2734,7 +2737,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 150,
|
||||
.sheen = 255,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_KAILEY] = {
|
||||
.species = SPECIES_MEOWTH,
|
||||
@ -2762,7 +2765,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 80,
|
||||
.sheen = 255,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_PERLA] = {
|
||||
.species = SPECIES_JYNX,
|
||||
@ -2790,7 +2793,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 120,
|
||||
.sheen = 255,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_CLARA] = {
|
||||
.species = SPECIES_TOGEPI,
|
||||
@ -2818,7 +2821,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 80,
|
||||
.sheen = 255,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_JAKOB] = {
|
||||
.species = SPECIES_ESPEON,
|
||||
@ -2846,7 +2849,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 150,
|
||||
.sheen = 255,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_TREY] = {
|
||||
.species = SPECIES_SLOWKING,
|
||||
@ -2874,7 +2877,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 170,
|
||||
.sheen = 255,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
},
|
||||
[CONTEST_OPPONENT_LANE] = {
|
||||
.species = SPECIES_URSARING,
|
||||
@ -2902,7 +2905,7 @@ const struct ContestPokemon gContestOpponents[] =
|
||||
.tough = 190,
|
||||
.sheen = 255,
|
||||
.personality = 0,
|
||||
.otId = 0xFFFF
|
||||
.otId = CONTEST_AI_TRAINER_ID,
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -422,7 +422,16 @@ static const u8 sDecorationSlideElevation[] =
|
||||
};
|
||||
|
||||
static const u16 sDecorShapeSizes[] = {
|
||||
0x04, 0x08, 0x10, 0x20, 0x10, 0x08, 0x10, 0x20, 0x40, 0x20
|
||||
[DECORSHAPE_1x1] = 4,
|
||||
[DECORSHAPE_2x1] = 8,
|
||||
[DECORSHAPE_3x1] = 16,
|
||||
[DECORSHAPE_4x2] = 32,
|
||||
[DECORSHAPE_2x2] = 16,
|
||||
[DECORSHAPE_1x2] = 8,
|
||||
[DECORSHAPE_1x3] = 16,
|
||||
[DECORSHAPE_2x4] = 32,
|
||||
[DECORSHAPE_3x3] = 64,
|
||||
[DECORSHAPE_3x2] = 32,
|
||||
};
|
||||
|
||||
static const u16 sBrendanPalette[] = INCBIN_U16("graphics/decorations/brendan.gbapal");
|
||||
|
@ -224,7 +224,7 @@ static void SortTrends(struct DewfordTrend *trends, u16 numTrends, u8 mode)
|
||||
}
|
||||
|
||||
#define SAVED_TRENDS_SIZE (sizeof(struct DewfordTrend) * SAVED_TRENDS_COUNT)
|
||||
#define BUFFER_SIZE (SAVED_TRENDS_SIZE * MAX_LINK_PLAYERS > 0x100 ? SAVED_TRENDS_SIZE * MAX_LINK_PLAYERS : 0x100) // More space was allocated than needed
|
||||
#define BUFFER_SIZE max(SAVED_TRENDS_SIZE * MAX_LINK_PLAYERS, 0x100) // More space was allocated than needed
|
||||
|
||||
void ReceiveDewfordTrendData(struct DewfordTrend *linkedTrends, size_t size, u8 unused)
|
||||
{
|
||||
|
@ -753,11 +753,11 @@ void EReaderHelper_SerialCallback(void)
|
||||
switch (sSendRecvMgr.state)
|
||||
{
|
||||
case EREADER_XFR_STATE_HANDSHAKE:
|
||||
REG_SIOMLT_SEND = 0xCCD0; // Handshake id
|
||||
REG_SIOMLT_SEND = EREADER_HANDSHAKE;
|
||||
*(u64 *)recv = REG_SIOMLT_RECV;
|
||||
for (i = 0, cnt1 = 0, cnt2 = 0; i < 4; i++)
|
||||
{
|
||||
if (recv[i] == 0xCCD0)
|
||||
if (recv[i] == EREADER_HANDSHAKE)
|
||||
cnt1++;
|
||||
else if (recv[i] != 0xFFFF)
|
||||
cnt2++;
|
||||
|
@ -2416,7 +2416,7 @@ static void TeleportWarpOutFieldEffect_SpinExit(struct Task *task)
|
||||
{
|
||||
sprite->subspriteMode = SUBSPRITES_IGNORE_PRIORITY;
|
||||
}
|
||||
if (task->data[4] >= 0xa8)
|
||||
if (task->data[4] >= DISPLAY_HEIGHT + 8)
|
||||
{
|
||||
task->tState++;
|
||||
TryFadeOutOldMapMusic();
|
||||
|
@ -3259,6 +3259,7 @@ void ScrollableMultichoice_ClosePersistentMenu(void)
|
||||
#undef tTaskId
|
||||
|
||||
#define DEOXYS_ROCK_LEVELS 11
|
||||
#define ROCK_PAL_ID 10
|
||||
|
||||
void DoDeoxysRockInteraction(void)
|
||||
{
|
||||
@ -3338,7 +3339,7 @@ static void Task_DeoxysRockInteraction(u8 taskId)
|
||||
static void ChangeDeoxysRockLevel(u8 rockLevel)
|
||||
{
|
||||
u8 objectEventId;
|
||||
LoadPalette(&sDeoxysRockPalettes[rockLevel], OBJ_PLTT_ID(10), PLTT_SIZEOF(4));
|
||||
LoadPalette(&sDeoxysRockPalettes[rockLevel], OBJ_PLTT_ID(ROCK_PAL_ID), PLTT_SIZEOF(4));
|
||||
TryGetObjectEventIdByLocalIdAndMap(LOCALID_BIRTH_ISLAND_EXTERIOR_ROCK, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, &objectEventId);
|
||||
|
||||
if (rockLevel == 0)
|
||||
@ -3375,21 +3376,20 @@ static void WaitForDeoxysRockMovement(u8 taskId)
|
||||
|
||||
void IncrementBirthIslandRockStepCount(void)
|
||||
{
|
||||
u16 var = VarGet(VAR_DEOXYS_ROCK_STEP_COUNT);
|
||||
u16 stepCount = VarGet(VAR_DEOXYS_ROCK_STEP_COUNT);
|
||||
if (gSaveBlock1Ptr->location.mapNum == MAP_NUM(BIRTH_ISLAND_EXTERIOR) && gSaveBlock1Ptr->location.mapGroup == MAP_GROUP(BIRTH_ISLAND_EXTERIOR))
|
||||
{
|
||||
var++;
|
||||
if (var > 99)
|
||||
if (++stepCount > 99)
|
||||
VarSet(VAR_DEOXYS_ROCK_STEP_COUNT, 0);
|
||||
else
|
||||
VarSet(VAR_DEOXYS_ROCK_STEP_COUNT, var);
|
||||
VarSet(VAR_DEOXYS_ROCK_STEP_COUNT, stepCount);
|
||||
}
|
||||
}
|
||||
|
||||
void SetDeoxysRockPalette(void)
|
||||
{
|
||||
LoadPalette(&sDeoxysRockPalettes[(u8)VarGet(VAR_DEOXYS_ROCK_LEVEL)], OBJ_PLTT_ID(10), PLTT_SIZEOF(4));
|
||||
BlendPalettes(0x04000000, 16, 0);
|
||||
LoadPalette(&sDeoxysRockPalettes[(u8)VarGet(VAR_DEOXYS_ROCK_LEVEL)], OBJ_PLTT_ID(ROCK_PAL_ID), PLTT_SIZEOF(4));
|
||||
BlendPalettes(1 << (ROCK_PAL_ID + 16), 16, 0);
|
||||
}
|
||||
|
||||
void SetPCBoxToSendMon(u8 boxId)
|
||||
@ -3956,16 +3956,15 @@ bool8 InPokemonCenter(void)
|
||||
|
||||
#define FANCLUB_BITFIELD (gSaveBlock1Ptr->vars[VAR_FANCLUB_FAN_COUNTER - VARS_START])
|
||||
#define FANCLUB_COUNTER 0x007F
|
||||
#define FANCLUB_FAN_FLAGS 0xFF80
|
||||
|
||||
#define GET_TRAINER_FAN_CLUB_FLAG(flag) (FANCLUB_BITFIELD >> (flag) & 1)
|
||||
#define SET_TRAINER_FAN_CLUB_FLAG(flag) (FANCLUB_BITFIELD |= 1 << (flag))
|
||||
#define FLIP_TRAINER_FAN_CLUB_FLAG(flag)(FANCLUB_BITFIELD ^= 1 << (flag))
|
||||
|
||||
#define GET_TRAINER_FAN_CLUB_COUNTER (FANCLUB_BITFIELD & FANCLUB_COUNTER)
|
||||
#define SET_TRAINER_FAN_CLUB_COUNTER(count) (FANCLUB_BITFIELD = (FANCLUB_BITFIELD & FANCLUB_FAN_FLAGS) | (count))
|
||||
#define SET_TRAINER_FAN_CLUB_COUNTER(count) (FANCLUB_BITFIELD = (FANCLUB_BITFIELD & ~FANCLUB_COUNTER) | (count))
|
||||
#define INCR_TRAINER_FAN_CLUB_COUNTER(count)(FANCLUB_BITFIELD += (count))
|
||||
#define CLEAR_TRAINER_FAN_CLUB_COUNTER (FANCLUB_BITFIELD &= ~(FANCLUB_COUNTER))
|
||||
#define CLEAR_TRAINER_FAN_CLUB_COUNTER (FANCLUB_BITFIELD &= ~FANCLUB_COUNTER)
|
||||
|
||||
void ResetFanClub(void)
|
||||
{
|
||||
|
10
src/intro.c
10
src/intro.c
@ -1195,7 +1195,7 @@ static void Task_Scene1_Load(u8 taskId)
|
||||
CpuCopy16(&gPlttBufferUnfaded[OBJ_PLTT_ID(0)], &gPlttBufferUnfaded[OBJ_PLTT_ID(11) + 4], PLTT_SIZEOF(16 - 4));
|
||||
CpuCopy16(&gPlttBufferUnfaded[OBJ_PLTT_ID(0)], &gPlttBufferUnfaded[OBJ_PLTT_ID(10) + 5], PLTT_SIZEOF(16 - 5));
|
||||
CpuCopy16(&gPlttBufferUnfaded[OBJ_PLTT_ID(0)], &gPlttBufferUnfaded[OBJ_PLTT_ID( 9) + 6], PLTT_SIZEOF(16 - 6));
|
||||
CreateGameFreakLogoSprites(120, 80, 0);
|
||||
CreateGameFreakLogoSprites(DISPLAY_WIDTH / 2, DISPLAY_HEIGHT / 2, 0);
|
||||
gTasks[taskId].sBigDropSpriteId = CreateWaterDrop(236, -14, 0x200, 1, 0x78, FALSE);
|
||||
gTasks[taskId].func = Task_Scene1_FadeIn;
|
||||
}
|
||||
@ -1722,7 +1722,7 @@ static void Task_Scene3_Load(u8 taskId)
|
||||
gTasks[taskId].tZoomDiv = 0;
|
||||
gTasks[taskId].tZoomDivSpeed = 0;
|
||||
gTasks[taskId].data[3] = 0;
|
||||
PanFadeAndZoomScreen(0x78, 0x50, 0, 0);
|
||||
PanFadeAndZoomScreen(DISPLAY_WIDTH / 2, DISPLAY_HEIGHT / 2, 0, 0);
|
||||
ResetSpriteData();
|
||||
FreeAllSpritePalettes();
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, RGB_WHITEALPHA);
|
||||
@ -1746,7 +1746,7 @@ static void Task_Scene3_SpinPokeball(u8 taskId)
|
||||
gTasks[taskId].func = Task_Scene3_WaitGroudon;
|
||||
}
|
||||
|
||||
PanFadeAndZoomScreen(0x78, 0x50, SAFE_DIV(0x10000, gTasks[taskId].tZoomDiv), gTasks[taskId].tAlpha);
|
||||
PanFadeAndZoomScreen(DISPLAY_WIDTH / 2, DISPLAY_HEIGHT / 2, SAFE_DIV(0x10000, gTasks[taskId].tZoomDiv), gTasks[taskId].tAlpha);
|
||||
|
||||
if (gIntroFrameCounter == TIMER_POKEBALL_FADE)
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_WHITEALPHA);
|
||||
@ -1848,7 +1848,7 @@ static void Task_Scene3_StartGroudon(u8 taskId)
|
||||
{
|
||||
gTasks[taskId].tState = 0;
|
||||
gTasks[taskId].func = Task_Scene3_Groudon;
|
||||
ScanlineEffect_InitWave(0, 160, 4, 4, 1, SCANLINE_EFFECT_REG_BG1HOFS, FALSE);
|
||||
ScanlineEffect_InitWave(0, DISPLAY_HEIGHT, 4, 4, 1, SCANLINE_EFFECT_REG_BG1HOFS, FALSE);
|
||||
}
|
||||
|
||||
#define tScreenX data[1]
|
||||
@ -2058,7 +2058,7 @@ static void Task_Scene3_LoadKyogre(u8 taskId)
|
||||
gTasks[taskId].tDelay = 16;
|
||||
gTasks[taskId].tZoom = 256;
|
||||
PanFadeAndZoomScreen(gTasks[taskId].tScreenX, gTasks[taskId].tScreenY, gTasks[taskId].tZoom, 0);
|
||||
ScanlineEffect_InitWave(0, 0xA0, 4, 4, 1, SCANLINE_EFFECT_REG_BG1VOFS, FALSE);
|
||||
ScanlineEffect_InitWave(0, DISPLAY_HEIGHT, 4, 4, 1, SCANLINE_EFFECT_REG_BG1VOFS, FALSE);
|
||||
}
|
||||
|
||||
static void Task_Scene3_Kyogre(u8 taskId)
|
||||
|
@ -139,7 +139,7 @@ u16 rfu_initializeAPI(u32 *APIBuffer, u16 buffByteSize, IntrFunc *sioIntrTable_p
|
||||
u16 buffByteSizeMax;
|
||||
|
||||
// is in EWRAM?
|
||||
if (((uintptr_t)APIBuffer & 0xF000000) == 0x2000000 && copyInterruptToRam)
|
||||
if (((uintptr_t)APIBuffer & 0xF000000) == EWRAM_START && copyInterruptToRam)
|
||||
return ERR_RFU_API_BUFF_ADR;
|
||||
// is not 4-byte aligned?
|
||||
if ((u32)APIBuffer & 3)
|
||||
@ -338,7 +338,7 @@ u16 rfu_getRFUStatus(u8 *rfuState)
|
||||
u16 rfu_MBOOT_CHILD_inheritanceLinkStatus(void)
|
||||
{
|
||||
const char *s1 = str_checkMbootLL;
|
||||
char *s2 = (char *)0x30000F0;
|
||||
char *s2 = (char *)(IWRAM_START + 0xF0);
|
||||
u16 checksum;
|
||||
u16 *mb_buff_iwram_p;
|
||||
u8 i;
|
||||
@ -347,15 +347,15 @@ u16 rfu_MBOOT_CHILD_inheritanceLinkStatus(void)
|
||||
while (*s1 != '\0')
|
||||
if (*s1++ != *s2++)
|
||||
return 1;
|
||||
mb_buff_iwram_p = (u16 *)0x3000000;
|
||||
mb_buff_iwram_p = (u16 *)IWRAM_START;
|
||||
|
||||
// The size of struct RfuLinkStatus is 180
|
||||
checksum = 0;
|
||||
for (i = 0; i < 180/2; ++i)
|
||||
checksum += *mb_buff_iwram_p++;
|
||||
if (checksum != *(u16 *)0x30000FA)
|
||||
if (checksum != *(u16 *)(IWRAM_START + 0xFA))
|
||||
return 1;
|
||||
CpuCopy16((u16 *)0x3000000, gRfuLinkStatus, sizeof(struct RfuLinkStatus));
|
||||
CpuCopy16((u16 *)IWRAM_START, gRfuLinkStatus, sizeof(struct RfuLinkStatus));
|
||||
gRfuStatic->flags |= 0x80; // mboot
|
||||
return 0;
|
||||
}
|
||||
|
@ -1918,7 +1918,8 @@ static void Task_PlayerExchangeUpdate(u8 taskId)
|
||||
for (i = 0; i < RFU_CHILD_MAX; i++)
|
||||
sio->linkPlayerIdx[i] = gRfu.linkPlayerIdx[i];
|
||||
memcpy(sio->linkPlayers, gLinkPlayers, sizeof(gLinkPlayers));
|
||||
if (SendBlock(0, gBlockSendBuffer, 0xa0))
|
||||
// Send SioInfo but exclude the 92 unused bytes at the end
|
||||
if (SendBlock(0, gBlockSendBuffer, offsetof(struct SioInfo, filler)))
|
||||
gTasks[taskId].tState++;
|
||||
break;
|
||||
case 5:
|
||||
|
@ -4,6 +4,7 @@
|
||||
#include "constants/rgb.h"
|
||||
#include "constants/songs.h"
|
||||
#include "constants/trainers.h"
|
||||
#include "data.h"
|
||||
#include "decompress.h"
|
||||
#include "event_data.h"
|
||||
#include "field_effect.h"
|
||||
@ -1900,7 +1901,7 @@ static void AddBirchSpeechObjects(u8 taskId)
|
||||
gSprites[brendanSpriteId].invisible = TRUE;
|
||||
gSprites[brendanSpriteId].oam.priority = 0;
|
||||
gTasks[taskId].tBrendanSpriteId = brendanSpriteId;
|
||||
maySpriteId = CreateTrainerSprite(FacilityClassToPicIndex(FACILITY_CLASS_MAY), 120, 60, 0, &gDecompressionBuffer[0x800]);
|
||||
maySpriteId = CreateTrainerSprite(FacilityClassToPicIndex(FACILITY_CLASS_MAY), 120, 60, 0, &gDecompressionBuffer[TRAINER_PIC_SIZE]);
|
||||
gSprites[maySpriteId].callback = SpriteCB_Null;
|
||||
gSprites[maySpriteId].invisible = TRUE;
|
||||
gSprites[maySpriteId].oam.priority = 0;
|
||||
|
@ -440,7 +440,7 @@ static u8 UpdateNormalPaletteFade(void)
|
||||
else
|
||||
{
|
||||
selectedPalettes = gPaletteFade_selectedPalettes >> 16;
|
||||
paletteOffset = 256;
|
||||
paletteOffset = OBJ_PLTT_OFFSET;
|
||||
}
|
||||
|
||||
while (selectedPalettes)
|
||||
|
@ -3755,7 +3755,7 @@ static void Task_LoadSizeScreen(u8 taskId)
|
||||
|
||||
StringCopy(string, gText_SizeComparedTo);
|
||||
StringAppend(string, gSaveBlock2Ptr->playerName);
|
||||
PrintInfoScreenText(string, GetStringCenterAlignXOffset(FONT_NORMAL, string, 0xF0), 0x79);
|
||||
PrintInfoScreenText(string, GetStringCenterAlignXOffset(FONT_NORMAL, string, DISPLAY_WIDTH), 121);
|
||||
gMain.state++;
|
||||
}
|
||||
break;
|
||||
@ -4072,14 +4072,14 @@ static void Task_ExitCaughtMonPage(u8 taskId)
|
||||
|
||||
static void SpriteCB_SlideCaughtMonToCenter(struct Sprite *sprite)
|
||||
{
|
||||
if (sprite->x < 0x78)
|
||||
if (sprite->x < DISPLAY_WIDTH / 2)
|
||||
sprite->x += 2;
|
||||
if (sprite->x > 0x78)
|
||||
if (sprite->x > DISPLAY_WIDTH / 2)
|
||||
sprite->x -= 2;
|
||||
|
||||
if (sprite->y < 0x50)
|
||||
if (sprite->y < DISPLAY_HEIGHT / 2)
|
||||
sprite->y += 1;
|
||||
if (sprite->y > 0x50)
|
||||
if (sprite->y > DISPLAY_HEIGHT / 2)
|
||||
sprite->y -= 1;
|
||||
}
|
||||
|
||||
@ -4103,7 +4103,7 @@ static void PrintMonInfo(u32 num, u32 value, u32 owned, u32 newEntry)
|
||||
const u8 *description;
|
||||
|
||||
if (newEntry)
|
||||
PrintInfoScreenText(gText_PokedexRegistration, GetStringCenterAlignXOffset(FONT_NORMAL, gText_PokedexRegistration, 0xF0), 0);
|
||||
PrintInfoScreenText(gText_PokedexRegistration, GetStringCenterAlignXOffset(FONT_NORMAL, gText_PokedexRegistration, DISPLAY_WIDTH), 0);
|
||||
if (value == 0)
|
||||
value = NationalToHoennOrder(num);
|
||||
else
|
||||
@ -4142,7 +4142,7 @@ static void PrintMonInfo(u32 num, u32 value, u32 owned, u32 newEntry)
|
||||
description = gPokedexEntries[num].description;
|
||||
else
|
||||
description = sExpandedPlaceholder_PokedexDescription;
|
||||
PrintInfoScreenText(description, GetStringCenterAlignXOffset(FONT_NORMAL, description, 0xF0), 0x5F);
|
||||
PrintInfoScreenText(description, GetStringCenterAlignXOffset(FONT_NORMAL, description, DISPLAY_WIDTH), 95);
|
||||
}
|
||||
|
||||
static void PrintMonHeight(u16 height, u8 left, u8 top)
|
||||
|
@ -1419,7 +1419,7 @@ void CreateRegionMapCursor(u16 tileTag, u16 paletteTag)
|
||||
sRegionMap->cursorSprite->y = 8 * sRegionMap->cursorPosY + 4;
|
||||
}
|
||||
sRegionMap->cursorSprite->data[1] = 2;
|
||||
sRegionMap->cursorSprite->data[2] = (IndexOfSpritePaletteTag(paletteTag) << 4) + 0x101;
|
||||
sRegionMap->cursorSprite->data[2] = OBJ_PLTT_ID(IndexOfSpritePaletteTag(paletteTag)) + 1;
|
||||
sRegionMap->cursorSprite->data[3] = TRUE;
|
||||
}
|
||||
}
|
||||
|
@ -47,6 +47,8 @@
|
||||
#include "constants/songs.h"
|
||||
#include "constants/trainers.h"
|
||||
|
||||
#define TAG_SCROLL_ARROW 5112
|
||||
|
||||
// Values for registryStatus
|
||||
enum {
|
||||
UNREGISTERED,
|
||||
@ -985,7 +987,7 @@ static void FinalizeRegistryMenu(u8 taskId)
|
||||
static void AddRegistryMenuScrollArrows(u8 taskId)
|
||||
{
|
||||
s16 *data = gTasks[taskId].data;
|
||||
tArrowTaskId = AddScrollIndicatorArrowPairParameterized(SCROLL_ARROW_UP, 188, 12, 148, tNumBases - tMaxShownItems, 0x13f8, 0x13f8, &tScrollOffset);
|
||||
tArrowTaskId = AddScrollIndicatorArrowPairParameterized(SCROLL_ARROW_UP, 188, 12, 148, tNumBases - tMaxShownItems, TAG_SCROLL_ARROW, TAG_SCROLL_ARROW, &tScrollOffset);
|
||||
}
|
||||
|
||||
static void HandleRegistryMenuInput(u8 taskId)
|
||||
|
@ -4672,9 +4672,9 @@ static void SpriteCB_DigitalDisplay_Reel(struct Sprite *sprite)
|
||||
{
|
||||
case 0:
|
||||
sprite->x += 4;
|
||||
if (sprite->x >= 0xd0)
|
||||
if (sprite->x >= DISPLAY_WIDTH - 32)
|
||||
{
|
||||
sprite->x = 0xd0;
|
||||
sprite->x = DISPLAY_WIDTH - 32;
|
||||
sprite->sState++;
|
||||
}
|
||||
break;
|
||||
@ -4684,7 +4684,7 @@ static void SpriteCB_DigitalDisplay_Reel(struct Sprite *sprite)
|
||||
break;
|
||||
case 2:
|
||||
sprite->x += 4;
|
||||
if (sprite->x >= 0x110)
|
||||
if (sprite->x >= DISPLAY_WIDTH + 32)
|
||||
sprite->sState++;
|
||||
break;
|
||||
case 3:
|
||||
@ -4700,9 +4700,9 @@ static void SpriteCB_DigitalDisplay_Time(struct Sprite *sprite)
|
||||
{
|
||||
case 0:
|
||||
sprite->x -= 4;
|
||||
if (sprite->x <= 0xd0)
|
||||
if (sprite->x <= DISPLAY_WIDTH - 32)
|
||||
{
|
||||
sprite->x = 0xd0;
|
||||
sprite->x = DISPLAY_WIDTH - 32;
|
||||
sprite->sState++;
|
||||
}
|
||||
break;
|
||||
@ -4712,7 +4712,7 @@ static void SpriteCB_DigitalDisplay_Time(struct Sprite *sprite)
|
||||
break;
|
||||
case 2:
|
||||
sprite->x -= 4;
|
||||
if (sprite->x <= 0x90)
|
||||
if (sprite->x <= 144)
|
||||
sprite->sState++;
|
||||
break;
|
||||
case 3:
|
||||
@ -4738,9 +4738,9 @@ static void SpriteCB_DigitalDisplay_ReelTimeNumber(struct Sprite *sprite)
|
||||
break;
|
||||
case 2:
|
||||
sprite->x += 4;
|
||||
if (sprite->x >= 0xd0)
|
||||
if (sprite->x >= DISPLAY_WIDTH - 32)
|
||||
{
|
||||
sprite->x = 0xd0;
|
||||
sprite->x = DISPLAY_WIDTH - 32;
|
||||
sprite->sState++;
|
||||
}
|
||||
break;
|
||||
@ -4750,7 +4750,7 @@ static void SpriteCB_DigitalDisplay_ReelTimeNumber(struct Sprite *sprite)
|
||||
break;
|
||||
case 4:
|
||||
sprite->x += 4;
|
||||
if (sprite->x >= 0xf8)
|
||||
if (sprite->x >= DISPLAY_WIDTH + 8)
|
||||
sprite->sState++;
|
||||
break;
|
||||
case 5:
|
||||
|
@ -584,7 +584,7 @@ void CB2_InitTitleScreen(void)
|
||||
gMain.state = 4;
|
||||
break;
|
||||
case 4:
|
||||
PanFadeAndZoomScreen(0x78, 0x50, 0x100, 0);
|
||||
PanFadeAndZoomScreen(DISPLAY_WIDTH / 2, DISPLAY_HEIGHT / 2, 0x100, 0);
|
||||
SetGpuReg(REG_OFFSET_BG2X_L, -29 * 256);
|
||||
SetGpuReg(REG_OFFSET_BG2X_H, -1);
|
||||
SetGpuReg(REG_OFFSET_BG2Y_L, -32 * 256);
|
||||
|
@ -118,7 +118,7 @@ const u8 gMiscBlank_Gfx[] = INCBIN_U8("graphics/interface/blank.4bpp");
|
||||
|
||||
u8 CreateInvisibleSpriteWithCallback(void (*callback)(struct Sprite *))
|
||||
{
|
||||
u8 sprite = CreateSprite(&sInvisibleSpriteTemplate, 248, 168, 14);
|
||||
u8 sprite = CreateSprite(&sInvisibleSpriteTemplate, DISPLAY_WIDTH + 8, DISPLAY_HEIGHT + 8, 14);
|
||||
gSprites[sprite].invisible = TRUE;
|
||||
gSprites[sprite].callback = callback;
|
||||
return sprite;
|
||||
|
Loading…
x
Reference in New Issue
Block a user