Merge remote-tracking branch 'upstream/master' into fldeff
This commit is contained in:
+4
-3
@@ -340,9 +340,10 @@ extern const u8 gText_082B7185[];
|
||||
extern const u8 gText_082B71C1[];
|
||||
extern const u8 gText_082B71F9[];
|
||||
|
||||
extern struct Unk030062ECStruct *gUnknown_030062EC;
|
||||
extern struct Unk030062F0Struct *gUnknown_030062F0;
|
||||
extern void (*gUnknown_030062F4)(void);
|
||||
// IWRAM common
|
||||
struct Unk030062ECStruct *gUnknown_030062EC;
|
||||
struct Unk030062F0Struct *gUnknown_030062F0;
|
||||
void (*gUnknown_030062F4)(void);
|
||||
|
||||
// This file's functions.
|
||||
static u16 sub_819FF98(u8 arg0);
|
||||
|
||||
@@ -310,7 +310,7 @@ static bool8 AreStatsRaised(void)
|
||||
u8 buffedStatsValue = 0;
|
||||
s32 i;
|
||||
|
||||
for (i = 0; i < BATTLE_STATS_NO; i++)
|
||||
for (i = 0; i < NUM_BATTLE_STATS; i++)
|
||||
{
|
||||
if (gBattleMons[gActiveBattler].statStages[i] > 6)
|
||||
buffedStatsValue += gBattleMons[gActiveBattler].statStages[i] - 6;
|
||||
|
||||
+3
-11
@@ -20,14 +20,6 @@
|
||||
|
||||
#define ANIM_SPRITE_INDEX_COUNT 8
|
||||
|
||||
extern u16 gBattle_WIN0H;
|
||||
extern u16 gBattle_WIN0V;
|
||||
extern u16 gBattle_WIN1H;
|
||||
extern u16 gBattle_WIN1V;
|
||||
extern u16 gBattle_BG1_X;
|
||||
extern u16 gBattle_BG1_Y;
|
||||
extern u16 gBattle_BG2_X;
|
||||
extern u16 gBattle_BG2_Y;
|
||||
extern struct MusicPlayerInfo gMPlayInfo_BGM;
|
||||
extern struct MusicPlayerInfo gMPlayInfo_SE1;
|
||||
extern struct MusicPlayerInfo gMPlayInfo_SE2;
|
||||
@@ -1502,7 +1494,7 @@ void LaunchBattleAnimation(const u8 *const animsTable[], u16 tableId, bool8 isMo
|
||||
else
|
||||
{
|
||||
for (i = 0; i < 4; i++)
|
||||
gAnimBattlerSpecies[i] = gContestResources->field_18->unk0;
|
||||
gAnimBattlerSpecies[i] = gContestResources->field_18->species;
|
||||
}
|
||||
|
||||
if (!isMoveAnim)
|
||||
@@ -1959,7 +1951,7 @@ void sub_80A438C(u8 battlerId, bool8 toBG_2, bool8 setSpriteInvisible)
|
||||
battlerSpriteId = gBattlerSpriteIds[battlerId];
|
||||
|
||||
gBattle_BG1_X = -(gSprites[battlerSpriteId].pos1.x + gSprites[battlerSpriteId].pos2.x) + 0x20;
|
||||
if (IsContest() && IsSpeciesNotUnown(gContestResources->field_18->unk0))
|
||||
if (IsContest() && IsSpeciesNotUnown(gContestResources->field_18->species))
|
||||
gBattle_BG1_X--;
|
||||
|
||||
gBattle_BG1_Y = -(gSprites[battlerSpriteId].pos1.y + gSprites[battlerSpriteId].pos2.y) + 0x20;
|
||||
@@ -2017,7 +2009,7 @@ static void sub_80A46A0(void)
|
||||
struct UnknownAnimStruct2 unknownStruct;
|
||||
u16 *ptr;
|
||||
|
||||
if (IsSpeciesNotUnown(gContestResources->field_18->unk0))
|
||||
if (IsSpeciesNotUnown(gContestResources->field_18->species))
|
||||
{
|
||||
sub_80A6B30(&unknownStruct);
|
||||
ptr = unknownStruct.unk4;
|
||||
|
||||
+21
-25
@@ -36,9 +36,7 @@ extern const union AffineAnimCmd *gUnknown_082FF6C0[];
|
||||
// This file's functions.
|
||||
void sub_80A64EC(struct Sprite *sprite);
|
||||
void sub_80A653C(struct Sprite *sprite);
|
||||
void InitAnimLinearTranslation(struct Sprite *sprite);
|
||||
void sub_80A6FB4(struct Sprite *sprite);
|
||||
void sub_80A6F98(struct Sprite *sprite);
|
||||
void sub_80A7144(struct Sprite *sprite);
|
||||
void sub_80A791C(struct Sprite *sprite);
|
||||
void sub_80A8DFC(struct Sprite *sprite);
|
||||
@@ -50,8 +48,6 @@ void sub_80A7AFC(u8 taskId);
|
||||
void sub_80A8CAC(u8 taskId);
|
||||
void AnimTask_BlendMonInAndOutStep(u8 taskId);
|
||||
bool8 sub_80A7238(void);
|
||||
void sub_80A8048(s16 *bottom, s16 *top, const void *ptr);
|
||||
void *sub_80A8050(s16 bottom, s16 top);
|
||||
u8 sub_80A82E4(u8 battlerId);
|
||||
void sub_80A8D78(struct Task *task, u8 taskId);
|
||||
|
||||
@@ -159,7 +155,7 @@ u8 GetBattlerSpriteCoord(u8 battlerId, u8 attributeId)
|
||||
if (shared19348.unk4_0)
|
||||
species = shared19348.unk2;
|
||||
else
|
||||
species = shared19348.unk0;
|
||||
species = shared19348.species;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -324,7 +320,7 @@ u8 GetBattlerSpriteCoord2(u8 battlerId, u8 attributeId)
|
||||
if (shared19348.unk4_0)
|
||||
species = shared19348.unk2;
|
||||
else
|
||||
species = shared19348.unk0;
|
||||
species = shared19348.species;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -532,7 +528,7 @@ void sub_80A6450(struct Sprite *sprite)
|
||||
// Simply waits until the sprite's data[0] hits zero.
|
||||
// This is used to let sprite anims or affine anims to run for a designated
|
||||
// duration.
|
||||
void sub_80A64B0(struct Sprite *sprite)
|
||||
void WaitAnimForDuration(struct Sprite *sprite)
|
||||
{
|
||||
if (sprite->data[0] > 0)
|
||||
sprite->data[0]--;
|
||||
@@ -745,7 +741,7 @@ void sub_80A6864(struct Sprite *sprite, s16 a2)
|
||||
}
|
||||
}
|
||||
|
||||
void sub_80A68D4(struct Sprite *sprite)
|
||||
void InitAnimArcTranslation(struct Sprite *sprite)
|
||||
{
|
||||
sprite->data[1] = sprite->pos1.x;
|
||||
sprite->data[3] = sprite->pos1.y;
|
||||
@@ -791,7 +787,7 @@ void sub_80A6980(struct Sprite *sprite, bool8 a2)
|
||||
sprite->pos1.y += gBattleAnimArgs[1];
|
||||
}
|
||||
|
||||
void sub_80A69CC(struct Sprite *sprite, u8 a2)
|
||||
void InitAnimSpritePos(struct Sprite *sprite, u8 a2)
|
||||
{
|
||||
if (!a2)
|
||||
{
|
||||
@@ -940,18 +936,18 @@ void sub_80A6BFC(struct UnknownAnimStruct2 *unk)
|
||||
}
|
||||
}
|
||||
|
||||
void sub_80A6C68(u32 arg0)
|
||||
void sub_80A6C68(u32 bgId)
|
||||
{
|
||||
struct UnknownAnimStruct2 unkStruct;
|
||||
|
||||
sub_80A6B90(&unkStruct, arg0);
|
||||
sub_80A6B90(&unkStruct, bgId);
|
||||
CpuFill32(0, unkStruct.bgTiles, 0x2000);
|
||||
LoadBgTiles(unkStruct.bgId, unkStruct.bgTiles, 0x2000, unkStruct.tilesOffset);
|
||||
FillBgTilemapBufferRect(unkStruct.bgId, 0, 0, 0, 0x20, 0x40, 0x11);
|
||||
CopyBgTilemapBufferToVram(unkStruct.bgId);
|
||||
}
|
||||
|
||||
void sub_80A6CC0(u32 bgId, void *src, u32 tilesOffset)
|
||||
void sub_80A6CC0(u32 bgId, const void *src, u32 tilesOffset)
|
||||
{
|
||||
CpuFill32(0, gUnknown_0202305C, 0x2000);
|
||||
LZDecompressWram(src, gUnknown_0202305C);
|
||||
@@ -1004,12 +1000,12 @@ void sub_80A6DEC(struct Sprite *sprite)
|
||||
{
|
||||
sprite->data[1] = sprite->pos1.x;
|
||||
sprite->data[3] = sprite->pos1.y;
|
||||
sub_80A6E14(sprite);
|
||||
InitSpriteDataForLinearTranslation(sprite);
|
||||
sprite->callback = sub_80A65A8;
|
||||
sprite->callback(sprite);
|
||||
}
|
||||
|
||||
void sub_80A6E14(struct Sprite *sprite)
|
||||
void InitSpriteDataForLinearTranslation(struct Sprite *sprite)
|
||||
{
|
||||
s16 x = (sprite->data[2] - sprite->data[1]) << 8;
|
||||
s16 y = (sprite->data[4] - sprite->data[3]) << 8;
|
||||
@@ -1047,7 +1043,7 @@ void InitAnimLinearTranslation(struct Sprite *sprite)
|
||||
sprite->data[3] = 0;
|
||||
}
|
||||
|
||||
void sub_80A6EEC(struct Sprite *sprite)
|
||||
void StartAnimLinearTranslation(struct Sprite *sprite)
|
||||
{
|
||||
sprite->data[1] = sprite->pos1.x;
|
||||
sprite->data[3] = sprite->pos1.y;
|
||||
@@ -1476,7 +1472,7 @@ void sub_80A77C8(struct Sprite *sprite)
|
||||
else
|
||||
var = FALSE;
|
||||
if (!gBattleAnimArgs[2])
|
||||
sub_80A69CC(sprite, var);
|
||||
InitAnimSpritePos(sprite, var);
|
||||
else
|
||||
sub_80A6980(sprite, var);
|
||||
sprite->data[0]++;
|
||||
@@ -1511,27 +1507,27 @@ void TranslateAnimSpriteToTargetMonLocation(struct Sprite *sprite)
|
||||
else
|
||||
attributeId = BATTLER_COORD_Y;
|
||||
|
||||
sub_80A69CC(sprite, v1);
|
||||
InitAnimSpritePos(sprite, v1);
|
||||
if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER)
|
||||
gBattleAnimArgs[2] = -gBattleAnimArgs[2];
|
||||
|
||||
sprite->data[0] = gBattleAnimArgs[4];
|
||||
sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X_2) + gBattleAnimArgs[2];
|
||||
sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimTarget, attributeId) + gBattleAnimArgs[3];
|
||||
sprite->callback = sub_80A6EEC;
|
||||
sprite->callback = StartAnimLinearTranslation;
|
||||
StoreSpriteCallbackInData6(sprite, DestroyAnimSprite);
|
||||
}
|
||||
|
||||
void sub_80A78AC(struct Sprite *sprite)
|
||||
{
|
||||
sub_80A69CC(sprite, 1);
|
||||
InitAnimSpritePos(sprite, 1);
|
||||
if (GetBattlerSide(gBattleAnimAttacker))
|
||||
gBattleAnimArgs[2] = -gBattleAnimArgs[2];
|
||||
sprite->data[0] = gBattleAnimArgs[4];
|
||||
sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimTarget, 2) + gBattleAnimArgs[2];
|
||||
sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimTarget, 3) + gBattleAnimArgs[3];
|
||||
sprite->data[5] = gBattleAnimArgs[5];
|
||||
sub_80A68D4(sprite);
|
||||
InitAnimArcTranslation(sprite);
|
||||
sprite->callback = sub_80A791C;
|
||||
}
|
||||
|
||||
@@ -1558,7 +1554,7 @@ void sub_80A7938(struct Sprite *sprite)
|
||||
}
|
||||
if (!gBattleAnimArgs[5])
|
||||
{
|
||||
sub_80A69CC(sprite, r4);
|
||||
InitAnimSpritePos(sprite, r4);
|
||||
battlerId = gBattleAnimAttacker;
|
||||
}
|
||||
else
|
||||
@@ -1572,7 +1568,7 @@ void sub_80A7938(struct Sprite *sprite)
|
||||
sprite->data[0] = gBattleAnimArgs[4];
|
||||
sprite->data[2] = GetBattlerSpriteCoord(battlerId, BATTLER_COORD_X_2) + gBattleAnimArgs[2];
|
||||
sprite->data[4] = GetBattlerSpriteCoord(battlerId, attributeId) + gBattleAnimArgs[3];
|
||||
sprite->callback = sub_80A6EEC;
|
||||
sprite->callback = StartAnimLinearTranslation;
|
||||
StoreSpriteCallbackInData6(sprite, DestroyAnimSprite);
|
||||
}
|
||||
|
||||
@@ -1854,7 +1850,7 @@ u16 sub_80A7F18(u8 spriteId)
|
||||
{
|
||||
if (IsContest())
|
||||
{
|
||||
species = shared19348.unk0;
|
||||
species = shared19348.species;
|
||||
return gMonBackPicCoords[species].y_offset;
|
||||
}
|
||||
else
|
||||
@@ -2112,7 +2108,7 @@ s16 sub_80A861C(u8 battlerId, u8 a2)
|
||||
}
|
||||
else
|
||||
{
|
||||
species = shared19348.unk0;
|
||||
species = shared19348.species;
|
||||
personality = shared19348.unk8;
|
||||
}
|
||||
if (species == SPECIES_UNOWN)
|
||||
@@ -2454,6 +2450,6 @@ void sub_80A8EE4(struct Sprite *sprite)
|
||||
sprite->pos1.x += x;
|
||||
sprite->pos1.y = gBattleAnimArgs[5] - 80;
|
||||
}
|
||||
sprite->callback = sub_80A6EEC;
|
||||
sprite->callback = StartAnimLinearTranslation;
|
||||
StoreSpriteCallbackInData6(sprite, DestroyAnimSprite);
|
||||
}
|
||||
|
||||
@@ -17,8 +17,6 @@ extern const u8 *const gBattleAnims_StatusConditions[];
|
||||
extern const struct OamData gUnknown_08524904;
|
||||
extern const struct OamData gUnknown_08524A3C;
|
||||
|
||||
extern void sub_8116EB4(u8 taskId);
|
||||
|
||||
// This file's functions.
|
||||
static void sub_80A9DB4(u8 taskId);
|
||||
static void sub_80A9FD0(u8 taskId);
|
||||
|
||||
@@ -442,7 +442,7 @@ void SlideMonToOriginalPos(struct Sprite *sprite)
|
||||
sprite->data[2] = gSprites[monSpriteId].pos1.x;
|
||||
sprite->data[3] = gSprites[monSpriteId].pos1.y + gSprites[monSpriteId].pos2.y;
|
||||
sprite->data[4] = gSprites[monSpriteId].pos1.y;
|
||||
sub_80A6E14(sprite);
|
||||
InitSpriteDataForLinearTranslation(sprite);
|
||||
sprite->data[3] = 0;
|
||||
sprite->data[4] = 0;
|
||||
sprite->data[5] = gSprites[monSpriteId].pos2.x;
|
||||
@@ -520,7 +520,7 @@ void SlideMonToOffset(struct Sprite *sprite)
|
||||
sprite->data[2] = gSprites[monSpriteId].pos1.x + gBattleAnimArgs[1];
|
||||
sprite->data[3] = gSprites[monSpriteId].pos1.y;
|
||||
sprite->data[4] = gSprites[monSpriteId].pos1.y + gBattleAnimArgs[2];
|
||||
sub_80A6E14(sprite);
|
||||
InitSpriteDataForLinearTranslation(sprite);
|
||||
sprite->data[3] = 0;
|
||||
sprite->data[4] = 0;
|
||||
sprite->data[5] = monSpriteId;
|
||||
@@ -556,7 +556,7 @@ void sub_80D5B48(struct Sprite *sprite)
|
||||
sprite->data[2] = sprite->data[1] + gBattleAnimArgs[1];
|
||||
sprite->data[3] = gSprites[spriteId].pos1.y + gSprites[spriteId].pos2.y;
|
||||
sprite->data[4] = sprite->data[3] + gBattleAnimArgs[2];
|
||||
sub_80A6E14(sprite);
|
||||
InitSpriteDataForLinearTranslation(sprite);
|
||||
sprite->data[3] = gSprites[spriteId].pos2.x << 8;
|
||||
sprite->data[4] = gSprites[spriteId].pos2.y << 8;
|
||||
sprite->data[5] = spriteId;
|
||||
|
||||
@@ -131,7 +131,7 @@ void sub_8158D8C(u8 taskId)
|
||||
if (IsContest())
|
||||
{
|
||||
if (gBattleAnimArgs[0] == ANIM_ATTACKER)
|
||||
species = gContestResources->field_18->unk0;
|
||||
species = gContestResources->field_18->species;
|
||||
else
|
||||
DestroyAnimVisualTask(taskId); // UB: function should return upon destroying task.
|
||||
}
|
||||
@@ -177,7 +177,7 @@ void sub_8158E9C(u8 taskId)
|
||||
if (IsContest())
|
||||
{
|
||||
if (gBattleAnimArgs[0] == ANIM_ATTACKER)
|
||||
species = gContestResources->field_18->unk0;
|
||||
species = gContestResources->field_18->species;
|
||||
else
|
||||
DestroyAnimVisualTask(taskId); // UB: function should return upon destroying task.
|
||||
}
|
||||
@@ -281,7 +281,7 @@ void sub_81590B8(u8 taskId)
|
||||
pan = BattleAnimAdjustPanning(SOUND_PAN_ATTACKER);
|
||||
|
||||
if (IsContest())
|
||||
species = gContestResources->field_18->unk0;
|
||||
species = gContestResources->field_18->species;
|
||||
else
|
||||
species = gAnimBattlerSpecies[gBattleAnimAttacker];
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
+1
-3
@@ -15,6 +15,7 @@
|
||||
#include "palette.h"
|
||||
#include "random.h"
|
||||
#include "sound.h"
|
||||
#include "string_util.h"
|
||||
#include "text.h"
|
||||
#include "util.h"
|
||||
#include "constants/songs.h"
|
||||
@@ -22,9 +23,6 @@
|
||||
#include "constants/battle_frontier.h"
|
||||
#include "constants/moves.h"
|
||||
|
||||
extern u16 gBattle_WIN0H;
|
||||
extern u16 gBattle_WIN0V;
|
||||
|
||||
extern const u32 gUnknown_08D854E8[];
|
||||
extern const u16 gUnknown_08D855E8[];
|
||||
|
||||
|
||||
+11
-16
@@ -31,11 +31,6 @@ struct BattleBackground
|
||||
const void *palette;
|
||||
};
|
||||
|
||||
extern u16 gBattle_BG1_X;
|
||||
extern u16 gBattle_BG1_Y;
|
||||
extern u16 gBattle_BG2_X;
|
||||
extern u16 gBattle_BG2_Y;
|
||||
|
||||
extern u8 GetCurrentMapBattleScene(void);
|
||||
|
||||
// .rodata
|
||||
@@ -162,9 +157,9 @@ const struct BgTemplate gBattleBgTemplates[] =
|
||||
},
|
||||
};
|
||||
|
||||
static const struct WindowTemplate gUnknown_0831AA18[] =
|
||||
static const struct WindowTemplate gStandardBattleWindowTemplates[] =
|
||||
{
|
||||
{
|
||||
{ // 0 Standard battle message
|
||||
.bg = 0,
|
||||
.tilemapLeft = 2,
|
||||
.tilemapTop = 15,
|
||||
@@ -173,7 +168,7 @@ static const struct WindowTemplate gUnknown_0831AA18[] =
|
||||
.paletteNum = 0,
|
||||
.baseBlock = 0x0090,
|
||||
},
|
||||
{
|
||||
{ // 1 "What will (pokemon) do?"
|
||||
.bg = 0,
|
||||
.tilemapLeft = 1,
|
||||
.tilemapTop = 35,
|
||||
@@ -182,7 +177,7 @@ static const struct WindowTemplate gUnknown_0831AA18[] =
|
||||
.paletteNum = 0,
|
||||
.baseBlock = 0x01c0,
|
||||
},
|
||||
{
|
||||
{ // 2 "Fight/Pokemon/Bag/Run"
|
||||
.bg = 0,
|
||||
.tilemapLeft = 17,
|
||||
.tilemapTop = 35,
|
||||
@@ -191,7 +186,7 @@ static const struct WindowTemplate gUnknown_0831AA18[] =
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x0190,
|
||||
},
|
||||
{
|
||||
{ // 3 Top left move
|
||||
.bg = 0,
|
||||
.tilemapLeft = 2,
|
||||
.tilemapTop = 55,
|
||||
@@ -200,7 +195,7 @@ static const struct WindowTemplate gUnknown_0831AA18[] =
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x0300,
|
||||
},
|
||||
{
|
||||
{ // 4 Top right move
|
||||
.bg = 0,
|
||||
.tilemapLeft = 11,
|
||||
.tilemapTop = 55,
|
||||
@@ -209,7 +204,7 @@ static const struct WindowTemplate gUnknown_0831AA18[] =
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x0310,
|
||||
},
|
||||
{
|
||||
{ // 5 Bottom left move
|
||||
.bg = 0,
|
||||
.tilemapLeft = 2,
|
||||
.tilemapTop = 57,
|
||||
@@ -218,7 +213,7 @@ static const struct WindowTemplate gUnknown_0831AA18[] =
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x0320,
|
||||
},
|
||||
{
|
||||
{ // 6 Bottom right move
|
||||
.bg = 0,
|
||||
.tilemapLeft = 11,
|
||||
.tilemapTop = 57,
|
||||
@@ -383,7 +378,7 @@ static const struct WindowTemplate gUnknown_0831AA18[] =
|
||||
DUMMY_WIN_TEMPLATE
|
||||
};
|
||||
|
||||
static const struct WindowTemplate gUnknown_0831AAE0[] =
|
||||
static const struct WindowTemplate gBattleArenaWindowTemplates[] =
|
||||
{
|
||||
{
|
||||
.bg = 0,
|
||||
@@ -597,8 +592,8 @@ static const struct WindowTemplate gUnknown_0831AAE0[] =
|
||||
|
||||
const struct WindowTemplate * const gBattleWindowTemplates[] =
|
||||
{
|
||||
gUnknown_0831AA18,
|
||||
gUnknown_0831AAE0,
|
||||
gStandardBattleWindowTemplates,
|
||||
gBattleArenaWindowTemplates,
|
||||
};
|
||||
|
||||
static const struct BattleBackground gBattleTerrainTable[] =
|
||||
|
||||
@@ -26,8 +26,6 @@
|
||||
#include "constants/songs.h"
|
||||
#include "constants/trainers.h"
|
||||
|
||||
extern u16 gBattle_BG0_X;
|
||||
extern u16 gBattle_BG0_Y;
|
||||
extern struct MusicPlayerInfo gMPlayInfo_BGM;
|
||||
extern struct UnusedControllerStruct gUnknown_02022D0C;
|
||||
|
||||
@@ -558,7 +556,7 @@ static void LinkOpponentHandleGetMonData(void)
|
||||
else
|
||||
{
|
||||
monToCheck = gBattleBufferA[gActiveBattler][2];
|
||||
for (i = 0; i < 6; i++)
|
||||
for (i = 0; i < PARTY_SIZE; i++)
|
||||
{
|
||||
if (monToCheck & 1)
|
||||
size += CopyLinkOpponentMonData(i, monData + size);
|
||||
@@ -892,7 +890,7 @@ static void LinkOpponentHandleSetMonData(void)
|
||||
else
|
||||
{
|
||||
monToCheck = gBattleBufferA[gActiveBattler][2];
|
||||
for (i = 0; i < 6; i++)
|
||||
for (i = 0; i < PARTY_SIZE; i++)
|
||||
{
|
||||
if (monToCheck & 1)
|
||||
SetLinkOpponentMonData(i);
|
||||
@@ -1346,7 +1344,7 @@ static void LinkOpponentHandleTrainerSlideBack(void)
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[0] = 35;
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[2] = 280;
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[4] = gSprites[gBattlerSpriteIds[gActiveBattler]].pos1.y;
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].callback = sub_80A6EEC;
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].callback = StartAnimLinearTranslation;
|
||||
StoreSpriteCallbackInData6(&gSprites[gBattlerSpriteIds[gActiveBattler]], SpriteCallbackDummy);
|
||||
gBattlerControllerFuncs[gActiveBattler] = sub_8064470;
|
||||
}
|
||||
@@ -1708,7 +1706,7 @@ static void LinkOpponentHandleIntroTrainerBallThrow(void)
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[0] = 35;
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[2] = 280;
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[4] = gSprites[gBattlerSpriteIds[gActiveBattler]].pos1.y;
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].callback = sub_80A6EEC;
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].callback = StartAnimLinearTranslation;
|
||||
|
||||
StoreSpriteCallbackInData6(&gSprites[gBattlerSpriteIds[gActiveBattler]], sub_80676FC);
|
||||
|
||||
|
||||
@@ -26,8 +26,6 @@
|
||||
#include "constants/songs.h"
|
||||
#include "constants/trainers.h"
|
||||
|
||||
extern u16 gBattle_BG0_X;
|
||||
extern u16 gBattle_BG0_Y;
|
||||
extern struct UnusedControllerStruct gUnknown_02022D0C;
|
||||
|
||||
extern const struct CompressedSpritePalette gTrainerFrontPicPaletteTable[];
|
||||
@@ -444,7 +442,7 @@ static void LinkPartnerHandleGetMonData(void)
|
||||
else
|
||||
{
|
||||
monToCheck = gBattleBufferA[gActiveBattler][2];
|
||||
for (i = 0; i < 6; i++)
|
||||
for (i = 0; i < PARTY_SIZE; i++)
|
||||
{
|
||||
if (monToCheck & 1)
|
||||
size += CopyLinkPartnerMonData(i, monData + size);
|
||||
@@ -778,7 +776,7 @@ static void LinkPartnerHandleSetMonData(void)
|
||||
else
|
||||
{
|
||||
monToCheck = gBattleBufferA[gActiveBattler][2];
|
||||
for (i = 0; i < 6; i++)
|
||||
for (i = 0; i < PARTY_SIZE; i++)
|
||||
{
|
||||
if (monToCheck & 1)
|
||||
SetLinkPartnerMonData(i);
|
||||
@@ -1168,7 +1166,7 @@ static void LinkPartnerHandleTrainerSlideBack(void)
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[0] = 35;
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[2] = -40;
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[4] = gSprites[gBattlerSpriteIds[gActiveBattler]].pos1.y;
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].callback = sub_80A6EEC;
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].callback = StartAnimLinearTranslation;
|
||||
StoreSpriteCallbackInData6(&gSprites[gBattlerSpriteIds[gActiveBattler]], SpriteCallbackDummy);
|
||||
gBattlerControllerFuncs[gActiveBattler] = sub_814AF54;
|
||||
}
|
||||
@@ -1534,7 +1532,7 @@ static void LinkPartnerHandleIntroTrainerBallThrow(void)
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[0] = 50;
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[2] = -40;
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[4] = gSprites[gBattlerSpriteIds[gActiveBattler]].pos1.y;
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].callback = sub_80A6EEC;
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].callback = StartAnimLinearTranslation;
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[5] = gActiveBattler;
|
||||
|
||||
StoreSpriteCallbackInData6(&gSprites[gBattlerSpriteIds[gActiveBattler]], sub_805CC00);
|
||||
|
||||
@@ -33,8 +33,6 @@
|
||||
#include "constants/songs.h"
|
||||
#include "constants/trainers.h"
|
||||
|
||||
extern u16 gBattle_BG0_X;
|
||||
extern u16 gBattle_BG0_Y;
|
||||
extern struct MusicPlayerInfo gMPlayInfo_BGM;
|
||||
extern struct UnusedControllerStruct gUnknown_02022D0C;
|
||||
|
||||
@@ -541,7 +539,7 @@ static void OpponentHandleGetMonData(void)
|
||||
else
|
||||
{
|
||||
monToCheck = gBattleBufferA[gActiveBattler][2];
|
||||
for (i = 0; i < 6; i++)
|
||||
for (i = 0; i < PARTY_SIZE; i++)
|
||||
{
|
||||
if (monToCheck & 1)
|
||||
size += GetOpponentMonData(i, monData + size);
|
||||
@@ -884,7 +882,7 @@ static void OpponentHandleSetMonData(void)
|
||||
else
|
||||
{
|
||||
monToCheck = gBattleBufferA[gActiveBattler][2];
|
||||
for (i = 0; i < 6; i++)
|
||||
for (i = 0; i < PARTY_SIZE; i++)
|
||||
{
|
||||
if (monToCheck & 1)
|
||||
SetOpponentMonData(i);
|
||||
@@ -1383,7 +1381,7 @@ static void OpponentHandleTrainerSlideBack(void)
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[0] = 35;
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[2] = 280;
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[4] = gSprites[gBattlerSpriteIds[gActiveBattler]].pos1.y;
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].callback = sub_80A6EEC;
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].callback = StartAnimLinearTranslation;
|
||||
StoreSpriteCallbackInData6(&gSprites[gBattlerSpriteIds[gActiveBattler]], SpriteCallbackDummy);
|
||||
gBattlerControllerFuncs[gActiveBattler] = sub_805F240;
|
||||
}
|
||||
@@ -1857,7 +1855,7 @@ static void OpponentHandleIntroTrainerBallThrow(void)
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[0] = 35;
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[2] = 280;
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[4] = gSprites[gBattlerSpriteIds[gActiveBattler]].pos1.y;
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].callback = sub_80A6EEC;
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].callback = StartAnimLinearTranslation;
|
||||
|
||||
StoreSpriteCallbackInData6(&gSprites[gBattlerSpriteIds[gActiveBattler]], sub_806280C);
|
||||
|
||||
|
||||
@@ -37,8 +37,6 @@
|
||||
extern u8 gUnknown_0203CEE8;
|
||||
extern u8 gUnknown_0203CEE9;
|
||||
extern u8 gUnknown_0203CF00[];
|
||||
extern u16 gBattle_BG0_X;
|
||||
extern u16 gBattle_BG0_Y;
|
||||
extern struct UnusedControllerStruct gUnknown_02022D0C;
|
||||
extern struct MusicPlayerInfo gMPlayInfo_BGM;
|
||||
|
||||
@@ -116,7 +114,7 @@ static void MoveSelectionDisplayPpNumber(void);
|
||||
static void MoveSelectionDisplayPpString(void);
|
||||
static void MoveSelectionDisplayMoveType(void);
|
||||
static void MoveSelectionDisplayMoveNames(void);
|
||||
static void HandleMoveSwitchting(void);
|
||||
static void HandleMoveSwitching(void);
|
||||
static void sub_8058FC0(void);
|
||||
static void WaitForMonSelection(void);
|
||||
static void CompleteWhenChoseItem(void);
|
||||
@@ -619,7 +617,7 @@ static void HandleInputChooseMove(void)
|
||||
|
||||
MoveSelectionCreateCursorAt(gMultiUsePlayerCursor, 27);
|
||||
BattlePutTextOnWindow(gText_BattleSwitchWhich, 0xB);
|
||||
gBattlerControllerFuncs[gActiveBattler] = HandleMoveSwitchting;
|
||||
gBattlerControllerFuncs[gActiveBattler] = HandleMoveSwitching;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -674,7 +672,7 @@ u32 sub_8057FBC(void) // unused
|
||||
return var;
|
||||
}
|
||||
|
||||
static void HandleMoveSwitchting(void)
|
||||
static void HandleMoveSwitching(void)
|
||||
{
|
||||
u8 perMovePPBonuses[4];
|
||||
struct ChooseMoveStruct moveStruct;
|
||||
@@ -1589,7 +1587,7 @@ static void PlayerHandleGetMonData(void)
|
||||
else
|
||||
{
|
||||
monToCheck = gBattleBufferA[gActiveBattler][2];
|
||||
for (i = 0; i < 6; i++)
|
||||
for (i = 0; i < PARTY_SIZE; i++)
|
||||
{
|
||||
if (monToCheck & 1)
|
||||
size += CopyPlayerMonData(i, monData + size);
|
||||
@@ -1932,7 +1930,7 @@ static void PlayerHandleSetMonData(void)
|
||||
else
|
||||
{
|
||||
monToCheck = gBattleBufferA[gActiveBattler][2];
|
||||
for (i = 0; i < 6; i++)
|
||||
for (i = 0; i < PARTY_SIZE; i++)
|
||||
{
|
||||
if (monToCheck & 1)
|
||||
SetPlayerMonData(i);
|
||||
@@ -2387,7 +2385,7 @@ static void PlayerHandleTrainerSlideBack(void)
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[0] = 50;
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[2] = -40;
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[4] = gSprites[gBattlerSpriteIds[gActiveBattler]].pos1.y;
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].callback = sub_80A6EEC;
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].callback = StartAnimLinearTranslation;
|
||||
StoreSpriteCallbackInData6(&gSprites[gBattlerSpriteIds[gActiveBattler]], SpriteCallbackDummy);
|
||||
StartSpriteAnim(&gSprites[gBattlerSpriteIds[gActiveBattler]], 1);
|
||||
gBattlerControllerFuncs[gActiveBattler] = sub_80588B4;
|
||||
@@ -2932,7 +2930,7 @@ static void PlayerHandleIntroTrainerBallThrow(void)
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[0] = 50;
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[2] = -40;
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[4] = gSprites[gBattlerSpriteIds[gActiveBattler]].pos1.y;
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].callback = sub_80A6EEC;
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].callback = StartAnimLinearTranslation;
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[5] = gActiveBattler;
|
||||
|
||||
StoreSpriteCallbackInData6(&gSprites[gBattlerSpriteIds[gActiveBattler]], sub_805CC00);
|
||||
|
||||
@@ -26,8 +26,6 @@
|
||||
#include "constants/songs.h"
|
||||
#include "constants/trainers.h"
|
||||
|
||||
extern u16 gBattle_BG0_X;
|
||||
extern u16 gBattle_BG0_Y;
|
||||
extern struct UnusedControllerStruct gUnknown_02022D0C;
|
||||
|
||||
extern const struct CompressedSpritePalette gTrainerFrontPicPaletteTable[];
|
||||
@@ -632,7 +630,7 @@ static void PlayerPartnerHandleGetMonData(void)
|
||||
else
|
||||
{
|
||||
monToCheck = gBattleBufferA[gActiveBattler][2];
|
||||
for (i = 0; i < 6; i++)
|
||||
for (i = 0; i < PARTY_SIZE; i++)
|
||||
{
|
||||
if (monToCheck & 1)
|
||||
size += CopyPlayerPartnerMonData(i, monData + size);
|
||||
@@ -966,7 +964,7 @@ static void PlayerPartnerHandleSetMonData(void)
|
||||
else
|
||||
{
|
||||
monToCheck = gBattleBufferA[gActiveBattler][2];
|
||||
for (i = 0; i < 6; i++)
|
||||
for (i = 0; i < PARTY_SIZE; i++)
|
||||
{
|
||||
if (monToCheck & 1)
|
||||
SetPlayerPartnerMonData(i);
|
||||
@@ -1363,7 +1361,7 @@ static void PlayerPartnerHandleTrainerSlideBack(void)
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[0] = 35;
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[2] = -40;
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[4] = gSprites[gBattlerSpriteIds[gActiveBattler]].pos1.y;
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].callback = sub_80A6EEC;
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].callback = StartAnimLinearTranslation;
|
||||
StoreSpriteCallbackInData6(&gSprites[gBattlerSpriteIds[gActiveBattler]], SpriteCallbackDummy);
|
||||
gBattlerControllerFuncs[gActiveBattler] = sub_81BAE98;
|
||||
}
|
||||
@@ -1787,7 +1785,7 @@ static void PlayerPartnerHandleIntroTrainerBallThrow(void)
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[0] = 50;
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[2] = -40;
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[4] = gSprites[gBattlerSpriteIds[gActiveBattler]].pos1.y;
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].callback = sub_80A6EEC;
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].callback = StartAnimLinearTranslation;
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[5] = gActiveBattler;
|
||||
|
||||
StoreSpriteCallbackInData6(&gSprites[gBattlerSpriteIds[gActiveBattler]], sub_805CC00);
|
||||
|
||||
@@ -28,8 +28,6 @@
|
||||
#include "constants/songs.h"
|
||||
#include "constants/trainers.h"
|
||||
|
||||
extern u16 gBattle_BG0_X;
|
||||
extern u16 gBattle_BG0_Y;
|
||||
extern struct MusicPlayerInfo gMPlayInfo_BGM;
|
||||
extern struct UnusedControllerStruct gUnknown_02022D0C;
|
||||
extern u8 gUnknown_0203C7B4;
|
||||
@@ -542,7 +540,7 @@ static void RecordedOpponentHandleGetMonData(void)
|
||||
else
|
||||
{
|
||||
monToCheck = gBattleBufferA[gActiveBattler][2];
|
||||
for (i = 0; i < 6; i++)
|
||||
for (i = 0; i < PARTY_SIZE; i++)
|
||||
{
|
||||
if (monToCheck & 1)
|
||||
size += CopyRecordedOpponentMonData(i, monData + size);
|
||||
@@ -876,7 +874,7 @@ static void RecordedOpponentHandleSetMonData(void)
|
||||
else
|
||||
{
|
||||
monToCheck = gBattleBufferA[gActiveBattler][2];
|
||||
for (i = 0; i < 6; i++)
|
||||
for (i = 0; i < PARTY_SIZE; i++)
|
||||
{
|
||||
if (monToCheck & 1)
|
||||
SetRecordedOpponentMonData(i);
|
||||
@@ -1277,7 +1275,7 @@ static void RecordedOpponentHandleTrainerSlideBack(void)
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[0] = 35;
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[2] = 280;
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[4] = gSprites[gBattlerSpriteIds[gActiveBattler]].pos1.y;
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].callback = sub_80A6EEC;
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].callback = StartAnimLinearTranslation;
|
||||
StoreSpriteCallbackInData6(&gSprites[gBattlerSpriteIds[gActiveBattler]], SpriteCallbackDummy);
|
||||
gBattlerControllerFuncs[gActiveBattler] = sub_81865C8;
|
||||
}
|
||||
@@ -1651,7 +1649,7 @@ static void RecordedOpponentHandleIntroTrainerBallThrow(void)
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[0] = 35;
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[2] = 280;
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[4] = gSprites[gBattlerSpriteIds[gActiveBattler]].pos1.y;
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].callback = sub_80A6EEC;
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].callback = StartAnimLinearTranslation;
|
||||
|
||||
StoreSpriteCallbackInData6(&gSprites[gBattlerSpriteIds[gActiveBattler]], sub_818962C);
|
||||
|
||||
|
||||
@@ -25,8 +25,6 @@
|
||||
#include "constants/battle_anim.h"
|
||||
#include "constants/songs.h"
|
||||
|
||||
extern u16 gBattle_BG0_X;
|
||||
extern u16 gBattle_BG0_Y;
|
||||
extern u32 gTransformedPersonalities[MAX_BATTLERS_COUNT];
|
||||
extern u8 gUnknown_0203C7B4;
|
||||
extern struct MusicPlayerInfo gMPlayInfo_BGM;
|
||||
@@ -527,7 +525,7 @@ static void RecordedPlayerHandleGetMonData(void)
|
||||
else
|
||||
{
|
||||
monToCheck = gBattleBufferA[gActiveBattler][2];
|
||||
for (i = 0; i < 6; i++)
|
||||
for (i = 0; i < PARTY_SIZE; i++)
|
||||
{
|
||||
if (monToCheck & 1)
|
||||
size += CopyRecordedPlayerMonData(i, monData + size);
|
||||
@@ -861,7 +859,7 @@ static void RecordedPlayerHandleSetMonData(void)
|
||||
else
|
||||
{
|
||||
monToCheck = gBattleBufferA[gActiveBattler][2];
|
||||
for (i = 0; i < 6; i++)
|
||||
for (i = 0; i < PARTY_SIZE; i++)
|
||||
{
|
||||
if (monToCheck & 1)
|
||||
SetRecordedPlayerMonData(i);
|
||||
@@ -1278,7 +1276,7 @@ static void RecordedPlayerHandleTrainerSlideBack(void)
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[0] = 35;
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[2] = -40;
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[4] = gSprites[gBattlerSpriteIds[gActiveBattler]].pos1.y;
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].callback = sub_80A6EEC;
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].callback = StartAnimLinearTranslation;
|
||||
StoreSpriteCallbackInData6(&gSprites[gBattlerSpriteIds[gActiveBattler]], SpriteCallbackDummy);
|
||||
gBattlerControllerFuncs[gActiveBattler] = sub_81899F0;
|
||||
}
|
||||
@@ -1673,7 +1671,7 @@ static void RecordedPlayerHandleIntroTrainerBallThrow(void)
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[0] = 50;
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[2] = -40;
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[4] = gSprites[gBattlerSpriteIds[gActiveBattler]].pos1.y;
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].callback = sub_80A6EEC;
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].callback = StartAnimLinearTranslation;
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[5] = gActiveBattler;
|
||||
|
||||
StoreSpriteCallbackInData6(&gSprites[gBattlerSpriteIds[gActiveBattler]], sub_805CC00);
|
||||
|
||||
@@ -23,9 +23,6 @@
|
||||
#include "constants/battle_anim.h"
|
||||
#include "constants/songs.h"
|
||||
|
||||
extern u16 gBattle_BG0_X;
|
||||
extern u16 gBattle_BG0_Y;
|
||||
|
||||
extern const struct CompressedSpritePalette gTrainerBackPicPaletteTable[];
|
||||
|
||||
extern void sub_81358F4(void);
|
||||
|
||||
@@ -31,8 +31,6 @@
|
||||
#include "constants/songs.h"
|
||||
#include "constants/trainers.h"
|
||||
|
||||
extern u16 gBattle_BG0_X;
|
||||
extern u16 gBattle_BG0_Y;
|
||||
extern s32 gUnknown_0203CD70;
|
||||
extern struct UnusedControllerStruct gUnknown_02022D0C;
|
||||
|
||||
@@ -442,7 +440,7 @@ static void WallyHandleGetMonData(void)
|
||||
else
|
||||
{
|
||||
monToCheck = gBattleBufferA[gActiveBattler][2];
|
||||
for (i = 0; i < 6; i++)
|
||||
for (i = 0; i < PARTY_SIZE; i++)
|
||||
{
|
||||
if (monToCheck & 1)
|
||||
size += CopyWallyMonData(i, monData + size);
|
||||
@@ -776,7 +774,7 @@ static void WallyHandleSetMonData(void)
|
||||
else
|
||||
{
|
||||
monToCheck = gBattleBufferA[gActiveBattler][2];
|
||||
for (i = 0; i < 6; i++)
|
||||
for (i = 0; i < PARTY_SIZE; i++)
|
||||
{
|
||||
if (monToCheck & 1)
|
||||
SetWallyMonData(i);
|
||||
@@ -1437,7 +1435,7 @@ static void WallyHandleIntroTrainerBallThrow(void)
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[0] = 50;
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[2] = -40;
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[4] = gSprites[gBattlerSpriteIds[gActiveBattler]].pos1.y;
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].callback = sub_80A6EEC;
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].callback = StartAnimLinearTranslation;
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[5] = gActiveBattler;
|
||||
|
||||
StoreSpriteCallbackInData6(&gSprites[gBattlerSpriteIds[gActiveBattler]], sub_805CC00);
|
||||
|
||||
+13
-21
@@ -63,17 +63,9 @@ extern u8 GetFrontierBrainMonNature(u8);
|
||||
extern void sub_81A4C30(void);
|
||||
extern u8 sub_81A3610(void);
|
||||
extern u16 GetFrontierBrainMonSpecies(u8);
|
||||
extern void ReducePlayerPartyToThree(void);
|
||||
extern void ReducePlayerPartyToSelectedMons(void);
|
||||
|
||||
extern u8 gUnknown_0203CEF8[];
|
||||
extern u16 gBattle_BG0_X;
|
||||
extern u16 gBattle_BG0_Y;
|
||||
extern u16 gBattle_BG1_X;
|
||||
extern u16 gBattle_BG1_Y;
|
||||
extern u16 gBattle_BG2_X;
|
||||
extern u16 gBattle_BG2_Y;
|
||||
extern u16 gBattle_BG3_X;
|
||||
extern u16 gBattle_BG3_Y;
|
||||
extern u8 gSelectedOrderFromParty[];
|
||||
|
||||
extern const u16 gBattleFrontierHeldItems[];
|
||||
extern const struct FacilityMon gBattleFrontierMons[];
|
||||
@@ -2473,8 +2465,8 @@ static void sub_818EA84(void)
|
||||
break;
|
||||
case 8:
|
||||
sub_81B8558();
|
||||
gUnknown_0203CEF8[0] = gSaveBlock2Ptr->frontier.field_CB0;
|
||||
gUnknown_0203CEF8[1] = gSaveBlock2Ptr->frontier.field_CB0 >> 8;
|
||||
gSelectedOrderFromParty[0] = gSaveBlock2Ptr->frontier.field_CB0;
|
||||
gSelectedOrderFromParty[1] = gSaveBlock2Ptr->frontier.field_CB0 >> 8;
|
||||
break;
|
||||
case 9:
|
||||
gSpecialVar_Result = (gSaveBlock2Ptr->frontier.field_D0A * 2) - 3 + gSaveBlock2Ptr->frontier.field_D0B;
|
||||
@@ -2543,7 +2535,7 @@ static void sub_818ED28(void)
|
||||
}
|
||||
break;
|
||||
case 8:
|
||||
gSaveBlock2Ptr->frontier.field_CB0 = T1_READ_16(gUnknown_0203CEF8);
|
||||
gSaveBlock2Ptr->frontier.field_CB0 = T1_READ_16(gSelectedOrderFromParty);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -2756,17 +2748,17 @@ static void CalcDomeMonStats(u16 species, s32 level, s32 ivs, u8 evBits, u8 natu
|
||||
s32 i, count;
|
||||
u8 bits;
|
||||
u16 resultingEvs;
|
||||
s32 evs[6];
|
||||
s32 evs[NUM_STATS];
|
||||
|
||||
count = 0, bits = evBits;
|
||||
for (i = 0; i < 6; bits >>= 1, i++)
|
||||
for (i = 0; i < NUM_STATS; bits >>= 1, i++)
|
||||
{
|
||||
if (bits & 1)
|
||||
count++;
|
||||
}
|
||||
|
||||
resultingEvs = MAX_TOTAL_EVS / count;
|
||||
for (i = 0; i < 6; bits <<= 1, i++)
|
||||
for (i = 0; i < NUM_STATS; bits <<= 1, i++)
|
||||
{
|
||||
evs[i] = 0;
|
||||
if (evBits & bits)
|
||||
@@ -4953,7 +4945,7 @@ static void DisplayTrainerInfoOnCard(u8 flags, u8 trainerTournamentId)
|
||||
for (i = 0; i < 3; i++)
|
||||
{
|
||||
s32 evBits = gFacilityTrainerMons[gSaveBlock2Ptr->frontier.domeMonIds[trainerTournamentId][i]].evSpread;
|
||||
for (k = 0, j = 0; j < 6; j++)
|
||||
for (k = 0, j = 0; j < NUM_STATS; j++)
|
||||
{
|
||||
allocatedArray[j] = 0;
|
||||
if (evBits & 1)
|
||||
@@ -4962,7 +4954,7 @@ static void DisplayTrainerInfoOnCard(u8 flags, u8 trainerTournamentId)
|
||||
}
|
||||
k = MAX_TOTAL_EVS / k;
|
||||
evBits = gFacilityTrainerMons[gSaveBlock2Ptr->frontier.domeMonIds[trainerTournamentId][i]].evSpread;
|
||||
for (j = 0; j < 6; j++)
|
||||
for (j = 0; j < NUM_STATS; j++)
|
||||
{
|
||||
if (evBits & 1)
|
||||
allocatedArray[j] = k;
|
||||
@@ -6078,7 +6070,7 @@ static void sub_8194D68(void)
|
||||
|
||||
for (i = 0; i < 2; i++)
|
||||
{
|
||||
s32 playerMonId = gSaveBlock2Ptr->frontier.selectedPartyMons[gUnknown_0203CEF8[i] - 1] - 1;
|
||||
s32 playerMonId = gSaveBlock2Ptr->frontier.selectedPartyMons[gSelectedOrderFromParty[i] - 1] - 1;
|
||||
s32 count;
|
||||
|
||||
for (moveSlot = 0; moveSlot < 4; moveSlot++)
|
||||
@@ -6104,7 +6096,7 @@ static void sub_8194E44(void)
|
||||
|
||||
for (i = 0; i < 2; i++)
|
||||
{
|
||||
s32 playerMonId = gSaveBlock2Ptr->frontier.selectedPartyMons[gUnknown_0203CEF8[i] - 1] - 1;
|
||||
s32 playerMonId = gSaveBlock2Ptr->frontier.selectedPartyMons[gSelectedOrderFromParty[i] - 1] - 1;
|
||||
u16 item = GetMonData(&gSaveBlock1Ptr->playerParty[playerMonId], MON_DATA_HELD_ITEM, NULL);
|
||||
SetMonData(&gPlayerParty[i], MON_DATA_HELD_ITEM, &item);
|
||||
}
|
||||
@@ -6112,7 +6104,7 @@ static void sub_8194E44(void)
|
||||
|
||||
static void sub_8194EB4(void)
|
||||
{
|
||||
ReducePlayerPartyToThree();
|
||||
ReducePlayerPartyToSelectedMons();
|
||||
}
|
||||
|
||||
static void sub_8194EC0(void)
|
||||
|
||||
@@ -13,8 +13,6 @@
|
||||
#include "constants/trainers.h"
|
||||
#include "constants/moves.h"
|
||||
|
||||
extern u16 gUnknown_03006298[];
|
||||
|
||||
extern const struct FacilityMon gBattleFrontierMons[];
|
||||
extern const struct FacilityMon gSlateportBattleTentMons[];
|
||||
extern const struct BattleFrontierTrainer gBattleFrontierTrainers[];
|
||||
|
||||
@@ -131,7 +131,6 @@ struct FactorySwapMonsStruct
|
||||
bool8 unk30;
|
||||
};
|
||||
|
||||
extern u8 (*gUnknown_030062E8)(void);
|
||||
extern u8 gUnknown_0203CF20;
|
||||
|
||||
extern const u16 gBattleFrontierHeldItems[];
|
||||
@@ -237,6 +236,9 @@ static IWRAM_DATA struct FactorySelectMonsStruct *sFactorySelectScreen;
|
||||
static IWRAM_DATA void (*sSwap_CurrentTableFunc)(u8 taskId);
|
||||
static IWRAM_DATA struct FactorySwapMonsStruct *sFactorySwapScreen;
|
||||
|
||||
// IWRAM common
|
||||
u8 (*gUnknown_030062E8)(void);
|
||||
|
||||
// Const rom data.
|
||||
static const u16 gUnknown_0860F13C[] = INCBIN_U16("graphics/unknown/unknown_60F13C.gbapal");
|
||||
static const u16 gUnknown_0860F15C[] = INCBIN_U16("graphics/unknown/unknown_60F15C.gbapal");
|
||||
|
||||
+51
-51
@@ -168,15 +168,15 @@ extern const u8 gText_DynColor1Female[];
|
||||
// this file's functions
|
||||
|
||||
static const u8 *GetHealthboxElementGfxPtr(u8 elementId);
|
||||
static u8* AddTextPrinterAndCreateWindowOnHealthbox(const u8 *str, u32 x, u32 y, u32 arg3, u32 *windowId);
|
||||
static u8* AddTextPrinterAndCreateWindowOnHealthbox(const u8 *str, u32 x, u32 y, u32 bgColor, u32 *windowId);
|
||||
|
||||
static void RemoveWindowOnHealthbox(u32 windowId);
|
||||
static void UpdateHpTextInHealthboxInDoubles(u8 healthboxSpriteId, s16 value, u8 maxOrCurrent);
|
||||
static void UpdateStatusIconInHealthbox(u8 healthboxSpriteId);
|
||||
|
||||
static void TextIntoHealthboxObject(void *dest, u8 *windowTileData, s32 arg2);
|
||||
static void SafariTextIntoHealthboxObject(void *dest, u8 *windowTileData, u32 arg2);
|
||||
static void HpTextIntoHealthboxObject(void *dest, u8 *windowTileData, u32 arg2);
|
||||
static void TextIntoHealthboxObject(void *dest, u8 *windowTileData, s32 windowWidth);
|
||||
static void SafariTextIntoHealthboxObject(void *dest, u8 *windowTileData, u32 windowWidth);
|
||||
static void HpTextIntoHealthboxObject(void *dest, u8 *windowTileData, u32 windowWidth);
|
||||
static void FillHealthboxObject(void *dest, u32 arg1, u32 arg2);
|
||||
|
||||
static void sub_8073E08(u8 taskId);
|
||||
@@ -965,7 +965,7 @@ u8 CreateBattlerHealthboxSprites(u8 battlerId)
|
||||
healthBarSpritePtr->subspriteMode = 2;
|
||||
healthBarSpritePtr->oam.priority = 1;
|
||||
|
||||
CpuCopy32(GetHealthboxElementGfxPtr(HEALTHBOX_GFX_1), (void*)(OBJ_VRAM0 + healthBarSpritePtr->oam.tileNum * 32), 64);
|
||||
CpuCopy32(GetHealthboxElementGfxPtr(HEALTHBOX_GFX_1), (void*)(OBJ_VRAM0 + healthBarSpritePtr->oam.tileNum * TILE_SIZE_4BPP), 64);
|
||||
|
||||
gSprites[healthboxLeftSpriteId].hMain_HealthBarSpriteId = healthbarSpriteId;
|
||||
gSprites[healthboxLeftSpriteId].hMain_Battler = battlerId;
|
||||
@@ -1154,7 +1154,7 @@ static void UpdateLvlInHealthbox(u8 healthboxSpriteId, u8 lvl)
|
||||
xPos += var1;
|
||||
|
||||
windowTileData = AddTextPrinterAndCreateWindowOnHealthbox(text, xPos, 3, 2, &windowId);
|
||||
spriteTileNum = gSprites[healthboxSpriteId].oam.tileNum * 32;
|
||||
spriteTileNum = gSprites[healthboxSpriteId].oam.tileNum * TILE_SIZE_4BPP;
|
||||
|
||||
if (GetBattlerSide(gSprites[healthboxSpriteId].hMain_Battler) == B_SIDE_PLAYER)
|
||||
{
|
||||
@@ -1182,7 +1182,7 @@ void UpdateHpTextInHealthbox(u8 healthboxSpriteId, s16 value, u8 maxOrCurrent)
|
||||
|
||||
if (GetBattlerSide(gSprites[healthboxSpriteId].hMain_Battler) == B_SIDE_PLAYER && !IsDoubleBattle())
|
||||
{
|
||||
spriteTileNum = gSprites[healthboxSpriteId].oam.tileNum * 32;
|
||||
spriteTileNum = gSprites[healthboxSpriteId].oam.tileNum * TILE_SIZE_4BPP;
|
||||
if (maxOrCurrent != HP_CURRENT) // singles, max
|
||||
{
|
||||
ConvertIntToDecimalStringN(text, value, STR_CONV_MODE_RIGHT_ALIGN, 3);
|
||||
@@ -1243,7 +1243,7 @@ void UpdateHpTextInHealthbox(u8 healthboxSpriteId, s16 value, u8 maxOrCurrent)
|
||||
for (i = 0; i < 3; i++)
|
||||
{
|
||||
CpuCopy32(&gMonSpritesGfxPtr->barFontGfx[i * 64 + 32],
|
||||
(void*)((OBJ_VRAM0) + 32 * (gSprites[healthboxSpriteId].oam.tileNum + var + i)),
|
||||
(void*)((OBJ_VRAM0) + TILE_SIZE_4BPP * (gSprites[healthboxSpriteId].oam.tileNum + var + i)),
|
||||
0x20);
|
||||
}
|
||||
}
|
||||
@@ -1261,7 +1261,7 @@ static void UpdateHpTextInHealthboxInDoubles(u8 healthboxSpriteId, s16 value, u8
|
||||
{
|
||||
if (gBattleSpritesDataPtr->battlerData[gSprites[healthboxSpriteId].data[6]].hpNumbersNoBars) // don't print text if only bars are visible
|
||||
{
|
||||
spriteTileNum = gSprites[gSprites[healthboxSpriteId].data[5]].oam.tileNum * 32;
|
||||
spriteTileNum = gSprites[gSprites[healthboxSpriteId].data[5]].oam.tileNum * TILE_SIZE_4BPP;
|
||||
objVram = (void*)(OBJ_VRAM0) + spriteTileNum;
|
||||
|
||||
if (maxOrCurrent != HP_CURRENT) // doubles, max hp
|
||||
@@ -1271,7 +1271,7 @@ static void UpdateHpTextInHealthboxInDoubles(u8 healthboxSpriteId, s16 value, u8
|
||||
HpTextIntoHealthboxObject((void*)(OBJ_VRAM0) + spriteTileNum + 0xC0, windowTileData, 2);
|
||||
RemoveWindowOnHealthbox(windowId);
|
||||
CpuCopy32(GetHealthboxElementGfxPtr(HEALTHBOX_GFX_116),
|
||||
(void*)(OBJ_VRAM0 + 0x680) + (gSprites[healthboxSpriteId].oam.tileNum * 32),
|
||||
(void*)(OBJ_VRAM0 + 0x680) + (gSprites[healthboxSpriteId].oam.tileNum * TILE_SIZE_4BPP),
|
||||
0x20);
|
||||
}
|
||||
else
|
||||
@@ -1328,16 +1328,16 @@ static void UpdateHpTextInHealthboxInDoubles(u8 healthboxSpriteId, s16 value, u8
|
||||
if (maxOrCurrent == HP_CURRENT)
|
||||
{
|
||||
CpuCopy32(&gMonSpritesGfxPtr->barFontGfx[224],
|
||||
(void*)((OBJ_VRAM0) + ((gSprites[r7].oam.tileNum + 4) * 32)),
|
||||
(void*)((OBJ_VRAM0) + ((gSprites[r7].oam.tileNum + 4) * TILE_SIZE_4BPP)),
|
||||
0x20);
|
||||
CpuFill32(0, (void*)((OBJ_VRAM0) + (gSprites[r7].oam.tileNum * 32)), 0x20);
|
||||
CpuFill32(0, (void*)((OBJ_VRAM0) + (gSprites[r7].oam.tileNum * TILE_SIZE_4BPP)), 0x20);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (GetBattlerSide(battlerId) == B_SIDE_PLAYER) // Impossible to reach part, because the battlerId is from the opponent's side.
|
||||
{
|
||||
CpuCopy32(GetHealthboxElementGfxPtr(HEALTHBOX_GFX_116),
|
||||
(void*)(OBJ_VRAM0) + ((gSprites[healthboxSpriteId].oam.tileNum + 52) * 32),
|
||||
(void*)(OBJ_VRAM0) + ((gSprites[healthboxSpriteId].oam.tileNum + 52) * TILE_SIZE_4BPP),
|
||||
0x20);
|
||||
}
|
||||
}
|
||||
@@ -1349,7 +1349,7 @@ static void UpdateHpTextInHealthboxInDoubles(u8 healthboxSpriteId, s16 value, u8
|
||||
static void PrintSafariMonInfo(u8 healthboxSpriteId, struct Pokemon *mon)
|
||||
{
|
||||
u8 text[20];
|
||||
s32 j, var2;
|
||||
s32 j, spriteTileNum;
|
||||
u8 *barFontGfx;
|
||||
u8 i, var, nature, healthBarSpriteId;
|
||||
|
||||
@@ -1376,12 +1376,12 @@ static void PrintSafariMonInfo(u8 healthboxSpriteId, struct Pokemon *mon)
|
||||
|
||||
for (j = 1; j < var + 1; j++)
|
||||
{
|
||||
var2 = (gSprites[healthboxSpriteId].oam.tileNum + (j - (j / 8 * 8)) + (j / 8 * 64)) * 32;
|
||||
CpuCopy32(barFontGfx, (void*)(OBJ_VRAM0) + (var2), 0x20);
|
||||
spriteTileNum = (gSprites[healthboxSpriteId].oam.tileNum + (j - (j / 8 * 8)) + (j / 8 * 64)) * TILE_SIZE_4BPP;
|
||||
CpuCopy32(barFontGfx, (void*)(OBJ_VRAM0) + (spriteTileNum), 0x20);
|
||||
barFontGfx += 0x20;
|
||||
|
||||
var2 = (8 + gSprites[healthboxSpriteId].oam.tileNum + (j - (j / 8 * 8)) + (j / 8 * 64)) * 32;
|
||||
CpuCopy32(barFontGfx, (void*)(OBJ_VRAM0) + (var2), 0x20);
|
||||
spriteTileNum = (8 + gSprites[healthboxSpriteId].oam.tileNum + (j - (j / 8 * 8)) + (j / 8 * 64)) * TILE_SIZE_4BPP;
|
||||
CpuCopy32(barFontGfx, (void*)(OBJ_VRAM0) + (spriteTileNum), 0x20);
|
||||
barFontGfx += 0x20;
|
||||
}
|
||||
|
||||
@@ -1398,13 +1398,13 @@ static void PrintSafariMonInfo(u8 healthboxSpriteId, struct Pokemon *mon)
|
||||
if (j <= 1)
|
||||
{
|
||||
CpuCopy32(&gMonSpritesGfxPtr->barFontGfx[0x40 * j + 0x20],
|
||||
(void*)(OBJ_VRAM0) + (gSprites[healthBarSpriteId].oam.tileNum + 2 + j) * 32,
|
||||
(void*)(OBJ_VRAM0) + (gSprites[healthBarSpriteId].oam.tileNum + 2 + j) * TILE_SIZE_4BPP,
|
||||
32);
|
||||
}
|
||||
else
|
||||
{
|
||||
CpuCopy32(&gMonSpritesGfxPtr->barFontGfx[0x40 * j + 0x20],
|
||||
(void*)(OBJ_VRAM0 + 0xC0) + (j + gSprites[healthBarSpriteId].oam.tileNum) * 32,
|
||||
(void*)(OBJ_VRAM0 + 0xC0) + (j + gSprites[healthBarSpriteId].oam.tileNum) * TILE_SIZE_4BPP,
|
||||
32);
|
||||
}
|
||||
}
|
||||
@@ -1436,7 +1436,7 @@ void SwapHpBarsWithHpText(void)
|
||||
{
|
||||
healthBarSpriteId = gSprites[gHealthboxSpriteIds[i]].hMain_HealthBarSpriteId;
|
||||
|
||||
CpuFill32(0, (void*)(OBJ_VRAM0 + gSprites[healthBarSpriteId].oam.tileNum * 32), 0x100);
|
||||
CpuFill32(0, (void*)(OBJ_VRAM0 + gSprites[healthBarSpriteId].oam.tileNum * TILE_SIZE_4BPP), 0x100);
|
||||
UpdateHpTextInHealthboxInDoubles(gHealthboxSpriteIds[i], GetMonData(&gPlayerParty[gBattlerPartyIndexes[i]], MON_DATA_HP), HP_CURRENT);
|
||||
UpdateHpTextInHealthboxInDoubles(gHealthboxSpriteIds[i], GetMonData(&gPlayerParty[gBattlerPartyIndexes[i]], MON_DATA_MAX_HP), HP_MAX);
|
||||
}
|
||||
@@ -1444,7 +1444,7 @@ void SwapHpBarsWithHpText(void)
|
||||
{
|
||||
UpdateStatusIconInHealthbox(gHealthboxSpriteIds[i]);
|
||||
UpdateHealthboxAttribute(gHealthboxSpriteIds[i], &gPlayerParty[gBattlerPartyIndexes[i]], HEALTHBOX_HEALTH_BAR);
|
||||
CpuCopy32(GetHealthboxElementGfxPtr(HEALTHBOX_GFX_117), (void*)(OBJ_VRAM0 + 0x680 + gSprites[gHealthboxSpriteIds[i]].oam.tileNum * 32), 32);
|
||||
CpuCopy32(GetHealthboxElementGfxPtr(HEALTHBOX_GFX_117), (void*)(OBJ_VRAM0 + 0x680 + gSprites[gHealthboxSpriteIds[i]].oam.tileNum * TILE_SIZE_4BPP), 32);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -1970,7 +1970,7 @@ static void UpdateNickInHealthbox(u8 healthboxSpriteId, struct Pokemon *mon)
|
||||
break;
|
||||
}
|
||||
|
||||
spriteTileNum = gSprites[healthboxSpriteId].oam.tileNum * 32;
|
||||
spriteTileNum = gSprites[healthboxSpriteId].oam.tileNum * TILE_SIZE_4BPP;
|
||||
|
||||
if (GetBattlerSide(gSprites[healthboxSpriteId].data[6]) == B_SIDE_PLAYER)
|
||||
{
|
||||
@@ -2008,9 +2008,9 @@ static void TryAddPokeballIconToHealthbox(u8 healthboxSpriteId, bool8 noStatus)
|
||||
healthBarSpriteId = gSprites[healthboxSpriteId].hMain_HealthBarSpriteId;
|
||||
|
||||
if (noStatus)
|
||||
CpuCopy32(GetHealthboxElementGfxPtr(HEALTHBOX_GFX_70), (void*)(OBJ_VRAM0 + (gSprites[healthBarSpriteId].oam.tileNum + 8) * 32), 32);
|
||||
CpuCopy32(GetHealthboxElementGfxPtr(HEALTHBOX_GFX_70), (void*)(OBJ_VRAM0 + (gSprites[healthBarSpriteId].oam.tileNum + 8) * TILE_SIZE_4BPP), 32);
|
||||
else
|
||||
CpuFill32(0, (void*)(OBJ_VRAM0 + (gSprites[healthBarSpriteId].oam.tileNum + 8) * 32), 32);
|
||||
CpuFill32(0, (void*)(OBJ_VRAM0 + (gSprites[healthBarSpriteId].oam.tileNum + 8) * TILE_SIZE_4BPP), 32);
|
||||
}
|
||||
|
||||
static void UpdateStatusIconInHealthbox(u8 healthboxSpriteId)
|
||||
@@ -2068,10 +2068,10 @@ static void UpdateStatusIconInHealthbox(u8 healthboxSpriteId)
|
||||
statusGfxPtr = GetHealthboxElementGfxPtr(HEALTHBOX_GFX_39);
|
||||
|
||||
for (i = 0; i < 3; i++)
|
||||
CpuCopy32(statusGfxPtr, (void*)(OBJ_VRAM0 + (gSprites[healthboxSpriteId].oam.tileNum + tileNumAdder + i) * 32), 32);
|
||||
CpuCopy32(statusGfxPtr, (void*)(OBJ_VRAM0 + (gSprites[healthboxSpriteId].oam.tileNum + tileNumAdder + i) * TILE_SIZE_4BPP), 32);
|
||||
|
||||
if (!gBattleSpritesDataPtr->battlerData[battlerId].hpNumbersNoBars)
|
||||
CpuCopy32(GetHealthboxElementGfxPtr(HEALTHBOX_GFX_1), (void *)(OBJ_VRAM0 + gSprites[healthBarSpriteId].oam.tileNum * 32), 64);
|
||||
CpuCopy32(GetHealthboxElementGfxPtr(HEALTHBOX_GFX_1), (void *)(OBJ_VRAM0 + gSprites[healthBarSpriteId].oam.tileNum * TILE_SIZE_4BPP), 64);
|
||||
|
||||
TryAddPokeballIconToHealthbox(healthboxSpriteId, TRUE);
|
||||
return;
|
||||
@@ -2082,13 +2082,13 @@ static void UpdateStatusIconInHealthbox(u8 healthboxSpriteId)
|
||||
|
||||
FillPalette(sStatusIconColors[statusPalId], pltAdder + 0x100, 2);
|
||||
CpuCopy16(gPlttBufferUnfaded + 0x100 + pltAdder, (void*)(OBJ_PLTT + pltAdder * 2), 2);
|
||||
CpuCopy32(statusGfxPtr, (void*)(OBJ_VRAM0 + (gSprites[healthboxSpriteId].oam.tileNum + tileNumAdder) * 32), 96);
|
||||
CpuCopy32(statusGfxPtr, (void*)(OBJ_VRAM0 + (gSprites[healthboxSpriteId].oam.tileNum + tileNumAdder) * TILE_SIZE_4BPP), 96);
|
||||
if (IsDoubleBattle() == TRUE || GetBattlerSide(battlerId) == B_SIDE_OPPONENT)
|
||||
{
|
||||
if (!gBattleSpritesDataPtr->battlerData[battlerId].hpNumbersNoBars)
|
||||
{
|
||||
CpuCopy32(GetHealthboxElementGfxPtr(HEALTHBOX_GFX_0), (void*)(OBJ_VRAM0 + gSprites[healthBarSpriteId].oam.tileNum * 32), 32);
|
||||
CpuCopy32(GetHealthboxElementGfxPtr(HEALTHBOX_GFX_65), (void*)(OBJ_VRAM0 + (gSprites[healthBarSpriteId].oam.tileNum + 1) * 32), 32);
|
||||
CpuCopy32(GetHealthboxElementGfxPtr(HEALTHBOX_GFX_0), (void*)(OBJ_VRAM0 + gSprites[healthBarSpriteId].oam.tileNum * TILE_SIZE_4BPP), 32);
|
||||
CpuCopy32(GetHealthboxElementGfxPtr(HEALTHBOX_GFX_65), (void*)(OBJ_VRAM0 + (gSprites[healthBarSpriteId].oam.tileNum + 1) * TILE_SIZE_4BPP), 32);
|
||||
}
|
||||
}
|
||||
TryAddPokeballIconToHealthbox(healthboxSpriteId, FALSE);
|
||||
@@ -2160,7 +2160,7 @@ static void UpdateSafariBallsTextOnHealthbox(u8 healthboxSpriteId)
|
||||
u8 *windowTileData;
|
||||
|
||||
windowTileData = AddTextPrinterAndCreateWindowOnHealthbox(gText_SafariBalls, 0, 3, 2, &windowId);
|
||||
spriteTileNum = gSprites[healthboxSpriteId].oam.tileNum * 32;
|
||||
spriteTileNum = gSprites[healthboxSpriteId].oam.tileNum * TILE_SIZE_4BPP;
|
||||
TextIntoHealthboxObject((void*)(OBJ_VRAM0 + 0x40) + spriteTileNum, windowTileData, 6);
|
||||
TextIntoHealthboxObject((void*)(OBJ_VRAM0 + 0x800) + spriteTileNum, windowTileData + 0xC0, 2);
|
||||
RemoveWindowOnHealthbox(windowId);
|
||||
@@ -2177,7 +2177,7 @@ static void UpdateLeftNoOfBallsTextOnHealthbox(u8 healthboxSpriteId)
|
||||
ConvertIntToDecimalStringN(txtPtr, gNumSafariBalls, STR_CONV_MODE_LEFT_ALIGN, 2);
|
||||
|
||||
windowTileData = AddTextPrinterAndCreateWindowOnHealthbox(text, GetStringRightAlignXOffset(0, text, 0x2F), 3, 2, &windowId);
|
||||
spriteTileNum = gSprites[healthboxSpriteId].oam.tileNum * 32;
|
||||
spriteTileNum = gSprites[healthboxSpriteId].oam.tileNum * TILE_SIZE_4BPP;
|
||||
SafariTextIntoHealthboxObject((void*)(OBJ_VRAM0 + 0x2C0) + spriteTileNum, windowTileData, 2);
|
||||
SafariTextIntoHealthboxObject((void*)(OBJ_VRAM0 + 0xA00) + spriteTileNum, windowTileData + 0x40, 4);
|
||||
RemoveWindowOnHealthbox(windowId);
|
||||
@@ -2323,10 +2323,10 @@ static void MoveBattleBarGraphically(u8 battlerId, u8 whichBar)
|
||||
u8 healthbarSpriteId = gSprites[gBattleSpritesDataPtr->battleBars[battlerId].healthboxSpriteId].hMain_HealthBarSpriteId;
|
||||
if (i < 2)
|
||||
CpuCopy32(GetHealthboxElementGfxPtr(barElementId) + array[i] * 32,
|
||||
(void*)(OBJ_VRAM0 + (gSprites[healthbarSpriteId].oam.tileNum + 2 + i) * 32), 32);
|
||||
(void*)(OBJ_VRAM0 + (gSprites[healthbarSpriteId].oam.tileNum + 2 + i) * TILE_SIZE_4BPP), 32);
|
||||
else
|
||||
CpuCopy32(GetHealthboxElementGfxPtr(barElementId) + array[i] * 32,
|
||||
(void*)(OBJ_VRAM0 + 64 + (i + gSprites[healthbarSpriteId].oam.tileNum) * 32), 32);
|
||||
(void*)(OBJ_VRAM0 + 64 + (i + gSprites[healthbarSpriteId].oam.tileNum) * TILE_SIZE_4BPP), 32);
|
||||
}
|
||||
break;
|
||||
case EXP_BAR:
|
||||
@@ -2345,10 +2345,10 @@ static void MoveBattleBarGraphically(u8 battlerId, u8 whichBar)
|
||||
{
|
||||
if (i < 4)
|
||||
CpuCopy32(GetHealthboxElementGfxPtr(HEALTHBOX_GFX_12) + array[i] * 32,
|
||||
(void*)(OBJ_VRAM0 + (gSprites[gBattleSpritesDataPtr->battleBars[battlerId].healthboxSpriteId].oam.tileNum + 0x24 + i) * 32), 32);
|
||||
(void*)(OBJ_VRAM0 + (gSprites[gBattleSpritesDataPtr->battleBars[battlerId].healthboxSpriteId].oam.tileNum + 0x24 + i) * TILE_SIZE_4BPP), 32);
|
||||
else
|
||||
CpuCopy32(GetHealthboxElementGfxPtr(HEALTHBOX_GFX_12) + array[i] * 32,
|
||||
(void*)(OBJ_VRAM0 + 0xB80 + (i + gSprites[gBattleSpritesDataPtr->battleBars[battlerId].healthboxSpriteId].oam.tileNum) * 32), 32);
|
||||
(void*)(OBJ_VRAM0 + 0xB80 + (i + gSprites[gBattleSpritesDataPtr->battleBars[battlerId].healthboxSpriteId].oam.tileNum) * TILE_SIZE_4BPP), 32);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -2571,16 +2571,16 @@ u8 GetHPBarLevel(s16 hp, s16 maxhp)
|
||||
return result;
|
||||
}
|
||||
|
||||
static u8* AddTextPrinterAndCreateWindowOnHealthbox(const u8 *str, u32 x, u32 y, u32 arg3, u32 *windowId)
|
||||
static u8* AddTextPrinterAndCreateWindowOnHealthbox(const u8 *str, u32 x, u32 y, u32 bgColor, u32 *windowId)
|
||||
{
|
||||
u16 winId;
|
||||
u8 color[3];
|
||||
struct WindowTemplate winTemplate = sHealthboxWindowTemplate;
|
||||
|
||||
winId = AddWindow(&winTemplate);
|
||||
FillWindowPixelBuffer(winId, (arg3 << 4) | (arg3));
|
||||
FillWindowPixelBuffer(winId, (bgColor << 4) | (bgColor));
|
||||
|
||||
color[0] = arg3;
|
||||
color[0] = bgColor;
|
||||
color[1] = 1;
|
||||
color[2] = 3;
|
||||
|
||||
@@ -2597,31 +2597,31 @@ static void RemoveWindowOnHealthbox(u32 windowId)
|
||||
|
||||
static void FillHealthboxObject(void *dest, u32 arg1, u32 arg2)
|
||||
{
|
||||
CpuFill32(0x11111111 * arg1, dest, arg2 * 32);
|
||||
CpuFill32(0x11111111 * arg1, dest, arg2 * TILE_SIZE_4BPP);
|
||||
}
|
||||
|
||||
static void HpTextIntoHealthboxObject(void *dest, u8 *windowTileData, u32 arg2)
|
||||
static void HpTextIntoHealthboxObject(void *dest, u8 *windowTileData, u32 windowWidth)
|
||||
{
|
||||
CpuCopy32(windowTileData + 256, dest, arg2 * 32);
|
||||
CpuCopy32(windowTileData + 256, dest, windowWidth * TILE_SIZE_4BPP);
|
||||
}
|
||||
|
||||
static void TextIntoHealthboxObject(void *dest, u8 *windowTileData, s32 arg2)
|
||||
static void TextIntoHealthboxObject(void *dest, u8 *windowTileData, s32 windowWidth)
|
||||
{
|
||||
CpuCopy32(windowTileData + 256, dest + 256, arg2 * 32);
|
||||
|
||||
if (arg2 > 0)
|
||||
CpuCopy32(windowTileData + 256, dest + 256, windowWidth * TILE_SIZE_4BPP);
|
||||
// + 256 as that prevents the top 4 blank rows of sHealthboxWindowTemplate from being copied
|
||||
if (windowWidth > 0)
|
||||
{
|
||||
do
|
||||
{
|
||||
CpuCopy32(windowTileData + 20, dest + 20, 12);
|
||||
dest += 32, windowTileData += 32;
|
||||
arg2--;
|
||||
} while (arg2 != 0);
|
||||
windowWidth--;
|
||||
} while (windowWidth != 0);
|
||||
}
|
||||
}
|
||||
|
||||
static void SafariTextIntoHealthboxObject(void *dest, u8 *windowTileData, u32 arg2)
|
||||
static void SafariTextIntoHealthboxObject(void *dest, u8 *windowTileData, u32 windowWidth)
|
||||
{
|
||||
CpuCopy32(windowTileData, dest, arg2 * 32);
|
||||
CpuCopy32(windowTileData + 256, dest + 256, arg2 * 32);
|
||||
CpuCopy32(windowTileData, dest, windowWidth * TILE_SIZE_4BPP);
|
||||
CpuCopy32(windowTileData + 256, dest + 256, windowWidth * TILE_SIZE_4BPP);
|
||||
}
|
||||
|
||||
+21
-22
@@ -5,6 +5,7 @@
|
||||
#include "battle_controllers.h"
|
||||
#include "battle_interface.h"
|
||||
#include "battle_message.h"
|
||||
#include "battle_pyramid.h"
|
||||
#include "battle_scripts.h"
|
||||
#include "battle_setup.h"
|
||||
#include "battle_tower.h"
|
||||
@@ -68,18 +69,6 @@ struct UnknownPokemonStruct4
|
||||
/*0x1D*/ u8 language;
|
||||
};
|
||||
|
||||
extern u16 gBattle_BG0_X;
|
||||
extern u16 gBattle_BG0_Y;
|
||||
extern u16 gBattle_BG1_X;
|
||||
extern u16 gBattle_BG1_Y;
|
||||
extern u16 gBattle_BG2_X;
|
||||
extern u16 gBattle_BG2_Y;
|
||||
extern u16 gBattle_BG3_X;
|
||||
extern u16 gBattle_BG3_Y;
|
||||
extern u16 gBattle_WIN0H;
|
||||
extern u16 gBattle_WIN0V;
|
||||
extern u16 gBattle_WIN1H;
|
||||
extern u16 gBattle_WIN1V;
|
||||
extern struct MusicPlayerInfo gMPlayInfo_SE1;
|
||||
extern struct MusicPlayerInfo gMPlayInfo_SE2;
|
||||
extern u8 gUnknown_0203CF00[];
|
||||
@@ -109,10 +98,8 @@ extern const u8 gText_Love[];
|
||||
// functions
|
||||
extern void sub_81B9150(void);
|
||||
extern void sub_80B3AF8(u8 taskId); // cable club
|
||||
extern u8 sub_81A9E28(void); // battle frontier 2
|
||||
extern void sub_81B8FB0(u8, u8); // party menu
|
||||
extern u8 pokemon_order_func(u8); // party menu
|
||||
extern bool8 InBattlePyramid(void);
|
||||
|
||||
// this file's functions
|
||||
static void CB2_InitBattleInternal(void);
|
||||
@@ -179,13 +166,25 @@ static void HandleAction_WatchesCarefully(void);
|
||||
static void HandleAction_SafariZoneBallThrow(void);
|
||||
static void HandleAction_ThrowPokeblock(void);
|
||||
static void HandleAction_GoNear(void);
|
||||
static void HandleAction_SafriZoneRun(void);
|
||||
static void HandleAction_SafariZoneRun(void);
|
||||
static void HandleAction_WallyBallThrow(void);
|
||||
static void HandleAction_Action11(void);
|
||||
static void HandleAction_NothingIsFainted(void);
|
||||
static void HandleAction_ActionFinished(void);
|
||||
|
||||
// EWRAM vars
|
||||
EWRAM_DATA u16 gBattle_BG0_X = 0;
|
||||
EWRAM_DATA u16 gBattle_BG0_Y = 0;
|
||||
EWRAM_DATA u16 gBattle_BG1_X = 0;
|
||||
EWRAM_DATA u16 gBattle_BG1_Y = 0;
|
||||
EWRAM_DATA u16 gBattle_BG2_X = 0;
|
||||
EWRAM_DATA u16 gBattle_BG2_Y = 0;
|
||||
EWRAM_DATA u16 gBattle_BG3_X = 0;
|
||||
EWRAM_DATA u16 gBattle_BG3_Y = 0;
|
||||
EWRAM_DATA u16 gBattle_WIN0H = 0;
|
||||
EWRAM_DATA u16 gBattle_WIN0V = 0;
|
||||
EWRAM_DATA u16 gBattle_WIN1H = 0;
|
||||
EWRAM_DATA u16 gBattle_WIN1V = 0;
|
||||
EWRAM_DATA u8 gDisplayedStringBattle[300] = {0};
|
||||
EWRAM_DATA u8 gBattleTextBuff1[TEXT_BUFF_ARRAY_COUNT] = {0};
|
||||
EWRAM_DATA u8 gBattleTextBuff2[TEXT_BUFF_ARRAY_COUNT] = {0};
|
||||
@@ -516,7 +515,7 @@ static void (* const sTurnActionsFuncsTable[])(void) =
|
||||
HandleAction_SafariZoneBallThrow, // B_ACTION_SAFARI_BALL
|
||||
HandleAction_ThrowPokeblock, // B_ACTION_SAFARI_POKEBLOCK
|
||||
HandleAction_GoNear, // B_ACTION_SAFARI_GO_NEAR
|
||||
HandleAction_SafriZoneRun, // B_ACTION_SAFARI_RUN
|
||||
HandleAction_SafariZoneRun, // B_ACTION_SAFARI_RUN
|
||||
HandleAction_WallyBallThrow, // B_ACTION_WALLY_THROW
|
||||
HandleAction_RunBattleScript, // B_ACTION_EXEC_SCRIPT
|
||||
HandleAction_Action11, // not sure about this one
|
||||
@@ -3095,7 +3094,7 @@ void SwitchInClearSetData(void)
|
||||
|
||||
if (gBattleMoves[gCurrentMove].effect != EFFECT_BATON_PASS)
|
||||
{
|
||||
for (i = 0; i < BATTLE_STATS_NO; i++)
|
||||
for (i = 0; i < NUM_BATTLE_STATS; i++)
|
||||
gBattleMons[gActiveBattler].statStages[i] = 6;
|
||||
for (i = 0; i < gBattlersCount; i++)
|
||||
{
|
||||
@@ -3204,7 +3203,7 @@ void FaintClearSetData(void)
|
||||
s32 i;
|
||||
u8 *ptr;
|
||||
|
||||
for (i = 0; i < BATTLE_STATS_NO; i++)
|
||||
for (i = 0; i < NUM_BATTLE_STATS; i++)
|
||||
gBattleMons[gActiveBattler].statStages[i] = 6;
|
||||
|
||||
gBattleMons[gActiveBattler].status2 = 0;
|
||||
@@ -3358,7 +3357,7 @@ static void BattleIntroDrawTrainersOrMonsSprites(void)
|
||||
gBattleMons[gActiveBattler].ability = GetAbilityBySpecies(gBattleMons[gActiveBattler].species, gBattleMons[gActiveBattler].altAbility);
|
||||
hpOnSwitchout = &gBattleStruct->hpOnSwitchout[GetBattlerSide(gActiveBattler)];
|
||||
*hpOnSwitchout = gBattleMons[gActiveBattler].hp;
|
||||
for (i = 0; i < BATTLE_STATS_NO; i++)
|
||||
for (i = 0; i < NUM_BATTLE_STATS; i++)
|
||||
gBattleMons[gActiveBattler].statStages[i] = 6;
|
||||
gBattleMons[gActiveBattler].status2 = 0;
|
||||
}
|
||||
@@ -5604,7 +5603,7 @@ bool8 TryRunFromBattle(u8 battler)
|
||||
if (InBattlePyramid())
|
||||
{
|
||||
gBattleStruct->runTries++;
|
||||
pyramidMultiplier = sub_81A9E28();
|
||||
pyramidMultiplier = GetPyramidRunMultiplier();
|
||||
speedVar = (gBattleMons[battler].speed * pyramidMultiplier) / (gBattleMons[BATTLE_OPPOSITE(battler)].speed) + (gBattleStruct->runTries * 30);
|
||||
if (speedVar > (Random() & 0xFF))
|
||||
{
|
||||
@@ -5630,7 +5629,7 @@ bool8 TryRunFromBattle(u8 battler)
|
||||
{
|
||||
if (InBattlePyramid())
|
||||
{
|
||||
pyramidMultiplier = sub_81A9E28();
|
||||
pyramidMultiplier = GetPyramidRunMultiplier();
|
||||
speedVar = (gBattleMons[battler].speed * pyramidMultiplier) / (gBattleMons[BATTLE_OPPOSITE(battler)].speed) + (gBattleStruct->runTries * 30);
|
||||
if (speedVar > (Random() & 0xFF))
|
||||
effect++;
|
||||
@@ -5784,7 +5783,7 @@ static void HandleAction_GoNear(void)
|
||||
gCurrentActionFuncId = B_ACTION_EXEC_SCRIPT;
|
||||
}
|
||||
|
||||
static void HandleAction_SafriZoneRun(void)
|
||||
static void HandleAction_SafariZoneRun(void)
|
||||
{
|
||||
gBattlerAttacker = gBattlerByTurnOrder[gCurrentTurnActionNumber];
|
||||
PlaySE(SE_NIGERU);
|
||||
|
||||
+29
-28
@@ -1,25 +1,25 @@
|
||||
#include "global.h"
|
||||
#include "battle.h"
|
||||
#include "battle_message.h"
|
||||
#include "constants/battle_string_ids.h"
|
||||
#include "constants/moves.h"
|
||||
#include "text.h"
|
||||
#include "string_util.h"
|
||||
#include "constants/items.h"
|
||||
#include "constants/trainers.h"
|
||||
#include "event_data.h"
|
||||
#include "link.h"
|
||||
#include "item.h"
|
||||
#include "window.h"
|
||||
#include "palette.h"
|
||||
#include "battle_controllers.h"
|
||||
#include "battle_message.h"
|
||||
#include "battle_setup.h"
|
||||
#include "menu.h"
|
||||
#include "recorded_battle.h"
|
||||
#include "international_string_util.h"
|
||||
#include "frontier_util.h"
|
||||
#include "battle_tower.h"
|
||||
#include "data2.h"
|
||||
#include "event_data.h"
|
||||
#include "frontier_util.h"
|
||||
#include "international_string_util.h"
|
||||
#include "item.h"
|
||||
#include "link.h"
|
||||
#include "menu.h"
|
||||
#include "palette.h"
|
||||
#include "recorded_battle.h"
|
||||
#include "string_util.h"
|
||||
#include "text.h"
|
||||
#include "window.h"
|
||||
#include "constants/battle_string_ids.h"
|
||||
#include "constants/items.h"
|
||||
#include "constants/moves.h"
|
||||
#include "constants/trainers.h"
|
||||
|
||||
struct BattleWindowText
|
||||
{
|
||||
@@ -1367,7 +1367,8 @@ static const u8 sDummyWeirdStatusString[] = {EOS, EOS, EOS, EOS, EOS, EOS, EOS,
|
||||
|
||||
static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
|
||||
{
|
||||
{ // 0
|
||||
// The corresponding WindowTemplate is gStandardBattleWindowTemplates[] within src/battle_bg.c
|
||||
{ // 0 Standard battle message
|
||||
.fillValue = 0xFF,
|
||||
.fontId = 1,
|
||||
.x = 0,
|
||||
@@ -1379,7 +1380,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
|
||||
.bgColor = 15,
|
||||
.shadowColor = 6,
|
||||
},
|
||||
{ // 1
|
||||
{ // 1 "What will (pokemon) do?"
|
||||
.fillValue = 0xFF,
|
||||
.fontId = 1,
|
||||
.x = 1,
|
||||
@@ -1391,7 +1392,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
|
||||
.bgColor = 15,
|
||||
.shadowColor = 6,
|
||||
},
|
||||
{ // 2
|
||||
{ // 2 "Fight/Pokemon/Bag/Run"
|
||||
.fillValue = 0xEE,
|
||||
.fontId = 1,
|
||||
.x = 0,
|
||||
@@ -1403,7 +1404,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
|
||||
.bgColor = 14,
|
||||
.shadowColor = 15,
|
||||
},
|
||||
{ // 3
|
||||
{ // 3 Top left move
|
||||
.fillValue = 0xEE,
|
||||
.fontId = 7,
|
||||
.x = 0,
|
||||
@@ -1415,7 +1416,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
|
||||
.bgColor = 14,
|
||||
.shadowColor = 15,
|
||||
},
|
||||
{ // 4
|
||||
{ // 4 Top right move
|
||||
.fillValue = 0xEE,
|
||||
.fontId = 7,
|
||||
.x = 0,
|
||||
@@ -1427,7 +1428,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
|
||||
.bgColor = 14,
|
||||
.shadowColor = 15,
|
||||
},
|
||||
{ // 5
|
||||
{ // 5 Bottom left move
|
||||
.fillValue = 0xEE,
|
||||
.fontId = 7,
|
||||
.x = 0,
|
||||
@@ -1439,7 +1440,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
|
||||
.bgColor = 14,
|
||||
.shadowColor = 15,
|
||||
},
|
||||
{ // 6
|
||||
{ // 6 Bottom right move
|
||||
.fillValue = 0xEE,
|
||||
.fontId = 7,
|
||||
.x = 0,
|
||||
@@ -1451,7 +1452,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
|
||||
.bgColor = 14,
|
||||
.shadowColor = 15,
|
||||
},
|
||||
{ // 7
|
||||
{ // 7 "PP"
|
||||
.fillValue = 0xEE,
|
||||
.fontId = 7,
|
||||
.x = 0,
|
||||
@@ -1475,7 +1476,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
|
||||
.bgColor = 14,
|
||||
.shadowColor = 15,
|
||||
},
|
||||
{ // 9
|
||||
{ // 9 PP remaining
|
||||
.fillValue = 0xEE,
|
||||
.fontId = 1,
|
||||
.x = 2,
|
||||
@@ -1487,7 +1488,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
|
||||
.bgColor = 14,
|
||||
.shadowColor = 11,
|
||||
},
|
||||
{ // 10
|
||||
{ // 10 "type"
|
||||
.fillValue = 0xEE,
|
||||
.fontId = 7,
|
||||
.x = 0,
|
||||
@@ -1499,7 +1500,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
|
||||
.bgColor = 14,
|
||||
.shadowColor = 15,
|
||||
},
|
||||
{ // 11
|
||||
{ // 11 "switch which?"
|
||||
.fillValue = 0xEE,
|
||||
.fontId = 7,
|
||||
.x = 0,
|
||||
@@ -1511,7 +1512,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
|
||||
.bgColor = 14,
|
||||
.shadowColor = 15,
|
||||
},
|
||||
{ // 12
|
||||
{ // 12 "gText_BattleYesNoChoice"
|
||||
.fillValue = 0xEE,
|
||||
.fontId = 1,
|
||||
.x = 0,
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "battle_tower.h"
|
||||
#include "frontier_util.h"
|
||||
#include "item.h"
|
||||
#include "string_util.h"
|
||||
#include "constants/items.h"
|
||||
|
||||
// This file's functions.
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -45,12 +45,8 @@
|
||||
#include "party_menu.h"
|
||||
#include "battle_arena.h"
|
||||
#include "battle_pike.h"
|
||||
#include "battle_pyramid.h"
|
||||
|
||||
extern u16 gBattle_BG1_X;
|
||||
extern u16 gBattle_BG1_Y;
|
||||
extern u16 gBattle_BG2_X;
|
||||
extern u16 gBattle_BG2_Y;
|
||||
extern u16 gBattle_BG3_X;
|
||||
extern struct MusicPlayerInfo gMPlayInfo_BGM;
|
||||
|
||||
extern const u8* const gBattleScriptsForMoveEffects[];
|
||||
@@ -62,11 +58,8 @@ extern void sub_81D388C(struct Pokemon* mon, void* statStoreLocation); // pokena
|
||||
extern void sub_81D3640(u8 arg0, void* statStoreLocation1, void* statStoreLocation2, u8 arg3, u8 arg4, u8 arg5); // pokenav.s
|
||||
extern void sub_81D3784(u8 arg0, void* statStoreLocation1, u8 arg2, u8 arg3, u8 arg4); // pokenav.s
|
||||
extern u8* GetMonNickname(struct Pokemon* mon, u8* dst); // party_menu
|
||||
extern u8 BattleArena_ShowJudgmentWindow(u8* arg0); // battle frontier 2
|
||||
extern void sub_81B8E80(u8 battlerId, u8, u8); // party menu
|
||||
extern bool8 sub_81B1250(void); // ?
|
||||
extern bool8 InBattlePyramid(void);
|
||||
extern u16 GetBattlePyramidPickupItemId(void);
|
||||
extern u8 sub_813B21C(void);
|
||||
extern u16 get_unknown_box_id(void);
|
||||
|
||||
@@ -3285,7 +3278,7 @@ static void atk23_getexp(void)
|
||||
u16 calculatedExp;
|
||||
s32 viaSentIn;
|
||||
|
||||
for (viaSentIn = 0, i = 0; i < 6; i++)
|
||||
for (viaSentIn = 0, i = 0; i < PARTY_SIZE; i++)
|
||||
{
|
||||
if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES) == SPECIES_NONE || GetMonData(&gPlayerParty[i], MON_DATA_HP) == 0)
|
||||
continue;
|
||||
@@ -3543,7 +3536,7 @@ static void atk24(void)
|
||||
}
|
||||
else
|
||||
{
|
||||
for (i = 0; i < 6; i++)
|
||||
for (i = 0; i < PARTY_SIZE; i++)
|
||||
{
|
||||
if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES) && !GetMonData(&gPlayerParty[i], MON_DATA_IS_EGG)
|
||||
&& (!(gBattleTypeFlags & BATTLE_TYPE_ARENA) || !(gBattleStruct->arenaLostPlayerMons & gBitTable[i])))
|
||||
@@ -3556,7 +3549,7 @@ static void atk24(void)
|
||||
if (HP_count == 0)
|
||||
gBattleOutcome |= B_OUTCOME_LOST;
|
||||
|
||||
for (HP_count = 0, i = 0; i < 6; i++)
|
||||
for (HP_count = 0, i = 0; i < PARTY_SIZE; i++)
|
||||
{
|
||||
if (GetMonData(&gEnemyParty[i], MON_DATA_SPECIES) && !GetMonData(&gEnemyParty[i], MON_DATA_IS_EGG)
|
||||
&& (!(gBattleTypeFlags & BATTLE_TYPE_ARENA) || !(gBattleStruct->arenaLostOpponentMons & gBitTable[i])))
|
||||
@@ -4952,7 +4945,7 @@ static void atk4D_switchindataupdate(void)
|
||||
|
||||
if (gBattleMoves[gCurrentMove].effect == EFFECT_BATON_PASS)
|
||||
{
|
||||
for (i = 0; i < BATTLE_STATS_NO; i++)
|
||||
for (i = 0; i < NUM_BATTLE_STATS; i++)
|
||||
{
|
||||
gBattleMons[gActiveBattler].statStages[i] = oldData.statStages[i];
|
||||
}
|
||||
@@ -7406,7 +7399,7 @@ static void atk8A_normalisebuffs(void) // haze
|
||||
|
||||
for (i = 0; i < gBattlersCount; i++)
|
||||
{
|
||||
for (j = 0; j < BATTLE_STATS_NO; j++)
|
||||
for (j = 0; j < NUM_BATTLE_STATS; j++)
|
||||
gBattleMons[i].statStages[j] = 6;
|
||||
}
|
||||
|
||||
@@ -9034,7 +9027,7 @@ static void atkBD_copyfoestats(void) // psych up
|
||||
{
|
||||
s32 i;
|
||||
|
||||
for (i = 0; i < BATTLE_STATS_NO; i++)
|
||||
for (i = 0; i < NUM_BATTLE_STATS; i++)
|
||||
{
|
||||
gBattleMons[gBattlerAttacker].statStages[i] = gBattleMons[gBattlerTarget].statStages[i];
|
||||
}
|
||||
@@ -9860,71 +9853,72 @@ static void atkE4_getsecretpowereffect(void)
|
||||
|
||||
static void atkE5_pickup(void)
|
||||
{
|
||||
if (!InBattlePike())
|
||||
s32 i;
|
||||
u16 species, heldItem;
|
||||
u8 ability;
|
||||
|
||||
if (InBattlePike())
|
||||
{
|
||||
s32 i;
|
||||
u16 species, heldItem;
|
||||
u8 ability;
|
||||
|
||||
if (InBattlePyramid())
|
||||
}
|
||||
else if (InBattlePyramid())
|
||||
{
|
||||
for (i = 0; i < PARTY_SIZE; i++)
|
||||
{
|
||||
for (i = 0; i < 6; i++)
|
||||
species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2);
|
||||
heldItem = GetMonData(&gPlayerParty[i], MON_DATA_HELD_ITEM);
|
||||
|
||||
if (GetMonData(&gPlayerParty[i], MON_DATA_ALT_ABILITY))
|
||||
ability = gBaseStats[species].ability2;
|
||||
else
|
||||
ability = gBaseStats[species].ability1;
|
||||
|
||||
if (ability == ABILITY_PICKUP
|
||||
&& species != 0
|
||||
&& species != SPECIES_EGG
|
||||
&& heldItem == ITEM_NONE
|
||||
&& (Random() % 10) == 0)
|
||||
{
|
||||
species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2);
|
||||
heldItem = GetMonData(&gPlayerParty[i], MON_DATA_HELD_ITEM);
|
||||
|
||||
if (GetMonData(&gPlayerParty[i], MON_DATA_ALT_ABILITY))
|
||||
ability = gBaseStats[species].ability2;
|
||||
else
|
||||
ability = gBaseStats[species].ability1;
|
||||
|
||||
if (ability == ABILITY_PICKUP
|
||||
&& species != 0
|
||||
&& species != SPECIES_EGG
|
||||
&& heldItem == ITEM_NONE
|
||||
&& (Random() % 10) == 0)
|
||||
{
|
||||
heldItem = GetBattlePyramidPickupItemId();
|
||||
SetMonData(&gPlayerParty[i], MON_DATA_HELD_ITEM, &heldItem);
|
||||
}
|
||||
heldItem = GetBattlePyramidPickupItemId();
|
||||
SetMonData(&gPlayerParty[i], MON_DATA_HELD_ITEM, &heldItem);
|
||||
}
|
||||
}
|
||||
else
|
||||
}
|
||||
else
|
||||
{
|
||||
for (i = 0; i < PARTY_SIZE; i++)
|
||||
{
|
||||
for (i = 0; i < 6; i++)
|
||||
species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2);
|
||||
heldItem = GetMonData(&gPlayerParty[i], MON_DATA_HELD_ITEM);
|
||||
|
||||
if (GetMonData(&gPlayerParty[i], MON_DATA_ALT_ABILITY))
|
||||
ability = gBaseStats[species].ability2;
|
||||
else
|
||||
ability = gBaseStats[species].ability1;
|
||||
|
||||
if (ability == ABILITY_PICKUP
|
||||
&& species != 0
|
||||
&& species != SPECIES_EGG
|
||||
&& heldItem == ITEM_NONE
|
||||
&& (Random() % 10) == 0)
|
||||
{
|
||||
species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2);
|
||||
heldItem = GetMonData(&gPlayerParty[i], MON_DATA_HELD_ITEM);
|
||||
s32 j;
|
||||
s32 rand = Random() % 100;
|
||||
u8 lvlDivBy10 = (GetMonData(&gPlayerParty[i], MON_DATA_LEVEL) - 1) / 10;
|
||||
if (lvlDivBy10 > 9)
|
||||
lvlDivBy10 = 9;
|
||||
|
||||
if (GetMonData(&gPlayerParty[i], MON_DATA_ALT_ABILITY))
|
||||
ability = gBaseStats[species].ability2;
|
||||
else
|
||||
ability = gBaseStats[species].ability1;
|
||||
|
||||
if (ability == ABILITY_PICKUP
|
||||
&& species != 0
|
||||
&& species != SPECIES_EGG
|
||||
&& heldItem == ITEM_NONE
|
||||
&& (Random() % 10) == 0)
|
||||
for (j = 0; j < 9; j++)
|
||||
{
|
||||
s32 j;
|
||||
s32 rand = Random() % 100;
|
||||
u8 lvlDivBy10 = (GetMonData(&gPlayerParty[i], MON_DATA_LEVEL) - 1) / 10;
|
||||
if (lvlDivBy10 > 9)
|
||||
lvlDivBy10 = 9;
|
||||
|
||||
for (j = 0; j < 9; j++)
|
||||
if (sPickupProbabilities[j] > rand)
|
||||
{
|
||||
if (sPickupProbabilities[j] > rand)
|
||||
{
|
||||
SetMonData(&gPlayerParty[i], MON_DATA_HELD_ITEM, &sPickupItems[lvlDivBy10 + j]);
|
||||
break;
|
||||
}
|
||||
else if (rand == 99 || rand == 98)
|
||||
{
|
||||
SetMonData(&gPlayerParty[i], MON_DATA_HELD_ITEM, &sRarePickupItems[lvlDivBy10 + (99 - rand)]);
|
||||
break;
|
||||
}
|
||||
SetMonData(&gPlayerParty[i], MON_DATA_HELD_ITEM, &sPickupItems[lvlDivBy10 + j]);
|
||||
break;
|
||||
}
|
||||
else if (rand == 99 || rand == 98)
|
||||
{
|
||||
SetMonData(&gPlayerParty[i], MON_DATA_HELD_ITEM, &sRarePickupItems[lvlDivBy10 + (99 - rand)]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+5
-9
@@ -34,6 +34,7 @@
|
||||
#include "battle_tower.h"
|
||||
#include "gym_leader_rematch.h"
|
||||
#include "battle_pike.h"
|
||||
#include "battle_pyramid.h"
|
||||
#include "constants/map_types.h"
|
||||
#include "constants/battle_frontier.h"
|
||||
|
||||
@@ -54,7 +55,6 @@ struct TrainerBattleParameter
|
||||
u8 ptrType;
|
||||
};
|
||||
|
||||
extern bool8 InBattlePyramid(void);
|
||||
extern bool32 InTrainerHill(void);
|
||||
extern bool32 FieldPoisonEffectIsRunning(void);
|
||||
extern void RestartWildEncounterImmunitySteps(void);
|
||||
@@ -63,17 +63,13 @@ extern void sub_81BE72C(void);
|
||||
extern void sub_808BCF4(void);
|
||||
extern void sub_80EECC8(void);
|
||||
extern void sub_80AF6F0(void);
|
||||
extern u16 sub_81A9AA8(u8 localId);
|
||||
extern u16 sub_81D6180(u8 localId);
|
||||
extern bool8 GetBattlePyramidTrainerFlag(u8 eventObjId);
|
||||
extern bool8 GetTrainerHillTrainerFlag(u8 eventObjId);
|
||||
extern bool8 sub_81D5C18(void);
|
||||
extern void sub_81A9B04(void);
|
||||
extern void sub_81D639C(void);
|
||||
extern void sub_81D6384(void);
|
||||
extern void sub_81D61E8(void);
|
||||
extern void sub_80982B8(void);
|
||||
extern void sub_81A9EDC(u16 a0);
|
||||
extern void CopyTrainerHillTrainerText(u8 a0, u16 arg1);
|
||||
|
||||
// this file's functions
|
||||
@@ -1131,12 +1127,12 @@ const u8 *BattleSetup_ConfigureTrainerBattle(const u8 *data)
|
||||
{
|
||||
TrainerBattleLoadArgs(sOrdinaryBattleParams, data);
|
||||
SetMapVarsToTrainer();
|
||||
gTrainerBattleOpponent_A = sub_81A9AA8(gSpecialVar_LastTalked);
|
||||
gTrainerBattleOpponent_A = LocalIdToPyramidTrainerId(gSpecialVar_LastTalked);
|
||||
}
|
||||
else
|
||||
{
|
||||
TrainerBattleLoadArgs(sTrainerBOrdinaryBattleParams, data);
|
||||
gTrainerBattleOpponent_B = sub_81A9AA8(gSpecialVar_LastTalked);
|
||||
gTrainerBattleOpponent_B = LocalIdToPyramidTrainerId(gSpecialVar_LastTalked);
|
||||
}
|
||||
return EventScript_271362;
|
||||
case TRAINER_BATTLE_SET_TRAINER_A:
|
||||
@@ -1360,9 +1356,9 @@ void ShowTrainerIntroSpeech(void)
|
||||
if (InBattlePyramid())
|
||||
{
|
||||
if (gNoOfApproachingTrainers == 0 || gNoOfApproachingTrainers == 1)
|
||||
sub_81A9EDC(sub_81A9AA8(gSpecialVar_LastTalked));
|
||||
CopyPyramidTrainerSpeechBefore(LocalIdToPyramidTrainerId(gSpecialVar_LastTalked));
|
||||
else
|
||||
sub_81A9EDC(sub_81A9AA8(gEventObjects[gApproachingTrainers[gApproachingTrainerId].eventObjectId].localId));
|
||||
CopyPyramidTrainerSpeechBefore(LocalIdToPyramidTrainerId(gEventObjects[gApproachingTrainers[gApproachingTrainerId].eventObjectId].localId));
|
||||
|
||||
sub_80982B8();
|
||||
}
|
||||
|
||||
+1
-4
@@ -10,6 +10,7 @@
|
||||
#include "item.h"
|
||||
#include "battle_factory_screen.h"
|
||||
#include "frontier_util.h"
|
||||
#include "string_util.h"
|
||||
#include "constants/items.h"
|
||||
#include "constants/region_map_sections.h"
|
||||
|
||||
@@ -17,10 +18,6 @@ extern const struct BattleFrontierTrainer gSlateportBattleTentTrainers[];
|
||||
extern const struct FacilityMon gSlateportBattleTentMons[];
|
||||
extern const u16 gBattleFrontierHeldItems[];
|
||||
|
||||
extern u16 gUnknown_03006298[];
|
||||
|
||||
extern void sub_81A4C30(void);
|
||||
|
||||
// This file's functions.
|
||||
static void sub_81B99D4(void);
|
||||
static void sub_81B9A28(void);
|
||||
|
||||
+3
-2
@@ -28,8 +28,6 @@
|
||||
#include "constants/moves.h"
|
||||
#include "constants/species.h"
|
||||
|
||||
extern u16 gUnknown_03006298[];
|
||||
|
||||
extern void sub_81A4C30(void);
|
||||
|
||||
extern const u8 *const *const gUnknown_085DD690[];
|
||||
@@ -68,6 +66,9 @@ extern const u8 MossdeepCity_SpaceCenter_2F_EventScript_224166[];
|
||||
EWRAM_DATA const struct BattleFrontierTrainer *gFacilityTrainers = NULL;
|
||||
EWRAM_DATA const struct FacilityMon *gFacilityTrainerMons = NULL;
|
||||
|
||||
// IWRAM common
|
||||
u16 gUnknown_03006298[4];
|
||||
|
||||
// This file's functions.
|
||||
static void sub_8161F94(void);
|
||||
static void sub_8162054(void);
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "global.h"
|
||||
#include "battle.h"
|
||||
#include "battle_transition.h"
|
||||
#include "bg.h"
|
||||
#include "decompress.h"
|
||||
@@ -56,9 +57,6 @@ struct StructRectangularSpiral
|
||||
typedef bool8 (*TransitionStateFunc)(struct Task *task);
|
||||
typedef bool8 (*TransitionSpriteCallback)(struct Sprite *sprite);
|
||||
|
||||
extern u16 gBattle_BG0_X;
|
||||
extern u16 gBattle_BG0_Y;
|
||||
|
||||
extern const struct OamData gEventObjectBaseOam_32x32;
|
||||
|
||||
extern void sub_80AC3D0(void);
|
||||
|
||||
+3
-3
@@ -2616,7 +2616,7 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn)
|
||||
gBattleStruct->moneyMultiplier = 2;
|
||||
break;
|
||||
case HOLD_EFFECT_RESTORE_STATS:
|
||||
for (i = 0; i < BATTLE_STATS_NO; i++)
|
||||
for (i = 0; i < NUM_BATTLE_STATS; i++)
|
||||
{
|
||||
if (gBattleMons[battlerId].statStages[i] < 6)
|
||||
{
|
||||
@@ -2687,7 +2687,7 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn)
|
||||
}
|
||||
break;
|
||||
case HOLD_EFFECT_RESTORE_STATS:
|
||||
for (i = 0; i < BATTLE_STATS_NO; i++)
|
||||
for (i = 0; i < NUM_BATTLE_STATS; i++)
|
||||
{
|
||||
if (gBattleMons[battlerId].statStages[i] < 6)
|
||||
{
|
||||
@@ -3163,7 +3163,7 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn)
|
||||
}
|
||||
break;
|
||||
case HOLD_EFFECT_RESTORE_STATS:
|
||||
for (i = 0; i < BATTLE_STATS_NO; i++)
|
||||
for (i = 0; i < NUM_BATTLE_STATS; i++)
|
||||
{
|
||||
if (gBattleMons[battlerId].statStages[i] < 6)
|
||||
{
|
||||
|
||||
+3
-3
@@ -1,10 +1,13 @@
|
||||
#include "global.h"
|
||||
#include "berry.h"
|
||||
#include "event_data.h"
|
||||
#include "field_control_avatar.h"
|
||||
#include "fieldmap.h"
|
||||
#include "item.h"
|
||||
#include "item_menu.h"
|
||||
#include "main.h"
|
||||
#include "random.h"
|
||||
#include "string_util.h"
|
||||
#include "text.h"
|
||||
#include "constants/event_object_movement_constants.h"
|
||||
#include "constants/items.h"
|
||||
@@ -12,11 +15,8 @@
|
||||
extern u8 EventObjectGetBerryTreeId(u8 eventObjectId);
|
||||
extern void sub_8092EF0(u8 mapId, u8 mapNumber, u8 mapGroup);
|
||||
extern void CB2_ChooseBerry(void);
|
||||
extern const u8* GetEventObjectScriptPointerPlayerFacing(void);
|
||||
extern bool8 IsBerryTreeSparkling(u8, u8, u8);
|
||||
|
||||
extern u16 gSpecialVar_ItemId;
|
||||
|
||||
extern const u8 BerryTreeScript[];
|
||||
|
||||
static u32 GetEnigmaBerryChecksum(struct EnigmaBerry *enigmaBerry);
|
||||
|
||||
+6
-4
@@ -33,6 +33,7 @@
|
||||
#include "item_menu.h"
|
||||
#include "battle_records.h"
|
||||
#include "graphics.h"
|
||||
#include "new_game.h"
|
||||
|
||||
#define BLENDER_SCORE_BEST 0
|
||||
#define BLENDER_SCORE_GOOD 1
|
||||
@@ -132,8 +133,6 @@ struct BerryBlenderData
|
||||
|
||||
extern struct MusicPlayerInfo gMPlayInfo_SE2;
|
||||
extern struct MusicPlayerInfo gMPlayInfo_BGM;
|
||||
extern u8 gInGameOpponentsNo;
|
||||
extern u8 gUnknown_020322D5;
|
||||
|
||||
// text
|
||||
extern const u8 gText_SavingDontTurnOff2[];
|
||||
@@ -195,18 +194,21 @@ static void sub_8083170(u16 a0, u16 a1);
|
||||
static void Blender_PrintMadePokeblockString(struct Pokeblock *pokeblock, u8 *dst);
|
||||
static bool32 TryAddContestLinkTvShow(struct Pokeblock *pokeblock, struct TvBlenderStruct *a1);
|
||||
|
||||
// ewram
|
||||
// EWRAM
|
||||
EWRAM_DATA static struct BerryBlenderData *sBerryBlenderData = NULL;
|
||||
EWRAM_DATA static s32 sUnknown_020322A8[5] = {0};
|
||||
EWRAM_DATA static s32 sUnknown_020322BC[5] = {0};
|
||||
EWRAM_DATA static u32 sUnknown_020322D0 = 0;
|
||||
|
||||
// iwram
|
||||
// IWRAM bss
|
||||
IWRAM_DATA static s16 sUnknown_03000DE8[8];
|
||||
IWRAM_DATA static s16 sUnknown_03000DF8[6];
|
||||
IWRAM_DATA static s16 sUnknown_03000E04;
|
||||
IWRAM_DATA static s16 sUnknown_03000E06;
|
||||
|
||||
// IWRAM common
|
||||
u8 gInGameOpponentsNo;
|
||||
|
||||
// rom
|
||||
|
||||
static const u16 sBlenderCenterPal[] = INCBIN_U16("graphics/berry_blender/center.gbapal");
|
||||
|
||||
@@ -1,15 +1,22 @@
|
||||
#include "global.h"
|
||||
#include "battle_anim.h"
|
||||
#include "gpu_regs.h"
|
||||
#include "trig.h"
|
||||
#include "constants/rgb.h"
|
||||
|
||||
extern void sub_8110368(struct Sprite *);
|
||||
extern void sub_8110438(struct Sprite *);
|
||||
extern void sub_81104E4(struct Sprite *);
|
||||
extern void sub_81105B4(struct Sprite *);
|
||||
extern void sub_811067C(struct Sprite *);
|
||||
extern void sub_8110720(struct Sprite *);
|
||||
extern void sub_8110850(struct Sprite *);
|
||||
extern void sub_8110994(struct Sprite *);
|
||||
void sub_8110368(struct Sprite *);
|
||||
void sub_8110438(struct Sprite *);
|
||||
void sub_81104E4(struct Sprite *);
|
||||
void sub_81105B4(struct Sprite *);
|
||||
void sub_811067C(struct Sprite *);
|
||||
void AnimTranslateStinger(struct Sprite *);
|
||||
void AnimMissileArc(struct Sprite *);
|
||||
void sub_8110994(struct Sprite *);
|
||||
static void sub_811057C(struct Sprite *);
|
||||
static void sub_8110630(struct Sprite *);
|
||||
static void sub_81106A4(struct Sprite *);
|
||||
static void sub_8110700(struct Sprite *);
|
||||
static void AnimMissileArcStep(struct Sprite *);
|
||||
|
||||
const union AffineAnimCmd gUnknown_08596938[] =
|
||||
{
|
||||
@@ -136,7 +143,7 @@ const struct SpriteTemplate gLinearStingerSpriteTemplate =
|
||||
.anims = gDummySpriteAnimTable,
|
||||
.images = NULL,
|
||||
.affineAnims = gDummySpriteAffineAnimTable,
|
||||
.callback = sub_8110720,
|
||||
.callback = AnimTranslateStinger,
|
||||
};
|
||||
|
||||
const struct SpriteTemplate gPinMissileSpriteTemplate =
|
||||
@@ -147,7 +154,7 @@ const struct SpriteTemplate gPinMissileSpriteTemplate =
|
||||
.anims = gDummySpriteAnimTable,
|
||||
.images = NULL,
|
||||
.affineAnims = gDummySpriteAffineAnimTable,
|
||||
.callback = sub_8110850,
|
||||
.callback = AnimMissileArc,
|
||||
};
|
||||
|
||||
const struct SpriteTemplate gIcicleSpearSpriteTemplate =
|
||||
@@ -158,7 +165,7 @@ const struct SpriteTemplate gIcicleSpearSpriteTemplate =
|
||||
.anims = gDummySpriteAnimTable,
|
||||
.images = NULL,
|
||||
.affineAnims = gDummySpriteAffineAnimTable,
|
||||
.callback = sub_8110850,
|
||||
.callback = AnimMissileArc,
|
||||
};
|
||||
|
||||
const union AffineAnimCmd gUnknown_08596A8C[] =
|
||||
@@ -187,3 +194,291 @@ const struct SpriteTemplate gUnknown_08596AC8 =
|
||||
.affineAnims = gUnknown_08596AC4,
|
||||
.callback = sub_8110994,
|
||||
};
|
||||
|
||||
void sub_8110368(struct Sprite *sprite)
|
||||
{
|
||||
if (IsContest())
|
||||
{
|
||||
StartSpriteAffineAnim(sprite, 2);
|
||||
gBattleAnimArgs[2] = -gBattleAnimArgs[2];
|
||||
gBattleAnimArgs[0] = -gBattleAnimArgs[0];
|
||||
}
|
||||
else if (!GetBattlerSide(gBattleAnimTarget))
|
||||
{
|
||||
StartSpriteAffineAnim(sprite, 1);
|
||||
gBattleAnimArgs[1] = -gBattleAnimArgs[1];
|
||||
gBattleAnimArgs[2] = -gBattleAnimArgs[2];
|
||||
gBattleAnimArgs[3] = -gBattleAnimArgs[3];
|
||||
gBattleAnimArgs[0] = -gBattleAnimArgs[0];
|
||||
}
|
||||
|
||||
sprite->pos1.x = GetBattlerSpriteCoord2(gBattleAnimTarget, 2) + gBattleAnimArgs[0];
|
||||
sprite->pos1.y = GetBattlerSpriteCoord2(gBattleAnimTarget, 3) + gBattleAnimArgs[1];
|
||||
sprite->data[0] = gBattleAnimArgs[4];
|
||||
|
||||
sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimTarget, 2) + gBattleAnimArgs[2];
|
||||
sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimTarget, 3) + gBattleAnimArgs[3];
|
||||
|
||||
sprite->callback = StartAnimLinearTranslation;
|
||||
StoreSpriteCallbackInData6(sprite, DestroyAnimSprite);
|
||||
}
|
||||
|
||||
void sub_8110438(struct Sprite *sprite)
|
||||
{
|
||||
if (IsContest())
|
||||
{
|
||||
gBattleAnimArgs[0] = -gBattleAnimArgs[0];
|
||||
StartSpriteAffineAnim(sprite, 2);
|
||||
}
|
||||
else if (!GetBattlerSide(gBattleAnimTarget))
|
||||
{
|
||||
gBattleAnimArgs[1] = -gBattleAnimArgs[1];
|
||||
gBattleAnimArgs[0] = -gBattleAnimArgs[0];
|
||||
}
|
||||
|
||||
sprite->pos1.x = GetBattlerSpriteCoord2(gBattleAnimTarget, 2) + gBattleAnimArgs[0];
|
||||
sprite->pos1.y = GetBattlerSpriteCoord2(gBattleAnimTarget, 3) + gBattleAnimArgs[1];
|
||||
sprite->data[0] = gBattleAnimArgs[2];
|
||||
|
||||
sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimTarget, 2);
|
||||
sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimTarget, 3);
|
||||
|
||||
sprite->callback = StartAnimLinearTranslation;
|
||||
StoreSpriteCallbackInData6(sprite, DestroyAnimSprite);
|
||||
}
|
||||
|
||||
void sub_81104E4(struct Sprite *sprite)
|
||||
{
|
||||
if (IsContest())
|
||||
gBattleAnimArgs[2] /= 2;
|
||||
|
||||
InitAnimSpritePos(sprite, 1);
|
||||
sprite->data[0] = gBattleAnimArgs[2];
|
||||
sprite->data[1] = sprite->pos1.x;
|
||||
sprite->data[3] = sprite->pos1.y;
|
||||
|
||||
if (!gBattleAnimArgs[4])
|
||||
{
|
||||
sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimTarget, 2);
|
||||
sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimTarget, 3);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetAverageBattlerPositions(gBattleAnimTarget, 1, &sprite->data[2], &sprite->data[4]);
|
||||
}
|
||||
|
||||
sub_80A6FD4(sprite);
|
||||
sprite->data[5] = gBattleAnimArgs[3];
|
||||
sprite->callback = sub_811057C;
|
||||
}
|
||||
|
||||
static void sub_811057C(struct Sprite *sprite)
|
||||
{
|
||||
if (TranslateAnimLinear(sprite))
|
||||
{
|
||||
DestroyAnimSprite(sprite);
|
||||
return;
|
||||
}
|
||||
|
||||
sprite->pos2.x += Sin(sprite->data[6], sprite->data[5]);
|
||||
sprite->data[6] = (sprite->data[6] + 13) & 0xFF;
|
||||
}
|
||||
|
||||
void sub_81105B4(struct Sprite *sprite)
|
||||
{
|
||||
SetAverageBattlerPositions(gBattleAnimTarget, 0, &sprite->pos1.x, &sprite->pos1.y);
|
||||
if (GetBattlerSide(gBattleAnimAttacker))
|
||||
sprite->pos1.x -= gBattleAnimArgs[0];
|
||||
else
|
||||
sprite->pos1.x += gBattleAnimArgs[0];
|
||||
|
||||
sprite->pos1.y += gBattleAnimArgs[1];
|
||||
if (!GetBattlerSide(gBattleAnimTarget))
|
||||
sprite->pos1.y += 8;
|
||||
|
||||
sprite->callback = sub_8110630;
|
||||
}
|
||||
|
||||
static void sub_8110630(struct Sprite *sprite)
|
||||
{
|
||||
if (++sprite->data[0] == 3)
|
||||
{
|
||||
sprite->data[0] = 0;
|
||||
sprite->invisible ^= 1;
|
||||
}
|
||||
|
||||
if (++sprite->data[1] == 51)
|
||||
{
|
||||
DestroyAnimSprite(sprite);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_811067C(struct Sprite *sprite)
|
||||
{
|
||||
SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT2_ALL | BLDCNT_EFFECT_BLEND);
|
||||
SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(16, 0));
|
||||
|
||||
sprite->data[0] = 16;
|
||||
sprite->callback = sub_81106A4;
|
||||
}
|
||||
|
||||
static void sub_81106A4(struct Sprite *sprite)
|
||||
{
|
||||
if (sprite->data[2] < 20)
|
||||
{
|
||||
sprite->data[2]++;
|
||||
}
|
||||
else if (sprite->data[1]++ & 1)
|
||||
{
|
||||
sprite->data[0]--;
|
||||
SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(sprite->data[0], 16 - sprite->data[0]));
|
||||
|
||||
if (sprite->data[0] == 0)
|
||||
{
|
||||
sprite->invisible = TRUE;
|
||||
sprite->callback = sub_8110700;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void sub_8110700(struct Sprite *sprite)
|
||||
{
|
||||
SetGpuReg(REG_OFFSET_BLDCNT, 0);
|
||||
SetGpuReg(REG_OFFSET_BLDALPHA, 0);
|
||||
DestroyAnimSprite(sprite);
|
||||
}
|
||||
|
||||
// Translates a stinger sprite linearly to a destination location. The sprite is
|
||||
// initially rotated so that it appears to be traveling in a straight line.
|
||||
// arg 0: initial x pixel offset
|
||||
// arg 1: initial y pixel offset
|
||||
// arg 2: target x pixel offset
|
||||
// arg 3: target y pixel offset
|
||||
// arg 4: duration
|
||||
void AnimTranslateStinger(struct Sprite *sprite)
|
||||
{
|
||||
s16 lVarX, lVarY;
|
||||
u16 rot;
|
||||
|
||||
if (IsContest())
|
||||
{
|
||||
gBattleAnimArgs[2] = -gBattleAnimArgs[2];
|
||||
}
|
||||
else
|
||||
{
|
||||
if (GetBattlerSide(gBattleAnimAttacker))
|
||||
{
|
||||
gBattleAnimArgs[2] = -gBattleAnimArgs[2];
|
||||
gBattleAnimArgs[1] = -gBattleAnimArgs[1];
|
||||
gBattleAnimArgs[3] = -gBattleAnimArgs[3];
|
||||
}
|
||||
}
|
||||
|
||||
if (!IsContest() && GetBattlerSide(gBattleAnimAttacker) == GetBattlerSide(gBattleAnimTarget))
|
||||
{
|
||||
if (GetBattlerPosition(gBattleAnimTarget) == B_POSITION_PLAYER_LEFT
|
||||
|| GetBattlerPosition(gBattleAnimTarget) == B_POSITION_OPPONENT_LEFT)
|
||||
{
|
||||
s16 temp1, temp2;
|
||||
|
||||
temp1 = gBattleAnimArgs[2];
|
||||
gBattleAnimArgs[2] = -temp1;
|
||||
|
||||
temp2 = gBattleAnimArgs[0];
|
||||
gBattleAnimArgs[0] = -temp2;
|
||||
}
|
||||
}
|
||||
|
||||
InitAnimSpritePos(sprite, 1);
|
||||
|
||||
lVarX = GetBattlerSpriteCoord(gBattleAnimTarget, 2) + gBattleAnimArgs[2];
|
||||
lVarY = GetBattlerSpriteCoord(gBattleAnimTarget, 3) + gBattleAnimArgs[3];
|
||||
rot = ArcTan2Neg(lVarX - sprite->pos1.x, lVarY - sprite->pos1.y);
|
||||
rot += 0xC000;
|
||||
sub_80A73E0(sprite, FALSE, 0x100, 0x100, rot);
|
||||
|
||||
sprite->data[0] = gBattleAnimArgs[4];
|
||||
sprite->data[2] = lVarX;
|
||||
sprite->data[4] = lVarY;
|
||||
|
||||
sprite->callback = StartAnimLinearTranslation;
|
||||
StoreSpriteCallbackInData6(sprite, DestroyAnimSprite);
|
||||
}
|
||||
|
||||
// Rotates sprite and moves it in an arc, so that it appears like a missle or arrow traveling.
|
||||
// arg 0: initial x pixel offset
|
||||
// arg 1: initial y pixel offset
|
||||
// arg 2: target x pixel offset
|
||||
// arg 3: target y pixel offset
|
||||
// arg 4: duration
|
||||
// arg 5: wave amplitude
|
||||
void AnimMissileArc(struct Sprite *sprite)
|
||||
{
|
||||
InitAnimSpritePos(sprite, 1);
|
||||
|
||||
if (GetBattlerSide(gBattleAnimAttacker))
|
||||
gBattleAnimArgs[2] = -gBattleAnimArgs[2];
|
||||
|
||||
sprite->data[0] = gBattleAnimArgs[4];
|
||||
sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimTarget, 2) + gBattleAnimArgs[2];
|
||||
sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimTarget, 3) + gBattleAnimArgs[3];
|
||||
sprite->data[5] = gBattleAnimArgs[5];
|
||||
InitAnimArcTranslation(sprite);
|
||||
|
||||
sprite->callback = AnimMissileArcStep;
|
||||
sprite->invisible = TRUE;
|
||||
}
|
||||
|
||||
static void AnimMissileArcStep(struct Sprite *sprite)
|
||||
{
|
||||
sprite->invisible = FALSE;
|
||||
|
||||
if (TranslateAnimArc(sprite))
|
||||
{
|
||||
DestroyAnimSprite(sprite);
|
||||
}
|
||||
else
|
||||
{
|
||||
s16 tempData[8];
|
||||
u16 *data = sprite->data;
|
||||
u16 x1 = sprite->pos1.x;
|
||||
s16 x2 = sprite->pos2.x;
|
||||
u16 y1 = sprite->pos1.y;
|
||||
s16 y2 = sprite->pos2.y;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 8; i++)
|
||||
tempData[i] = data[i];
|
||||
|
||||
x2 += x1;
|
||||
y2 += y1;
|
||||
|
||||
if (!TranslateAnimArc(sprite))
|
||||
{
|
||||
u16 rotation = ArcTan2Neg(sprite->pos1.x + sprite->pos2.x - x2,
|
||||
sprite->pos1.y + sprite->pos2.y - y2);
|
||||
rotation += 0xC000;
|
||||
sub_80A73E0(sprite, FALSE, 0x100, 0x100, rotation);
|
||||
|
||||
for (i = 0; i < 8; i++)
|
||||
data[i] = tempData[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void sub_8110994(struct Sprite *sprite)
|
||||
{
|
||||
if (gBattleAnimArgs[0] == 0)
|
||||
{
|
||||
sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimAttacker, 2);
|
||||
sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimAttacker, 3) + 18;
|
||||
}
|
||||
else
|
||||
{
|
||||
sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimTarget, 2);
|
||||
sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimTarget, 3) + 18;
|
||||
}
|
||||
|
||||
StoreSpriteCallbackInData6(sprite, move_anim_8074EE0);
|
||||
sprite->callback = sub_80A67BC;
|
||||
}
|
||||
|
||||
+6
-6
@@ -31,7 +31,7 @@
|
||||
#include "constants/songs.h"
|
||||
|
||||
extern u8 gUnknown_02032298[2];
|
||||
extern u8 gUnknown_0203CEF8[];
|
||||
extern u8 gSelectedOrderFromParty[];
|
||||
|
||||
static const struct WindowTemplate gUnknown_08550594 = {
|
||||
.bg = 0,
|
||||
@@ -358,8 +358,8 @@ static void sub_80B2918(u8 taskId)
|
||||
sub_800AA04(gFieldLinkPlayerCount);
|
||||
card = (struct TrainerCard *)gBlockSendBuffer;
|
||||
TrainerCard_GenerateCardForPlayer(card);
|
||||
card->monSpecies[0] = GetMonData(&gPlayerParty[gUnknown_0203CEF8[0] - 1], MON_DATA_SPECIES, NULL);
|
||||
card->monSpecies[1] = GetMonData(&gPlayerParty[gUnknown_0203CEF8[1] - 1], MON_DATA_SPECIES, NULL);
|
||||
card->monSpecies[0] = GetMonData(&gPlayerParty[gSelectedOrderFromParty[0] - 1], MON_DATA_SPECIES, NULL);
|
||||
card->monSpecies[1] = GetMonData(&gPlayerParty[gSelectedOrderFromParty[1] - 1], MON_DATA_SPECIES, NULL);
|
||||
gTasks[taskId].func = sub_80B2C30;
|
||||
}
|
||||
}
|
||||
@@ -405,8 +405,8 @@ static void sub_80B2A08(u8 taskId)
|
||||
sub_800AA04(gFieldLinkPlayerCount);
|
||||
card = (struct TrainerCard *)gBlockSendBuffer;
|
||||
TrainerCard_GenerateCardForPlayer(card);
|
||||
card->monSpecies[0] = GetMonData(&gPlayerParty[gUnknown_0203CEF8[0] - 1], MON_DATA_SPECIES, NULL);
|
||||
card->monSpecies[1] = GetMonData(&gPlayerParty[gUnknown_0203CEF8[1] - 1], MON_DATA_SPECIES, NULL);
|
||||
card->monSpecies[0] = GetMonData(&gPlayerParty[gSelectedOrderFromParty[0] - 1], MON_DATA_SPECIES, NULL);
|
||||
card->monSpecies[1] = GetMonData(&gPlayerParty[gSelectedOrderFromParty[1] - 1], MON_DATA_SPECIES, NULL);
|
||||
gTasks[taskId].func = sub_80B2C30;
|
||||
sub_800A4D8(2);
|
||||
}
|
||||
@@ -800,7 +800,7 @@ static void sub_80B3260(int a0)
|
||||
gBattleTypeFlags = BATTLE_TYPE_DOUBLE | BATTLE_TYPE_LINK | BATTLE_TYPE_TRAINER;
|
||||
break;
|
||||
case 5:
|
||||
ReducePlayerPartyToThree();
|
||||
ReducePlayerPartyToSelectedMons();
|
||||
gBattleTypeFlags = BATTLE_TYPE_DOUBLE | BATTLE_TYPE_LINK | BATTLE_TYPE_TRAINER | BATTLE_TYPE_MULTI;
|
||||
break;
|
||||
case 9:
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#include "bg.h"
|
||||
#include "text_window.h"
|
||||
#include "constants/songs.h"
|
||||
#include "constants/rgb.h"
|
||||
|
||||
extern const u8 gText_ClearAllSaveData[];
|
||||
extern const u8 gText_ClearingData[];
|
||||
@@ -72,7 +73,7 @@ static const struct WindowTemplate sClearSaveYesNo[] =
|
||||
|
||||
void CB2_InitClearSaveDataScreen(void)
|
||||
{
|
||||
if(SetupClearSaveDataScreen())
|
||||
if (SetupClearSaveDataScreen())
|
||||
CreateTask(Task_DoClearSaveDataScreenYesNo, 0);
|
||||
}
|
||||
|
||||
@@ -86,18 +87,18 @@ static void Task_DoClearSaveDataScreenYesNo(u8 taskId)
|
||||
|
||||
static void Task_ClearSaveDataScreenYesNoChoice(u8 taskId)
|
||||
{
|
||||
switch(Menu_ProcessInputNoWrapClearOnChoose())
|
||||
switch (Menu_ProcessInputNoWrapClearOnChoose())
|
||||
{
|
||||
case 0:
|
||||
FillWindowPixelBuffer(0, 17);
|
||||
AddTextPrinterParameterized(0, 1, gText_ClearingData, 0, 1, 0, 0);
|
||||
gTasks[taskId].func = Task_ClearSaveData;
|
||||
break;
|
||||
case 1:
|
||||
case -1:
|
||||
PlaySE(SE_SELECT);
|
||||
DestroyTask(taskId);
|
||||
SetMainCallback2(CB2_FadeAndDoReset);
|
||||
case 0:
|
||||
FillWindowPixelBuffer(0, 17);
|
||||
AddTextPrinterParameterized(0, 1, gText_ClearingData, 0, 1, 0, 0);
|
||||
gTasks[taskId].func = Task_ClearSaveData;
|
||||
break;
|
||||
case 1:
|
||||
case -1:
|
||||
PlaySE(SE_SELECT);
|
||||
DestroyTask(taskId);
|
||||
SetMainCallback2(CB2_FadeAndDoReset);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -125,55 +126,55 @@ static bool8 SetupClearSaveDataScreen(void)
|
||||
|
||||
switch(gMain.state)
|
||||
{
|
||||
case 0:
|
||||
default:
|
||||
SetVBlankCallback(NULL);
|
||||
SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_MODE_0);
|
||||
SetGpuReg(REG_OFFSET_BG0HOFS, 0);
|
||||
SetGpuReg(REG_OFFSET_BG0VOFS, 0);
|
||||
SetGpuReg(REG_OFFSET_BG3HOFS, 0);
|
||||
SetGpuReg(REG_OFFSET_BG3VOFS, 0);
|
||||
SetGpuReg(REG_OFFSET_WIN0H, 0);
|
||||
SetGpuReg(REG_OFFSET_WIN0V, 0);
|
||||
SetGpuReg(REG_OFFSET_WININ, 0);
|
||||
SetGpuReg(REG_OFFSET_WINOUT, 0);
|
||||
SetGpuReg(REG_OFFSET_BLDCNT, 0);
|
||||
SetGpuReg(REG_OFFSET_BLDALPHA, 0);
|
||||
SetGpuReg(REG_OFFSET_BLDY, 0);
|
||||
DmaFill16(3, 0, (void *)VRAM, VRAM_SIZE);
|
||||
DmaFill32(3, 0, (void *)OAM, OAM_SIZE);
|
||||
DmaFill16(3, 0, (void *)(PLTT + 2), PLTT_SIZE - 2);
|
||||
ResetPaletteFade();
|
||||
gPlttBufferUnfaded[0] = 0x7fff;
|
||||
gPlttBufferFaded[0] = 0x7fff;
|
||||
gPlttBufferUnfaded[1] = 0x3945;
|
||||
gPlttBufferFaded[1] = 0x3945;
|
||||
for (i = 0; i < 0x10; i++)
|
||||
((u16 *)(VRAM + 0x20))[i] = 0x1111;
|
||||
case 0:
|
||||
default:
|
||||
SetVBlankCallback(NULL);
|
||||
SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_MODE_0);
|
||||
SetGpuReg(REG_OFFSET_BG0HOFS, 0);
|
||||
SetGpuReg(REG_OFFSET_BG0VOFS, 0);
|
||||
SetGpuReg(REG_OFFSET_BG3HOFS, 0);
|
||||
SetGpuReg(REG_OFFSET_BG3VOFS, 0);
|
||||
SetGpuReg(REG_OFFSET_WIN0H, 0);
|
||||
SetGpuReg(REG_OFFSET_WIN0V, 0);
|
||||
SetGpuReg(REG_OFFSET_WININ, 0);
|
||||
SetGpuReg(REG_OFFSET_WINOUT, 0);
|
||||
SetGpuReg(REG_OFFSET_BLDCNT, 0);
|
||||
SetGpuReg(REG_OFFSET_BLDALPHA, 0);
|
||||
SetGpuReg(REG_OFFSET_BLDY, 0);
|
||||
DmaFill16(3, 0, (void *)VRAM, VRAM_SIZE);
|
||||
DmaFill32(3, 0, (void *)OAM, OAM_SIZE);
|
||||
DmaFill16(3, 0, (void *)(PLTT + 2), PLTT_SIZE - 2);
|
||||
ResetPaletteFade();
|
||||
gPlttBufferUnfaded[0] = RGB_WHITE;
|
||||
gPlttBufferFaded[0] = RGB_WHITE;
|
||||
gPlttBufferUnfaded[1] = RGB(5, 10, 14);
|
||||
gPlttBufferFaded[1] = RGB(5, 10, 14);
|
||||
for (i = 0; i < 0x10; i++)
|
||||
((u16 *)(VRAM + 0x20))[i] = 0x1111;
|
||||
|
||||
for (i = 0; i < 0x400; i++)
|
||||
((u16 *)(VRAM + 0xF000))[i] = 0x0001;
|
||||
ResetTasks();
|
||||
ResetSpriteData();
|
||||
ResetBgsAndClearDma3BusyFlags(0);
|
||||
InitBgsFromTemplates(0, sClearSaveBgTemplates, ARRAY_COUNT(sClearSaveBgTemplates));
|
||||
SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_OBJ_ON | DISPCNT_OBJ_1D_MAP);
|
||||
ShowBg(0);
|
||||
ShowBg(3);
|
||||
SetGpuReg(REG_OFFSET_BLDCNT, 0);
|
||||
InitClearSaveDataScreenWindows();
|
||||
BeginNormalPaletteFade(0x0000FFFF, 0, 0x10, 0, 0xFFFF);
|
||||
EnableInterrupts(1);
|
||||
SetVBlankCallback(VBlankCB);
|
||||
gMain.state = 1;
|
||||
break;
|
||||
case 1:
|
||||
UpdatePaletteFade();
|
||||
if(!gPaletteFade.active)
|
||||
{
|
||||
SetMainCallback2(MainCB);
|
||||
return TRUE;
|
||||
}
|
||||
for (i = 0; i < 0x400; i++)
|
||||
((u16 *)(VRAM + 0xF000))[i] = 0x0001;
|
||||
ResetTasks();
|
||||
ResetSpriteData();
|
||||
ResetBgsAndClearDma3BusyFlags(0);
|
||||
InitBgsFromTemplates(0, sClearSaveBgTemplates, ARRAY_COUNT(sClearSaveBgTemplates));
|
||||
SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_OBJ_ON | DISPCNT_OBJ_1D_MAP);
|
||||
ShowBg(0);
|
||||
ShowBg(3);
|
||||
SetGpuReg(REG_OFFSET_BLDCNT, 0);
|
||||
InitClearSaveDataScreenWindows();
|
||||
BeginNormalPaletteFade(0x0000FFFF, 0, 0x10, 0, 0xFFFF);
|
||||
EnableInterrupts(INTR_FLAG_VBLANK);
|
||||
SetVBlankCallback(VBlankCB);
|
||||
gMain.state = 1;
|
||||
break;
|
||||
case 1:
|
||||
UpdatePaletteFade();
|
||||
if(!gPaletteFade.active)
|
||||
{
|
||||
SetMainCallback2(MainCB);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
@@ -182,18 +183,19 @@ static void CB2_FadeAndDoReset(void)
|
||||
{
|
||||
switch(gMain.state)
|
||||
{
|
||||
case 0:
|
||||
default:
|
||||
BeginNormalPaletteFade(0x0000FFFF, 0, 0, 0x10, 0xFFFF);
|
||||
gMain.state = 1;
|
||||
break;
|
||||
case 1:
|
||||
UpdatePaletteFade();
|
||||
if(!gPaletteFade.active)
|
||||
{
|
||||
FreeAllWindowBuffers();
|
||||
DoSoftReset();
|
||||
}
|
||||
case 0:
|
||||
default:
|
||||
BeginNormalPaletteFade(0x0000FFFF, 0, 0, 0x10, RGB_WHITEALPHA);
|
||||
gMain.state = 1;
|
||||
break;
|
||||
case 1:
|
||||
UpdatePaletteFade();
|
||||
if(!gPaletteFade.active)
|
||||
{
|
||||
FreeAllWindowBuffers();
|
||||
DoSoftReset();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+4
-16
@@ -193,19 +193,6 @@ EWRAM_DATA struct ContestWinner gUnknown_02039F3C = {0};
|
||||
|
||||
u32 gContestRngValue;
|
||||
|
||||
extern u16 gBattle_BG0_X;
|
||||
extern u16 gBattle_BG0_Y;
|
||||
extern u16 gBattle_BG1_X;
|
||||
extern s16 gBattle_BG1_Y;
|
||||
extern u16 gBattle_BG2_X;
|
||||
extern u16 gBattle_BG2_Y;
|
||||
extern u16 gBattle_BG3_X;
|
||||
extern u16 gBattle_BG3_Y;
|
||||
extern u16 gBattle_WIN0H;
|
||||
extern u16 gBattle_WIN0V;
|
||||
extern u16 gBattle_WIN1H;
|
||||
extern u16 gBattle_WIN1V;
|
||||
|
||||
extern const u16 gUnknown_08587C30[];
|
||||
extern const struct BgTemplate gUnknown_08587F34[4];
|
||||
extern const struct WindowTemplate gUnknown_08587F44[];
|
||||
@@ -638,7 +625,8 @@ void sub_80D8108(u8 taskId)
|
||||
gTasks[taskId].data[0]++;
|
||||
break;
|
||||
case 1:
|
||||
if ((gBattle_BG1_Y += 7) <= 160)
|
||||
(s16)gBattle_BG1_Y += 7;
|
||||
if ((s16)gBattle_BG1_Y <= 160)
|
||||
break;
|
||||
gTasks[taskId].data[0]++;
|
||||
break;
|
||||
@@ -1915,9 +1903,9 @@ void sub_80DA6B4(u8 taskId)
|
||||
void sub_80DA700(u8 taskId)
|
||||
{
|
||||
gBattle_BG1_Y -= 7;
|
||||
if (gBattle_BG1_Y < 0)
|
||||
if ((s16)gBattle_BG1_Y < 0)
|
||||
gBattle_BG1_Y = 0;
|
||||
if (*(u16 *)&gBattle_BG1_Y == 0) // Why cast?
|
||||
if (gBattle_BG1_Y == 0) // Why cast?
|
||||
{
|
||||
gTasks[taskId].func = sub_80DA740;
|
||||
gTasks[taskId].data[0] = 0;
|
||||
|
||||
@@ -4,8 +4,6 @@
|
||||
#include "contest_ai.h"
|
||||
#include "contest_effect.h"
|
||||
|
||||
extern u16 gContestMonConditions[];
|
||||
|
||||
extern const u8 *gAIScriptPtr;
|
||||
extern const u8 *gContestAIs[];
|
||||
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
#include "global.h"
|
||||
|
||||
// IWRAM bss
|
||||
IWRAM_DATA u8 gUnknown_030011F0;
|
||||
IWRAM_DATA u16 gUnknown_030011F2;
|
||||
IWRAM_DATA u16 gUnknown_030011F4;
|
||||
IWRAM_DATA u8 gUnknown_030011F6;
|
||||
IWRAM_DATA u8 gUnknown_030011F7;
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -47,211 +47,212 @@ const struct MonCoords gMonBackPicCoords[] =
|
||||
{0x66, 0x0a}, // SPECIES_GLOOM
|
||||
{0x87, 0x07}, // SPECIES_VILEPLUME
|
||||
{0x63, 0x14}, // SPECIES_PARAS
|
||||
{0x87, 0x07}, // SPECIES_VENONAT
|
||||
{0x77, 0x06}, // SPECIES_VENOMOTH
|
||||
{0x77, 0x04}, // SPECIES_DIGLETT
|
||||
{0x54, 0x10}, // SPECIES_DUGTRIO
|
||||
{0x66, 0x0b}, // SPECIES_MEOWTH
|
||||
{0x65, 0x0c}, // SPECIES_PERSIAN
|
||||
{0x87, 0x07}, // SPECIES_PSYDUCK
|
||||
{0x67, 0x07}, // SPECIES_GOLDUCK
|
||||
{0x77, 0x05}, // SPECIES_MANKEY
|
||||
{0x76, 0x0b}, // SPECIES_PRIMEAPE
|
||||
{0x77, 0x07}, // SPECIES_GROWLITHE
|
||||
{0x66, 0x08}, // SPECIES_ARCANINE
|
||||
{0x87, 0x06}, // SPECIES_POLIWAG
|
||||
{0x74, 0x10}, // SPECIES_POLIWHIRL
|
||||
{0x65, 0x0c}, // SPECIES_POLIWRATH
|
||||
{0x86, 0x0b}, // SPECIES_ABRA
|
||||
{0x66, 0x0b}, // SPECIES_KADABRA
|
||||
{0x76, 0x08}, // SPECIES_ALAKAZAM
|
||||
{0x67, 0x05}, // SPECIES_MACHOP
|
||||
{0x65, 0x0c}, // SPECIES_MACHOKE
|
||||
{0x76, 0x09}, // SPECIES_MACHAMP
|
||||
{0x67, 0x04}, // SPECIES_BELLSPROUT
|
||||
{0x66, 0x0a}, // SPECIES_WEEPINBELL
|
||||
{0x66, 0x09}, // SPECIES_VICTREEBEL
|
||||
{0x87, 0x06}, // SPECIES_TENTACOOL
|
||||
{0x56, 0x0a}, // SPECIES_TENTACRUEL
|
||||
{0x86, 0x0b}, // SPECIES_GEODUDE
|
||||
{0x66, 0x0b}, // SPECIES_GRAVELER
|
||||
{0x75, 0x0c}, // SPECIES_GOLEM
|
||||
{0x84, 0x10}, // SPECIES_PONYTA
|
||||
{0x66, 0x09}, // SPECIES_RAPIDASH
|
||||
{0x87, 0x05}, // SPECIES_SLOWPOKE
|
||||
{0x85, 0x0e}, // SPECIES_SLOWBRO
|
||||
{0x86, 0x0a}, // SPECIES_MAGNEMITE
|
||||
{0x43, 0x14}, // SPECIES_MAGNETON
|
||||
{0x87, 0x07}, // SPECIES_PARASECT
|
||||
{0x77, 0x06}, // SPECIES_VENONAT
|
||||
{0x77, 0x04}, // SPECIES_VENOMOTH
|
||||
{0x54, 0x10}, // SPECIES_DIGLETT
|
||||
{0x66, 0x0b}, // SPECIES_DUGTRIO
|
||||
{0x65, 0x0c}, // SPECIES_MEOWTH
|
||||
{0x87, 0x07}, // SPECIES_PERSIAN
|
||||
{0x67, 0x07}, // SPECIES_PSYDUCK
|
||||
{0x77, 0x05}, // SPECIES_GOLDUCK
|
||||
{0x76, 0x0b}, // SPECIES_MANKEY
|
||||
{0x77, 0x07}, // SPECIES_PRIMEAPE
|
||||
{0x66, 0x08}, // SPECIES_GROWLITHE
|
||||
{0x87, 0x06}, // SPECIES_ARCANINE
|
||||
{0x74, 0x10}, // SPECIES_POLIWAG
|
||||
{0x65, 0x0c}, // SPECIES_POLIWHIRL
|
||||
{0x86, 0x0b}, // SPECIES_POLIWRATH
|
||||
{0x66, 0x0b}, // SPECIES_ABRA
|
||||
{0x76, 0x08}, // SPECIES_KADABRA
|
||||
{0x67, 0x05}, // SPECIES_ALAKAZAM
|
||||
{0x65, 0x0c}, // SPECIES_MACHOP
|
||||
{0x76, 0x09}, // SPECIES_MACHOKE
|
||||
{0x67, 0x04}, // SPECIES_MACHAMP
|
||||
{0x66, 0x0a}, // SPECIES_BELLSPROUT
|
||||
{0x66, 0x09}, // SPECIES_WEEPINBELL
|
||||
{0x87, 0x06}, // SPECIES_VICTREEBEL
|
||||
{0x56, 0x0a}, // SPECIES_TENTACOOL
|
||||
{0x86, 0x0b}, // SPECIES_TENTACRUEL
|
||||
{0x66, 0x0b}, // SPECIES_GEODUDE
|
||||
{0x75, 0x0c}, // SPECIES_GRAVELER
|
||||
{0x84, 0x10}, // SPECIES_GOLEM
|
||||
{0x66, 0x09}, // SPECIES_PONYTA
|
||||
{0x87, 0x05}, // SPECIES_RAPIDASH
|
||||
{0x85, 0x0e}, // SPECIES_SLOWPOKE
|
||||
{0x86, 0x0a}, // SPECIES_SLOWBRO
|
||||
{0x43, 0x14}, // SPECIES_MAGNEMITE
|
||||
{0x66, 0x0a}, // SPECIES_MAGNETON
|
||||
{0x66, 0x0a}, // SPECIES_FARFETCHD
|
||||
{0x66, 0x0a}, // SPECIES_DODUO
|
||||
{0x66, 0x08}, // SPECIES_DODRIO
|
||||
{0x88, 0x01}, // SPECIES_SEEL
|
||||
{0x66, 0x0a}, // SPECIES_DEWGONG
|
||||
{0x77, 0x05}, // SPECIES_GRIMER
|
||||
{0x75, 0x0c}, // SPECIES_MUK
|
||||
{0x87, 0x05}, // SPECIES_SHELLDER
|
||||
{0x76, 0x0b}, // SPECIES_CLOYSTER
|
||||
{0x87, 0x06}, // SPECIES_GASTLY
|
||||
{0x85, 0x0e}, // SPECIES_HAUNTER
|
||||
{0x76, 0x08}, // SPECIES_GENGAR
|
||||
{0x76, 0x09}, // SPECIES_ONIX
|
||||
{0x78, 0x00}, // SPECIES_DROWZEE
|
||||
{0x65, 0x0d}, // SPECIES_HYPNO
|
||||
{0x66, 0x09}, // SPECIES_KRABBY
|
||||
{0x66, 0x0a}, // SPECIES_KINGLER
|
||||
{0x77, 0x04}, // SPECIES_VOLTORB
|
||||
{0x55, 0x0e}, // SPECIES_ELECTRODE
|
||||
{0x66, 0x08}, // SPECIES_DODUO
|
||||
{0x88, 0x01}, // SPECIES_DODRIO
|
||||
{0x66, 0x0a}, // SPECIES_SEEL
|
||||
{0x77, 0x05}, // SPECIES_DEWGONG
|
||||
{0x75, 0x0c}, // SPECIES_GRIMER
|
||||
{0x87, 0x05}, // SPECIES_MUK
|
||||
{0x76, 0x0b}, // SPECIES_SHELLDER
|
||||
{0x87, 0x06}, // SPECIES_CLOYSTER
|
||||
{0x85, 0x0e}, // SPECIES_GASTLY
|
||||
{0x76, 0x08}, // SPECIES_HAUNTER
|
||||
{0x76, 0x09}, // SPECIES_GENGAR
|
||||
{0x78, 0x00}, // SPECIES_ONIX
|
||||
{0x65, 0x0d}, // SPECIES_DROWZEE
|
||||
{0x66, 0x09}, // SPECIES_HYPNO
|
||||
{0x66, 0x0a}, // SPECIES_KRABBY
|
||||
{0x77, 0x04}, // SPECIES_KINGLER
|
||||
{0x55, 0x0e}, // SPECIES_VOLTORB
|
||||
{0x65, 0x0d}, // SPECIES_ELECTRODE
|
||||
{0x65, 0x0d}, // SPECIES_EXEGGCUTE
|
||||
{0x65, 0x0d}, // SPECIES_EXEGGUTOR
|
||||
{0x87, 0x04}, // SPECIES_CUBONE
|
||||
{0x66, 0x0a}, // SPECIES_MAROWAK
|
||||
{0x66, 0x08}, // SPECIES_HITMONLEE
|
||||
{0x87, 0x04}, // SPECIES_EXEGGUTOR
|
||||
{0x66, 0x0a}, // SPECIES_CUBONE
|
||||
{0x66, 0x08}, // SPECIES_MAROWAK
|
||||
{0x65, 0x0c}, // SPECIES_HITMONLEE
|
||||
{0x65, 0x0c}, // SPECIES_HITMONCHAN
|
||||
{0x65, 0x0c}, // SPECIES_LICKITUNG
|
||||
{0x65, 0x0e}, // SPECIES_KOFFING
|
||||
{0x66, 0x09}, // SPECIES_WEEZING
|
||||
{0x77, 0x06}, // SPECIES_RHYHORN
|
||||
{0x85, 0x0c}, // SPECIES_RHYDON
|
||||
{0x88, 0x03}, // SPECIES_CHANSEY
|
||||
{0x86, 0x0b}, // SPECIES_TANGELA
|
||||
{0x85, 0x0e}, // SPECIES_KANGASKHAN
|
||||
{0x77, 0x05}, // SPECIES_HORSEA
|
||||
{0x66, 0x09}, // SPECIES_SEADRA
|
||||
{0x65, 0x0e}, // SPECIES_LICKITUNG
|
||||
{0x66, 0x09}, // SPECIES_KOFFING
|
||||
{0x77, 0x06}, // SPECIES_WEEZING
|
||||
{0x85, 0x0c}, // SPECIES_RHYHORN
|
||||
{0x88, 0x03}, // SPECIES_RHYDON
|
||||
{0x86, 0x0b}, // SPECIES_CHANSEY
|
||||
{0x85, 0x0e}, // SPECIES_TANGELA
|
||||
{0x77, 0x05}, // SPECIES_KANGASKHAN
|
||||
{0x66, 0x09}, // SPECIES_HORSEA
|
||||
{0x66, 0x08}, // SPECIES_SEADRA
|
||||
{0x66, 0x08}, // SPECIES_GOLDEEN
|
||||
{0x66, 0x08}, // SPECIES_SEAKING
|
||||
{0x76, 0x0b}, // SPECIES_STARYU
|
||||
{0x65, 0x0d}, // SPECIES_STARMIE
|
||||
{0x85, 0x0e}, // SPECIES_MR_MIME
|
||||
{0x85, 0x0d}, // SPECIES_SCYTHER
|
||||
{0x77, 0x07}, // SPECIES_JYNX
|
||||
{0x86, 0x0a}, // SPECIES_ELECTABUZZ
|
||||
{0x76, 0x0b}, // SPECIES_SEAKING
|
||||
{0x65, 0x0d}, // SPECIES_STARYU
|
||||
{0x85, 0x0e}, // SPECIES_STARMIE
|
||||
{0x85, 0x0d}, // SPECIES_MR_MIME
|
||||
{0x77, 0x07}, // SPECIES_SCYTHER
|
||||
{0x86, 0x0a}, // SPECIES_JYNX
|
||||
{0x66, 0x08}, // SPECIES_ELECTABUZZ
|
||||
{0x66, 0x08}, // SPECIES_MAGMAR
|
||||
{0x66, 0x08}, // SPECIES_PINSIR
|
||||
{0x66, 0x09}, // SPECIES_TAUROS
|
||||
{0x85, 0x0d}, // SPECIES_MAGIKARP
|
||||
{0x76, 0x09}, // SPECIES_GYARADOS
|
||||
{0x78, 0x00}, // SPECIES_LAPRAS
|
||||
{0x77, 0x04}, // SPECIES_DITTO
|
||||
{0x54, 0x11}, // SPECIES_EEVEE
|
||||
{0x66, 0x09}, // SPECIES_PINSIR
|
||||
{0x85, 0x0d}, // SPECIES_TAUROS
|
||||
{0x76, 0x09}, // SPECIES_MAGIKARP
|
||||
{0x78, 0x00}, // SPECIES_GYARADOS
|
||||
{0x77, 0x04}, // SPECIES_LAPRAS
|
||||
{0x54, 0x11}, // SPECIES_DITTO
|
||||
{0x66, 0x0a}, // SPECIES_EEVEE
|
||||
{0x66, 0x0a}, // SPECIES_VAPOREON
|
||||
{0x66, 0x0a}, // SPECIES_JOLTEON
|
||||
{0x87, 0x06}, // SPECIES_FLAREON
|
||||
{0x67, 0x05}, // SPECIES_PORYGON
|
||||
{0x65, 0x0d}, // SPECIES_OMANYTE
|
||||
{0x66, 0x0a}, // SPECIES_OMASTAR
|
||||
{0x66, 0x08}, // SPECIES_KABUTO
|
||||
{0x65, 0x0d}, // SPECIES_KABUTOPS
|
||||
{0x77, 0x05}, // SPECIES_AERODACTYL
|
||||
{0x86, 0x08}, // SPECIES_SNORLAX
|
||||
{0x86, 0x0b}, // SPECIES_ARTICUNO
|
||||
{0x65, 0x0c}, // SPECIES_ZAPDOS
|
||||
{0x76, 0x0b}, // SPECIES_MOLTRES
|
||||
{0x87, 0x04}, // SPECIES_DRATINI
|
||||
{0x66, 0x09}, // SPECIES_DRAGONAIR
|
||||
{0x78, 0x00}, // SPECIES_DRAGONITE
|
||||
{0x87, 0x06}, // SPECIES_MEWTWO
|
||||
{0x78, 0x01}, // SPECIES_MEW
|
||||
{0x66, 0x08}, // SPECIES_CHIKORITA
|
||||
{0x56, 0x0a}, // SPECIES_BAYLEEF
|
||||
{0x66, 0x08}, // SPECIES_MEGANIUM
|
||||
{0x78, 0x00}, // SPECIES_CYNDAQUIL
|
||||
{0x76, 0x09}, // SPECIES_QUILAVA
|
||||
{0x87, 0x06}, // SPECIES_JOLTEON
|
||||
{0x67, 0x05}, // SPECIES_FLAREON
|
||||
{0x65, 0x0d}, // SPECIES_PORYGON
|
||||
{0x66, 0x0a}, // SPECIES_OMANYTE
|
||||
{0x66, 0x08}, // SPECIES_OMASTAR
|
||||
{0x65, 0x0d}, // SPECIES_KABUTO
|
||||
{0x77, 0x05}, // SPECIES_KABUTOPS
|
||||
{0x86, 0x08}, // SPECIES_AERODACTYL
|
||||
{0x86, 0x0b}, // SPECIES_SNORLAX
|
||||
{0x65, 0x0c}, // SPECIES_ARTICUNO
|
||||
{0x76, 0x0b}, // SPECIES_ZAPDOS
|
||||
{0x87, 0x04}, // SPECIES_MOLTRES
|
||||
{0x66, 0x09}, // SPECIES_DRATINI
|
||||
{0x78, 0x00}, // SPECIES_DRAGONAIR
|
||||
{0x87, 0x06}, // SPECIES_DRAGONITE
|
||||
{0x78, 0x01}, // SPECIES_MEWTWO
|
||||
{0x66, 0x08}, // SPECIES_MEW
|
||||
{0x56, 0x0a}, // SPECIES_CHIKORITA
|
||||
{0x66, 0x08}, // SPECIES_BAYLEEF
|
||||
{0x78, 0x00}, // SPECIES_MEGANIUM
|
||||
{0x76, 0x09}, // SPECIES_CYNDAQUIL
|
||||
{0x87, 0x04}, // SPECIES_QUILAVA
|
||||
{0x87, 0x04}, // SPECIES_TYPHLOSION
|
||||
{0x87, 0x04}, // SPECIES_TOTODILE
|
||||
{0x66, 0x0b}, // SPECIES_CROCONAW
|
||||
{0x67, 0x07}, // SPECIES_FERALIGATR
|
||||
{0x88, 0x01}, // SPECIES_SENTRET
|
||||
{0x67, 0x05}, // SPECIES_FURRET
|
||||
{0x66, 0x0b}, // SPECIES_TOTODILE
|
||||
{0x67, 0x07}, // SPECIES_CROCONAW
|
||||
{0x88, 0x01}, // SPECIES_FERALIGATR
|
||||
{0x67, 0x05}, // SPECIES_SENTRET
|
||||
{0x66, 0x08}, // SPECIES_FURRET
|
||||
{0x66, 0x08}, // SPECIES_HOOTHOOT
|
||||
{0x66, 0x08}, // SPECIES_NOCTOWL
|
||||
{0x68, 0x03}, // SPECIES_LEDYBA
|
||||
{0x76, 0x0b}, // SPECIES_LEDIAN
|
||||
{0x77, 0x07}, // SPECIES_SPINARAK
|
||||
{0x73, 0x15}, // SPECIES_ARIADOS
|
||||
{0x86, 0x0b}, // SPECIES_CROBAT
|
||||
{0x87, 0x05}, // SPECIES_CHINCHOU
|
||||
{0x68, 0x03}, // SPECIES_NOCTOWL
|
||||
{0x76, 0x0b}, // SPECIES_LEDYBA
|
||||
{0x77, 0x07}, // SPECIES_LEDIAN
|
||||
{0x73, 0x15}, // SPECIES_SPINARAK
|
||||
{0x86, 0x0b}, // SPECIES_ARIADOS
|
||||
{0x87, 0x05}, // SPECIES_CROBAT
|
||||
{0x86, 0x08}, // SPECIES_CHINCHOU
|
||||
{0x86, 0x08}, // SPECIES_LANTURN
|
||||
{0x86, 0x08}, // SPECIES_PICHU
|
||||
{0x66, 0x0b}, // SPECIES_CLEFFA
|
||||
{0x65, 0x0f}, // SPECIES_IGGLYBUFF
|
||||
{0x66, 0x0b}, // SPECIES_TOGEPI
|
||||
{0x54, 0x10}, // SPECIES_TOGETIC
|
||||
{0x66, 0x08}, // SPECIES_NATU
|
||||
{0x54, 0x11}, // SPECIES_XATU
|
||||
{0x76, 0x08}, // SPECIES_MAREEP
|
||||
{0x66, 0x0b}, // SPECIES_PICHU
|
||||
{0x65, 0x0f}, // SPECIES_CLEFFA
|
||||
{0x66, 0x0b}, // SPECIES_IGGLYBUFF
|
||||
{0x54, 0x10}, // SPECIES_TOGEPI
|
||||
{0x66, 0x08}, // SPECIES_TOGETIC
|
||||
{0x54, 0x11}, // SPECIES_NATU
|
||||
{0x76, 0x08}, // SPECIES_XATU
|
||||
{0x66, 0x09}, // SPECIES_MAREEP
|
||||
{0x66, 0x09}, // SPECIES_FLAAFFY
|
||||
{0x66, 0x09}, // SPECIES_AMPHAROS
|
||||
{0x88, 0x01}, // SPECIES_BELLOSSOM
|
||||
{0x66, 0x0b}, // SPECIES_MARILL
|
||||
{0x75, 0x0c}, // SPECIES_AZUMARILL
|
||||
{0x86, 0x08}, // SPECIES_SUDOWOODO
|
||||
{0x66, 0x08}, // SPECIES_POLITOED
|
||||
{0x66, 0x09}, // SPECIES_HOPPIP
|
||||
{0x66, 0x0b}, // SPECIES_SKIPLOOM
|
||||
{0x65, 0x0d}, // SPECIES_JUMPLUFF
|
||||
{0x87, 0x04}, // SPECIES_AIPOM
|
||||
{0x66, 0x09}, // SPECIES_SUNKERN
|
||||
{0x56, 0x0a}, // SPECIES_SUNFLORA
|
||||
{0x66, 0x08}, // SPECIES_YANMA
|
||||
{0x77, 0x04}, // SPECIES_WOOPER
|
||||
{0x85, 0x0f}, // SPECIES_QUAGSIRE
|
||||
{0x76, 0x08}, // SPECIES_ESPEON
|
||||
{0x76, 0x0b}, // SPECIES_UMBREON
|
||||
{0x87, 0x04}, // SPECIES_MURKROW
|
||||
{0x66, 0x09}, // SPECIES_SLOWKING
|
||||
{0x66, 0x08}, // SPECIES_MISDREAVUS
|
||||
{0x66, 0x0a}, // SPECIES_UNOWN
|
||||
{0x36, 0x08}, // SPECIES_WOBBUFFET
|
||||
{0x75, 0x0c}, // SPECIES_GIRAFARIG
|
||||
{0x87, 0x05}, // SPECIES_PINECO
|
||||
{0x65, 0x0f}, // SPECIES_FORRETRESS
|
||||
{0x84, 0x10}, // SPECIES_DUNSPARCE
|
||||
{0x85, 0x0f}, // SPECIES_GLIGAR
|
||||
{0x87, 0x05}, // SPECIES_STEELIX
|
||||
{0x88, 0x00}, // SPECIES_SNUBBULL
|
||||
{0x76, 0x0a}, // SPECIES_GRANBULL
|
||||
{0x87, 0x05}, // SPECIES_QWILFISH
|
||||
{0x77, 0x07}, // SPECIES_SCIZOR
|
||||
{0x77, 0x04}, // SPECIES_SHUCKLE
|
||||
{0x56, 0x0b}, // SPECIES_HERACROSS
|
||||
{0x77, 0x04}, // SPECIES_SNEASEL
|
||||
{0x88, 0x01}, // SPECIES_AMPHAROS
|
||||
{0x66, 0x0b}, // SPECIES_BELLOSSOM
|
||||
{0x75, 0x0c}, // SPECIES_MARILL
|
||||
{0x86, 0x08}, // SPECIES_AZUMARILL
|
||||
{0x66, 0x08}, // SPECIES_SUDOWOODO
|
||||
{0x66, 0x09}, // SPECIES_POLITOED
|
||||
{0x66, 0x0b}, // SPECIES_HOPPIP
|
||||
{0x65, 0x0d}, // SPECIES_SKIPLOOM
|
||||
{0x87, 0x04}, // SPECIES_JUMPLUFF
|
||||
{0x66, 0x09}, // SPECIES_AIPOM
|
||||
{0x56, 0x0a}, // SPECIES_SUNKERN
|
||||
{0x66, 0x08}, // SPECIES_SUNFLORA
|
||||
{0x77, 0x04}, // SPECIES_YANMA
|
||||
{0x85, 0x0f}, // SPECIES_WOOPER
|
||||
{0x76, 0x08}, // SPECIES_QUAGSIRE
|
||||
{0x76, 0x0b}, // SPECIES_ESPEON
|
||||
{0x87, 0x04}, // SPECIES_UMBREON
|
||||
{0x66, 0x09}, // SPECIES_MURKROW
|
||||
{0x66, 0x08}, // SPECIES_SLOWKING
|
||||
{0x66, 0x0a}, // SPECIES_MISDREAVUS
|
||||
{0x36, 0x08}, // SPECIES_UNOWN
|
||||
{0x75, 0x0c}, // SPECIES_WOBBUFFET
|
||||
{0x87, 0x05}, // SPECIES_GIRAFARIG
|
||||
{0x65, 0x0f}, // SPECIES_PINECO
|
||||
{0x84, 0x10}, // SPECIES_FORRETRESS
|
||||
{0x85, 0x0f}, // SPECIES_DUNSPARCE
|
||||
{0x87, 0x05}, // SPECIES_GLIGAR
|
||||
{0x88, 0x00}, // SPECIES_STEELIX
|
||||
{0x76, 0x0a}, // SPECIES_SNUBBULL
|
||||
{0x87, 0x05}, // SPECIES_GRANBULL
|
||||
{0x77, 0x07}, // SPECIES_QWILFISH
|
||||
{0x77, 0x04}, // SPECIES_SCIZOR
|
||||
{0x56, 0x0b}, // SPECIES_SHUCKLE
|
||||
{0x77, 0x04}, // SPECIES_HERACROSS
|
||||
{0x66, 0x08}, // SPECIES_SNEASEL
|
||||
{0x66, 0x08}, // SPECIES_TEDDIURSA
|
||||
{0x66, 0x08}, // SPECIES_URSARING
|
||||
{0x88, 0x03}, // SPECIES_SLUGMA
|
||||
{0x66, 0x08}, // SPECIES_MAGCARGO
|
||||
{0x76, 0x09}, // SPECIES_SWINUB
|
||||
{0x63, 0x15}, // SPECIES_PILOSWINE
|
||||
{0x75, 0x0d}, // SPECIES_CORSOLA
|
||||
{0x65, 0x0c}, // SPECIES_REMORAID
|
||||
{0x75, 0x0d}, // SPECIES_OCTILLERY
|
||||
{0x66, 0x0a}, // SPECIES_DELIBIRD
|
||||
{0x67, 0x06}, // SPECIES_MANTINE
|
||||
{0x87, 0x07}, // SPECIES_SKARMORY
|
||||
{0x87, 0x04}, // SPECIES_HOUNDOUR
|
||||
{0x55, 0x0c}, // SPECIES_HOUNDOOM
|
||||
{0x87, 0x07}, // SPECIES_KINGDRA
|
||||
{0x87, 0x06}, // SPECIES_PHANPY
|
||||
{0x65, 0x0e}, // SPECIES_DONPHAN
|
||||
{0x85, 0x0d}, // SPECIES_PORYGON2
|
||||
{0x76, 0x0a}, // SPECIES_STANTLER
|
||||
{0x78, 0x03}, // SPECIES_SMEARGLE
|
||||
{0x76, 0x0a}, // SPECIES_TYROGUE
|
||||
{0x66, 0x08}, // SPECIES_HITMONTOP
|
||||
{0x87, 0x05}, // SPECIES_SMOOCHUM
|
||||
{0x56, 0x09}, // SPECIES_ELEKID
|
||||
{0x66, 0x08}, // SPECIES_MAGBY
|
||||
{0x66, 0x0b}, // SPECIES_MILTANK
|
||||
{0x87, 0x07}, // SPECIES_BLISSEY
|
||||
{0x85, 0x0d}, // SPECIES_RAIKOU
|
||||
{0x86, 0x0a}, // SPECIES_ENTEI
|
||||
{0x87, 0x06}, // SPECIES_SUICUNE
|
||||
{0x88, 0x03}, // SPECIES_LARVITAR
|
||||
{0x66, 0x08}, // SPECIES_PUPITAR
|
||||
{0x67, 0x05}, // SPECIES_TYRANITAR
|
||||
{0x88, 0x00}, // SPECIES_LUGIA
|
||||
{0x88, 0x03}, // SPECIES_URSARING
|
||||
{0x66, 0x08}, // SPECIES_SLUGMA
|
||||
{0x76, 0x09}, // SPECIES_MAGCARGO
|
||||
{0x63, 0x15}, // SPECIES_SWINUB
|
||||
{0x75, 0x0d}, // SPECIES_PILOSWINE
|
||||
{0x65, 0x0c}, // SPECIES_CORSOLA
|
||||
{0x75, 0x0d}, // SPECIES_REMORAID
|
||||
{0x66, 0x0a}, // SPECIES_OCTILLERY
|
||||
{0x67, 0x06}, // SPECIES_DELIBIRD
|
||||
{0x87, 0x07}, // SPECIES_MANTINE
|
||||
{0x87, 0x04}, // SPECIES_SKARMORY
|
||||
{0x55, 0x0c}, // SPECIES_HOUNDOUR
|
||||
{0x87, 0x07}, // SPECIES_HOUNDOOM
|
||||
{0x87, 0x06}, // SPECIES_KINGDRA
|
||||
{0x65, 0x0e}, // SPECIES_PHANPY
|
||||
{0x85, 0x0d}, // SPECIES_DONPHAN
|
||||
{0x76, 0x0a}, // SPECIES_PORYGON2
|
||||
{0x78, 0x03}, // SPECIES_STANTLER
|
||||
{0x76, 0x0a}, // SPECIES_SMEARGLE
|
||||
{0x66, 0x08}, // SPECIES_TYROGUE
|
||||
{0x87, 0x05}, // SPECIES_HITMONTOP
|
||||
{0x56, 0x09}, // SPECIES_SMOOCHUM
|
||||
{0x66, 0x08}, // SPECIES_ELEKID
|
||||
{0x66, 0x0b}, // SPECIES_MAGBY
|
||||
{0x87, 0x07}, // SPECIES_MILTANK
|
||||
{0x85, 0x0d}, // SPECIES_BLISSEY
|
||||
{0x86, 0x0a}, // SPECIES_RAIKOU
|
||||
{0x87, 0x06}, // SPECIES_ENTEI
|
||||
{0x88, 0x03}, // SPECIES_SUICUNE
|
||||
{0x66, 0x08}, // SPECIES_LARVITAR
|
||||
{0x67, 0x05}, // SPECIES_PUPITAR
|
||||
{0x88, 0x00}, // SPECIES_TYRANITAR
|
||||
{0x88, 0x01}, // SPECIES_LUGIA
|
||||
{0x88, 0x01}, // SPECIES_HO_OH
|
||||
{0x88, 0x01}, // SPECIES_CELEBI
|
||||
{0x66, 0x08}, // SPECIES_OLD_UNOWN_B
|
||||
{0x66, 0x08}, // SPECIES_CELEBI
|
||||
{0x88, 0x02}, // SPECIES_OLD_UNOWN_B
|
||||
{0x88, 0x02}, // SPECIES_OLD_UNOWN_C
|
||||
{0x88, 0x02}, // SPECIES_OLD_UNOWN_D
|
||||
{0x88, 0x02}, // SPECIES_OLD_UNOWN_E
|
||||
@@ -276,168 +277,167 @@ const struct MonCoords gMonBackPicCoords[] =
|
||||
{0x88, 0x02}, // SPECIES_OLD_UNOWN_X
|
||||
{0x88, 0x02}, // SPECIES_OLD_UNOWN_Y
|
||||
{0x88, 0x02}, // SPECIES_OLD_UNOWN_Z
|
||||
{0x88, 0x02}, // SPECIES_TREECKO
|
||||
{0x87, 0x06}, // SPECIES_GROVYLE
|
||||
{0x86, 0x08}, // SPECIES_SCEPTILE
|
||||
{0x88, 0x01}, // SPECIES_TORCHIC
|
||||
{0x67, 0x05}, // SPECIES_COMBUSKEN
|
||||
{0x87, 0x06}, // SPECIES_TREECKO
|
||||
{0x86, 0x08}, // SPECIES_GROVYLE
|
||||
{0x88, 0x01}, // SPECIES_SCEPTILE
|
||||
{0x67, 0x05}, // SPECIES_TORCHIC
|
||||
{0x88, 0x00}, // SPECIES_COMBUSKEN
|
||||
{0x88, 0x00}, // SPECIES_BLAZIKEN
|
||||
{0x88, 0x00}, // SPECIES_MUDKIP
|
||||
{0x77, 0x05}, // SPECIES_MARSHTOMP
|
||||
{0x87, 0x04}, // SPECIES_SWAMPERT
|
||||
{0x87, 0x05}, // SPECIES_POOCHYENA
|
||||
{0x76, 0x09}, // SPECIES_MIGHTYENA
|
||||
{0x87, 0x04}, // SPECIES_ZIGZAGOON
|
||||
{0x76, 0x0b}, // SPECIES_LINOONE
|
||||
{0x85, 0x0f}, // SPECIES_WURMPLE
|
||||
{0x76, 0x0b}, // SPECIES_SILCOON
|
||||
{0x83, 0x15}, // SPECIES_BEAUTIFLY
|
||||
{0x88, 0x00}, // SPECIES_CASCOON
|
||||
{0x73, 0x14}, // SPECIES_DUSTOX
|
||||
{0x83, 0x14}, // SPECIES_LOTAD
|
||||
{0x75, 0x0f}, // SPECIES_LOMBRE
|
||||
{0x86, 0x08}, // SPECIES_LUDICOLO
|
||||
{0x86, 0x0a}, // SPECIES_SEEDOT
|
||||
{0x86, 0x09}, // SPECIES_NUZLEAF
|
||||
{0x76, 0x0a}, // SPECIES_SHIFTRY
|
||||
{0x86, 0x08}, // SPECIES_NINCADA
|
||||
{0x83, 0x14}, // SPECIES_NINJASK
|
||||
{0x86, 0x08}, // SPECIES_SHEDINJA
|
||||
{0x77, 0x06}, // SPECIES_TAILLOW
|
||||
{0x64, 0x11}, // SPECIES_SWELLOW
|
||||
{0x86, 0x08}, // SPECIES_SHROOMISH
|
||||
{0x85, 0x0d}, // SPECIES_BRELOOM
|
||||
{0x87, 0x04}, // SPECIES_SPINDA
|
||||
{0x77, 0x04}, // SPECIES_WINGULL
|
||||
{0x85, 0x0e}, // SPECIES_PELIPPER
|
||||
{0x87, 0x06}, // SPECIES_SURSKIT
|
||||
{0x86, 0x0b}, // SPECIES_MASQUERAIN
|
||||
{0x88, 0x00}, // SPECIES_WAILMER
|
||||
{0x83, 0x15}, // SPECIES_WAILORD
|
||||
{0x83, 0x16}, // SPECIES_SKITTY
|
||||
{0x86, 0x0a}, // SPECIES_DELCATTY
|
||||
{0x86, 0x08}, // SPECIES_KECLEON
|
||||
{0x87, 0x06}, // SPECIES_BALTOY
|
||||
{0x86, 0x08}, // SPECIES_CLAYDOL
|
||||
{0x87, 0x07}, // SPECIES_NOSEPASS
|
||||
{0x85, 0x0c}, // SPECIES_TORKOAL
|
||||
{0x86, 0x0a}, // SPECIES_SABLEYE
|
||||
{0x76, 0x08}, // SPECIES_BARBOACH
|
||||
{0x66, 0x0a}, // SPECIES_WHISCASH
|
||||
{0x86, 0x0a}, // SPECIES_LUVDISC
|
||||
{0x46, 0x0a}, // SPECIES_CORPHISH
|
||||
{0x77, 0x07}, // SPECIES_CRAWDAUNT
|
||||
{0x87, 0x05}, // SPECIES_FEEBAS
|
||||
{0x67, 0x07}, // SPECIES_MILOTIC
|
||||
{0x68, 0x02}, // SPECIES_CARVANHA
|
||||
{0x87, 0x07}, // SPECIES_SHARPEDO
|
||||
{0x88, 0x02}, // SPECIES_TRAPINCH
|
||||
{0x75, 0x0e}, // SPECIES_VIBRAVA
|
||||
{0x74, 0x11}, // SPECIES_FLYGON
|
||||
{0x88, 0x02}, // SPECIES_MAKUHITA
|
||||
{0x76, 0x0b}, // SPECIES_HARIYAMA
|
||||
{0x87, 0x07}, // SPECIES_ELECTRIKE
|
||||
{0x84, 0x10}, // SPECIES_MANECTRIC
|
||||
{0x87, 0x04}, // SPECIES_NUMEL
|
||||
{0x86, 0x0b}, // SPECIES_CAMERUPT
|
||||
{0x84, 0x13}, // SPECIES_SPHEAL
|
||||
{0x64, 0x12}, // SPECIES_SEALEO
|
||||
{0x86, 0x0a}, // SPECIES_WALREIN
|
||||
{0x87, 0x06}, // SPECIES_CACNEA
|
||||
{0x85, 0x0f}, // SPECIES_CACTURNE
|
||||
{0x87, 0x07}, // SPECIES_SNORUNT
|
||||
{0x76, 0x0a}, // SPECIES_GLALIE
|
||||
{0x85, 0x0c}, // SPECIES_LUNATONE
|
||||
{0x77, 0x05}, // SPECIES_MUDKIP
|
||||
{0x87, 0x04}, // SPECIES_MARSHTOMP
|
||||
{0x87, 0x05}, // SPECIES_SWAMPERT
|
||||
{0x76, 0x09}, // SPECIES_POOCHYENA
|
||||
{0x87, 0x04}, // SPECIES_MIGHTYENA
|
||||
{0x76, 0x0b}, // SPECIES_ZIGZAGOON
|
||||
{0x85, 0x0f}, // SPECIES_LINOONE
|
||||
{0x76, 0x0b}, // SPECIES_WURMPLE
|
||||
{0x83, 0x15}, // SPECIES_SILCOON
|
||||
{0x88, 0x00}, // SPECIES_BEAUTIFLY
|
||||
{0x73, 0x14}, // SPECIES_CASCOON
|
||||
{0x83, 0x14}, // SPECIES_DUSTOX
|
||||
{0x75, 0x0f}, // SPECIES_LOTAD
|
||||
{0x86, 0x08}, // SPECIES_LOMBRE
|
||||
{0x86, 0x0a}, // SPECIES_LUDICOLO
|
||||
{0x86, 0x09}, // SPECIES_SEEDOT
|
||||
{0x76, 0x0a}, // SPECIES_NUZLEAF
|
||||
{0x86, 0x08}, // SPECIES_SHIFTRY
|
||||
{0x83, 0x14}, // SPECIES_NINCADA
|
||||
{0x86, 0x08}, // SPECIES_NINJASK
|
||||
{0x77, 0x06}, // SPECIES_SHEDINJA
|
||||
{0x64, 0x11}, // SPECIES_TAILLOW
|
||||
{0x86, 0x08}, // SPECIES_SWELLOW
|
||||
{0x85, 0x0d}, // SPECIES_SHROOMISH
|
||||
{0x87, 0x04}, // SPECIES_BRELOOM
|
||||
{0x77, 0x04}, // SPECIES_SPINDA
|
||||
{0x85, 0x0e}, // SPECIES_WINGULL
|
||||
{0x87, 0x06}, // SPECIES_PELIPPER
|
||||
{0x86, 0x0b}, // SPECIES_SURSKIT
|
||||
{0x88, 0x00}, // SPECIES_MASQUERAIN
|
||||
{0x83, 0x15}, // SPECIES_WAILMER
|
||||
{0x83, 0x16}, // SPECIES_WAILORD
|
||||
{0x86, 0x0a}, // SPECIES_SKITTY
|
||||
{0x86, 0x08}, // SPECIES_DELCATTY
|
||||
{0x87, 0x06}, // SPECIES_KECLEON
|
||||
{0x86, 0x08}, // SPECIES_BALTOY
|
||||
{0x87, 0x07}, // SPECIES_CLAYDOL
|
||||
{0x85, 0x0c}, // SPECIES_NOSEPASS
|
||||
{0x86, 0x0a}, // SPECIES_TORKOAL
|
||||
{0x76, 0x08}, // SPECIES_SABLEYE
|
||||
{0x66, 0x0a}, // SPECIES_BARBOACH
|
||||
{0x86, 0x0a}, // SPECIES_WHISCASH
|
||||
{0x46, 0x0a}, // SPECIES_LUVDISC
|
||||
{0x77, 0x07}, // SPECIES_CORPHISH
|
||||
{0x87, 0x05}, // SPECIES_CRAWDAUNT
|
||||
{0x67, 0x07}, // SPECIES_FEEBAS
|
||||
{0x68, 0x02}, // SPECIES_MILOTIC
|
||||
{0x87, 0x07}, // SPECIES_CARVANHA
|
||||
{0x88, 0x02}, // SPECIES_SHARPEDO
|
||||
{0x75, 0x0e}, // SPECIES_TRAPINCH
|
||||
{0x74, 0x11}, // SPECIES_VIBRAVA
|
||||
{0x88, 0x02}, // SPECIES_FLYGON
|
||||
{0x76, 0x0b}, // SPECIES_MAKUHITA
|
||||
{0x87, 0x07}, // SPECIES_HARIYAMA
|
||||
{0x84, 0x10}, // SPECIES_ELECTRIKE
|
||||
{0x87, 0x04}, // SPECIES_MANECTRIC
|
||||
{0x86, 0x0b}, // SPECIES_NUMEL
|
||||
{0x84, 0x13}, // SPECIES_CAMERUPT
|
||||
{0x64, 0x12}, // SPECIES_SPHEAL
|
||||
{0x86, 0x0a}, // SPECIES_SEALEO
|
||||
{0x87, 0x06}, // SPECIES_WALREIN
|
||||
{0x85, 0x0f}, // SPECIES_CACNEA
|
||||
{0x87, 0x07}, // SPECIES_CACTURNE
|
||||
{0x76, 0x0a}, // SPECIES_SNORUNT
|
||||
{0x85, 0x0c}, // SPECIES_GLALIE
|
||||
{0x87, 0x05}, // SPECIES_LUNATONE
|
||||
{0x87, 0x05}, // SPECIES_SOLROCK
|
||||
{0x87, 0x05}, // SPECIES_AZURILL
|
||||
{0x86, 0x0a}, // SPECIES_SPOINK
|
||||
{0x56, 0x0b}, // SPECIES_GRUMPIG
|
||||
{0x87, 0x04}, // SPECIES_PLUSLE
|
||||
{0x86, 0x0a}, // SPECIES_AZURILL
|
||||
{0x56, 0x0b}, // SPECIES_SPOINK
|
||||
{0x87, 0x04}, // SPECIES_GRUMPIG
|
||||
{0x76, 0x08}, // SPECIES_PLUSLE
|
||||
{0x76, 0x08}, // SPECIES_MINUN
|
||||
{0x76, 0x08}, // SPECIES_MAWILE
|
||||
{0x87, 0x04}, // SPECIES_MEDITITE
|
||||
{0x76, 0x0b}, // SPECIES_MEDICHAM
|
||||
{0x68, 0x03}, // SPECIES_SWABLU
|
||||
{0x86, 0x09}, // SPECIES_ALTARIA
|
||||
{0x87, 0x06}, // SPECIES_WYNAUT
|
||||
{0x77, 0x07}, // SPECIES_DUSKULL
|
||||
{0x66, 0x0b}, // SPECIES_DUSCLOPS
|
||||
{0x87, 0x04}, // SPECIES_MAWILE
|
||||
{0x76, 0x0b}, // SPECIES_MEDITITE
|
||||
{0x68, 0x03}, // SPECIES_MEDICHAM
|
||||
{0x86, 0x09}, // SPECIES_SWABLU
|
||||
{0x87, 0x06}, // SPECIES_ALTARIA
|
||||
{0x77, 0x07}, // SPECIES_WYNAUT
|
||||
{0x66, 0x0b}, // SPECIES_DUSKULL
|
||||
{0x86, 0x08}, // SPECIES_DUSCLOPS
|
||||
{0x86, 0x08}, // SPECIES_ROSELIA
|
||||
{0x86, 0x08}, // SPECIES_SLAKOTH
|
||||
{0x85, 0x0f}, // SPECIES_VIGOROTH
|
||||
{0x86, 0x0a}, // SPECIES_SLAKING
|
||||
{0x86, 0x08}, // SPECIES_GULPIN
|
||||
{0x66, 0x0b}, // SPECIES_SWALOT
|
||||
{0x77, 0x06}, // SPECIES_TROPIUS
|
||||
{0x87, 0x07}, // SPECIES_WHISMUR
|
||||
{0x85, 0x0d}, // SPECIES_LOUDRED
|
||||
{0x86, 0x09}, // SPECIES_EXPLOUD
|
||||
{0x88, 0x03}, // SPECIES_CLAMPERL
|
||||
{0x85, 0x0d}, // SPECIES_HUNTAIL
|
||||
{0x68, 0x02}, // SPECIES_GOREBYSS
|
||||
{0x77, 0x05}, // SPECIES_ABSOL
|
||||
{0x78, 0x03}, // SPECIES_SHUPPET
|
||||
{0x77, 0x06}, // SPECIES_BANETTE
|
||||
{0x65, 0x0c}, // SPECIES_SEVIPER
|
||||
{0x88, 0x03}, // SPECIES_ZANGOOSE
|
||||
{0x88, 0x01}, // SPECIES_RELICANTH
|
||||
{0x86, 0x0a}, // SPECIES_ARON
|
||||
{0x54, 0x11}, // SPECIES_LAIRON
|
||||
{0x84, 0x11}, // SPECIES_AGGRON
|
||||
{0x87, 0x07}, // SPECIES_CASTFORM
|
||||
{0x45, 0x0d}, // SPECIES_VOLBEAT
|
||||
{0x76, 0x08}, // SPECIES_ILLUMISE
|
||||
{0x67, 0x06}, // SPECIES_LILEEP
|
||||
{0x86, 0x09}, // SPECIES_CRADILY
|
||||
{0x77, 0x04}, // SPECIES_ANORITH
|
||||
{0x83, 0x17}, // SPECIES_ARMALDO
|
||||
{0x77, 0x05}, // SPECIES_RALTS
|
||||
{0x45, 0x0d}, // SPECIES_KIRLIA
|
||||
{0x57, 0x06}, // SPECIES_GARDEVOIR
|
||||
{0x77, 0x04}, // SPECIES_BAGON
|
||||
{0x66, 0x08}, // SPECIES_SHELGON
|
||||
{0x85, 0x0d}, // SPECIES_SALAMENCE
|
||||
{0x77, 0x06}, // SPECIES_BELDUM
|
||||
{0x66, 0x0a}, // SPECIES_METANG
|
||||
{0x84, 0x10}, // SPECIES_METAGROSS
|
||||
{0x83, 0x14}, // SPECIES_REGIROCK
|
||||
{0x86, 0x0a}, // SPECIES_REGICE
|
||||
{0x85, 0x0f}, // SPECIES_SLAKOTH
|
||||
{0x86, 0x0a}, // SPECIES_VIGOROTH
|
||||
{0x86, 0x08}, // SPECIES_SLAKING
|
||||
{0x66, 0x0b}, // SPECIES_GULPIN
|
||||
{0x77, 0x06}, // SPECIES_SWALOT
|
||||
{0x87, 0x07}, // SPECIES_TROPIUS
|
||||
{0x85, 0x0d}, // SPECIES_WHISMUR
|
||||
{0x86, 0x09}, // SPECIES_LOUDRED
|
||||
{0x88, 0x03}, // SPECIES_EXPLOUD
|
||||
{0x85, 0x0d}, // SPECIES_CLAMPERL
|
||||
{0x68, 0x02}, // SPECIES_HUNTAIL
|
||||
{0x77, 0x05}, // SPECIES_GOREBYSS
|
||||
{0x78, 0x03}, // SPECIES_ABSOL
|
||||
{0x77, 0x06}, // SPECIES_SHUPPET
|
||||
{0x65, 0x0c}, // SPECIES_BANETTE
|
||||
{0x88, 0x03}, // SPECIES_SEVIPER
|
||||
{0x88, 0x01}, // SPECIES_ZANGOOSE
|
||||
{0x86, 0x0a}, // SPECIES_RELICANTH
|
||||
{0x54, 0x11}, // SPECIES_ARON
|
||||
{0x84, 0x11}, // SPECIES_LAIRON
|
||||
{0x87, 0x07}, // SPECIES_AGGRON
|
||||
{0x45, 0x0d}, // SPECIES_CASTFORM
|
||||
{0x76, 0x08}, // SPECIES_VOLBEAT
|
||||
{0x67, 0x06}, // SPECIES_ILLUMISE
|
||||
{0x86, 0x09}, // SPECIES_LILEEP
|
||||
{0x77, 0x04}, // SPECIES_CRADILY
|
||||
{0x83, 0x17}, // SPECIES_ANORITH
|
||||
{0x77, 0x05}, // SPECIES_ARMALDO
|
||||
{0x45, 0x0d}, // SPECIES_RALTS
|
||||
{0x57, 0x06}, // SPECIES_KIRLIA
|
||||
{0x77, 0x04}, // SPECIES_GARDEVOIR
|
||||
{0x66, 0x08}, // SPECIES_BAGON
|
||||
{0x85, 0x0d}, // SPECIES_SHELGON
|
||||
{0x77, 0x06}, // SPECIES_SALAMENCE
|
||||
{0x66, 0x0a}, // SPECIES_BELDUM
|
||||
{0x84, 0x10}, // SPECIES_METANG
|
||||
{0x83, 0x14}, // SPECIES_METAGROSS
|
||||
{0x86, 0x0a}, // SPECIES_REGIROCK
|
||||
{0x85, 0x0e}, // SPECIES_REGICE
|
||||
{0x85, 0x0e}, // SPECIES_REGISTEEL
|
||||
{0x85, 0x0e}, // SPECIES_KYOGRE
|
||||
{0x84, 0x13}, // SPECIES_GROUDON
|
||||
{0x87, 0x07}, // SPECIES_RAYQUAZA
|
||||
{0x78, 0x00}, // SPECIES_LATIAS
|
||||
{0x88, 0x02}, // SPECIES_LATIOS
|
||||
{0x88, 0x03}, // SPECIES_JIRACHI
|
||||
{0x87, 0x05}, // SPECIES_DEOXYS
|
||||
{0x86, 0x09}, // SPECIES_CHIMECHO
|
||||
{0x47, 0x07}, // SPECIES_EGG
|
||||
{0x36, 0x0a}, // SPECIES_UNOWN_B
|
||||
{0x56, 0x09}, // SPECIES_UNOWN_C
|
||||
{0x67, 0x06}, // SPECIES_UNOWN_D
|
||||
{0x56, 0x08}, // SPECIES_UNOWN_E
|
||||
{0x56, 0x0a}, // SPECIES_UNOWN_F
|
||||
{0x66, 0x0a}, // SPECIES_UNOWN_G
|
||||
{0x57, 0x05}, // SPECIES_UNOWN_H
|
||||
{0x66, 0x08}, // SPECIES_UNOWN_I
|
||||
{0x37, 0x07}, // SPECIES_UNOWN_J
|
||||
{0x46, 0x09}, // SPECIES_UNOWN_K
|
||||
{0x57, 0x07}, // SPECIES_UNOWN_L
|
||||
{0x46, 0x0a}, // SPECIES_UNOWN_M
|
||||
{0x84, 0x13}, // SPECIES_KYOGRE
|
||||
{0x87, 0x07}, // SPECIES_GROUDON
|
||||
{0x78, 0x00}, // SPECIES_RAYQUAZA
|
||||
{0x88, 0x02}, // SPECIES_LATIAS
|
||||
{0x88, 0x03}, // SPECIES_LATIOS
|
||||
{0x87, 0x05}, // SPECIES_JIRACHI
|
||||
{0x86, 0x09}, // SPECIES_DEOXYS
|
||||
{0x47, 0x07}, // SPECIES_CHIMECHO
|
||||
{0x36, 0x0a}, // SPECIES_EGG
|
||||
{0x56, 0x09}, // SPECIES_UNOWN_B
|
||||
{0x67, 0x06}, // SPECIES_UNOWN_C
|
||||
{0x56, 0x08}, // SPECIES_UNOWN_D
|
||||
{0x56, 0x0a}, // SPECIES_UNOWN_E
|
||||
{0x66, 0x0a}, // SPECIES_UNOWN_F
|
||||
{0x57, 0x05}, // SPECIES_UNOWN_G
|
||||
{0x66, 0x08}, // SPECIES_UNOWN_H
|
||||
{0x37, 0x07}, // SPECIES_UNOWN_I
|
||||
{0x46, 0x09}, // SPECIES_UNOWN_J
|
||||
{0x57, 0x07}, // SPECIES_UNOWN_K
|
||||
{0x46, 0x0a}, // SPECIES_UNOWN_L
|
||||
{0x65, 0x0d}, // SPECIES_UNOWN_M
|
||||
{0x65, 0x0d}, // SPECIES_UNOWN_N
|
||||
{0x65, 0x0d}, // SPECIES_UNOWN_O
|
||||
{0x66, 0x08}, // SPECIES_UNOWN_P
|
||||
{0x46, 0x0a}, // SPECIES_UNOWN_Q
|
||||
{0x55, 0x0f}, // SPECIES_UNOWN_R
|
||||
{0x45, 0x0c}, // SPECIES_UNOWN_S
|
||||
{0x57, 0x04}, // SPECIES_UNOWN_T
|
||||
{0x45, 0x0d}, // SPECIES_UNOWN_U
|
||||
{0x65, 0x0d}, // SPECIES_UNOWN_V
|
||||
{0x56, 0x0b}, // SPECIES_UNOWN_W
|
||||
{0x55, 0x0d}, // SPECIES_UNOWN_X
|
||||
{0x55, 0x0f}, // SPECIES_UNOWN_Y
|
||||
{0x66, 0x08}, // SPECIES_UNOWN_O
|
||||
{0x46, 0x0a}, // SPECIES_UNOWN_P
|
||||
{0x55, 0x0f}, // SPECIES_UNOWN_Q
|
||||
{0x45, 0x0c}, // SPECIES_UNOWN_R
|
||||
{0x57, 0x04}, // SPECIES_UNOWN_S
|
||||
{0x45, 0x0d}, // SPECIES_UNOWN_T
|
||||
{0x65, 0x0d}, // SPECIES_UNOWN_U
|
||||
{0x56, 0x0b}, // SPECIES_UNOWN_V
|
||||
{0x55, 0x0d}, // SPECIES_UNOWN_W
|
||||
{0x55, 0x0f}, // SPECIES_UNOWN_X
|
||||
{0x46, 0x0a}, // SPECIES_UNOWN_Y
|
||||
{0x46, 0x0a}, // SPECIES_UNOWN_Z
|
||||
{0x46, 0x0a}, // SPECIES_UNOWN_EMARK
|
||||
{0x37, 0x06}, // SPECIES_UNOWN_QMARK
|
||||
{0x47, 0x06},
|
||||
{0x37, 0x06}, // SPECIES_UNOWN_EMARK
|
||||
{0x47, 0x06}, // SPECIES_UNOWN_QMARK
|
||||
};
|
||||
|
||||
@@ -0,0 +1,416 @@
|
||||
const u8 *const gMonFootprintTable[] =
|
||||
{
|
||||
gMonFootprint_Bulbasaur,
|
||||
gMonFootprint_Bulbasaur,
|
||||
gMonFootprint_Ivysaur,
|
||||
gMonFootprint_Venusaur,
|
||||
gMonFootprint_Charmander,
|
||||
gMonFootprint_Charmeleon,
|
||||
gMonFootprint_Charizard,
|
||||
gMonFootprint_Squirtle,
|
||||
gMonFootprint_Wartortle,
|
||||
gMonFootprint_Blastoise,
|
||||
gMonFootprint_Caterpie,
|
||||
gMonFootprint_Metapod,
|
||||
gMonFootprint_Butterfree,
|
||||
gMonFootprint_Weedle,
|
||||
gMonFootprint_Kakuna,
|
||||
gMonFootprint_Beedrill,
|
||||
gMonFootprint_Pidgey,
|
||||
gMonFootprint_Pidgeotto,
|
||||
gMonFootprint_Pidgeot,
|
||||
gMonFootprint_Rattata,
|
||||
gMonFootprint_Raticate,
|
||||
gMonFootprint_Spearow,
|
||||
gMonFootprint_Fearow,
|
||||
gMonFootprint_Ekans,
|
||||
gMonFootprint_Arbok,
|
||||
gMonFootprint_Pikachu,
|
||||
gMonFootprint_Raichu,
|
||||
gMonFootprint_Sandshrew,
|
||||
gMonFootprint_Sandslash,
|
||||
gMonFootprint_NidoranF,
|
||||
gMonFootprint_Nidorina,
|
||||
gMonFootprint_Nidoqueen,
|
||||
gMonFootprint_NidoranM,
|
||||
gMonFootprint_Nidorino,
|
||||
gMonFootprint_Nidoking,
|
||||
gMonFootprint_Clefairy,
|
||||
gMonFootprint_Clefable,
|
||||
gMonFootprint_Vulpix,
|
||||
gMonFootprint_Ninetales,
|
||||
gMonFootprint_Jigglypuff,
|
||||
gMonFootprint_Wigglytuff,
|
||||
gMonFootprint_Zubat,
|
||||
gMonFootprint_Golbat,
|
||||
gMonFootprint_Oddish,
|
||||
gMonFootprint_Gloom,
|
||||
gMonFootprint_Vileplume,
|
||||
gMonFootprint_Paras,
|
||||
gMonFootprint_Parasect,
|
||||
gMonFootprint_Venonat,
|
||||
gMonFootprint_Venomoth,
|
||||
gMonFootprint_Diglett,
|
||||
gMonFootprint_Dugtrio,
|
||||
gMonFootprint_Meowth,
|
||||
gMonFootprint_Persian,
|
||||
gMonFootprint_Psyduck,
|
||||
gMonFootprint_Golduck,
|
||||
gMonFootprint_Mankey,
|
||||
gMonFootprint_Primeape,
|
||||
gMonFootprint_Growlithe,
|
||||
gMonFootprint_Arcanine,
|
||||
gMonFootprint_Poliwag,
|
||||
gMonFootprint_Poliwhirl,
|
||||
gMonFootprint_Poliwrath,
|
||||
gMonFootprint_Abra,
|
||||
gMonFootprint_Kadabra,
|
||||
gMonFootprint_Alakazam,
|
||||
gMonFootprint_Machop,
|
||||
gMonFootprint_Machoke,
|
||||
gMonFootprint_Machamp,
|
||||
gMonFootprint_Bellsprout,
|
||||
gMonFootprint_Weepinbell,
|
||||
gMonFootprint_Victreebel,
|
||||
gMonFootprint_Tentacool,
|
||||
gMonFootprint_Tentacruel,
|
||||
gMonFootprint_Geodude,
|
||||
gMonFootprint_Graveler,
|
||||
gMonFootprint_Golem,
|
||||
gMonFootprint_Ponyta,
|
||||
gMonFootprint_Rapidash,
|
||||
gMonFootprint_Slowpoke,
|
||||
gMonFootprint_Slowbro,
|
||||
gMonFootprint_Magnemite,
|
||||
gMonFootprint_Magneton,
|
||||
gMonFootprint_Farfetchd,
|
||||
gMonFootprint_Doduo,
|
||||
gMonFootprint_Dodrio,
|
||||
gMonFootprint_Seel,
|
||||
gMonFootprint_Dewgong,
|
||||
gMonFootprint_Grimer,
|
||||
gMonFootprint_Muk,
|
||||
gMonFootprint_Shellder,
|
||||
gMonFootprint_Cloyster,
|
||||
gMonFootprint_Gastly,
|
||||
gMonFootprint_Haunter,
|
||||
gMonFootprint_Gengar,
|
||||
gMonFootprint_Onix,
|
||||
gMonFootprint_Drowzee,
|
||||
gMonFootprint_Hypno,
|
||||
gMonFootprint_Krabby,
|
||||
gMonFootprint_Kingler,
|
||||
gMonFootprint_Voltorb,
|
||||
gMonFootprint_Electrode,
|
||||
gMonFootprint_Exeggcute,
|
||||
gMonFootprint_Exeggutor,
|
||||
gMonFootprint_Cubone,
|
||||
gMonFootprint_Marowak,
|
||||
gMonFootprint_Hitmonlee,
|
||||
gMonFootprint_Hitmonchan,
|
||||
gMonFootprint_Lickitung,
|
||||
gMonFootprint_Koffing,
|
||||
gMonFootprint_Weezing,
|
||||
gMonFootprint_Rhyhorn,
|
||||
gMonFootprint_Rhydon,
|
||||
gMonFootprint_Chansey,
|
||||
gMonFootprint_Tangela,
|
||||
gMonFootprint_Kangaskhan,
|
||||
gMonFootprint_Horsea,
|
||||
gMonFootprint_Seadra,
|
||||
gMonFootprint_Goldeen,
|
||||
gMonFootprint_Seaking,
|
||||
gMonFootprint_Staryu,
|
||||
gMonFootprint_Starmie,
|
||||
gMonFootprint_Mrmime,
|
||||
gMonFootprint_Scyther,
|
||||
gMonFootprint_Jynx,
|
||||
gMonFootprint_Electabuzz,
|
||||
gMonFootprint_Magmar,
|
||||
gMonFootprint_Pinsir,
|
||||
gMonFootprint_Tauros,
|
||||
gMonFootprint_Magikarp,
|
||||
gMonFootprint_Gyarados,
|
||||
gMonFootprint_Lapras,
|
||||
gMonFootprint_Ditto,
|
||||
gMonFootprint_Eevee,
|
||||
gMonFootprint_Vaporeon,
|
||||
gMonFootprint_Jolteon,
|
||||
gMonFootprint_Flareon,
|
||||
gMonFootprint_Porygon,
|
||||
gMonFootprint_Omanyte,
|
||||
gMonFootprint_Omastar,
|
||||
gMonFootprint_Kabuto,
|
||||
gMonFootprint_Kabutops,
|
||||
gMonFootprint_Aerodactyl,
|
||||
gMonFootprint_Snorlax,
|
||||
gMonFootprint_Articuno,
|
||||
gMonFootprint_Zapdos,
|
||||
gMonFootprint_Moltres,
|
||||
gMonFootprint_Dratini,
|
||||
gMonFootprint_Dragonair,
|
||||
gMonFootprint_Dragonite,
|
||||
gMonFootprint_Mewtwo,
|
||||
gMonFootprint_Mew,
|
||||
gMonFootprint_Chikorita,
|
||||
gMonFootprint_Bayleef,
|
||||
gMonFootprint_Meganium,
|
||||
gMonFootprint_Cyndaquil,
|
||||
gMonFootprint_Quilava,
|
||||
gMonFootprint_Typhlosion,
|
||||
gMonFootprint_Totodile,
|
||||
gMonFootprint_Croconaw,
|
||||
gMonFootprint_Feraligatr,
|
||||
gMonFootprint_Sentret,
|
||||
gMonFootprint_Furret,
|
||||
gMonFootprint_Hoothoot,
|
||||
gMonFootprint_Noctowl,
|
||||
gMonFootprint_Ledyba,
|
||||
gMonFootprint_Ledian,
|
||||
gMonFootprint_Spinarak,
|
||||
gMonFootprint_Ariados,
|
||||
gMonFootprint_Crobat,
|
||||
gMonFootprint_Chinchou,
|
||||
gMonFootprint_Lanturn,
|
||||
gMonFootprint_Pichu,
|
||||
gMonFootprint_Cleffa,
|
||||
gMonFootprint_Igglybuff,
|
||||
gMonFootprint_Togepi,
|
||||
gMonFootprint_Togetic,
|
||||
gMonFootprint_Natu,
|
||||
gMonFootprint_Xatu,
|
||||
gMonFootprint_Mareep,
|
||||
gMonFootprint_Flaaffy,
|
||||
gMonFootprint_Ampharos,
|
||||
gMonFootprint_Bellossom,
|
||||
gMonFootprint_Marill,
|
||||
gMonFootprint_Azumarill,
|
||||
gMonFootprint_Sudowoodo,
|
||||
gMonFootprint_Politoed,
|
||||
gMonFootprint_Hoppip,
|
||||
gMonFootprint_Skiploom,
|
||||
gMonFootprint_Jumpluff,
|
||||
gMonFootprint_Aipom,
|
||||
gMonFootprint_Sunkern,
|
||||
gMonFootprint_Sunflora,
|
||||
gMonFootprint_Yanma,
|
||||
gMonFootprint_Wooper,
|
||||
gMonFootprint_Quagsire,
|
||||
gMonFootprint_Espeon,
|
||||
gMonFootprint_Umbreon,
|
||||
gMonFootprint_Murkrow,
|
||||
gMonFootprint_Slowking,
|
||||
gMonFootprint_Misdreavus,
|
||||
gMonFootprint_Unown,
|
||||
gMonFootprint_Wobbuffet,
|
||||
gMonFootprint_Girafarig,
|
||||
gMonFootprint_Pineco,
|
||||
gMonFootprint_Forretress,
|
||||
gMonFootprint_Dunsparce,
|
||||
gMonFootprint_Gligar,
|
||||
gMonFootprint_Steelix,
|
||||
gMonFootprint_Snubbull,
|
||||
gMonFootprint_Granbull,
|
||||
gMonFootprint_Qwilfish,
|
||||
gMonFootprint_Scizor,
|
||||
gMonFootprint_Shuckle,
|
||||
gMonFootprint_Heracross,
|
||||
gMonFootprint_Sneasel,
|
||||
gMonFootprint_Teddiursa,
|
||||
gMonFootprint_Ursaring,
|
||||
gMonFootprint_Slugma,
|
||||
gMonFootprint_Magcargo,
|
||||
gMonFootprint_Swinub,
|
||||
gMonFootprint_Piloswine,
|
||||
gMonFootprint_Corsola,
|
||||
gMonFootprint_Remoraid,
|
||||
gMonFootprint_Octillery,
|
||||
gMonFootprint_Delibird,
|
||||
gMonFootprint_Mantine,
|
||||
gMonFootprint_Skarmory,
|
||||
gMonFootprint_Houndour,
|
||||
gMonFootprint_Houndoom,
|
||||
gMonFootprint_Kingdra,
|
||||
gMonFootprint_Phanpy,
|
||||
gMonFootprint_Donphan,
|
||||
gMonFootprint_Porygon2,
|
||||
gMonFootprint_Stantler,
|
||||
gMonFootprint_Smeargle,
|
||||
gMonFootprint_Tyrogue,
|
||||
gMonFootprint_Hitmontop,
|
||||
gMonFootprint_Smoochum,
|
||||
gMonFootprint_Elekid,
|
||||
gMonFootprint_Magby,
|
||||
gMonFootprint_Miltank,
|
||||
gMonFootprint_Blissey,
|
||||
gMonFootprint_Raikou,
|
||||
gMonFootprint_Entei,
|
||||
gMonFootprint_Suicune,
|
||||
gMonFootprint_Larvitar,
|
||||
gMonFootprint_Pupitar,
|
||||
gMonFootprint_Tyranitar,
|
||||
gMonFootprint_Lugia,
|
||||
gMonFootprint_HoOh,
|
||||
gMonFootprint_Celebi,
|
||||
gMonFootprint_QuestionMark,
|
||||
gMonFootprint_QuestionMark,
|
||||
gMonFootprint_QuestionMark,
|
||||
gMonFootprint_QuestionMark,
|
||||
gMonFootprint_QuestionMark,
|
||||
gMonFootprint_QuestionMark,
|
||||
gMonFootprint_QuestionMark,
|
||||
gMonFootprint_QuestionMark,
|
||||
gMonFootprint_QuestionMark,
|
||||
gMonFootprint_QuestionMark,
|
||||
gMonFootprint_QuestionMark,
|
||||
gMonFootprint_QuestionMark,
|
||||
gMonFootprint_QuestionMark,
|
||||
gMonFootprint_QuestionMark,
|
||||
gMonFootprint_QuestionMark,
|
||||
gMonFootprint_QuestionMark,
|
||||
gMonFootprint_QuestionMark,
|
||||
gMonFootprint_QuestionMark,
|
||||
gMonFootprint_QuestionMark,
|
||||
gMonFootprint_QuestionMark,
|
||||
gMonFootprint_QuestionMark,
|
||||
gMonFootprint_QuestionMark,
|
||||
gMonFootprint_QuestionMark,
|
||||
gMonFootprint_QuestionMark,
|
||||
gMonFootprint_QuestionMark,
|
||||
gMonFootprint_Treecko,
|
||||
gMonFootprint_Grovyle,
|
||||
gMonFootprint_Sceptile,
|
||||
gMonFootprint_Torchic,
|
||||
gMonFootprint_Combusken,
|
||||
gMonFootprint_Blaziken,
|
||||
gMonFootprint_Mudkip,
|
||||
gMonFootprint_Marshtomp,
|
||||
gMonFootprint_Swampert,
|
||||
gMonFootprint_Poochyena,
|
||||
gMonFootprint_Mightyena,
|
||||
gMonFootprint_Zigzagoon,
|
||||
gMonFootprint_Linoone,
|
||||
gMonFootprint_Wurmple,
|
||||
gMonFootprint_Silcoon,
|
||||
gMonFootprint_Beautifly,
|
||||
gMonFootprint_Cascoon,
|
||||
gMonFootprint_Dustox,
|
||||
gMonFootprint_Lotad,
|
||||
gMonFootprint_Lombre,
|
||||
gMonFootprint_Ludicolo,
|
||||
gMonFootprint_Seedot,
|
||||
gMonFootprint_Nuzleaf,
|
||||
gMonFootprint_Shiftry,
|
||||
gMonFootprint_Nincada,
|
||||
gMonFootprint_Ninjask,
|
||||
gMonFootprint_Shedinja,
|
||||
gMonFootprint_Taillow,
|
||||
gMonFootprint_Swellow,
|
||||
gMonFootprint_Shroomish,
|
||||
gMonFootprint_Breloom,
|
||||
gMonFootprint_Spinda,
|
||||
gMonFootprint_Wingull,
|
||||
gMonFootprint_Pelipper,
|
||||
gMonFootprint_Surskit,
|
||||
gMonFootprint_Masquerain,
|
||||
gMonFootprint_Wailmer,
|
||||
gMonFootprint_Wailord,
|
||||
gMonFootprint_Skitty,
|
||||
gMonFootprint_Delcatty,
|
||||
gMonFootprint_Kecleon,
|
||||
gMonFootprint_Baltoy,
|
||||
gMonFootprint_Claydol,
|
||||
gMonFootprint_Nosepass,
|
||||
gMonFootprint_Torkoal,
|
||||
gMonFootprint_Sableye,
|
||||
gMonFootprint_Barboach,
|
||||
gMonFootprint_Whiscash,
|
||||
gMonFootprint_Luvdisc,
|
||||
gMonFootprint_Corphish,
|
||||
gMonFootprint_Crawdaunt,
|
||||
gMonFootprint_Feebas,
|
||||
gMonFootprint_Milotic,
|
||||
gMonFootprint_Carvanha,
|
||||
gMonFootprint_Sharpedo,
|
||||
gMonFootprint_Trapinch,
|
||||
gMonFootprint_Vibrava,
|
||||
gMonFootprint_Flygon,
|
||||
gMonFootprint_Makuhita,
|
||||
gMonFootprint_Hariyama,
|
||||
gMonFootprint_Electrike,
|
||||
gMonFootprint_Manectric,
|
||||
gMonFootprint_Numel,
|
||||
gMonFootprint_Camerupt,
|
||||
gMonFootprint_Spheal,
|
||||
gMonFootprint_Sealeo,
|
||||
gMonFootprint_Walrein,
|
||||
gMonFootprint_Cacnea,
|
||||
gMonFootprint_Cacturne,
|
||||
gMonFootprint_Snorunt,
|
||||
gMonFootprint_Glalie,
|
||||
gMonFootprint_Lunatone,
|
||||
gMonFootprint_Solrock,
|
||||
gMonFootprint_Azurill,
|
||||
gMonFootprint_Spoink,
|
||||
gMonFootprint_Grumpig,
|
||||
gMonFootprint_Plusle,
|
||||
gMonFootprint_Minun,
|
||||
gMonFootprint_Mawile,
|
||||
gMonFootprint_Meditite,
|
||||
gMonFootprint_Medicham,
|
||||
gMonFootprint_Swablu,
|
||||
gMonFootprint_Altaria,
|
||||
gMonFootprint_Wynaut,
|
||||
gMonFootprint_Duskull,
|
||||
gMonFootprint_Dusclops,
|
||||
gMonFootprint_Roselia,
|
||||
gMonFootprint_Slakoth,
|
||||
gMonFootprint_Vigoroth,
|
||||
gMonFootprint_Slaking,
|
||||
gMonFootprint_Gulpin,
|
||||
gMonFootprint_Swalot,
|
||||
gMonFootprint_Tropius,
|
||||
gMonFootprint_Whismur,
|
||||
gMonFootprint_Loudred,
|
||||
gMonFootprint_Exploud,
|
||||
gMonFootprint_Clamperl,
|
||||
gMonFootprint_Huntail,
|
||||
gMonFootprint_Gorebyss,
|
||||
gMonFootprint_Absol,
|
||||
gMonFootprint_Shuppet,
|
||||
gMonFootprint_Banette,
|
||||
gMonFootprint_Seviper,
|
||||
gMonFootprint_Zangoose,
|
||||
gMonFootprint_Relicanth,
|
||||
gMonFootprint_Aron,
|
||||
gMonFootprint_Lairon,
|
||||
gMonFootprint_Aggron,
|
||||
gMonFootprint_Castform,
|
||||
gMonFootprint_Volbeat,
|
||||
gMonFootprint_Illumise,
|
||||
gMonFootprint_Lileep,
|
||||
gMonFootprint_Cradily,
|
||||
gMonFootprint_Anorith,
|
||||
gMonFootprint_Armaldo,
|
||||
gMonFootprint_Ralts,
|
||||
gMonFootprint_Kirlia,
|
||||
gMonFootprint_Gardevoir,
|
||||
gMonFootprint_Bagon,
|
||||
gMonFootprint_Shelgon,
|
||||
gMonFootprint_Salamence,
|
||||
gMonFootprint_Beldum,
|
||||
gMonFootprint_Metang,
|
||||
gMonFootprint_Metagross,
|
||||
gMonFootprint_Regirock,
|
||||
gMonFootprint_Regice,
|
||||
gMonFootprint_Registeel,
|
||||
gMonFootprint_Kyogre,
|
||||
gMonFootprint_Groudon,
|
||||
gMonFootprint_Rayquaza,
|
||||
gMonFootprint_Latias,
|
||||
gMonFootprint_Latios,
|
||||
gMonFootprint_Jirachi,
|
||||
gMonFootprint_Deoxys,
|
||||
gMonFootprint_Chimecho,
|
||||
gMonFootprint_Bulbasaur,
|
||||
};
|
||||
@@ -47,211 +47,212 @@ const struct MonCoords gMonFrontPicCoords[] =
|
||||
{0x66, 0x0a}, // SPECIES_GLOOM
|
||||
{0x77, 0x06}, // SPECIES_VILEPLUME
|
||||
{0x55, 0x0f}, // SPECIES_PARAS
|
||||
{0x86, 0x08}, // SPECIES_VENONAT
|
||||
{0x66, 0x08}, // SPECIES_VENOMOTH
|
||||
{0x88, 0x02}, // SPECIES_DIGLETT
|
||||
{0x54, 0x12}, // SPECIES_DUGTRIO
|
||||
{0x75, 0x0d}, // SPECIES_MEOWTH
|
||||
{0x55, 0x0c}, // SPECIES_PERSIAN
|
||||
{0x77, 0x07}, // SPECIES_PSYDUCK
|
||||
{0x56, 0x09}, // SPECIES_GOLDUCK
|
||||
{0x78, 0x02}, // SPECIES_MANKEY
|
||||
{0x65, 0x0e}, // SPECIES_PRIMEAPE
|
||||
{0x77, 0x07}, // SPECIES_GROWLITHE
|
||||
{0x66, 0x0b}, // SPECIES_ARCANINE
|
||||
{0x88, 0x02}, // SPECIES_POLIWAG
|
||||
{0x74, 0x13}, // SPECIES_POLIWHIRL
|
||||
{0x76, 0x0a}, // SPECIES_POLIWRATH
|
||||
{0x76, 0x08}, // SPECIES_ABRA
|
||||
{0x66, 0x0b}, // SPECIES_KADABRA
|
||||
{0x77, 0x05}, // SPECIES_ALAKAZAM
|
||||
{0x87, 0x04}, // SPECIES_MACHOP
|
||||
{0x56, 0x0b}, // SPECIES_MACHOKE
|
||||
{0x67, 0x06}, // SPECIES_MACHAMP
|
||||
{0x88, 0x01}, // SPECIES_BELLSPROUT
|
||||
{0x65, 0x0f}, // SPECIES_WEEPINBELL
|
||||
{0x66, 0x0b}, // SPECIES_VICTREEBEL
|
||||
{0x77, 0x05}, // SPECIES_TENTACOOL
|
||||
{0x46, 0x09}, // SPECIES_TENTACRUEL
|
||||
{0x87, 0x04}, // SPECIES_GEODUDE
|
||||
{0x54, 0x12}, // SPECIES_GRAVELER
|
||||
{0x87, 0x04}, // SPECIES_GOLEM
|
||||
{0x77, 0x05}, // SPECIES_PONYTA
|
||||
{0x66, 0x08}, // SPECIES_RAPIDASH
|
||||
{0x88, 0x01}, // SPECIES_SLOWPOKE
|
||||
{0x66, 0x0b}, // SPECIES_SLOWBRO
|
||||
{0x86, 0x08}, // SPECIES_MAGNEMITE
|
||||
{0x43, 0x15}, // SPECIES_MAGNETON
|
||||
{0x76, 0x08}, // SPECIES_FARFETCHD
|
||||
{0x66, 0x09}, // SPECIES_DODUO
|
||||
{0x57, 0x05}, // SPECIES_DODRIO
|
||||
{0x88, 0x00}, // SPECIES_SEEL
|
||||
{0x76, 0x0a}, // SPECIES_DEWGONG
|
||||
{0x87, 0x07}, // SPECIES_GRIMER
|
||||
{0x65, 0x0c}, // SPECIES_MUK
|
||||
{0x87, 0x04}, // SPECIES_SHELLDER
|
||||
{0x55, 0x10}, // SPECIES_CLOYSTER
|
||||
{0x87, 0x05}, // SPECIES_GASTLY
|
||||
{0x77, 0x06}, // SPECIES_HAUNTER
|
||||
{0x86, 0x08}, // SPECIES_PARASECT
|
||||
{0x66, 0x08}, // SPECIES_VENONAT
|
||||
{0x88, 0x02}, // SPECIES_VENOMOTH
|
||||
{0x54, 0x12}, // SPECIES_DIGLETT
|
||||
{0x75, 0x0d}, // SPECIES_DUGTRIO
|
||||
{0x55, 0x0c}, // SPECIES_MEOWTH
|
||||
{0x77, 0x07}, // SPECIES_PERSIAN
|
||||
{0x56, 0x09}, // SPECIES_PSYDUCK
|
||||
{0x78, 0x02}, // SPECIES_GOLDUCK
|
||||
{0x65, 0x0e}, // SPECIES_MANKEY
|
||||
{0x77, 0x07}, // SPECIES_PRIMEAPE
|
||||
{0x66, 0x0b}, // SPECIES_GROWLITHE
|
||||
{0x88, 0x02}, // SPECIES_ARCANINE
|
||||
{0x74, 0x13}, // SPECIES_POLIWAG
|
||||
{0x76, 0x0a}, // SPECIES_POLIWHIRL
|
||||
{0x76, 0x08}, // SPECIES_POLIWRATH
|
||||
{0x66, 0x0b}, // SPECIES_ABRA
|
||||
{0x77, 0x05}, // SPECIES_KADABRA
|
||||
{0x87, 0x04}, // SPECIES_ALAKAZAM
|
||||
{0x56, 0x0b}, // SPECIES_MACHOP
|
||||
{0x67, 0x06}, // SPECIES_MACHOKE
|
||||
{0x88, 0x01}, // SPECIES_MACHAMP
|
||||
{0x65, 0x0f}, // SPECIES_BELLSPROUT
|
||||
{0x66, 0x0b}, // SPECIES_WEEPINBELL
|
||||
{0x77, 0x05}, // SPECIES_VICTREEBEL
|
||||
{0x46, 0x09}, // SPECIES_TENTACOOL
|
||||
{0x87, 0x04}, // SPECIES_TENTACRUEL
|
||||
{0x54, 0x12}, // SPECIES_GEODUDE
|
||||
{0x87, 0x04}, // SPECIES_GRAVELER
|
||||
{0x77, 0x05}, // SPECIES_GOLEM
|
||||
{0x66, 0x08}, // SPECIES_PONYTA
|
||||
{0x88, 0x01}, // SPECIES_RAPIDASH
|
||||
{0x66, 0x0b}, // SPECIES_SLOWPOKE
|
||||
{0x86, 0x08}, // SPECIES_SLOWBRO
|
||||
{0x43, 0x15}, // SPECIES_MAGNEMITE
|
||||
{0x76, 0x08}, // SPECIES_MAGNETON
|
||||
{0x66, 0x09}, // SPECIES_FARFETCHD
|
||||
{0x57, 0x05}, // SPECIES_DODUO
|
||||
{0x88, 0x00}, // SPECIES_DODRIO
|
||||
{0x76, 0x0a}, // SPECIES_SEEL
|
||||
{0x87, 0x07}, // SPECIES_DEWGONG
|
||||
{0x65, 0x0c}, // SPECIES_GRIMER
|
||||
{0x87, 0x04}, // SPECIES_MUK
|
||||
{0x55, 0x10}, // SPECIES_SHELLDER
|
||||
{0x87, 0x05}, // SPECIES_CLOYSTER
|
||||
{0x77, 0x06}, // SPECIES_GASTLY
|
||||
{0x77, 0x05}, // SPECIES_HAUNTER
|
||||
{0x77, 0x05}, // SPECIES_GENGAR
|
||||
{0x77, 0x05}, // SPECIES_ONIX
|
||||
{0x78, 0x02}, // SPECIES_DROWZEE
|
||||
{0x77, 0x07}, // SPECIES_HYPNO
|
||||
{0x77, 0x04}, // SPECIES_KRABBY
|
||||
{0x65, 0x0d}, // SPECIES_KINGLER
|
||||
{0x88, 0x03}, // SPECIES_VOLTORB
|
||||
{0x44, 0x13}, // SPECIES_ELECTRODE
|
||||
{0x55, 0x0e}, // SPECIES_EXEGGCUTE
|
||||
{0x87, 0x07}, // SPECIES_EXEGGUTOR
|
||||
{0x88, 0x00}, // SPECIES_CUBONE
|
||||
{0x55, 0x0f}, // SPECIES_MAROWAK
|
||||
{0x76, 0x0b}, // SPECIES_HITMONLEE
|
||||
{0x87, 0x04}, // SPECIES_HITMONCHAN
|
||||
{0x67, 0x04}, // SPECIES_LICKITUNG
|
||||
{0x86, 0x08}, // SPECIES_KOFFING
|
||||
{0x66, 0x08}, // SPECIES_WEEZING
|
||||
{0x88, 0x02}, // SPECIES_RHYHORN
|
||||
{0x76, 0x09}, // SPECIES_RHYDON
|
||||
{0x88, 0x02}, // SPECIES_CHANSEY
|
||||
{0x76, 0x09}, // SPECIES_TANGELA
|
||||
{0x67, 0x07}, // SPECIES_KANGASKHAN
|
||||
{0x88, 0x00}, // SPECIES_HORSEA
|
||||
{0x45, 0x0f}, // SPECIES_SEADRA
|
||||
{0x67, 0x07}, // SPECIES_GOLDEEN
|
||||
{0x66, 0x0a}, // SPECIES_SEAKING
|
||||
{0x77, 0x04}, // SPECIES_STARYU
|
||||
{0x66, 0x0a}, // SPECIES_STARMIE
|
||||
{0x77, 0x06}, // SPECIES_MR_MIME
|
||||
{0x66, 0x08}, // SPECIES_SCYTHER
|
||||
{0x88, 0x00}, // SPECIES_JYNX
|
||||
{0x77, 0x04}, // SPECIES_ELECTABUZZ
|
||||
{0x78, 0x02}, // SPECIES_MAGMAR
|
||||
{0x78, 0x02}, // SPECIES_ONIX
|
||||
{0x77, 0x07}, // SPECIES_DROWZEE
|
||||
{0x77, 0x04}, // SPECIES_HYPNO
|
||||
{0x65, 0x0d}, // SPECIES_KRABBY
|
||||
{0x88, 0x03}, // SPECIES_KINGLER
|
||||
{0x44, 0x13}, // SPECIES_VOLTORB
|
||||
{0x55, 0x0e}, // SPECIES_ELECTRODE
|
||||
{0x87, 0x07}, // SPECIES_EXEGGCUTE
|
||||
{0x88, 0x00}, // SPECIES_EXEGGUTOR
|
||||
{0x55, 0x0f}, // SPECIES_CUBONE
|
||||
{0x76, 0x0b}, // SPECIES_MAROWAK
|
||||
{0x87, 0x04}, // SPECIES_HITMONLEE
|
||||
{0x67, 0x04}, // SPECIES_HITMONCHAN
|
||||
{0x86, 0x08}, // SPECIES_LICKITUNG
|
||||
{0x66, 0x08}, // SPECIES_KOFFING
|
||||
{0x88, 0x02}, // SPECIES_WEEZING
|
||||
{0x76, 0x09}, // SPECIES_RHYHORN
|
||||
{0x88, 0x02}, // SPECIES_RHYDON
|
||||
{0x76, 0x09}, // SPECIES_CHANSEY
|
||||
{0x67, 0x07}, // SPECIES_TANGELA
|
||||
{0x88, 0x00}, // SPECIES_KANGASKHAN
|
||||
{0x45, 0x0f}, // SPECIES_HORSEA
|
||||
{0x67, 0x07}, // SPECIES_SEADRA
|
||||
{0x66, 0x0a}, // SPECIES_GOLDEEN
|
||||
{0x77, 0x04}, // SPECIES_SEAKING
|
||||
{0x66, 0x0a}, // SPECIES_STARYU
|
||||
{0x77, 0x06}, // SPECIES_STARMIE
|
||||
{0x66, 0x08}, // SPECIES_MR_MIME
|
||||
{0x88, 0x00}, // SPECIES_SCYTHER
|
||||
{0x77, 0x04}, // SPECIES_JYNX
|
||||
{0x78, 0x02}, // SPECIES_ELECTABUZZ
|
||||
{0x77, 0x04}, // SPECIES_MAGMAR
|
||||
{0x77, 0x04}, // SPECIES_PINSIR
|
||||
{0x77, 0x04}, // SPECIES_TAUROS
|
||||
{0x78, 0x00}, // SPECIES_MAGIKARP
|
||||
{0x67, 0x06}, // SPECIES_GYARADOS
|
||||
{0x88, 0x08}, // SPECIES_LAPRAS
|
||||
{0x85, 0x0d}, // SPECIES_DITTO
|
||||
{0x54, 0x11}, // SPECIES_EEVEE
|
||||
{0x56, 0x09}, // SPECIES_VAPOREON
|
||||
{0x67, 0x06}, // SPECIES_JOLTEON
|
||||
{0x76, 0x09}, // SPECIES_FLAREON
|
||||
{0x66, 0x0a}, // SPECIES_PORYGON
|
||||
{0x55, 0x0d}, // SPECIES_OMANYTE
|
||||
{0x45, 0x0f}, // SPECIES_OMASTAR
|
||||
{0x67, 0x07}, // SPECIES_KABUTO
|
||||
{0x54, 0x11}, // SPECIES_KABUTOPS
|
||||
{0x88, 0x03}, // SPECIES_AERODACTYL
|
||||
{0x88, 0x01}, // SPECIES_SNORLAX
|
||||
{0x87, 0x05}, // SPECIES_ARTICUNO
|
||||
{0x88, 0x03}, // SPECIES_ZAPDOS
|
||||
{0x87, 0x04}, // SPECIES_MOLTRES
|
||||
{0x88, 0x00}, // SPECIES_DRATINI
|
||||
{0x75, 0x0e}, // SPECIES_DRAGONAIR
|
||||
{0x87, 0x06}, // SPECIES_DRAGONITE
|
||||
{0x78, 0x00}, // SPECIES_TAUROS
|
||||
{0x67, 0x06}, // SPECIES_MAGIKARP
|
||||
{0x88, 0x08}, // SPECIES_GYARADOS
|
||||
{0x85, 0x0d}, // SPECIES_LAPRAS
|
||||
{0x54, 0x11}, // SPECIES_DITTO
|
||||
{0x56, 0x09}, // SPECIES_EEVEE
|
||||
{0x67, 0x06}, // SPECIES_VAPOREON
|
||||
{0x76, 0x09}, // SPECIES_JOLTEON
|
||||
{0x66, 0x0a}, // SPECIES_FLAREON
|
||||
{0x55, 0x0d}, // SPECIES_PORYGON
|
||||
{0x45, 0x0f}, // SPECIES_OMANYTE
|
||||
{0x67, 0x07}, // SPECIES_OMASTAR
|
||||
{0x54, 0x11}, // SPECIES_KABUTO
|
||||
{0x88, 0x03}, // SPECIES_KABUTOPS
|
||||
{0x88, 0x01}, // SPECIES_AERODACTYL
|
||||
{0x87, 0x05}, // SPECIES_SNORLAX
|
||||
{0x88, 0x03}, // SPECIES_ARTICUNO
|
||||
{0x87, 0x04}, // SPECIES_ZAPDOS
|
||||
{0x88, 0x00}, // SPECIES_MOLTRES
|
||||
{0x75, 0x0e}, // SPECIES_DRATINI
|
||||
{0x87, 0x06}, // SPECIES_DRAGONAIR
|
||||
{0x88, 0x00}, // SPECIES_DRAGONITE
|
||||
{0x88, 0x00}, // SPECIES_MEWTWO
|
||||
{0x88, 0x00}, // SPECIES_MEW
|
||||
{0x55, 0x0d}, // SPECIES_CHIKORITA
|
||||
{0x75, 0x0d}, // SPECIES_BAYLEEF
|
||||
{0x77, 0x04}, // SPECIES_MEGANIUM
|
||||
{0x88, 0x00}, // SPECIES_CYNDAQUIL
|
||||
{0x55, 0x0e}, // SPECIES_QUILAVA
|
||||
{0x76, 0x08}, // SPECIES_TYPHLOSION
|
||||
{0x78, 0x00}, // SPECIES_TOTODILE
|
||||
{0x55, 0x0f}, // SPECIES_CROCONAW
|
||||
{0x67, 0x06}, // SPECIES_FERALIGATR
|
||||
{0x88, 0x00}, // SPECIES_SENTRET
|
||||
{0x47, 0x04}, // SPECIES_FURRET
|
||||
{0x67, 0x07}, // SPECIES_HOOTHOOT
|
||||
{0x55, 0x0d}, // SPECIES_NOCTOWL
|
||||
{0x58, 0x03}, // SPECIES_LEDYBA
|
||||
{0x56, 0x0c}, // SPECIES_LEDIAN
|
||||
{0x67, 0x04}, // SPECIES_SPINARAK
|
||||
{0x54, 0x13}, // SPECIES_ARIADOS
|
||||
{0x87, 0x05}, // SPECIES_CROBAT
|
||||
{0x88, 0x00}, // SPECIES_CHINCHOU
|
||||
{0x75, 0x10}, // SPECIES_LANTURN
|
||||
{0x87, 0x0b}, // SPECIES_PICHU
|
||||
{0x45, 0x0c}, // SPECIES_CLEFFA
|
||||
{0x44, 0x14}, // SPECIES_IGGLYBUFF
|
||||
{0x44, 0x12}, // SPECIES_TOGEPI
|
||||
{0x34, 0x14}, // SPECIES_TOGETIC
|
||||
{0x46, 0x09}, // SPECIES_NATU
|
||||
{0x44, 0x14}, // SPECIES_XATU
|
||||
{0x47, 0x07}, // SPECIES_MAREEP
|
||||
{0x55, 0x10}, // SPECIES_FLAAFFY
|
||||
{0x56, 0x0a}, // SPECIES_AMPHAROS
|
||||
{0x77, 0x05}, // SPECIES_BELLOSSOM
|
||||
{0x45, 0x0e}, // SPECIES_MARILL
|
||||
{0x65, 0x0e}, // SPECIES_AZUMARILL
|
||||
{0x76, 0x09}, // SPECIES_SUDOWOODO
|
||||
{0x55, 0x0d}, // SPECIES_MEW
|
||||
{0x75, 0x0d}, // SPECIES_CHIKORITA
|
||||
{0x77, 0x04}, // SPECIES_BAYLEEF
|
||||
{0x88, 0x00}, // SPECIES_MEGANIUM
|
||||
{0x55, 0x0e}, // SPECIES_CYNDAQUIL
|
||||
{0x76, 0x08}, // SPECIES_QUILAVA
|
||||
{0x78, 0x00}, // SPECIES_TYPHLOSION
|
||||
{0x55, 0x0f}, // SPECIES_TOTODILE
|
||||
{0x67, 0x06}, // SPECIES_CROCONAW
|
||||
{0x88, 0x00}, // SPECIES_FERALIGATR
|
||||
{0x47, 0x04}, // SPECIES_SENTRET
|
||||
{0x67, 0x07}, // SPECIES_FURRET
|
||||
{0x55, 0x0d}, // SPECIES_HOOTHOOT
|
||||
{0x58, 0x03}, // SPECIES_NOCTOWL
|
||||
{0x56, 0x0c}, // SPECIES_LEDYBA
|
||||
{0x67, 0x04}, // SPECIES_LEDIAN
|
||||
{0x54, 0x13}, // SPECIES_SPINARAK
|
||||
{0x87, 0x05}, // SPECIES_ARIADOS
|
||||
{0x88, 0x00}, // SPECIES_CROBAT
|
||||
{0x75, 0x10}, // SPECIES_CHINCHOU
|
||||
{0x87, 0x0b}, // SPECIES_LANTURN
|
||||
{0x45, 0x0c}, // SPECIES_PICHU
|
||||
{0x44, 0x14}, // SPECIES_CLEFFA
|
||||
{0x44, 0x12}, // SPECIES_IGGLYBUFF
|
||||
{0x34, 0x14}, // SPECIES_TOGEPI
|
||||
{0x46, 0x09}, // SPECIES_TOGETIC
|
||||
{0x44, 0x14}, // SPECIES_NATU
|
||||
{0x47, 0x07}, // SPECIES_XATU
|
||||
{0x55, 0x10}, // SPECIES_MAREEP
|
||||
{0x56, 0x0a}, // SPECIES_FLAAFFY
|
||||
{0x77, 0x05}, // SPECIES_AMPHAROS
|
||||
{0x45, 0x0e}, // SPECIES_BELLOSSOM
|
||||
{0x65, 0x0e}, // SPECIES_MARILL
|
||||
{0x76, 0x09}, // SPECIES_AZUMARILL
|
||||
{0x67, 0x06}, // SPECIES_SUDOWOODO
|
||||
{0x67, 0x06}, // SPECIES_POLITOED
|
||||
{0x67, 0x06}, // SPECIES_HOPPIP
|
||||
{0x66, 0x0a}, // SPECIES_SKIPLOOM
|
||||
{0x55, 0x0f}, // SPECIES_JUMPLUFF
|
||||
{0x77, 0x07}, // SPECIES_AIPOM
|
||||
{0x58, 0x03}, // SPECIES_SUNKERN
|
||||
{0x44, 0x10}, // SPECIES_SUNFLORA
|
||||
{0x56, 0x08}, // SPECIES_YANMA
|
||||
{0x86, 0x0a}, // SPECIES_WOOPER
|
||||
{0x54, 0x10}, // SPECIES_QUAGSIRE
|
||||
{0x77, 0x07}, // SPECIES_ESPEON
|
||||
{0x66, 0x08}, // SPECIES_UMBREON
|
||||
{0x67, 0x08}, // SPECIES_MURKROW
|
||||
{0x66, 0x0b}, // SPECIES_SLOWKING
|
||||
{0x58, 0x01}, // SPECIES_MISDREAVUS
|
||||
{0x55, 0x0c}, // SPECIES_UNOWN
|
||||
{0x35, 0x0f}, // SPECIES_WOBBUFFET
|
||||
{0x77, 0x06}, // SPECIES_GIRAFARIG
|
||||
{0x88, 0x03}, // SPECIES_PINECO
|
||||
{0x56, 0x0a}, // SPECIES_FORRETRESS
|
||||
{0x76, 0x09}, // SPECIES_DUNSPARCE
|
||||
{0x74, 0x11}, // SPECIES_GLIGAR
|
||||
{0x78, 0x03}, // SPECIES_STEELIX
|
||||
{0x88, 0x00}, // SPECIES_SNUBBULL
|
||||
{0x55, 0x0d}, // SPECIES_GRANBULL
|
||||
{0x57, 0x06}, // SPECIES_QWILFISH
|
||||
{0x56, 0x0a}, // SPECIES_SCIZOR
|
||||
{0x88, 0x00}, // SPECIES_SHUCKLE
|
||||
{0x66, 0x09}, // SPECIES_HERACROSS
|
||||
{0x88, 0x03}, // SPECIES_SNEASEL
|
||||
{0x67, 0x05}, // SPECIES_TEDDIURSA
|
||||
{0x45, 0x0d}, // SPECIES_URSARING
|
||||
{0x78, 0x01}, // SPECIES_SLUGMA
|
||||
{0x45, 0x0d}, // SPECIES_MAGCARGO
|
||||
{0x57, 0x0d}, // SPECIES_SWINUB
|
||||
{0x43, 0x14}, // SPECIES_PILOSWINE
|
||||
{0x66, 0x08}, // SPECIES_CORSOLA
|
||||
{0x65, 0x0c}, // SPECIES_REMORAID
|
||||
{0x55, 0x0e}, // SPECIES_OCTILLERY
|
||||
{0x66, 0x0a}, // SPECIES_DELIBIRD
|
||||
{0x56, 0x08}, // SPECIES_MANTINE
|
||||
{0x88, 0x01}, // SPECIES_SKARMORY
|
||||
{0x88, 0x00}, // SPECIES_HOUNDOUR
|
||||
{0x56, 0x0b}, // SPECIES_HOUNDOOM
|
||||
{0x77, 0x05}, // SPECIES_KINGDRA
|
||||
{0x78, 0x04}, // SPECIES_PHANPY
|
||||
{0x54, 0x10}, // SPECIES_DONPHAN
|
||||
{0x86, 0x08}, // SPECIES_PORYGON2
|
||||
{0x55, 0x0f}, // SPECIES_STANTLER
|
||||
{0x88, 0x00}, // SPECIES_SMEARGLE
|
||||
{0x77, 0x06}, // SPECIES_TYROGUE
|
||||
{0x46, 0x09}, // SPECIES_HITMONTOP
|
||||
{0x67, 0x05}, // SPECIES_SMOOCHUM
|
||||
{0x35, 0x0f}, // SPECIES_ELEKID
|
||||
{0x76, 0x0a}, // SPECIES_MAGBY
|
||||
{0x45, 0x0d}, // SPECIES_MILTANK
|
||||
{0x77, 0x04}, // SPECIES_BLISSEY
|
||||
{0x77, 0x06}, // SPECIES_RAIKOU
|
||||
{0x66, 0x0a}, // SPECIES_HOPPIP
|
||||
{0x55, 0x0f}, // SPECIES_SKIPLOOM
|
||||
{0x77, 0x07}, // SPECIES_JUMPLUFF
|
||||
{0x58, 0x03}, // SPECIES_AIPOM
|
||||
{0x44, 0x10}, // SPECIES_SUNKERN
|
||||
{0x56, 0x08}, // SPECIES_SUNFLORA
|
||||
{0x86, 0x0a}, // SPECIES_YANMA
|
||||
{0x54, 0x10}, // SPECIES_WOOPER
|
||||
{0x77, 0x07}, // SPECIES_QUAGSIRE
|
||||
{0x66, 0x08}, // SPECIES_ESPEON
|
||||
{0x67, 0x08}, // SPECIES_UMBREON
|
||||
{0x66, 0x0b}, // SPECIES_MURKROW
|
||||
{0x58, 0x01}, // SPECIES_SLOWKING
|
||||
{0x55, 0x0c}, // SPECIES_MISDREAVUS
|
||||
{0x35, 0x0f}, // SPECIES_UNOWN
|
||||
{0x77, 0x06}, // SPECIES_WOBBUFFET
|
||||
{0x88, 0x03}, // SPECIES_GIRAFARIG
|
||||
{0x56, 0x0a}, // SPECIES_PINECO
|
||||
{0x76, 0x09}, // SPECIES_FORRETRESS
|
||||
{0x74, 0x11}, // SPECIES_DUNSPARCE
|
||||
{0x78, 0x03}, // SPECIES_GLIGAR
|
||||
{0x88, 0x00}, // SPECIES_STEELIX
|
||||
{0x55, 0x0d}, // SPECIES_SNUBBULL
|
||||
{0x57, 0x06}, // SPECIES_GRANBULL
|
||||
{0x56, 0x0a}, // SPECIES_QWILFISH
|
||||
{0x88, 0x00}, // SPECIES_SCIZOR
|
||||
{0x66, 0x09}, // SPECIES_SHUCKLE
|
||||
{0x88, 0x03}, // SPECIES_HERACROSS
|
||||
{0x67, 0x05}, // SPECIES_SNEASEL
|
||||
{0x45, 0x0d}, // SPECIES_TEDDIURSA
|
||||
{0x78, 0x01}, // SPECIES_URSARING
|
||||
{0x45, 0x0d}, // SPECIES_SLUGMA
|
||||
{0x57, 0x0d}, // SPECIES_MAGCARGO
|
||||
{0x43, 0x14}, // SPECIES_SWINUB
|
||||
{0x66, 0x08}, // SPECIES_PILOSWINE
|
||||
{0x65, 0x0c}, // SPECIES_CORSOLA
|
||||
{0x55, 0x0e}, // SPECIES_REMORAID
|
||||
{0x66, 0x0a}, // SPECIES_OCTILLERY
|
||||
{0x56, 0x08}, // SPECIES_DELIBIRD
|
||||
{0x88, 0x01}, // SPECIES_MANTINE
|
||||
{0x88, 0x00}, // SPECIES_SKARMORY
|
||||
{0x56, 0x0b}, // SPECIES_HOUNDOUR
|
||||
{0x77, 0x05}, // SPECIES_HOUNDOOM
|
||||
{0x78, 0x04}, // SPECIES_KINGDRA
|
||||
{0x54, 0x10}, // SPECIES_PHANPY
|
||||
{0x86, 0x08}, // SPECIES_DONPHAN
|
||||
{0x55, 0x0f}, // SPECIES_PORYGON2
|
||||
{0x88, 0x00}, // SPECIES_STANTLER
|
||||
{0x77, 0x06}, // SPECIES_SMEARGLE
|
||||
{0x46, 0x09}, // SPECIES_TYROGUE
|
||||
{0x67, 0x05}, // SPECIES_HITMONTOP
|
||||
{0x35, 0x0f}, // SPECIES_SMOOCHUM
|
||||
{0x76, 0x0a}, // SPECIES_ELEKID
|
||||
{0x45, 0x0d}, // SPECIES_MAGBY
|
||||
{0x77, 0x04}, // SPECIES_MILTANK
|
||||
{0x77, 0x06}, // SPECIES_BLISSEY
|
||||
{0x88, 0x00}, // SPECIES_RAIKOU
|
||||
{0x88, 0x00}, // SPECIES_ENTEI
|
||||
{0x88, 0x00}, // SPECIES_SUICUNE
|
||||
{0x88, 0x00}, // SPECIES_LARVITAR
|
||||
{0x46, 0x09}, // SPECIES_PUPITAR
|
||||
{0x56, 0x09}, // SPECIES_TYRANITAR
|
||||
{0x46, 0x09}, // SPECIES_LARVITAR
|
||||
{0x56, 0x09}, // SPECIES_PUPITAR
|
||||
{0x88, 0x00}, // SPECIES_TYRANITAR
|
||||
{0x88, 0x00}, // SPECIES_LUGIA
|
||||
{0x88, 0x00}, // SPECIES_HO_OH
|
||||
{0x88, 0x00}, // SPECIES_CELEBI
|
||||
{0x55, 0x0e}, // SPECIES_OLD_UNOWN_B
|
||||
{0x55, 0x0e}, // SPECIES_CELEBI
|
||||
{0x87, 0x04}, // SPECIES_OLD_UNOWN_B
|
||||
{0x87, 0x04}, // SPECIES_OLD_UNOWN_C
|
||||
{0x87, 0x04}, // SPECIES_OLD_UNOWN_D
|
||||
{0x87, 0x04}, // SPECIES_OLD_UNOWN_E
|
||||
@@ -276,168 +277,167 @@ const struct MonCoords gMonFrontPicCoords[] =
|
||||
{0x87, 0x04}, // SPECIES_OLD_UNOWN_X
|
||||
{0x87, 0x04}, // SPECIES_OLD_UNOWN_Y
|
||||
{0x87, 0x04}, // SPECIES_OLD_UNOWN_Z
|
||||
{0x87, 0x04}, // SPECIES_TREECKO
|
||||
{0x66, 0x08}, // SPECIES_GROVYLE
|
||||
{0x87, 0x04}, // SPECIES_SCEPTILE
|
||||
{0x88, 0x00}, // SPECIES_TORCHIC
|
||||
{0x56, 0x08}, // SPECIES_COMBUSKEN
|
||||
{0x88, 0x01}, // SPECIES_BLAZIKEN
|
||||
{0x88, 0x00}, // SPECIES_MUDKIP
|
||||
{0x56, 0x0c}, // SPECIES_MARSHTOMP
|
||||
{0x67, 0x06}, // SPECIES_SWAMPERT
|
||||
{0x88, 0x00}, // SPECIES_POOCHYENA
|
||||
{0x55, 0x0c}, // SPECIES_MIGHTYENA
|
||||
{0x87, 0x04}, // SPECIES_ZIGZAGOON
|
||||
{0x85, 0x0f}, // SPECIES_LINOONE
|
||||
{0x78, 0x03}, // SPECIES_WURMPLE
|
||||
{0x45, 0x0e}, // SPECIES_SILCOON
|
||||
{0x75, 0x11}, // SPECIES_BEAUTIFLY
|
||||
{0x86, 0x09}, // SPECIES_CASCOON
|
||||
{0x74, 0x10}, // SPECIES_DUSTOX
|
||||
{0x86, 0x0f}, // SPECIES_LOTAD
|
||||
{0x65, 0x0e}, // SPECIES_LOMBRE
|
||||
{0x66, 0x09}, // SPECIES_LUDICOLO
|
||||
{0x88, 0x00}, // SPECIES_SEEDOT
|
||||
{0x46, 0x10}, // SPECIES_NUZLEAF
|
||||
{0x56, 0x08}, // SPECIES_SHIFTRY
|
||||
{0x88, 0x02}, // SPECIES_NINCADA
|
||||
{0x74, 0x12}, // SPECIES_NINJASK
|
||||
{0x86, 0x0a}, // SPECIES_SHEDINJA
|
||||
{0x66, 0x0a}, // SPECIES_TAILLOW
|
||||
{0x64, 0x10}, // SPECIES_SWELLOW
|
||||
{0x87, 0x06}, // SPECIES_SHROOMISH
|
||||
{0x54, 0x10}, // SPECIES_BRELOOM
|
||||
{0x77, 0x04}, // SPECIES_SPINDA
|
||||
{0x68, 0x08}, // SPECIES_WINGULL
|
||||
{0x84, 0x18}, // SPECIES_PELIPPER
|
||||
{0x77, 0x04}, // SPECIES_SURSKIT
|
||||
{0x65, 0x0f}, // SPECIES_MASQUERAIN
|
||||
{0x88, 0x01}, // SPECIES_WAILMER
|
||||
{0x75, 0x0f}, // SPECIES_WAILORD
|
||||
{0x87, 0x0a}, // SPECIES_SKITTY
|
||||
{0x66, 0x0b}, // SPECIES_DELCATTY
|
||||
{0x66, 0x08}, // SPECIES_KECLEON
|
||||
{0x67, 0x07}, // SPECIES_BALTOY
|
||||
{0x55, 0x10}, // SPECIES_CLAYDOL
|
||||
{0x78, 0x06}, // SPECIES_NOSEPASS
|
||||
{0x56, 0x0c}, // SPECIES_TORKOAL
|
||||
{0x88, 0x02}, // SPECIES_SABLEYE
|
||||
{0x66, 0x09}, // SPECIES_BARBOACH
|
||||
{0x46, 0x0b}, // SPECIES_WHISCASH
|
||||
{0x76, 0x09}, // SPECIES_LUVDISC
|
||||
{0x46, 0x18}, // SPECIES_CORPHISH
|
||||
{0x66, 0x0c}, // SPECIES_CRAWDAUNT
|
||||
{0x88, 0x01}, // SPECIES_FEEBAS
|
||||
{0x46, 0x0d}, // SPECIES_MILOTIC
|
||||
{0x88, 0x00}, // SPECIES_CARVANHA
|
||||
{0x67, 0x06}, // SPECIES_SHARPEDO
|
||||
{0x78, 0x03}, // SPECIES_TRAPINCH
|
||||
{0x54, 0x10}, // SPECIES_VIBRAVA
|
||||
{0x86, 0x0c}, // SPECIES_FLYGON
|
||||
{0x88, 0x01}, // SPECIES_MAKUHITA
|
||||
{0x65, 0x0c}, // SPECIES_HARIYAMA
|
||||
{0x88, 0x01}, // SPECIES_ELECTRIKE
|
||||
{0x64, 0x12}, // SPECIES_MANECTRIC
|
||||
{0x67, 0x04}, // SPECIES_NUMEL
|
||||
{0x65, 0x0f}, // SPECIES_CAMERUPT
|
||||
{0x87, 0x09}, // SPECIES_SPHEAL
|
||||
{0x65, 0x10}, // SPECIES_SEALEO
|
||||
{0x86, 0x0a}, // SPECIES_WALREIN
|
||||
{0x88, 0x01}, // SPECIES_CACNEA
|
||||
{0x74, 0x10}, // SPECIES_CACTURNE
|
||||
{0x88, 0x00}, // SPECIES_SNORUNT
|
||||
{0x56, 0x0b}, // SPECIES_GLALIE
|
||||
{0x76, 0x0a}, // SPECIES_LUNATONE
|
||||
{0x66, 0x09}, // SPECIES_SOLROCK
|
||||
{0x88, 0x01}, // SPECIES_AZURILL
|
||||
{0x55, 0x0f}, // SPECIES_SPOINK
|
||||
{0x46, 0x09}, // SPECIES_GRUMPIG
|
||||
{0x77, 0x05}, // SPECIES_PLUSLE
|
||||
{0x56, 0x0e}, // SPECIES_MINUN
|
||||
{0x66, 0x0c}, // SPECIES_MAWILE
|
||||
{0x76, 0x08}, // SPECIES_MEDITITE
|
||||
{0x65, 0x0c}, // SPECIES_MEDICHAM
|
||||
{0x68, 0x01}, // SPECIES_SWABLU
|
||||
{0x76, 0x11}, // SPECIES_ALTARIA
|
||||
{0x88, 0x02}, // SPECIES_WYNAUT
|
||||
{0x55, 0x0c}, // SPECIES_DUSKULL
|
||||
{0x66, 0x0a}, // SPECIES_DUSCLOPS
|
||||
{0x77, 0x05}, // SPECIES_ROSELIA
|
||||
{0x76, 0x08}, // SPECIES_SLAKOTH
|
||||
{0x74, 0x12}, // SPECIES_VIGOROTH
|
||||
{0x78, 0x00}, // SPECIES_SLAKING
|
||||
{0x86, 0x08}, // SPECIES_GULPIN
|
||||
{0x55, 0x12}, // SPECIES_SWALOT
|
||||
{0x66, 0x08}, // SPECIES_TROPIUS
|
||||
{0x88, 0x00}, // SPECIES_WHISMUR
|
||||
{0x55, 0x0e}, // SPECIES_LOUDRED
|
||||
{0x78, 0x03}, // SPECIES_EXPLOUD
|
||||
{0x88, 0x01}, // SPECIES_CLAMPERL
|
||||
{0x55, 0x0e}, // SPECIES_HUNTAIL
|
||||
{0x78, 0x03}, // SPECIES_GOREBYSS
|
||||
{0x86, 0x0b}, // SPECIES_ABSOL
|
||||
{0x68, 0x00}, // SPECIES_SHUPPET
|
||||
{0x56, 0x0e}, // SPECIES_BANETTE
|
||||
{0x55, 0x0c}, // SPECIES_SEVIPER
|
||||
{0x77, 0x08}, // SPECIES_ZANGOOSE
|
||||
{0x87, 0x05}, // SPECIES_RELICANTH
|
||||
{0x77, 0x0b}, // SPECIES_ARON
|
||||
{0x43, 0x14}, // SPECIES_LAIRON
|
||||
{0x75, 0x0d}, // SPECIES_AGGRON
|
||||
{0x88, 0x00}, // SPECIES_CASTFORM
|
||||
{0x34, 0x11}, // SPECIES_VOLBEAT
|
||||
{0x66, 0x08}, // SPECIES_ILLUMISE
|
||||
{0x56, 0x08}, // SPECIES_LILEEP
|
||||
{0x67, 0x07}, // SPECIES_CRADILY
|
||||
{0x78, 0x00}, // SPECIES_ANORITH
|
||||
{0x66, 0x08}, // SPECIES_ARMALDO
|
||||
{0x88, 0x00}, // SPECIES_RALTS
|
||||
{0x35, 0x0f}, // SPECIES_KIRLIA
|
||||
{0x47, 0x06}, // SPECIES_GARDEVOIR
|
||||
{0x78, 0x01}, // SPECIES_BAGON
|
||||
{0x56, 0x0b}, // SPECIES_SHELGON
|
||||
{0x66, 0x09}, // SPECIES_SALAMENCE
|
||||
{0x87, 0x04}, // SPECIES_BELDUM
|
||||
{0x55, 0x0f}, // SPECIES_METANG
|
||||
{0x87, 0x07}, // SPECIES_METAGROSS
|
||||
{0x87, 0x06}, // SPECIES_REGIROCK
|
||||
{0x78, 0x04}, // SPECIES_REGICE
|
||||
{0x88, 0x02}, // SPECIES_REGISTEEL
|
||||
{0x88, 0x03}, // SPECIES_KYOGRE
|
||||
{0x87, 0x04}, // SPECIES_GROUDON
|
||||
{0x88, 0x01}, // SPECIES_RAYQUAZA
|
||||
{0x88, 0x00}, // SPECIES_LATIAS
|
||||
{0x88, 0x01}, // SPECIES_LATIOS
|
||||
{0x88, 0x02}, // SPECIES_JIRACHI
|
||||
{0x66, 0x0d}, // SPECIES_DEOXYS
|
||||
{0x88, 0x01}, // SPECIES_CHIMECHO
|
||||
{0x37, 0x06}, // SPECIES_EGG
|
||||
{0x33, 0x14}, // SPECIES_UNOWN_B
|
||||
{0x34, 0x10}, // SPECIES_UNOWN_C
|
||||
{0x66, 0x08}, // SPECIES_TREECKO
|
||||
{0x87, 0x04}, // SPECIES_GROVYLE
|
||||
{0x88, 0x00}, // SPECIES_SCEPTILE
|
||||
{0x56, 0x08}, // SPECIES_TORCHIC
|
||||
{0x88, 0x01}, // SPECIES_COMBUSKEN
|
||||
{0x88, 0x00}, // SPECIES_BLAZIKEN
|
||||
{0x56, 0x0c}, // SPECIES_MUDKIP
|
||||
{0x67, 0x06}, // SPECIES_MARSHTOMP
|
||||
{0x88, 0x00}, // SPECIES_SWAMPERT
|
||||
{0x55, 0x0c}, // SPECIES_POOCHYENA
|
||||
{0x87, 0x04}, // SPECIES_MIGHTYENA
|
||||
{0x85, 0x0f}, // SPECIES_ZIGZAGOON
|
||||
{0x78, 0x03}, // SPECIES_LINOONE
|
||||
{0x45, 0x0e}, // SPECIES_WURMPLE
|
||||
{0x75, 0x11}, // SPECIES_SILCOON
|
||||
{0x86, 0x09}, // SPECIES_BEAUTIFLY
|
||||
{0x74, 0x10}, // SPECIES_CASCOON
|
||||
{0x86, 0x0f}, // SPECIES_DUSTOX
|
||||
{0x65, 0x0e}, // SPECIES_LOTAD
|
||||
{0x66, 0x09}, // SPECIES_LOMBRE
|
||||
{0x88, 0x00}, // SPECIES_LUDICOLO
|
||||
{0x46, 0x10}, // SPECIES_SEEDOT
|
||||
{0x56, 0x08}, // SPECIES_NUZLEAF
|
||||
{0x88, 0x02}, // SPECIES_SHIFTRY
|
||||
{0x74, 0x12}, // SPECIES_NINCADA
|
||||
{0x86, 0x0a}, // SPECIES_NINJASK
|
||||
{0x66, 0x0a}, // SPECIES_SHEDINJA
|
||||
{0x64, 0x10}, // SPECIES_TAILLOW
|
||||
{0x87, 0x06}, // SPECIES_SWELLOW
|
||||
{0x54, 0x10}, // SPECIES_SHROOMISH
|
||||
{0x77, 0x04}, // SPECIES_BRELOOM
|
||||
{0x68, 0x08}, // SPECIES_SPINDA
|
||||
{0x84, 0x18}, // SPECIES_WINGULL
|
||||
{0x77, 0x04}, // SPECIES_PELIPPER
|
||||
{0x65, 0x0f}, // SPECIES_SURSKIT
|
||||
{0x88, 0x01}, // SPECIES_MASQUERAIN
|
||||
{0x75, 0x0f}, // SPECIES_WAILMER
|
||||
{0x87, 0x0a}, // SPECIES_WAILORD
|
||||
{0x66, 0x0b}, // SPECIES_SKITTY
|
||||
{0x66, 0x08}, // SPECIES_DELCATTY
|
||||
{0x67, 0x07}, // SPECIES_KECLEON
|
||||
{0x55, 0x10}, // SPECIES_BALTOY
|
||||
{0x78, 0x06}, // SPECIES_CLAYDOL
|
||||
{0x56, 0x0c}, // SPECIES_NOSEPASS
|
||||
{0x88, 0x02}, // SPECIES_TORKOAL
|
||||
{0x66, 0x09}, // SPECIES_SABLEYE
|
||||
{0x46, 0x0b}, // SPECIES_BARBOACH
|
||||
{0x76, 0x09}, // SPECIES_WHISCASH
|
||||
{0x46, 0x18}, // SPECIES_LUVDISC
|
||||
{0x66, 0x0c}, // SPECIES_CORPHISH
|
||||
{0x88, 0x01}, // SPECIES_CRAWDAUNT
|
||||
{0x46, 0x0d}, // SPECIES_FEEBAS
|
||||
{0x88, 0x00}, // SPECIES_MILOTIC
|
||||
{0x67, 0x06}, // SPECIES_CARVANHA
|
||||
{0x78, 0x03}, // SPECIES_SHARPEDO
|
||||
{0x54, 0x10}, // SPECIES_TRAPINCH
|
||||
{0x86, 0x0c}, // SPECIES_VIBRAVA
|
||||
{0x88, 0x01}, // SPECIES_FLYGON
|
||||
{0x65, 0x0c}, // SPECIES_MAKUHITA
|
||||
{0x88, 0x01}, // SPECIES_HARIYAMA
|
||||
{0x64, 0x12}, // SPECIES_ELECTRIKE
|
||||
{0x67, 0x04}, // SPECIES_MANECTRIC
|
||||
{0x65, 0x0f}, // SPECIES_NUMEL
|
||||
{0x87, 0x09}, // SPECIES_CAMERUPT
|
||||
{0x65, 0x10}, // SPECIES_SPHEAL
|
||||
{0x86, 0x0a}, // SPECIES_SEALEO
|
||||
{0x88, 0x01}, // SPECIES_WALREIN
|
||||
{0x74, 0x10}, // SPECIES_CACNEA
|
||||
{0x88, 0x00}, // SPECIES_CACTURNE
|
||||
{0x56, 0x0b}, // SPECIES_SNORUNT
|
||||
{0x76, 0x0a}, // SPECIES_GLALIE
|
||||
{0x66, 0x09}, // SPECIES_LUNATONE
|
||||
{0x88, 0x01}, // SPECIES_SOLROCK
|
||||
{0x55, 0x0f}, // SPECIES_AZURILL
|
||||
{0x46, 0x09}, // SPECIES_SPOINK
|
||||
{0x77, 0x05}, // SPECIES_GRUMPIG
|
||||
{0x56, 0x0e}, // SPECIES_PLUSLE
|
||||
{0x66, 0x0c}, // SPECIES_MINUN
|
||||
{0x76, 0x08}, // SPECIES_MAWILE
|
||||
{0x65, 0x0c}, // SPECIES_MEDITITE
|
||||
{0x68, 0x01}, // SPECIES_MEDICHAM
|
||||
{0x76, 0x11}, // SPECIES_SWABLU
|
||||
{0x88, 0x02}, // SPECIES_ALTARIA
|
||||
{0x55, 0x0c}, // SPECIES_WYNAUT
|
||||
{0x66, 0x0a}, // SPECIES_DUSKULL
|
||||
{0x77, 0x05}, // SPECIES_DUSCLOPS
|
||||
{0x76, 0x08}, // SPECIES_ROSELIA
|
||||
{0x74, 0x12}, // SPECIES_SLAKOTH
|
||||
{0x78, 0x00}, // SPECIES_VIGOROTH
|
||||
{0x86, 0x08}, // SPECIES_SLAKING
|
||||
{0x55, 0x12}, // SPECIES_GULPIN
|
||||
{0x66, 0x08}, // SPECIES_SWALOT
|
||||
{0x88, 0x00}, // SPECIES_TROPIUS
|
||||
{0x55, 0x0e}, // SPECIES_WHISMUR
|
||||
{0x78, 0x03}, // SPECIES_LOUDRED
|
||||
{0x88, 0x01}, // SPECIES_EXPLOUD
|
||||
{0x55, 0x0e}, // SPECIES_CLAMPERL
|
||||
{0x78, 0x03}, // SPECIES_HUNTAIL
|
||||
{0x86, 0x0b}, // SPECIES_GOREBYSS
|
||||
{0x68, 0x00}, // SPECIES_ABSOL
|
||||
{0x56, 0x0e}, // SPECIES_SHUPPET
|
||||
{0x55, 0x0c}, // SPECIES_BANETTE
|
||||
{0x77, 0x08}, // SPECIES_SEVIPER
|
||||
{0x87, 0x05}, // SPECIES_ZANGOOSE
|
||||
{0x77, 0x0b}, // SPECIES_RELICANTH
|
||||
{0x43, 0x14}, // SPECIES_ARON
|
||||
{0x75, 0x0d}, // SPECIES_LAIRON
|
||||
{0x88, 0x00}, // SPECIES_AGGRON
|
||||
{0x34, 0x11}, // SPECIES_CASTFORM
|
||||
{0x66, 0x08}, // SPECIES_VOLBEAT
|
||||
{0x56, 0x08}, // SPECIES_ILLUMISE
|
||||
{0x67, 0x07}, // SPECIES_LILEEP
|
||||
{0x78, 0x00}, // SPECIES_CRADILY
|
||||
{0x66, 0x08}, // SPECIES_ANORITH
|
||||
{0x88, 0x00}, // SPECIES_ARMALDO
|
||||
{0x35, 0x0f}, // SPECIES_RALTS
|
||||
{0x47, 0x06}, // SPECIES_KIRLIA
|
||||
{0x78, 0x01}, // SPECIES_GARDEVOIR
|
||||
{0x56, 0x0b}, // SPECIES_BAGON
|
||||
{0x66, 0x09}, // SPECIES_SHELGON
|
||||
{0x87, 0x04}, // SPECIES_SALAMENCE
|
||||
{0x55, 0x0f}, // SPECIES_BELDUM
|
||||
{0x87, 0x07}, // SPECIES_METANG
|
||||
{0x87, 0x06}, // SPECIES_METAGROSS
|
||||
{0x78, 0x04}, // SPECIES_REGIROCK
|
||||
{0x88, 0x02}, // SPECIES_REGICE
|
||||
{0x88, 0x03}, // SPECIES_REGISTEEL
|
||||
{0x87, 0x04}, // SPECIES_KYOGRE
|
||||
{0x88, 0x01}, // SPECIES_GROUDON
|
||||
{0x88, 0x00}, // SPECIES_RAYQUAZA
|
||||
{0x88, 0x01}, // SPECIES_LATIAS
|
||||
{0x88, 0x02}, // SPECIES_LATIOS
|
||||
{0x66, 0x0d}, // SPECIES_JIRACHI
|
||||
{0x88, 0x01}, // SPECIES_DEOXYS
|
||||
{0x37, 0x06}, // SPECIES_CHIMECHO
|
||||
{0x33, 0x14}, // SPECIES_EGG
|
||||
{0x34, 0x10}, // SPECIES_UNOWN_B
|
||||
{0x44, 0x10}, // SPECIES_UNOWN_C
|
||||
{0x44, 0x10}, // SPECIES_UNOWN_D
|
||||
{0x44, 0x10}, // SPECIES_UNOWN_E
|
||||
{0x44, 0x11}, // SPECIES_UNOWN_E
|
||||
{0x44, 0x11}, // SPECIES_UNOWN_F
|
||||
{0x44, 0x11}, // SPECIES_UNOWN_G
|
||||
{0x35, 0x0e}, // SPECIES_UNOWN_H
|
||||
{0x44, 0x10}, // SPECIES_UNOWN_I
|
||||
{0x34, 0x10}, // SPECIES_UNOWN_J
|
||||
{0x34, 0x11}, // SPECIES_UNOWN_K
|
||||
{0x44, 0x11}, // SPECIES_UNOWN_L
|
||||
{0x34, 0x13}, // SPECIES_UNOWN_M
|
||||
{0x44, 0x13}, // SPECIES_UNOWN_N
|
||||
{0x43, 0x14}, // SPECIES_UNOWN_O
|
||||
{0x44, 0x10}, // SPECIES_UNOWN_P
|
||||
{0x34, 0x13}, // SPECIES_UNOWN_Q
|
||||
{0x43, 0x15}, // SPECIES_UNOWN_R
|
||||
{0x34, 0x13}, // SPECIES_UNOWN_S
|
||||
{0x45, 0x0c}, // SPECIES_UNOWN_T
|
||||
{0x34, 0x12}, // SPECIES_UNOWN_U
|
||||
{0x35, 0x0e}, // SPECIES_UNOWN_G
|
||||
{0x44, 0x10}, // SPECIES_UNOWN_H
|
||||
{0x34, 0x10}, // SPECIES_UNOWN_I
|
||||
{0x34, 0x11}, // SPECIES_UNOWN_J
|
||||
{0x44, 0x11}, // SPECIES_UNOWN_K
|
||||
{0x34, 0x13}, // SPECIES_UNOWN_L
|
||||
{0x44, 0x13}, // SPECIES_UNOWN_M
|
||||
{0x43, 0x14}, // SPECIES_UNOWN_N
|
||||
{0x44, 0x10}, // SPECIES_UNOWN_O
|
||||
{0x34, 0x13}, // SPECIES_UNOWN_P
|
||||
{0x43, 0x15}, // SPECIES_UNOWN_Q
|
||||
{0x34, 0x13}, // SPECIES_UNOWN_R
|
||||
{0x45, 0x0c}, // SPECIES_UNOWN_S
|
||||
{0x34, 0x12}, // SPECIES_UNOWN_T
|
||||
{0x44, 0x12}, // SPECIES_UNOWN_U
|
||||
{0x44, 0x12}, // SPECIES_UNOWN_V
|
||||
{0x44, 0x12}, // SPECIES_UNOWN_W
|
||||
{0x44, 0x13}, // SPECIES_UNOWN_X
|
||||
{0x33, 0x15}, // SPECIES_UNOWN_Y
|
||||
{0x34, 0x11}, // SPECIES_UNOWN_Z
|
||||
{0x34, 0x10}, // SPECIES_UNOWN_EMARK
|
||||
{0x35, 0x0f}, // SPECIES_UNOWN_QMARK
|
||||
{0x35, 0x0d},
|
||||
{0x44, 0x13}, // SPECIES_UNOWN_W
|
||||
{0x33, 0x15}, // SPECIES_UNOWN_X
|
||||
{0x34, 0x11}, // SPECIES_UNOWN_Y
|
||||
{0x34, 0x10}, // SPECIES_UNOWN_Z
|
||||
{0x35, 0x0f}, // SPECIES_UNOWN_EMARK
|
||||
{0x35, 0x0d}, // SPECIES_UNOWN_QMARK
|
||||
};
|
||||
|
||||
+2
-1
@@ -1,13 +1,14 @@
|
||||
#include "global.h"
|
||||
#include "dewford_trend.h"
|
||||
#include "easy_chat.h"
|
||||
#include "constants/easy_chat.h"
|
||||
#include "event_data.h"
|
||||
#include "link.h"
|
||||
#include "malloc.h"
|
||||
#include "random.h"
|
||||
#include "text.h"
|
||||
#include "tv.h"
|
||||
#include "string_util.h"
|
||||
#include "constants/easy_chat.h"
|
||||
|
||||
// static functions
|
||||
static void sub_8122804(struct EasyChatPair *s, u16 b, u8 c);
|
||||
|
||||
+263
-6
@@ -1,13 +1,21 @@
|
||||
#include "global.h"
|
||||
#include "battle_anim.h"
|
||||
#include "scanline_effect.h"
|
||||
#include "task.h"
|
||||
#include "trig.h"
|
||||
#include "constants/rgb.h"
|
||||
|
||||
extern void sub_8113064(struct Sprite *);
|
||||
extern void sub_8113224(struct Sprite *);
|
||||
extern void sub_81131B4(struct Sprite *);
|
||||
extern void sub_8113224(struct Sprite *);
|
||||
extern void sub_8113250(struct Sprite *);
|
||||
extern void sub_81135EC(struct Sprite *);
|
||||
extern u16 gUnknown_0203A100[];
|
||||
|
||||
void sub_8113064(struct Sprite *);
|
||||
void sub_81131B4(struct Sprite *);
|
||||
void sub_8113224(struct Sprite *);
|
||||
void sub_8113250(struct Sprite *);
|
||||
void sub_81135EC(struct Sprite *);
|
||||
static void sub_81132E0(struct Sprite *);
|
||||
static void sub_81134B8(u8);
|
||||
static void sub_8113574(struct Task *);
|
||||
static void sub_811369C(struct Sprite *);
|
||||
|
||||
const union AnimCmd gUnknown_08596E60[] =
|
||||
{
|
||||
@@ -178,3 +186,252 @@ const struct SpriteTemplate gUnknown_08596FB0 =
|
||||
.affineAnims = gDummySpriteAffineAnimTable,
|
||||
.callback = sub_81135EC,
|
||||
};
|
||||
|
||||
void sub_8113064(struct Sprite *sprite)
|
||||
{
|
||||
sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimAttacker, 2);
|
||||
sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimAttacker, 3);
|
||||
if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER)
|
||||
{
|
||||
sprite->pos1.x -= gBattleAnimArgs[0];
|
||||
gBattleAnimArgs[3] = -gBattleAnimArgs[3];
|
||||
gBattleAnimArgs[4] = -gBattleAnimArgs[4];
|
||||
}
|
||||
else
|
||||
{
|
||||
sprite->pos1.x += gBattleAnimArgs[0];
|
||||
}
|
||||
|
||||
sprite->pos1.y += gBattleAnimArgs[1];
|
||||
sprite->data[0] = gBattleAnimArgs[2];
|
||||
sprite->data[1] = gBattleAnimArgs[3];
|
||||
sprite->data[3] = gBattleAnimArgs[4];
|
||||
sprite->data[5] = gBattleAnimArgs[5];
|
||||
sprite->invisible = 1;
|
||||
StoreSpriteCallbackInData6(sprite, move_anim_8074EE0);
|
||||
sprite->callback = sub_80A66DC;
|
||||
}
|
||||
|
||||
static void sub_8113100(struct Sprite *sprite)
|
||||
{
|
||||
sub_80A6838(sprite);
|
||||
sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimTarget, 2);
|
||||
sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimTarget, 3);
|
||||
if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER)
|
||||
{
|
||||
sprite->pos1.x -= gBattleAnimArgs[1];
|
||||
sprite->pos1.y += gBattleAnimArgs[1];
|
||||
sprite->data[2] -= gBattleAnimArgs[2];
|
||||
sprite->data[4] += gBattleAnimArgs[3];
|
||||
}
|
||||
else
|
||||
{
|
||||
sprite->pos1.x += gBattleAnimArgs[0];
|
||||
sprite->pos1.y += gBattleAnimArgs[1];
|
||||
sprite->data[2] += gBattleAnimArgs[2];
|
||||
sprite->data[4] += gBattleAnimArgs[3];
|
||||
StartSpriteAnim(sprite, 1);
|
||||
}
|
||||
|
||||
sprite->data[0] = gBattleAnimArgs[4];
|
||||
sprite->callback = StartAnimLinearTranslation;
|
||||
StoreSpriteCallbackInData6(sprite, move_anim_8074EE0);
|
||||
}
|
||||
|
||||
void sub_81131B4(struct Sprite *sprite)
|
||||
{
|
||||
if (gBattleAnimArgs[0] == 0)
|
||||
{
|
||||
sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimAttacker, 0);
|
||||
sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimAttacker, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimTarget, 0);
|
||||
sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimTarget, 1);
|
||||
}
|
||||
|
||||
sub_80A6864(sprite, gBattleAnimArgs[1]);
|
||||
sprite->pos1.y += gBattleAnimArgs[2];
|
||||
sprite->callback = sub_80A67D8;
|
||||
StoreSpriteCallbackInData6(sprite, move_anim_8074EE0);
|
||||
}
|
||||
|
||||
void sub_8113224(struct Sprite *sprite)
|
||||
{
|
||||
if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER)
|
||||
StartSpriteAffineAnim(sprite, 1);
|
||||
|
||||
sub_8113100(sprite);
|
||||
}
|
||||
|
||||
void sub_8113250(struct Sprite *sprite)
|
||||
{
|
||||
u16 r5;
|
||||
u16 r0;
|
||||
sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimAttacker, 2);
|
||||
sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimAttacker, 3);
|
||||
sprite->data[4] = 0;
|
||||
sprite->data[5] = 1;
|
||||
sprite->data[6] = gBattleAnimArgs[0];
|
||||
r5 = sub_80A861C(gBattlerAttacker, 0);
|
||||
r0 = sub_80A861C(gBattlerAttacker, 1);
|
||||
if (r5 > r0)
|
||||
sprite->data[7] = r5 / 2;
|
||||
else
|
||||
sprite->data[7] = r0 / 2;
|
||||
sprite->pos2.x = Cos(sprite->data[6], sprite->data[7]);
|
||||
sprite->pos2.y = Sin(sprite->data[6], sprite->data[7]);
|
||||
sprite->callback = sub_81132E0;
|
||||
}
|
||||
|
||||
static void sub_81132E0(struct Sprite *sprite)
|
||||
{
|
||||
switch (sprite->data[0])
|
||||
{
|
||||
case 0:
|
||||
sprite->data[6] = (sprite->data[6] - sprite->data[5]) & 0xFF;
|
||||
sprite->pos2.x = Cos(sprite->data[6], sprite->data[7]);
|
||||
sprite->pos2.y = Sin(sprite->data[6], sprite->data[7]);
|
||||
if (++sprite->data[4] > 5)
|
||||
{
|
||||
sprite->data[4] = 0;
|
||||
if (sprite->data[5] <= 15 && ++sprite->data[5] > 15)
|
||||
sprite->data[5] = 16;
|
||||
}
|
||||
if (++sprite->data[3] > 0x3C)
|
||||
{
|
||||
sprite->data[3] = 0;
|
||||
sprite->data[0]++;
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
sprite->data[6] = (sprite->data[6] - sprite->data[5]) & 0xFF;
|
||||
if (sprite->data[7] <= 0x95 && (sprite->data[7] += 8) > 0x95)
|
||||
sprite->data[7] = 0x96;
|
||||
sprite->pos2.x = Cos(sprite->data[6], sprite->data[7]);
|
||||
sprite->pos2.y = Sin(sprite->data[6], sprite->data[7]);
|
||||
if (++sprite->data[4] > 5)
|
||||
{
|
||||
sprite->data[4] = 0;
|
||||
if (sprite->data[5] <= 15 && ++sprite->data[5] > 15)
|
||||
sprite->data[5] = 16;
|
||||
}
|
||||
if (++sprite->data[3] > 20)
|
||||
DestroyAnimSprite(sprite);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_81133E8(u8 taskId)
|
||||
{
|
||||
struct ScanlineEffectParams sp;
|
||||
struct Task *task = &gTasks[taskId];
|
||||
u16 i;
|
||||
u8 r1;
|
||||
if (sub_80A8364(gBattleAnimAttacker) == 1)
|
||||
{
|
||||
sp.dmaDest = ®_BG1HOFS;
|
||||
task->data[2] = gBattle_BG1_X;
|
||||
}
|
||||
else
|
||||
{
|
||||
sp.dmaDest = ®_BG2HOFS;
|
||||
task->data[2] = gBattle_BG2_X;
|
||||
}
|
||||
|
||||
sp.dmaControl = 0xA2600001;
|
||||
sp.initState = 1;
|
||||
sp.unused9 = 0;
|
||||
r1 = GetBattlerYCoordWithElevation(gBattleAnimAttacker);
|
||||
task->data[3] = r1 - 32;
|
||||
task->data[4] = r1 + 32;
|
||||
if (task->data[3] < 0)
|
||||
task->data[3] = 0;
|
||||
|
||||
for (i = task->data[3]; i <= task->data[4]; i++)
|
||||
{
|
||||
gScanlineEffectRegBuffers[0][i] = task->data[2];
|
||||
gScanlineEffectRegBuffers[1][i] = task->data[2];
|
||||
}
|
||||
|
||||
ScanlineEffect_SetParams(sp);
|
||||
task->func = sub_81134B8;
|
||||
}
|
||||
|
||||
static void sub_81134B8(u8 taskId)
|
||||
{
|
||||
struct Task *task = &gTasks[taskId];
|
||||
switch (task->data[0])
|
||||
{
|
||||
case 0:
|
||||
if (++task->data[7] > 1)
|
||||
{
|
||||
task->data[7] = 0;
|
||||
if (++task->data[6] == 3)
|
||||
task->data[0]++;
|
||||
}
|
||||
sub_8113574(task);
|
||||
break;
|
||||
case 1:
|
||||
if (++task->data[1] > 0x3C)
|
||||
task->data[0]++;
|
||||
sub_8113574(task);
|
||||
break;
|
||||
case 2:
|
||||
if (++task->data[7] > 1)
|
||||
{
|
||||
task->data[7] = 0;
|
||||
if (--task->data[6] == 0)
|
||||
task->data[0]++;
|
||||
}
|
||||
sub_8113574(task);
|
||||
break;
|
||||
case 3:
|
||||
gScanlineEffect.state = 3;
|
||||
task->data[0]++;
|
||||
break;
|
||||
case 4:
|
||||
DestroyAnimVisualTask(taskId);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void sub_8113574(struct Task *task)
|
||||
{
|
||||
u16 r3 = task->data[5];
|
||||
u16 i;
|
||||
for (i = task->data[3]; i <= task->data[4]; i++)
|
||||
{
|
||||
gScanlineEffectRegBuffers[gScanlineEffect.srcBuffer][i] = ((gSineTable[r3] * task->data[6]) >> 7) + task->data[2];
|
||||
r3 = (r3 + 8) & 0xFF;
|
||||
}
|
||||
|
||||
task->data[5] = (task->data[5] + 9) & 0xFF;
|
||||
}
|
||||
|
||||
void sub_81135EC(struct Sprite *sprite)
|
||||
{
|
||||
int r6 = (gBattleAnimArgs[2] * 3) / 5;
|
||||
int i;
|
||||
sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimAttacker, 2);
|
||||
sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimAttacker, 3) + gBattleAnimArgs[4];
|
||||
sprite->data[1] = Cos(gBattleAnimArgs[1], gBattleAnimArgs[2]);
|
||||
sprite->data[2] = Sin(gBattleAnimArgs[1], r6);
|
||||
sprite->pos1.x += sprite->data[1] * gBattleAnimArgs[0];
|
||||
sprite->pos1.y += sprite->data[2] * gBattleAnimArgs[0];
|
||||
sprite->data[3] = gBattleAnimArgs[3];
|
||||
sprite->callback = sub_811369C;
|
||||
for (i = 0; i < 7; i++)
|
||||
gUnknown_0203A100[i] = sprite->data[i];
|
||||
}
|
||||
|
||||
static void sub_811369C(struct Sprite *sprite)
|
||||
{
|
||||
sprite->data[4] += sprite->data[1];
|
||||
sprite->data[5] += sprite->data[2];
|
||||
sprite->pos2.x = sprite->data[4] / 10;
|
||||
sprite->pos2.y = sprite->data[5] / 10;
|
||||
if (++sprite->data[0] > sprite->data[3])
|
||||
DestroyAnimSprite(sprite);
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#include "palette.h"
|
||||
#include "event_data.h"
|
||||
#include "easy_chat.h"
|
||||
#include "string_util.h"
|
||||
|
||||
// Static type declarations
|
||||
|
||||
|
||||
+2
-2
@@ -13,7 +13,7 @@ extern void sub_80FED28(struct Sprite *);
|
||||
extern void sub_80FEE78(struct Sprite *);
|
||||
extern void sub_80FEF44(struct Sprite *);
|
||||
extern void sub_80FEFFC(struct Sprite *);
|
||||
extern void sub_80FF268(struct Sprite *);
|
||||
extern void AnimMoveTwisterParticle(struct Sprite *);
|
||||
extern void sub_80FF0F4(struct Sprite *);
|
||||
extern void sub_80FF374(struct Sprite *);
|
||||
extern void sub_80FF698(struct Sprite *);
|
||||
@@ -437,7 +437,7 @@ const struct SpriteTemplate gUnknown_085923A8 =
|
||||
.anims = gUnknown_08592388,
|
||||
.images = NULL,
|
||||
.affineAnims = gDummySpriteAffineAnimTable,
|
||||
.callback = sub_80FF268,
|
||||
.callback = AnimMoveTwisterParticle,
|
||||
};
|
||||
|
||||
const union AnimCmd gUnknown_085923C0[] =
|
||||
|
||||
+3
-3
@@ -305,7 +305,7 @@ static void CreatedHatchedMon(struct Pokemon *egg, struct Pokemon *temp)
|
||||
u32 personality, pokerus;
|
||||
u8 i, friendship, language, gameMet, markings, obedience;
|
||||
u16 moves[4];
|
||||
u32 ivs[6];
|
||||
u32 ivs[NUM_STATS];
|
||||
|
||||
|
||||
species = GetMonData(egg, MON_DATA_SPECIES);
|
||||
@@ -317,7 +317,7 @@ static void CreatedHatchedMon(struct Pokemon *egg, struct Pokemon *temp)
|
||||
|
||||
personality = GetMonData(egg, MON_DATA_PERSONALITY);
|
||||
|
||||
for (i = 0; i < 6; i++)
|
||||
for (i = 0; i < NUM_STATS; i++)
|
||||
{
|
||||
ivs[i] = GetMonData(egg, MON_DATA_HP_IV + i);
|
||||
}
|
||||
@@ -335,7 +335,7 @@ static void CreatedHatchedMon(struct Pokemon *egg, struct Pokemon *temp)
|
||||
SetMonData(temp, MON_DATA_MOVE1 + i, &moves[i]);
|
||||
}
|
||||
|
||||
for (i = 0; i < 6; i++)
|
||||
for (i = 0; i < NUM_STATS; i++)
|
||||
{
|
||||
SetMonData(temp, MON_DATA_HP_IV + i, &ivs[i]);
|
||||
}
|
||||
|
||||
@@ -2559,7 +2559,7 @@ struct EventObjectTemplate *GetBaseTemplateForEventObject(const struct EventObje
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
for (i = 0; i < 64; i++) // Using ARRAY_COUNT here results in the wrong conditional branch instruction (bls instead of ble)
|
||||
for (i = 0; i < EVENT_OBJECT_TEMPLATES_COUNT; i++)
|
||||
{
|
||||
if (eventObject->localId == gSaveBlock1Ptr->eventObjectTemplates[i].localId)
|
||||
{
|
||||
|
||||
@@ -41,15 +41,6 @@ struct EvoInfo
|
||||
static EWRAM_DATA struct EvoInfo *sEvoStructPtr = NULL;
|
||||
static EWRAM_DATA u16 *sEvoMovingBgPtr = NULL;
|
||||
|
||||
extern u16 gBattle_BG0_X;
|
||||
extern u16 gBattle_BG0_Y;
|
||||
extern u16 gBattle_BG1_X;
|
||||
extern u16 gBattle_BG1_Y;
|
||||
extern u16 gBattle_BG2_X;
|
||||
extern u16 gBattle_BG2_Y;
|
||||
extern u16 gBattle_BG3_X;
|
||||
extern u16 gBattle_BG3_Y;
|
||||
|
||||
#define sEvoCursorPos gBattleCommunication[1] // when learning a new move
|
||||
#define sEvoGraphicsTaskID gBattleCommunication[2]
|
||||
|
||||
|
||||
+131
-181
@@ -32,6 +32,8 @@
|
||||
|
||||
#define subsprite_table(ptr) {.subsprites = ptr, .subspriteCount = (sizeof ptr) / (sizeof(struct Subsprite))}
|
||||
|
||||
extern struct CompressedSpritePalette gMonPaletteTable[]; // GF made a mistake and did not extern it as const.
|
||||
|
||||
EWRAM_DATA s32 gFieldEffectArguments[8] = {0};
|
||||
|
||||
// Static type declarations
|
||||
@@ -755,67 +757,15 @@ u8 AddNewGameBirchObject(s16 x, s16 y, u8 subpriority)
|
||||
return CreateSprite(&gNewGameBirchObjectTemplate, x, y, subpriority);
|
||||
}
|
||||
|
||||
#ifdef NONMATCHING
|
||||
u8 CreateMonSprite_PicBox(u16 species, s16 x, s16 y, u8 subpriority)
|
||||
{
|
||||
u16 spriteId = CreateMonPicSprite_HandleDeoxys(species, 0, 0x8000, 1, x, y, 0, gMonPaletteTable[species].tag);
|
||||
s32 spriteId = CreateMonPicSprite_HandleDeoxys(species, 0, 0x8000, 1, x, y, 0, gMonPaletteTable[species].tag);
|
||||
PreservePaletteInWeather(IndexOfSpritePaletteTag(gMonPaletteTable[species].tag) + 0x10);
|
||||
if (spriteId == 0xFFFF)
|
||||
return MAX_SPRITES;
|
||||
|
||||
return spriteId;
|
||||
else
|
||||
return spriteId;
|
||||
}
|
||||
#else
|
||||
NAKED
|
||||
u8 CreateMonSprite_PicBox(u16 species, s16 x, s16 y, u8 subpriority)
|
||||
{
|
||||
asm_unified("push {r4,r5,lr}\n\
|
||||
sub sp, 0x10\n\
|
||||
lsls r0, 16\n\
|
||||
lsrs r0, 16\n\
|
||||
movs r3, 0x80\n\
|
||||
lsls r3, 8\n\
|
||||
lsls r1, 16\n\
|
||||
asrs r1, 16\n\
|
||||
str r1, [sp]\n\
|
||||
lsls r2, 16\n\
|
||||
asrs r2, 16\n\
|
||||
str r2, [sp, 0x4]\n\
|
||||
movs r1, 0\n\
|
||||
str r1, [sp, 0x8]\n\
|
||||
ldr r1, =gMonPaletteTable\n\
|
||||
lsls r4, r0, 3\n\
|
||||
adds r4, r1\n\
|
||||
ldrh r1, [r4, 0x4]\n\
|
||||
str r1, [sp, 0xC]\n\
|
||||
movs r1, 0\n\
|
||||
adds r2, r3, 0\n\
|
||||
movs r3, 0x1\n\
|
||||
bl CreateMonPicSprite_HandleDeoxys\n\
|
||||
lsls r0, 16\n\
|
||||
lsrs r5, r0, 16\n\
|
||||
ldrh r0, [r4, 0x4]\n\
|
||||
bl IndexOfSpritePaletteTag\n\
|
||||
adds r0, 0x10\n\
|
||||
lsls r0, 24\n\
|
||||
lsrs r0, 24\n\
|
||||
bl PreservePaletteInWeather\n\
|
||||
ldr r0, =0x0000ffff\n\
|
||||
cmp r5, r0\n\
|
||||
beq _080B5FDC\n\
|
||||
lsls r0, r5, 24\n\
|
||||
lsrs r0, 24\n\
|
||||
b _080B5FDE\n\
|
||||
.pool\n\
|
||||
_080B5FDC:\n\
|
||||
movs r0, 0x40\n\
|
||||
_080B5FDE:\n\
|
||||
add sp, 0x10\n\
|
||||
pop {r4,r5}\n\
|
||||
pop {r1}\n\
|
||||
bx r1");
|
||||
}
|
||||
#endif //NONMATCHING
|
||||
|
||||
u8 CreateMonSprite_FieldMove(u16 species, u32 d, u32 g, s16 x, s16 y, u8 subpriority)
|
||||
{
|
||||
@@ -824,8 +774,8 @@ u8 CreateMonSprite_FieldMove(u16 species, u32 d, u32 g, s16 x, s16 y, u8 subprio
|
||||
PreservePaletteInWeather(IndexOfSpritePaletteTag(spritePalette->tag) + 0x10);
|
||||
if (spriteId == 0xFFFF)
|
||||
return 0x40;
|
||||
|
||||
return spriteId;
|
||||
else
|
||||
return spriteId;
|
||||
}
|
||||
|
||||
void FreeResourcesAndDestroySprite(struct Sprite *sprite, u8 spriteId)
|
||||
@@ -3123,134 +3073,134 @@ NAKED
|
||||
u8 sub_80B8F98(void)
|
||||
{
|
||||
asm_unified("push {r4-r7,lr}\n\
|
||||
mov r7, r8\n\
|
||||
push {r7}\n\
|
||||
ldr r0, =gFieldEffectObjectTemplatePointers\n\
|
||||
adds r0, 0x90\n\
|
||||
ldr r0, [r0]\n\
|
||||
movs r2, 0x18\n\
|
||||
negs r2, r2\n\
|
||||
movs r1, 0x78\n\
|
||||
movs r3, 0x1\n\
|
||||
bl CreateSprite\n\
|
||||
lsls r0, 24\n\
|
||||
lsrs r0, 24\n\
|
||||
mov r8, r0\n\
|
||||
lsls r1, r0, 4\n\
|
||||
add r1, r8\n\
|
||||
lsls r1, 2\n\
|
||||
ldr r0, =gSprites\n\
|
||||
adds r1, r0\n\
|
||||
ldrb r2, [r1, 0x5]\n\
|
||||
movs r0, 0xD\n\
|
||||
negs r0, r0\n\
|
||||
ands r0, r2\n\
|
||||
movs r2, 0x4\n\
|
||||
orrs r0, r2\n\
|
||||
movs r2, 0xF\n\
|
||||
ands r0, r2\n\
|
||||
movs r2, 0x40\n\
|
||||
orrs r0, r2\n\
|
||||
strb r0, [r1, 0x5]\n\
|
||||
movs r2, 0\n\
|
||||
strh r2, [r1, 0x2E]\n\
|
||||
strh r2, [r1, 0x30]\n\
|
||||
strh r2, [r1, 0x32]\n\
|
||||
ldr r0, =0x0000ffff\n\
|
||||
strh r0, [r1, 0x34]\n\
|
||||
ldrh r0, [r1, 0x22]\n\
|
||||
strh r0, [r1, 0x36]\n\
|
||||
strh r2, [r1, 0x38]\n\
|
||||
ldr r1, =0x00003e41\n\
|
||||
movs r0, 0x50\n\
|
||||
bl SetGpuReg\n\
|
||||
ldr r1, =0x00000e0e\n\
|
||||
movs r0, 0x52\n\
|
||||
bl SetGpuReg\n\
|
||||
ldr r1, =0x00003f3f\n\
|
||||
movs r0, 0x48\n\
|
||||
bl SetGpuReg\n\
|
||||
ldr r0, =gUnknown_0855B610\n\
|
||||
movs r1, 0xC0\n\
|
||||
movs r2, 0x20\n\
|
||||
bl LoadPalette\n\
|
||||
movs r0, 0x12\n\
|
||||
movs r1, 0x78\n\
|
||||
bl SetGpuReg\n\
|
||||
movs r4, 0x3\n\
|
||||
ldr r7, =0x0600f800\n\
|
||||
ldr r0, =0x0000bff4\n\
|
||||
adds r6, r0, 0\n\
|
||||
mov r7, r8\n\
|
||||
push {r7}\n\
|
||||
ldr r0, =gFieldEffectObjectTemplatePointers\n\
|
||||
adds r0, 0x90\n\
|
||||
ldr r0, [r0]\n\
|
||||
movs r2, 0x18\n\
|
||||
negs r2, r2\n\
|
||||
movs r1, 0x78\n\
|
||||
movs r3, 0x1\n\
|
||||
bl CreateSprite\n\
|
||||
lsls r0, 24\n\
|
||||
lsrs r0, 24\n\
|
||||
mov r8, r0\n\
|
||||
lsls r1, r0, 4\n\
|
||||
add r1, r8\n\
|
||||
lsls r1, 2\n\
|
||||
ldr r0, =gSprites\n\
|
||||
adds r1, r0\n\
|
||||
ldrb r2, [r1, 0x5]\n\
|
||||
movs r0, 0xD\n\
|
||||
negs r0, r0\n\
|
||||
ands r0, r2\n\
|
||||
movs r2, 0x4\n\
|
||||
orrs r0, r2\n\
|
||||
movs r2, 0xF\n\
|
||||
ands r0, r2\n\
|
||||
movs r2, 0x40\n\
|
||||
orrs r0, r2\n\
|
||||
strb r0, [r1, 0x5]\n\
|
||||
movs r2, 0\n\
|
||||
strh r2, [r1, 0x2E]\n\
|
||||
strh r2, [r1, 0x30]\n\
|
||||
strh r2, [r1, 0x32]\n\
|
||||
ldr r0, =0x0000ffff\n\
|
||||
strh r0, [r1, 0x34]\n\
|
||||
ldrh r0, [r1, 0x22]\n\
|
||||
strh r0, [r1, 0x36]\n\
|
||||
strh r2, [r1, 0x38]\n\
|
||||
ldr r1, =0x00003e41\n\
|
||||
movs r0, 0x50\n\
|
||||
bl SetGpuReg\n\
|
||||
ldr r1, =0x00000e0e\n\
|
||||
movs r0, 0x52\n\
|
||||
bl SetGpuReg\n\
|
||||
ldr r1, =0x00003f3f\n\
|
||||
movs r0, 0x48\n\
|
||||
bl SetGpuReg\n\
|
||||
ldr r0, =gUnknown_0855B610\n\
|
||||
movs r1, 0xC0\n\
|
||||
movs r2, 0x20\n\
|
||||
bl LoadPalette\n\
|
||||
movs r0, 0x12\n\
|
||||
movs r1, 0x78\n\
|
||||
bl SetGpuReg\n\
|
||||
movs r4, 0x3\n\
|
||||
ldr r7, =0x0600f800\n\
|
||||
ldr r0, =0x0000bff4\n\
|
||||
adds r6, r0, 0\n\
|
||||
_080B901A:\n\
|
||||
movs r2, 0xC\n\
|
||||
lsls r0, r4, 1\n\
|
||||
lsls r5, r4, 5\n\
|
||||
adds r0, r4\n\
|
||||
lsls r3, r0, 1\n\
|
||||
movs r2, 0xC\n\
|
||||
lsls r0, r4, 1\n\
|
||||
lsls r5, r4, 5\n\
|
||||
adds r0, r4\n\
|
||||
lsls r3, r0, 1\n\
|
||||
_080B9024:\n\
|
||||
adds r0, r5, r2\n\
|
||||
lsls r0, 1\n\
|
||||
adds r0, r7\n\
|
||||
adds r1, r2, r6\n\
|
||||
adds r1, r3, r1\n\
|
||||
adds r1, 0x1\n\
|
||||
strh r1, [r0]\n\
|
||||
adds r0, r2, 0x1\n\
|
||||
lsls r0, 24\n\
|
||||
lsrs r2, r0, 24\n\
|
||||
cmp r2, 0x11\n\
|
||||
bls _080B9024\n\
|
||||
adds r0, r4, 0x1\n\
|
||||
lsls r0, 24\n\
|
||||
lsrs r4, r0, 24\n\
|
||||
cmp r4, 0xE\n\
|
||||
bls _080B901A\n\
|
||||
movs r0, 0\n\
|
||||
ldr r5, =gUnknown_0855B630\n\
|
||||
adds r0, r5, r2\n\
|
||||
lsls r0, 1\n\
|
||||
adds r0, r7\n\
|
||||
adds r1, r2, r6\n\
|
||||
adds r1, r3, r1\n\
|
||||
adds r1, 0x1\n\
|
||||
strh r1, [r0]\n\
|
||||
adds r0, r2, 0x1\n\
|
||||
lsls r0, 24\n\
|
||||
lsrs r2, r0, 24\n\
|
||||
cmp r2, 0x11\n\
|
||||
bls _080B9024\n\
|
||||
adds r0, r4, 0x1\n\
|
||||
lsls r0, 24\n\
|
||||
lsrs r4, r0, 24\n\
|
||||
cmp r4, 0xE\n\
|
||||
bls _080B901A\n\
|
||||
movs r0, 0\n\
|
||||
ldr r5, =gUnknown_0855B630\n\
|
||||
_080B904A:\n\
|
||||
movs r4, 0\n\
|
||||
adds r7, r0, 0x1\n\
|
||||
lsls r6, r0, 5\n\
|
||||
movs r4, 0\n\
|
||||
adds r7, r0, 0x1\n\
|
||||
lsls r6, r0, 5\n\
|
||||
_080B9050:\n\
|
||||
lsls r1, r4, 2\n\
|
||||
adds r1, r6, r1\n\
|
||||
ldr r0, =0x06008020\n\
|
||||
adds r3, r1, r0\n\
|
||||
adds r0, r1, 0x1\n\
|
||||
adds r0, r5\n\
|
||||
ldrb r2, [r0]\n\
|
||||
lsls r2, 8\n\
|
||||
adds r0, r1, r5\n\
|
||||
ldrb r0, [r0]\n\
|
||||
adds r0, r2\n\
|
||||
strh r0, [r3]\n\
|
||||
ldr r0, =0x06008022\n\
|
||||
adds r3, r1, r0\n\
|
||||
adds r0, r1, 0x3\n\
|
||||
adds r0, r5\n\
|
||||
ldrb r2, [r0]\n\
|
||||
lsls r2, 8\n\
|
||||
adds r1, 0x2\n\
|
||||
adds r1, r5\n\
|
||||
ldrb r0, [r1]\n\
|
||||
adds r0, r2\n\
|
||||
strh r0, [r3]\n\
|
||||
adds r0, r4, 0x1\n\
|
||||
lsls r0, 24\n\
|
||||
lsrs r4, r0, 24\n\
|
||||
cmp r4, 0x7\n\
|
||||
bls _080B9050\n\
|
||||
lsls r0, r7, 24\n\
|
||||
lsrs r0, 24\n\
|
||||
cmp r0, 0x59\n\
|
||||
bls _080B904A\n\
|
||||
mov r0, r8\n\
|
||||
pop {r3}\n\
|
||||
mov r8, r3\n\
|
||||
pop {r4-r7}\n\
|
||||
pop {r1}\n\
|
||||
bx r1\n\
|
||||
.pool");
|
||||
lsls r1, r4, 2\n\
|
||||
adds r1, r6, r1\n\
|
||||
ldr r0, =0x06008020\n\
|
||||
adds r3, r1, r0\n\
|
||||
adds r0, r1, 0x1\n\
|
||||
adds r0, r5\n\
|
||||
ldrb r2, [r0]\n\
|
||||
lsls r2, 8\n\
|
||||
adds r0, r1, r5\n\
|
||||
ldrb r0, [r0]\n\
|
||||
adds r0, r2\n\
|
||||
strh r0, [r3]\n\
|
||||
ldr r0, =0x06008022\n\
|
||||
adds r3, r1, r0\n\
|
||||
adds r0, r1, 0x3\n\
|
||||
adds r0, r5\n\
|
||||
ldrb r2, [r0]\n\
|
||||
lsls r2, 8\n\
|
||||
adds r1, 0x2\n\
|
||||
adds r1, r5\n\
|
||||
ldrb r0, [r1]\n\
|
||||
adds r0, r2\n\
|
||||
strh r0, [r3]\n\
|
||||
adds r0, r4, 0x1\n\
|
||||
lsls r0, 24\n\
|
||||
lsrs r4, r0, 24\n\
|
||||
cmp r4, 0x7\n\
|
||||
bls _080B9050\n\
|
||||
lsls r0, r7, 24\n\
|
||||
lsrs r0, 24\n\
|
||||
cmp r0, 0x59\n\
|
||||
bls _080B904A\n\
|
||||
mov r0, r8\n\
|
||||
pop {r3}\n\
|
||||
mov r8, r3\n\
|
||||
pop {r4-r7}\n\
|
||||
pop {r1}\n\
|
||||
bx r1\n\
|
||||
.pool");
|
||||
}
|
||||
#endif // NONMATCHING
|
||||
|
||||
|
||||
+108
-189
@@ -142,7 +142,7 @@ static void UpdateObjectReflectionSprite(struct Sprite *reflectionSprite)
|
||||
reflectionSprite->pos2.x = mainSprite->pos2.x;
|
||||
reflectionSprite->pos2.y = -mainSprite->pos2.y;
|
||||
reflectionSprite->coordOffsetEnabled = mainSprite->coordOffsetEnabled;
|
||||
|
||||
|
||||
if (eventObject->unk3_3 == TRUE)
|
||||
reflectionSprite->invisible = TRUE;
|
||||
|
||||
@@ -1022,19 +1022,19 @@ static void SynchroniseSurfAnim(struct EventObject *eventObject, struct Sprite *
|
||||
StartSpriteAnimIfDifferent(sprite, surfBlobDirectionAnims[eventObject->movementDirection]);
|
||||
}
|
||||
|
||||
#ifdef NONMATCHING
|
||||
void sub_81556E8(struct EventObject *eventObject, struct Sprite *sprite)
|
||||
{
|
||||
s16 x;
|
||||
s16 y;
|
||||
u8 i;
|
||||
s16 x = eventObject->currentCoords.x;
|
||||
s16 y = eventObject->currentCoords.y;
|
||||
s32 spriteY = sprite->pos2.y;
|
||||
|
||||
x = eventObject->currentCoords.x;
|
||||
y = eventObject->currentCoords.y;
|
||||
if (sprite->pos2.y == 0 && (x != sprite->data[6] || y != sprite->data[7]))
|
||||
if (spriteY == 0 && (x != sprite->data[6] || y != sprite->data[7]))
|
||||
{
|
||||
sprite->data[5] = sprite->pos2.y;
|
||||
for (sprite->data[6] = x, sprite->data[7] = y, i = DIR_SOUTH; i <= DIR_EAST; i ++, x = sprite->data[6], y = sprite->data[7])
|
||||
sprite->data[5] = spriteY;
|
||||
sprite->data[6] = x;
|
||||
sprite->data[7] = y;
|
||||
for (i = DIR_SOUTH; i <= DIR_EAST; i++, x = sprite->data[6], y = sprite->data[7])
|
||||
{
|
||||
MoveCoords(i, &x, &y);
|
||||
if (MapGridGetZCoordAt(x, y) == 3)
|
||||
@@ -1045,87 +1045,6 @@ void sub_81556E8(struct EventObject *eventObject, struct Sprite *sprite)
|
||||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
NAKED void sub_81556E8(struct EventObject *eventObject, struct Sprite *sprite)
|
||||
{
|
||||
asm_unified("push {r4-r7,lr}\n\
|
||||
mov r7, r8\n\
|
||||
push {r7}\n\
|
||||
sub sp, 0x4\n\
|
||||
adds r4, r1, 0\n\
|
||||
ldrh r2, [r0, 0x10]\n\
|
||||
mov r1, sp\n\
|
||||
strh r2, [r1]\n\
|
||||
ldrh r1, [r0, 0x12]\n\
|
||||
mov r0, sp\n\
|
||||
adds r0, 0x2\n\
|
||||
strh r1, [r0]\n\
|
||||
movs r2, 0x26\n\
|
||||
ldrsh r3, [r4, r2]\n\
|
||||
mov r8, r0\n\
|
||||
cmp r3, 0\n\
|
||||
bne _08155770\n\
|
||||
mov r0, sp\n\
|
||||
movs r5, 0\n\
|
||||
ldrsh r2, [r0, r5]\n\
|
||||
movs r5, 0x3A\n\
|
||||
ldrsh r0, [r4, r5]\n\
|
||||
cmp r2, r0\n\
|
||||
bne _08155724\n\
|
||||
lsls r0, r1, 16\n\
|
||||
asrs r0, 16\n\
|
||||
movs r5, 0x3C\n\
|
||||
ldrsh r1, [r4, r5]\n\
|
||||
cmp r0, r1\n\
|
||||
beq _08155770\n\
|
||||
_08155724:\n\
|
||||
strh r3, [r4, 0x38]\n\
|
||||
strh r2, [r4, 0x3A]\n\
|
||||
mov r1, r8\n\
|
||||
movs r2, 0\n\
|
||||
ldrsh r0, [r1, r2]\n\
|
||||
strh r0, [r4, 0x3C]\n\
|
||||
movs r5, 0x1\n\
|
||||
mov r7, r8\n\
|
||||
mov r6, sp\n\
|
||||
_08155736:\n\
|
||||
adds r0, r5, 0\n\
|
||||
mov r1, sp\n\
|
||||
adds r2, r7, 0\n\
|
||||
bl MoveCoords\n\
|
||||
movs r1, 0\n\
|
||||
ldrsh r0, [r6, r1]\n\
|
||||
movs r2, 0\n\
|
||||
ldrsh r1, [r7, r2]\n\
|
||||
bl MapGridGetZCoordAt\n\
|
||||
lsls r0, 24\n\
|
||||
lsrs r0, 24\n\
|
||||
cmp r0, 0x3\n\
|
||||
bne _0815575C\n\
|
||||
ldrh r0, [r4, 0x38]\n\
|
||||
adds r0, 0x1\n\
|
||||
strh r0, [r4, 0x38]\n\
|
||||
b _08155770\n\
|
||||
_0815575C:\n\
|
||||
adds r0, r5, 0x1\n\
|
||||
lsls r0, 24\n\
|
||||
lsrs r5, r0, 24\n\
|
||||
ldrh r0, [r4, 0x3A]\n\
|
||||
strh r0, [r6]\n\
|
||||
ldrh r0, [r4, 0x3C]\n\
|
||||
mov r1, r8\n\
|
||||
strh r0, [r1]\n\
|
||||
cmp r5, 0x4\n\
|
||||
bls _08155736\n\
|
||||
_08155770:\n\
|
||||
add sp, 0x4\n\
|
||||
pop {r3}\n\
|
||||
mov r8, r3\n\
|
||||
pop {r4-r7}\n\
|
||||
pop {r0}\n\
|
||||
bx r0");
|
||||
}
|
||||
#endif
|
||||
|
||||
static void CreateBobbingEffect(struct EventObject *eventObject, struct Sprite *linkedSprite, struct Sprite *sprite)
|
||||
{
|
||||
@@ -1450,7 +1369,7 @@ void sub_8155EA0(struct Sprite *sprite)
|
||||
bool8 sub_8155EA8(struct Sprite *sprite)
|
||||
{
|
||||
bool8 returnBool = FALSE;
|
||||
|
||||
|
||||
switch (sprite->data[7])
|
||||
{
|
||||
case 0:
|
||||
@@ -1470,7 +1389,7 @@ bool8 sub_8155EA8(struct Sprite *sprite)
|
||||
sprite->pos2.y += sub_8097728(0x47 - sprite->data[6]);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
SetGpuReg(REG_OFFSET_BG0HOFS, -sprite->pos2.x);
|
||||
if (++sprite->data[6] == 72)
|
||||
{
|
||||
@@ -1483,14 +1402,14 @@ bool8 sub_8155EA8(struct Sprite *sprite)
|
||||
sprite->pos2.x = 0;
|
||||
returnBool = TRUE;
|
||||
}
|
||||
|
||||
|
||||
return returnBool;
|
||||
}
|
||||
|
||||
void sub_8155F80(struct Sprite *sprite)
|
||||
{
|
||||
u8 i, j;
|
||||
|
||||
|
||||
switch (sprite->data[2])
|
||||
{
|
||||
case 0:
|
||||
@@ -1594,7 +1513,7 @@ void sub_8155F80(struct Sprite *sprite)
|
||||
FieldEffectStop(sprite, FLDEFF_64);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
if (sprite->data[2] == 1)
|
||||
{
|
||||
if ((sprite->data[1] & 7) == 0)
|
||||
@@ -1603,7 +1522,7 @@ void sub_8155F80(struct Sprite *sprite)
|
||||
sprite->data[3] = -sprite->data[3];
|
||||
sprite->data[1]++;
|
||||
}
|
||||
|
||||
|
||||
sprite->data[0]++;
|
||||
}
|
||||
|
||||
@@ -1676,102 +1595,102 @@ static void sub_81561FC(struct Sprite *sprite /*r6*/, u8 z, u8 offset)
|
||||
NAKED void sub_81561FC(struct Sprite *sprite /*r6*/, u8 z, u8 offset)
|
||||
{
|
||||
asm_unified("push {r4-r7,lr}\n\
|
||||
adds r6, r0, 0\n\
|
||||
adds r0, r1, 0\n\
|
||||
lsls r0, 24\n\
|
||||
lsrs r0, 24\n\
|
||||
lsls r2, 24\n\
|
||||
lsrs r2, 24\n\
|
||||
adds r1, r6, 0\n\
|
||||
bl SetObjectSubpriorityByZCoord\n\
|
||||
movs r7, 0\n\
|
||||
adds r6, r0, 0\n\
|
||||
adds r0, r1, 0\n\
|
||||
lsls r0, 24\n\
|
||||
lsrs r0, 24\n\
|
||||
lsls r2, 24\n\
|
||||
lsrs r2, 24\n\
|
||||
adds r1, r6, 0\n\
|
||||
bl SetObjectSubpriorityByZCoord\n\
|
||||
movs r7, 0\n\
|
||||
_08156212:\n\
|
||||
lsls r0, r7, 3\n\
|
||||
adds r0, r7\n\
|
||||
lsls r0, 2\n\
|
||||
ldr r1, =gEventObjects\n\
|
||||
adds r4, r0, r1\n\
|
||||
ldrb r0, [r4]\n\
|
||||
lsls r0, 31\n\
|
||||
cmp r0, 0\n\
|
||||
beq _081562B4\n\
|
||||
ldrb r0, [r4, 0x5]\n\
|
||||
bl GetEventObjectGraphicsInfo\n\
|
||||
ldrb r1, [r4, 0x4]\n\
|
||||
lsls r0, r1, 4\n\
|
||||
adds r0, r1\n\
|
||||
lsls r0, 2\n\
|
||||
ldr r1, =gSprites\n\
|
||||
adds r5, r0, r1\n\
|
||||
adds r0, r6, 0\n\
|
||||
adds r0, 0x28\n\
|
||||
movs r2, 0\n\
|
||||
ldrsb r2, [r0, r2]\n\
|
||||
ldrh r0, [r6, 0x20]\n\
|
||||
adds r1, r0, r2\n\
|
||||
subs r0, r2\n\
|
||||
lsls r0, 16\n\
|
||||
lsrs r4, r0, 16\n\
|
||||
lsls r1, 16\n\
|
||||
asrs r1, 16\n\
|
||||
movs r0, 0x20\n\
|
||||
ldrsh r2, [r5, r0]\n\
|
||||
cmp r1, r2\n\
|
||||
bge _081562B4\n\
|
||||
lsls r0, r4, 16\n\
|
||||
asrs r0, 16\n\
|
||||
cmp r0, r2\n\
|
||||
ble _081562B4\n\
|
||||
adds r0, r5, 0\n\
|
||||
adds r0, 0x29\n\
|
||||
movs r3, 0\n\
|
||||
ldrsb r3, [r0, r3]\n\
|
||||
ldrh r2, [r5, 0x22]\n\
|
||||
adds r2, r3\n\
|
||||
ldrh r4, [r5, 0x22]\n\
|
||||
adds r0, r6, 0\n\
|
||||
adds r0, 0x29\n\
|
||||
movs r1, 0\n\
|
||||
ldrsb r1, [r0, r1]\n\
|
||||
ldrh r0, [r6, 0x22]\n\
|
||||
subs r0, r1\n\
|
||||
lsls r0, 16\n\
|
||||
asrs r0, 16\n\
|
||||
adds r3, r0, r3\n\
|
||||
lsls r2, 16\n\
|
||||
asrs r2, 16\n\
|
||||
lsls r3, 16\n\
|
||||
asrs r3, 16\n\
|
||||
cmp r2, r3\n\
|
||||
blt _0815628C\n\
|
||||
cmp r2, r0\n\
|
||||
bge _081562B4\n\
|
||||
lsls r0, r7, 3\n\
|
||||
adds r0, r7\n\
|
||||
lsls r0, 2\n\
|
||||
ldr r1, =gEventObjects\n\
|
||||
adds r4, r0, r1\n\
|
||||
ldrb r0, [r4]\n\
|
||||
lsls r0, 31\n\
|
||||
cmp r0, 0\n\
|
||||
beq _081562B4\n\
|
||||
ldrb r0, [r4, 0x5]\n\
|
||||
bl GetEventObjectGraphicsInfo\n\
|
||||
ldrb r1, [r4, 0x4]\n\
|
||||
lsls r0, r1, 4\n\
|
||||
adds r0, r1\n\
|
||||
lsls r0, 2\n\
|
||||
ldr r1, =gSprites\n\
|
||||
adds r5, r0, r1\n\
|
||||
adds r0, r6, 0\n\
|
||||
adds r0, 0x28\n\
|
||||
movs r2, 0\n\
|
||||
ldrsb r2, [r0, r2]\n\
|
||||
ldrh r0, [r6, 0x20]\n\
|
||||
adds r1, r0, r2\n\
|
||||
subs r0, r2\n\
|
||||
lsls r0, 16\n\
|
||||
lsrs r4, r0, 16\n\
|
||||
lsls r1, 16\n\
|
||||
asrs r1, 16\n\
|
||||
movs r0, 0x20\n\
|
||||
ldrsh r2, [r5, r0]\n\
|
||||
cmp r1, r2\n\
|
||||
bge _081562B4\n\
|
||||
lsls r0, r4, 16\n\
|
||||
asrs r0, 16\n\
|
||||
cmp r0, r2\n\
|
||||
ble _081562B4\n\
|
||||
adds r0, r5, 0\n\
|
||||
adds r0, 0x29\n\
|
||||
movs r3, 0\n\
|
||||
ldrsb r3, [r0, r3]\n\
|
||||
ldrh r2, [r5, 0x22]\n\
|
||||
adds r2, r3\n\
|
||||
ldrh r4, [r5, 0x22]\n\
|
||||
adds r0, r6, 0\n\
|
||||
adds r0, 0x29\n\
|
||||
movs r1, 0\n\
|
||||
ldrsb r1, [r0, r1]\n\
|
||||
ldrh r0, [r6, 0x22]\n\
|
||||
subs r0, r1\n\
|
||||
lsls r0, 16\n\
|
||||
asrs r0, 16\n\
|
||||
adds r3, r0, r3\n\
|
||||
lsls r2, 16\n\
|
||||
asrs r2, 16\n\
|
||||
lsls r3, 16\n\
|
||||
asrs r3, 16\n\
|
||||
cmp r2, r3\n\
|
||||
blt _0815628C\n\
|
||||
cmp r2, r0\n\
|
||||
bge _081562B4\n\
|
||||
_0815628C:\n\
|
||||
lsls r0, r4, 16\n\
|
||||
asrs r0, 16\n\
|
||||
cmp r0, r3\n\
|
||||
ble _081562B4\n\
|
||||
adds r2, r6, 0\n\
|
||||
adds r2, 0x43\n\
|
||||
adds r0, r5, 0\n\
|
||||
adds r0, 0x43\n\
|
||||
ldrb r1, [r0]\n\
|
||||
ldrb r0, [r2]\n\
|
||||
cmp r0, r1\n\
|
||||
bhi _081562B4\n\
|
||||
adds r0, r1, 0x2\n\
|
||||
strb r0, [r2]\n\
|
||||
b _081562BE\n\
|
||||
.pool\n\
|
||||
lsls r0, r4, 16\n\
|
||||
asrs r0, 16\n\
|
||||
cmp r0, r3\n\
|
||||
ble _081562B4\n\
|
||||
adds r2, r6, 0\n\
|
||||
adds r2, 0x43\n\
|
||||
adds r0, r5, 0\n\
|
||||
adds r0, 0x43\n\
|
||||
ldrb r1, [r0]\n\
|
||||
ldrb r0, [r2]\n\
|
||||
cmp r0, r1\n\
|
||||
bhi _081562B4\n\
|
||||
adds r0, r1, 0x2\n\
|
||||
strb r0, [r2]\n\
|
||||
b _081562BE\n\
|
||||
.pool\n\
|
||||
_081562B4:\n\
|
||||
adds r0, r7, 0x1\n\
|
||||
lsls r0, 24\n\
|
||||
lsrs r7, r0, 24\n\
|
||||
cmp r7, 0xF\n\
|
||||
bls _08156212\n\
|
||||
adds r0, r7, 0x1\n\
|
||||
lsls r0, 24\n\
|
||||
lsrs r7, r0, 24\n\
|
||||
cmp r7, 0xF\n\
|
||||
bls _08156212\n\
|
||||
_081562BE:\n\
|
||||
pop {r4-r7}\n\
|
||||
pop {r0}\n\
|
||||
bx r0");
|
||||
pop {r4-r7}\n\
|
||||
pop {r0}\n\
|
||||
bx r0");
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1306,7 +1306,7 @@ bool8 PartyHasMonWithSurf(void)
|
||||
|
||||
if (!TestPlayerAvatarFlags(PLAYER_AVATAR_FLAG_SURFING))
|
||||
{
|
||||
for (i = 0; i < 6; i++)
|
||||
for (i = 0; i < PARTY_SIZE; i++)
|
||||
{
|
||||
if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES) == SPECIES_NONE)
|
||||
break;
|
||||
|
||||
+11
-11
@@ -2052,26 +2052,26 @@ _08139D7C:\n\
|
||||
void sub_8139D98(void)
|
||||
{
|
||||
u8 i;
|
||||
u32 ivStorage[6];
|
||||
u32 ivStorage[NUM_STATS];
|
||||
|
||||
ivStorage[0] = GetMonData(&gPlayerParty[gSpecialVar_0x8004], MON_DATA_HP_IV);
|
||||
ivStorage[1] = GetMonData(&gPlayerParty[gSpecialVar_0x8004], MON_DATA_ATK_IV);
|
||||
ivStorage[2] = GetMonData(&gPlayerParty[gSpecialVar_0x8004], MON_DATA_DEF_IV);
|
||||
ivStorage[3] = GetMonData(&gPlayerParty[gSpecialVar_0x8004], MON_DATA_SPEED_IV);
|
||||
ivStorage[4] = GetMonData(&gPlayerParty[gSpecialVar_0x8004], MON_DATA_SPATK_IV);
|
||||
ivStorage[5] = GetMonData(&gPlayerParty[gSpecialVar_0x8004], MON_DATA_SPDEF_IV);
|
||||
ivStorage[STAT_HP] = GetMonData(&gPlayerParty[gSpecialVar_0x8004], MON_DATA_HP_IV);
|
||||
ivStorage[STAT_ATK] = GetMonData(&gPlayerParty[gSpecialVar_0x8004], MON_DATA_ATK_IV);
|
||||
ivStorage[STAT_DEF] = GetMonData(&gPlayerParty[gSpecialVar_0x8004], MON_DATA_DEF_IV);
|
||||
ivStorage[STAT_SPEED] = GetMonData(&gPlayerParty[gSpecialVar_0x8004], MON_DATA_SPEED_IV);
|
||||
ivStorage[STAT_SPATK] = GetMonData(&gPlayerParty[gSpecialVar_0x8004], MON_DATA_SPATK_IV);
|
||||
ivStorage[STAT_SPDEF] = GetMonData(&gPlayerParty[gSpecialVar_0x8004], MON_DATA_SPDEF_IV);
|
||||
|
||||
gSpecialVar_0x8005 = 0;
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(ivStorage); i++)
|
||||
for (i = 0; i < NUM_STATS; i++)
|
||||
{
|
||||
gSpecialVar_0x8005 += ivStorage[i];
|
||||
}
|
||||
|
||||
gSpecialVar_0x8006 = 0;
|
||||
gSpecialVar_0x8007 = ivStorage[0]; // HP IV
|
||||
gSpecialVar_0x8007 = ivStorage[STAT_HP];
|
||||
|
||||
for (i = 1; i < 6; i++)
|
||||
for (i = 1; i < NUM_STATS; i++)
|
||||
{
|
||||
if (ivStorage[gSpecialVar_0x8006] < ivStorage[i])
|
||||
{
|
||||
@@ -2081,7 +2081,7 @@ void sub_8139D98(void)
|
||||
else if (ivStorage[gSpecialVar_0x8006] == ivStorage[i])
|
||||
{
|
||||
u16 randomNumber = Random();
|
||||
if ((randomNumber & 1) != 0)
|
||||
if (randomNumber & 1)
|
||||
{
|
||||
gSpecialVar_0x8006 = i;
|
||||
gSpecialVar_0x8007 = ivStorage[i];
|
||||
|
||||
+659
-22
@@ -1,25 +1,42 @@
|
||||
#include "global.h"
|
||||
#include "battle_anim.h"
|
||||
#include "gpu_regs.h"
|
||||
#include "random.h"
|
||||
#include "task.h"
|
||||
#include "trig.h"
|
||||
#include "constants/rgb.h"
|
||||
|
||||
extern void unc_080B08A0(struct Sprite *);
|
||||
extern void sub_810CE68(struct Sprite *);
|
||||
extern void sub_810CEB4(struct Sprite *);
|
||||
extern void sub_810CEE0(struct Sprite *);
|
||||
extern void sub_810CF30(struct Sprite *);
|
||||
extern void sub_810D10C(struct Sprite *);
|
||||
extern void sub_810D1B4(struct Sprite *);
|
||||
extern void sub_810D278(struct Sprite *);
|
||||
extern void sub_810D2E4(struct Sprite *);
|
||||
extern void sub_810D37C(struct Sprite *);
|
||||
extern void sub_810D40C(struct Sprite *);
|
||||
extern void sub_810D4F4(struct Sprite *);
|
||||
extern void sub_810D608(struct Sprite *);
|
||||
extern void sub_810D714(struct Sprite *);
|
||||
extern void sub_810D874(struct Sprite *);
|
||||
extern void sub_810D984(struct Sprite *);
|
||||
extern void sub_810DA10(struct Sprite *);
|
||||
extern void sub_810DA7C(struct Sprite *);
|
||||
void unc_080B08A0(struct Sprite *);
|
||||
void sub_810CE68(struct Sprite *);
|
||||
void sub_810CEB4(struct Sprite *);
|
||||
void AnimBasicFistOrFoot(struct Sprite *);
|
||||
void sub_810CF30(struct Sprite *);
|
||||
void sub_810D10C(struct Sprite *);
|
||||
void sub_810D1B4(struct Sprite *);
|
||||
void AnimSpinningKickOrPunch(struct Sprite *);
|
||||
void AnimStompFoot(struct Sprite *);
|
||||
void sub_810D37C(struct Sprite *);
|
||||
void sub_810D40C(struct Sprite *);
|
||||
void sub_810D4F4(struct Sprite *);
|
||||
void sub_810D608(struct Sprite *);
|
||||
void sub_810D714(struct Sprite *);
|
||||
void sub_810D874(struct Sprite *);
|
||||
void sub_810D984(struct Sprite *);
|
||||
void sub_810DA10(struct Sprite *);
|
||||
void sub_810DA7C(struct Sprite *);
|
||||
static void sub_810D0B8(struct Sprite *);
|
||||
static void sub_810D164(struct Sprite *);
|
||||
static void sub_810D240(struct Sprite *);
|
||||
static void AnimSpinningKickOrPunchFinish(struct Sprite *);
|
||||
static void AnimStompFootStep(struct Sprite *);
|
||||
static void AnimStompFootEnd(struct Sprite *);
|
||||
static void sub_810D47C(struct Sprite *);
|
||||
static void sub_810D5DC(struct Sprite *);
|
||||
static void sub_810D6A8(struct Sprite *);
|
||||
static void sub_810D770(struct Sprite *);
|
||||
static void sub_810D830(struct Sprite *);
|
||||
|
||||
extern struct SpriteTemplate gBasicHitSplatSpriteTemplate;
|
||||
|
||||
const struct SpriteTemplate gUnknown_08595E14 =
|
||||
{
|
||||
@@ -109,7 +126,7 @@ const struct SpriteTemplate gFistFootSpriteTemplate =
|
||||
.anims = gUnknown_08595E54,
|
||||
.images = NULL,
|
||||
.affineAnims = gDummySpriteAffineAnimTable,
|
||||
.callback = sub_810CEE0,
|
||||
.callback = AnimBasicFistOrFoot,
|
||||
};
|
||||
|
||||
const struct SpriteTemplate gUnknown_08595EB0 =
|
||||
@@ -165,7 +182,7 @@ const struct SpriteTemplate gUnknown_08595F14 =
|
||||
.anims = gUnknown_08595E54,
|
||||
.images = NULL,
|
||||
.affineAnims = gUnknown_08595F10,
|
||||
.callback = sub_810D278,
|
||||
.callback = AnimSpinningKickOrPunch,
|
||||
};
|
||||
|
||||
const union AffineAnimCmd gUnknown_08595F2C[] =
|
||||
@@ -188,7 +205,7 @@ const struct SpriteTemplate gMegaPunchKickSpriteTemplate =
|
||||
.anims = gUnknown_08595E54,
|
||||
.images = NULL,
|
||||
.affineAnims = gUnknown_08595F44,
|
||||
.callback = sub_810D278,
|
||||
.callback = AnimSpinningKickOrPunch,
|
||||
};
|
||||
|
||||
const struct SpriteTemplate gUnknown_08595F60 =
|
||||
@@ -199,7 +216,7 @@ const struct SpriteTemplate gUnknown_08595F60 =
|
||||
.anims = gUnknown_08595E58,
|
||||
.images = NULL,
|
||||
.affineAnims = gDummySpriteAffineAnimTable,
|
||||
.callback = sub_810D2E4,
|
||||
.callback = AnimStompFoot,
|
||||
};
|
||||
|
||||
const struct SpriteTemplate gUnknown_08595F78 =
|
||||
@@ -396,3 +413,623 @@ const struct SpriteTemplate gUnknown_08596104 =
|
||||
.affineAnims = gUnknown_08596100,
|
||||
.callback = sub_810DA7C,
|
||||
};
|
||||
|
||||
void unc_080B08A0(struct Sprite *sprite)
|
||||
{
|
||||
sub_80A6864(sprite, gBattleAnimArgs[0]);
|
||||
sprite->pos1.y += gBattleAnimArgs[1];
|
||||
sprite->data[0] = 15;
|
||||
sprite->callback = WaitAnimForDuration;
|
||||
StoreSpriteCallbackInData6(sprite, DestroyAnimSprite);
|
||||
}
|
||||
|
||||
void sub_810CE68(struct Sprite *sprite)
|
||||
{
|
||||
if (gBattleAnimArgs[7] == 1 && GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER)
|
||||
{
|
||||
gBattleAnimArgs[1] = -gBattleAnimArgs[1];
|
||||
gBattleAnimArgs[3] = -gBattleAnimArgs[3];
|
||||
}
|
||||
|
||||
StartSpriteAnim(sprite, gBattleAnimArgs[6]);
|
||||
gBattleAnimArgs[6] = 0;
|
||||
sub_80A7938(sprite);
|
||||
}
|
||||
|
||||
void sub_810CEB4(struct Sprite *sprite)
|
||||
{
|
||||
if (IsContest())
|
||||
{
|
||||
gBattleAnimArgs[1] = -gBattleAnimArgs[1];
|
||||
gBattleAnimArgs[3] = -gBattleAnimArgs[3];
|
||||
}
|
||||
|
||||
sub_810CE68(sprite);
|
||||
}
|
||||
|
||||
// Displays a basic fist or foot sprite for a given duration.
|
||||
// Used by many fighting moves (and elemental "punch" moves).
|
||||
// arg 0: initial x pixel offset
|
||||
// arg 1: initial y pixel offset
|
||||
// arg 2: duration
|
||||
// arg 3: ? (todo: related to initial pixel offsets)
|
||||
// arg 4: anim num
|
||||
void AnimBasicFistOrFoot(struct Sprite *sprite)
|
||||
{
|
||||
StartSpriteAnim(sprite, gBattleAnimArgs[4]);
|
||||
|
||||
if (gBattleAnimArgs[3] == 0)
|
||||
InitAnimSpritePos(sprite, 1);
|
||||
else
|
||||
sub_80A6980(sprite, TRUE);
|
||||
|
||||
sprite->data[0] = gBattleAnimArgs[2];
|
||||
sprite->callback = WaitAnimForDuration;
|
||||
StoreSpriteCallbackInData6(sprite, DestroyAnimSprite);
|
||||
}
|
||||
|
||||
void sub_810CF30(struct Sprite *sprite)
|
||||
{
|
||||
u8 battler;
|
||||
s16 xMod, yMod;
|
||||
s16 x, y;
|
||||
|
||||
if (gBattleAnimArgs[0] == 0)
|
||||
battler = gBattleAnimAttacker;
|
||||
else
|
||||
battler = gBattleAnimTarget;
|
||||
|
||||
if (gBattleAnimArgs[2] < 0)
|
||||
gBattleAnimArgs[2] = Random2() % 5;
|
||||
|
||||
StartSpriteAnim(sprite, gBattleAnimArgs[2]);
|
||||
sprite->pos1.x = GetBattlerSpriteCoord(battler, 2);
|
||||
sprite->pos1.y = GetBattlerSpriteCoord(battler, 3);
|
||||
|
||||
xMod = sub_80A861C(battler, 1) / 2;
|
||||
yMod = sub_80A861C(battler, 0) / 4;
|
||||
|
||||
x = Random2() % xMod;
|
||||
y = Random2() % yMod;
|
||||
|
||||
if (Random2() & 1)
|
||||
x *= -1;
|
||||
if (Random2() & 1)
|
||||
y *= -1;
|
||||
|
||||
if ((gBattlerPositions[battler] & BIT_SIDE) == B_SIDE_PLAYER)
|
||||
y += 0xFFF0;
|
||||
|
||||
sprite->pos1.x += x;
|
||||
sprite->pos1.y += y;
|
||||
|
||||
sprite->data[0] = gBattleAnimArgs[1];
|
||||
sprite->data[7] = CreateSprite(&gBasicHitSplatSpriteTemplate, sprite->pos1.x, sprite->pos1.y, sprite->subpriority + 1);
|
||||
if (sprite->data[7] != 64)
|
||||
{
|
||||
StartSpriteAffineAnim(&gSprites[sprite->data[7]], 0);
|
||||
gSprites[sprite->data[7]].callback = SpriteCallbackDummy;
|
||||
}
|
||||
|
||||
sprite->callback = sub_810D0B8;
|
||||
}
|
||||
|
||||
static void sub_810D0B8(struct Sprite *sprite)
|
||||
{
|
||||
if (sprite->data[0] == 0)
|
||||
{
|
||||
if (sprite->data[7] != 64)
|
||||
{
|
||||
FreeOamMatrix(gSprites[sprite->data[7]].oam.matrixNum);
|
||||
DestroySprite(&gSprites[sprite->data[7]]);
|
||||
}
|
||||
|
||||
DestroyAnimSprite(sprite);
|
||||
}
|
||||
else
|
||||
{
|
||||
sprite->data[0]--;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_810D10C(struct Sprite *sprite)
|
||||
{
|
||||
sub_80A6980(sprite, TRUE);
|
||||
sprite->data[0] = 30;
|
||||
|
||||
if (gBattleAnimArgs[2] == 0)
|
||||
{
|
||||
sprite->data[2] = sprite->pos1.x - 20;
|
||||
}
|
||||
else
|
||||
{
|
||||
sprite->data[2] = sprite->pos1.x + 20;
|
||||
sprite->hFlip = 1;
|
||||
}
|
||||
|
||||
sprite->data[4] = sprite->pos1.y - 20;
|
||||
sprite->callback = StartAnimLinearTranslation;
|
||||
StoreSpriteCallbackInData6(sprite, sub_810D164);
|
||||
}
|
||||
|
||||
static void sub_810D164(struct Sprite *sprite)
|
||||
{
|
||||
if (++sprite->data[5] == 11)
|
||||
{
|
||||
sprite->data[2] = sprite->pos1.x - sprite->pos2.x;
|
||||
sprite->data[4] = sprite->pos1.y - sprite->pos2.y;
|
||||
sprite->data[0] = 8;
|
||||
sprite->pos1.x += sprite->pos2.x;
|
||||
sprite->pos1.y += sprite->pos2.y;
|
||||
sprite->pos2.y = 0;
|
||||
sprite->pos2.x = 0;
|
||||
|
||||
sprite->callback = StartAnimLinearTranslation;
|
||||
StoreSpriteCallbackInData6(sprite, DestroyAnimSprite);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_810D1B4(struct Sprite *sprite)
|
||||
{
|
||||
if (BATTLE_PARTNER(gBattleAnimAttacker) == gBattleAnimTarget && GetBattlerPosition(gBattleAnimTarget) < B_POSITION_PLAYER_RIGHT)
|
||||
gBattleAnimArgs[0] *= -1;
|
||||
|
||||
sub_80A6980(sprite, TRUE);
|
||||
|
||||
if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER)
|
||||
gBattleAnimArgs[2] = -gBattleAnimArgs[2];
|
||||
|
||||
sprite->data[0] = gBattleAnimArgs[3];
|
||||
sprite->data[1] = sprite->pos1.x;
|
||||
sprite->data[2] = sprite->pos1.x + gBattleAnimArgs[2];
|
||||
sprite->data[3] = sprite->pos1.y;
|
||||
sprite->data[4] = sprite->pos1.y;
|
||||
|
||||
InitAnimLinearTranslation(sprite);
|
||||
|
||||
sprite->data[5] = gBattleAnimArgs[5];
|
||||
sprite->data[6] = gBattleAnimArgs[4];
|
||||
sprite->data[7] = 0;
|
||||
|
||||
sprite->callback = sub_810D240;
|
||||
}
|
||||
|
||||
static void sub_810D240(struct Sprite *sprite)
|
||||
{
|
||||
if (!TranslateAnimLinear(sprite))
|
||||
{
|
||||
sprite->pos2.y += Sin(sprite->data[7] >> 8, sprite->data[5]);
|
||||
sprite->data[7] += sprite->data[6];
|
||||
}
|
||||
else
|
||||
{
|
||||
DestroyAnimSprite(sprite);
|
||||
}
|
||||
}
|
||||
|
||||
// Animates the spinning, shrinking kick or punch, which then
|
||||
// reappears at full size. Used by moves such as MOVE_MEGA_PUNCH and MOVE_MEGA_KICK.
|
||||
// arg 0: initial x pixel offset
|
||||
// arg 1: initial y pixel offset
|
||||
// arg 2: anim num
|
||||
// arg 3: spin duration
|
||||
void AnimSpinningKickOrPunch(struct Sprite *sprite)
|
||||
{
|
||||
sub_80A6980(sprite, TRUE);
|
||||
StartSpriteAnim(sprite, gBattleAnimArgs[2]);
|
||||
sprite->data[0] = gBattleAnimArgs[3];
|
||||
|
||||
sprite->callback = WaitAnimForDuration;
|
||||
StoreSpriteCallbackInData6(sprite, AnimSpinningKickOrPunchFinish);
|
||||
}
|
||||
|
||||
static void AnimSpinningKickOrPunchFinish(struct Sprite *sprite)
|
||||
{
|
||||
StartSpriteAffineAnim(sprite, 0);
|
||||
sprite->affineAnimPaused = 1;
|
||||
sprite->data[0] = 20;
|
||||
|
||||
sprite->callback = WaitAnimForDuration;
|
||||
StoreSpriteCallbackInData6(sprite, DestroyAnimSprite);
|
||||
}
|
||||
|
||||
// Animates MOVE_STOMP's foot that slides downward.
|
||||
// arg 0: initial x pixel offset
|
||||
// arg 1: initial y pixel offset
|
||||
// arg 2: initial wait duration
|
||||
void AnimStompFoot(struct Sprite *sprite)
|
||||
{
|
||||
sub_80A6980(sprite, TRUE);
|
||||
sprite->data[0] = gBattleAnimArgs[2];
|
||||
|
||||
sprite->callback = AnimStompFootStep;
|
||||
}
|
||||
|
||||
static void AnimStompFootStep(struct Sprite *sprite)
|
||||
{
|
||||
if (--sprite->data[0] == -1)
|
||||
{
|
||||
sprite->data[0] = 6;
|
||||
sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimTarget, 2);
|
||||
sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimTarget, 3);
|
||||
|
||||
sprite->callback = StartAnimLinearTranslation;
|
||||
StoreSpriteCallbackInData6(sprite, AnimStompFootEnd);
|
||||
}
|
||||
}
|
||||
|
||||
static void AnimStompFootEnd(struct Sprite *sprite)
|
||||
{
|
||||
sprite->data[0] = 15;
|
||||
|
||||
sprite->callback = WaitAnimForDuration;
|
||||
StoreSpriteCallbackInData6(sprite, DestroyAnimSprite);
|
||||
}
|
||||
|
||||
void sub_810D37C(struct Sprite *sprite)
|
||||
{
|
||||
if (sprite->data[0] == 0)
|
||||
{
|
||||
sub_80A6980(sprite, TRUE);
|
||||
sprite->data[1] = gBattleAnimArgs[2];
|
||||
sprite->data[2] = gBattleAnimArgs[3];
|
||||
sprite->data[0]++;
|
||||
}
|
||||
else
|
||||
{
|
||||
sprite->data[4] += sprite->data[1];
|
||||
sprite->pos2.x = sprite->data[4] >> 8;
|
||||
sprite->pos2.y = Sin(sprite->data[3], sprite->data[2]);
|
||||
sprite->data[3] = (sprite->data[3] + 3) & 0xFF;
|
||||
|
||||
if (sprite->data[3] > 100)
|
||||
sprite->invisible = sprite->data[3] % 2;
|
||||
|
||||
if (sprite->data[3] > 120)
|
||||
DestroyAnimSprite(sprite);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_810D40C(struct Sprite *sprite)
|
||||
{
|
||||
if (gBattleAnimArgs[0] == 0)
|
||||
{
|
||||
sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimAttacker, 0);
|
||||
sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimAttacker, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimTarget, 0);
|
||||
sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimTarget, 1);
|
||||
}
|
||||
|
||||
sprite->pos1.x += gBattleAnimArgs[1];
|
||||
sprite->pos1.y += gBattleAnimArgs[2];
|
||||
|
||||
sprite->data[0] = 0;
|
||||
sprite->data[1] = gBattleAnimArgs[3];
|
||||
sprite->data[2] = gBattleAnimArgs[4];
|
||||
sprite->data[3] = 0;
|
||||
sprite->callback = sub_810D47C;
|
||||
}
|
||||
|
||||
static void sub_810D47C(struct Sprite *sprite)
|
||||
{
|
||||
switch (sprite->data[0])
|
||||
{
|
||||
case 0:
|
||||
if (--sprite->data[1] == 0)
|
||||
{
|
||||
if (sprite->data[2] == 0)
|
||||
DestroyAnimSprite(sprite);
|
||||
else
|
||||
sprite->data[0]++;
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (++sprite->data[1] > 1)
|
||||
{
|
||||
sprite->data[1] = 0;
|
||||
sprite->data[3]++;
|
||||
if (sprite->data[3] & 1)
|
||||
sprite->pos2.x = 2;
|
||||
else
|
||||
sprite->pos2.x = -2;
|
||||
}
|
||||
|
||||
if (--sprite->data[2] == 0)
|
||||
DestroyAnimSprite(sprite);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_810D4F4(struct Sprite *sprite)
|
||||
{
|
||||
if (gBattleAnimArgs[0] == 0)
|
||||
{
|
||||
sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimAttacker, 0) + gBattleAnimArgs[2];
|
||||
sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimAttacker, 1) + gBattleAnimArgs[3];
|
||||
}
|
||||
else
|
||||
{
|
||||
sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimTarget, 0) + gBattleAnimArgs[2];
|
||||
sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimTarget, 1) + gBattleAnimArgs[3];
|
||||
}
|
||||
|
||||
sprite->oam.tileNum += gBattleAnimArgs[1] * 16;
|
||||
sprite->data[0] = 0;
|
||||
|
||||
switch (gBattleAnimArgs[1])
|
||||
{
|
||||
case 0:
|
||||
sprite->data[6] = -3;
|
||||
sprite->data[7] = -3;
|
||||
break;
|
||||
case 1:
|
||||
sprite->data[6] = 3;
|
||||
sprite->data[7] = -3;
|
||||
break;
|
||||
case 2:
|
||||
sprite->data[6] = -3;
|
||||
sprite->data[7] = 3;
|
||||
break;
|
||||
case 3:
|
||||
sprite->data[6] = 3;
|
||||
sprite->data[7] = 3;
|
||||
break;
|
||||
default:
|
||||
DestroyAnimSprite(sprite);
|
||||
return;
|
||||
}
|
||||
|
||||
sprite->callback = sub_810D5DC;
|
||||
}
|
||||
|
||||
static void sub_810D5DC(struct Sprite *sprite)
|
||||
{
|
||||
sprite->pos1.x += sprite->data[6];
|
||||
sprite->pos1.y += sprite->data[7];
|
||||
|
||||
if (++sprite->data[0] > 40)
|
||||
DestroyAnimSprite(sprite);
|
||||
}
|
||||
|
||||
void sub_810D608(struct Sprite *sprite)
|
||||
{
|
||||
if (gBattleAnimArgs[0] == 0)
|
||||
{
|
||||
sprite->pos1.x = GetBattlerSpriteCoord(gBattlerAttacker, 2);
|
||||
sprite->pos1.y = GetBattlerSpriteCoord(gBattlerAttacker, 3);
|
||||
sprite->oam.priority = sub_80A8328(gBattleAnimAttacker);
|
||||
sprite->data[7] = gBattleAnimTarget;
|
||||
}
|
||||
else
|
||||
{
|
||||
sprite->oam.priority = sub_80A8328(gBattleAnimTarget);
|
||||
sprite->data[7] = gBattleAnimAttacker;
|
||||
}
|
||||
|
||||
sprite->data[0] = 0;
|
||||
sprite->data[1] = 12;
|
||||
sprite->data[2] = 8;
|
||||
sprite->callback = sub_810D6A8;
|
||||
}
|
||||
|
||||
static void sub_810D6A8(struct Sprite *sprite)
|
||||
{
|
||||
if (++sprite->data[0] == 180)
|
||||
{
|
||||
SetGpuReg(REG_OFFSET_BLDCNT, 0);
|
||||
|
||||
sprite->data[0] = 16;
|
||||
sprite->data[1] = sprite->pos1.x;
|
||||
sprite->data[2] = GetBattlerSpriteCoord(sprite->data[7], 2);
|
||||
sprite->data[3] = sprite->pos1.y;
|
||||
sprite->data[4] = GetBattlerSpriteCoord(sprite->data[7], 3);
|
||||
|
||||
InitAnimLinearTranslation(sprite);
|
||||
StoreSpriteCallbackInData6(sprite, move_anim_8074EE0);
|
||||
sprite->callback = sub_80A6F98;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_810D714(struct Sprite *sprite)
|
||||
{
|
||||
sprite->pos1.x = gBattleAnimArgs[0];
|
||||
sprite->pos1.y = 120;
|
||||
|
||||
sprite->data[0] = gBattleAnimArgs[3];
|
||||
sub_80A8048(&sprite->data[4], &sprite->data[5], (void *)(sprite->pos1.y << 8));
|
||||
|
||||
sprite->data[6] = gBattleAnimArgs[1];
|
||||
sprite->oam.tileNum += gBattleAnimArgs[2] * 4;
|
||||
|
||||
sprite->callback = sub_810D770;
|
||||
}
|
||||
|
||||
static void sub_810D770(struct Sprite *sprite)
|
||||
{
|
||||
void *var0;
|
||||
|
||||
if (sprite->data[0] != 0)
|
||||
{
|
||||
var0 = sub_80A8050(sprite->data[4], sprite->data[5]);
|
||||
var0 -= sprite->data[6];
|
||||
sub_80A8048(&sprite->data[4], &sprite->data[5], var0);
|
||||
|
||||
var0 = (void *)(((intptr_t)var0) >> 8);
|
||||
sprite->pos1.y = (intptr_t)var0;
|
||||
if (sprite->pos1.y < -8)
|
||||
DestroyAnimSprite(sprite);
|
||||
else
|
||||
sprite->data[0]--;
|
||||
}
|
||||
else
|
||||
{
|
||||
s16 pos0 = GetBattlerSpriteCoord(gBattleAnimAttacker, 2);
|
||||
s16 pos1 = GetBattlerSpriteCoord(gBattleAnimAttacker, 3);
|
||||
s16 pos2 = GetBattlerSpriteCoord(gBattleAnimTarget, 2);
|
||||
s16 pos3 = GetBattlerSpriteCoord(gBattleAnimTarget, 3);
|
||||
|
||||
sprite->data[0] = pos2 - pos0;
|
||||
sprite->data[1] = pos3 - pos1;
|
||||
sprite->data[2] = sprite->pos1.x << 4;
|
||||
sprite->data[3] = sprite->pos1.y << 4;
|
||||
|
||||
sprite->callback = sub_810D830;
|
||||
}
|
||||
}
|
||||
|
||||
static void sub_810D830(struct Sprite *sprite)
|
||||
{
|
||||
u16 edgeX;
|
||||
|
||||
sprite->data[2] += sprite->data[0];
|
||||
sprite->data[3] += sprite->data[1];
|
||||
sprite->pos1.x = sprite->data[2] >> 4;
|
||||
sprite->pos1.y = sprite->data[3] >> 4;
|
||||
|
||||
edgeX = sprite->pos1.x + 8;
|
||||
if (edgeX > 256 || sprite->pos1.y < -8 || sprite->pos1.y > 120)
|
||||
DestroyAnimSprite(sprite);
|
||||
}
|
||||
|
||||
void sub_810D874(struct Sprite *sprite)
|
||||
{
|
||||
u8 battler;
|
||||
|
||||
if (gBattleAnimArgs[0] == 0)
|
||||
{
|
||||
sprite->pos1.x = GetBattlerSpriteCoord(gBattlerAttacker, 2);
|
||||
sprite->pos1.y = GetBattlerSpriteCoord(gBattlerAttacker, 3);
|
||||
battler = gBattleAnimTarget;
|
||||
sprite->oam.priority = sub_80A8328(gBattleAnimAttacker);
|
||||
}
|
||||
else
|
||||
{
|
||||
battler = gBattleAnimAttacker;
|
||||
sprite->oam.priority = sub_80A8328(gBattleAnimTarget);
|
||||
}
|
||||
|
||||
if (IsContest())
|
||||
sprite->oam.matrixNum |= 0x8;
|
||||
else if (GetBattlerSide(battler) == B_SIDE_PLAYER)
|
||||
sprite->oam.matrixNum |= 0x18;
|
||||
|
||||
sprite->data[0] = 16;
|
||||
sprite->data[1] = sprite->pos1.x;
|
||||
sprite->data[2] = GetBattlerSpriteCoord(battler, 2);
|
||||
sprite->data[3] = sprite->pos1.y;
|
||||
sprite->data[4] = GetBattlerSpriteCoord(battler, 3);
|
||||
|
||||
InitAnimLinearTranslation(sprite);
|
||||
StoreSpriteCallbackInData6(sprite, DestroyAnimSprite);
|
||||
sprite->callback = sub_80A6F98;
|
||||
}
|
||||
|
||||
static void sub_810D960(struct Sprite *sprite)
|
||||
{
|
||||
if (sprite->data[0] == sprite->data[4])
|
||||
DestroyAnimSprite(sprite);
|
||||
|
||||
sprite->data[0]++;
|
||||
}
|
||||
|
||||
void sub_810D984(struct Sprite *sprite)
|
||||
{
|
||||
u8 turn;
|
||||
|
||||
sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimTarget, 2);
|
||||
sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimTarget, 3);
|
||||
sprite->data[1] = gBattleAnimArgs[3];
|
||||
sprite->data[2] = gBattleAnimArgs[0];
|
||||
sprite->data[3] = gBattleAnimArgs[1];
|
||||
sprite->data[4] = gBattleAnimArgs[2];
|
||||
|
||||
turn = gAnimMoveTurn;
|
||||
if (GetBattlerSide(gBattleAnimTarget) == B_SIDE_PLAYER)
|
||||
turn++;
|
||||
|
||||
if (turn & 1)
|
||||
{
|
||||
sprite->data[2] = -sprite->data[2];
|
||||
sprite->data[1]++;
|
||||
}
|
||||
|
||||
StartSpriteAnim(sprite, sprite->data[1]);
|
||||
sprite->pos2.x = sprite->data[2];
|
||||
sprite->pos2.y = sprite->data[3];
|
||||
sprite->callback = sub_810D960;
|
||||
}
|
||||
|
||||
void sub_810DA10(struct Sprite *sprite)
|
||||
{
|
||||
if (gBattleAnimArgs[2] == 0)
|
||||
InitAnimSpritePos(sprite, 0);
|
||||
else
|
||||
sub_80A6980(sprite, FALSE);
|
||||
|
||||
if (IsContest())
|
||||
{
|
||||
StartSpriteAnim(sprite, 2);
|
||||
}
|
||||
else if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER)
|
||||
{
|
||||
StartSpriteAnim(sprite, 1);
|
||||
}
|
||||
|
||||
sprite->callback = sub_80A67D8;
|
||||
StoreSpriteCallbackInData6(sprite, DestroyAnimSprite);
|
||||
}
|
||||
|
||||
void sub_810DA7C(struct Sprite *sprite)
|
||||
{
|
||||
if (sprite->affineAnimEnded)
|
||||
{
|
||||
sprite->data[1] = (sprite->data[1] + 40) & 0xFF;
|
||||
sprite->pos2.x = Sin(sprite->data[1], 2);
|
||||
if (++sprite->data[0] > 40)
|
||||
DestroyAnimSprite(sprite);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_810DABC(u8 taskId)
|
||||
{
|
||||
struct Task *task = &gTasks[taskId];
|
||||
|
||||
switch (task->data[0])
|
||||
{
|
||||
case 0:
|
||||
sub_80A6DAC(0);
|
||||
task->data[8] = gBattleAnimArgs[0];
|
||||
task->data[0]++;
|
||||
break;
|
||||
case 1:
|
||||
if (--task->data[8] == -1)
|
||||
task->data[0]++;
|
||||
break;
|
||||
case 2:
|
||||
default:
|
||||
task->data[9] += 1280;
|
||||
break;
|
||||
}
|
||||
|
||||
task->data[10] += 2816;
|
||||
|
||||
if (GetBattlerSide(gBattleAnimTarget) == B_SIDE_PLAYER)
|
||||
gBattle_BG3_X += task->data[9] >> 8;
|
||||
else
|
||||
gBattle_BG3_X -= task->data[9] >> 8;
|
||||
|
||||
gBattle_BG3_Y += task->data[10] >> 8;
|
||||
task->data[9] &= 0xFF;
|
||||
task->data[10] &= 0xFF;
|
||||
|
||||
if (gBattleAnimArgs[7] == -1)
|
||||
{
|
||||
gBattle_BG3_X = 0;
|
||||
gBattle_BG3_Y = 0;
|
||||
sub_80A6DAC(1);
|
||||
DestroyAnimVisualTask(taskId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include "party_menu.h"
|
||||
#include "rom6.h"
|
||||
#include "script.h"
|
||||
#include "string_util.h"
|
||||
#include "task.h"
|
||||
#include "constants/event_objects.h"
|
||||
#include "constants/field_effects.h"
|
||||
|
||||
+298
-507
@@ -17,29 +17,32 @@
|
||||
#include "task.h"
|
||||
#include "window.h"
|
||||
|
||||
#define MIRAGE_TOWER_GFX_LENGTH (sizeof(gUnknown_08617274) + sizeof(gMirageTower_Gfx))
|
||||
#define MIRAGE_TOWER_GFX_LENGTH (32 + sizeof(gMirageTower_Gfx))
|
||||
#define MIRAGE_TOWER_PALETTE_LENGTH 0x800
|
||||
#define ROOT_FOSSIL_GFX_LENGTH sizeof(gRootFossil_Gfx)
|
||||
#define ROOT_FOSSIL_GFX_RANDOMIZER_LENGTH 0x100
|
||||
|
||||
//struct
|
||||
struct Struct8617DA4 {
|
||||
struct Struct8617DA4
|
||||
{
|
||||
u8 x;
|
||||
u8 y;
|
||||
u16 tileId;
|
||||
};
|
||||
|
||||
struct Struct203CF10 {
|
||||
struct Struct203CF10
|
||||
{
|
||||
u8 *buffer;
|
||||
u8 curr_buffer_index;
|
||||
u8 currIndex;
|
||||
};
|
||||
|
||||
struct DynamicSpriteFrameImage{
|
||||
struct DynamicSpriteFrameImage
|
||||
{
|
||||
u8 *data;
|
||||
u16 size;
|
||||
};
|
||||
|
||||
struct Struct203CF0C {
|
||||
struct Struct203CF0C
|
||||
{
|
||||
u8 *frameImageTiles;
|
||||
struct DynamicSpriteFrameImage *frameImage;
|
||||
u8 spriteId;
|
||||
@@ -52,10 +55,10 @@ static void sub_81BED50(u8 taskId);
|
||||
static void sub_81BEBF4(u8 taskId);
|
||||
static void sub_81BF028(u8 taskId);
|
||||
static void sub_81BF248(struct Sprite *);
|
||||
/*static*/ void sub_81BF2B8(u8* a, u16 b, u8 c, u8 d, u8 e);
|
||||
static void sub_81BF2B8(u8* a, u16 b, u8 c, u8 d, u8 e);
|
||||
|
||||
// .rodata
|
||||
static const u8 gUnknown_08617274[] = {00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00};
|
||||
static const u8 gUnknown_08617274[32] = {0};
|
||||
static const u8 gMirageTower_Gfx[] = INCBIN_U8("graphics/misc/mirage_tower.4bpp");
|
||||
static const u16 gUnknown_08617B94[] = INCBIN_U16("graphics/misc/mirage_tower.bin");
|
||||
static const u16 gRootFossil_Pal[] = INCBIN_U16("graphics/misc/fossil.gbapal");
|
||||
@@ -64,16 +67,16 @@ static const u8 gMirageTowerCrumbles_Gfx[] = INCBIN_U8("graphics/misc/mirage_tow
|
||||
static const u16 gMirageTowerCrumbles_Palette[] = INCBIN_U16("graphics/misc/mirage_tower_crumbles.gbapal");
|
||||
|
||||
const s16 gUnknown_08617D64[][3] =
|
||||
{
|
||||
{ 0, 10, 65},
|
||||
{ 17, 3, 50},
|
||||
{-12, 0, 75},
|
||||
{ 10, 15, 90},
|
||||
{ 7, 8, 65},
|
||||
{-18, 5, 75},
|
||||
{ 22, -10, 55},
|
||||
{-24, -4, 65},
|
||||
};
|
||||
{
|
||||
{ 0, 10, 65},
|
||||
{ 17, 3, 50},
|
||||
{-12, 0, 75},
|
||||
{ 10, 15, 90},
|
||||
{ 7, 8, 65},
|
||||
{-18, 5, 75},
|
||||
{ 22, -10, 55},
|
||||
{-24, -4, 65},
|
||||
};
|
||||
|
||||
const struct SpriteSheet gUnknown_08617D94[] =
|
||||
{
|
||||
@@ -82,26 +85,26 @@ const struct SpriteSheet gUnknown_08617D94[] =
|
||||
};
|
||||
|
||||
static const struct Struct8617DA4 gUnknown_08617DA4[] =
|
||||
{
|
||||
{0x12, 0x35, 0x251},
|
||||
{0x13, 0x35, 0x251},
|
||||
{0x14, 0x35, 0x251},
|
||||
{0x12, 0x36, 0x251},
|
||||
{0x13, 0x36, 0x251},
|
||||
{0x14, 0x36, 0x251},
|
||||
{0x12, 0x37, 0x251},
|
||||
{0x13, 0x37, 0x251},
|
||||
{0x14, 0x37, 0x251},
|
||||
{0x12, 0x38, 0x251},
|
||||
{0x13, 0x38, 0x251},
|
||||
{0x14, 0x38, 0x251},
|
||||
{0x12, 0x39, 0x259},
|
||||
{0x13, 0x39, 0x259},
|
||||
{0x14, 0x39, 0x259},
|
||||
{0x12, 0x3A, 0x121},
|
||||
{0x13, 0x3A, 0x121},
|
||||
{0x14, 0x3A, 0x121},
|
||||
};
|
||||
{
|
||||
{0x12, 0x35, 0x251},
|
||||
{0x13, 0x35, 0x251},
|
||||
{0x14, 0x35, 0x251},
|
||||
{0x12, 0x36, 0x251},
|
||||
{0x13, 0x36, 0x251},
|
||||
{0x14, 0x36, 0x251},
|
||||
{0x12, 0x37, 0x251},
|
||||
{0x13, 0x37, 0x251},
|
||||
{0x14, 0x37, 0x251},
|
||||
{0x12, 0x38, 0x251},
|
||||
{0x13, 0x38, 0x251},
|
||||
{0x14, 0x38, 0x251},
|
||||
{0x12, 0x39, 0x259},
|
||||
{0x13, 0x39, 0x259},
|
||||
{0x14, 0x39, 0x259},
|
||||
{0x12, 0x3A, 0x121},
|
||||
{0x13, 0x3A, 0x121},
|
||||
{0x14, 0x3A, 0x121},
|
||||
};
|
||||
|
||||
static const union AnimCmd gSpriteAnim_8617DEC[] =
|
||||
{
|
||||
@@ -131,67 +134,70 @@ static const union AnimCmd *const gSpriteAnimTable_8617DFC[] =
|
||||
gSpriteAnim_8617DEC,
|
||||
};
|
||||
|
||||
static const struct SpriteTemplate gUnknown_08617E00 = {
|
||||
static const struct SpriteTemplate gUnknown_08617E00 =
|
||||
{
|
||||
0xFFFF, 0xFFFF, &gOamData_8617DF4, gSpriteAnimTable_8617DFC, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy
|
||||
};
|
||||
|
||||
// ewram
|
||||
EWRAM_DATA u8* gUnknown_0203CF04 = NULL;
|
||||
EWRAM_DATA u8* gUnknown_0203CF08 = NULL;
|
||||
EWRAM_DATA struct Struct203CF0C *gUnknown_0203CF0C = NULL;
|
||||
EWRAM_DATA struct Struct203CF10 *gUnknown_0203CF10 = NULL;
|
||||
EWRAM_DATA u16 *gUnknown_0203CF14 = NULL;
|
||||
// EWRAM
|
||||
EWRAM_DATA static u8* sUnknown_0203CF04 = NULL;
|
||||
EWRAM_DATA static u8* sUnknown_0203CF08 = NULL;
|
||||
EWRAM_DATA static struct Struct203CF0C *sUnknown_0203CF0C = NULL;
|
||||
EWRAM_DATA static struct Struct203CF10 *sUnknown_0203CF10 = NULL;
|
||||
EWRAM_DATA static u16 *sUnknown_0203CF14 = NULL;
|
||||
|
||||
// iwram
|
||||
IWRAM_DATA u16 gUnknown_030012A8[8] = {0, 0, 0, 0, 0, 0, 0, 0};
|
||||
// IWRAM bss
|
||||
IWRAM_DATA static u16 gUnknown_030012A8[8];
|
||||
|
||||
// text
|
||||
void sub_81BEB24(void)
|
||||
{
|
||||
u8 i;
|
||||
for(i = 0; i < (sizeof(gUnknown_08617DA4)/sizeof(gUnknown_08617DA4[0])); i++)
|
||||
for (i = 0; i < (sizeof(gUnknown_08617DA4)/sizeof(gUnknown_08617DA4[0])); i++)
|
||||
MapGridSetMetatileIdAt(gUnknown_08617DA4[i].x + 7, gUnknown_08617DA4[i].y + 7, gUnknown_08617DA4[i].tileId);
|
||||
DrawWholeMapView();
|
||||
}
|
||||
|
||||
void sub_81BEB54(void)
|
||||
{
|
||||
CreateTask(sub_81BED50, 0x9);
|
||||
CreateTask(sub_81BED50, 9);
|
||||
}
|
||||
|
||||
void sub_81BEB68(void)
|
||||
{
|
||||
CreateTask(sub_81BEBF4, 0x9);
|
||||
CreateTask(sub_81BEBF4, 9);
|
||||
}
|
||||
|
||||
void sub_81BEB7C(void)
|
||||
{
|
||||
CreateTask(sub_81BF028, 0x9);
|
||||
CreateTask(sub_81BF028, 9);
|
||||
}
|
||||
|
||||
void sub_81BEB90(void)
|
||||
{
|
||||
SetGpuReg(REG_OFFSET_BG0HOFS, gUnknown_0203CF14[0]);
|
||||
SetGpuReg(REG_OFFSET_BG0VOFS, gUnknown_0203CF14[1]);
|
||||
SetGpuReg(REG_OFFSET_BG0HOFS, sUnknown_0203CF14[0]);
|
||||
SetGpuReg(REG_OFFSET_BG0VOFS, sUnknown_0203CF14[1]);
|
||||
}
|
||||
|
||||
void sub_81BEBB4(u8 taskId)
|
||||
{
|
||||
if(!(gTasks[taskId].data[0]))
|
||||
if (!(gTasks[taskId].data[0]))
|
||||
{
|
||||
gUnknown_0203CF14[0] = -gUnknown_0203CF14[0];
|
||||
sUnknown_0203CF14[0] = -sUnknown_0203CF14[0];
|
||||
gTasks[taskId].data[0] = 2;
|
||||
sub_81BEB90();
|
||||
}
|
||||
else
|
||||
{
|
||||
gTasks[taskId].data[0]--;
|
||||
}
|
||||
}
|
||||
|
||||
static void sub_81BEBF4(u8 taskId)
|
||||
{
|
||||
u8 zero;
|
||||
|
||||
switch(gTasks[taskId].data[0])
|
||||
switch (gTasks[taskId].data[0])
|
||||
{
|
||||
case 0:
|
||||
FreeAllWindowBuffers();
|
||||
@@ -199,19 +205,19 @@ static void sub_81BEBF4(u8 taskId)
|
||||
gTasks[taskId].data[0]++;
|
||||
break;
|
||||
case 1:
|
||||
gUnknown_0203CF04 = (u8 *)AllocZeroed(MIRAGE_TOWER_GFX_LENGTH);
|
||||
gUnknown_0203CF08 = (u8 *)AllocZeroed(MIRAGE_TOWER_PALETTE_LENGTH);
|
||||
sUnknown_0203CF04 = (u8 *)AllocZeroed(MIRAGE_TOWER_GFX_LENGTH);
|
||||
sUnknown_0203CF08 = (u8 *)AllocZeroed(MIRAGE_TOWER_PALETTE_LENGTH);
|
||||
ChangeBgX(0, 0, 0);
|
||||
ChangeBgY(0, 0, 0);
|
||||
gTasks[taskId].data[0]++;
|
||||
break;
|
||||
case 2:
|
||||
CpuSet(gUnknown_08617274, gUnknown_0203CF04, MIRAGE_TOWER_GFX_LENGTH / 2);
|
||||
LoadBgTiles(0, gUnknown_0203CF04, MIRAGE_TOWER_GFX_LENGTH, 0);
|
||||
CpuSet(gUnknown_08617274, sUnknown_0203CF04, MIRAGE_TOWER_GFX_LENGTH / 2);
|
||||
LoadBgTiles(0, sUnknown_0203CF04, MIRAGE_TOWER_GFX_LENGTH, 0);
|
||||
gTasks[taskId].data[0]++;
|
||||
break;
|
||||
case 3:
|
||||
SetBgTilemapBuffer(0, gUnknown_0203CF08);
|
||||
SetBgTilemapBuffer(0, sUnknown_0203CF08);
|
||||
CopyToBgTilemapBufferRect_ChangePalette(0, &gUnknown_08617B94, 12, 29, 6, 12, 17);
|
||||
CopyBgTilemapBufferToVram(0);
|
||||
gTasks[taskId].data[0]++;
|
||||
@@ -225,10 +231,10 @@ static void sub_81BEBF4(u8 taskId)
|
||||
gTasks[taskId].data[0]++;
|
||||
break;
|
||||
case 6:
|
||||
gUnknown_0203CF14 = (u16 *)Alloc(4);
|
||||
sUnknown_0203CF14 = Alloc(4);
|
||||
zero = 0;
|
||||
gUnknown_0203CF14[0] = 2;
|
||||
gUnknown_0203CF14[1] = zero;
|
||||
sUnknown_0203CF14[0] = 2;
|
||||
sUnknown_0203CF14[1] = zero;
|
||||
CreateTask(sub_81BEBB4, 0xA);
|
||||
DestroyTask(taskId);
|
||||
EnableBothScriptContexts();
|
||||
@@ -236,86 +242,76 @@ static void sub_81BEBF4(u8 taskId)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef NONMATCHING
|
||||
#define OUTER_BUFFER_LENGTH 0x60
|
||||
#define INNER_BUFFER_LENGTH 0x30
|
||||
static void sub_81BED50(u8 taskId)
|
||||
{
|
||||
u8 anotherTaskId, j;
|
||||
u16 i;
|
||||
u8 index;
|
||||
|
||||
|
||||
switch(gTasks[taskId].data[0])
|
||||
switch (gTasks[taskId].data[0])
|
||||
{
|
||||
case 1:
|
||||
gUnknown_0203CF10 = (struct Struct203CF10 *)AllocZeroed(OUTER_BUFFER_LENGTH * sizeof(struct Struct203CF10));
|
||||
sUnknown_0203CF10 = AllocZeroed(OUTER_BUFFER_LENGTH * sizeof(struct Struct203CF10));
|
||||
break;
|
||||
case 3:
|
||||
if (gTasks[taskId].data[3] <= (OUTER_BUFFER_LENGTH - 1))
|
||||
{
|
||||
u16 i;
|
||||
u16 left;
|
||||
u32 index, next;
|
||||
|
||||
index = (u16)gTasks[taskId].data[3];
|
||||
if(gTasks[taskId].data[3] <= (OUTER_BUFFER_LENGTH - 1))
|
||||
if (gTasks[taskId].data[1] > 1)
|
||||
{
|
||||
if(gTasks[taskId].data[1] > 1)
|
||||
index = gTasks[taskId].data[3];
|
||||
sUnknown_0203CF10[index].buffer = Alloc(INNER_BUFFER_LENGTH);
|
||||
for (i = 0; i <= (INNER_BUFFER_LENGTH - 1); i++)
|
||||
sUnknown_0203CF10[index].buffer[i] = i;
|
||||
for (i = 0; i <= (INNER_BUFFER_LENGTH - 1); i++)
|
||||
{
|
||||
index = (u8)index;
|
||||
gUnknown_0203CF10[index].buffer = (u8 *)Alloc(INNER_BUFFER_LENGTH);
|
||||
for(i = 0; i <= (INNER_BUFFER_LENGTH - 1); i++)
|
||||
gUnknown_0203CF10[index].buffer[i] = i;
|
||||
for(i = 0; i <= (INNER_BUFFER_LENGTH - 1); i++)
|
||||
{
|
||||
u16 rand1, rand2, temp;
|
||||
u16 rand1, rand2, temp;
|
||||
|
||||
rand1 = Random() % 0x30;
|
||||
rand2 = Random() % 0x30;
|
||||
temp = gUnknown_0203CF10[index].buffer[rand2];
|
||||
gUnknown_0203CF10[index].buffer[rand2] = gUnknown_0203CF10[index].buffer[rand1];
|
||||
gUnknown_0203CF10[index].buffer[rand1] = temp;
|
||||
}
|
||||
if(gTasks[taskId].data[3] <= (OUTER_BUFFER_LENGTH - 1))
|
||||
gTasks[taskId].data[3]++;
|
||||
gTasks[taskId].data[1] = 0;
|
||||
rand1 = Random() % 0x30;
|
||||
rand2 = Random() % 0x30;
|
||||
SWAP(sUnknown_0203CF10[index].buffer[rand2], sUnknown_0203CF10[index].buffer[rand1], temp);
|
||||
}
|
||||
gTasks[taskId].data[1]++;
|
||||
if (gTasks[taskId].data[3] <= (OUTER_BUFFER_LENGTH - 1))
|
||||
gTasks[taskId].data[3]++;
|
||||
gTasks[taskId].data[1] = 0;
|
||||
}
|
||||
index = (u8)gTasks[taskId].data[3];
|
||||
for(left = (u8)gTasks[taskId].data[2]; left < (u16)index; left = next)
|
||||
{
|
||||
j = 0;
|
||||
next = left + 1;
|
||||
while(!j)
|
||||
{
|
||||
sub_81BF2B8(gUnknown_0203CF04, ((((OUTER_BUFFER_LENGTH - 1) - left) * INNER_BUFFER_LENGTH) + gUnknown_0203CF10[left].buffer[(gUnknown_0203CF10[left].curr_buffer_index)++]), 0, INNER_BUFFER_LENGTH, 1);
|
||||
j++;
|
||||
}
|
||||
if(gUnknown_0203CF10[left].curr_buffer_index > (INNER_BUFFER_LENGTH - 1))
|
||||
{
|
||||
FREE_AND_SET_NULL(gUnknown_0203CF10[left].buffer);
|
||||
gTasks[taskId].data[2]++;
|
||||
if((left % 2) == 1)
|
||||
gUnknown_0203CF14[1]--;
|
||||
}
|
||||
}
|
||||
LoadBgTiles(0, gUnknown_0203CF04, MIRAGE_TOWER_GFX_LENGTH, 0);
|
||||
if(gUnknown_0203CF10[OUTER_BUFFER_LENGTH - 1].curr_buffer_index > (INNER_BUFFER_LENGTH - 1))
|
||||
break;
|
||||
return;
|
||||
gTasks[taskId].data[1]++;
|
||||
}
|
||||
index = gTasks[taskId].data[3];
|
||||
for (i = (u8)(gTasks[taskId].data[2]); i < index; i++)
|
||||
{
|
||||
for (j = 0; j < 1; j++)
|
||||
{
|
||||
sub_81BF2B8(sUnknown_0203CF04,
|
||||
((((OUTER_BUFFER_LENGTH - 1) - i) * INNER_BUFFER_LENGTH) + sUnknown_0203CF10[i].buffer[(sUnknown_0203CF10[i].currIndex)++]),
|
||||
0, INNER_BUFFER_LENGTH, 1);
|
||||
}
|
||||
if (sUnknown_0203CF10[i].currIndex > (INNER_BUFFER_LENGTH - 1))
|
||||
{
|
||||
FREE_AND_SET_NULL(sUnknown_0203CF10[i].buffer);
|
||||
gTasks[taskId].data[2]++;
|
||||
if ((i % 2) == 1)
|
||||
sUnknown_0203CF14[1]--;
|
||||
}
|
||||
}
|
||||
LoadBgTiles(0, sUnknown_0203CF04, MIRAGE_TOWER_GFX_LENGTH, 0);
|
||||
if (sUnknown_0203CF10[OUTER_BUFFER_LENGTH - 1].currIndex > (INNER_BUFFER_LENGTH - 1))
|
||||
break;
|
||||
return;
|
||||
case 4:
|
||||
UnsetBgTilemapBuffer(0);
|
||||
anotherTaskId = FindTaskIdByFunc(sub_81BEBB4);
|
||||
if(anotherTaskId != 0xFF)
|
||||
if (anotherTaskId != 0xFF)
|
||||
DestroyTask(anotherTaskId);
|
||||
gUnknown_0203CF14[1] = gUnknown_0203CF14[0] = 0;
|
||||
sUnknown_0203CF14[1] = sUnknown_0203CF14[0] = 0;
|
||||
sub_81BEB90();
|
||||
break;
|
||||
case 5:
|
||||
FREE_AND_SET_NULL(gUnknown_0203CF14);
|
||||
FREE_AND_SET_NULL(gUnknown_0203CF10);
|
||||
FREE_AND_SET_NULL(gUnknown_0203CF04);
|
||||
FREE_AND_SET_NULL(gUnknown_0203CF08);
|
||||
FREE_AND_SET_NULL(sUnknown_0203CF14);
|
||||
FREE_AND_SET_NULL(sUnknown_0203CF10);
|
||||
FREE_AND_SET_NULL(sUnknown_0203CF04);
|
||||
FREE_AND_SET_NULL(sUnknown_0203CF08);
|
||||
break;
|
||||
case 6:
|
||||
SetGpuRegBits(REG_OFFSET_BG2CNT, 0x2);
|
||||
@@ -334,423 +330,75 @@ static void sub_81BED50(u8 taskId)
|
||||
gTasks[taskId].data[0]++;
|
||||
}
|
||||
|
||||
#else
|
||||
NAKED
|
||||
static void sub_81BED50(u8 taskId)
|
||||
{
|
||||
asm("\n\
|
||||
.syntax unified\n\
|
||||
push {r4-r7,lr}\n\
|
||||
mov r7, r10\n\
|
||||
mov r6, r9\n\
|
||||
mov r5, r8\n\
|
||||
push {r5-r7}\n\
|
||||
sub sp, 0x10\n\
|
||||
lsls r0, 24\n\
|
||||
lsrs r0, 24\n\
|
||||
mov r10, r0\n\
|
||||
ldr r1, =gTasks\n\
|
||||
lsls r0, 2\n\
|
||||
add r0, r10\n\
|
||||
lsls r0, 3\n\
|
||||
adds r0, r1\n\
|
||||
ldrh r0, [r0, 0x8]\n\
|
||||
subs r0, 0x1\n\
|
||||
lsls r0, 16\n\
|
||||
asrs r0, 16\n\
|
||||
adds r6, r1, 0\n\
|
||||
cmp r0, 0x7\n\
|
||||
bls _081BED7C\n\
|
||||
b _081BF002\n\
|
||||
_081BED7C:\n\
|
||||
lsls r0, 2\n\
|
||||
ldr r1, =_081BED90\n\
|
||||
adds r0, r1\n\
|
||||
ldr r0, [r0]\n\
|
||||
mov pc, r0\n\
|
||||
.pool\n\
|
||||
.align 2, 0\n\
|
||||
_081BED90:\n\
|
||||
.4byte _081BEDB0\n\
|
||||
.4byte _081BF002\n\
|
||||
.4byte _081BEDC4\n\
|
||||
.4byte _081BEF64\n\
|
||||
.4byte _081BEF94\n\
|
||||
.4byte _081BEFD0\n\
|
||||
.4byte _081BEFF0\n\
|
||||
.4byte _081BEFF8\n\
|
||||
_081BEDB0:\n\
|
||||
ldr r4, =gUnknown_0203CF10\n\
|
||||
movs r0, 0xC0\n\
|
||||
lsls r0, 2\n\
|
||||
bl AllocZeroed\n\
|
||||
str r0, [r4]\n\
|
||||
b _081BF002\n\
|
||||
.pool\n\
|
||||
_081BEDC4:\n\
|
||||
mov r1, r10\n\
|
||||
lsls r0, r1, 2\n\
|
||||
adds r1, r0, r1\n\
|
||||
lsls r1, 3\n\
|
||||
adds r2, r1, r6\n\
|
||||
ldrh r3, [r2, 0xE]\n\
|
||||
movs r4, 0xE\n\
|
||||
ldrsh r1, [r2, r4]\n\
|
||||
str r0, [sp, 0x8]\n\
|
||||
cmp r1, 0x5F\n\
|
||||
bgt _081BEE8A\n\
|
||||
movs r1, 0xA\n\
|
||||
ldrsh r0, [r2, r1]\n\
|
||||
cmp r0, 0x1\n\
|
||||
ble _081BEE7C\n\
|
||||
lsls r0, r3, 24\n\
|
||||
lsrs r4, r0, 24\n\
|
||||
movs r0, 0x30\n\
|
||||
bl Alloc\n\
|
||||
ldr r3, =gUnknown_0203CF10\n\
|
||||
ldr r1, [r3]\n\
|
||||
lsls r2, r4, 3\n\
|
||||
adds r1, r2, r1\n\
|
||||
str r0, [r1]\n\
|
||||
movs r5, 0\n\
|
||||
adds r4, r2, 0\n\
|
||||
_081BEDFA:\n\
|
||||
ldr r0, [r3]\n\
|
||||
adds r0, r4, r0\n\
|
||||
ldr r0, [r0]\n\
|
||||
adds r0, r5\n\
|
||||
strb r5, [r0]\n\
|
||||
adds r0, r5, 0x1\n\
|
||||
lsls r0, 16\n\
|
||||
lsrs r5, r0, 16\n\
|
||||
cmp r5, 0x2F\n\
|
||||
bls _081BEDFA\n\
|
||||
movs r5, 0\n\
|
||||
ldr r7, =gUnknown_0203CF10\n\
|
||||
adds r6, r2, 0\n\
|
||||
_081BEE14:\n\
|
||||
bl Random\n\
|
||||
lsls r0, 16\n\
|
||||
lsrs r0, 16\n\
|
||||
movs r1, 0x30\n\
|
||||
bl __umodsi3\n\
|
||||
adds r4, r0, 0\n\
|
||||
lsls r4, 16\n\
|
||||
lsrs r4, 16\n\
|
||||
bl Random\n\
|
||||
lsls r0, 16\n\
|
||||
lsrs r0, 16\n\
|
||||
movs r1, 0x30\n\
|
||||
bl __umodsi3\n\
|
||||
lsls r0, 16\n\
|
||||
lsrs r0, 16\n\
|
||||
ldr r1, [r7]\n\
|
||||
adds r1, r6, r1\n\
|
||||
ldr r1, [r1]\n\
|
||||
adds r0, r1, r0\n\
|
||||
ldrb r2, [r0]\n\
|
||||
adds r1, r4 \n\
|
||||
ldrb r1, [r1]\n\
|
||||
strb r1, [r0]\n\
|
||||
ldr r0, [r7]\n\
|
||||
adds r0, r6, r0\n\
|
||||
ldr r0, [r0]\n\
|
||||
adds r0, r4\n\
|
||||
strb r2, [r0]\n\
|
||||
adds r0, r5, 0x1\n\
|
||||
lsls r0, 16\n\
|
||||
lsrs r5, r0, 16\n\
|
||||
cmp r5, 0x2F\n\
|
||||
bls _081BEE14\n\
|
||||
ldr r0, =gTasks\n\
|
||||
ldr r1, [sp, 0x8]\n\
|
||||
add r1, r10\n\
|
||||
lsls r1, 3\n\
|
||||
adds r2, r1, r0\n\
|
||||
ldrh r3, [r2, 0xE]\n\
|
||||
movs r4, 0xE\n\
|
||||
ldrsh r1, [r2, r4]\n\
|
||||
adds r6, r0, 0\n\
|
||||
cmp r1, 0x5F\n\
|
||||
bgt _081BEE78\n\
|
||||
adds r0, r3, 0x1\n\
|
||||
strh r0, [r2, 0xE]\n\
|
||||
_081BEE78:\n\
|
||||
movs r0, 0\n\
|
||||
strh r0, [r2, 0xA]\n\
|
||||
_081BEE7C:\n\
|
||||
ldr r1, [sp, 0x8]\n\
|
||||
add r1, r10\n\
|
||||
lsls r1, 3\n\
|
||||
adds r1, r6\n\
|
||||
ldrh r0, [r1, 0xA]\n\
|
||||
adds r0, 0x1\n\
|
||||
strh r0, [r1, 0xA]\n\
|
||||
_081BEE8A:\n\
|
||||
ldr r0, [sp, 0x8]\n\
|
||||
add r0, r10\n\
|
||||
lsls r0, 3\n\
|
||||
adds r0, r6\n\
|
||||
ldrb r4, [r0, 0xE]\n\
|
||||
ldrb r5, [r0, 0xC]\n\
|
||||
lsls r0, r4, 16\n\
|
||||
cmp r5, r4\n\
|
||||
bcs _081BEF32\n\
|
||||
str r0, [sp, 0xC]\n\
|
||||
_081BEE9E:\n\
|
||||
movs r6, 0\n\
|
||||
adds r0, r5, 0x1\n\
|
||||
str r0, [sp, 0x4]\n\
|
||||
lsls r4, r5, 3\n\
|
||||
movs r2, 0x5F\n\
|
||||
subs r1, r2, r5\n\
|
||||
lsls r0, r1, 1\n\
|
||||
adds r0, r1\n\
|
||||
lsls r0, 4\n\
|
||||
mov r9, r0\n\
|
||||
_081BEEB2:\n\
|
||||
ldr r0, =gUnknown_0203CF04\n\
|
||||
ldr r0, [r0]\n\
|
||||
ldr r7, =gUnknown_0203CF10\n\
|
||||
ldr r3, [r7]\n\
|
||||
adds r3, r4, r3\n\
|
||||
ldrb r2, [r3, 0x4]\n\
|
||||
adds r1, r2, 0x1\n\
|
||||
strb r1, [r3, 0x4]\n\
|
||||
lsls r2, 24\n\
|
||||
lsrs r2, 24\n\
|
||||
ldr r1, [r3]\n\
|
||||
adds r1, r2\n\
|
||||
ldrb r1, [r1]\n\
|
||||
add r1, r9\n\
|
||||
lsls r1, 16\n\
|
||||
lsrs r1, 16\n\
|
||||
movs r2, 0x1\n\
|
||||
mov r8, r2\n\
|
||||
str r2, [sp]\n\
|
||||
movs r2, 0\n\
|
||||
movs r3, 0x30\n\
|
||||
bl sub_81BF2B8\n\
|
||||
adds r0, r6, 0x1\n\
|
||||
lsls r0, 24\n\
|
||||
lsrs r6, r0, 24\n\
|
||||
cmp r6, 0\n\
|
||||
beq _081BEEB2\n\
|
||||
ldr r0, [r7]\n\
|
||||
adds r1, r4, r0\n\
|
||||
ldrb r0, [r1, 0x4]\n\
|
||||
cmp r0, 0x2F\n\
|
||||
bls _081BEF24\n\
|
||||
ldr r0, [r1]\n\
|
||||
bl Free\n\
|
||||
ldr r0, [r7]\n\
|
||||
adds r0, r4, r0\n\
|
||||
movs r1, 0\n\
|
||||
str r1, [r0]\n\
|
||||
ldr r1, [sp, 0x8]\n\
|
||||
add r1, r10\n\
|
||||
lsls r1, 3\n\
|
||||
ldr r4, =gTasks\n\
|
||||
adds r1, r4\n\
|
||||
ldrh r0, [r1, 0xC]\n\
|
||||
adds r0, 0x1\n\
|
||||
strh r0, [r1, 0xC]\n\
|
||||
mov r0, r8\n\
|
||||
ands r5, r0\n\
|
||||
cmp r5, 0x1\n\
|
||||
bne _081BEF24\n\
|
||||
ldr r0, =gUnknown_0203CF14\n\
|
||||
ldr r1, [r0]\n\
|
||||
ldrh r0, [r1, 0x2]\n\
|
||||
subs r0, 0x1\n\
|
||||
strh r0, [r1, 0x2]\n\
|
||||
_081BEF24:\n\
|
||||
ldr r1, [sp, 0x4]\n\
|
||||
lsls r0, r1, 16\n\
|
||||
lsrs r5, r0, 16\n\
|
||||
ldr r2, [sp, 0xC]\n\
|
||||
lsrs r0, r2, 16\n\
|
||||
cmp r5, r0\n\
|
||||
bcc _081BEE9E\n\
|
||||
_081BEF32:\n\
|
||||
ldr r0, =gUnknown_0203CF04\n\
|
||||
ldr r1, [r0]\n\
|
||||
movs r2, 0x92\n\
|
||||
lsls r2, 4\n\
|
||||
movs r0, 0\n\
|
||||
movs r3, 0\n\
|
||||
bl LoadBgTiles\n\
|
||||
ldr r0, =gUnknown_0203CF10\n\
|
||||
ldr r0, [r0]\n\
|
||||
movs r4, 0xBE\n\
|
||||
lsls r4, 2\n\
|
||||
adds r0, r4\n\
|
||||
ldrb r0, [r0, 0x4]\n\
|
||||
cmp r0, 0x2F\n\
|
||||
bhi _081BF002\n\
|
||||
b _081BF014\n\
|
||||
.pool\n\
|
||||
_081BEF64:\n\
|
||||
movs r0, 0\n\
|
||||
bl UnsetBgTilemapBuffer\n\
|
||||
ldr r0, =sub_81BEBB4\n\
|
||||
bl FindTaskIdByFunc\n\
|
||||
lsls r0, 24\n\
|
||||
lsrs r0, 24\n\
|
||||
cmp r0, 0xFF\n\
|
||||
beq _081BEF7C\n\
|
||||
bl DestroyTask\n\
|
||||
_081BEF7C:\n\
|
||||
ldr r0, =gUnknown_0203CF14\n\
|
||||
ldr r1, [r0]\n\
|
||||
movs r0, 0\n\
|
||||
strh r0, [r1]\n\
|
||||
strh r0, [r1, 0x2]\n\
|
||||
bl sub_81BEB90\n\
|
||||
b _081BF002\n\
|
||||
.pool\n\
|
||||
_081BEF94:\n\
|
||||
ldr r4, =gUnknown_0203CF14\n\
|
||||
ldr r0, [r4]\n\
|
||||
bl Free\n\
|
||||
movs r5, 0\n\
|
||||
str r5, [r4]\n\
|
||||
ldr r4, =gUnknown_0203CF10\n\
|
||||
ldr r0, [r4]\n\
|
||||
bl Free\n\
|
||||
str r5, [r4]\n\
|
||||
ldr r4, =gUnknown_0203CF04\n\
|
||||
ldr r0, [r4]\n\
|
||||
bl Free\n\
|
||||
str r5, [r4]\n\
|
||||
ldr r4, =gUnknown_0203CF08\n\
|
||||
ldr r0, [r4]\n\
|
||||
bl Free\n\
|
||||
str r5, [r4]\n\
|
||||
b _081BF002\n\
|
||||
.pool\n\
|
||||
_081BEFD0:\n\
|
||||
movs r0, 0xC\n\
|
||||
movs r1, 0x2\n\
|
||||
bl SetGpuRegBits\n\
|
||||
movs r0, 0x8\n\
|
||||
movs r1, 0\n\
|
||||
bl SetGpuRegBits\n\
|
||||
movs r0, 0\n\
|
||||
movs r1, 0x7\n\
|
||||
movs r2, 0\n\
|
||||
bl SetBgAttribute\n\
|
||||
bl sub_81971D0\n\
|
||||
b _081BF002\n\
|
||||
_081BEFF0:\n\
|
||||
movs r0, 0\n\
|
||||
bl ShowBg\n\
|
||||
b _081BF002\n\
|
||||
_081BEFF8:\n\
|
||||
mov r0, r10\n\
|
||||
bl DestroyTask\n\
|
||||
bl EnableBothScriptContexts\n\
|
||||
_081BF002:\n\
|
||||
ldr r0, =gTasks\n\
|
||||
mov r2, r10\n\
|
||||
lsls r1, r2, 2\n\
|
||||
add r1, r10\n\
|
||||
lsls r1, 3\n\
|
||||
adds r1, r0\n\
|
||||
ldrh r0, [r1, 0x8]\n\
|
||||
adds r0, 0x1\n\
|
||||
strh r0, [r1, 0x8]\n\
|
||||
_081BF014:\n\
|
||||
add sp, 0x10\n\
|
||||
pop {r3-r5}\n\
|
||||
mov r8, r3\n\
|
||||
mov r9, r4\n\
|
||||
mov r10, r5\n\
|
||||
pop {r4-r7}\n\
|
||||
pop {r0}\n\
|
||||
bx r0\n\
|
||||
.pool\n\
|
||||
.syntax divided");
|
||||
}
|
||||
#endif // NONMATCHING
|
||||
|
||||
static void sub_81BF028(u8 taskId)
|
||||
{
|
||||
u16 i;
|
||||
u8 *buffer;
|
||||
|
||||
switch(gTasks[taskId].data[0])
|
||||
switch (gTasks[taskId].data[0])
|
||||
{
|
||||
case 1:
|
||||
gUnknown_0203CF0C = (struct Struct203CF0C *)AllocZeroed(sizeof(struct Struct203CF0C));
|
||||
gUnknown_0203CF0C->frameImageTiles = (u8 *)AllocZeroed(ROOT_FOSSIL_GFX_LENGTH);
|
||||
gUnknown_0203CF0C->frameImage = (struct DynamicSpriteFrameImage *) AllocZeroed(sizeof(struct DynamicSpriteFrameImage));
|
||||
gUnknown_0203CF0C->unkC = (u16 *)AllocZeroed(ROOT_FOSSIL_GFX_RANDOMIZER_LENGTH * sizeof(u16));
|
||||
gUnknown_0203CF0C->unk10 = 0;
|
||||
sUnknown_0203CF0C = AllocZeroed(sizeof(*sUnknown_0203CF0C));
|
||||
sUnknown_0203CF0C->frameImageTiles = AllocZeroed(ROOT_FOSSIL_GFX_LENGTH);
|
||||
sUnknown_0203CF0C->frameImage = AllocZeroed(sizeof(*sUnknown_0203CF0C->frameImage));
|
||||
sUnknown_0203CF0C->unkC = AllocZeroed(ROOT_FOSSIL_GFX_RANDOMIZER_LENGTH * sizeof(u16));
|
||||
sUnknown_0203CF0C->unk10 = 0;
|
||||
break;
|
||||
case 2:
|
||||
{
|
||||
u8 *buffer;
|
||||
buffer = gUnknown_0203CF0C->frameImageTiles;
|
||||
for(i = 0; i < ROOT_FOSSIL_GFX_LENGTH; i++, buffer++)
|
||||
*buffer = gRootFossil_Gfx[i];
|
||||
}
|
||||
buffer = sUnknown_0203CF0C->frameImageTiles;
|
||||
for (i = 0; i < ROOT_FOSSIL_GFX_LENGTH; i++, buffer++)
|
||||
*buffer = gRootFossil_Gfx[i];
|
||||
break;
|
||||
case 3:
|
||||
gUnknown_0203CF0C->frameImage->data = gUnknown_0203CF0C->frameImageTiles;
|
||||
gUnknown_0203CF0C->frameImage->size = ROOT_FOSSIL_GFX_LENGTH;
|
||||
sUnknown_0203CF0C->frameImage->data = sUnknown_0203CF0C->frameImageTiles;
|
||||
sUnknown_0203CF0C->frameImage->size = ROOT_FOSSIL_GFX_LENGTH;
|
||||
break;
|
||||
case 4:
|
||||
{
|
||||
u8 spriteId, zero;
|
||||
struct SpriteTemplate fossilTemplate;
|
||||
|
||||
fossilTemplate = gUnknown_08617E00;
|
||||
fossilTemplate.images = (struct SpriteFrameImage *)(gUnknown_0203CF0C->frameImage);
|
||||
spriteId = CreateSprite(&fossilTemplate, 128, -16, 1);
|
||||
gUnknown_0203CF0C->spriteId = spriteId;
|
||||
zero = 0;
|
||||
gSprites[gUnknown_0203CF0C->spriteId].centerToCornerVecX = zero;
|
||||
gSprites[gUnknown_0203CF0C->spriteId].data[0] = gSprites[gUnknown_0203CF0C->spriteId].pos1.x;
|
||||
gSprites[gUnknown_0203CF0C->spriteId].data[1] = 1;
|
||||
fossilTemplate.images = (struct SpriteFrameImage *)(sUnknown_0203CF0C->frameImage);
|
||||
sUnknown_0203CF0C->spriteId = CreateSprite(&fossilTemplate, 128, -16, 1);
|
||||
gSprites[sUnknown_0203CF0C->spriteId].centerToCornerVecX = 0;
|
||||
gSprites[sUnknown_0203CF0C->spriteId].data[0] = gSprites[sUnknown_0203CF0C->spriteId].pos1.x;
|
||||
gSprites[sUnknown_0203CF0C->spriteId].data[1] = 1;
|
||||
}
|
||||
case 5:
|
||||
for(i = 0; i < ROOT_FOSSIL_GFX_RANDOMIZER_LENGTH; i++)
|
||||
gUnknown_0203CF0C->unkC[i] = i;
|
||||
for (i = 0; i < ROOT_FOSSIL_GFX_RANDOMIZER_LENGTH; i++)
|
||||
sUnknown_0203CF0C->unkC[i] = i;
|
||||
break;
|
||||
case 6:
|
||||
for (i = 0; i < (ROOT_FOSSIL_GFX_RANDOMIZER_LENGTH * sizeof(u16)); i++)
|
||||
{
|
||||
u16 rand1, rand2, temp, j;
|
||||
j = (ROOT_FOSSIL_GFX_RANDOMIZER_LENGTH * sizeof(u16)) - 1;
|
||||
for(i = 0; i <= j; i++)
|
||||
{
|
||||
rand1 = Random() % 0x100;
|
||||
rand2 = Random() % 0x100;
|
||||
j = (ROOT_FOSSIL_GFX_RANDOMIZER_LENGTH * sizeof(u16)) - 1;
|
||||
temp = gUnknown_0203CF0C->unkC[rand2];
|
||||
gUnknown_0203CF0C->unkC[rand2] = gUnknown_0203CF0C->unkC[rand1];
|
||||
gUnknown_0203CF0C->unkC[rand1] = temp;
|
||||
}
|
||||
gSprites[gUnknown_0203CF0C->spriteId].callback = sub_81BF248;
|
||||
break;
|
||||
u16 rand1, rand2, temp;
|
||||
|
||||
rand1 = Random() % 0x100;
|
||||
rand2 = Random() % 0x100;
|
||||
SWAP(sUnknown_0203CF0C->unkC[rand2], sUnknown_0203CF0C->unkC[rand1], temp);
|
||||
}
|
||||
gSprites[sUnknown_0203CF0C->spriteId].callback = sub_81BF248;
|
||||
break;
|
||||
case 7:
|
||||
if(gSprites[gUnknown_0203CF0C->spriteId].callback != SpriteCallbackDummy)
|
||||
if (gSprites[sUnknown_0203CF0C->spriteId].callback != SpriteCallbackDummy)
|
||||
return;
|
||||
DestroySprite(&gSprites[gUnknown_0203CF0C->spriteId]);
|
||||
FREE_AND_SET_NULL(gUnknown_0203CF0C->unkC);;
|
||||
FREE_AND_SET_NULL(gUnknown_0203CF0C->frameImage);
|
||||
FREE_AND_SET_NULL(gUnknown_0203CF0C->frameImageTiles);
|
||||
FREE_AND_SET_NULL(gUnknown_0203CF0C);
|
||||
DestroySprite(&gSprites[sUnknown_0203CF0C->spriteId]);
|
||||
FREE_AND_SET_NULL(sUnknown_0203CF0C->unkC);;
|
||||
FREE_AND_SET_NULL(sUnknown_0203CF0C->frameImage);
|
||||
FREE_AND_SET_NULL(sUnknown_0203CF0C->frameImageTiles);
|
||||
FREE_AND_SET_NULL(sUnknown_0203CF0C);
|
||||
break;
|
||||
case 8:
|
||||
EnableBothScriptContexts();
|
||||
break;
|
||||
}
|
||||
++gTasks[taskId].data[0];
|
||||
|
||||
gTasks[taskId].data[0]++;
|
||||
}
|
||||
|
||||
static void sub_81BF248(struct Sprite *sprite)
|
||||
{
|
||||
if (gUnknown_0203CF0C->unk10 >= (ROOT_FOSSIL_GFX_RANDOMIZER_LENGTH))
|
||||
if (sUnknown_0203CF0C->unk10 >= (ROOT_FOSSIL_GFX_RANDOMIZER_LENGTH))
|
||||
{
|
||||
sprite->callback = SpriteCallbackDummy;
|
||||
}
|
||||
@@ -759,7 +407,7 @@ static void sub_81BF248(struct Sprite *sprite)
|
||||
u8 i;
|
||||
for (i = 0; i < 2; i++)
|
||||
{
|
||||
sub_81BF2B8(gUnknown_0203CF0C->frameImageTiles, gUnknown_0203CF0C->unkC[gUnknown_0203CF0C->unk10++], 0, 16, 0);
|
||||
sub_81BF2B8(sUnknown_0203CF0C->frameImageTiles, sUnknown_0203CF0C->unkC[sUnknown_0203CF0C->unk10++], 0, 16, 0);
|
||||
}
|
||||
StartSpriteAnim(sprite, 0);
|
||||
}
|
||||
@@ -768,3 +416,146 @@ static void sub_81BF248(struct Sprite *sprite)
|
||||
sprite->pos1.y++;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef NONMATCHING
|
||||
static void sub_81BF2B8(u8* a, u16 b, u8 c, u8 d, u8 e)
|
||||
{
|
||||
u8 r5, r4, r0, r2;
|
||||
u16 var;
|
||||
|
||||
r4 = r5 = b / d;
|
||||
gUnknown_030012A8[0] = r4;
|
||||
|
||||
r0 = r2 = b % d;
|
||||
gUnknown_030012A8[1] = r2;
|
||||
|
||||
r4 &= 7;
|
||||
r2 &= 7;
|
||||
gUnknown_030012A8[2] = r4;
|
||||
gUnknown_030012A8[3] = r2;
|
||||
|
||||
r0 /= 8;
|
||||
r5 /= 8;
|
||||
gUnknown_030012A8[4] = r0;
|
||||
gUnknown_030012A8[5] = r5;
|
||||
|
||||
var = ((d / 8) * (r5 * 64)) + (r0 * 64);
|
||||
gUnknown_030012A8[6] = var;
|
||||
|
||||
var += (r4 * 8) + r2;
|
||||
gUnknown_030012A8[7] = var;
|
||||
|
||||
// This part is non-matching. 99% sure it IS functionally equivalent, though.
|
||||
b = (b & 1) ^ 1;
|
||||
c = (c << ((b) << 2)) | (15 << ((b ^ 1) << 2));
|
||||
|
||||
a[(var / 2) + (e * 32)] &= c;
|
||||
}
|
||||
|
||||
#else
|
||||
NAKED
|
||||
static void sub_81BF2B8(u8* a, u16 b, u8 c, u8 d, u8 e)
|
||||
{
|
||||
asm_unified("\n\
|
||||
push {r4-r7,lr}\n\
|
||||
mov r7, r10\n\
|
||||
mov r6, r9\n\
|
||||
mov r5, r8\n\
|
||||
push {r5-r7}\n\
|
||||
sub sp, 0x8\n\
|
||||
str r0, [sp]\n\
|
||||
mov r10, r1\n\
|
||||
adds r6, r2, 0\n\
|
||||
mov r8, r3\n\
|
||||
ldr r0, [sp, 0x28]\n\
|
||||
mov r9, r0\n\
|
||||
lsls r1, 16\n\
|
||||
lsrs r1, 16\n\
|
||||
mov r10, r1\n\
|
||||
lsls r6, 24\n\
|
||||
lsrs r6, 24\n\
|
||||
mov r0, r8\n\
|
||||
lsls r0, 24\n\
|
||||
mov r8, r0\n\
|
||||
lsrs r7, r0, 24\n\
|
||||
mov r1, r9\n\
|
||||
lsls r1, 24\n\
|
||||
lsrs r1, 24\n\
|
||||
mov r9, r1\n\
|
||||
mov r0, r10\n\
|
||||
adds r1, r7, 0\n\
|
||||
bl __divsi3\n\
|
||||
adds r5, r0, 0\n\
|
||||
lsls r5, 24\n\
|
||||
lsrs r4, r5, 24\n\
|
||||
ldr r3, =gUnknown_030012A8\n\
|
||||
strh r4, [r3]\n\
|
||||
mov r0, r10\n\
|
||||
adds r1, r7, 0\n\
|
||||
str r3, [sp, 0x4]\n\
|
||||
bl __modsi3\n\
|
||||
lsls r0, 24\n\
|
||||
lsrs r2, r0, 24\n\
|
||||
ldr r3, [sp, 0x4]\n\
|
||||
strh r2, [r3, 0x2]\n\
|
||||
movs r1, 0x7\n\
|
||||
ands r4, r1\n\
|
||||
ands r2, r1\n\
|
||||
strh r4, [r3, 0x4]\n\
|
||||
strh r2, [r3, 0x6]\n\
|
||||
lsrs r0, 27\n\
|
||||
lsrs r5, 27\n\
|
||||
strh r0, [r3, 0x8]\n\
|
||||
strh r5, [r3, 0xA]\n\
|
||||
mov r1, r8\n\
|
||||
lsrs r1, 27\n\
|
||||
lsls r1, 6\n\
|
||||
mov r8, r1\n\
|
||||
mov r1, r8\n\
|
||||
muls r1, r5\n\
|
||||
lsls r0, 6\n\
|
||||
adds r1, r0\n\
|
||||
lsls r1, 16\n\
|
||||
lsrs r1, 16\n\
|
||||
strh r1, [r3, 0xC]\n\
|
||||
lsls r4, 3\n\
|
||||
adds r4, r2\n\
|
||||
adds r1, r4\n\
|
||||
lsls r4, r1, 16\n\
|
||||
lsrs r4, 17\n\
|
||||
strh r1, [r3, 0xE]\n\
|
||||
movs r1, 0x1\n\
|
||||
mov r0, r10\n\
|
||||
ands r1, r0\n\
|
||||
movs r2, 0x1\n\
|
||||
eors r1, r2\n\
|
||||
lsls r0, r1, 2\n\
|
||||
lsls r6, r0\n\
|
||||
eors r1, r2\n\
|
||||
lsls r1, 2\n\
|
||||
movs r0, 0xF\n\
|
||||
lsls r0, r1\n\
|
||||
orrs r6, r0\n\
|
||||
lsls r6, 24\n\
|
||||
lsrs r6, 24\n\
|
||||
mov r1, r9\n\
|
||||
lsls r1, 5\n\
|
||||
mov r9, r1\n\
|
||||
add r9, r4\n\
|
||||
ldr r1, [sp]\n\
|
||||
add r1, r9\n\
|
||||
ldrb r0, [r1]\n\
|
||||
ands r6, r0\n\
|
||||
strb r6, [r1]\n\
|
||||
add sp, 0x8\n\
|
||||
pop {r3-r5}\n\
|
||||
mov r8, r3\n\
|
||||
mov r9, r4\n\
|
||||
mov r10, r5\n\
|
||||
pop {r4-r7}\n\
|
||||
pop {r0}\n\
|
||||
bx r0\n\
|
||||
.pool\n\
|
||||
");
|
||||
}
|
||||
#endif // NONMATCHING
|
||||
|
||||
+517
-517
File diff suppressed because it is too large
Load Diff
+15
-15
@@ -1,8 +1,8 @@
|
||||
#include "global.h"
|
||||
|
||||
const u32 gBattleTextboxTiles[] = INCBIN_U32("graphics/interface/menu.4bpp.lz");
|
||||
const u32 gBattleTextboxPalette[] = INCBIN_U32("graphics/interface/menu.gbapal.lz");
|
||||
const u32 gBattleTextboxTilemap[] = INCBIN_U32("graphics/interface/menu_map.bin.lz");
|
||||
const u32 gBattleTextboxTiles[] = INCBIN_U32("graphics/battle_interface/textbox.4bpp.lz");
|
||||
const u32 gBattleTextboxPalette[] = INCBIN_U32("graphics/battle_interface/textbox.gbapal.lz");
|
||||
const u32 gBattleTextboxTilemap[] = INCBIN_U32("graphics/battle_interface/textbox_map.bin.lz");
|
||||
|
||||
const u32 gMonStillFrontPic_CircledQuestionMark[] = INCBIN_U32("graphics/pokemon/front_pics/circled_question_mark_still_front_pic.4bpp.lz");
|
||||
const u32 gMonBackPic_CircledQuestionMark[] = INCBIN_U32("graphics/pokemon/back_pics/circled_question_mark_back_pic.4bpp.lz");
|
||||
@@ -884,18 +884,18 @@ const u32 gBattleAnimSpritePalette_242[] = INCBIN_U32("graphics/battle_anims/spr
|
||||
const u32 gBattleAnimSpriteSheet_243[] = INCBIN_U32("graphics/battle_anims/sprites/243.4bpp.lz");
|
||||
const u32 gBattleAnimSpritePalette_243[] = INCBIN_U32("graphics/battle_anims/sprites/243.gbapal.lz");
|
||||
|
||||
const u32 gUnknown_08C2D720[] = INCBIN_U32("graphics/battle_anims/masks/stat.4bpp.lz");
|
||||
const u32 gUnknown_08C2D930[] = INCBIN_U32("graphics/battle_anims/masks/stat_tilemap_1.bin.lz");
|
||||
const u32 gUnknown_08C2DA4C[] = INCBIN_U32("graphics/battle_anims/masks/stat_tilemap_2.bin.lz");
|
||||
const u32 gBattleStatMask_Gfx[] = INCBIN_U32("graphics/battle_anims/masks/stat.4bpp.lz");
|
||||
const u32 gBattleStatMask1_Tilemap[] = INCBIN_U32("graphics/battle_anims/masks/stat_tilemap_1.bin.lz");
|
||||
const u32 gBattleStatMask2_Tilemap[] = INCBIN_U32("graphics/battle_anims/masks/stat_tilemap_2.bin.lz");
|
||||
|
||||
const u32 gUnknown_08C2DB68[] = INCBIN_U32("graphics/battle_anims/masks/stat1.gbapal.lz");
|
||||
const u32 gUnknown_08C2DB88[] = INCBIN_U32("graphics/battle_anims/masks/stat2.gbapal.lz");
|
||||
const u32 gUnknown_08C2DBA8[] = INCBIN_U32("graphics/battle_anims/masks/stat3.gbapal.lz");
|
||||
const u32 gUnknown_08C2DBC8[] = INCBIN_U32("graphics/battle_anims/masks/stat4.gbapal.lz");
|
||||
const u32 gUnknown_08C2DBE8[] = INCBIN_U32("graphics/battle_anims/masks/stat5.gbapal.lz");
|
||||
const u32 gUnknown_08C2DC08[] = INCBIN_U32("graphics/battle_anims/masks/stat6.gbapal.lz");
|
||||
const u32 gUnknown_08C2DC28[] = INCBIN_U32("graphics/battle_anims/masks/stat7.gbapal.lz");
|
||||
const u32 gUnknown_08C2DC48[] = INCBIN_U32("graphics/battle_anims/masks/stat8.gbapal.lz");
|
||||
const u32 gBattleStatMask1_Pal[] = INCBIN_U32("graphics/battle_anims/masks/stat1.gbapal.lz");
|
||||
const u32 gBattleStatMask2_Pal[] = INCBIN_U32("graphics/battle_anims/masks/stat2.gbapal.lz");
|
||||
const u32 gBattleStatMask3_Pal[] = INCBIN_U32("graphics/battle_anims/masks/stat3.gbapal.lz");
|
||||
const u32 gBattleStatMask4_Pal[] = INCBIN_U32("graphics/battle_anims/masks/stat4.gbapal.lz");
|
||||
const u32 gBattleStatMask5_Pal[] = INCBIN_U32("graphics/battle_anims/masks/stat5.gbapal.lz");
|
||||
const u32 gBattleStatMask6_Pal[] = INCBIN_U32("graphics/battle_anims/masks/stat6.gbapal.lz");
|
||||
const u32 gBattleStatMask7_Pal[] = INCBIN_U32("graphics/battle_anims/masks/stat7.gbapal.lz");
|
||||
const u32 gBattleStatMask8_Pal[] = INCBIN_U32("graphics/battle_anims/masks/stat8.gbapal.lz");
|
||||
|
||||
const u32 gUnknown_08C2DC68[] = INCBIN_U32("graphics/battle_anims/masks/cure_bubbles.4bpp.lz");
|
||||
const u32 gUnknown_08C2DDA4[] = INCBIN_U32("graphics/battle_anims/masks/cure_bubbles.gbapal.lz");
|
||||
@@ -1485,7 +1485,7 @@ const u32 gUnknown_08DD4C4C[] = INCBIN_U32("graphics/link/link_winedge.bin.lz");
|
||||
|
||||
const u32 gUnknown_08DD4CF8[] = INCBIN_U32("graphics/interface/unk_change_case.4bpp.lz");
|
||||
|
||||
const u16 gTilesetPalettes_General[][16] =
|
||||
const u16 gTilesetPalettes_General[][16] =
|
||||
{
|
||||
INCBIN_U16("data/tilesets/primary/general/palettes/00.gbapal"),
|
||||
INCBIN_U16("data/tilesets/primary/general/palettes/01.gbapal"),
|
||||
|
||||
+641
-14
@@ -1,14 +1,31 @@
|
||||
#include "global.h"
|
||||
#include "battle_anim.h"
|
||||
#include "random.h"
|
||||
#include "scanline_effect.h"
|
||||
#include "task.h"
|
||||
#include "trig.h"
|
||||
#include "constants/rgb.h"
|
||||
|
||||
extern void sub_8114994(struct Sprite *);
|
||||
extern void sub_8114A7C(struct Sprite *);
|
||||
extern void sub_8114AF0(struct Sprite *);
|
||||
extern void sub_8114AF0(struct Sprite *);
|
||||
extern void sub_8114B80(struct Sprite *);
|
||||
extern void sub_81151A0(struct Sprite *);
|
||||
extern void sub_8115244(struct Sprite *);
|
||||
void AnimBonemerangProjectile(struct Sprite *);
|
||||
void AnimBoneHitProjectile(struct Sprite *);
|
||||
void AnimDirtScatter(struct Sprite *);
|
||||
void AnimMudSportDirt(struct Sprite *);
|
||||
void AnimFissureDirtPlumeParticle(struct Sprite *);
|
||||
void AnimDigDirtMound(struct Sprite *);
|
||||
static void AnimBonemerangProjectileStep(struct Sprite *);
|
||||
static void AnimBonemerangProjectileEnd(struct Sprite *);
|
||||
static void AnimMudSportDirtRising(struct Sprite *);
|
||||
static void AnimMudSportDirtFalling(struct Sprite *);
|
||||
static void sub_8114CFC(u8);
|
||||
static void sub_8114EB4(u8);
|
||||
static void sub_8114F54(u8);
|
||||
static void sub_8114FD8(u8);
|
||||
static void sub_81150E0(u8, s16, s16);
|
||||
static void AnimFissureDirtPlumeParticleStep(struct Sprite *);
|
||||
static void sub_81153AC(u8);
|
||||
static void sub_81154A4(u8);
|
||||
static void sub_8115588(struct Task *);
|
||||
static void sub_81156D0(u8);
|
||||
|
||||
const union AffineAnimCmd gUnknown_08597150[] =
|
||||
{
|
||||
@@ -40,7 +57,7 @@ const struct SpriteTemplate gUnknown_08597178 =
|
||||
.anims = gDummySpriteAnimTable,
|
||||
.images = NULL,
|
||||
.affineAnims = gUnknown_08597170,
|
||||
.callback = sub_8114994,
|
||||
.callback = AnimBonemerangProjectile,
|
||||
};
|
||||
|
||||
const struct SpriteTemplate gUnknown_08597190 =
|
||||
@@ -51,7 +68,7 @@ const struct SpriteTemplate gUnknown_08597190 =
|
||||
.anims = gDummySpriteAnimTable,
|
||||
.images = NULL,
|
||||
.affineAnims = gUnknown_08597174,
|
||||
.callback = sub_8114A7C,
|
||||
.callback = AnimBoneHitProjectile,
|
||||
};
|
||||
|
||||
const struct SpriteTemplate gUnknown_085971A8 =
|
||||
@@ -62,7 +79,7 @@ const struct SpriteTemplate gUnknown_085971A8 =
|
||||
.anims = gDummySpriteAnimTable,
|
||||
.images = NULL,
|
||||
.affineAnims = gDummySpriteAffineAnimTable,
|
||||
.callback = sub_8114AF0,
|
||||
.callback = AnimDirtScatter,
|
||||
};
|
||||
|
||||
const union AnimCmd gUnknown_085971C0[] =
|
||||
@@ -84,7 +101,7 @@ const struct SpriteTemplate gUnknown_085971CC =
|
||||
.anims = gUnknown_085971C8,
|
||||
.images = NULL,
|
||||
.affineAnims = gDummySpriteAffineAnimTable,
|
||||
.callback = sub_8114AF0,
|
||||
.callback = AnimDirtScatter,
|
||||
};
|
||||
|
||||
const struct SpriteTemplate gUnknown_085971E4 =
|
||||
@@ -95,7 +112,7 @@ const struct SpriteTemplate gUnknown_085971E4 =
|
||||
.anims = gDummySpriteAnimTable,
|
||||
.images = NULL,
|
||||
.affineAnims = gDummySpriteAffineAnimTable,
|
||||
.callback = sub_8114B80,
|
||||
.callback = AnimMudSportDirt,
|
||||
};
|
||||
|
||||
const struct SpriteTemplate gUnknown_085971FC =
|
||||
@@ -106,7 +123,7 @@ const struct SpriteTemplate gUnknown_085971FC =
|
||||
.anims = gDummySpriteAnimTable,
|
||||
.images = NULL,
|
||||
.affineAnims = gDummySpriteAffineAnimTable,
|
||||
.callback = sub_81151A0,
|
||||
.callback = AnimFissureDirtPlumeParticle,
|
||||
};
|
||||
|
||||
const struct SpriteTemplate gUnknown_08597214 =
|
||||
@@ -117,5 +134,615 @@ const struct SpriteTemplate gUnknown_08597214 =
|
||||
.anims = gDummySpriteAnimTable,
|
||||
.images = NULL,
|
||||
.affineAnims = gDummySpriteAffineAnimTable,
|
||||
.callback = sub_8115244,
|
||||
.callback = AnimDigDirtMound,
|
||||
};
|
||||
|
||||
// Moves a bone projectile towards the target mon, which moves like
|
||||
// a boomerang. After hitting the target mon, it comes back to the user.
|
||||
void AnimBonemerangProjectile(struct Sprite *sprite)
|
||||
{
|
||||
sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimAttacker, 2);
|
||||
sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimAttacker, 3);
|
||||
sprite->data[0] = 20;
|
||||
sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimTarget, 2);
|
||||
sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimTarget, 3);
|
||||
sprite->data[5] = -40;
|
||||
InitAnimArcTranslation(sprite);
|
||||
sprite->callback = AnimBonemerangProjectileStep;
|
||||
}
|
||||
|
||||
static void AnimBonemerangProjectileStep(struct Sprite *sprite)
|
||||
{
|
||||
if (TranslateAnimArc(sprite))
|
||||
{
|
||||
sprite->pos1.x += sprite->pos2.x;
|
||||
sprite->pos1.y += sprite->pos2.y;
|
||||
sprite->pos2.y = 0;
|
||||
sprite->pos2.x = 0;
|
||||
sprite->data[0] = 20;
|
||||
sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimAttacker, 2);
|
||||
sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimAttacker, 3);
|
||||
sprite->data[5] = 40;
|
||||
InitAnimArcTranslation(sprite);
|
||||
sprite->callback = AnimBonemerangProjectileEnd;
|
||||
}
|
||||
}
|
||||
|
||||
static void AnimBonemerangProjectileEnd(struct Sprite *sprite)
|
||||
{
|
||||
if (TranslateAnimArc(sprite))
|
||||
DestroyAnimSprite(sprite);
|
||||
}
|
||||
|
||||
// Moves a bone projectile towards the target mon, starting right next to
|
||||
// the target mon.
|
||||
// arg 0: initial x pixel offset
|
||||
// arg 1: initial y pixel offset
|
||||
// arg 2: target x pixel offset
|
||||
// arg 3: target y pixel offset
|
||||
// arg 4: duration
|
||||
void AnimBoneHitProjectile(struct Sprite *sprite)
|
||||
{
|
||||
sub_80A6980(sprite, TRUE);
|
||||
if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER)
|
||||
gBattleAnimArgs[2] = -gBattleAnimArgs[2];
|
||||
|
||||
sprite->data[0] = gBattleAnimArgs[4];
|
||||
sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimTarget, 2) + gBattleAnimArgs[2];
|
||||
sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimTarget, 3) + gBattleAnimArgs[3];
|
||||
sprite->callback = StartAnimLinearTranslation;
|
||||
StoreSpriteCallbackInData6(sprite, DestroyAnimSprite);
|
||||
}
|
||||
|
||||
// Moves a small dirt projectile towards the target mon.
|
||||
// arg 0: initial x pixel offset
|
||||
// arg 1: initial y pixel offset
|
||||
// arg 2: duration
|
||||
// arg 3: target x pixel offset
|
||||
// arg 4: target y pixel offset
|
||||
void AnimDirtScatter(struct Sprite *sprite)
|
||||
{
|
||||
u8 targetXPos, targetYPos;
|
||||
s16 xOffset, yOffset;
|
||||
|
||||
InitAnimSpritePos(sprite, 1);
|
||||
|
||||
targetXPos = GetBattlerSpriteCoord2(gBattleAnimTarget, 2);
|
||||
targetYPos = GetBattlerSpriteCoord2(gBattleAnimTarget, 3);
|
||||
|
||||
xOffset = Random2() & 0x1F;
|
||||
yOffset = Random2() & 0x1F;
|
||||
if (xOffset > 16)
|
||||
xOffset = 16 - xOffset;
|
||||
if (yOffset > 16)
|
||||
yOffset = 16 - yOffset;
|
||||
|
||||
sprite->data[0] = gBattleAnimArgs[2];
|
||||
sprite->data[2] = targetXPos + xOffset;
|
||||
sprite->data[4] = targetYPos + yOffset;
|
||||
sprite->callback = StartAnimLinearTranslation;
|
||||
StoreSpriteCallbackInData6(sprite, move_anim_8074EE0);
|
||||
}
|
||||
|
||||
// Moves a particle of dirt in the Mud Sport animation.
|
||||
// The dirt can either be rising upward, or falling down.
|
||||
// arg 0: 0 = dirt is rising into the air, 1 = dirt is falling down
|
||||
// arg 1: initial x pixel offset
|
||||
// arg 2: initial y pixel offset
|
||||
void AnimMudSportDirt(struct Sprite *sprite)
|
||||
{
|
||||
sprite->oam.tileNum++;
|
||||
if (gBattleAnimArgs[0] == 0)
|
||||
{
|
||||
sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimAttacker, 2) + gBattleAnimArgs[1];
|
||||
sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimAttacker, 3) + gBattleAnimArgs[2];
|
||||
sprite->data[0] = gBattleAnimArgs[1] > 0 ? 1 : -1;
|
||||
sprite->callback = AnimMudSportDirtRising;
|
||||
}
|
||||
else
|
||||
{
|
||||
sprite->pos1.x = gBattleAnimArgs[1];
|
||||
sprite->pos1.y = gBattleAnimArgs[2];
|
||||
sprite->pos2.y = -gBattleAnimArgs[2];
|
||||
sprite->callback = AnimMudSportDirtFalling;
|
||||
}
|
||||
}
|
||||
|
||||
static void AnimMudSportDirtRising(struct Sprite *sprite)
|
||||
{
|
||||
if (++sprite->data[1] > 1)
|
||||
{
|
||||
sprite->data[1] = 0;
|
||||
sprite->pos1.x += sprite->data[0];
|
||||
}
|
||||
|
||||
sprite->pos1.y -= 4;
|
||||
if (sprite->pos1.y < -4)
|
||||
DestroyAnimSprite(sprite);
|
||||
}
|
||||
|
||||
static void AnimMudSportDirtFalling(struct Sprite *sprite)
|
||||
{
|
||||
switch (sprite->data[0])
|
||||
{
|
||||
case 0:
|
||||
sprite->pos2.y += 4;
|
||||
if (sprite->pos2.y >= 0)
|
||||
{
|
||||
sprite->pos2.y = 0;
|
||||
sprite->data[0]++;
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (++sprite->data[1] > 0)
|
||||
{
|
||||
sprite->data[1] = 0;
|
||||
sprite->invisible ^= 1;
|
||||
if (++sprite->data[2] == 10)
|
||||
DestroyAnimSprite(sprite);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_8114CBC(u8 taskId)
|
||||
{
|
||||
struct Task *task = &gTasks[taskId];
|
||||
|
||||
if (gBattleAnimArgs[0] == 0)
|
||||
task->func = sub_8114CFC;
|
||||
else
|
||||
task->func = sub_8114EB4;
|
||||
|
||||
task->func(taskId);
|
||||
}
|
||||
|
||||
static void sub_8114CFC(u8 taskId)
|
||||
{
|
||||
u8 var0;
|
||||
struct Task *task = &gTasks[taskId];
|
||||
|
||||
switch (task->data[0])
|
||||
{
|
||||
case 0:
|
||||
task->data[10] = GetAnimBattlerSpriteId(0);
|
||||
task->data[11] = sub_80A8364(gBattleAnimAttacker);
|
||||
if (task->data[11] == 1)
|
||||
{
|
||||
task->data[12] = gBattle_BG1_X;
|
||||
task->data[13] = gBattle_BG1_Y;
|
||||
}
|
||||
else
|
||||
{
|
||||
task->data[12] = gBattle_BG2_X;
|
||||
task->data[13] = gBattle_BG2_Y;
|
||||
}
|
||||
|
||||
var0 = GetBattlerYCoordWithElevation(gBattleAnimAttacker);
|
||||
task->data[14] = var0 - 32;
|
||||
task->data[15] = var0 + 32;
|
||||
if (task->data[14] < 0)
|
||||
task->data[14] = 0;
|
||||
|
||||
gSprites[task->data[10]].invisible = 1;
|
||||
task->data[0]++;
|
||||
break;
|
||||
case 1:
|
||||
sub_81150E0(task->data[11], task->data[14], task->data[15]);
|
||||
task->data[0]++;
|
||||
break;
|
||||
case 2:
|
||||
task->data[2] = (task->data[2] + 6) & 0x7F;
|
||||
if (++task->data[4] > 2)
|
||||
{
|
||||
task->data[4] = 0;
|
||||
task->data[3]++;
|
||||
}
|
||||
|
||||
task->data[5] = task->data[3] + (gSineTable[task->data[2]] >> 4);
|
||||
if (task->data[11] == 1)
|
||||
gBattle_BG1_Y = task->data[13] - task->data[5];
|
||||
else
|
||||
gBattle_BG2_Y = task->data[13] - task->data[5];
|
||||
|
||||
if (task->data[5] > 63)
|
||||
{
|
||||
task->data[5] = 120 - task->data[14];
|
||||
if (task->data[11] == 1)
|
||||
gBattle_BG1_Y = task->data[13] - task->data[5];
|
||||
else
|
||||
gBattle_BG2_Y = task->data[13] - task->data[5];
|
||||
|
||||
gSprites[task->data[10]].pos2.x = 272 - gSprites[task->data[10]].pos1.x;
|
||||
task->data[0]++;
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
gScanlineEffect.state = 3;
|
||||
task->data[0]++;
|
||||
break;
|
||||
case 4:
|
||||
DestroyAnimVisualTask(taskId);
|
||||
gSprites[task->data[10]].invisible = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void sub_8114EB4(u8 taskId)
|
||||
{
|
||||
u8 spriteId = GetAnimBattlerSpriteId(0);
|
||||
gSprites[spriteId].invisible = 1;
|
||||
gSprites[spriteId].pos2.x = 0;
|
||||
gSprites[spriteId].pos2.y = 0;
|
||||
|
||||
if (sub_80A8364(gBattleAnimAttacker) == 1)
|
||||
gBattle_BG1_Y = 0;
|
||||
else
|
||||
gBattle_BG2_Y = 0;
|
||||
|
||||
DestroyAnimVisualTask(taskId);
|
||||
}
|
||||
|
||||
void sub_8114F14(u8 taskId)
|
||||
{
|
||||
struct Task *task = &gTasks[taskId];
|
||||
|
||||
if (gBattleAnimArgs[0] == 0)
|
||||
task->func = sub_8114F54;
|
||||
else
|
||||
task->func = sub_8114FD8;
|
||||
|
||||
task->func(taskId);
|
||||
}
|
||||
|
||||
static void sub_8114F54(u8 taskId)
|
||||
{
|
||||
struct Task *task = &gTasks[taskId];
|
||||
|
||||
switch (task->data[0])
|
||||
{
|
||||
case 0:
|
||||
task->data[10] = GetAnimBattlerSpriteId(0);
|
||||
gSprites[task->data[10]].invisible = 0;
|
||||
gSprites[task->data[10]].pos2.x = 0;
|
||||
gSprites[task->data[10]].pos2.y = 160 - gSprites[task->data[10]].pos1.y;
|
||||
task->data[0]++;
|
||||
break;
|
||||
case 1:
|
||||
DestroyAnimVisualTask(taskId);
|
||||
}
|
||||
}
|
||||
|
||||
static void sub_8114FD8(u8 taskId)
|
||||
{
|
||||
u8 var0;
|
||||
struct Task *task = &gTasks[taskId];
|
||||
|
||||
switch (task->data[0])
|
||||
{
|
||||
case 0:
|
||||
task->data[10] = GetAnimBattlerSpriteId(0);
|
||||
task->data[11] = sub_80A8364(gBattleAnimAttacker);
|
||||
if (task->data[11] == 1)
|
||||
task->data[12] = gBattle_BG1_X;
|
||||
else
|
||||
task->data[12] = gBattle_BG2_X;
|
||||
|
||||
var0 = GetBattlerYCoordWithElevation(gBattleAnimAttacker);
|
||||
task->data[14] = var0 - 32;
|
||||
task->data[15] = var0 + 32;
|
||||
task->data[0]++;
|
||||
break;
|
||||
case 1:
|
||||
sub_81150E0(task->data[11], 0, task->data[15]);
|
||||
task->data[0]++;
|
||||
break;
|
||||
case 2:
|
||||
gSprites[task->data[10]].pos2.y = 96;
|
||||
task->data[0]++;
|
||||
break;
|
||||
case 3:
|
||||
gSprites[task->data[10]].pos2.y -= 8;
|
||||
if (gSprites[task->data[10]].pos2.y == 0)
|
||||
{
|
||||
gScanlineEffect.state = 3;
|
||||
task->data[0]++;
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
DestroyAnimVisualTask(taskId);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void sub_81150E0(u8 useBG1, s16 y, s16 endY)
|
||||
{
|
||||
s16 bgX;
|
||||
struct ScanlineEffectParams scanlineParams;
|
||||
|
||||
if (useBG1 == 1)
|
||||
{
|
||||
bgX = gBattle_BG1_X;
|
||||
scanlineParams.dmaDest = ®_BG1HOFS;
|
||||
}
|
||||
else
|
||||
{
|
||||
bgX = gBattle_BG2_X;
|
||||
scanlineParams.dmaDest = ®_BG2HOFS;
|
||||
}
|
||||
|
||||
if (y < 0)
|
||||
y = 0;
|
||||
|
||||
while (y < endY)
|
||||
{
|
||||
gScanlineEffectRegBuffers[0][y] = bgX;
|
||||
gScanlineEffectRegBuffers[1][y] = bgX;
|
||||
y++;
|
||||
}
|
||||
|
||||
while (y < 160)
|
||||
{
|
||||
gScanlineEffectRegBuffers[0][y] = bgX + 240;
|
||||
gScanlineEffectRegBuffers[1][y] = bgX + 240;
|
||||
y++;
|
||||
}
|
||||
|
||||
scanlineParams.dmaControl = SCANLINE_EFFECT_DMACNT_16BIT;
|
||||
scanlineParams.initState = 1;
|
||||
scanlineParams.unused9 = 0;
|
||||
ScanlineEffect_SetParams(scanlineParams);
|
||||
}
|
||||
|
||||
// Moves a particle of dirt in a plume of dirt. Used in Fissure and Dig.
|
||||
// arg 0: which mon (0 = attacker, 1 = target)
|
||||
// arg 1: which side of mon (0 = left, 1 = right)
|
||||
// arg 2: target x offset
|
||||
// arg 3: target y offset
|
||||
// arg 4: wave amplitude
|
||||
// arg 5: duration
|
||||
void AnimFissureDirtPlumeParticle(struct Sprite *sprite)
|
||||
{
|
||||
s8 battler;
|
||||
s16 xOffset;
|
||||
|
||||
if (gBattleAnimArgs[0] == 0)
|
||||
battler = gBattleAnimAttacker;
|
||||
else
|
||||
battler = gBattleAnimTarget;
|
||||
|
||||
xOffset = 24;
|
||||
if (gBattleAnimArgs[1] == 1)
|
||||
{
|
||||
xOffset *= -1;
|
||||
gBattleAnimArgs[2] *= -1;
|
||||
}
|
||||
|
||||
sprite->pos1.x = GetBattlerSpriteCoord(battler, 2) + xOffset;
|
||||
sprite->pos1.y = GetBattlerYCoordWithElevation(battler) + 30;
|
||||
sprite->data[0] = gBattleAnimArgs[5];
|
||||
sprite->data[2] = sprite->pos1.x + gBattleAnimArgs[2];
|
||||
sprite->data[4] = sprite->pos1.y + gBattleAnimArgs[3];
|
||||
sprite->data[5] = gBattleAnimArgs[4];
|
||||
InitAnimArcTranslation(sprite);
|
||||
sprite->callback = AnimFissureDirtPlumeParticleStep;
|
||||
}
|
||||
|
||||
static void AnimFissureDirtPlumeParticleStep(struct Sprite *sprite)
|
||||
{
|
||||
if (TranslateAnimArc(sprite))
|
||||
DestroyAnimSprite(sprite);
|
||||
}
|
||||
|
||||
// Displays the dirt mound seen in the move Dig for set duration.
|
||||
// The dirt mound image is too large for a single sprite, so two
|
||||
// sprites are lined up next to each other.
|
||||
// arg 0: which mon (0 = attacker, 1 = target)
|
||||
// arg 1: oam tile num (0 = left half of image, 1 = right half of image)
|
||||
// arg 2: duration
|
||||
void AnimDigDirtMound(struct Sprite *sprite)
|
||||
{
|
||||
s8 battler;
|
||||
|
||||
if (gBattleAnimArgs[0] == 0)
|
||||
battler = gBattleAnimAttacker;
|
||||
else
|
||||
battler = gBattleAnimTarget;
|
||||
|
||||
sprite->pos1.x = GetBattlerSpriteCoord(battler, 0) - 16 + (gBattleAnimArgs[1] * 32);
|
||||
sprite->pos1.y = GetBattlerYCoordWithElevation(battler) + 32;
|
||||
sprite->oam.tileNum += gBattleAnimArgs[1] * 8;
|
||||
StoreSpriteCallbackInData6(sprite, DestroyAnimSprite);
|
||||
sprite->data[0] = gBattleAnimArgs[2];
|
||||
sprite->callback = WaitAnimForDuration;
|
||||
}
|
||||
|
||||
void sub_81152DC(u8 taskId)
|
||||
{
|
||||
u16 i;
|
||||
struct Task *task = &gTasks[taskId];
|
||||
|
||||
if (gBattleAnimArgs[1])
|
||||
task->data[14] = task->data[15] = gBattleAnimArgs[1] + 3;
|
||||
else
|
||||
task->data[14] = task->data[15] = (gAnimMovePower / 10) + 3;
|
||||
|
||||
task->data[3] = gBattleAnimArgs[2];
|
||||
switch (gBattleAnimArgs[0])
|
||||
{
|
||||
case 5:
|
||||
task->data[13] = gBattle_BG3_X;
|
||||
task->func = sub_81153AC;
|
||||
break;
|
||||
case 4:
|
||||
task->data[13] = 0;
|
||||
for (i = 0; i < MAX_BATTLERS_COUNT; i++)
|
||||
{
|
||||
if (IsBattlerSpriteVisible(i))
|
||||
{
|
||||
task->data[task->data[13] + 9] = gBattlerSpriteIds[i];
|
||||
task->data[13]++;
|
||||
}
|
||||
}
|
||||
task->func = sub_81154A4;
|
||||
break;
|
||||
default:
|
||||
task->data[9] = GetAnimBattlerSpriteId(gBattleAnimArgs[0]);
|
||||
if (task->data[9] == 0xFF)
|
||||
{
|
||||
DestroyAnimVisualTask(taskId);
|
||||
}
|
||||
else
|
||||
{
|
||||
task->data[13] = 1;
|
||||
task->func = sub_81154A4;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void sub_81153AC(u8 taskId)
|
||||
{
|
||||
struct Task *task = &gTasks[taskId];
|
||||
|
||||
switch (task->data[0])
|
||||
{
|
||||
case 0:
|
||||
if (++task->data[1] > 1)
|
||||
{
|
||||
task->data[1] = 0;
|
||||
if ((task->data[2] & 1) == 0)
|
||||
gBattle_BG3_X = task->data[13] + task->data[15];
|
||||
else
|
||||
gBattle_BG3_X = task->data[13] - task->data[15];
|
||||
|
||||
if (++task->data[2] == task->data[3])
|
||||
{
|
||||
task->data[2] = 0;
|
||||
task->data[14]--;
|
||||
task->data[0]++;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (++task->data[1] > 1)
|
||||
{
|
||||
task->data[1] = 0;
|
||||
if ((task->data[2] & 1) == 0)
|
||||
gBattle_BG3_X = task->data[13] + task->data[14];
|
||||
else
|
||||
gBattle_BG3_X = task->data[13] - task->data[14];
|
||||
|
||||
if (++task->data[2] == 4)
|
||||
{
|
||||
task->data[2] = 0;
|
||||
if (--task->data[14] == 0)
|
||||
task->data[0]++;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
gBattle_BG3_X = task->data[13];
|
||||
DestroyAnimVisualTask(taskId);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void sub_81154A4(u8 taskId)
|
||||
{
|
||||
u16 i;
|
||||
struct Task *task = &gTasks[taskId];
|
||||
|
||||
switch (task->data[0])
|
||||
{
|
||||
case 0:
|
||||
if (++task->data[1] > 1)
|
||||
{
|
||||
task->data[1] = 0;
|
||||
sub_8115588(task);
|
||||
if (++task->data[2] == task->data[3])
|
||||
{
|
||||
task->data[2] = 0;
|
||||
task->data[14]--;
|
||||
task->data[0]++;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (++task->data[1] > 1)
|
||||
{
|
||||
task->data[1] = 0;
|
||||
sub_8115588(task);
|
||||
if (++task->data[2] == 4)
|
||||
{
|
||||
task->data[2] = 0;
|
||||
if (--task->data[14] == 0)
|
||||
task->data[0]++;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
for (i = 0; i < task->data[13]; i++)
|
||||
gSprites[task->data[9 + i]].pos2.x = 0;
|
||||
|
||||
DestroyAnimVisualTask(taskId);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void sub_8115588(struct Task *task)
|
||||
{
|
||||
u16 i;
|
||||
u16 xOffset;
|
||||
|
||||
if ((task->data[2] & 1) == 0)
|
||||
xOffset = (task->data[14] / 2) + (task->data[14] & 1);
|
||||
else
|
||||
xOffset = -(task->data[14] / 2);
|
||||
|
||||
for (i = 0; i < task->data[13]; i++)
|
||||
{
|
||||
gSprites[task->data[9 + i]].pos2.x = xOffset;
|
||||
}
|
||||
}
|
||||
|
||||
void AnimTask_IsPowerOver99(u8 taskId)
|
||||
{
|
||||
gBattleAnimArgs[15] = gAnimMovePower > 99;
|
||||
DestroyAnimVisualTask(taskId);
|
||||
}
|
||||
|
||||
void sub_8115628(u8 taskId)
|
||||
{
|
||||
struct Task *newTask;
|
||||
u8 battler = (gBattleAnimArgs[0] & 1) ? gBattleAnimTarget : gBattleAnimAttacker;
|
||||
|
||||
if (gBattleAnimArgs[0] > 1)
|
||||
battler ^= 2;
|
||||
|
||||
newTask = &gTasks[CreateTask(sub_81156D0, gBattleAnimArgs[1])];
|
||||
newTask->data[1] = (32 - GetBattlerSpriteCoord(battler, 2)) & 0x1FF;
|
||||
newTask->data[2] = (64 - GetBattlerSpriteCoord(battler, 3)) & 0xFF;
|
||||
gBattle_BG3_X = newTask->data[1];
|
||||
gBattle_BG3_Y = newTask->data[2];
|
||||
newTask->data[3] = gBattleAnimArgs[2];
|
||||
DestroyAnimVisualTask(taskId);
|
||||
}
|
||||
|
||||
static void sub_81156D0(u8 taskId)
|
||||
{
|
||||
struct Task *task = &gTasks[taskId];
|
||||
|
||||
if (gBattleAnimArgs[7] == task->data[3])
|
||||
{
|
||||
gBattle_BG3_X = 0;
|
||||
gBattle_BG3_Y = 0;
|
||||
DestroyTask(taskId);
|
||||
}
|
||||
else
|
||||
{
|
||||
gBattle_BG3_X = task->data[1];
|
||||
gBattle_BG3_Y = task->data[2];
|
||||
}
|
||||
}
|
||||
|
||||
+19
-18
@@ -31,6 +31,7 @@
|
||||
#include "trainer_pokemon_sprites.h"
|
||||
#include "data2.h"
|
||||
#include "rom_81520A8.h"
|
||||
#include "constants/rgb.h"
|
||||
|
||||
struct HallofFameMon
|
||||
{
|
||||
@@ -388,7 +389,7 @@ static bool8 InitHallOfFameScreen(void)
|
||||
if (!sub_8175024())
|
||||
{
|
||||
SetVBlankCallback(VBlankCB_HallOfFame);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, 0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, RGB_BLACK);
|
||||
gMain.state++;
|
||||
}
|
||||
break;
|
||||
@@ -438,7 +439,7 @@ static void Task_Hof_InitMonData(u8 taskId)
|
||||
|
||||
gTasks[taskId].tMonNumber = 0; // valid pokes
|
||||
|
||||
for (i = 0; i < 6; i++)
|
||||
for (i = 0; i < PARTY_SIZE; i++)
|
||||
{
|
||||
u8 nick[POKEMON_NAME_LENGTH + 2];
|
||||
if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES))
|
||||
@@ -468,7 +469,7 @@ static void Task_Hof_InitMonData(u8 taskId)
|
||||
gTasks[taskId].tDisplayedMonId = 0;
|
||||
gTasks[taskId].tPlayerSpriteID = 0xFF;
|
||||
|
||||
for (i = 0; i < 6; i++)
|
||||
for (i = 0; i < PARTY_SIZE; i++)
|
||||
{
|
||||
gTasks[taskId].tMonSpriteId(i) = 0xFF;
|
||||
}
|
||||
@@ -521,7 +522,7 @@ static void Task_Hof_InitTeamSaveData(u8 taskId)
|
||||
static void Task_Hof_TrySaveData(u8 taskId)
|
||||
{
|
||||
gGameContinueCallback = CB2_DoHallOfFameScreenDontSaveData;
|
||||
if (TrySavingData(3) == 0xFF && gDamagedSaveSectors != 0)
|
||||
if (TrySavingData(SAVE_HALL_OF_FAME) == 0xFF && gDamagedSaveSectors != 0)
|
||||
{
|
||||
UnsetBgTilemapBuffer(1);
|
||||
UnsetBgTilemapBuffer(3);
|
||||
@@ -626,7 +627,7 @@ static void Task_Hof_TryDisplayAnotherMon(u8 taskId)
|
||||
if (gTasks[taskId].tDisplayedMonId <= 4 && currMon[1].species != SPECIES_NONE) // there is another pokemon to display
|
||||
{
|
||||
gTasks[taskId].tDisplayedMonId++;
|
||||
BeginNormalPaletteFade(sUnknown_0203BCD4, 0, 12, 12, 0x63B0);
|
||||
BeginNormalPaletteFade(sUnknown_0203BCD4, 0, 12, 12, RGB(16, 29, 24));
|
||||
gSprites[gTasks[taskId].tMonSpriteId(currPokeID)].oam.priority = 1;
|
||||
gTasks[taskId].func = Task_Hof_DisplayMon;
|
||||
}
|
||||
@@ -641,8 +642,8 @@ static void Task_Hof_PaletteFadeAndPrintWelcomeText(u8 taskId)
|
||||
{
|
||||
u16 i;
|
||||
|
||||
BeginNormalPaletteFade(0xFFFF0000, 0, 0, 0, 0);
|
||||
for (i = 0; i < 6; i++)
|
||||
BeginNormalPaletteFade(0xFFFF0000, 0, 0, 0, RGB_BLACK);
|
||||
for (i = 0; i < PARTY_SIZE; i++)
|
||||
{
|
||||
if (gTasks[taskId].tMonSpriteId(i) != 0xFF)
|
||||
gSprites[gTasks[taskId].tMonSpriteId(i)].oam.priority = 0;
|
||||
@@ -665,12 +666,12 @@ static void sub_8173DC0(u8 taskId)
|
||||
else
|
||||
{
|
||||
u16 i;
|
||||
for (i = 0; i < 6; i++)
|
||||
for (i = 0; i < PARTY_SIZE; i++)
|
||||
{
|
||||
if (gTasks[taskId].tMonSpriteId(i) != 0xFF)
|
||||
gSprites[gTasks[taskId].tMonSpriteId(i)].oam.priority = 1;
|
||||
}
|
||||
BeginNormalPaletteFade(sUnknown_0203BCD4, 0, 12, 12, 0x63B0);
|
||||
BeginNormalPaletteFade(sUnknown_0203BCD4, 0, 12, 12, RGB(16, 29, 24));
|
||||
FillWindowPixelBuffer(0, 0);
|
||||
CopyWindowToVram(0, 3);
|
||||
gTasks[taskId].tFrameCount = 7;
|
||||
@@ -738,7 +739,7 @@ static void Task_Hof_ExitOnKeyPressed(u8 taskId)
|
||||
static void Task_Hof_HandlePaletteOnExit(u8 taskId)
|
||||
{
|
||||
CpuCopy16(gPlttBufferFaded, gPlttBufferUnfaded, 0x400);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 8, 0, 0x10, 0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 8, 0, 0x10, RGB_BLACK);
|
||||
gTasks[taskId].func = Task_Hof_HandleExit;
|
||||
}
|
||||
|
||||
@@ -748,7 +749,7 @@ static void Task_Hof_HandleExit(u8 taskId)
|
||||
{
|
||||
s32 i;
|
||||
|
||||
for (i = 0; i < 6; i++)
|
||||
for (i = 0; i < PARTY_SIZE; i++)
|
||||
{
|
||||
u8 spriteId = gTasks[taskId].tMonSpriteId(i);
|
||||
if (spriteId != 0xFF)
|
||||
@@ -844,7 +845,7 @@ void CB2_DoHallOfFamePC(void)
|
||||
SetGpuReg(REG_OFFSET_BLDY, 0);
|
||||
taskId = CreateTask(Task_HofPC_CopySaveData, 0);
|
||||
|
||||
for (i = 0; i < 6; i++)
|
||||
for (i = 0; i < PARTY_SIZE; i++)
|
||||
{
|
||||
gTasks[taskId].tMonSpriteId(i) = 0xFF;
|
||||
}
|
||||
@@ -901,7 +902,7 @@ static void Task_HofPC_DrawSpritesPrintText(u8 taskId)
|
||||
gTasks[taskId].tCurrMonId = 0;
|
||||
gTasks[taskId].tMonNo = 0;
|
||||
|
||||
for (i = 0; i < 6; i++, currMon++)
|
||||
for (i = 0; i < PARTY_SIZE; i++, currMon++)
|
||||
{
|
||||
if (currMon->species != 0)
|
||||
gTasks[taskId].tMonNo++;
|
||||
@@ -909,7 +910,7 @@ static void Task_HofPC_DrawSpritesPrintText(u8 taskId)
|
||||
|
||||
currMon = &savedTeams->mon[0];
|
||||
|
||||
for (i = 0; i < 6; i++, currMon++)
|
||||
for (i = 0; i < PARTY_SIZE; i++, currMon++)
|
||||
{
|
||||
if (currMon->species != 0)
|
||||
{
|
||||
@@ -940,7 +941,7 @@ static void Task_HofPC_DrawSpritesPrintText(u8 taskId)
|
||||
}
|
||||
}
|
||||
|
||||
BlendPalettes(0xFFFF0000, 0xC, 0x63B0);
|
||||
BlendPalettes(0xFFFF0000, 0xC, RGB(16, 29, 24));
|
||||
|
||||
ConvertIntToDecimalStringN(gStringVar1, gTasks[taskId].tCurrPageNo, STR_CONV_MODE_RIGHT_ALIGN, 3);
|
||||
StringExpandPlaceholders(gStringVar4, gText_HOFNumber);
|
||||
@@ -963,7 +964,7 @@ static void Task_HofPC_PrintMonInfo(u8 taskId)
|
||||
for (i = 0; i < gTasks[taskId].tCurrTeamNo; i++)
|
||||
savedTeams++;
|
||||
|
||||
for (i = 0; i < 6; i++)
|
||||
for (i = 0; i < PARTY_SIZE; i++)
|
||||
{
|
||||
u16 spriteId = gTasks[taskId].tMonSpriteId(i);
|
||||
if (spriteId != 0xFF)
|
||||
@@ -973,7 +974,7 @@ static void Task_HofPC_PrintMonInfo(u8 taskId)
|
||||
currMonID = gTasks[taskId].tMonSpriteId(gTasks[taskId].tCurrMonId);
|
||||
gSprites[currMonID].oam.priority = 0;
|
||||
sUnknown_0203BCD4 = (0x10000 << gSprites[currMonID].oam.paletteNum) ^ 0xFFFF0000;
|
||||
BlendPalettesUnfaded(sUnknown_0203BCD4, 0xC, 0x63B0);
|
||||
BlendPalettesUnfaded(sUnknown_0203BCD4, 0xC, RGB(16, 29, 24));
|
||||
|
||||
currMon = &savedTeams->mon[gTasks[taskId].tCurrMonId];
|
||||
if (currMon->species != SPECIES_EGG)
|
||||
@@ -1056,7 +1057,7 @@ static void Task_HofPC_HandleExit(u8 taskId)
|
||||
{
|
||||
u8 i;
|
||||
|
||||
for (i = 0; i < 6; i++)
|
||||
for (i = 0; i < PARTY_SIZE; i++)
|
||||
{
|
||||
u16 spriteId = gTasks[taskId].tMonSpriteId(i);
|
||||
if (spriteId != 0xFF)
|
||||
|
||||
+1
-1
@@ -10,9 +10,9 @@
|
||||
#include "item_menu.h"
|
||||
#include "strings.h"
|
||||
#include "load_save.h"
|
||||
#include "battle_pyramid.h"
|
||||
#include "battle_pyramid_bag.h"
|
||||
|
||||
extern bool8 InBattlePyramid(void);
|
||||
extern u16 gUnknown_0203CF30[];
|
||||
extern const struct Item gItems[];
|
||||
|
||||
|
||||
+5
-4
@@ -6,14 +6,15 @@
|
||||
#include "random.h"
|
||||
#include "malloc.h"
|
||||
#include "item.h"
|
||||
#include "overworld.h"
|
||||
#include "decoration_inventory.h"
|
||||
|
||||
static void ApplyNewEncryptionKeyToAllEncryptedData(u32 encryptionKey);
|
||||
|
||||
extern void* gUnknown_0203CF5C;
|
||||
|
||||
extern bool16 IdentifyFlash(void);
|
||||
extern void SetDecorationInventoriesPointers(void);
|
||||
extern void ApplyNewEncryptionKeyToGameStats(u32 key);
|
||||
extern void ApplyNewEncryptionKeyToBerryPowder(u32 key);
|
||||
extern void sub_8084FAC(int unused);
|
||||
|
||||
#define SAVEBLOCK_MOVE_RANGE 128
|
||||
|
||||
@@ -286,7 +287,7 @@ void ApplyNewEncryptionKeyToWord(u32 *word, u32 newKey)
|
||||
*word ^= newKey;
|
||||
}
|
||||
|
||||
void ApplyNewEncryptionKeyToAllEncryptedData(u32 encryptionKey)
|
||||
static void ApplyNewEncryptionKeyToAllEncryptedData(u32 encryptionKey)
|
||||
{
|
||||
ApplyNewEncryptionKeyToGameStats(encryptionKey);
|
||||
ApplyNewEncryptionKeyToBagItems_(encryptionKey);
|
||||
|
||||
+10
-12
@@ -7,6 +7,7 @@
|
||||
#include "constants/species.h"
|
||||
#include "string_util.h"
|
||||
#include "text.h"
|
||||
#include "pokemon_storage_system.h"
|
||||
|
||||
static EWRAM_DATA u16 sWinNumberDigit = 0;
|
||||
static EWRAM_DATA u16 sOtIdDigit = 0;
|
||||
@@ -55,23 +56,22 @@ void PickLotteryCornerTicket(void)
|
||||
gSpecialVar_0x8004 = 0;
|
||||
slot = 0;
|
||||
box = 0;
|
||||
for (i = 0; i < 6; i++)
|
||||
for (i = 0; i < PARTY_SIZE; i++)
|
||||
{
|
||||
struct Pokemon *pkmn = &gPlayerParty[i];
|
||||
struct Pokemon *mon = &gPlayerParty[i];
|
||||
|
||||
// UB: Too few arguments for function GetMonData
|
||||
if (GetMonData(pkmn, MON_DATA_SPECIES) != SPECIES_NONE)
|
||||
if (GetMonData(mon, MON_DATA_SPECIES) != SPECIES_NONE)
|
||||
{
|
||||
// do not calculate ticket values for eggs.
|
||||
if (!GetMonData(pkmn, MON_DATA_IS_EGG))
|
||||
if (!GetMonData(mon, MON_DATA_IS_EGG))
|
||||
{
|
||||
u32 otId = GetMonData(pkmn, MON_DATA_OT_ID);
|
||||
u32 otId = GetMonData(mon, MON_DATA_OT_ID);
|
||||
u8 numMatchingDigits = GetMatchingDigits(gSpecialVar_Result, otId);
|
||||
|
||||
if (numMatchingDigits > gSpecialVar_0x8004 && numMatchingDigits > 1)
|
||||
{
|
||||
gSpecialVar_0x8004 = numMatchingDigits - 1;
|
||||
box = 14;
|
||||
box = TOTAL_BOXES_COUNT;
|
||||
slot = i;
|
||||
}
|
||||
}
|
||||
@@ -80,11 +80,9 @@ void PickLotteryCornerTicket(void)
|
||||
break;
|
||||
}
|
||||
|
||||
// player has 14 boxes.
|
||||
for (i = 0; i < 14; i++)
|
||||
for (i = 0; i < TOTAL_BOXES_COUNT; i++)
|
||||
{
|
||||
// player has 30 slots per box.
|
||||
for (j = 0; j < 30; j++)
|
||||
for (j = 0; j < IN_BOX_COUNT; j++)
|
||||
{
|
||||
if (GetBoxMonData(&gPokemonStoragePtr->boxes[i][j], MON_DATA_SPECIES) != SPECIES_NONE &&
|
||||
!GetBoxMonData(&gPokemonStoragePtr->boxes[i][j], MON_DATA_IS_EGG))
|
||||
@@ -106,7 +104,7 @@ void PickLotteryCornerTicket(void)
|
||||
{
|
||||
gSpecialVar_0x8005 = sLotteryPrizes[gSpecialVar_0x8004 - 1];
|
||||
|
||||
if (box == 14)
|
||||
if (box == TOTAL_BOXES_COUNT)
|
||||
{
|
||||
gSpecialVar_0x8006 = 0;
|
||||
GetMonData(&gPlayerParty[slot], MON_DATA_NICKNAME, gStringVar1);
|
||||
|
||||
+30
-204
@@ -15,7 +15,6 @@
|
||||
#include "task.h"
|
||||
#include "text.h"
|
||||
|
||||
|
||||
// enums
|
||||
enum MapPopUp_Themes
|
||||
{
|
||||
@@ -33,7 +32,7 @@ static void ShowMapNamePopUpWindow(void);
|
||||
static void LoadMapNamePopUpWindowBg(void);
|
||||
|
||||
// EWRAM
|
||||
static EWRAM_DATA u8 mapNamePopupTaskId = 0;
|
||||
static EWRAM_DATA u8 sPopupTaskId = 0;
|
||||
|
||||
// .rodata
|
||||
static const u8 gMapPopUp_Table[][960] =
|
||||
@@ -202,7 +201,7 @@ bool8 sub_80D47D4(void)
|
||||
{
|
||||
HideStartMenu();
|
||||
ShowMapNamePopup();
|
||||
return 1;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void ShowMapNamePopup(void)
|
||||
@@ -211,16 +210,16 @@ void ShowMapNamePopup(void)
|
||||
{
|
||||
if (!FuncIsActiveTask(Task_MapNamePopUpWindow))
|
||||
{
|
||||
mapNamePopupTaskId = CreateTask(Task_MapNamePopUpWindow, 90);
|
||||
sPopupTaskId = CreateTask(Task_MapNamePopUpWindow, 90);
|
||||
SetGpuReg(REG_OFFSET_BG0VOFS, 40);
|
||||
gTasks[mapNamePopupTaskId].data[0] = 6;
|
||||
gTasks[mapNamePopupTaskId].data[2] = 40;
|
||||
gTasks[sPopupTaskId].data[0] = 6;
|
||||
gTasks[sPopupTaskId].data[2] = 40;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (gTasks[mapNamePopupTaskId].data[0] != 2)
|
||||
gTasks[mapNamePopupTaskId].data[0] = 2;
|
||||
gTasks[mapNamePopupTaskId].data[3] = 1;
|
||||
if (gTasks[sPopupTaskId].data[0] != 2)
|
||||
gTasks[sPopupTaskId].data[0] = 2;
|
||||
gTasks[sPopupTaskId].data[3] = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -246,7 +245,7 @@ static void Task_MapNamePopUpWindow(u8 taskId)
|
||||
{
|
||||
task->data[2] = 0;
|
||||
task->data[0] = 1;
|
||||
gTasks[mapNamePopupTaskId].data[1] = 0;
|
||||
gTasks[sPopupTaskId].data[1] = 0;
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
@@ -293,7 +292,7 @@ void HideMapNamePopUpWindow(void)
|
||||
sub_819746C(GetMapNamePopUpWindowId(), TRUE);
|
||||
RemoveMapNamePopUpWindow();
|
||||
SetGpuReg_ForcedBlank(REG_OFFSET_BG0VOFS, 0);
|
||||
DestroyTask(mapNamePopupTaskId);
|
||||
DestroyTask(sPopupTaskId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -304,9 +303,9 @@ static void ShowMapNamePopUpWindow(void)
|
||||
u8 x;
|
||||
const u8* mapDisplayHeaderSource;
|
||||
|
||||
if(InBattlePyramid())
|
||||
if (InBattlePyramid())
|
||||
{
|
||||
if(gMapHeader.mapLayoutId == 0x17A)
|
||||
if (gMapHeader.mapLayoutId == 0x17A)
|
||||
{
|
||||
withoutPrefixPtr = &(mapDisplayHeader[3]);
|
||||
mapDisplayHeaderSource = gBattlePyramid_MapHeaderStrings[7];
|
||||
@@ -333,220 +332,47 @@ static void ShowMapNamePopUpWindow(void)
|
||||
CopyWindowToVram(GetMapNamePopUpWindowId(), 3);
|
||||
}
|
||||
|
||||
#ifdef NONMATCHING
|
||||
static void sub_80D4A78(u8 bg, u8 x, u8 y, u8 deltaX, u8 deltaY, u8 unused)
|
||||
{
|
||||
s32 i;
|
||||
|
||||
for(i=0; i<=11; i++)
|
||||
for (i = 0; i < 12; i++)
|
||||
{
|
||||
FillBgTilemapBufferRect(bg, 0x21D + i, x + i - 1, y - 1, 1, 1, 0xE);
|
||||
FillBgTilemapBufferRect(bg, 0x21D + i, i - 1 + x, y - 1, 1, 1, 0xE);
|
||||
}
|
||||
FillBgTilemapBufferRect(bg, 0x229 + i, x - 1, y, 1, 1, 0xE);
|
||||
FillBgTilemapBufferRect(bg, 0x22A + i, deltaX + x, y, 1, 1, 0xE);
|
||||
FillBgTilemapBufferRect(bg, 0x22B + i, x - 1, y + 1 , 1, 1, 0xE);
|
||||
FillBgTilemapBufferRect(bg, 0x22C + i, deltaX + x, y + 1, 1, 1, 0xE);
|
||||
FillBgTilemapBufferRect(bg, 0x22D + i, x - 1, y + 2, 1, 1, 0xE);
|
||||
FillBgTilemapBufferRect(bg, 0x22E + i, deltaX + x, y + 2, 1, 1, 0xE);
|
||||
for(i=0; i<=11; i++)
|
||||
FillBgTilemapBufferRect(bg, 0x229, x - 1, y, 1, 1, 0xE);
|
||||
FillBgTilemapBufferRect(bg, 0x22A, deltaX + x, y, 1, 1, 0xE);
|
||||
FillBgTilemapBufferRect(bg, 0x22B, x - 1, y + 1 , 1, 1, 0xE);
|
||||
FillBgTilemapBufferRect(bg, 0x22C, deltaX + x, y + 1, 1, 1, 0xE);
|
||||
FillBgTilemapBufferRect(bg, 0x22D, x - 1, y + 2, 1, 1, 0xE);
|
||||
FillBgTilemapBufferRect(bg, 0x22E, deltaX + x, y + 2, 1, 1, 0xE);
|
||||
for (i = 0; i < 12; i++)
|
||||
{
|
||||
FillBgTilemapBufferRect(bg, 0x22F + i, x + i - 1, y + deltaY, 1, 1, 0xE);
|
||||
FillBgTilemapBufferRect(bg, 0x22F + i, i - 1 + x, y + deltaY, 1, 1, 0xE);
|
||||
}
|
||||
}
|
||||
#else
|
||||
NAKED
|
||||
static void sub_80D4A78(u8 bg, u8 x, u8 y, u8 deltaX, u8 deltaY, u8 unused)
|
||||
{
|
||||
asm("\n\
|
||||
.syntax unified\n\
|
||||
push {r4-r7,lr}\n\
|
||||
mov r7, r10\n\
|
||||
mov r6, r9\n\
|
||||
mov r5, r8\n\
|
||||
push {r5-r7}\n\
|
||||
sub sp, 0x1C\n\
|
||||
ldr r4, [sp, 0x3C]\n\
|
||||
lsls r0, 24\n\
|
||||
lsrs r7, r0, 24\n\
|
||||
lsls r1, 24\n\
|
||||
lsrs r1, 24\n\
|
||||
mov r10, r1\n\
|
||||
lsls r2, 24\n\
|
||||
lsls r3, 24\n\
|
||||
lsrs r3, 24\n\
|
||||
str r3, [sp, 0x10]\n\
|
||||
lsls r4, 24\n\
|
||||
lsrs r4, 24\n\
|
||||
str r4, [sp, 0x14]\n\
|
||||
movs r5, 0\n\
|
||||
lsls r0, r1, 24\n\
|
||||
asrs r1, r0, 24\n\
|
||||
lsrs r3, r2, 24\n\
|
||||
str r3, [sp, 0xC]\n\
|
||||
movs r6, 0xFF\n\
|
||||
lsls r6, 24\n\
|
||||
adds r6, r2\n\
|
||||
mov r8, r6\n\
|
||||
str r0, [sp, 0x18]\n\
|
||||
subs r4, r1, 0x1\n\
|
||||
_080D4AB4:\n\
|
||||
ldr r0, =0x0000021d\n\
|
||||
adds r1, r5, r0\n\
|
||||
lsls r1, 16\n\
|
||||
lsrs r1, 16\n\
|
||||
lsls r2, r4, 24\n\
|
||||
lsrs r2, 24\n\
|
||||
movs r3, 0x1\n\
|
||||
str r3, [sp]\n\
|
||||
str r3, [sp, 0x4]\n\
|
||||
movs r6, 0xE\n\
|
||||
mov r9, r6\n\
|
||||
str r6, [sp, 0x8]\n\
|
||||
adds r0, r7, 0\n\
|
||||
mov r6, r8\n\
|
||||
lsrs r3, r6, 24\n\
|
||||
bl FillBgTilemapBufferRect\n\
|
||||
adds r4, 0x1\n\
|
||||
adds r5, 0x1\n\
|
||||
cmp r5, 0xB\n\
|
||||
ble _080D4AB4\n\
|
||||
ldr r1, =0x00000229\n\
|
||||
movs r0, 0x1\n\
|
||||
negs r0, r0\n\
|
||||
add r0, r10\n\
|
||||
lsls r0, 24\n\
|
||||
lsrs r0, 24\n\
|
||||
mov r8, r0\n\
|
||||
movs r5, 0x1\n\
|
||||
str r5, [sp]\n\
|
||||
str r5, [sp, 0x4]\n\
|
||||
mov r2, r9\n\
|
||||
str r2, [sp, 0x8]\n\
|
||||
adds r0, r7, 0\n\
|
||||
mov r2, r8\n\
|
||||
ldr r3, [sp, 0xC]\n\
|
||||
bl FillBgTilemapBufferRect\n\
|
||||
ldr r1, =0x0000022a\n\
|
||||
ldr r6, [sp, 0x10]\n\
|
||||
add r6, r10\n\
|
||||
lsls r6, 24\n\
|
||||
lsrs r6, 24\n\
|
||||
str r5, [sp]\n\
|
||||
str r5, [sp, 0x4]\n\
|
||||
mov r3, r9\n\
|
||||
str r3, [sp, 0x8]\n\
|
||||
adds r0, r7, 0\n\
|
||||
adds r2, r6, 0\n\
|
||||
ldr r3, [sp, 0xC]\n\
|
||||
bl FillBgTilemapBufferRect\n\
|
||||
ldr r1, =0x0000022b\n\
|
||||
ldr r4, [sp, 0xC]\n\
|
||||
adds r4, 0x1\n\
|
||||
lsls r4, 24\n\
|
||||
lsrs r4, 24\n\
|
||||
str r5, [sp]\n\
|
||||
str r5, [sp, 0x4]\n\
|
||||
mov r0, r9\n\
|
||||
str r0, [sp, 0x8]\n\
|
||||
adds r0, r7, 0\n\
|
||||
mov r2, r8\n\
|
||||
adds r3, r4, 0\n\
|
||||
bl FillBgTilemapBufferRect\n\
|
||||
movs r1, 0x8B\n\
|
||||
lsls r1, 2\n\
|
||||
str r5, [sp]\n\
|
||||
str r5, [sp, 0x4]\n\
|
||||
mov r2, r9\n\
|
||||
str r2, [sp, 0x8]\n\
|
||||
adds r0, r7, 0\n\
|
||||
adds r2, r6, 0\n\
|
||||
adds r3, r4, 0\n\
|
||||
bl FillBgTilemapBufferRect\n\
|
||||
ldr r1, =0x0000022d\n\
|
||||
ldr r4, [sp, 0xC]\n\
|
||||
adds r4, 0x2\n\
|
||||
lsls r4, 24\n\
|
||||
lsrs r4, 24\n\
|
||||
str r5, [sp]\n\
|
||||
str r5, [sp, 0x4]\n\
|
||||
mov r3, r9\n\
|
||||
str r3, [sp, 0x8]\n\
|
||||
adds r0, r7, 0\n\
|
||||
mov r2, r8\n\
|
||||
adds r3, r4, 0\n\
|
||||
bl FillBgTilemapBufferRect\n\
|
||||
ldr r1, =0x0000022e\n\
|
||||
str r5, [sp]\n\
|
||||
str r5, [sp, 0x4]\n\
|
||||
mov r0, r9\n\
|
||||
str r0, [sp, 0x8]\n\
|
||||
adds r0, r7, 0\n\
|
||||
adds r2, r6, 0\n\
|
||||
adds r3, r4, 0\n\
|
||||
bl FillBgTilemapBufferRect\n\
|
||||
movs r5, 0\n\
|
||||
ldr r1, [sp, 0xC]\n\
|
||||
ldr r2, [sp, 0x14]\n\
|
||||
adds r0, r1, r2\n\
|
||||
lsls r4, r0, 24\n\
|
||||
movs r6, 0x1\n\
|
||||
_080D4B8A:\n\
|
||||
ldr r3, =0x0000022f\n\
|
||||
adds r1, r5, r3\n\
|
||||
lsls r1, 16\n\
|
||||
lsrs r1, 16\n\
|
||||
subs r0, r5, 0x1\n\
|
||||
ldr r3, [sp, 0x18]\n\
|
||||
asrs r2, r3, 24\n\
|
||||
adds r2, r0\n\
|
||||
lsls r2, 24\n\
|
||||
lsrs r2, 24\n\
|
||||
str r6, [sp]\n\
|
||||
str r6, [sp, 0x4]\n\
|
||||
movs r0, 0xE\n\
|
||||
str r0, [sp, 0x8]\n\
|
||||
adds r0, r7, 0\n\
|
||||
lsrs r3, r4, 24\n\
|
||||
bl FillBgTilemapBufferRect\n\
|
||||
adds r5, 0x1\n\
|
||||
cmp r5, 0xB\n\
|
||||
ble _080D4B8A\n\
|
||||
add sp, 0x1C\n\
|
||||
pop {r3-r5}\n\
|
||||
mov r8, r3\n\
|
||||
mov r9, r4\n\
|
||||
mov r10, r5\n\
|
||||
pop {r4-r7}\n\
|
||||
pop {r0}\n\
|
||||
bx r0\n\
|
||||
.pool\n\
|
||||
.syntax divided");
|
||||
}
|
||||
#endif // NONMATCHING
|
||||
|
||||
static void LoadMapNamePopUpWindowBg(void)
|
||||
{
|
||||
u8 popupWindowId;
|
||||
u16 regionMapSectionId;
|
||||
u8 popUpThemeId;
|
||||
u8 popupWindowId = GetMapNamePopUpWindowId();
|
||||
u16 regionMapSectionId = gMapHeader.regionMapSectionId;
|
||||
|
||||
popupWindowId = GetMapNamePopUpWindowId();
|
||||
regionMapSectionId = gMapHeader.regionMapSectionId;
|
||||
if(regionMapSectionId > MAPSEC_DYNAMIC)
|
||||
if (regionMapSectionId > MAPSEC_DYNAMIC)
|
||||
{
|
||||
if(regionMapSectionId > MAPSEC_SPECIAL_AREA)
|
||||
if (regionMapSectionId > MAPSEC_SPECIAL_AREA)
|
||||
regionMapSectionId -= (MAPSEC_SPECIAL_AREA - MAPSEC_DYNAMIC);
|
||||
else
|
||||
regionMapSectionId = 0; //discard kanto region sections
|
||||
regionMapSectionId = 0; // Discard kanto region sections;
|
||||
}
|
||||
popUpThemeId = gRegionMapSectionId_To_PopUpThemeIdMapping[regionMapSectionId];
|
||||
|
||||
LoadBgTiles(GetWindowAttribute(popupWindowId, WINDOW_BG), &(gMapPopUp_Outline_Table[popUpThemeId][0]), 0x400, 0x21D);
|
||||
LoadBgTiles(GetWindowAttribute(popupWindowId, WINDOW_BG), gMapPopUp_Outline_Table[popUpThemeId], 0x400, 0x21D);
|
||||
CallWindowFunction(popupWindowId, sub_80D4A78);
|
||||
PutWindowTilemap(popupWindowId);
|
||||
if(gMapHeader.weather == WEATHER_BUBBLES)
|
||||
LoadPalette(&gUnknown_0857F444, 0xE0, 0x20);
|
||||
else
|
||||
LoadPalette(&(gMapPopUp_Palette_Table[popUpThemeId][0]), 0xE0, 0x20);
|
||||
BlitBitmapToWindow(popupWindowId, &(gMapPopUp_Table[popUpThemeId][0]), 0, 0, 80, 24);
|
||||
LoadPalette(gMapPopUp_Palette_Table[popUpThemeId], 0xE0, 0x20);
|
||||
BlitBitmapToWindow(popupWindowId, gMapPopUp_Table[popUpThemeId], 0, 0, 80, 24);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,313 @@
|
||||
#include "global.h"
|
||||
#include "event_object_movement.h"
|
||||
#include "fieldmap.h"
|
||||
#include "malloc.h"
|
||||
#include "mossdeep_gym.h"
|
||||
#include "script_movement.h"
|
||||
#include "constants/event_object_movement_constants.h"
|
||||
|
||||
// Movement scripts.
|
||||
extern const u8 gUnknown_08612698[];
|
||||
extern const u8 gUnknown_0861269C[];
|
||||
extern const u8 gUnknown_086126A0[];
|
||||
extern const u8 gUnknown_086126A4[];
|
||||
extern const u8 gUnknown_086126A8[];
|
||||
extern const u8 gUnknown_086126AA[];
|
||||
extern const u8 gUnknown_086126AC[];
|
||||
extern const u8 gUnknown_086126AE[];
|
||||
|
||||
struct MossdeepSubStruct
|
||||
{
|
||||
u8 unk0;
|
||||
u8 eventTemplateId;
|
||||
};
|
||||
|
||||
struct MossdeepStruct
|
||||
{
|
||||
struct MossdeepSubStruct objects[EVENT_OBJECTS_COUNT];
|
||||
u8 count;
|
||||
bool8 unk41;
|
||||
};
|
||||
|
||||
// This file's functions.
|
||||
static void AddEventObject(u8 eventTemplateId, u8 arg1);
|
||||
static void sub_81A8D94(u8 eventTemplateId, u8 arg1);
|
||||
|
||||
// EWRAM vars
|
||||
EWRAM_DATA static struct MossdeepStruct *gUnknown_0203CE50 = NULL;
|
||||
|
||||
// code
|
||||
void InitMossdeepGymTiles(bool8 arg0)
|
||||
{
|
||||
if (gUnknown_0203CE50 == NULL)
|
||||
gUnknown_0203CE50 = AllocZeroed(sizeof(*gUnknown_0203CE50));
|
||||
|
||||
gUnknown_0203CE50->unk41 = arg0;
|
||||
}
|
||||
|
||||
void FinishMossdeepGymTiles(void)
|
||||
{
|
||||
u8 id;
|
||||
|
||||
if (gUnknown_0203CE50 != NULL)
|
||||
FREE_AND_SET_NULL(gUnknown_0203CE50);
|
||||
|
||||
id = GetEventObjectIdByLocalIdAndMap(0xFF, 0, 0);
|
||||
EventObjectClearHeldMovementIfFinished(&gEventObjects[id]);
|
||||
sub_80D338C();
|
||||
}
|
||||
|
||||
u16 MossdeepGym_MoveEvents(u8 arg0)
|
||||
{
|
||||
u8 i;
|
||||
struct EventObjectTemplate *events = gSaveBlock1Ptr->eventObjectTemplates;
|
||||
u16 localId = 0;
|
||||
|
||||
for (i = 0; i < EVENT_OBJECT_TEMPLATES_COUNT; i++)
|
||||
{
|
||||
s32 var;
|
||||
u8 r5;
|
||||
s16 x = events[i].x + 7;
|
||||
s16 y = events[i].y + 7;
|
||||
u16 metatile = MapGridGetMetatileIdAt(x, y);
|
||||
|
||||
if (!gUnknown_0203CE50->unk41)
|
||||
var = 0x250;
|
||||
else
|
||||
var = 0x298;
|
||||
|
||||
if (metatile < 0x250)
|
||||
continue;
|
||||
|
||||
if ((u8)((metatile - var) / 8) >= 5)
|
||||
continue;
|
||||
if ((u8)((metatile - var) / 8) != arg0)
|
||||
continue;
|
||||
|
||||
r5 = (u8)((metatile - var) % 8);
|
||||
if (r5 < 4)
|
||||
{
|
||||
s8 x = 0;
|
||||
s8 y = 0;
|
||||
const u8 *movementScript;
|
||||
|
||||
switch (r5)
|
||||
{
|
||||
case 0:
|
||||
movementScript = gUnknown_08612698;
|
||||
x = 1;
|
||||
break;
|
||||
case 1:
|
||||
movementScript = gUnknown_0861269C;
|
||||
y = 1;
|
||||
break;
|
||||
case 2:
|
||||
movementScript = gUnknown_086126A0;
|
||||
x = -1;
|
||||
break;
|
||||
case 3:
|
||||
movementScript = gUnknown_086126A4;
|
||||
y = -1;
|
||||
break;
|
||||
default:
|
||||
continue;
|
||||
}
|
||||
|
||||
events[i].x += x;
|
||||
events[i].y += y;
|
||||
if (GetEventObjectIdByLocalIdAndMap(events[i].localId, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup) != EVENT_OBJECTS_COUNT)
|
||||
{
|
||||
AddEventObject(i, r5);
|
||||
localId = events[i].localId;
|
||||
ScriptMovement_StartObjectMovementScript(localId, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, movementScript);
|
||||
}
|
||||
else
|
||||
{
|
||||
sub_81A8D94(i, r5);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return localId;
|
||||
}
|
||||
|
||||
void MossdeepGym_TurnEvents(void)
|
||||
{
|
||||
u8 i;
|
||||
s32 var;
|
||||
struct EventObjectTemplate *events;
|
||||
|
||||
if (gUnknown_0203CE50 == NULL)
|
||||
return;
|
||||
|
||||
if (!gUnknown_0203CE50->unk41)
|
||||
var = 0x250;
|
||||
else
|
||||
var = 0x298;
|
||||
|
||||
events = gSaveBlock1Ptr->eventObjectTemplates;
|
||||
for (i = 0; i < gUnknown_0203CE50->count; i++)
|
||||
{
|
||||
s32 r6;
|
||||
s8 r0;
|
||||
u8 eventObjectId;
|
||||
s16 x = events[gUnknown_0203CE50->objects[i].eventTemplateId].x + 7;
|
||||
s16 y = events[gUnknown_0203CE50->objects[i].eventTemplateId].y + 7;
|
||||
u16 metatile = MapGridGetMetatileIdAt(x, y);
|
||||
|
||||
r0 = (u8)((metatile - var) % 8);
|
||||
r0 -= (gUnknown_0203CE50->objects[i].unk0);
|
||||
if (r0 < 0 || r0 == 3)
|
||||
{
|
||||
if (r0 == -3)
|
||||
r6 = 1;
|
||||
else
|
||||
r6 = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (r0 > 0)
|
||||
r6 = 1;
|
||||
else
|
||||
r6 = 2;
|
||||
}
|
||||
|
||||
eventObjectId = GetEventObjectIdByLocalIdAndMap(events[gUnknown_0203CE50->objects[i].eventTemplateId].localId, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup);
|
||||
if (eventObjectId != EVENT_OBJECTS_COUNT)
|
||||
{
|
||||
const u8 *movementScript;
|
||||
u8 direction = gEventObjects[eventObjectId].facingDirection;
|
||||
if (r6 == 0)
|
||||
{
|
||||
switch (direction)
|
||||
{
|
||||
case DIR_EAST:
|
||||
movementScript = gUnknown_086126AE;
|
||||
events[gUnknown_0203CE50->objects[i].eventTemplateId].movementType = MOVEMENT_TYPE_FACE_UP;
|
||||
break;
|
||||
case DIR_SOUTH:
|
||||
movementScript = gUnknown_086126A8;
|
||||
events[gUnknown_0203CE50->objects[i].eventTemplateId].movementType = MOVEMENT_TYPE_FACE_RIGHT;
|
||||
break;
|
||||
case DIR_WEST:
|
||||
movementScript = gUnknown_086126AA;
|
||||
events[gUnknown_0203CE50->objects[i].eventTemplateId].movementType = MOVEMENT_TYPE_FACE_DOWN;
|
||||
break;
|
||||
case DIR_NORTH:
|
||||
movementScript = gUnknown_086126AC;
|
||||
events[gUnknown_0203CE50->objects[i].eventTemplateId].movementType = MOVEMENT_TYPE_FACE_LEFT;
|
||||
break;
|
||||
default:
|
||||
continue;
|
||||
}
|
||||
ScriptMovement_StartObjectMovementScript(events[gUnknown_0203CE50->objects[i].eventTemplateId].localId,
|
||||
gSaveBlock1Ptr->location.mapNum,
|
||||
gSaveBlock1Ptr->location.mapGroup,
|
||||
movementScript);
|
||||
}
|
||||
else if (r6 == 1)
|
||||
{
|
||||
switch (direction)
|
||||
{
|
||||
case DIR_EAST:
|
||||
movementScript = gUnknown_086126AA;
|
||||
events[gUnknown_0203CE50->objects[i].eventTemplateId].movementType = MOVEMENT_TYPE_FACE_DOWN;
|
||||
break;
|
||||
case DIR_SOUTH:
|
||||
movementScript = gUnknown_086126AC;
|
||||
events[gUnknown_0203CE50->objects[i].eventTemplateId].movementType = MOVEMENT_TYPE_FACE_LEFT;
|
||||
break;
|
||||
case DIR_WEST:
|
||||
movementScript = gUnknown_086126AE;
|
||||
events[gUnknown_0203CE50->objects[i].eventTemplateId].movementType = MOVEMENT_TYPE_FACE_UP;
|
||||
break;
|
||||
case DIR_NORTH:
|
||||
movementScript = gUnknown_086126A8;
|
||||
events[gUnknown_0203CE50->objects[i].eventTemplateId].movementType = MOVEMENT_TYPE_FACE_RIGHT;
|
||||
break;
|
||||
default:
|
||||
continue;
|
||||
}
|
||||
ScriptMovement_StartObjectMovementScript(events[gUnknown_0203CE50->objects[i].eventTemplateId].localId,
|
||||
gSaveBlock1Ptr->location.mapNum,
|
||||
gSaveBlock1Ptr->location.mapGroup,
|
||||
movementScript);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void AddEventObject(u8 eventTemplateId, u8 arg1)
|
||||
{
|
||||
gUnknown_0203CE50->objects[gUnknown_0203CE50->count].eventTemplateId = eventTemplateId;
|
||||
gUnknown_0203CE50->objects[gUnknown_0203CE50->count].unk0 = arg1;
|
||||
gUnknown_0203CE50->count++;
|
||||
}
|
||||
|
||||
static void sub_81A8D94(u8 eventTemplateId, u8 arg1)
|
||||
{
|
||||
s8 r0;
|
||||
s32 r6;
|
||||
s32 var;
|
||||
u16 movementType;
|
||||
struct EventObjectTemplate *events = gSaveBlock1Ptr->eventObjectTemplates;
|
||||
s16 x = events[eventTemplateId].x + 7;
|
||||
s16 y = events[eventTemplateId].y + 7;
|
||||
u16 metatile = MapGridGetMetatileIdAt(x, y);
|
||||
|
||||
if (!gUnknown_0203CE50->unk41)
|
||||
var = 0x250;
|
||||
else
|
||||
var = 0x298;
|
||||
|
||||
r0 = (u8)((metatile - var) % 8);
|
||||
r0 -= arg1;
|
||||
if (r0 < 0 || r0 == 3)
|
||||
r6 = 0;
|
||||
else if (r0 > 0 || r0 == -3)
|
||||
r6 = 1;
|
||||
else
|
||||
r6 = 2;
|
||||
|
||||
movementType = events[eventTemplateId].movementType;
|
||||
if (r6 == 0)
|
||||
{
|
||||
switch (movementType)
|
||||
{
|
||||
case MOVEMENT_TYPE_FACE_RIGHT:
|
||||
events[eventTemplateId].movementType = MOVEMENT_TYPE_FACE_UP;
|
||||
break;
|
||||
case MOVEMENT_TYPE_FACE_DOWN:
|
||||
events[eventTemplateId].movementType = MOVEMENT_TYPE_FACE_RIGHT;
|
||||
break;
|
||||
case MOVEMENT_TYPE_FACE_LEFT:
|
||||
events[eventTemplateId].movementType = MOVEMENT_TYPE_FACE_DOWN;
|
||||
break;
|
||||
case MOVEMENT_TYPE_FACE_UP:
|
||||
events[eventTemplateId].movementType = MOVEMENT_TYPE_FACE_LEFT;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (r6 == 1)
|
||||
{
|
||||
switch (movementType)
|
||||
{
|
||||
case MOVEMENT_TYPE_FACE_RIGHT:
|
||||
events[eventTemplateId].movementType = MOVEMENT_TYPE_FACE_DOWN;
|
||||
break;
|
||||
case MOVEMENT_TYPE_FACE_DOWN:
|
||||
events[eventTemplateId].movementType = MOVEMENT_TYPE_FACE_LEFT;
|
||||
break;
|
||||
case MOVEMENT_TYPE_FACE_LEFT:
|
||||
events[eventTemplateId].movementType = MOVEMENT_TYPE_FACE_UP;
|
||||
break;
|
||||
case MOVEMENT_TYPE_FACE_UP:
|
||||
events[eventTemplateId].movementType = MOVEMENT_TYPE_FACE_RIGHT;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
#include "gba/gba.h"
|
||||
#include "multiboot.h"
|
||||
|
||||
static u16 MultiBoot_required_data[MULTIBOOT_NCHILD];
|
||||
IWRAM_DATA static u16 MultiBoot_required_data[MULTIBOOT_NCHILD];
|
||||
|
||||
static int MultiBootSend(struct MultiBootParam *mp, u16 data);
|
||||
static int MultiBootHandShake(struct MultiBootParam *mp);
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
#include "pokemon_storage_system.h"
|
||||
|
||||
extern void sub_811EFC0(u8);
|
||||
extern void ValidateEReaderTrainer(void);
|
||||
|
||||
extern ScrCmdFunc gMysteryEventScriptCmdTable[];
|
||||
extern ScrCmdFunc gMysteryEventScriptCmdTableEnd[];
|
||||
|
||||
+4
-1
@@ -28,7 +28,6 @@
|
||||
#include "apprentice.h"
|
||||
#include "frontier_util.h"
|
||||
|
||||
extern u8 gDifferentSaveFile;
|
||||
extern u16 gSaveFileStatus;
|
||||
extern u8 gUnknown_030060B0;
|
||||
|
||||
@@ -61,6 +60,10 @@ static void ClearFrontierRecord(void);
|
||||
static void WarpToTruck(void);
|
||||
static void ResetMiniGamesResults(void);
|
||||
|
||||
// EWRAM vars
|
||||
EWRAM_DATA bool8 gDifferentSaveFile = FALSE;
|
||||
EWRAM_DATA bool8 gUnknown_020322D5 = FALSE;
|
||||
|
||||
// const rom data
|
||||
static const struct ContestWinner sContestWinnerPicDummy =
|
||||
{
|
||||
|
||||
+16
-12
@@ -1,5 +1,6 @@
|
||||
#include "global.h"
|
||||
#include "overworld.h"
|
||||
#include "battle_pyramid.h"
|
||||
#include "battle_setup.h"
|
||||
#include "berry.h"
|
||||
#include "bg.h"
|
||||
@@ -87,12 +88,6 @@ extern const struct MapHeader *const *const gMapGroups[];
|
||||
extern const s32 gMaxFlashLevel;
|
||||
extern const u16 gUnknown_82EC7C4[];
|
||||
|
||||
u16 gUnknown_03005DA8;
|
||||
MainCallback gFieldCallback;
|
||||
bool8 (*gFieldCallback2)(void);
|
||||
u8 gUnknown_03005DB4;
|
||||
u8 gFieldLinkPlayerCount;
|
||||
|
||||
// functions
|
||||
extern void HealPlayerParty(void);
|
||||
extern void move_tilemap_camera_to_upper_left_corner(void);
|
||||
@@ -113,7 +108,6 @@ extern void ShowMapNamePopup(void);
|
||||
extern bool32 InTrainerHill(void);
|
||||
extern bool32 sub_808651C(void);
|
||||
extern bool8 sub_80AF6A4(void);
|
||||
extern bool8 sub_81A9E6C(void);
|
||||
extern bool8 sub_80E909C(void);
|
||||
extern void sub_81AA1D8(void);
|
||||
extern void c2_change_map(void);
|
||||
@@ -256,6 +250,16 @@ IWRAM_DATA static u8 sUnknown_03000E18;
|
||||
IWRAM_DATA static u8 sUnknown_03000E19;
|
||||
IWRAM_DATA static u32 sUnusedVar;
|
||||
|
||||
// IWRAM common
|
||||
u16 *gBGTilemapBuffers1;
|
||||
u16 *gBGTilemapBuffers2;
|
||||
u16 *gBGTilemapBuffers3;
|
||||
u16 gUnknown_03005DA8;
|
||||
void (*gFieldCallback)(void);
|
||||
bool8 (*gFieldCallback2)(void);
|
||||
u8 gUnknown_03005DB4;
|
||||
u8 gFieldLinkPlayerCount;
|
||||
|
||||
// EWRAM vars
|
||||
EWRAM_DATA static u8 sUnknown_020322D8 = 0;
|
||||
EWRAM_DATA struct WarpData gLastUsedWarp = {0};
|
||||
@@ -517,7 +521,7 @@ void LoadSaveblockEventObjScripts(void)
|
||||
struct EventObjectTemplate *savObjTemplates = gSaveBlock1Ptr->eventObjectTemplates;
|
||||
s32 i;
|
||||
|
||||
for (i = 0; i < 64; i++)
|
||||
for (i = 0; i < EVENT_OBJECT_TEMPLATES_COUNT; i++)
|
||||
savObjTemplates[i].script = mapHeaderObjTemplates[i].script;
|
||||
}
|
||||
|
||||
@@ -526,7 +530,7 @@ void Overworld_SetEventObjTemplateCoords(u8 localId, s16 x, s16 y)
|
||||
s32 i;
|
||||
struct EventObjectTemplate *savObjTemplates = gSaveBlock1Ptr->eventObjectTemplates;
|
||||
|
||||
for (i = 0; i < 64; i++)
|
||||
for (i = 0; i < EVENT_OBJECT_TEMPLATES_COUNT; i++)
|
||||
{
|
||||
struct EventObjectTemplate *eventObjectTemplate = &savObjTemplates[i];
|
||||
if (eventObjectTemplate->localId == localId)
|
||||
@@ -543,7 +547,7 @@ void Overworld_SetEventObjTemplateMovementType(u8 localId, u8 movementType)
|
||||
s32 i;
|
||||
|
||||
struct EventObjectTemplate *savObjTemplates = gSaveBlock1Ptr->eventObjectTemplates;
|
||||
for (i = 0; i < 64; i++)
|
||||
for (i = 0; i < EVENT_OBJECT_TEMPLATES_COUNT; i++)
|
||||
{
|
||||
struct EventObjectTemplate *eventObjectTemplate = &savObjTemplates[i];
|
||||
if (eventObjectTemplate->localId == localId)
|
||||
@@ -764,7 +768,7 @@ void sub_8084F6C(u8 a1)
|
||||
SetWarpData(&gSaveBlock1Ptr->warp1, warp->group, warp->map, -1, warp->x, warp->y);
|
||||
}
|
||||
|
||||
void sub_8084FAC(void)
|
||||
void sub_8084FAC(int unused)
|
||||
{
|
||||
gSaveBlock1Ptr->warp1 = gSaveBlock1Ptr->warp2;
|
||||
}
|
||||
@@ -1808,7 +1812,7 @@ static void InitCurrentFlashLevelScanlineEffect(void)
|
||||
{
|
||||
u8 flashLevel;
|
||||
|
||||
if (sub_81A9E6C())
|
||||
if (InBattlePyramid_())
|
||||
{
|
||||
door_upload_tiles();
|
||||
ScanlineEffect_SetParams(sFlashEffectParams);
|
||||
|
||||
+146
-8
@@ -1,14 +1,19 @@
|
||||
#include "global.h"
|
||||
#include "battle_anim.h"
|
||||
#include "trig.h"
|
||||
#include "constants/rgb.h"
|
||||
|
||||
extern void sub_80A77C8(struct Sprite *);
|
||||
extern void sub_810DBAC(struct Sprite *);
|
||||
extern void sub_810DC2C(struct Sprite *);
|
||||
extern void sub_810DCD0(struct Sprite *);
|
||||
extern void sub_810DD50(struct Sprite *);
|
||||
extern void sub_810DDC4(struct Sprite *);
|
||||
extern void sub_810DDC4(struct Sprite *);
|
||||
|
||||
void sub_810DBAC(struct Sprite *);
|
||||
void sub_810DC2C(struct Sprite *);
|
||||
void sub_810DCD0(struct Sprite *);
|
||||
void sub_810DD50(struct Sprite *);
|
||||
void AnimBubbleEffect(struct Sprite *);
|
||||
static void sub_810DC10(struct Sprite *);
|
||||
static void sub_810DCB4(struct Sprite *);
|
||||
static void sub_810DD24(struct Sprite *);
|
||||
static void AnimBubbleEffectStep(struct Sprite *);
|
||||
|
||||
extern const union AnimCmd *const gUnknown_08595200[];
|
||||
|
||||
@@ -170,7 +175,7 @@ const struct SpriteTemplate gPoisonBubbleSpriteTemplate =
|
||||
.anims = gUnknown_08596164,
|
||||
.images = NULL,
|
||||
.affineAnims = gUnknown_0859623C,
|
||||
.callback = sub_810DDC4,
|
||||
.callback = AnimBubbleEffect,
|
||||
};
|
||||
|
||||
const struct SpriteTemplate gWaterBubbleSpriteTemplate =
|
||||
@@ -181,5 +186,138 @@ const struct SpriteTemplate gWaterBubbleSpriteTemplate =
|
||||
.anims = gUnknown_08595200,
|
||||
.images = NULL,
|
||||
.affineAnims = gUnknown_0859623C,
|
||||
.callback = sub_810DDC4,
|
||||
.callback = AnimBubbleEffect,
|
||||
};
|
||||
|
||||
void sub_810DBAC(struct Sprite *sprite)
|
||||
{
|
||||
if (!gBattleAnimArgs[3])
|
||||
StartSpriteAnim(sprite, 2);
|
||||
|
||||
InitAnimSpritePos(sprite, 1);
|
||||
|
||||
sprite->data[0] = gBattleAnimArgs[2];
|
||||
sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimTarget, 2);
|
||||
sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimTarget, 3);
|
||||
sprite->data[5] = -30;
|
||||
|
||||
InitAnimArcTranslation(sprite);
|
||||
|
||||
sprite->callback = sub_810DC10;
|
||||
}
|
||||
|
||||
static void sub_810DC10(struct Sprite *sprite)
|
||||
{
|
||||
if (TranslateAnimArc(sprite))
|
||||
DestroyAnimSprite(sprite);
|
||||
}
|
||||
|
||||
void sub_810DC2C(struct Sprite *sprite)
|
||||
{
|
||||
s16 l1, l2;
|
||||
if (!gBattleAnimArgs[3])
|
||||
StartSpriteAnim(sprite, 2);
|
||||
|
||||
InitAnimSpritePos(sprite, 1);
|
||||
SetAverageBattlerPositions(gBattleAnimTarget, 1, &l1, &l2);
|
||||
|
||||
if (GetBattlerSide(gBattleAnimAttacker))
|
||||
gBattleAnimArgs[4] = -gBattleAnimArgs[4];
|
||||
|
||||
sprite->data[0] = gBattleAnimArgs[2];
|
||||
sprite->data[2] = l1 + gBattleAnimArgs[4];
|
||||
sprite->data[4] = l2 + gBattleAnimArgs[5];
|
||||
sprite->data[5] = -30;
|
||||
|
||||
InitAnimArcTranslation(sprite);
|
||||
|
||||
sprite->callback = sub_810DCB4;
|
||||
}
|
||||
|
||||
static void sub_810DCB4(struct Sprite *sprite)
|
||||
{
|
||||
if (TranslateAnimArc(sprite))
|
||||
DestroyAnimSprite(sprite);
|
||||
}
|
||||
|
||||
void sub_810DCD0(struct Sprite *sprite)
|
||||
{
|
||||
sprite->data[0] = gBattleAnimArgs[2];
|
||||
sprite->data[1] = sprite->pos1.x;
|
||||
sprite->data[2] = sprite->pos1.x + gBattleAnimArgs[0];
|
||||
sprite->data[3] = sprite->pos1.y;
|
||||
sprite->data[4] = sprite->pos1.y + gBattleAnimArgs[1];
|
||||
|
||||
InitSpriteDataForLinearTranslation(sprite);
|
||||
|
||||
sprite->data[5] = sprite->data[1] / gBattleAnimArgs[2];
|
||||
sprite->data[6] = sprite->data[2] / gBattleAnimArgs[2];
|
||||
|
||||
sprite->callback = sub_810DD24;
|
||||
}
|
||||
|
||||
static void sub_810DD24(struct Sprite *sprite)
|
||||
{
|
||||
sub_80A656C(sprite);
|
||||
|
||||
sprite->data[1] -= sprite->data[5];
|
||||
sprite->data[2] -= sprite->data[6];
|
||||
|
||||
if (!sprite->data[0])
|
||||
DestroyAnimSprite(sprite);
|
||||
}
|
||||
|
||||
void sub_810DD50(struct Sprite *sprite)
|
||||
{
|
||||
SetAverageBattlerPositions(gBattleAnimTarget, TRUE, &sprite->pos1.x, &sprite->pos1.y);
|
||||
|
||||
if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER)
|
||||
gBattleAnimArgs[0] = -gBattleAnimArgs[0];
|
||||
|
||||
sprite->pos1.x += gBattleAnimArgs[0];
|
||||
sprite->pos1.y += gBattleAnimArgs[1];
|
||||
|
||||
sprite->data[0] = gBattleAnimArgs[4];
|
||||
sprite->data[2] = sprite->pos1.x + gBattleAnimArgs[2];
|
||||
sprite->data[4] = sprite->pos1.y + sprite->data[0];
|
||||
|
||||
sprite->callback = StartAnimLinearTranslation;
|
||||
StoreSpriteCallbackInData6(sprite, DestroyAnimSprite);
|
||||
}
|
||||
|
||||
// Animates a bubble by rising upward, swaying side to side, and
|
||||
// enlarging the sprite. This is used as an after-effect by poison-type
|
||||
// moves, along with MOVE_BUBBLE, and MOVE_BUBBLEBEAM.
|
||||
// arg 0: initial x pixel offset
|
||||
// arg 1: initial y pixel offset
|
||||
// arg 2: 0 = single-target, 1 = multi-target
|
||||
void AnimBubbleEffect(struct Sprite *sprite)
|
||||
{
|
||||
if (!gBattleAnimArgs[2])
|
||||
{
|
||||
sub_80A6980(sprite, TRUE);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetAverageBattlerPositions(gBattleAnimTarget, TRUE, &sprite->pos1.x, &sprite->pos1.y);
|
||||
|
||||
if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER)
|
||||
gBattleAnimArgs[0] = -gBattleAnimArgs[0];
|
||||
|
||||
sprite->pos1.x += gBattleAnimArgs[0];
|
||||
sprite->pos1.y += gBattleAnimArgs[1];
|
||||
}
|
||||
|
||||
sprite->callback = AnimBubbleEffectStep;
|
||||
}
|
||||
|
||||
static void AnimBubbleEffectStep(struct Sprite *sprite)
|
||||
{
|
||||
sprite->data[0] = (sprite->data[0] + 0xB) & 0xFF;
|
||||
sprite->pos2.x = Sin(sprite->data[0], 4);
|
||||
sprite->data[1] += 0x30;
|
||||
sprite->pos2.y = -(sprite->data[1] >> 8);
|
||||
|
||||
if (sprite->affineAnimEnded)
|
||||
DestroyAnimSprite(sprite);
|
||||
}
|
||||
|
||||
+2
-2
@@ -402,7 +402,7 @@ static void Task_DoPokeballSendOutAnim(u8 taskId)
|
||||
gSprites[ballSpriteId].data[2] = GetBattlerSpriteCoord(gBattlerTarget, BATTLER_COORD_X);
|
||||
gSprites[ballSpriteId].data[4] = GetBattlerSpriteCoord(gBattlerTarget, BATTLER_COORD_Y) - 16;
|
||||
gSprites[ballSpriteId].data[5] = -40;
|
||||
sub_80A68D4(&gSprites[ballSpriteId]);
|
||||
InitAnimArcTranslation(&gSprites[ballSpriteId]);
|
||||
gSprites[ballSpriteId].oam.affineParam = taskId;
|
||||
gTasks[taskId].tOpponentBattler = gBattlerTarget;
|
||||
gTasks[taskId].func = TaskDummy;
|
||||
@@ -898,7 +898,7 @@ static void SpriteCB_PlayerMonSendOut_1(struct Sprite *sprite)
|
||||
sprite->data[4] = GetBattlerSpriteCoord(sprite->sBattler, 3) + 24;
|
||||
sprite->data[5] = -30;
|
||||
sprite->oam.affineParam = sprite->sBattler;
|
||||
sub_80A68D4(sprite);
|
||||
InitAnimArcTranslation(sprite);
|
||||
sprite->callback = SpriteCB_PlayerMonSendOut_2;
|
||||
}
|
||||
|
||||
|
||||
+458
-51
@@ -1,4 +1,5 @@
|
||||
#include "global.h"
|
||||
#include "battle_main.h"
|
||||
#include "bg.h"
|
||||
#include "data2.h"
|
||||
#include "decompress.h"
|
||||
@@ -29,14 +30,17 @@
|
||||
#include "constants/songs.h"
|
||||
#include "constants/species.h"
|
||||
|
||||
extern u8 gUnknown_030061EC;
|
||||
|
||||
// EWRAM
|
||||
static EWRAM_DATA struct PokedexView *gUnknown_02039B4C = NULL;
|
||||
static EWRAM_DATA u16 gUnknown_02039B50 = 0;
|
||||
static EWRAM_DATA u8 gUnknown_02039B52 = 0;
|
||||
static EWRAM_DATA struct PokedexListItem *gUnknown_02039B54 = NULL;
|
||||
|
||||
// IWRAM common
|
||||
u8 gUnknown_030060B0;
|
||||
MainCallback gUnknown_030060B4;
|
||||
u8 gUnknown_030061EC;
|
||||
void (*gUnknown_030060B4)(void);
|
||||
|
||||
struct PokedexEntry
|
||||
{
|
||||
@@ -84,35 +88,6 @@ struct UnknownStruct4
|
||||
u8 unk9;
|
||||
};
|
||||
|
||||
//TO BE CONVERTED TO C
|
||||
|
||||
extern const u8 gUnknown_0855D30C[];
|
||||
extern struct BgTemplate gUnknown_0856E630[];
|
||||
extern struct WindowTemplate gUnknown_0856E640[];
|
||||
extern const u16 gUnknown_0856E610[16];
|
||||
extern const struct PokedexEntry gPokedexEntries[];
|
||||
extern struct BgTemplate gUnknown_0856E668[];
|
||||
extern struct WindowTemplate gUnknown_0856E670[];
|
||||
extern const u8 *gMonFootprintTable[];
|
||||
extern u8 gUnknown_0856ED08[][4];
|
||||
extern struct BgTemplate gUnknown_0856EFF8[];
|
||||
extern struct WindowTemplate gUnknown_0856F008[];
|
||||
extern const u8 gUnknown_0856ED9C[][4];
|
||||
extern const u8 gUnknown_0856EDB8[][4];
|
||||
extern const u8 gUnknown_0856EDD4[][4];
|
||||
extern const u8 gUnknown_0856EDF0[][4];
|
||||
extern const struct UnknownStruct1 gUnknown_0856EFC8[];
|
||||
extern const struct UnknownStruct3 gUnknown_0856ED30[];
|
||||
extern const struct UnknownStruct4 gUnknown_0856ED48[];
|
||||
extern const struct UnknownStruct2 gUnknown_0856EE0C[];
|
||||
extern const struct UnknownStruct2 gUnknown_0856EE5C[];
|
||||
extern const struct UnknownStruct2 gUnknown_0856EEB4[];
|
||||
extern const struct UnknownStruct2 gUnknown_0856EF14[];
|
||||
extern const struct UnknownStruct2 gUnknown_0856EE24[];
|
||||
extern const u8 gUnknown_0856EFAC[];
|
||||
extern const u8 gUnknown_0856EFAE[];
|
||||
extern const u8 gUnknown_0856EFB4[];
|
||||
|
||||
#define HOENN_DEX_COUNT 202
|
||||
#define NATIONAL_DEX_COUNT 386
|
||||
|
||||
@@ -651,7 +626,7 @@ static const union AnimCmd *const sSpriteAnimTable_855D190[] =
|
||||
sSpriteAnim_855D10C
|
||||
};
|
||||
|
||||
const struct SpriteTemplate gUnknown_0855D194 =
|
||||
static const struct SpriteTemplate gUnknown_0855D194 =
|
||||
{
|
||||
.tileTag = 4096,
|
||||
.paletteTag = 4096,
|
||||
@@ -662,7 +637,7 @@ const struct SpriteTemplate gUnknown_0855D194 =
|
||||
.callback = sub_80BE604,
|
||||
};
|
||||
|
||||
const struct SpriteTemplate gUnknown_0855D1AC =
|
||||
static const struct SpriteTemplate gUnknown_0855D1AC =
|
||||
{
|
||||
.tileTag = 4096,
|
||||
.paletteTag = 4096,
|
||||
@@ -673,7 +648,7 @@ const struct SpriteTemplate gUnknown_0855D1AC =
|
||||
.callback = sub_80BE658,
|
||||
};
|
||||
|
||||
const struct SpriteTemplate gUnknown_0855D1C4 =
|
||||
static const struct SpriteTemplate gUnknown_0855D1C4 =
|
||||
{
|
||||
.tileTag = 4096,
|
||||
.paletteTag = 4096,
|
||||
@@ -684,7 +659,7 @@ const struct SpriteTemplate gUnknown_0855D1C4 =
|
||||
.callback = sub_80BE758,
|
||||
};
|
||||
|
||||
const struct SpriteTemplate gUnknown_0855D1DC =
|
||||
static const struct SpriteTemplate gUnknown_0855D1DC =
|
||||
{
|
||||
.tileTag = 4096,
|
||||
.paletteTag = 4096,
|
||||
@@ -695,7 +670,7 @@ const struct SpriteTemplate gUnknown_0855D1DC =
|
||||
.callback = sub_80BE780,
|
||||
};
|
||||
|
||||
const struct SpriteTemplate gUnknown_0855D1F4 =
|
||||
static const struct SpriteTemplate gUnknown_0855D1F4 =
|
||||
{
|
||||
.tileTag = 4096,
|
||||
.paletteTag = 4096,
|
||||
@@ -706,7 +681,7 @@ const struct SpriteTemplate gUnknown_0855D1F4 =
|
||||
.callback = sub_80BE44C,
|
||||
};
|
||||
|
||||
const struct SpriteTemplate gUnknown_0855D20C =
|
||||
static const struct SpriteTemplate gUnknown_0855D20C =
|
||||
{
|
||||
.tileTag = 4096,
|
||||
.paletteTag = 4096,
|
||||
@@ -717,7 +692,7 @@ const struct SpriteTemplate gUnknown_0855D20C =
|
||||
.callback = sub_80BE44C,
|
||||
};
|
||||
|
||||
const struct SpriteTemplate gUnknown_0855D224 =
|
||||
static const struct SpriteTemplate gUnknown_0855D224 =
|
||||
{
|
||||
.tileTag = 4096,
|
||||
.paletteTag = 4096,
|
||||
@@ -728,7 +703,7 @@ const struct SpriteTemplate gUnknown_0855D224 =
|
||||
.callback = sub_80BE44C,
|
||||
};
|
||||
|
||||
const struct SpriteTemplate gUnknown_0855D23C =
|
||||
static const struct SpriteTemplate gUnknown_0855D23C =
|
||||
{
|
||||
.tileTag = 4096,
|
||||
.paletteTag = 4096,
|
||||
@@ -739,7 +714,7 @@ const struct SpriteTemplate gUnknown_0855D23C =
|
||||
.callback = sub_80BE44C,
|
||||
};
|
||||
|
||||
const struct SpriteTemplate gUnknown_0855D254 =
|
||||
static const struct SpriteTemplate gUnknown_0855D254 =
|
||||
{
|
||||
.tileTag = 4096,
|
||||
.paletteTag = 4096,
|
||||
@@ -750,22 +725,22 @@ const struct SpriteTemplate gUnknown_0855D254 =
|
||||
.callback = sub_80BE834,
|
||||
};
|
||||
|
||||
const struct CompressedSpriteSheet gSpriteSheets_0855D26C[] =
|
||||
static const struct CompressedSpriteSheet gSpriteSheets_0855D26C[] =
|
||||
{
|
||||
{gPokedexMenu2_Gfx, 0x2000, 4096},
|
||||
{0}
|
||||
};
|
||||
|
||||
const struct SpritePalette gSpritePalettes_0855D26C[] =
|
||||
static const struct SpritePalette gSpritePalettes_0855D26C[] =
|
||||
{
|
||||
{gPokedexText_Pal, 4096},
|
||||
{0}
|
||||
};
|
||||
|
||||
const u8 gUnknown_0855D28C[] = {0x4, 0x8, 0x10, 0x20, 0x20};
|
||||
const u8 gUnknown_0855D291[] = {0x8, 0x4, 0x2, 0x1, 0x1};
|
||||
static const u8 gUnknown_0855D28C[] = {0x4, 0x8, 0x10, 0x20, 0x20};
|
||||
static const u8 gUnknown_0855D291[] = {0x8, 0x4, 0x2, 0x1, 0x1};
|
||||
|
||||
const struct BgTemplate gBgTemplates_0855D298[] =
|
||||
static const struct BgTemplate gBgTemplates_0855D298[] =
|
||||
{
|
||||
{
|
||||
.bg = 0,
|
||||
@@ -805,15 +780,447 @@ const struct BgTemplate gBgTemplates_0855D298[] =
|
||||
}
|
||||
};
|
||||
|
||||
const struct WindowTemplate sWindowTemplates_0855D2A8[] =
|
||||
static const struct WindowTemplate sWindowTemplates_0855D2A8[] =
|
||||
{
|
||||
{2, 0, 0, 0x20, 0x20, 0, 1},
|
||||
{
|
||||
.bg = 2,
|
||||
.tilemapLeft = 0,
|
||||
.tilemapTop = 0,
|
||||
.width = 32,
|
||||
.height = 32,
|
||||
.paletteNum = 0,
|
||||
.baseBlock = 1,
|
||||
},
|
||||
DUMMY_WIN_TEMPLATE
|
||||
};
|
||||
|
||||
const u8 gUnknown_0855D2B8[] = _("{NO}000");
|
||||
const u8 gUnknown_0855D2BE[] = INCBIN_U8("graphics/pokedex/caught_ball.4bpp");
|
||||
const u8 sText_TenDashes[] = _("----------");
|
||||
static const u8 gUnknown_0855D2B8[] = _("{NO}000");
|
||||
static const u8 gUnknown_0855D2BE[] = INCBIN_U8("graphics/pokedex/caught_ball.4bpp");
|
||||
static const u8 sText_TenDashes[] = _("----------");
|
||||
|
||||
ALIGNED(4) static const u8 gExpandedPlaceholder_PokedexDescription[] = _("");
|
||||
|
||||
#include "data/pokemon/pokedex_text.h"
|
||||
#include "data/pokemon/pokedex_entries.h"
|
||||
|
||||
static const u16 gUnknown_0856E610[] = INCBIN_U16("graphics/pokedex/black.gbapal");
|
||||
|
||||
static const struct BgTemplate gUnknown_0856E630[] =
|
||||
{
|
||||
{
|
||||
.bg = 0,
|
||||
.charBaseIndex = 2,
|
||||
.mapBaseIndex = 12,
|
||||
.screenSize = 0,
|
||||
.paletteMode = 0,
|
||||
.priority = 3,
|
||||
.baseTile = 0
|
||||
},
|
||||
{
|
||||
.bg = 1,
|
||||
.charBaseIndex = 0,
|
||||
.mapBaseIndex = 13,
|
||||
.screenSize = 0,
|
||||
.paletteMode = 0,
|
||||
.priority = 0,
|
||||
.baseTile = 0
|
||||
},
|
||||
{
|
||||
.bg = 2,
|
||||
.charBaseIndex = 2,
|
||||
.mapBaseIndex = 14,
|
||||
.screenSize = 0,
|
||||
.paletteMode = 0,
|
||||
.priority = 1,
|
||||
.baseTile = 0
|
||||
},
|
||||
{
|
||||
.bg = 3,
|
||||
.charBaseIndex = 0,
|
||||
.mapBaseIndex = 15,
|
||||
.screenSize = 0,
|
||||
.paletteMode = 0,
|
||||
.priority = 2,
|
||||
.baseTile = 0
|
||||
}
|
||||
};
|
||||
|
||||
static const struct WindowTemplate gUnknown_0856E640[] =
|
||||
{
|
||||
{
|
||||
.bg = 2,
|
||||
.tilemapLeft = 0,
|
||||
.tilemapTop = 0,
|
||||
.width = 32,
|
||||
.height = 20,
|
||||
.paletteNum = 0,
|
||||
.baseBlock = 0x0001,
|
||||
},
|
||||
{
|
||||
.bg = 2,
|
||||
.tilemapLeft = 25,
|
||||
.tilemapTop = 8,
|
||||
.width = 2,
|
||||
.height = 2,
|
||||
.paletteNum = 15,
|
||||
.baseBlock = 0x0281,
|
||||
},
|
||||
{
|
||||
.bg = 0,
|
||||
.tilemapLeft = 0,
|
||||
.tilemapTop = 12,
|
||||
.width = 32,
|
||||
.height = 7,
|
||||
.paletteNum = 8,
|
||||
.baseBlock = 0x0285,
|
||||
},
|
||||
{
|
||||
.bg = 2,
|
||||
.tilemapLeft = 18,
|
||||
.tilemapTop = 3,
|
||||
.width = 10,
|
||||
.height = 8,
|
||||
.paletteNum = 9,
|
||||
.baseBlock = 0x0365,
|
||||
},
|
||||
DUMMY_WIN_TEMPLATE
|
||||
};
|
||||
|
||||
static const struct BgTemplate gUnknown_0856E668[] =
|
||||
{
|
||||
{
|
||||
.bg = 2,
|
||||
.charBaseIndex = 2,
|
||||
.mapBaseIndex = 14,
|
||||
.screenSize = 0,
|
||||
.paletteMode = 0,
|
||||
.priority = 2,
|
||||
.baseTile = 0
|
||||
},
|
||||
{
|
||||
.bg = 3,
|
||||
.charBaseIndex = 1,
|
||||
.mapBaseIndex = 15,
|
||||
.screenSize = 0,
|
||||
.paletteMode = 0,
|
||||
.priority = 3,
|
||||
.baseTile = 0
|
||||
},
|
||||
};
|
||||
|
||||
static const struct WindowTemplate gUnknown_0856E670[] =
|
||||
{
|
||||
{
|
||||
.bg = 2,
|
||||
.tilemapLeft = 0,
|
||||
.tilemapTop = 0,
|
||||
.width = 32,
|
||||
.height = 20,
|
||||
.paletteNum = 0,
|
||||
.baseBlock = 0x0001,
|
||||
},
|
||||
{
|
||||
.bg = 2,
|
||||
.tilemapLeft = 25,
|
||||
.tilemapTop = 8,
|
||||
.width = 2,
|
||||
.height = 2,
|
||||
.paletteNum = 15,
|
||||
.baseBlock = 0x0281,
|
||||
},
|
||||
DUMMY_WIN_TEMPLATE
|
||||
};
|
||||
|
||||
static const u8 sText_TenDashes2[] = _("----------");
|
||||
|
||||
#include "data/pokemon_graphics/footprint_table.h"
|
||||
|
||||
static const u8 gUnknown_0856ED08[][4] =
|
||||
{
|
||||
{0x00, 0x00, 0x00, 0x00},
|
||||
{0xbb, 0x03, 0xd5, 0x03},
|
||||
{0xbe, 0x03, 0xd8, 0x03},
|
||||
{0xc1, 0x03, 0xdb, 0x03},
|
||||
{0xc4, 0x03, 0xde, 0x03},
|
||||
{0xc7, 0x03, 0xe1, 0x03},
|
||||
{0xca, 0x03, 0xe4, 0x03},
|
||||
{0xcd, 0x03, 0xe7, 0x03},
|
||||
{0xd0, 0x03, 0xea, 0x03},
|
||||
{0xd3, 0x02, 0xed, 0x02},
|
||||
};
|
||||
|
||||
static const struct UnknownStruct3 gUnknown_0856ED30[] =
|
||||
{
|
||||
{
|
||||
.text = gUnknown_085E87A5,
|
||||
.unk4 = 0,
|
||||
.unk5 = 0,
|
||||
.unk6 = 5,
|
||||
},
|
||||
{
|
||||
.text = gUnknown_085E87D6,
|
||||
.unk4 = 6,
|
||||
.unk5 = 0,
|
||||
.unk6 = 5,
|
||||
},
|
||||
{
|
||||
.text = gUnknown_085E87EF,
|
||||
.unk4 = 12,
|
||||
.unk5 = 0,
|
||||
.unk6 = 5,
|
||||
},
|
||||
};
|
||||
|
||||
static const struct UnknownStruct4 gUnknown_0856ED48[] =
|
||||
{
|
||||
{
|
||||
.text = gUnknown_085E8840,
|
||||
.unk4 = 0,
|
||||
.unk5 = 2,
|
||||
.unk6 = 5,
|
||||
.unk7 = 5,
|
||||
.unk8 = 2,
|
||||
.unk9 = 12,
|
||||
},
|
||||
{
|
||||
.text = gUnknown_085E887C,
|
||||
.unk4 = 0,
|
||||
.unk5 = 4,
|
||||
.unk6 = 5,
|
||||
.unk7 = 5,
|
||||
.unk8 = 4,
|
||||
.unk9 = 12,
|
||||
},
|
||||
{
|
||||
.text = gUnknown_085E88A6,
|
||||
.unk4 = 0,
|
||||
.unk5 = 6,
|
||||
.unk6 = 5,
|
||||
.unk7 = 5,
|
||||
.unk8 = 6,
|
||||
.unk9 = 6,
|
||||
},
|
||||
{
|
||||
.text = gUnknown_085E88A6,
|
||||
.unk4 = 0,
|
||||
.unk5 = 6,
|
||||
.unk6 = 5,
|
||||
.unk7 = 11,
|
||||
.unk8 = 6,
|
||||
.unk9 = 6,
|
||||
},
|
||||
{
|
||||
.text = gUnknown_085E881F,
|
||||
.unk4 = 0,
|
||||
.unk5 = 8,
|
||||
.unk6 = 5,
|
||||
.unk7 = 5,
|
||||
.unk8 = 8,
|
||||
.unk9 = 12,
|
||||
},
|
||||
{
|
||||
.text = gUnknown_085E8806,
|
||||
.unk4 = 0,
|
||||
.unk5 = 10,
|
||||
.unk6 = 5,
|
||||
.unk7 = 5,
|
||||
.unk8 = 10,
|
||||
.unk9 = 12,
|
||||
},
|
||||
{
|
||||
.text = gUnknown_085E88C8,
|
||||
.unk4 = 0,
|
||||
.unk5 = 12,
|
||||
.unk6 = 5,
|
||||
.unk7 = 0,
|
||||
.unk8 = 0,
|
||||
.unk9 = 0,
|
||||
},
|
||||
};
|
||||
|
||||
static const u8 gUnknown_0856ED9C[][4] =
|
||||
{
|
||||
{0xFF, 0xFF, 0xFF, 1},
|
||||
{0xFF, 0xFF, 0, 2},
|
||||
{0xFF, 3, 1, 4},
|
||||
{ 2, 0xFF, 1, 4},
|
||||
{0xFF, 0xFF, 2, 5},
|
||||
{0xFF, 0xFF, 4, 6},
|
||||
{0xFF, 0xFF, 5, 0xFF},
|
||||
};
|
||||
|
||||
static const u8 gUnknown_0856EDB8[][4] =
|
||||
{
|
||||
{0xFF, 0xFF, 0xFF, 0xFF},
|
||||
{0xFF, 0xFF, 0xFF, 0xFF},
|
||||
{0xFF, 0xFF, 0xFF, 0xFF},
|
||||
{0xFF, 0xFF, 0xFF, 0xFF},
|
||||
{0xFF, 0xFF, 0xFF, 5},
|
||||
{0xFF, 0xFF, 4, 6},
|
||||
{0xFF, 0xFF, 5, 0xFF},
|
||||
};
|
||||
|
||||
static const u8 gUnknown_0856EDD4[][4] =
|
||||
{
|
||||
{0xFF, 0xFF, 0xFF, 1},
|
||||
{0xFF, 0xFF, 0, 2},
|
||||
{0xFF, 3, 1, 4},
|
||||
{ 2, 0xFF, 1, 4},
|
||||
{0xFF, 0xFF, 2, 6},
|
||||
{0xFF, 0xFF, 0xFF, 0xFF},
|
||||
{0xFF, 0xFF, 4, 0xFF},
|
||||
};
|
||||
|
||||
static const u8 gUnknown_0856EDF0[][4] =
|
||||
{
|
||||
{0xFF, 0xFF, 0xFF, 0xFF},
|
||||
{0xFF, 0xFF, 0xFF, 0xFF},
|
||||
{0xFF, 0xFF, 0xFF, 0xFF},
|
||||
{0xFF, 0xFF, 0xFF, 0xFF},
|
||||
{0xFF, 0xFF, 0xFF, 6},
|
||||
{0xFF, 0xFF, 0xFF, 0xFF},
|
||||
{0xFF, 0xFF, 4, 0xFF},
|
||||
};
|
||||
|
||||
static const struct UnknownStruct2 gUnknown_0856EE0C[] =
|
||||
{
|
||||
{gUnknown_085E89A4, gUnknown_085E88DF},
|
||||
{gUnknown_085E89BB, gUnknown_085E88E9},
|
||||
{NULL, NULL},
|
||||
};
|
||||
|
||||
static const struct UnknownStruct2 gUnknown_0856EE24[] =
|
||||
{
|
||||
{gUnknown_085E89D4, gUnknown_085E88F6},
|
||||
{gUnknown_085E8A02, gUnknown_085E8905},
|
||||
{gUnknown_085E8A37, gUnknown_085E8911},
|
||||
{gUnknown_085E8A73, gUnknown_085E891F},
|
||||
{gUnknown_085E8AAF, gUnknown_085E892D},
|
||||
{gUnknown_085E8AEA, gUnknown_085E893A},
|
||||
{NULL, NULL},
|
||||
};
|
||||
|
||||
static const struct UnknownStruct2 gUnknown_0856EE5C[] =
|
||||
{
|
||||
{gUnknown_085E8B25, gUnknown_085E8B26},
|
||||
{gUnknown_085E8B25, gUnknown_085E8948},
|
||||
{gUnknown_085E8B25, gUnknown_085E894C},
|
||||
{gUnknown_085E8B25, gUnknown_085E8950},
|
||||
{gUnknown_085E8B25, gUnknown_085E8954},
|
||||
{gUnknown_085E8B25, gUnknown_085E8958},
|
||||
{gUnknown_085E8B25, gUnknown_085E895C},
|
||||
{gUnknown_085E8B25, gUnknown_085E8960},
|
||||
{gUnknown_085E8B25, gUnknown_085E8964},
|
||||
{gUnknown_085E8B25, gUnknown_085E8968},
|
||||
{NULL, NULL},
|
||||
};
|
||||
|
||||
static const struct UnknownStruct2 gUnknown_0856EEB4[] =
|
||||
{
|
||||
{gUnknown_085E8B25, gUnknown_085E8B26},
|
||||
{gUnknown_085E8B25, gUnknown_085E896B},
|
||||
{gUnknown_085E8B25, gUnknown_085E896F},
|
||||
{gUnknown_085E8B25, gUnknown_085E8974},
|
||||
{gUnknown_085E8B25, gUnknown_085E897B},
|
||||
{gUnknown_085E8B25, gUnknown_085E8981},
|
||||
{gUnknown_085E8B25, gUnknown_085E8987},
|
||||
{gUnknown_085E8B25, gUnknown_085E898D},
|
||||
{gUnknown_085E8B25, gUnknown_085E8994},
|
||||
{gUnknown_085E8B25, gUnknown_085E8999},
|
||||
{gUnknown_085E8B25, gUnknown_085E899F},
|
||||
{NULL, NULL},
|
||||
};
|
||||
|
||||
static const struct UnknownStruct2 gUnknown_0856EF14[] =
|
||||
{
|
||||
{gUnknown_085E8B25, gUnknown_085E8B35},
|
||||
{gUnknown_085E8B25, gTypeNames[TYPE_NORMAL]},
|
||||
{gUnknown_085E8B25, gTypeNames[TYPE_FIGHTING]},
|
||||
{gUnknown_085E8B25, gTypeNames[TYPE_FLYING]},
|
||||
{gUnknown_085E8B25, gTypeNames[TYPE_POISON]},
|
||||
{gUnknown_085E8B25, gTypeNames[TYPE_GROUND]},
|
||||
{gUnknown_085E8B25, gTypeNames[TYPE_ROCK]},
|
||||
{gUnknown_085E8B25, gTypeNames[TYPE_BUG]},
|
||||
{gUnknown_085E8B25, gTypeNames[TYPE_GHOST]},
|
||||
{gUnknown_085E8B25, gTypeNames[TYPE_STEEL]},
|
||||
{gUnknown_085E8B25, gTypeNames[TYPE_FIRE]},
|
||||
{gUnknown_085E8B25, gTypeNames[TYPE_WATER]},
|
||||
{gUnknown_085E8B25, gTypeNames[TYPE_GRASS]},
|
||||
{gUnknown_085E8B25, gTypeNames[TYPE_ELECTRIC]},
|
||||
{gUnknown_085E8B25, gTypeNames[TYPE_PSYCHIC]},
|
||||
{gUnknown_085E8B25, gTypeNames[TYPE_ICE]},
|
||||
{gUnknown_085E8B25, gTypeNames[TYPE_DRAGON]},
|
||||
{gUnknown_085E8B25, gTypeNames[TYPE_DARK]},
|
||||
{NULL, NULL},
|
||||
};
|
||||
|
||||
static const u8 gUnknown_0856EFAC[] = {0x00, 0x01};
|
||||
static const u8 gUnknown_0856EFAE[] = {0x00, 0x01, 0x02, 0x03, 0x04, 0x05};
|
||||
static const u8 gUnknown_0856EFB4[] = {0xFF, 0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17};
|
||||
|
||||
static const struct UnknownStruct1 gUnknown_0856EFC8[] =
|
||||
{
|
||||
{gUnknown_0856EE5C, 6, 7, 10},
|
||||
{gUnknown_0856EEB4, 8, 9, 11},
|
||||
{gUnknown_0856EF14, 10,11, 18},
|
||||
{gUnknown_0856EF14, 12, 13, 18},
|
||||
{gUnknown_0856EE24, 4, 5, 6},
|
||||
{gUnknown_0856EE0C, 2, 3, 2},
|
||||
};
|
||||
|
||||
static const struct BgTemplate gUnknown_0856EFF8[] =
|
||||
{
|
||||
{
|
||||
.bg = 0,
|
||||
.charBaseIndex = 2,
|
||||
.mapBaseIndex = 12,
|
||||
.screenSize = 0,
|
||||
.paletteMode = 0,
|
||||
.priority = 0,
|
||||
.baseTile = 0
|
||||
},
|
||||
{
|
||||
.bg = 1,
|
||||
.charBaseIndex = 0,
|
||||
.mapBaseIndex = 13,
|
||||
.screenSize = 0,
|
||||
.paletteMode = 0,
|
||||
.priority = 1,
|
||||
.baseTile = 0
|
||||
},
|
||||
{
|
||||
.bg = 2,
|
||||
.charBaseIndex = 2,
|
||||
.mapBaseIndex = 14,
|
||||
.screenSize = 0,
|
||||
.paletteMode = 0,
|
||||
.priority = 2,
|
||||
.baseTile = 0
|
||||
},
|
||||
{
|
||||
.bg = 3,
|
||||
.charBaseIndex = 0,
|
||||
.mapBaseIndex = 15,
|
||||
.screenSize = 0,
|
||||
.paletteMode = 0,
|
||||
.priority = 3,
|
||||
.baseTile = 0
|
||||
}
|
||||
};
|
||||
|
||||
static const struct WindowTemplate gUnknown_0856F008[] =
|
||||
{
|
||||
{
|
||||
.bg = 2,
|
||||
.tilemapLeft = 0,
|
||||
.tilemapTop = 0,
|
||||
.width = 32,
|
||||
.height = 20,
|
||||
.paletteNum = 0,
|
||||
.baseBlock = 0x0001,
|
||||
},
|
||||
DUMMY_WIN_TEMPLATE
|
||||
};
|
||||
|
||||
// .text
|
||||
|
||||
@@ -3511,7 +3918,7 @@ void sub_80C020C(u32 num, u32 value, u32 c, u32 d)
|
||||
if (c)
|
||||
text3 = gPokedexEntries[num].description;
|
||||
else
|
||||
text3 = gUnknown_0855D30C;
|
||||
text3 = gExpandedPlaceholder_PokedexDescription;
|
||||
sub_80BE8DC(text3, GetStringCenterAlignXOffset(1, text3, 0xF0), 0x5F);
|
||||
}
|
||||
|
||||
|
||||
+1
-2
@@ -4,6 +4,7 @@
|
||||
#include "battle_controllers.h"
|
||||
#include "battle_message.h"
|
||||
#include "battle_pike.h"
|
||||
#include "battle_pyramid.h"
|
||||
#include "battle_setup.h"
|
||||
#include "battle_tower.h"
|
||||
#include "event_data.h"
|
||||
@@ -81,9 +82,7 @@ extern u8 StorageGetCurrentBox(void);
|
||||
extern void set_unknown_box_id(u8);
|
||||
extern void sub_803FA70(u8 battlerId);
|
||||
extern u8 sav1_map_get_name(void);
|
||||
extern bool8 InBattlePyramid(void);
|
||||
extern bool8 sub_806F104(void);
|
||||
extern u8 GetTrainerEncounterMusicIdInBattlePyramind(u16 trainerOpponentId);
|
||||
extern u8 sub_81D63C8(u16 trainerOpponentId);
|
||||
extern void SummaryScreen_SetUnknownTaskId(u8);
|
||||
|
||||
|
||||
@@ -206,13 +206,13 @@ void GiveGiftRibbonToParty(u8 index, u8 ribbonId)
|
||||
if (index < 11 && ribbonId < 65)
|
||||
{
|
||||
gSaveBlock1Ptr->giftRibbons[index] = ribbonId;
|
||||
for (i = 0; i < 6; i++)
|
||||
for (i = 0; i < PARTY_SIZE; i++)
|
||||
{
|
||||
struct Pokemon *pkmn = &gPlayerParty[i];
|
||||
struct Pokemon *mon = &gPlayerParty[i];
|
||||
|
||||
if (GetMonData(pkmn, MON_DATA_SPECIES) != 0 && GetMonData(pkmn, MON_DATA_SANITY_BIT3) == 0)
|
||||
if (GetMonData(mon, MON_DATA_SPECIES) != 0 && GetMonData(mon, MON_DATA_SANITY_BIT3) == 0)
|
||||
{
|
||||
SetMonData(pkmn, array[index], &data);
|
||||
SetMonData(mon, array[index], &data);
|
||||
gotRibbon = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ int GameClear(void)
|
||||
|
||||
ribbonGet = FALSE;
|
||||
|
||||
for (i = 0; i < 6; i++)
|
||||
for (i = 0; i < PARTY_SIZE; i++)
|
||||
{
|
||||
struct Pokemon *mon = &gPlayerParty[i];
|
||||
|
||||
|
||||
@@ -490,7 +490,7 @@ bool32 MoveRecordedBattleToSaveData(void)
|
||||
|
||||
static bool32 TryCopyRecordedBattleSaveData(struct RecordedBattleSave *dst, struct SaveSection *saveBuffer)
|
||||
{
|
||||
if (TryCopySpecialSaveSection(SECTION_ID_RECORDED_BATTLE, (void*)(saveBuffer)) != 1)
|
||||
if (TryCopySpecialSaveSection(SECTOR_ID_RECORDED_BATTLE, (void*)(saveBuffer)) != 1)
|
||||
return FALSE;
|
||||
|
||||
memcpy(dst, saveBuffer, sizeof(struct RecordedBattleSave));
|
||||
|
||||
@@ -16,15 +16,6 @@
|
||||
#include "battle_anim.h"
|
||||
#include "data2.h"
|
||||
|
||||
extern u16 gBattle_BG0_X;
|
||||
extern u16 gBattle_BG0_Y;
|
||||
extern u16 gBattle_BG1_X;
|
||||
extern u16 gBattle_BG1_Y;
|
||||
extern u16 gBattle_BG2_X;
|
||||
extern u16 gBattle_BG2_Y;
|
||||
extern u16 gBattle_BG3_X;
|
||||
extern u16 gBattle_BG3_Y;
|
||||
|
||||
extern const union AnimCmd * const * const gMonAnimationsSpriteAnimsPtrTable[];
|
||||
|
||||
extern void SetMultiuseSpriteTemplateToTrainerBack(u16 backPicId, u8 battlerPosition);
|
||||
|
||||
+600
-15
@@ -1,22 +1,37 @@
|
||||
#include "global.h"
|
||||
#include "battle_anim.h"
|
||||
#include "gpu_regs.h"
|
||||
#include "graphics.h"
|
||||
#include "palette.h"
|
||||
#include "sound.h"
|
||||
#include "task.h"
|
||||
#include "trig.h"
|
||||
#include "constants/rgb.h"
|
||||
|
||||
extern void sub_81109F0(struct Sprite *);
|
||||
extern void sub_8110AB4(struct Sprite *);
|
||||
extern void sub_8110B38(struct Sprite *);
|
||||
extern void sub_8110E4C(struct Sprite *);
|
||||
extern void sub_8110F30(struct Sprite *);
|
||||
extern void sub_811131C(struct Sprite *);
|
||||
extern void sub_8111388(struct Sprite *);
|
||||
extern void sub_8111418(struct Sprite *);
|
||||
extern void sub_8111444(struct Sprite *);
|
||||
extern void sub_80FF268(struct Sprite *);
|
||||
extern void sub_80A8EE4(struct Sprite *);
|
||||
#include "constants/songs.h"
|
||||
|
||||
extern const union AnimCmd *const gUnknown_085950E0[];
|
||||
extern const union AnimCmd *const gUnknown_085954D0[];
|
||||
|
||||
extern void AnimMoveTwisterParticle(struct Sprite *);
|
||||
|
||||
void sub_81109F0(struct Sprite *);
|
||||
void sub_8110AB4(struct Sprite *);
|
||||
void AnimDirtParticleAcrossScreen(struct Sprite *);
|
||||
void AnimRaiseSprite(struct Sprite *);
|
||||
void sub_81110A4(u8 taskId);
|
||||
void sub_811131C(struct Sprite *);
|
||||
void sub_8111388(struct Sprite *);
|
||||
void sub_8111418(struct Sprite *);
|
||||
void sub_8111444(struct Sprite *);
|
||||
void sub_8110B38(struct Sprite *);
|
||||
static void sub_8110A70(struct Sprite *);
|
||||
static void sub_8110B80(struct Sprite *sprite);
|
||||
static void sub_8110CB0(u8 taskId);
|
||||
static void sub_8111214(struct Task *task);
|
||||
static u8 sub_811135C(void);
|
||||
static void sub_81113C8(struct Sprite *sprite);
|
||||
static void sub_811149C(struct Sprite *sprite);
|
||||
|
||||
const union AnimCmd gUnknown_08596AE0[] =
|
||||
{
|
||||
ANIMCMD_FRAME(32, 1),
|
||||
@@ -118,7 +133,7 @@ const struct SpriteTemplate gBattleAnimSpriteTemplate_8596BA0 =
|
||||
.anims = gDummySpriteAnimTable,
|
||||
.images = NULL,
|
||||
.affineAnims = gDummySpriteAffineAnimTable,
|
||||
.callback = sub_8110E4C,
|
||||
.callback = AnimDirtParticleAcrossScreen,
|
||||
};
|
||||
|
||||
const struct Subsprite gUnknown_08596BB8[] =
|
||||
@@ -194,7 +209,7 @@ const struct SpriteTemplate gUnknown_08596C10 =
|
||||
.anims = gUnknown_08596BF8,
|
||||
.images = NULL,
|
||||
.affineAnims = gDummySpriteAffineAnimTable,
|
||||
.callback = sub_8110F30,
|
||||
.callback = AnimRaiseSprite,
|
||||
};
|
||||
|
||||
const struct SpriteTemplate gUnknown_08596C28 =
|
||||
@@ -278,7 +293,7 @@ const struct SpriteTemplate gUnknown_08596CC8 =
|
||||
.anims = gUnknown_08596C08,
|
||||
.images = NULL,
|
||||
.affineAnims = gUnknown_08596C90,
|
||||
.callback = sub_80FF268,
|
||||
.callback = AnimMoveTwisterParticle,
|
||||
};
|
||||
|
||||
const struct SpriteTemplate gUnknown_08596CE0 =
|
||||
@@ -291,3 +306,573 @@ const struct SpriteTemplate gUnknown_08596CE0 =
|
||||
.affineAnims = gUnknown_08596C90,
|
||||
.callback = sub_80A8EE4,
|
||||
};
|
||||
|
||||
void sub_81109F0(struct Sprite *sprite)
|
||||
{
|
||||
if (gBattleAnimArgs[3] != 0)
|
||||
SetAverageBattlerPositions(gBattleAnimTarget, 0, &sprite->pos1.x, &sprite->pos1.y);
|
||||
|
||||
sprite->pos1.x += gBattleAnimArgs[0];
|
||||
sprite->pos1.y += 14;
|
||||
|
||||
StartSpriteAnim(sprite, gBattleAnimArgs[1]);
|
||||
AnimateSprite(sprite);
|
||||
|
||||
sprite->data[0] = 0;
|
||||
sprite->data[1] = 0;
|
||||
sprite->data[2] = 4;
|
||||
sprite->data[3] = 16;
|
||||
sprite->data[4] = -70;
|
||||
sprite->data[5] = gBattleAnimArgs[2];
|
||||
|
||||
StoreSpriteCallbackInData6(sprite, sub_8110A70);
|
||||
sprite->callback = sub_80A6450;
|
||||
sprite->callback(sprite);
|
||||
}
|
||||
|
||||
static void sub_8110A70(struct Sprite *sprite)
|
||||
{
|
||||
sprite->pos1.x += sprite->data[5];
|
||||
|
||||
sprite->data[0] = 192;
|
||||
sprite->data[1] = sprite->data[5];
|
||||
sprite->data[2] = 4;
|
||||
sprite->data[3] = 32;
|
||||
sprite->data[4] = -24;
|
||||
|
||||
StoreSpriteCallbackInData6(sprite, move_anim_8074EE0);
|
||||
sprite->callback = sub_80A6450;
|
||||
sprite->callback(sprite);
|
||||
}
|
||||
|
||||
void sub_8110AB4(struct Sprite *sprite)
|
||||
{
|
||||
StartSpriteAnim(sprite, gBattleAnimArgs[5]);
|
||||
AnimateSprite(sprite);
|
||||
|
||||
if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER)
|
||||
sprite->pos1.x -= gBattleAnimArgs[0];
|
||||
else
|
||||
sprite->pos1.x += gBattleAnimArgs[0];
|
||||
|
||||
sprite->pos1.y += gBattleAnimArgs[1];
|
||||
|
||||
sprite->data[0] = gBattleAnimArgs[4];
|
||||
sprite->data[1] = sprite->pos1.x;
|
||||
sprite->data[2] = sprite->pos1.x + gBattleAnimArgs[2];
|
||||
sprite->data[3] = sprite->pos1.y;
|
||||
sprite->data[4] = sprite->pos1.y + gBattleAnimArgs[3];
|
||||
|
||||
InitSpriteDataForLinearTranslation(sprite);
|
||||
sprite->data[3] = 0;
|
||||
sprite->data[4] = 0;
|
||||
|
||||
sprite->callback = sub_80A656C;
|
||||
StoreSpriteCallbackInData6(sprite, move_anim_8074EE0);
|
||||
}
|
||||
|
||||
void sub_8110B38(struct Sprite *sprite)
|
||||
{
|
||||
if (gBattleAnimArgs[6] == 0)
|
||||
InitAnimSpritePos(sprite, 0);
|
||||
else
|
||||
sub_80A6980(sprite, FALSE);
|
||||
|
||||
sprite->data[0] = gBattleAnimArgs[3];
|
||||
sprite->data[1] = gBattleAnimArgs[2];
|
||||
sprite->data[2] = gBattleAnimArgs[4];
|
||||
sprite->data[3] = gBattleAnimArgs[5];
|
||||
|
||||
sprite->callback = sub_8110B80;
|
||||
}
|
||||
|
||||
static void sub_8110B80(struct Sprite *sprite)
|
||||
{
|
||||
sprite->data[4] += sprite->data[1];
|
||||
sprite->pos2.y = -(sprite->data[4] >> 8);
|
||||
sprite->pos2.x = Sin(sprite->data[5], sprite->data[3]);
|
||||
sprite->data[5] = (sprite->data[5] + sprite->data[2]) & 0xFF;
|
||||
|
||||
if (--sprite->data[0] == -1)
|
||||
{
|
||||
DestroyAnimSprite(sprite);
|
||||
}
|
||||
}
|
||||
|
||||
void AnimTask_LoadSandstormBackground(u8 taskId)
|
||||
{
|
||||
int var0;
|
||||
struct UnknownAnimStruct2 unknownStruct;
|
||||
|
||||
var0 = 0;
|
||||
SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT1_BG1 | BLDCNT_TGT2_ALL | BLDCNT_EFFECT_BLEND);
|
||||
SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(0, 16));
|
||||
SetAnimBgAttribute(1, BG_ANIM_PRIORITY, 1);
|
||||
SetAnimBgAttribute(1, BG_ANIM_SCREEN_SIZE, 0);
|
||||
|
||||
if (!IsContest())
|
||||
SetAnimBgAttribute(1, BG_ANIM_CHAR_BASE_BLOCK, 1);
|
||||
|
||||
gBattle_BG1_X = 0;
|
||||
gBattle_BG1_Y = 0;
|
||||
SetGpuReg(REG_OFFSET_BG1HOFS, gBattle_BG1_X);
|
||||
SetGpuReg(REG_OFFSET_BG1VOFS, gBattle_BG1_Y);
|
||||
|
||||
sub_80A6B30(&unknownStruct);
|
||||
sub_80A6CC0(unknownStruct.bgId, gUnknown_08D8D58C, unknownStruct.tilesOffset);
|
||||
sub_80A6D60(&unknownStruct, gUnknown_08D8D410, 0);
|
||||
LoadCompressedPalette(&gBattleAnimSpritePalette_261, unknownStruct.unk8 * 16, 32);
|
||||
|
||||
if (gBattleAnimArgs[0] && GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER)
|
||||
var0 = 1;
|
||||
|
||||
gTasks[taskId].data[0] = var0;
|
||||
gTasks[taskId].func = sub_8110CB0;
|
||||
}
|
||||
|
||||
static void sub_8110CB0(u8 taskId)
|
||||
{
|
||||
struct UnknownAnimStruct2 unknownStruct;
|
||||
|
||||
if (gTasks[taskId].data[0] == 0)
|
||||
gBattle_BG1_X += -6;
|
||||
else
|
||||
gBattle_BG1_X += 6;
|
||||
|
||||
gBattle_BG1_Y += -1;
|
||||
|
||||
switch (gTasks[taskId].data[12])
|
||||
{
|
||||
case 0:
|
||||
if (++gTasks[taskId].data[10] == 4)
|
||||
{
|
||||
gTasks[taskId].data[10] = 0;
|
||||
gTasks[taskId].data[11]++;
|
||||
SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(gTasks[taskId].data[11], 16 - gTasks[taskId].data[11]));
|
||||
if (gTasks[taskId].data[11] == 7)
|
||||
{
|
||||
gTasks[taskId].data[12]++;
|
||||
gTasks[taskId].data[11] = 0;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (++gTasks[taskId].data[11] == 101)
|
||||
{
|
||||
gTasks[taskId].data[11] = 7;
|
||||
gTasks[taskId].data[12]++;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (++gTasks[taskId].data[10] == 4)
|
||||
{
|
||||
gTasks[taskId].data[10] = 0;
|
||||
gTasks[taskId].data[11]--;
|
||||
SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(gTasks[taskId].data[11], 16 - gTasks[taskId].data[11]));
|
||||
if (gTasks[taskId].data[11] == 0)
|
||||
{
|
||||
gTasks[taskId].data[12]++;
|
||||
gTasks[taskId].data[11] = 0;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
sub_80A6B30(&unknownStruct);
|
||||
sub_80A6C68(unknownStruct.bgId);
|
||||
gTasks[taskId].data[12]++;
|
||||
break;
|
||||
case 4:
|
||||
if (!IsContest())
|
||||
SetAnimBgAttribute(1, BG_ANIM_CHAR_BASE_BLOCK, 0);
|
||||
|
||||
gBattle_BG1_X = 0;
|
||||
gBattle_BG1_Y = 0;
|
||||
SetGpuReg(REG_OFFSET_BLDCNT, 0);
|
||||
SetGpuReg(REG_OFFSET_BLDALPHA, 0);
|
||||
SetAnimBgAttribute(1, BG_ANIM_PRIORITY, 1);
|
||||
DestroyAnimVisualTask(taskId);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Animates the sprites that fly diagonally across the screen
|
||||
// in Sandstorm and Heat Wave.
|
||||
// arg 0: initial y pixel offset
|
||||
// arg 1: projectile speed
|
||||
// arg 2: y pixel drop
|
||||
// arg 3: ??? unknown (possibly a color bit)
|
||||
void AnimDirtParticleAcrossScreen(struct Sprite *sprite)
|
||||
{
|
||||
if (sprite->data[0] == 0)
|
||||
{
|
||||
if (gBattleAnimArgs[3] != 0 && GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER)
|
||||
{
|
||||
sprite->pos1.x = 304;
|
||||
gBattleAnimArgs[1] = -gBattleAnimArgs[1];
|
||||
sprite->data[5] = 1;
|
||||
sprite->oam.matrixNum = 8;
|
||||
}
|
||||
else
|
||||
{
|
||||
sprite->pos1.x = -64;
|
||||
}
|
||||
|
||||
sprite->pos1.y = gBattleAnimArgs[0];
|
||||
SetSubspriteTables(sprite, gUnknown_08596BC0);
|
||||
sprite->data[1] = gBattleAnimArgs[1];
|
||||
sprite->data[2] = gBattleAnimArgs[2];
|
||||
sprite->data[0]++;
|
||||
}
|
||||
else
|
||||
{
|
||||
sprite->data[3] += sprite->data[1];
|
||||
sprite->data[4] += sprite->data[2];
|
||||
sprite->pos2.x += (sprite->data[3] >> 8);
|
||||
sprite->pos2.y += (sprite->data[4] >> 8);
|
||||
sprite->data[3] &= 0xFF;
|
||||
sprite->data[4] &= 0xFF;
|
||||
|
||||
if (sprite->data[5] == 0)
|
||||
{
|
||||
if (sprite->pos1.x + sprite->pos2.x > 272)
|
||||
{
|
||||
sprite->callback = DestroyAnimSprite;
|
||||
}
|
||||
}
|
||||
else if (sprite->pos1.x + sprite->pos2.x < -32)
|
||||
{
|
||||
sprite->callback = DestroyAnimSprite;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Animates the rising rocks in Ancient Power.
|
||||
// arg 0: initial x pixel offset
|
||||
// arg 1: initial y pixel offset
|
||||
// arg 2: terminal y offset
|
||||
// arg 3: duration
|
||||
// arg 4: sprite size [1,5]
|
||||
void AnimRaiseSprite(struct Sprite *sprite)
|
||||
{
|
||||
StartSpriteAnim(sprite, gBattleAnimArgs[4]);
|
||||
InitAnimSpritePos(sprite, 0);
|
||||
|
||||
sprite->data[0] = gBattleAnimArgs[3];
|
||||
sprite->data[2] = sprite->pos1.x;
|
||||
sprite->data[4] = sprite->pos1.y + gBattleAnimArgs[2];
|
||||
|
||||
sprite->callback = StartAnimLinearTranslation;
|
||||
StoreSpriteCallbackInData6(sprite, DestroyAnimSprite);
|
||||
}
|
||||
|
||||
void sub_8110F74(u8 taskId)
|
||||
{
|
||||
u16 var0, var1, var2, var3;
|
||||
u8 var4;
|
||||
int var5;
|
||||
s16 pan1, pan2;
|
||||
struct Task *task;
|
||||
|
||||
task = &gTasks[taskId];
|
||||
|
||||
var0 = GetBattlerSpriteCoord(gBattleAnimAttacker, 2);
|
||||
var1 = GetBattlerSpriteCoord(gBattleAnimAttacker, 1) + 24;
|
||||
var2 = GetBattlerSpriteCoord(gBattleAnimTarget, 2);
|
||||
var3 = GetBattlerSpriteCoord(gBattleAnimTarget, 1) + 24;
|
||||
|
||||
if (BATTLE_PARTNER(gBattleAnimAttacker) == gBattleAnimTarget)
|
||||
var3 = var1;
|
||||
|
||||
var4 = sub_811135C();
|
||||
if (var4 == 1)
|
||||
task->data[8] = 32;
|
||||
else
|
||||
task->data[8] = 48 - (var4 * 8);
|
||||
|
||||
task->data[0] = 0;
|
||||
task->data[11] = 0;
|
||||
task->data[9] = 0;
|
||||
task->data[12] = 1;
|
||||
|
||||
var5 = task->data[8];
|
||||
if (var5 < 0)
|
||||
var5 += 7;
|
||||
|
||||
task->data[10] = (var5 >> 3) - 1;
|
||||
|
||||
task->data[2] = var0 * 8;
|
||||
task->data[3] = var1 * 8;
|
||||
task->data[4] = ((var2 - var0) * 8) / task->data[8];
|
||||
task->data[5] = ((var3 - var1) * 8) / task->data[8];
|
||||
task->data[6] = 0;
|
||||
task->data[7] = 0;
|
||||
|
||||
pan1 = BattleAnimAdjustPanning(-64);
|
||||
pan2 = BattleAnimAdjustPanning(63);
|
||||
|
||||
task->data[13] = pan1;
|
||||
task->data[14] = (pan2 - pan1) / task->data[8];
|
||||
task->data[1] = var4;
|
||||
task->data[15] = GetAnimBattlerSpriteId(0);
|
||||
|
||||
task->func = sub_81110A4;
|
||||
}
|
||||
|
||||
void sub_81110A4(u8 taskId)
|
||||
{
|
||||
struct Task *task;
|
||||
|
||||
task = &gTasks[taskId];
|
||||
|
||||
switch (task->data[0])
|
||||
{
|
||||
case 0:
|
||||
task->data[6] -= task->data[4];
|
||||
task->data[7] -= task->data[5];
|
||||
gSprites[task->data[15]].pos2.x = task->data[6] >> 3;
|
||||
gSprites[task->data[15]].pos2.y = task->data[7] >> 3;
|
||||
|
||||
if (++task->data[9] == 10)
|
||||
{
|
||||
task->data[11] = 20;
|
||||
task->data[0]++;
|
||||
}
|
||||
|
||||
PlaySE12WithPanning(SE_W029, task->data[13]);
|
||||
break;
|
||||
case 1:
|
||||
if (--task->data[11] == 0)
|
||||
task->data[0]++;
|
||||
break;
|
||||
case 2:
|
||||
if (--task->data[9] != 0)
|
||||
{
|
||||
task->data[6] += task->data[4];
|
||||
task->data[7] += task->data[5];
|
||||
}
|
||||
else
|
||||
{
|
||||
task->data[6] = 0;
|
||||
task->data[7] = 0;
|
||||
task->data[0]++;
|
||||
}
|
||||
|
||||
gSprites[task->data[15]].pos2.x = task->data[6] >> 3;
|
||||
gSprites[task->data[15]].pos2.y = task->data[7] >> 3;
|
||||
break;
|
||||
case 3:
|
||||
task->data[2] += task->data[4];
|
||||
task->data[3] += task->data[5];
|
||||
if (++task->data[9] >= task->data[10])
|
||||
{
|
||||
task->data[9] = 0;
|
||||
sub_8111214(task);
|
||||
task->data[13] += task->data[14];
|
||||
PlaySE12WithPanning(SE_W091, task->data[13]);
|
||||
}
|
||||
|
||||
if (--task->data[8] == 0)
|
||||
{
|
||||
task->data[0]++;
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
if (task->data[11] == 0)
|
||||
DestroyAnimVisualTask(taskId);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void sub_8111214(struct Task *task)
|
||||
{
|
||||
const struct SpriteTemplate *spriteTemplate;
|
||||
int var0;
|
||||
u16 x, y;
|
||||
u8 spriteId;
|
||||
|
||||
switch (task->data[1])
|
||||
{
|
||||
case 1:
|
||||
spriteTemplate = &gUnknown_08596C28;
|
||||
var0 = 0;
|
||||
break;
|
||||
case 2:
|
||||
case 3:
|
||||
spriteTemplate = &gUnknown_08596C40;
|
||||
var0 = 80;
|
||||
break;
|
||||
case 4:
|
||||
spriteTemplate = &gUnknown_08596C40;
|
||||
var0 = 64;
|
||||
break;
|
||||
case 5:
|
||||
spriteTemplate = &gUnknown_08596C40;
|
||||
var0 = 48;
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
||||
x = task->data[2] >> 3;
|
||||
y = task->data[3] >> 3;
|
||||
x += (task->data[12] * 4);
|
||||
|
||||
spriteId = CreateSprite(spriteTemplate, x, y, 35);
|
||||
if (spriteId != MAX_SPRITES)
|
||||
{
|
||||
gSprites[spriteId].data[0] = 18;
|
||||
gSprites[spriteId].data[2] = ((task->data[12] * 20) + x) + (task->data[1] * 3);
|
||||
gSprites[spriteId].data[4] = y;
|
||||
gSprites[spriteId].data[5] = -16 - (task->data[1] * 2);
|
||||
gSprites[spriteId].oam.tileNum += var0;
|
||||
|
||||
InitAnimArcTranslation(&gSprites[spriteId]);
|
||||
task->data[11]++;
|
||||
}
|
||||
|
||||
task->data[12] *= -1;
|
||||
}
|
||||
|
||||
void sub_811131C(struct Sprite *sprite)
|
||||
{
|
||||
if (TranslateAnimArc(sprite))
|
||||
{
|
||||
u8 taskId = FindTaskIdByFunc(sub_81110A4);
|
||||
if (taskId != 0xFF)
|
||||
gTasks[taskId].data[11]--;
|
||||
|
||||
DestroySprite(sprite);
|
||||
}
|
||||
}
|
||||
|
||||
static u8 sub_811135C(void)
|
||||
{
|
||||
u8 retVal = gAnimDisableStructPtr->rolloutTimerStartValue - gAnimDisableStructPtr->rolloutTimer;
|
||||
u8 var0 = retVal - 1;
|
||||
if (var0 > 4)
|
||||
retVal = 1;
|
||||
|
||||
return retVal;
|
||||
}
|
||||
|
||||
void sub_8111388(struct Sprite *sprite)
|
||||
{
|
||||
StartSpriteAnim(sprite, gBattleAnimArgs[4]);
|
||||
|
||||
sprite->pos2.x = gBattleAnimArgs[0];
|
||||
sprite->data[2] = gBattleAnimArgs[1];
|
||||
sprite->data[3] -= gBattleAnimArgs[2];
|
||||
sprite->data[0] = 3;
|
||||
sprite->data[1] = gBattleAnimArgs[3];
|
||||
sprite->callback = sub_81113C8;
|
||||
sprite->invisible = 1;
|
||||
}
|
||||
|
||||
static void sub_81113C8(struct Sprite *sprite)
|
||||
{
|
||||
sprite->invisible = 0;
|
||||
if (sprite->data[3] != 0)
|
||||
{
|
||||
sprite->pos2.y = sprite->data[2] + sprite->data[3];
|
||||
sprite->data[3] += sprite->data[0];
|
||||
sprite->data[0]++;
|
||||
if (sprite->data[3] > 0)
|
||||
{
|
||||
sprite->data[3] = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (--sprite->data[1] == 0)
|
||||
DestroyAnimSprite(sprite);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_8111418(struct Sprite *sprite)
|
||||
{
|
||||
if (GetBattlerSide(gBattleAnimAttacker) == B_SIDE_OPPONENT)
|
||||
StartSpriteAffineAnim(sprite, 1);
|
||||
|
||||
TranslateAnimSpriteToTargetMonLocation(sprite);
|
||||
}
|
||||
|
||||
void sub_8111444(struct Sprite *sprite)
|
||||
{
|
||||
sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimTarget, 0);
|
||||
sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimTarget, 1);
|
||||
sprite->pos1.x += gBattleAnimArgs[0];
|
||||
sprite->pos1.y += gBattleAnimArgs[1];
|
||||
|
||||
sprite->data[1] = gBattleAnimArgs[0];
|
||||
sprite->data[2] = gBattleAnimArgs[1];
|
||||
sprite->data[5] = gBattleAnimArgs[2];
|
||||
|
||||
StartSpriteAnim(sprite, gBattleAnimArgs[3]);
|
||||
sprite->callback = sub_811149C;
|
||||
}
|
||||
|
||||
static void sub_811149C(struct Sprite *sprite)
|
||||
{
|
||||
sprite->data[0] += 8;
|
||||
sprite->data[3] += sprite->data[1];
|
||||
sprite->data[4] += sprite->data[2];
|
||||
|
||||
sprite->pos2.x += sprite->data[3] / 40;
|
||||
sprite->pos2.y -= Sin(sprite->data[0], sprite->data[5]);
|
||||
|
||||
if (sprite->data[0] > 140)
|
||||
DestroyAnimSprite(sprite);
|
||||
}
|
||||
|
||||
void AnimTask_GetSeismicTossDamageLevel(u8 taskId)
|
||||
{
|
||||
if (gAnimMoveDmg < 33)
|
||||
gBattleAnimArgs[7] = 0;
|
||||
if ((u32)gAnimMoveDmg - 33 < 33)
|
||||
gBattleAnimArgs[7] = 1;
|
||||
if (gAnimMoveDmg > 65)
|
||||
gBattleAnimArgs[7] = 2;
|
||||
|
||||
DestroyAnimVisualTask(taskId);
|
||||
}
|
||||
|
||||
void sub_811152C(u8 taskId)
|
||||
{
|
||||
if (gTasks[taskId].data[0] == 0)
|
||||
{
|
||||
sub_80A6DAC(0);
|
||||
gTasks[taskId].data[1] = 200;
|
||||
}
|
||||
|
||||
gBattle_BG3_Y += gTasks[taskId].data[1] / 10;
|
||||
gTasks[taskId].data[1] -= 3;
|
||||
|
||||
if (gTasks[taskId].data[0] == 120)
|
||||
{
|
||||
sub_80A6DAC(1);
|
||||
DestroyAnimVisualTask(taskId);
|
||||
}
|
||||
|
||||
gTasks[taskId].data[0]++;
|
||||
}
|
||||
|
||||
void sub_8111590(u8 taskId)
|
||||
{
|
||||
if (gTasks[taskId].data[0] == 0)
|
||||
{
|
||||
sub_80A6DAC(0);
|
||||
gTasks[taskId].data[0]++;
|
||||
gTasks[taskId].data[2] = gBattle_BG3_Y;
|
||||
}
|
||||
|
||||
gTasks[taskId].data[1] += 80;
|
||||
gTasks[taskId].data[1] &= 0xFF;
|
||||
gBattle_BG3_Y = gTasks[taskId].data[2] + Cos(4, gTasks[taskId].data[1]);
|
||||
|
||||
if (gBattleAnimArgs[7] == 0xFFF)
|
||||
{
|
||||
gBattle_BG3_Y = 0;
|
||||
sub_80A6DAC(1);
|
||||
DestroyAnimVisualTask(taskId);
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -1784,7 +1784,7 @@ void sub_801440C(u8 taskId)
|
||||
ScriptContext2_Disable();
|
||||
}
|
||||
|
||||
extern u8 gUnknown_0203CEF8[];
|
||||
extern u8 gSelectedOrderFromParty[];
|
||||
|
||||
void sub_8014790(u8 taskId)
|
||||
{
|
||||
@@ -1802,8 +1802,8 @@ void sub_8014790(u8 taskId)
|
||||
gLinkPlayers[0].linkType = 0x2211;
|
||||
gLinkPlayers[0].id = 0;
|
||||
gLinkPlayers[1].id = 2;
|
||||
sendBuff[0] = GetMonData(&gPlayerParty[gUnknown_0203CEF8[0] - 1], MON_DATA_SPECIES);
|
||||
sendBuff[1] = GetMonData(&gPlayerParty[gUnknown_0203CEF8[1] - 1], MON_DATA_SPECIES, NULL);
|
||||
sendBuff[0] = GetMonData(&gPlayerParty[gSelectedOrderFromParty[0] - 1], MON_DATA_SPECIES);
|
||||
sendBuff[1] = GetMonData(&gPlayerParty[gSelectedOrderFromParty[1] - 1], MON_DATA_SPECIES, NULL);
|
||||
gMain.savedCallback = NULL;
|
||||
data[0] = 4;
|
||||
sub_800E3A8();
|
||||
|
||||
+62
-61
@@ -1,15 +1,23 @@
|
||||
#include "global.h"
|
||||
#include "gba/flash_internal.h"
|
||||
#include "save.h"
|
||||
#include "constants/game_stat.h"
|
||||
#include "task.h"
|
||||
#include "decompress.h"
|
||||
#include "load_save.h"
|
||||
#include "overworld.h"
|
||||
#include "main.h"
|
||||
#include "constants/game_stat.h"
|
||||
|
||||
static u16 CalculateChecksum(void *data, u16 size);
|
||||
static u8 DoReadFlashWholeSection(u8 sector, struct SaveSection *section);
|
||||
static u8 GetSaveValidStatus(const struct SaveSectionLocation *location);
|
||||
static u8 sub_8152E10(u16 a1, const struct SaveSectionLocation *location);
|
||||
static u8 ClearSaveData_2(u16 a1, const struct SaveSectionLocation *location);
|
||||
static u8 TryWriteSector(u8 sector, u8 *data);
|
||||
static u8 HandleWriteSector(u16 a1, const struct SaveSectionLocation *location);
|
||||
|
||||
// for the chunk declarations
|
||||
|
||||
extern bool8 gSoftResetDisabled;
|
||||
extern u32 gUnknown_0203CF5C;
|
||||
|
||||
// Divide save blocks into individual chunks to be written to flash sectors
|
||||
@@ -24,7 +32,7 @@ extern u32 gUnknown_0203CF5C;
|
||||
* Sectors 0 - 13: Save Slot 1
|
||||
* Sectors 14 - 27: Save Slot 2
|
||||
* Sectors 28 - 29: Hall of Fame
|
||||
* Sector 30: e-Reader/Mystery Gift Stuff (note: e-Reader is deprecated in Emerald US)
|
||||
* Sector 30: Trainer Hill
|
||||
* Sector 31: Recorded Battle
|
||||
*
|
||||
* There are two save slots for saving the player's game data. We alternate between
|
||||
@@ -86,6 +94,7 @@ u16 gSaveUnusedVar2;
|
||||
u16 gUnknown_03006294;
|
||||
|
||||
EWRAM_DATA struct SaveSection gSaveDataBuffer = {0};
|
||||
EWRAM_DATA static u8 sUnusedVar = 0;
|
||||
|
||||
void ClearSaveData(void)
|
||||
{
|
||||
@@ -105,7 +114,7 @@ void Save_ResetSaveCounters(void)
|
||||
gDamagedSaveSectors = 0;
|
||||
}
|
||||
|
||||
bool32 SetDamagedSectorBits(u8 op, u8 bit)
|
||||
static bool32 SetDamagedSectorBits(u8 op, u8 bit)
|
||||
{
|
||||
bool32 retVal = FALSE;
|
||||
|
||||
@@ -126,7 +135,7 @@ bool32 SetDamagedSectorBits(u8 op, u8 bit)
|
||||
return retVal;
|
||||
}
|
||||
|
||||
u8 save_write_to_flash(u16 a1, const struct SaveSectionLocation *location)
|
||||
static u8 save_write_to_flash(u16 a1, const struct SaveSectionLocation *location)
|
||||
{
|
||||
u32 retVal;
|
||||
u16 i;
|
||||
@@ -142,11 +151,11 @@ u8 save_write_to_flash(u16 a1, const struct SaveSectionLocation *location)
|
||||
gLastKnownGoodSector = gLastWrittenSector; // backup the current written sector before attempting to write.
|
||||
gLastSaveCounter = gSaveCounter;
|
||||
gLastWrittenSector++;
|
||||
gLastWrittenSector = gLastWrittenSector % 0xE; // array count save sector locations
|
||||
gLastWrittenSector = gLastWrittenSector % SECTOR_SAVE_SLOT_LENGTH; // array count save sector locations
|
||||
gSaveCounter++;
|
||||
retVal = 1;
|
||||
|
||||
for (i = 0; i < 0xE; i++)
|
||||
for (i = 0; i < SECTOR_SAVE_SLOT_LENGTH; i++)
|
||||
HandleWriteSector(i, location);
|
||||
|
||||
if (gDamagedSaveSectors != 0) // skip the damaged sector.
|
||||
@@ -160,7 +169,7 @@ u8 save_write_to_flash(u16 a1, const struct SaveSectionLocation *location)
|
||||
return retVal;
|
||||
}
|
||||
|
||||
u8 HandleWriteSector(u16 a1, const struct SaveSectionLocation *location)
|
||||
static u8 HandleWriteSector(u16 a1, const struct SaveSectionLocation *location)
|
||||
{
|
||||
u16 i;
|
||||
u16 sector;
|
||||
@@ -168,8 +177,8 @@ u8 HandleWriteSector(u16 a1, const struct SaveSectionLocation *location)
|
||||
u16 size;
|
||||
|
||||
sector = a1 + gLastWrittenSector;
|
||||
sector %= 0xE;
|
||||
sector += 0xE * (gSaveCounter % 2);
|
||||
sector %= SECTOR_SAVE_SLOT_LENGTH;
|
||||
sector += SECTOR_SAVE_SLOT_LENGTH * (gSaveCounter % 2);
|
||||
|
||||
data = location[a1].data;
|
||||
size = location[a1].size;
|
||||
@@ -189,7 +198,7 @@ u8 HandleWriteSector(u16 a1, const struct SaveSectionLocation *location)
|
||||
return TryWriteSector(sector, gFastSaveSection->data);
|
||||
}
|
||||
|
||||
u8 HandleWriteSectorNBytes(u8 sector, u8 *data, u16 size)
|
||||
static u8 HandleWriteSectorNBytes(u8 sector, u8 *data, u16 size)
|
||||
{
|
||||
u16 i;
|
||||
struct SaveSection *section = &gSaveDataBuffer;
|
||||
@@ -206,7 +215,7 @@ u8 HandleWriteSectorNBytes(u8 sector, u8 *data, u16 size)
|
||||
return TryWriteSector(sector, section->data);
|
||||
}
|
||||
|
||||
u8 TryWriteSector(u8 sector, u8 *data)
|
||||
static u8 TryWriteSector(u8 sector, u8 *data)
|
||||
{
|
||||
if (ProgramFlashSectorAndVerify(sector, data) != 0) // is damaged?
|
||||
{
|
||||
@@ -220,20 +229,20 @@ u8 TryWriteSector(u8 sector, u8 *data)
|
||||
}
|
||||
}
|
||||
|
||||
u32 RestoreSaveBackupVarsAndIncrement(const struct SaveSectionLocation *location) // location is unused
|
||||
static u32 RestoreSaveBackupVarsAndIncrement(const struct SaveSectionLocation *location) // location is unused
|
||||
{
|
||||
gFastSaveSection = &gSaveDataBuffer;
|
||||
gLastKnownGoodSector = gLastWrittenSector;
|
||||
gLastSaveCounter = gSaveCounter;
|
||||
gLastWrittenSector++;
|
||||
gLastWrittenSector = gLastWrittenSector % 0xE;
|
||||
gLastWrittenSector %= SECTOR_SAVE_SLOT_LENGTH;
|
||||
gSaveCounter++;
|
||||
gUnknown_03006208 = 0;
|
||||
gDamagedSaveSectors = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
u32 RestoreSaveBackupVars(const struct SaveSectionLocation *location) // only ever called once, and gSaveBlock2 is passed to this function. location is unused
|
||||
static u32 RestoreSaveBackupVars(const struct SaveSectionLocation *location) // only ever called once, and gSaveBlock2 is passed to this function. location is unused
|
||||
{
|
||||
gFastSaveSection = &gSaveDataBuffer;
|
||||
gLastKnownGoodSector = gLastWrittenSector;
|
||||
@@ -243,7 +252,7 @@ u32 RestoreSaveBackupVars(const struct SaveSectionLocation *location) // only ev
|
||||
return 0;
|
||||
}
|
||||
|
||||
u8 sub_81529D4(u16 a1, const struct SaveSectionLocation *location)
|
||||
static u8 sub_81529D4(u16 a1, const struct SaveSectionLocation *location)
|
||||
{
|
||||
u8 retVal;
|
||||
|
||||
@@ -267,7 +276,7 @@ u8 sub_81529D4(u16 a1, const struct SaveSectionLocation *location)
|
||||
return retVal;
|
||||
}
|
||||
|
||||
u8 sub_8152A34(u16 a1, const struct SaveSectionLocation *location)
|
||||
static u8 sub_8152A34(u16 a1, const struct SaveSectionLocation *location)
|
||||
{
|
||||
u8 retVal = 1;
|
||||
|
||||
@@ -282,7 +291,7 @@ u8 sub_8152A34(u16 a1, const struct SaveSectionLocation *location)
|
||||
return retVal;
|
||||
}
|
||||
|
||||
u8 ClearSaveData_2(u16 a1, const struct SaveSectionLocation *location)
|
||||
static u8 ClearSaveData_2(u16 a1, const struct SaveSectionLocation *location)
|
||||
{
|
||||
u16 i;
|
||||
u16 sector;
|
||||
@@ -291,8 +300,8 @@ u8 ClearSaveData_2(u16 a1, const struct SaveSectionLocation *location)
|
||||
u8 status;
|
||||
|
||||
sector = a1 + gLastWrittenSector;
|
||||
sector %= 0xE;
|
||||
sector += 0xE * (gSaveCounter % 2);
|
||||
sector %= SECTOR_SAVE_SLOT_LENGTH;
|
||||
sector += SECTOR_SAVE_SLOT_LENGTH * (gSaveCounter % 2);
|
||||
|
||||
data = location[a1].data;
|
||||
size = location[a1].size;
|
||||
@@ -356,13 +365,13 @@ u8 ClearSaveData_2(u16 a1, const struct SaveSectionLocation *location)
|
||||
}
|
||||
}
|
||||
|
||||
u8 sav12_xor_get(u16 a1, const struct SaveSectionLocation *location)
|
||||
static u8 sav12_xor_get(u16 a1, const struct SaveSectionLocation *location)
|
||||
{
|
||||
u16 sector;
|
||||
|
||||
sector = a1 + gLastWrittenSector; // no sub 1?
|
||||
sector %= 0xE;
|
||||
sector += 0xE * (gSaveCounter % 2);
|
||||
sector %= SECTOR_SAVE_SLOT_LENGTH;
|
||||
sector += SECTOR_SAVE_SLOT_LENGTH * (gSaveCounter % 2);
|
||||
|
||||
if (ProgramFlashByte(sector, sizeof(struct UnkSaveSection), 0x25))
|
||||
{
|
||||
@@ -379,13 +388,13 @@ u8 sav12_xor_get(u16 a1, const struct SaveSectionLocation *location)
|
||||
}
|
||||
}
|
||||
|
||||
u8 sub_8152CAC(u16 a1, const struct SaveSectionLocation *location)
|
||||
static u8 sub_8152CAC(u16 a1, const struct SaveSectionLocation *location)
|
||||
{
|
||||
u16 sector;
|
||||
|
||||
sector = a1 + gLastWrittenSector - 1;
|
||||
sector %= 0xE;
|
||||
sector += 0xE * (gSaveCounter % 2);
|
||||
sector %= SECTOR_SAVE_SLOT_LENGTH;
|
||||
sector += SECTOR_SAVE_SLOT_LENGTH * (gSaveCounter % 2);
|
||||
|
||||
if (ProgramFlashByte(sector, sizeof(struct UnkSaveSection), ((u8 *)gFastSaveSection)[sizeof(struct UnkSaveSection)]))
|
||||
{
|
||||
@@ -402,13 +411,13 @@ u8 sub_8152CAC(u16 a1, const struct SaveSectionLocation *location)
|
||||
}
|
||||
}
|
||||
|
||||
u8 sub_8152D44(u16 a1, const struct SaveSectionLocation *location)
|
||||
static u8 sub_8152D44(u16 a1, const struct SaveSectionLocation *location)
|
||||
{
|
||||
u16 sector;
|
||||
|
||||
sector = a1 + gLastWrittenSector - 1; // no sub 1?
|
||||
sector %= 0xE;
|
||||
sector += 0xE * (gSaveCounter % 2);
|
||||
sector %= SECTOR_SAVE_SLOT_LENGTH;
|
||||
sector += SECTOR_SAVE_SLOT_LENGTH * (gSaveCounter % 2);
|
||||
|
||||
if (ProgramFlashByte(sector, sizeof(struct UnkSaveSection), 0x25))
|
||||
{
|
||||
@@ -425,7 +434,7 @@ u8 sub_8152D44(u16 a1, const struct SaveSectionLocation *location)
|
||||
}
|
||||
}
|
||||
|
||||
u8 sub_8152DD0(u16 a1, const struct SaveSectionLocation *location)
|
||||
static u8 sub_8152DD0(u16 a1, const struct SaveSectionLocation *location)
|
||||
{
|
||||
u8 retVal;
|
||||
gFastSaveSection = &gSaveDataBuffer;
|
||||
@@ -442,14 +451,14 @@ u8 sub_8152DD0(u16 a1, const struct SaveSectionLocation *location)
|
||||
return retVal;
|
||||
}
|
||||
|
||||
u8 sub_8152E10(u16 a1, const struct SaveSectionLocation *location)
|
||||
static u8 sub_8152E10(u16 a1, const struct SaveSectionLocation *location)
|
||||
{
|
||||
u16 i;
|
||||
u16 checksum;
|
||||
u16 v3 = 0xE * (gSaveCounter % 2);
|
||||
u16 v3 = SECTOR_SAVE_SLOT_LENGTH * (gSaveCounter % 2);
|
||||
u16 id;
|
||||
|
||||
for (i = 0; i < 0xE; i++)
|
||||
for (i = 0; i < SECTOR_SAVE_SLOT_LENGTH; i++)
|
||||
{
|
||||
DoReadFlashWholeSection(i + v3, gFastSaveSection);
|
||||
id = gFastSaveSection->id;
|
||||
@@ -468,7 +477,7 @@ u8 sub_8152E10(u16 a1, const struct SaveSectionLocation *location)
|
||||
return 1;
|
||||
}
|
||||
|
||||
u8 GetSaveValidStatus(const struct SaveSectionLocation *location)
|
||||
static u8 GetSaveValidStatus(const struct SaveSectionLocation *location)
|
||||
{
|
||||
u16 i;
|
||||
u16 checksum;
|
||||
@@ -480,7 +489,7 @@ u8 GetSaveValidStatus(const struct SaveSectionLocation *location)
|
||||
u8 saveSlot2Status;
|
||||
|
||||
// check save slot 1.
|
||||
for (i = 0; i < 0xE; i++)
|
||||
for (i = 0; i < SECTOR_SAVE_SLOT_LENGTH; i++)
|
||||
{
|
||||
DoReadFlashWholeSection(i, gFastSaveSection);
|
||||
if (gFastSaveSection->security == UNKNOWN_CHECK_VALUE)
|
||||
@@ -511,9 +520,9 @@ u8 GetSaveValidStatus(const struct SaveSectionLocation *location)
|
||||
securityPassed = FALSE;
|
||||
|
||||
// check save slot 2.
|
||||
for (i = 0; i < 0xE; i++)
|
||||
for (i = 0; i < SECTOR_SAVE_SLOT_LENGTH; i++)
|
||||
{
|
||||
DoReadFlashWholeSection(i + 0xE, gFastSaveSection);
|
||||
DoReadFlashWholeSection(i + SECTOR_SAVE_SLOT_LENGTH, gFastSaveSection);
|
||||
if (gFastSaveSection->security == UNKNOWN_CHECK_VALUE)
|
||||
{
|
||||
securityPassed = TRUE;
|
||||
@@ -543,24 +552,16 @@ u8 GetSaveValidStatus(const struct SaveSectionLocation *location)
|
||||
if ((saveSlot1Counter == -1 && saveSlot2Counter == 0) || (saveSlot1Counter == 0 && saveSlot2Counter == -1))
|
||||
{
|
||||
if ((unsigned)(saveSlot1Counter + 1) < (unsigned)(saveSlot2Counter + 1))
|
||||
{
|
||||
gSaveCounter = saveSlot2Counter;
|
||||
}
|
||||
else
|
||||
{
|
||||
gSaveCounter = saveSlot1Counter;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (saveSlot1Counter < saveSlot2Counter)
|
||||
{
|
||||
gSaveCounter = saveSlot2Counter;
|
||||
}
|
||||
else
|
||||
{
|
||||
gSaveCounter = saveSlot1Counter;
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
@@ -593,7 +594,7 @@ u8 GetSaveValidStatus(const struct SaveSectionLocation *location)
|
||||
return 2;
|
||||
}
|
||||
|
||||
u8 sub_81530DC(u8 a1, u8 *data, u16 size)
|
||||
static u8 sub_81530DC(u8 a1, u8 *data, u16 size)
|
||||
{
|
||||
u16 i;
|
||||
struct SaveSection *section = &gSaveDataBuffer;
|
||||
@@ -618,13 +619,13 @@ u8 sub_81530DC(u8 a1, u8 *data, u16 size)
|
||||
}
|
||||
}
|
||||
|
||||
u8 DoReadFlashWholeSection(u8 sector, struct SaveSection *section)
|
||||
static u8 DoReadFlashWholeSection(u8 sector, struct SaveSection *section)
|
||||
{
|
||||
ReadFlash(sector, 0, section->data, sizeof(struct SaveSection));
|
||||
return 1;
|
||||
}
|
||||
|
||||
u16 CalculateChecksum(void *data, u16 size)
|
||||
static u16 CalculateChecksum(void *data, u16 size)
|
||||
{
|
||||
u16 i;
|
||||
u32 checksum = 0;
|
||||
@@ -635,7 +636,7 @@ u16 CalculateChecksum(void *data, u16 size)
|
||||
return ((checksum >> 16) + checksum);
|
||||
}
|
||||
|
||||
void UpdateSaveAddresses(void)
|
||||
static void UpdateSaveAddresses(void)
|
||||
{
|
||||
int i = 0;
|
||||
|
||||
@@ -668,7 +669,7 @@ u8 HandleSavingData(u8 saveType)
|
||||
switch (saveType)
|
||||
{
|
||||
case SAVE_HALL_OF_FAME_ERASE_BEFORE: // deletes HOF before overwriting HOF completely. unused
|
||||
for (i = 0xE * 2 + 0; i < 32; i++)
|
||||
for (i = SECTOR_ID_HOF_1; i < SECTORS_COUNT; i++)
|
||||
EraseFlashSector(i);
|
||||
case SAVE_HALL_OF_FAME: // hall of fame.
|
||||
if (GetGameStat(GAME_STAT_ENTERED_HOF) < 999)
|
||||
@@ -676,8 +677,8 @@ u8 HandleSavingData(u8 saveType)
|
||||
SaveSerializedGame();
|
||||
save_write_to_flash(0xFFFF, gRamSaveSectionLocations);
|
||||
tempAddr = gDecompressionBuffer;
|
||||
HandleWriteSectorNBytes(0x1C, tempAddr, 0xF80);
|
||||
HandleWriteSectorNBytes(0x1D, tempAddr + 0xF80, 0xF80);
|
||||
HandleWriteSectorNBytes(SECTOR_ID_HOF_1, tempAddr, 0xF80);
|
||||
HandleWriteSectorNBytes(SECTOR_ID_HOF_2, tempAddr + 0xF80, 0xF80);
|
||||
break;
|
||||
case SAVE_NORMAL: // normal save. also called by overwriting your own save.
|
||||
default:
|
||||
@@ -692,7 +693,7 @@ u8 HandleSavingData(u8 saveType)
|
||||
for(i = 0; i < 5; i++)
|
||||
sav12_xor_get(i, gRamSaveSectionLocations);
|
||||
break;
|
||||
// support for Ereader was removed in Emerald.
|
||||
// Support for Ereader was removed in Emerald.
|
||||
/*
|
||||
case EREADER_SAVE: // used in mossdeep "game corner" before/after battling old man e-reader trainer
|
||||
SaveSerializedGame();
|
||||
@@ -700,7 +701,7 @@ u8 HandleSavingData(u8 saveType)
|
||||
break;
|
||||
*/
|
||||
case SAVE_OVERWRITE_DIFFERENT_FILE:
|
||||
for (i = (0xE * 2 + 0); i < 32; i++)
|
||||
for (i = SECTOR_ID_HOF_1; i < SECTORS_COUNT; i++)
|
||||
EraseFlashSector(i); // erase HOF.
|
||||
SaveSerializedGame();
|
||||
save_write_to_flash(0xFFFF, gRamSaveSectionLocations);
|
||||
@@ -710,7 +711,7 @@ u8 HandleSavingData(u8 saveType)
|
||||
return 0;
|
||||
}
|
||||
|
||||
u8 TrySavingData(u8 saveType) // TrySave
|
||||
u8 TrySavingData(u8 saveType)
|
||||
{
|
||||
if (gFlashMemoryPresent != TRUE)
|
||||
{
|
||||
@@ -744,7 +745,7 @@ bool8 sub_8153380(void) // trade.s save
|
||||
|
||||
bool8 sub_81533AC(void) // trade.s save
|
||||
{
|
||||
u8 retVal = sub_81529D4(0xE, gRamSaveSectionLocations);
|
||||
u8 retVal = sub_81529D4(SECTOR_SAVE_SLOT_LENGTH, gRamSaveSectionLocations);
|
||||
if (gDamagedSaveSectors)
|
||||
DoSaveFailedScreen(0);
|
||||
if (retVal == 0xFF)
|
||||
@@ -755,7 +756,7 @@ bool8 sub_81533AC(void) // trade.s save
|
||||
|
||||
u8 sub_81533E0(void) // trade.s save
|
||||
{
|
||||
sub_8152A34(0xE, gRamSaveSectionLocations);
|
||||
sub_8152A34(SECTOR_SAVE_SLOT_LENGTH, gRamSaveSectionLocations);
|
||||
if (gDamagedSaveSectors)
|
||||
DoSaveFailedScreen(0);
|
||||
return 0;
|
||||
@@ -763,7 +764,7 @@ u8 sub_81533E0(void) // trade.s save
|
||||
|
||||
u8 sub_8153408(void) // trade.s save
|
||||
{
|
||||
sub_8152CAC(0xE, gRamSaveSectionLocations);
|
||||
sub_8152CAC(SECTOR_SAVE_SLOT_LENGTH, gRamSaveSectionLocations);
|
||||
if (gDamagedSaveSectors)
|
||||
DoSaveFailedScreen(0);
|
||||
return 0;
|
||||
@@ -840,8 +841,8 @@ u16 sub_815355C(void)
|
||||
return 0;
|
||||
UpdateSaveAddresses();
|
||||
GetSaveValidStatus(gRamSaveSectionLocations);
|
||||
v3 = 0xE * (gSaveCounter % 2);
|
||||
for (i = 0; i < 14; i++)
|
||||
v3 = SECTOR_SAVE_SLOT_LENGTH * (gSaveCounter % 2);
|
||||
for (i = 0; i < SECTOR_SAVE_SLOT_LENGTH; i++)
|
||||
{
|
||||
DoReadFlashWholeSection(i + v3, gFastSaveSection);
|
||||
if (gFastSaveSection->id == 0)
|
||||
@@ -859,7 +860,7 @@ u32 TryCopySpecialSaveSection(u8 sector, u8* dst)
|
||||
s32 size;
|
||||
u8* savData;
|
||||
|
||||
if (sector != 30 && sector != 31)
|
||||
if (sector != SECTOR_ID_TRAINER_HILL && sector != SECTOR_ID_RECORDED_BATTLE)
|
||||
return 0xFF;
|
||||
ReadFlash(sector, 0, (u8 *)&gSaveDataBuffer, sizeof(struct SaveSection));
|
||||
if (*(u32*)(&gSaveDataBuffer.data[0]) != 0xB39D)
|
||||
|
||||
+74
-75
@@ -13,16 +13,17 @@
|
||||
#include "starter_choose.h"
|
||||
#include "gba/flash_internal.h"
|
||||
#include "text_window.h"
|
||||
#include "constants/rgb.h"
|
||||
|
||||
#define MSG_WIN_TOP 12
|
||||
#define CLOCK_WIN_TOP (MSG_WIN_TOP - 4)
|
||||
|
||||
extern u8 gText_SaveFailedCheckingBackup[];
|
||||
extern u8 gText_BackupMemoryDamaged[];
|
||||
extern u8 gText_CheckCompleted[];
|
||||
extern u8 gText_SaveCompleteGameCannotContinue[];
|
||||
extern u8 gText_SaveCompletePressA[];
|
||||
extern u8 gText_GamePlayCannotBeContinued[];
|
||||
extern const u8 gText_SaveFailedCheckingBackup[];
|
||||
extern const u8 gText_BackupMemoryDamaged[];
|
||||
extern const u8 gText_CheckCompleted[];
|
||||
extern const u8 gText_SaveCompleteGameCannotContinue[];
|
||||
extern const u8 gText_SaveCompletePressA[];
|
||||
extern const u8 gText_GamePlayCannotBeContinued[];
|
||||
|
||||
// gSaveFailedClockInfo enum
|
||||
enum
|
||||
@@ -155,8 +156,8 @@ static void VBlankCB_UpdateClockGraphics(void);
|
||||
static bool8 VerifySectorWipe(u16 sector);
|
||||
static bool8 WipeSectors(u32);
|
||||
|
||||
// although this is a general text printer, it's only used in this file.
|
||||
static void SaveFailedScreenTextPrint(u8 *text, u8 var1, u8 var2)
|
||||
// Although this is a general text printer, it's only used in this file.
|
||||
static void SaveFailedScreenTextPrint(const u8 *text, u8 var1, u8 var2)
|
||||
{
|
||||
u8 color[3];
|
||||
|
||||
@@ -187,72 +188,70 @@ static void CB2_SaveFailedScreen(void)
|
||||
{
|
||||
switch (gMain.state)
|
||||
{
|
||||
case 0:
|
||||
default:
|
||||
SetVBlankCallback(NULL);
|
||||
SetGpuReg(REG_OFFSET_DISPCNT, 0);
|
||||
SetGpuReg(REG_OFFSET_BG3CNT, 0);
|
||||
SetGpuReg(REG_OFFSET_BG2CNT, 0);
|
||||
SetGpuReg(REG_OFFSET_BG1CNT, 0);
|
||||
SetGpuReg(REG_OFFSET_BG0CNT, 0);
|
||||
SetGpuReg(REG_OFFSET_BG3HOFS, 0);
|
||||
SetGpuReg(REG_OFFSET_BG3VOFS, 0);
|
||||
SetGpuReg(REG_OFFSET_BG2HOFS, 0);
|
||||
SetGpuReg(REG_OFFSET_BG2VOFS, 0);
|
||||
SetGpuReg(REG_OFFSET_BG1HOFS, 0);
|
||||
SetGpuReg(REG_OFFSET_BG1VOFS, 0);
|
||||
SetGpuReg(REG_OFFSET_BG0HOFS, 0);
|
||||
SetGpuReg(REG_OFFSET_BG0VOFS, 0);
|
||||
// how come this doesnt use the Dma manager?
|
||||
DmaFill16(3, 0, VRAM, VRAM_SIZE);
|
||||
DmaFill32(3, 0, OAM, OAM_SIZE);
|
||||
DmaFill16(3, 0, PLTT, PLTT_SIZE);
|
||||
LZ77UnCompVram(gBirchHelpGfx, (void *)VRAM);
|
||||
LZ77UnCompVram(gBirchBagTilemap, (void *)(VRAM + 0x7000));
|
||||
LZ77UnCompVram(gBirchGrassTilemap, (void *)(VRAM + 0x7800));
|
||||
LZ77UnCompVram(sSaveFailedClockGfx, (void *)(VRAM + 0x10020));
|
||||
ResetBgsAndClearDma3BusyFlags(0);
|
||||
InitBgsFromTemplates(0, gUnknown_085EFD88, 3);
|
||||
SetBgTilemapBuffer(0, (void *)&gDecompressionBuffer[0x2000]);
|
||||
CpuFill32(0, &gDecompressionBuffer[0x2000], 0x800);
|
||||
LoadBgTiles(0, gTextWindowFrame1_Gfx, 0x120, 0x214);
|
||||
InitWindows(gUnknown_085EFD94);
|
||||
// AddWindowWithoutTileMap returns a u16/integer, but the info is clobbered into a u8 here resulting in lost info. Bug?
|
||||
gSaveFailedWindowIds[TEXT_WIN_ID] = AddWindowWithoutTileMap(gUnknown_085EFD9C);
|
||||
SetWindowAttribute(gSaveFailedWindowIds[TEXT_WIN_ID], 7, (u32)&gDecompressionBuffer[0x2800]);
|
||||
gSaveFailedWindowIds[CLOCK_WIN_ID] = AddWindowWithoutTileMap(gUnknown_085EFDA4);
|
||||
SetWindowAttribute(gSaveFailedWindowIds[CLOCK_WIN_ID], 7, (u32)&gDecompressionBuffer[0x3D00]);
|
||||
DeactivateAllTextPrinters();
|
||||
ResetSpriteData();
|
||||
ResetTasks();
|
||||
ResetPaletteFade();
|
||||
LoadPalette(gBirchBagGrassPal, 0, 0x40);
|
||||
LoadPalette(sSaveFailedClockPal, 0x100, 0x20);
|
||||
LoadPalette(gTextWindowFrame1_Pal, 0xE0, 0x20);
|
||||
LoadPalette(gUnknown_0860F074, 0xF0, 0x20);
|
||||
SetWindowBorderStyle(gSaveFailedWindowIds[TEXT_WIN_ID], FALSE, 0x214, 0xE);
|
||||
SetWindowBorderStyle(gSaveFailedWindowIds[CLOCK_WIN_ID], FALSE, 0x214, 0xE);
|
||||
FillWindowPixelBuffer(gSaveFailedWindowIds[CLOCK_WIN_ID], 0x11); // backwards?
|
||||
FillWindowPixelBuffer(gSaveFailedWindowIds[TEXT_WIN_ID], 0x11);
|
||||
CopyWindowToVram(gSaveFailedWindowIds[CLOCK_WIN_ID], 2); // again?
|
||||
CopyWindowToVram(gSaveFailedWindowIds[TEXT_WIN_ID], 1);
|
||||
SaveFailedScreenTextPrint(gText_SaveFailedCheckingBackup, 1, 0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, 0);
|
||||
EnableInterrupts(1);
|
||||
SetVBlankCallback(VBlankCB);
|
||||
SetGpuReg(0, 0x1040);
|
||||
ShowBg(0);
|
||||
ShowBg(2);
|
||||
ShowBg(3);
|
||||
gMain.state++;
|
||||
break;
|
||||
case 1:
|
||||
if (!UpdatePaletteFade())
|
||||
{
|
||||
SetMainCallback2(CB2_WipeSave);
|
||||
SetVBlankCallback(VBlankCB_UpdateClockGraphics);
|
||||
}
|
||||
break;
|
||||
case 0:
|
||||
default:
|
||||
SetVBlankCallback(NULL);
|
||||
SetGpuReg(REG_OFFSET_DISPCNT, 0);
|
||||
SetGpuReg(REG_OFFSET_BG3CNT, 0);
|
||||
SetGpuReg(REG_OFFSET_BG2CNT, 0);
|
||||
SetGpuReg(REG_OFFSET_BG1CNT, 0);
|
||||
SetGpuReg(REG_OFFSET_BG0CNT, 0);
|
||||
SetGpuReg(REG_OFFSET_BG3HOFS, 0);
|
||||
SetGpuReg(REG_OFFSET_BG3VOFS, 0);
|
||||
SetGpuReg(REG_OFFSET_BG2HOFS, 0);
|
||||
SetGpuReg(REG_OFFSET_BG2VOFS, 0);
|
||||
SetGpuReg(REG_OFFSET_BG1HOFS, 0);
|
||||
SetGpuReg(REG_OFFSET_BG1VOFS, 0);
|
||||
SetGpuReg(REG_OFFSET_BG0HOFS, 0);
|
||||
SetGpuReg(REG_OFFSET_BG0VOFS, 0);
|
||||
DmaFill16(3, 0, VRAM, VRAM_SIZE);
|
||||
DmaFill32(3, 0, OAM, OAM_SIZE);
|
||||
DmaFill16(3, 0, PLTT, PLTT_SIZE);
|
||||
LZ77UnCompVram(gBirchHelpGfx, (void *)VRAM);
|
||||
LZ77UnCompVram(gBirchBagTilemap, (void *)(VRAM + 0x7000));
|
||||
LZ77UnCompVram(gBirchGrassTilemap, (void *)(VRAM + 0x7800));
|
||||
LZ77UnCompVram(sSaveFailedClockGfx, (void *)(VRAM + 0x10020));
|
||||
ResetBgsAndClearDma3BusyFlags(0);
|
||||
InitBgsFromTemplates(0, gUnknown_085EFD88, 3);
|
||||
SetBgTilemapBuffer(0, (void *)&gDecompressionBuffer[0x2000]);
|
||||
CpuFill32(0, &gDecompressionBuffer[0x2000], 0x800);
|
||||
LoadBgTiles(0, gTextWindowFrame1_Gfx, 0x120, 0x214);
|
||||
InitWindows(gUnknown_085EFD94);
|
||||
gSaveFailedWindowIds[TEXT_WIN_ID] = AddWindowWithoutTileMap(gUnknown_085EFD9C);
|
||||
SetWindowAttribute(gSaveFailedWindowIds[TEXT_WIN_ID], 7, (u32)&gDecompressionBuffer[0x2800]);
|
||||
gSaveFailedWindowIds[CLOCK_WIN_ID] = AddWindowWithoutTileMap(gUnknown_085EFDA4);
|
||||
SetWindowAttribute(gSaveFailedWindowIds[CLOCK_WIN_ID], 7, (u32)&gDecompressionBuffer[0x3D00]);
|
||||
DeactivateAllTextPrinters();
|
||||
ResetSpriteData();
|
||||
ResetTasks();
|
||||
ResetPaletteFade();
|
||||
LoadPalette(gBirchBagGrassPal, 0, 0x40);
|
||||
LoadPalette(sSaveFailedClockPal, 0x100, 0x20);
|
||||
LoadPalette(gTextWindowFrame1_Pal, 0xE0, 0x20);
|
||||
LoadPalette(gUnknown_0860F074, 0xF0, 0x20);
|
||||
SetWindowBorderStyle(gSaveFailedWindowIds[TEXT_WIN_ID], FALSE, 0x214, 0xE);
|
||||
SetWindowBorderStyle(gSaveFailedWindowIds[CLOCK_WIN_ID], FALSE, 0x214, 0xE);
|
||||
FillWindowPixelBuffer(gSaveFailedWindowIds[CLOCK_WIN_ID], 0x11); // backwards?
|
||||
FillWindowPixelBuffer(gSaveFailedWindowIds[TEXT_WIN_ID], 0x11);
|
||||
CopyWindowToVram(gSaveFailedWindowIds[CLOCK_WIN_ID], 2); // again?
|
||||
CopyWindowToVram(gSaveFailedWindowIds[TEXT_WIN_ID], 1);
|
||||
SaveFailedScreenTextPrint(gText_SaveFailedCheckingBackup, 1, 0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, RGB_BLACK);
|
||||
EnableInterrupts(1);
|
||||
SetVBlankCallback(VBlankCB);
|
||||
SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_OBJ_ON | DISPCNT_OBJ_1D_MAP);
|
||||
ShowBg(0);
|
||||
ShowBg(2);
|
||||
ShowBg(3);
|
||||
gMain.state++;
|
||||
break;
|
||||
case 1:
|
||||
if (!UpdatePaletteFade())
|
||||
{
|
||||
SetMainCallback2(CB2_WipeSave);
|
||||
SetVBlankCallback(VBlankCB_UpdateClockGraphics);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -346,7 +345,7 @@ static void CB2_ReturnToTitleScreen(void)
|
||||
|
||||
static void VBlankCB_UpdateClockGraphics(void)
|
||||
{
|
||||
unsigned int n = (gMain.vblankCounter2 >> 3) & 7;
|
||||
u32 n = (gMain.vblankCounter2 >> 3) & 7;
|
||||
|
||||
gMain.oamBuffer[0] = sClockOamData;
|
||||
gMain.oamBuffer[0].x = 112;
|
||||
|
||||
+8
-11
@@ -9,21 +9,18 @@
|
||||
|
||||
static bool32 IsCurMapInLocationList(const u16 *list)
|
||||
{
|
||||
s32 i;
|
||||
u16 locSum = (gSaveBlock1Ptr->location.mapGroup << 8) + (gSaveBlock1Ptr->location.mapNum);
|
||||
|
||||
// im sure it was written a different way, but for the love of christ I cant figure out how to write it different where it still matches.
|
||||
if (*list != 0xFFFF)
|
||||
for (i = 0; list[i] != 0xFFFF; i++)
|
||||
{
|
||||
u16 termValue = 0xFFFF;
|
||||
const u16 *localList;
|
||||
for (localList = list; *localList != termValue; localList++)
|
||||
if (*localList == locSum)
|
||||
return TRUE;
|
||||
if (list[i] == locSum)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// TODO: Not require a packed u16 array for these lists
|
||||
static const u16 sSaveLocationPokeCenterList[] =
|
||||
{
|
||||
MAP_OLDALE_TOWN_POKEMON_CENTER_1F,
|
||||
@@ -72,7 +69,7 @@ static bool32 IsCurMapPokeCenter(void)
|
||||
return IsCurMapInLocationList(sSaveLocationPokeCenterList);
|
||||
}
|
||||
|
||||
static const u16 sSaveLocationReloadLocList[] = // there's only 1 location, and it's presumed its for the save reload feature for battle tower
|
||||
static const u16 sSaveLocationReloadLocList[] = // There's only 1 location, and it's presumed its for the save reload feature for battle tower.
|
||||
{
|
||||
MAP_BATTLE_FRONTIER_BATTLE_TOWER_LOBBY,
|
||||
0xFFFF,
|
||||
@@ -83,13 +80,13 @@ static bool32 IsCurMapReloadLocation(void)
|
||||
return IsCurMapInLocationList(sSaveLocationReloadLocList);
|
||||
}
|
||||
|
||||
// nulled out list. unknown what this would have been
|
||||
// Nulled out list. Unknown what this would have been.
|
||||
static const u16 sUnknown_0861440E[] =
|
||||
{
|
||||
0xFFFF,
|
||||
};
|
||||
|
||||
bool32 sub_81AFCEC(void)
|
||||
static bool32 sub_81AFCEC(void)
|
||||
{
|
||||
return IsCurMapInLocationList(sUnknown_0861440E);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "global.h"
|
||||
#include "battle.h"
|
||||
#include "data2.h"
|
||||
#include "task.h"
|
||||
#include "trig.h"
|
||||
@@ -7,15 +8,6 @@
|
||||
static void CopyValue16Bit(void);
|
||||
static void CopyValue32Bit(void);
|
||||
|
||||
extern u16 gBattle_BG0_Y;
|
||||
extern u16 gBattle_BG0_X;
|
||||
extern u16 gBattle_BG1_X;
|
||||
extern u16 gBattle_BG1_Y;
|
||||
extern u16 gBattle_BG2_X;
|
||||
extern u16 gBattle_BG2_Y;
|
||||
extern u16 gBattle_BG3_X;
|
||||
extern u16 gBattle_BG3_Y;
|
||||
|
||||
// EWRAM vars
|
||||
|
||||
// Per-scanline register values.
|
||||
|
||||
+9
-14
@@ -4,6 +4,7 @@
|
||||
#include "berry.h"
|
||||
#include "clock.h"
|
||||
#include "coins.h"
|
||||
#include "contest.h"
|
||||
#include "contest_link_80F57C4.h"
|
||||
#include "contest_painting.h"
|
||||
#include "data2.h"
|
||||
@@ -27,6 +28,7 @@
|
||||
#include "event_obj_lock.h"
|
||||
#include "menu.h"
|
||||
#include "money.h"
|
||||
#include "mossdeep_gym.h"
|
||||
#include "mystery_event_script.h"
|
||||
#include "palette.h"
|
||||
#include "party_menu.h"
|
||||
@@ -49,11 +51,6 @@
|
||||
#include "tv.h"
|
||||
#include "window.h"
|
||||
|
||||
extern u16 sub_81A89A0(u8);
|
||||
extern void sub_81A8AF8(void);
|
||||
extern void sub_81A895C(void);
|
||||
extern void sub_81A8934(u8);
|
||||
|
||||
typedef u16 (*SpecialFunc)(void);
|
||||
typedef void (*NativeFunc)(void);
|
||||
|
||||
@@ -66,8 +63,6 @@ static EWRAM_DATA u16 sMovingNpcMapBank = 0;
|
||||
static EWRAM_DATA u16 sMovingNpcMapId = 0;
|
||||
static EWRAM_DATA u16 sFieldEffectScriptId = 0;
|
||||
|
||||
extern u16 gSpecialVar_ContestCategory;
|
||||
|
||||
IWRAM_DATA u8 gUnknown_03000F30;
|
||||
|
||||
extern const SpecialFunc gSpecials[];
|
||||
@@ -1713,8 +1708,8 @@ bool8 ScrCmd_checkpartymove(struct ScriptContext *ctx)
|
||||
u8 i;
|
||||
u16 moveId = ScriptReadHalfword(ctx);
|
||||
|
||||
gSpecialVar_Result = 6;
|
||||
for (i = 0; i < 6; i++)
|
||||
gSpecialVar_Result = PARTY_SIZE;
|
||||
for (i = 0; i < PARTY_SIZE; i++)
|
||||
{
|
||||
u16 species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES, NULL);
|
||||
if (!species)
|
||||
@@ -2157,13 +2152,13 @@ bool8 ScrCmd_mossdeepgym1(struct ScriptContext *ctx)
|
||||
{
|
||||
u16 v1 = VarGet(ScriptReadHalfword(ctx));
|
||||
|
||||
sMovingNpcId = sub_81A89A0(v1);
|
||||
sMovingNpcId = MossdeepGym_MoveEvents(v1);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool8 ScrCmd_mossdeepgym2(struct ScriptContext *ctx)
|
||||
{
|
||||
sub_81A8AF8();
|
||||
MossdeepGym_TurnEvents();
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -2171,13 +2166,13 @@ bool8 ScrCmd_mossdeepgym3(struct ScriptContext *ctx)
|
||||
{
|
||||
u16 v1 = VarGet(ScriptReadHalfword(ctx));
|
||||
|
||||
sub_81A8934(v1);
|
||||
InitMossdeepGymTiles(v1);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool8 ScrCmd_mossdeepgym4(struct ScriptContext *ctx)
|
||||
{
|
||||
sub_81A895C();
|
||||
FinishMossdeepGymTiles();
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -2204,7 +2199,7 @@ bool8 ScrCmd_cmdD9(struct ScriptContext *ctx)
|
||||
}
|
||||
}
|
||||
|
||||
// This command will force the Pokémon to be obedient, you don't get to make it disobedient
|
||||
// This command will force the Pokémon to be obedient, you don't get to make it disobedient.
|
||||
bool8 ScrCmd_setmonobedient(struct ScriptContext *ctx)
|
||||
{
|
||||
bool8 obedient = TRUE;
|
||||
|
||||
Executable
+707
@@ -0,0 +1,707 @@
|
||||
#include "global.h"
|
||||
#include "battle.h"
|
||||
#include "battle_gfx_sfx_util.h"
|
||||
#include "berry.h"
|
||||
#include "contest.h"
|
||||
#include "contest_link_80F57C4.h"
|
||||
#include "contest_painting.h"
|
||||
#include "daycare.h"
|
||||
#include "decompress.h"
|
||||
#include "event_data.h"
|
||||
#include "event_object_movement.h"
|
||||
#include "international_string_util.h"
|
||||
#include "link.h"
|
||||
#include "link_rfu.h"
|
||||
#include "main.h"
|
||||
#include "menu.h"
|
||||
#include "overworld.h"
|
||||
#include "palette.h"
|
||||
#include "party_menu.h"
|
||||
#include "pokedex.h"
|
||||
#include "pokemon.h"
|
||||
#include "random.h"
|
||||
#include "script.h"
|
||||
#include "script_menu.h"
|
||||
#include "sprite.h"
|
||||
#include "string_util.h"
|
||||
#include "tv.h"
|
||||
#include "constants/event_objects.h"
|
||||
#include "constants/items.h"
|
||||
#include "constants/species.h"
|
||||
#include "constants/vars.h"
|
||||
|
||||
extern const u16 gEventObjectPalette8[];
|
||||
extern const u16 gEventObjectPalette17[];
|
||||
extern const u16 gEventObjectPalette33[];
|
||||
extern const u16 gEventObjectPalette34[];
|
||||
extern const struct CompressedSpriteSheet gMonFrontPicTable[];
|
||||
|
||||
extern u8 gSelectedOrderFromParty[];
|
||||
|
||||
static const u8 gUnknown_0858D8EC[] = { 3, 4, 5, 14 };
|
||||
|
||||
static void sub_80F8EE8(u8 taskId);
|
||||
static void sub_80F9088(u8 taskId);
|
||||
static void sub_80F9460(void);
|
||||
static void sub_80F94B8(void);
|
||||
|
||||
void SetContestTrainerGfxIds(void)
|
||||
{
|
||||
gSaveBlock1Ptr->vars[VAR_OBJ_GFX_ID_0 - VARS_START] = gContestMons[0].trainerGfxId;
|
||||
gSaveBlock1Ptr->vars[VAR_OBJ_GFX_ID_1 - VARS_START] = gContestMons[1].trainerGfxId;
|
||||
gSaveBlock1Ptr->vars[VAR_OBJ_GFX_ID_2 - VARS_START] = gContestMons[2].trainerGfxId;
|
||||
}
|
||||
|
||||
void sub_80F8814(void)
|
||||
{
|
||||
u16 var1;
|
||||
u8 var0 = gSpecialVar_0x8005;
|
||||
switch (var0)
|
||||
{
|
||||
case 0:
|
||||
var1 = 3;
|
||||
break;
|
||||
case 1:
|
||||
var1 = 4;
|
||||
break;
|
||||
case 2:
|
||||
var1 = 5;
|
||||
break;
|
||||
default:
|
||||
var1 = 100;
|
||||
break;
|
||||
}
|
||||
|
||||
gSpecialVar_0x8004 = var1;
|
||||
}
|
||||
|
||||
void sub_80F8850(void)
|
||||
{
|
||||
sub_80F8264();
|
||||
sub_80F8290();
|
||||
sub_80F8438();
|
||||
}
|
||||
|
||||
void sub_80F8864(void)
|
||||
{
|
||||
int contestWinner;
|
||||
switch (gSpecialVar_ContestCategory)
|
||||
{
|
||||
case CONTEST_CATEGORY_COOL:
|
||||
contestWinner = 8;
|
||||
break;
|
||||
case CONTEST_CATEGORY_BEAUTY:
|
||||
contestWinner = 9;
|
||||
break;
|
||||
case CONTEST_CATEGORY_CUTE:
|
||||
contestWinner = 10;
|
||||
break;
|
||||
case CONTEST_CATEGORY_SMART:
|
||||
contestWinner = 11;
|
||||
break;
|
||||
case CONTEST_CATEGORY_TOUGH:
|
||||
default:
|
||||
contestWinner = 12;
|
||||
break;
|
||||
}
|
||||
|
||||
if (!gSaveBlock1Ptr->contestWinners[contestWinner].species)
|
||||
gSpecialVar_0x8004 = 0;
|
||||
else
|
||||
gSpecialVar_0x8004 = 1;
|
||||
}
|
||||
|
||||
void sub_80F88DC(void)
|
||||
{
|
||||
sub_80DEDA8(0xFF);
|
||||
}
|
||||
|
||||
void sub_80F88E8(void)
|
||||
{
|
||||
if (gContestFinalStandings[gContestPlayerMonIndex] == 0
|
||||
&& gSpecialVar_ContestRank == 3
|
||||
&& gUnknown_02039F08[gContestPlayerMonIndex] >= 800)
|
||||
{
|
||||
gSpecialVar_0x8004 = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
gSpecialVar_0x8004 = 0;
|
||||
}
|
||||
}
|
||||
|
||||
u8 sub_80F8940(void)
|
||||
{
|
||||
int i;
|
||||
u8 var0 = 0;
|
||||
|
||||
for (i = 0; i < 5; i++)
|
||||
{
|
||||
if (gSaveBlock1Ptr->contestWinners[8 + i].species)
|
||||
var0++;
|
||||
}
|
||||
|
||||
return var0;
|
||||
}
|
||||
|
||||
void sub_80F8970(void)
|
||||
{
|
||||
s16 sp[4];
|
||||
int i, j;
|
||||
s16 condition;
|
||||
s8 var0;
|
||||
u8 var2;
|
||||
u8 r8;
|
||||
u8 r7;
|
||||
|
||||
for (i = 0; i < 4; i++)
|
||||
sp[i] = gContestMonConditions[i];
|
||||
|
||||
for (i = 0; i < 3; i++)
|
||||
{
|
||||
for (j = 3; j > i; j--)
|
||||
{
|
||||
if (sp[j - 1] < sp[j])
|
||||
{
|
||||
int temp = sp[j];
|
||||
sp[j] = sp[j - 1];
|
||||
sp[j - 1] = temp;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
condition = sp[gSpecialVar_0x8006];
|
||||
var0 = 0;
|
||||
r8 = 0;
|
||||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
if (sp[i] == condition)
|
||||
{
|
||||
var0++;
|
||||
if (i == gSpecialVar_0x8006)
|
||||
r8 = var0;
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
if (sp[i] == condition)
|
||||
break;
|
||||
}
|
||||
|
||||
r7 = i;
|
||||
var2 = r8;
|
||||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
if (condition == gContestMonConditions[i])
|
||||
{
|
||||
if (var2 == 1)
|
||||
break;
|
||||
var2--;
|
||||
}
|
||||
}
|
||||
|
||||
StringCopy(gStringVar1, gContestMons[i].nickname);
|
||||
StringCopy(gStringVar2, gContestMons[i].trainerName);
|
||||
sub_81DB5AC(gStringVar2);
|
||||
|
||||
if (var0 == 1)
|
||||
gSpecialVar_0x8006 = r7;
|
||||
else if (r8 == var0)
|
||||
gSpecialVar_0x8006 = r7;
|
||||
else
|
||||
gSpecialVar_0x8006 = r7 + 4;
|
||||
}
|
||||
|
||||
static void ShowContestWinnerCleanup(void)
|
||||
{
|
||||
SetMainCallback2(CB2_ReturnToFieldContinueScriptPlayMapMusic);
|
||||
}
|
||||
|
||||
void ShowContestWinner(void)
|
||||
{
|
||||
SetMainCallback2(sub_812FDEC);
|
||||
gMain.savedCallback = ShowContestWinnerCleanup;
|
||||
}
|
||||
|
||||
void sub_80F8AFC(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (gIsLinkContest & 1)
|
||||
{
|
||||
for (i = 0; i < gUnknown_02039F30; i++)
|
||||
{
|
||||
int version = (u8)gLinkPlayers[i].version;
|
||||
if (version == VERSION_RUBY || version == VERSION_SAPPHIRE)
|
||||
{
|
||||
if (gLinkPlayers[i].gender == MALE)
|
||||
gContestMons[i].trainerGfxId = EVENT_OBJ_GFX_LINK_RS_BRENDAN;
|
||||
else
|
||||
gContestMons[i].trainerGfxId = EVENT_OBJ_GFX_LINK_RS_MAY;
|
||||
}
|
||||
}
|
||||
|
||||
VarSet(VAR_OBJ_GFX_ID_0, gContestMons[0].trainerGfxId);
|
||||
VarSet(VAR_OBJ_GFX_ID_1, gContestMons[1].trainerGfxId);
|
||||
VarSet(VAR_OBJ_GFX_ID_2, gContestMons[2].trainerGfxId);
|
||||
VarSet(VAR_OBJ_GFX_ID_3, gContestMons[3].trainerGfxId);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_80F8B94(void)
|
||||
{
|
||||
int i;
|
||||
u8 eventObjectId;
|
||||
int version;
|
||||
struct Sprite *sprite;
|
||||
|
||||
gReservedSpritePaletteCount = 12;
|
||||
if (gIsLinkContest & 1)
|
||||
{
|
||||
for (i = 0; i < gUnknown_02039F30; i++)
|
||||
{
|
||||
eventObjectId = GetEventObjectIdByLocalIdAndMap(gUnknown_0858D8EC[i], gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup);
|
||||
sprite = &gSprites[gEventObjects[eventObjectId].spriteId];
|
||||
sprite->oam.paletteNum = 6 + i;
|
||||
version = (u8)gLinkPlayers[i].version;
|
||||
if (version == VERSION_RUBY || version == VERSION_SAPPHIRE)
|
||||
{
|
||||
if (gLinkPlayers[i].gender == MALE)
|
||||
LoadPalette(gEventObjectPalette33, 0x160 + i * 0x10, 0x20);
|
||||
else
|
||||
LoadPalette(gEventObjectPalette34, 0x160 + i * 0x10, 0x20);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (gLinkPlayers[i].gender == MALE)
|
||||
LoadPalette(gEventObjectPalette8, 0x160 + i * 0x10, 0x20);
|
||||
else
|
||||
LoadPalette(gEventObjectPalette17, 0x160 + i * 0x10, 0x20);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
u8 GiveMonArtistRibbon(void)
|
||||
{
|
||||
u8 hasArtistRibbon;
|
||||
|
||||
hasArtistRibbon = GetMonData(&gPlayerParty[gUnknown_02039F24], MON_DATA_ARTIST_RIBBON);
|
||||
if (!hasArtistRibbon && gContestFinalStandings[gContestPlayerMonIndex] == 0 && gSpecialVar_ContestRank == 3
|
||||
&& gUnknown_02039F08[gContestPlayerMonIndex] >= 800)
|
||||
{
|
||||
hasArtistRibbon = 1;
|
||||
SetMonData(&gPlayerParty[gUnknown_02039F24], MON_DATA_ARTIST_RIBBON, &hasArtistRibbon);
|
||||
if (GetRibbonCount(&gPlayerParty[gUnknown_02039F24]) > 4)
|
||||
sub_80EE4DC(&gPlayerParty[gUnknown_02039F24], MON_DATA_ARTIST_RIBBON);
|
||||
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
u8 sub_80F8D24(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
void ShowContestEntryMonPic(void)
|
||||
{
|
||||
const struct CompressedSpritePalette *palette;
|
||||
u32 personality, otId;
|
||||
u16 species;
|
||||
u8 spriteId;
|
||||
u8 taskId;
|
||||
u8 left, top;
|
||||
|
||||
if (FindTaskIdByFunc(sub_80F8EE8) == 0xFF)
|
||||
{
|
||||
AllocateMonSpritesGfx();
|
||||
left = 10;
|
||||
top = 3;
|
||||
species = gContestMons[gSpecialVar_0x8006].species;
|
||||
personality = gContestMons[gSpecialVar_0x8006].personality;
|
||||
otId = gContestMons[gSpecialVar_0x8006].otId;
|
||||
taskId = CreateTask(sub_80F8EE8, 0x50);
|
||||
gTasks[taskId].data[0] = 0;
|
||||
gTasks[taskId].data[1] = species;
|
||||
if (gSpecialVar_0x8006 == gContestPlayerMonIndex)
|
||||
HandleLoadSpecialPokePic_2(&gMonFrontPicTable[species], gMonSpritesGfxPtr->sprites[1], species, personality);
|
||||
else
|
||||
HandleLoadSpecialPokePic_DontHandleDeoxys(&gMonFrontPicTable[species], gMonSpritesGfxPtr->sprites[1], species, personality);
|
||||
|
||||
palette = GetMonSpritePalStructFromOtIdPersonality(species, otId, personality);
|
||||
LoadCompressedObjectPalette(palette);
|
||||
SetMultiuseSpriteTemplateToPokemon(species, 1);
|
||||
gMultiuseSpriteTemplate.paletteTag = palette->tag;
|
||||
spriteId = CreateSprite(&gMultiuseSpriteTemplate, (left + 1) * 8 + 32, (top * 8) + 40, 0);
|
||||
|
||||
if (gIsLinkContest & 1)
|
||||
{
|
||||
if (!(gIsLinkContest & 4))
|
||||
DoMonFrontSpriteAnimation(&gSprites[spriteId], species, FALSE, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
DoMonFrontSpriteAnimation(&gSprites[spriteId], species, FALSE, 0);
|
||||
}
|
||||
|
||||
gTasks[taskId].data[2] = spriteId;
|
||||
gTasks[taskId].data[3] = left;
|
||||
gTasks[taskId].data[4] = top;
|
||||
gSprites[spriteId].callback = SpriteCallbackDummy;
|
||||
gSprites[spriteId].oam.priority = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_80F8EB8(void)
|
||||
{
|
||||
u8 taskId = FindTaskIdByFunc(sub_80F8EE8);
|
||||
if (taskId != 0xFF)
|
||||
{
|
||||
gTasks[taskId].data[0]++;
|
||||
FreeMonSpritesGfx();
|
||||
}
|
||||
}
|
||||
|
||||
static void sub_80F8EE8(u8 taskId)
|
||||
{
|
||||
struct Task *task = &gTasks[taskId];
|
||||
struct Sprite *sprite;
|
||||
|
||||
switch(task->data[0])
|
||||
{
|
||||
case 0:
|
||||
task->data[0]++;
|
||||
break;
|
||||
case 1:
|
||||
task->data[5] = CreateWindowFromRect(10, 3, 8, 8);
|
||||
SetStandardWindowBorderStyle(task->data[5], 1);
|
||||
task->data[0]++;
|
||||
break;
|
||||
case 2:
|
||||
break;
|
||||
case 3:
|
||||
sprite = &gSprites[task->data[2]];
|
||||
FreeSpritePaletteByTag(GetSpritePaletteTagByPaletteNum(sprite->oam.paletteNum));
|
||||
|
||||
if(sprite->oam.affineMode)
|
||||
FreeOamMatrix(sprite->oam.matrixNum);
|
||||
|
||||
DestroySprite(sprite);
|
||||
task->data[0]++;
|
||||
break;
|
||||
case 4:
|
||||
sub_80E2A78(gTasks[taskId].data[5]);
|
||||
DestroyTask(taskId);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void ScriptGetMultiplayerId(void)
|
||||
{
|
||||
if ((gIsLinkContest & 1) && gUnknown_02039F30 == 4 && !(gIsLinkContest & 2))
|
||||
gSpecialVar_Result = GetMultiplayerId();
|
||||
else
|
||||
gSpecialVar_Result = 4;
|
||||
}
|
||||
|
||||
void ScriptRandom(void)
|
||||
{
|
||||
u16 random;
|
||||
u16 *scriptPtr;
|
||||
|
||||
if (gIsLinkContest & 1)
|
||||
{
|
||||
gContestRngValue = 1103515245 * gContestRngValue + 24691;
|
||||
random = gContestRngValue >> 16;
|
||||
scriptPtr = &gSpecialVar_Result;
|
||||
}
|
||||
else
|
||||
{
|
||||
scriptPtr = &gSpecialVar_Result;
|
||||
random = Random();
|
||||
}
|
||||
*scriptPtr = random % *scriptPtr;
|
||||
}
|
||||
|
||||
u16 sub_80F903C(void)
|
||||
{
|
||||
gContestRngValue = 1103515245 * gContestRngValue + 24691;
|
||||
return gContestRngValue >> 16;
|
||||
}
|
||||
|
||||
u8 sub_80F905C(void)
|
||||
{
|
||||
if (gIsLinkContest & 2)
|
||||
{
|
||||
CreateTask(sub_80F9088, 5);
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
static void sub_80F9088(u8 taskId)
|
||||
{
|
||||
switch (gTasks[taskId].data[0])
|
||||
{
|
||||
case 0:
|
||||
if (sub_800A520())
|
||||
{
|
||||
sub_800ADF8();
|
||||
gTasks[taskId].data[0]++;
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
gTasks[taskId].data[0]++;
|
||||
break;
|
||||
default:
|
||||
if (sub_800A520() == 1)
|
||||
{
|
||||
EnableBothScriptContexts();
|
||||
DestroyTask(taskId);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_80F90DC(void)
|
||||
{
|
||||
if (gIsLinkContest & 2)
|
||||
{
|
||||
if (gReceivedRemoteLinkPlayers)
|
||||
{
|
||||
sub_800E0E8();
|
||||
CreateWirelessStatusIndicatorSprite(8, 8);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void sub_80F910C(void)
|
||||
{
|
||||
if (gIsLinkContest & 2)
|
||||
{
|
||||
if (gReceivedRemoteLinkPlayers)
|
||||
sub_800E084();
|
||||
}
|
||||
}
|
||||
|
||||
u8 sub_80F9134(void)
|
||||
{
|
||||
if (gIsLinkContest & 4)
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
void sub_80F9154(void)
|
||||
{
|
||||
gIsLinkContest = 0;
|
||||
}
|
||||
|
||||
u8 sub_80F9160(void)
|
||||
{
|
||||
if (gIsLinkContest & 2)
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
void HealPlayerParty(void)
|
||||
{
|
||||
u8 i, j;
|
||||
u8 ppBonuses;
|
||||
u8 arg[4];
|
||||
|
||||
// restore HP.
|
||||
for(i = 0; i < gPlayerPartyCount; i++)
|
||||
{
|
||||
u16 maxHP = GetMonData(&gPlayerParty[i], MON_DATA_MAX_HP);
|
||||
arg[0] = maxHP;
|
||||
arg[1] = maxHP >> 8;
|
||||
SetMonData(&gPlayerParty[i], MON_DATA_HP, arg);
|
||||
ppBonuses = GetMonData(&gPlayerParty[i], MON_DATA_PP_BONUSES);
|
||||
|
||||
// restore PP.
|
||||
for(j = 0; j < 4; j++)
|
||||
{
|
||||
arg[0] = CalculatePPWithBonus(GetMonData(&gPlayerParty[i], MON_DATA_MOVE1 + j), ppBonuses, j);
|
||||
SetMonData(&gPlayerParty[i], MON_DATA_PP1 + j, arg);
|
||||
}
|
||||
|
||||
// since status is u32, the four 0 assignments here are probably for safety to prevent undefined data from reaching SetMonData.
|
||||
arg[0] = 0;
|
||||
arg[1] = 0;
|
||||
arg[2] = 0;
|
||||
arg[3] = 0;
|
||||
SetMonData(&gPlayerParty[i], MON_DATA_STATUS, arg);
|
||||
}
|
||||
}
|
||||
|
||||
u8 ScriptGiveMon(u16 species, u8 level, u16 item, u32 unused1, u32 unused2, u8 unused3)
|
||||
{
|
||||
u16 nationalDexNum;
|
||||
int sentToPc;
|
||||
u8 heldItem[2];
|
||||
struct Pokemon mon;
|
||||
|
||||
CreateMon(&mon, species, level, 32, 0, 0, 0, 0);
|
||||
heldItem[0] = item;
|
||||
heldItem[1] = item >> 8;
|
||||
SetMonData(&mon, MON_DATA_HELD_ITEM, heldItem);
|
||||
sentToPc = GiveMonToPlayer(&mon);
|
||||
nationalDexNum = SpeciesToNationalPokedexNum(species);
|
||||
|
||||
switch(sentToPc)
|
||||
{
|
||||
case 0:
|
||||
case 1:
|
||||
GetSetPokedexFlag(nationalDexNum, 2);
|
||||
GetSetPokedexFlag(nationalDexNum, 3);
|
||||
break;
|
||||
}
|
||||
return sentToPc;
|
||||
}
|
||||
|
||||
u8 ScriptGiveEgg(u16 species)
|
||||
{
|
||||
struct Pokemon mon;
|
||||
u8 isEgg;
|
||||
|
||||
CreateEgg(&mon, species, TRUE);
|
||||
isEgg = TRUE;
|
||||
SetMonData(&mon, MON_DATA_IS_EGG, &isEgg);
|
||||
|
||||
return GiveMonToPlayer(&mon);
|
||||
}
|
||||
|
||||
void HasEnoughMonsForDoubleBattle(void)
|
||||
{
|
||||
switch (GetMonsStateToDoubles())
|
||||
{
|
||||
case 0:
|
||||
gSpecialVar_Result = 0;
|
||||
break;
|
||||
case 1:
|
||||
gSpecialVar_Result = 1;
|
||||
break;
|
||||
case 2:
|
||||
gSpecialVar_Result = 2;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static bool8 CheckPartyMonHasHeldItem(u16 item)
|
||||
{
|
||||
int i;
|
||||
|
||||
for(i = 0; i < PARTY_SIZE; i++)
|
||||
{
|
||||
u16 species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2);
|
||||
if (species != SPECIES_NONE && species != SPECIES_EGG && GetMonData(&gPlayerParty[i], MON_DATA_HELD_ITEM) == item)
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool8 sub_80F9370(void)
|
||||
{
|
||||
bool8 hasItem = CheckPartyMonHasHeldItem(ITEM_ENIGMA_BERRY);
|
||||
if (hasItem == TRUE)
|
||||
GetBerryNameByBerryType(ItemIdToBerryType(ITEM_ENIGMA_BERRY), gStringVar1);
|
||||
|
||||
return hasItem;
|
||||
}
|
||||
|
||||
void CreateScriptedWildMon(u16 species, u8 level, u16 item)
|
||||
{
|
||||
u8 heldItem[2];
|
||||
|
||||
ZeroEnemyPartyMons();
|
||||
CreateMon(&gEnemyParty[0], species, level, 0x20, 0, 0, 0, 0);
|
||||
if (item)
|
||||
{
|
||||
heldItem[0] = item;
|
||||
heldItem[1] = item >> 8;
|
||||
SetMonData(&gEnemyParty[0], MON_DATA_HELD_ITEM, heldItem);
|
||||
}
|
||||
}
|
||||
|
||||
void ScriptSetMonMoveSlot(u8 monIndex, u16 move, u8 slot)
|
||||
{
|
||||
if (monIndex > PARTY_SIZE)
|
||||
monIndex = gPlayerPartyCount - 1;
|
||||
|
||||
SetMonMoveSlot(&gPlayerParty[monIndex], move, slot);
|
||||
}
|
||||
|
||||
void sub_80F9438(void)
|
||||
{
|
||||
gMain.savedCallback = sub_80F9460;
|
||||
VarSet(VAR_FRONTIER_FACILITY, 9); // this isn't a valid frontier facility id (??)
|
||||
sub_81B8518(0);
|
||||
}
|
||||
|
||||
static void sub_80F9460(void)
|
||||
{
|
||||
switch (gSelectedOrderFromParty[0])
|
||||
{
|
||||
case 0:
|
||||
gSpecialVar_Result = 0;
|
||||
break;
|
||||
default:
|
||||
gSpecialVar_Result = 1;
|
||||
break;
|
||||
}
|
||||
|
||||
SetMainCallback2(CB2_ReturnToFieldContinueScriptPlayMapMusic);
|
||||
}
|
||||
|
||||
void sub_80F9490(void)
|
||||
{
|
||||
gMain.savedCallback = sub_80F94B8;
|
||||
sub_81B8518(gSpecialVar_0x8004 + 1);
|
||||
}
|
||||
|
||||
static void sub_80F94B8(void)
|
||||
{
|
||||
switch (gSelectedOrderFromParty[0])
|
||||
{
|
||||
case 0:
|
||||
gSpecialVar_Result = 0;
|
||||
break;
|
||||
default:
|
||||
gSpecialVar_Result = 1;
|
||||
break;
|
||||
}
|
||||
|
||||
SetMainCallback2(CB2_ReturnToFieldContinueScriptPlayMapMusic);
|
||||
}
|
||||
|
||||
void ReducePlayerPartyToSelectedMons(void)
|
||||
{
|
||||
struct Pokemon party[4];
|
||||
int i;
|
||||
|
||||
CpuFill32(0, party, sizeof party);
|
||||
|
||||
// copy the selected pokemon according to the order.
|
||||
for (i = 0; i < 4; i++)
|
||||
if (gSelectedOrderFromParty[i]) // as long as the order keeps going (did the player select 1 mon? 2? 3?), do not stop
|
||||
party[i] = gPlayerParty[gSelectedOrderFromParty[i] - 1]; // index is 0 based, not literal
|
||||
|
||||
CpuFill32(0, gPlayerParty, sizeof gPlayerParty);
|
||||
|
||||
// overwrite the first 4 with the order copied to.
|
||||
for (i = 0; i < 4; i++)
|
||||
gPlayerParty[i] = party[i];
|
||||
|
||||
CalculatePlayerPartyCount();
|
||||
}
|
||||
+8
-4
@@ -35,6 +35,7 @@
|
||||
#include "field_player_avatar.h"
|
||||
#include "battle_pyramid_bag.h"
|
||||
#include "battle_pike.h"
|
||||
#include "new_game.h"
|
||||
|
||||
// Menu actions
|
||||
enum
|
||||
@@ -63,6 +64,10 @@ enum
|
||||
SAVE_ERROR
|
||||
};
|
||||
|
||||
// IWRAM common
|
||||
bool8 (*gMenuCallback)(void);
|
||||
|
||||
// EWRAM
|
||||
EWRAM_DATA static u8 sSafariBallsWindowId = 0;
|
||||
EWRAM_DATA static u8 sBattlePyramidFloorWindowId = 0;
|
||||
EWRAM_DATA static u8 sStartMenuCursorPos = 0;
|
||||
@@ -76,7 +81,6 @@ EWRAM_DATA static bool8 sSavingComplete = FALSE;
|
||||
EWRAM_DATA static u8 sSaveInfoWindowId = 0;
|
||||
|
||||
// Extern variables.
|
||||
extern u8 gDifferentSaveFile;
|
||||
extern u8 gUnknown_03005DB4;
|
||||
|
||||
// Extern functions in not decompiled files.
|
||||
@@ -460,18 +464,18 @@ static bool32 InitStartMenuStep(void)
|
||||
sUnknown_02037619[0]++;
|
||||
break;
|
||||
case 3:
|
||||
if (GetSafariZoneFlag() != FALSE)
|
||||
if (GetSafariZoneFlag())
|
||||
{
|
||||
ShowSafariBallsWindow();
|
||||
}
|
||||
if (InBattlePyramid() != FALSE)
|
||||
if (InBattlePyramid())
|
||||
{
|
||||
ShowPyramidFloorWindow();
|
||||
}
|
||||
sUnknown_02037619[0]++;
|
||||
break;
|
||||
case 4:
|
||||
if (PrintStartMenuActions(&sUnknown_02037619[1], 2) == FALSE)
|
||||
if (!PrintStartMenuActions(&sUnknown_02037619[1], 2))
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
+6
-2
@@ -2,7 +2,11 @@
|
||||
#include "string_util.h"
|
||||
#include "text.h"
|
||||
|
||||
EWRAM_DATA u8 gUnknownStringVar[16] = {0};
|
||||
EWRAM_DATA u8 gStringVar1[0x100] = {0};
|
||||
EWRAM_DATA u8 gStringVar2[0x100] = {0};
|
||||
EWRAM_DATA u8 gStringVar3[0x100] = {0};
|
||||
EWRAM_DATA u8 gStringVar4[0x3E8] = {0};
|
||||
EWRAM_DATA static u8 sUnknownStringVar[16] = {0};
|
||||
|
||||
static const u8 sDigits[] = __("0123456789ABCDEF");
|
||||
|
||||
@@ -421,7 +425,7 @@ u8 *StringBraille(u8 *dest, const u8 *src)
|
||||
|
||||
static const u8 *ExpandPlaceholder_UnknownStringVar(void)
|
||||
{
|
||||
return gUnknownStringVar;
|
||||
return sUnknownStringVar;
|
||||
}
|
||||
|
||||
static const u8 *ExpandPlaceholder_PlayerName(void)
|
||||
|
||||
+117
-350
@@ -1,9 +1,7 @@
|
||||
#include "global.h"
|
||||
#include "strings.h"
|
||||
|
||||
// Yes, all the aligns are absolutely necessary.
|
||||
// Until someone can come up with a better way to align byte arrays in C, this is what we're doing.
|
||||
asm(".align 2");
|
||||
ALIGNED(4)
|
||||
const u8 gExpandedPlaceholder_Empty[] = _("");
|
||||
const u8 gExpandedPlaceholder_Kun[] = _("");
|
||||
const u8 gExpandedPlaceholder_Chan[] = _("");
|
||||
@@ -49,24 +47,12 @@ const u8 gUnknown_085E8504[] = _("SELECT");
|
||||
const u8 gUnknown_085E850B[] = _("+ Control Pad");
|
||||
const u8 gUnknown_085E8519[] = _("L Button R Button");
|
||||
const u8 gUnknown_085E852C[] = _("CONTROLS");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gUnknown_085E8538[] = _("{DPAD_UPDOWN}PICK {A_BUTTON}OK");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gUnknown_085E8544[] = _("{A_BUTTON}NEXT");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gUnknown_085E854C[] = _("{A_BUTTON}NEXT {B_BUTTON}BACK");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_PickNextCancel[] = _("{DPAD_UPDOWN}PICK {A_BUTTON}NEXT {B_BUTTON}CANCEL");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_PickCancel[] = _("{DPAD_UPDOWN}PICK {A_BUTTON}{B_BUTTON}CANCEL");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_UnkCtrlF800Exit[] = _("{A_BUTTON}EXIT");
|
||||
ALIGNED(4) const u8 gUnknown_085E8538[] = _("{DPAD_UPDOWN}PICK {A_BUTTON}OK");
|
||||
ALIGNED(4) const u8 gUnknown_085E8544[] = _("{A_BUTTON}NEXT");
|
||||
ALIGNED(4) const u8 gUnknown_085E854C[] = _("{A_BUTTON}NEXT {B_BUTTON}BACK");
|
||||
ALIGNED(4) const u8 gText_PickNextCancel[] = _("{DPAD_UPDOWN}PICK {A_BUTTON}NEXT {B_BUTTON}CANCEL");
|
||||
ALIGNED(4) const u8 gText_PickCancel[] = _("{DPAD_UPDOWN}PICK {A_BUTTON}{B_BUTTON}CANCEL");
|
||||
ALIGNED(4) const u8 gText_UnkCtrlF800Exit[] = _("{A_BUTTON}EXIT");
|
||||
const u8 gText_BirchBoy[] = _("BOY");
|
||||
const u8 gText_BirchGirl[] = _("GIRL");
|
||||
const u8 gText_DefaultNameStu[] = _("STU");
|
||||
@@ -486,30 +472,14 @@ const u8 gText_EscapeFromHere[] = _("Want to escape from here and return\nto {ST
|
||||
const u8 gText_ReturnToHealingSpot[] = _("Want to return to the healing spot\nused last in {STR_VAR_1}?");
|
||||
const u8 gText_PauseUntilPress[] = _("{PAUSE_UNTIL_PRESS}");
|
||||
const u8 gJPText_PutVar1IntoSpinner[] = _("{STR_VAR_1}を ぐるぐるこうかんに\nだして よろしいですか?");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_OnlyPkmnForBattle[] = _("That’s your only\nPOKéMON for battle.");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_PkmnCantBeTradedNow[] = _("That POKéMON can’t be traded\nnow.");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_EggCantBeTradedNow[] = _("An EGG can’t be traded now.");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_OtherTrainersPkmnCantBeTraded[] = _("The other TRAINER’s POKéMON\ncan’t be traded now.");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_OtherTrainerCantAcceptPkmn[] = _("The other TRAINER can’t accept\nthat POKéMON now.");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_CantTradeWithTrainer[] = _("You can’t trade with that\nTRAINER now.");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_NotPkmnOtherTrainerWants[] = _("That isn’t the type of POKéMON\nthat the other TRAINER wants.");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_ThatIsntAnEgg[] = _("That isn’t an EGG.");
|
||||
ALIGNED(4) const u8 gText_OnlyPkmnForBattle[] = _("That’s your only\nPOKéMON for battle.");
|
||||
ALIGNED(4) const u8 gText_PkmnCantBeTradedNow[] = _("That POKéMON can’t be traded\nnow.");
|
||||
ALIGNED(4) const u8 gText_EggCantBeTradedNow[] = _("An EGG can’t be traded now.");
|
||||
ALIGNED(4) const u8 gText_OtherTrainersPkmnCantBeTraded[] = _("The other TRAINER’s POKéMON\ncan’t be traded now.");
|
||||
ALIGNED(4) const u8 gText_OtherTrainerCantAcceptPkmn[] = _("The other TRAINER can’t accept\nthat POKéMON now.");
|
||||
ALIGNED(4) const u8 gText_CantTradeWithTrainer[] = _("You can’t trade with that\nTRAINER now.");
|
||||
ALIGNED(4) const u8 gText_NotPkmnOtherTrainerWants[] = _("That isn’t the type of POKéMON\nthat the other TRAINER wants.");
|
||||
ALIGNED(4) const u8 gText_ThatIsntAnEgg[] = _("That isn’t an EGG.");
|
||||
const u8 gText_Register[] = _("REGISTER");
|
||||
const u8 gText_Attack3[] = _("ATTACK");
|
||||
const u8 gText_Defense3[] = _("DEFENSE");
|
||||
@@ -1250,21 +1220,11 @@ const u8 gText_BattleFactory[] = _("BATTLE FACTORY");
|
||||
const u8 gText_BattleArena[] = _("BATTLE ARENA");
|
||||
const u8 gText_BattlePike[] = _("BATTLE PIKE");
|
||||
const u8 gText_BattlePyramid[] = _("BATTLE PYRAMID");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gUnknown_085ED164[] = _("{STR_VAR_1} SINGLE");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gUnknown_085ED170[] = _("{STR_VAR_1} DOUBLE");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gUnknown_085ED17C[] = _("{STR_VAR_1} MULTI");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gUnknown_085ED188[] = _("{STR_VAR_1} LINK");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gUnknown_085ED190[] = _("{STR_VAR_1}");
|
||||
ALIGNED(4) const u8 gUnknown_085ED164[] = _("{STR_VAR_1} SINGLE");
|
||||
ALIGNED(4) const u8 gUnknown_085ED170[] = _("{STR_VAR_1} DOUBLE");
|
||||
ALIGNED(4) const u8 gUnknown_085ED17C[] = _("{STR_VAR_1} MULTI");
|
||||
ALIGNED(4) const u8 gUnknown_085ED188[] = _("{STR_VAR_1} LINK");
|
||||
ALIGNED(4) const u8 gUnknown_085ED190[] = _("{STR_VAR_1}");
|
||||
const u8 gText_Give[] = _("Give");
|
||||
const u8 gText_NoNeed[] = _("No need");
|
||||
const u8 gText_ColorLightShadowDarkGrey[] = _("{COLOR LIGHT_GREY}{SHADOW DARK_GREY}");
|
||||
@@ -1331,93 +1291,35 @@ const u8 gMatchCall_MaySelfIntroductionText_Line1[] = _("My POKéMON and I help"
|
||||
const u8 gMatchCall_MaySelfIntroductionText_Line2[] = _("my father’s research.");
|
||||
const u8 gText_HatchedFromEgg[] = _("{STR_VAR_1} hatched from the EGG!");
|
||||
const u8 gText_NickHatchPrompt[] = _("Would you like to nickname the newly\nhatched {STR_VAR_1}?");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_ReadyToBerryCrush[] = _("Are you ready to BERRY-CRUSH?\nPlease pick a BERRY for use.\p");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_WaitForAllChooseBerry[] = _("Please wait while each member\nchooses a BERRY.");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_EndedWithXUnitsPowder[] = _("{PAUSE_MUSIC}{PLAY_BGM MUS_FANFA1}You ended up with {STR_VAR_1} units of\nsilky-smooth BERRY POWDER.{RESUME_MUSIC}\pYour total amount of BERRY POWDER\nis {STR_VAR_2}.\p");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_RecordingGameResults[] = _("Recording your game results in the\nsave file.\lPlease wait.");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_PlayBerryCrushAgain[] = _("Want to play BERRY CRUSH again?");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_YouHaveNoBerries[] = _("You have no BERRIES.\nThe game will be canceled.");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_MemberDroppedOut[] = _("A member dropped out.\nThe game will be canceled.");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_TimesUpNoGoodPowder[] = _("Time’s up.\pGood BERRY POWDER could not be\nmade…\p");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_CommunicationStandby2[] = _("Communication standby…");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_1DotBlueF700[] = _("1. {COLOR BLUE}{SHADOW LIGHT_BLUE}{SPECIAL_F7 0x00}");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_1DotF700[] = _("1. {SPECIAL_F7 0x00}");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_SpaceTimes2[] = _(" time(s)");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_XDotY[] = _("{STR_VAR_1}.{STR_VAR_2}");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_Var1Berry[] = _("{STR_VAR_1} BERRY");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_TimeColon[] = _("Time:");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_PressingSpeed[] = _("Pressing Speed:");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_Silkiness[] = _("Silkiness:");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_StrVar1[] = _("{STR_VAR_1}");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_SpaceMin[] = _(" min. ");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_XDotY2[] = _("{STR_VAR_1}.{STR_VAR_2}");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_SpaceSec[] = _(" sec.");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_XDotY3[] = _("{STR_VAR_1}.{STR_VAR_2}");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_TimesPerSec[] = _(" Times/sec.");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_Var1Percent[] = _("{STR_VAR_1}%");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_PressesRankings[] = _("No. of Presses Rankings");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_CrushingResults[] = _("Crushing Results");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_NeatnessRankings[] = _("Neatness Rankings");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_CoopRankings[] = _("Cooperative Rankings");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_PressingPowerRankings[] = _("Pressing-Power Rankings");
|
||||
ALIGNED(4) const u8 gText_ReadyToBerryCrush[] = _("Are you ready to BERRY-CRUSH?\nPlease pick a BERRY for use.\p");
|
||||
ALIGNED(4) const u8 gText_WaitForAllChooseBerry[] = _("Please wait while each member\nchooses a BERRY.");
|
||||
ALIGNED(4) const u8 gText_EndedWithXUnitsPowder[] = _("{PAUSE_MUSIC}{PLAY_BGM MUS_FANFA1}You ended up with {STR_VAR_1} units of\nsilky-smooth BERRY POWDER.{RESUME_MUSIC}\pYour total amount of BERRY POWDER\nis {STR_VAR_2}.\p");
|
||||
ALIGNED(4) const u8 gText_RecordingGameResults[] = _("Recording your game results in the\nsave file.\lPlease wait.");
|
||||
ALIGNED(4) const u8 gText_PlayBerryCrushAgain[] = _("Want to play BERRY CRUSH again?");
|
||||
ALIGNED(4) const u8 gText_YouHaveNoBerries[] = _("You have no BERRIES.\nThe game will be canceled.");
|
||||
ALIGNED(4) const u8 gText_MemberDroppedOut[] = _("A member dropped out.\nThe game will be canceled.");
|
||||
ALIGNED(4) const u8 gText_TimesUpNoGoodPowder[] = _("Time’s up.\pGood BERRY POWDER could not be\nmade…\p");
|
||||
ALIGNED(4) const u8 gText_CommunicationStandby2[] = _("Communication standby…");
|
||||
ALIGNED(4) const u8 gText_1DotBlueF700[] = _("1. {COLOR BLUE}{SHADOW LIGHT_BLUE}{SPECIAL_F7 0x00}");
|
||||
ALIGNED(4) const u8 gText_1DotF700[] = _("1. {SPECIAL_F7 0x00}");
|
||||
ALIGNED(4) const u8 gText_SpaceTimes2[] = _(" time(s)");
|
||||
ALIGNED(4) const u8 gText_XDotY[] = _("{STR_VAR_1}.{STR_VAR_2}");
|
||||
ALIGNED(4) const u8 gText_Var1Berry[] = _("{STR_VAR_1} BERRY");
|
||||
ALIGNED(4) const u8 gText_TimeColon[] = _("Time:");
|
||||
ALIGNED(4) const u8 gText_PressingSpeed[] = _("Pressing Speed:");
|
||||
ALIGNED(4) const u8 gText_Silkiness[] = _("Silkiness:");
|
||||
ALIGNED(4) const u8 gText_StrVar1[] = _("{STR_VAR_1}");
|
||||
ALIGNED(4) const u8 gText_SpaceMin[] = _(" min. ");
|
||||
ALIGNED(4) const u8 gText_XDotY2[] = _("{STR_VAR_1}.{STR_VAR_2}");
|
||||
ALIGNED(4) const u8 gText_SpaceSec[] = _(" sec.");
|
||||
ALIGNED(4) const u8 gText_XDotY3[] = _("{STR_VAR_1}.{STR_VAR_2}");
|
||||
ALIGNED(4) const u8 gText_TimesPerSec[] = _(" Times/sec.");
|
||||
ALIGNED(4) const u8 gText_Var1Percent[] = _("{STR_VAR_1}%");
|
||||
ALIGNED(4) const u8 gText_PressesRankings[] = _("No. of Presses Rankings");
|
||||
ALIGNED(4) const u8 gText_CrushingResults[] = _("Crushing Results");
|
||||
ALIGNED(4) const u8 gText_NeatnessRankings[] = _("Neatness Rankings");
|
||||
ALIGNED(4) const u8 gText_CoopRankings[] = _("Cooperative Rankings");
|
||||
ALIGNED(4) const u8 gText_PressingPowerRankings[] = _("Pressing-Power Rankings");
|
||||
const u8 gText_BerryCrush2[] = _("BERRY CRUSH");
|
||||
const u8 gText_PressingSpeedRankings[] = _("Pressing-Speed Rankings");
|
||||
const u8 gText_Var1Players[] = _("{STR_VAR_1} PLAYERS");
|
||||
@@ -1546,30 +1448,14 @@ const u8 gText_TimesCleared[] = _("Times cleared:{CLEAR 0x05}{STR_VAR_1}");
|
||||
const u8 gText_KOsInARow[] = _("KOs in a row: {STR_VAR_1}");
|
||||
const u8 gText_TimesVar1[] = _("Times: {STR_VAR_1}");
|
||||
const u8 gText_FloorsCleared[] = _("Floors cleared: {STR_VAR_1}");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gUnknown_085EE3B0[] = _("LV. 50");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gUnknown_085EE3B8[] = _("OPEN LEVEL");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gUnknown_085EE3C4[] = _("Win streak: {STR_VAR_2}");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gUnknown_085EE3D4[] = _("Clear streak: {STR_VAR_2}");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gUnknown_085EE3E8[] = _("Rooms cleared: {STR_VAR_2}");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gUnknown_085EE3FC[] = _("KOs in a row: {STR_VAR_2}");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gUnknown_085EE410[] = _("Floors cleared: {STR_VAR_2}");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_123Dot[][3] = {_("1."), _("2."), _("3.")};
|
||||
ALIGNED(4) const u8 gUnknown_085EE3B0[] = _("LV. 50");
|
||||
ALIGNED(4) const u8 gUnknown_085EE3B8[] = _("OPEN LEVEL");
|
||||
ALIGNED(4) const u8 gUnknown_085EE3C4[] = _("Win streak: {STR_VAR_2}");
|
||||
ALIGNED(4) const u8 gUnknown_085EE3D4[] = _("Clear streak: {STR_VAR_2}");
|
||||
ALIGNED(4) const u8 gUnknown_085EE3E8[] = _("Rooms cleared: {STR_VAR_2}");
|
||||
ALIGNED(4) const u8 gUnknown_085EE3FC[] = _("KOs in a row: {STR_VAR_2}");
|
||||
ALIGNED(4) const u8 gUnknown_085EE410[] = _("Floors cleared: {STR_VAR_2}");
|
||||
ALIGNED(4) const u8 gText_123Dot[][3] = {_("1."), _("2."), _("3.")};
|
||||
const u8 gText_SavingDontTurnOff2[] = _("SAVING…\nDON’T TURN OFF THE POWER.");
|
||||
const u8 gText_BlenderMaxSpeedRecord[] = _("BERRY BLENDER\nMAXIMUM SPEED RECORD!");
|
||||
const u8 gText_234Players[] = _("2 PLAYERS\n3 PLAYERS\n4 PLAYERS");
|
||||
@@ -1768,185 +1654,66 @@ const u8 *const gTextTable_Players[] = {
|
||||
gText_F703Players
|
||||
};
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_WonderCards[] = _("WONDER CARDS");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_WonderNews[] = _("WONDER NEWS");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_WirelessCommunication[] = _("WIRELESS COMMUNICATION");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_Friend2[] = _("FRIEND");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_Exit3[] = _("EXIT");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_Receive[] = _("RECEIVE");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_Send[] = _("SEND");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_Toss[] = _("TOSS");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_VarietyOfEventsImportedWireless[] = _("A variety of events will be imported\nover Wireless Communication.");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_WonderCardsInPossession[] = _("Read the WONDER CARDS in your\npossession.");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_ReadNewsThatArrived[] = _("Read the NEWS that arrived.");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_ReturnToTitle[] = _("Return to the title screen.");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_DontHaveCardNewOneInput[] = _("You don’t have a WONDER CARD,\nso a new CARD will be input.");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_DontHaveNewsNewOneInput[] = _("You don’t have any WONDER NEWS,\nso new NEWS will be input.");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_WhereShouldCardBeAccessed[] = _("Where should the WONDER CARD\nbe accessed?");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_WhereShouldNewsBeAccessed[] = _("Where should the WONDER NEWS\nbe accessed?");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gUnknown_085EEFC0[] = _("Communication standby…\nB Button: Cancel");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_Communicating[] = _("Communicating…");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_CommunicationCompleted[] = _("Communication completed.");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_CommunicationError[] = _("Communication error.");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_CommunicationCanceled[] = _("Communication has been canceled.");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_ThrowAwayWonderCard[] = _("Throw away the WONDER CARD\nand input a new CARD?");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_HaventReceivedCardsGift[] = _("You haven’t received the CARD’s gift\nyet. Input a new CARD anyway?");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_WonderCardReceivedFrom[] = _("A WONDER CARD has been received\nfrom {STR_VAR_1}.");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_WonderNewsReceivedFrom[] = _("A WONDER NEWS item has been\nreceived from {STR_VAR_1}.");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_WonderCardReceived[] = _("A new WONDER CARD has been\nreceived.");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_WonderNewsReceived[] = _("A new WONDER NEWS item has been\nreceived.");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_NewStampReceived[] = _("A new STAMP has been received.");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_NewTrainerReceived[] = _("A new TRAINER has arrived.");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_AlreadyHadCard[] = _("You already had that\nWONDER CARD.");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_AlreadyHadNews[] = _("You already had that\nWONDER NEWS item.");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_AlreadyHadStamp[] = _("You already had that\nSTAMP.");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_NoMoreRoomForStamps[] = _("There’s no more room for adding\nSTAMPS.");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_RecordUploadedViaWireless[] = _("Your record has been uploaded via\nWIRELESS COMMUNICATION.");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_CantAcceptCardFromTrainer[] = _("You can’t accept a WONDER CARD\nfrom this TRAINER.");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_CantAcceptNewsFromTrainer[] = _("You can’t accept WONDER NEWS\nfrom this TRAINER.");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_NothingSentOver[] = _("Nothing was sent over…");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_WhatToDoWithCards[] = _("What would you like to do\nwith the WONDER CARDS?");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_WhatToDoWithNews[] = _("What would you like to do\nwith the WONDER NEWS?");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_SendingWonderCard[] = _("Sending your WONDER CARD…");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_SendingWonderNews[] = _("Sending your WONDER NEWS item…");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_WonderCardSentTo[] = _("Your WONDER CARD has been sent\nto {STR_VAR_1}.");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_WonderNewsSentTo[] = _("Your WONDER NEWS item has been\nsent to {STR_VAR_1}.");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_StampSentTo[] = _("A STAMP has been sent to {STR_VAR_1}.");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_GiftSentTo[] = _("A GIFT has been sent to {STR_VAR_1}.");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_OtherTrainerHasCard[] = _("The other TRAINER has the same\nWONDER CARD already.");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_OtherTrainerHasNews[] = _("The other TRAINER has the same\nWONDER NEWS already.");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_OtherTrainerHasStamp[] = _("The other TRAINER has the same\nSTAMP already.");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_OtherTrainerCanceled[] = _("The other TRAINER canceled\ncommunication.");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_CantSendGiftToTrainer[] = _("You can’t send a MYSTERY GIFT to\nthis TRAINER.");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_IfThrowAwayCardEventWontHappen[] = _("If you throw away the CARD,\nits event won’t happen. Okay?");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_OkayToDiscardNews[] = _("Is it okay to discard this\nNEWS item?");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_HaventReceivedGiftOkayToDiscard[] = _("You haven’t received the\nGIFT. Is it okay to discard?");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_DataWillBeSaved[] = _("Data will be saved.\nPlease wait.");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_SaveCompletedPressA[] = _("Save completed.\nPlease press the A Button.");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_WonderCardThrownAway[] = _("The WONDER CARD was thrown away.");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_WonderNewsThrownAway[] = _("The WONDER NEWS was thrown away.");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_MysteryGift[] = _("MYSTERY GIFT");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_PickOKExit[] = _("{DPAD_UPDOWN}PICK {A_BUTTON}OK {B_BUTTON}EXIT");
|
||||
|
||||
asm(".align 2");
|
||||
const u8 gText_PickOKCancel[] = _("{DPAD_UPDOWN}PICK {A_BUTTON}OK {B_BUTTON}CANCEL");
|
||||
ALIGNED(4) const u8 gText_WonderCards[] = _("WONDER CARDS");
|
||||
ALIGNED(4) const u8 gText_WonderNews[] = _("WONDER NEWS");
|
||||
ALIGNED(4) const u8 gText_WirelessCommunication[] = _("WIRELESS COMMUNICATION");
|
||||
ALIGNED(4) const u8 gText_Friend2[] = _("FRIEND");
|
||||
ALIGNED(4) const u8 gText_Exit3[] = _("EXIT");
|
||||
ALIGNED(4) const u8 gText_Receive[] = _("RECEIVE");
|
||||
ALIGNED(4) const u8 gText_Send[] = _("SEND");
|
||||
ALIGNED(4) const u8 gText_Toss[] = _("TOSS");
|
||||
ALIGNED(4) const u8 gText_VarietyOfEventsImportedWireless[] = _("A variety of events will be imported\nover Wireless Communication.");
|
||||
ALIGNED(4) const u8 gText_WonderCardsInPossession[] = _("Read the WONDER CARDS in your\npossession.");
|
||||
ALIGNED(4) const u8 gText_ReadNewsThatArrived[] = _("Read the NEWS that arrived.");
|
||||
ALIGNED(4) const u8 gText_ReturnToTitle[] = _("Return to the title screen.");
|
||||
ALIGNED(4) const u8 gText_DontHaveCardNewOneInput[] = _("You don’t have a WONDER CARD,\nso a new CARD will be input.");
|
||||
ALIGNED(4) const u8 gText_DontHaveNewsNewOneInput[] = _("You don’t have any WONDER NEWS,\nso new NEWS will be input.");
|
||||
ALIGNED(4) const u8 gText_WhereShouldCardBeAccessed[] = _("Where should the WONDER CARD\nbe accessed?");
|
||||
ALIGNED(4) const u8 gText_WhereShouldNewsBeAccessed[] = _("Where should the WONDER NEWS\nbe accessed?");
|
||||
ALIGNED(4) const u8 gUnknown_085EEFC0[] = _("Communication standby…\nB Button: Cancel");
|
||||
ALIGNED(4) const u8 gText_Communicating[] = _("Communicating…");
|
||||
ALIGNED(4) const u8 gText_CommunicationCompleted[] = _("Communication completed.");
|
||||
ALIGNED(4) const u8 gText_CommunicationError[] = _("Communication error.");
|
||||
ALIGNED(4) const u8 gText_CommunicationCanceled[] = _("Communication has been canceled.");
|
||||
ALIGNED(4) const u8 gText_ThrowAwayWonderCard[] = _("Throw away the WONDER CARD\nand input a new CARD?");
|
||||
ALIGNED(4) const u8 gText_HaventReceivedCardsGift[] = _("You haven’t received the CARD’s gift\nyet. Input a new CARD anyway?");
|
||||
ALIGNED(4) const u8 gText_WonderCardReceivedFrom[] = _("A WONDER CARD has been received\nfrom {STR_VAR_1}.");
|
||||
ALIGNED(4) const u8 gText_WonderNewsReceivedFrom[] = _("A WONDER NEWS item has been\nreceived from {STR_VAR_1}.");
|
||||
ALIGNED(4) const u8 gText_WonderCardReceived[] = _("A new WONDER CARD has been\nreceived.");
|
||||
ALIGNED(4) const u8 gText_WonderNewsReceived[] = _("A new WONDER NEWS item has been\nreceived.");
|
||||
ALIGNED(4) const u8 gText_NewStampReceived[] = _("A new STAMP has been received.");
|
||||
ALIGNED(4) const u8 gText_NewTrainerReceived[] = _("A new TRAINER has arrived.");
|
||||
ALIGNED(4) const u8 gText_AlreadyHadCard[] = _("You already had that\nWONDER CARD.");
|
||||
ALIGNED(4) const u8 gText_AlreadyHadNews[] = _("You already had that\nWONDER NEWS item.");
|
||||
ALIGNED(4) const u8 gText_AlreadyHadStamp[] = _("You already had that\nSTAMP.");
|
||||
ALIGNED(4) const u8 gText_NoMoreRoomForStamps[] = _("There’s no more room for adding\nSTAMPS.");
|
||||
ALIGNED(4) const u8 gText_RecordUploadedViaWireless[] = _("Your record has been uploaded via\nWIRELESS COMMUNICATION.");
|
||||
ALIGNED(4) const u8 gText_CantAcceptCardFromTrainer[] = _("You can’t accept a WONDER CARD\nfrom this TRAINER.");
|
||||
ALIGNED(4) const u8 gText_CantAcceptNewsFromTrainer[] = _("You can’t accept WONDER NEWS\nfrom this TRAINER.");
|
||||
ALIGNED(4) const u8 gText_NothingSentOver[] = _("Nothing was sent over…");
|
||||
ALIGNED(4) const u8 gText_WhatToDoWithCards[] = _("What would you like to do\nwith the WONDER CARDS?");
|
||||
ALIGNED(4) const u8 gText_WhatToDoWithNews[] = _("What would you like to do\nwith the WONDER NEWS?");
|
||||
ALIGNED(4) const u8 gText_SendingWonderCard[] = _("Sending your WONDER CARD…");
|
||||
ALIGNED(4) const u8 gText_SendingWonderNews[] = _("Sending your WONDER NEWS item…");
|
||||
ALIGNED(4) const u8 gText_WonderCardSentTo[] = _("Your WONDER CARD has been sent\nto {STR_VAR_1}.");
|
||||
ALIGNED(4) const u8 gText_WonderNewsSentTo[] = _("Your WONDER NEWS item has been\nsent to {STR_VAR_1}.");
|
||||
ALIGNED(4) const u8 gText_StampSentTo[] = _("A STAMP has been sent to {STR_VAR_1}.");
|
||||
ALIGNED(4) const u8 gText_GiftSentTo[] = _("A GIFT has been sent to {STR_VAR_1}.");
|
||||
ALIGNED(4) const u8 gText_OtherTrainerHasCard[] = _("The other TRAINER has the same\nWONDER CARD already.");
|
||||
ALIGNED(4) const u8 gText_OtherTrainerHasNews[] = _("The other TRAINER has the same\nWONDER NEWS already.");
|
||||
ALIGNED(4) const u8 gText_OtherTrainerHasStamp[] = _("The other TRAINER has the same\nSTAMP already.");
|
||||
ALIGNED(4) const u8 gText_OtherTrainerCanceled[] = _("The other TRAINER canceled\ncommunication.");
|
||||
ALIGNED(4) const u8 gText_CantSendGiftToTrainer[] = _("You can’t send a MYSTERY GIFT to\nthis TRAINER.");
|
||||
ALIGNED(4) const u8 gText_IfThrowAwayCardEventWontHappen[] = _("If you throw away the CARD,\nits event won’t happen. Okay?");
|
||||
ALIGNED(4) const u8 gText_OkayToDiscardNews[] = _("Is it okay to discard this\nNEWS item?");
|
||||
ALIGNED(4) const u8 gText_HaventReceivedGiftOkayToDiscard[] = _("You haven’t received the\nGIFT. Is it okay to discard?");
|
||||
ALIGNED(4) const u8 gText_DataWillBeSaved[] = _("Data will be saved.\nPlease wait.");
|
||||
ALIGNED(4) const u8 gText_SaveCompletedPressA[] = _("Save completed.\nPlease press the A Button.");
|
||||
ALIGNED(4) const u8 gText_WonderCardThrownAway[] = _("The WONDER CARD was thrown away.");
|
||||
ALIGNED(4) const u8 gText_WonderNewsThrownAway[] = _("The WONDER NEWS was thrown away.");
|
||||
ALIGNED(4) const u8 gText_MysteryGift[] = _("MYSTERY GIFT");
|
||||
ALIGNED(4) const u8 gText_PickOKExit[] = _("{DPAD_UPDOWN}PICK {A_BUTTON}OK {B_BUTTON}EXIT");
|
||||
ALIGNED(4) const u8 gText_PickOKCancel[] = _("{DPAD_UPDOWN}PICK {A_BUTTON}OK {B_BUTTON}CANCEL");
|
||||
const u8 gText_PlayersBattleResults[] = _("{PLAYER}’s BATTLE RESULTS");
|
||||
const u8 gText_TotalRecordWLD[] = _("TOTAL RECORD W:{STR_VAR_1} L:{STR_VAR_2} D:{STR_VAR_3}");
|
||||
const u8 gText_WinLoseDraw[] = _("{CLEAR_TO 0x53}WIN{CLEAR_TO 0x80}LOSE{CLEAR_TO 0xB0}DRAW");
|
||||
|
||||
+213
-794
File diff suppressed because it is too large
Load Diff
+1
-2
@@ -1,4 +1,5 @@
|
||||
#include "global.h"
|
||||
#include "battle.h"
|
||||
#include "title_screen.h"
|
||||
#include "sprite.h"
|
||||
#include "gba/m4a_internal.h"
|
||||
@@ -37,8 +38,6 @@
|
||||
#define A_B_START_SELECT (A_BUTTON | B_BUTTON | START_BUTTON | SELECT_BUTTON)
|
||||
|
||||
extern struct MusicPlayerInfo gMPlayInfo_BGM;
|
||||
extern u16 gBattle_BG1_X;
|
||||
extern u16 gBattle_BG1_Y;
|
||||
|
||||
// this file's functions
|
||||
static void MainCB2(void);
|
||||
|
||||
+1
-2
@@ -12,11 +12,10 @@
|
||||
#include "task.h"
|
||||
#include "trainer_see.h"
|
||||
#include "util.h"
|
||||
#include "battle_pyramid.h"
|
||||
#include "constants/field_effects.h"
|
||||
|
||||
extern bool8 InBattlePyramid(void);
|
||||
extern bool32 InTrainerHill(void);
|
||||
extern bool8 GetBattlePyramidTrainerFlag(u8 eventObjectId);
|
||||
extern bool8 GetTrainerHillTrainerFlag(u8 eventObjectId);
|
||||
extern void sub_809BE48(u16 npcId);
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include "link.h"
|
||||
#include "script.h"
|
||||
#include "battle_pike.h"
|
||||
#include "battle_pyramid.h"
|
||||
#include "constants/items.h"
|
||||
#include "constants/maps.h"
|
||||
|
||||
@@ -26,9 +27,6 @@ extern const u8 EventScript_RepelWoreOff[];
|
||||
|
||||
#define NUM_FEEBAS_SPOTS 6
|
||||
|
||||
extern void GenerateBattlePyramidWildMon(void);
|
||||
extern bool8 InBattlePyramid(void);
|
||||
|
||||
// this file's functions
|
||||
static u16 FeebasRandom(void);
|
||||
static void FeebasSeedRng(u16 seed);
|
||||
|
||||
Reference in New Issue
Block a user