Merge pull request #473 from ElectroDeoxys/master
Some checks failed
GithubCI / build (push) Has been cancelled

Identify AnimatedColor struct
This commit is contained in:
AnonymousRandomPerson 2026-02-07 17:23:30 -05:00 committed by GitHub
commit deece80e01
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
47 changed files with 598 additions and 668 deletions

File diff suppressed because it is too large Load Diff

View File

@ -4,21 +4,21 @@
#include "structs/str_202EE8C.h"
#include "structs/str_file_system.h"
extern unkStruct_202EE8C gUnknown_202EE8C[32];
extern AnimatedColor gDungeonAnimatedColors[32];
// size: Variable
typedef struct unkDataFor8004AA4
typedef struct AnimatedColorData
{
/* 0x0 */ s16 colorCount;
s16 unk2;
/* 0x4 */ RGB_Struct colors[0];
} unkDataFor8004AA4;
s16 colorCount; // how many colors to cycle through (pointed by colors)
s16 duration; // duration of each color
RGB_Struct colors[0]; // color data
} AnimatedColorData;
void nullsub_6(void);
void sub_8004AA4(unkStruct_202EE8C *, OpenedFile *, s32);
bool8 sub_8004AF0(bool8, unkStruct_202EE8C *, s32, s32, s32, const RGB_Struct *);
bool8 sub_8004C00(unkStruct_202EE8C *a0, s32 a1, s32 a2, s32 brightness, const RGB_Struct *ramp, RGB_Struct16 *a5);
bool8 sub_8004D14(unkStruct_202EE8C *, s32);
bool8 sub_8004D40(unkStruct_202EE8C *, s32);
void ReadAnimatedColorData(AnimatedColor *, OpenedFile *, s32);
bool8 UpdateAnimatedColors(bool8, AnimatedColor *, s32, s32, s32, const RGB_Struct *);
bool8 sub_8004C00(AnimatedColor *a0, s32 a1, s32 a2, s32 brightness, const RGB_Struct *ramp, RGB_Struct16 *a5);
bool8 sub_8004D14(AnimatedColor *, s32);
bool8 sub_8004D40(AnimatedColor *, s32);
#endif // GUARD_CODE_8004AA0_H

View File

@ -6,7 +6,7 @@
#include "structs/str_stat_index.h"
s32 sub_80416E0(PixelPos *pos, u32 param_2, bool8 param_3);
void sub_804178C_Async(u8 param_1);
void sub_804178C_Async(bool8 param_1);
u32 EntityGetStatusSprites(Entity *entity);
void sub_8041888(u8 param_1);
void UpdateStatusIconFlags(Entity *entity);

View File

@ -45,6 +45,6 @@ extern s32 gUnknown_202EDD0;
extern struct UnkStruct_202EDE8 gUnknown_202EDE8;
extern u8 gUnknown_203B40C;
extern u8 gUnknown_203B40D;
extern bool8 gUnknown_203B40D;
#endif // GUARD_DUNGEON_VRAM_H

View File

@ -56,7 +56,7 @@ u8 sub_800EA44(s32 monsterId_, s32 param_2);
s32 sub_800EA84(struct UnkStruct_8040094 *a0);
void sub_800EB24(s32 param_1, DungeonPos *param_2, DungeonPos *param_3, s32 r5, s32 r4);
s32 sub_800EBC8(struct UnkStruct_8040094 *a0);
u8 sub_800EC74(void);
bool8 sub_800EC74(void);
bool8 sub_800EC84(s32 moveId);
u8 sub_800EC94(s32 param_1);

View File

@ -11,6 +11,6 @@ s32 sub_800F0F4(s32 animType, s32 effectID);
void sub_800F13C(s32 index, OpenedFile *file, const unkStruct_80B9CC4 *r2);
void sub_800F15C(s32 effectID);
unkStruct_800F18C *sub_800F18C(s32 index);
s32 sub_800F19C(s32 index);
bool8 sub_800F19C(s32 index);
#endif // GUARD_EFFECT_SUB_2_H

View File

@ -76,7 +76,7 @@ struct FriendAreasMap
u8 unk4A2C;
axdata arrowSprites[NUM_DIRECTIONS];
axdata monAxSprite;
unkStruct_202EE8C unk4C4C[16];
AnimatedColor unk4C4C[16];
s32 brightness;
u32 unk4DD0;
DungeonPos bgPos;

View File

@ -92,7 +92,7 @@ typedef struct axmain
typedef struct axObject
{
/* 0x0 */ axdata axdata;
/* 0x3C */ OpenedFile *spriteFile; // This might be a unkStruct_202EE8C instead and unkStruct_202EE8C.unk0 might be a OpenedFile* etc. See friend_areas_map_util.AnimateSprites()
/* 0x3C */ OpenedFile *spriteFile;
s16 unk40_maybeAnimTimer;
u8 unk42_animId1;
u8 unk43_animId2;

View File

@ -4,15 +4,15 @@
#include "structs/rgb.h"
// size: 0x18
typedef struct unkStruct_202EE8C
typedef struct AnimatedColor
{
u32 unk0;
u16 unk4;
s16 unk6;
RGB_Struct *unk8;
RGB_Struct *unkC;
RGB_Struct *unk10;
RGB_Struct unk14;
} unkStruct_202EE8C;
u32 flags;
u16 duration;
s16 timer;
RGB_Struct *colorsStart;
RGB_Struct *currentColor;
RGB_Struct *colorsEnd;
RGB_Struct color;
} AnimatedColor;
#endif // GUARD_STR_202EE8C_H

View File

@ -95,7 +95,7 @@ typedef struct UnkDungeonGlobal_unk181E8_sub
u8 unk18212; // x2A
bool8 unk18213; // x2B
bool8 inFloorMapMode; // x2C
u8 unk18215; // x2D
bool8 unk18215; // x2D
u8 unk18216; // x2E
u8 unk18217; // x2F
u8 unk18218; // x30

View File

@ -134,7 +134,7 @@ typedef struct BplHeader
typedef struct GroundBg
{
SubStruct_0 unk0[UNK_0_ARR_COUNT];
unkStruct_202EE8C unkE0[UNK_E0_ARR_COUNT];
AnimatedColor unkE0[UNK_E0_ARR_COUNT];
SubStruct_3E0 unk3E0[UNK_3E0_ARR_COUNT];
OpenedFile *bplFile;
OpenedFile *bpcFile;

View File

@ -26,7 +26,7 @@ struct WorldMap
u16 unk1114[64][64];
u16 unk3114[64][64];
axdata monAxSprite;
unkStruct_202EE8C unk5150[16];
AnimatedColor unk5150[16];
s32 brightness;
s32 unk52D4;
DungeonPos bgPos;

View File

@ -7,97 +7,97 @@ void nullsub_6(void)
{
}
void sub_8004AA4(unkStruct_202EE8C *a0, OpenedFile *a1, s32 a2)
void ReadAnimatedColorData(AnimatedColor *destColors, OpenedFile *file, s32 numColors)
{
unkDataFor8004AA4 **data;
unkDataFor8004AA4 *ptr;
AnimatedColorData **data;
AnimatedColorData *colorData;
s32 i;
data = (unkDataFor8004AA4 **)a1->data;
for (i = 0; i < a2; i++) {
ptr = *data++;
data = (AnimatedColorData **)file->data;
for (i = 0; i < numColors; i++) {
colorData = *data++;
if (ptr->colorCount != 0) {
a0->unk0 = 0x80000000;
a0->unk6 = ptr->unk2;
a0->unk4 = ptr->unk2;
a0->unk8 = ptr->colors;
a0->unkC = ptr->colors;
a0->unk10 = &ptr->colors[ptr->colorCount];
a0->unk14 = ptr->colors[0];
if (colorData->colorCount != 0) {
destColors->flags = 0x80000000;
destColors->timer = colorData->duration;
destColors->duration = colorData->duration;
destColors->colorsStart = colorData->colors;
destColors->currentColor = colorData->colors;
destColors->colorsEnd = &colorData->colors[colorData->colorCount];
destColors->color = colorData->colors[0];
}
else
a0->unk0 = 0;
destColors->flags = 0;
a0++;
destColors++;
}
}
bool8 sub_8004AF0(bool8 a0, unkStruct_202EE8C *a1, s32 a2, s32 a3, s32 a4, const RGB_Struct *a5)
bool8 UpdateAnimatedColors(bool8 forcePaletteUpdate, AnimatedColor *animatedColors, s32 index, s32 numAnimatedColors, s32 brightness, const RGB_Struct *ramp)
{
bool8 bVar3;
bool8 update;
bool8 ret;
s32 i;
ret = FALSE;
for (i = 0; i < a3; i++, a1++, a2++) {
if (!sub_8004D14(a1, 1) || sub_8004D40(a1, 1))
for (i = 0; i < numAnimatedColors; i++, animatedColors++, index++) {
if (!sub_8004D14(animatedColors, 1) || sub_8004D40(animatedColors, 1))
continue;
bVar3 = a0;
a1->unk6--;
update = forcePaletteUpdate;
animatedColors->timer--;
if (a1->unk6 <= 0) {
a1->unk6 = a1->unk4;
if (a1->unkC >= a1->unk10)
a1->unkC = a1->unk8;
if (animatedColors->timer <= 0) {
animatedColors->timer = animatedColors->duration;
if (animatedColors->currentColor >= animatedColors->colorsEnd)
animatedColors->currentColor = animatedColors->colorsStart;
a1->unk14 = *a1->unkC++;
bVar3 = TRUE;
animatedColors->color = *animatedColors->currentColor++;
update = TRUE;
ret = TRUE;
}
if (bVar3)
SetBGPaletteBufferColorRGB(a2, &a1->unk14, a4, a5);
if (update)
SetBGPaletteBufferColorRGB(index, &animatedColors->color, brightness, ramp);
}
return ret;
}
UNUSED static bool8 sub_8004B78(bool8 a0, unkStruct_202EE8C *a1, s32 a2, s32 a3, s32 a4, const RGB_Struct *a5)
UNUSED static bool8 sub_8004B78(bool8 forcePaletteUpdate, AnimatedColor *animatedColors, s32 index, s32 numAnimatedColors, s32 brightness, const RGB_Struct *ramp)
{
bool8 bVar3;
bool8 update;
bool8 ret;
s32 i;
ret = FALSE;
for (i = 0; i < a3; i++, a1++, a2++) {
if (!sub_8004D14(a1, 1) || sub_8004D40(a1, 1))
for (i = 0; i < numAnimatedColors; i++, animatedColors++, index++) {
if (!sub_8004D14(animatedColors, 1) || sub_8004D40(animatedColors, 1))
continue;
bVar3 = a0;
a1->unk6--;
update = forcePaletteUpdate;
animatedColors->timer--;
if (a1->unk6 <= 0) {
a1->unk6 = a1->unk4;
if (a1->unkC >= a1->unk10)
a1->unkC = a1->unk8;
if (animatedColors->timer <= 0) {
animatedColors->timer = animatedColors->duration;
if (animatedColors->currentColor >= animatedColors->colorsEnd)
animatedColors->currentColor = animatedColors->colorsStart;
a1->unk14 = *a1->unkC++;
bVar3 = TRUE;
animatedColors->color = *animatedColors->currentColor++;
update = TRUE;
ret = TRUE;
}
if (bVar3)
nullsub_4(a2, &a1->unk14, a4, a5);
if (update)
nullsub_4(index, &animatedColors->color, brightness, ramp);
}
return ret;
}
bool8 sub_8004C00(unkStruct_202EE8C *a0, s32 a1, s32 a2, s32 brightness, const RGB_Struct *ramp, RGB_Struct16 *a5)
bool8 sub_8004C00(AnimatedColor *animatedColors, s32 index, s32 numAnimatedColors, s32 brightness, const RGB_Struct *ramp, RGB_Struct16 *a5)
{
bool8 ret;
s32 i;
@ -108,24 +108,24 @@ bool8 sub_8004C00(unkStruct_202EE8C *a0, s32 a1, s32 a2, s32 brightness, const R
ret = FALSE;
for (i = 0; i < a2; i++, a0++, a1++) {
if (!sub_8004D14(a0, 1) || sub_8004D40(a0, 1))
for (i = 0; i < numAnimatedColors; i++, animatedColors++, index++) {
if (!sub_8004D14(animatedColors, 1) || sub_8004D40(animatedColors, 1))
continue;
a0->unk6--;
animatedColors->timer--;
if (a0->unk6 <= 0) {
a0->unk6 = a0->unk4;
if (a0->unkC >= a0->unk10)
a0->unkC = a0->unk8;
if (animatedColors->timer <= 0) {
animatedColors->timer = animatedColors->duration;
if (animatedColors->currentColor >= animatedColors->colorsEnd)
animatedColors->currentColor = animatedColors->colorsStart;
a0->unk14 = *a0->unkC++;
animatedColors->color = *animatedColors->currentColor++;
ret = TRUE;
}
r = a5->r + a0->unk14.r;
g = a5->g + a0->unk14.g;
b = a5->b + a0->unk14.b;
r = a5->r + animatedColors->color.r;
g = a5->g + animatedColors->color.g;
b = a5->b + animatedColors->color.b;
if (r > 0xFF)
r = 0xFF;
@ -144,42 +144,47 @@ bool8 sub_8004C00(unkStruct_202EE8C *a0, s32 a1, s32 a2, s32 brightness, const R
color.g = g;
color.b = b;
SetBGPaletteBufferColorRGB(a1, &color, brightness, ramp);
SetBGPaletteBufferColorRGB(index, &color, brightness, ramp);
}
return ret;
}
UNUSED static void sub_8004CFC(unkStruct_202EE8C *a0, s32 a1)
UNUSED static void sub_8004CFC(AnimatedColor *animatedColors, s32 numAnimatedColors)
{
s32 i;
for (i = 0; i < a1; a0++, i++) {
a0->unk0 = 0;
for (i = 0; i < numAnimatedColors; animatedColors++, i++) {
animatedColors->flags = 0;
}
}
bool8 sub_8004D14(unkStruct_202EE8C *a0, s32 a1)
bool8 sub_8004D14(AnimatedColor *animatedColors, s32 numAnimatedColors)
{
s32 i;
for (i = 0; i < a1; i++) {
if (a0->unk0 & 0x80000000)
for (i = 0; i < numAnimatedColors; i++) {
if (animatedColors->flags & 0x80000000)
return TRUE;
a0++;
animatedColors++;
}
return FALSE;
}
bool8 sub_8004D40(unkStruct_202EE8C *a0, s32 a1)
bool8 sub_8004D40(AnimatedColor *animatedColors, s32 numAnimatedColors)
{
s32 i;
for (i = 0; i < a1; i++) {
if (a0->unk0 & 0x80000000) {
if (!(a0->unk0 & 0x20000000))
for (i = 0; i < numAnimatedColors; i++) {
if (animatedColors->flags & 0x80000000) {
if (!(animatedColors->flags & 0x20000000))
return FALSE;
a0++;
// BUG: this increment should be in outer scope.
// if this function is called with numAnimatedColors > 1
// and first color has flag not set, then
// this for loop will keep checking the same flags.
// luckily this function is only used with numAnimatedColors = 1
animatedColors++;
}
}
return TRUE;

View File

@ -57,7 +57,7 @@ bool8 sub_8040BB0(Entity *entity, Move *move, bool8 a2)
static void sub_8040C4C(Entity *entity, Move *move, bool32 hasSpecialEffect)
{
u8 savedUnkVar;
bool8 savedUnkVar;
s32 r4;
struct UnkStruct_8040094 sp;
u16 r9 = GetEffectiveMoveId(move->id, GetApparentWeather(entity), hasSpecialEffect);
@ -92,7 +92,7 @@ static void sub_8040C4C(Entity *entity, Move *move, bool32 hasSpecialEffect)
if (!r8)
break;
gUnknown_203B40D = 1;
gUnknown_203B40D = TRUE;
if (gUnknown_2026E4E != 0x1010) {
gUnknown_2026E4E += 0x101;
}

View File

@ -290,27 +290,27 @@ static u32 sub_8041764(unkStruct_80416E0 *param_1, bool8 param_2)
return sub_800E890(param_1);
}
void sub_804178C_Async(u8 param_1)
void sub_804178C_Async(bool8 param_1)
{
u32 temp;
bool8 temp;
s32 counter;
counter = 0;
gDungeon->unk181e8.unk18204 = 0;
if (sub_800E9FC(param_1) != 0) {
while ((counter < 1000 && (sub_800E9FC(param_1) != 0))) {
if (sub_800E9FC(param_1)) {
while ((counter < 1000 && sub_800E9FC(param_1))) {
DungeonRunFrameActions(0x4a);
counter++;
}
DungeonRunFrameActions(0x4a);
DungeonRunFrameActions(0x4a);
}
if ((counter == 1000) || (param_1 != 0)) {
if ((counter == 1000) || param_1) {
sub_800DBBC();
}
if (gDungeonBrightness < 0x1f) {
temp = gUnknown_203B40D;
gUnknown_203B40D = 1;
gUnknown_203B40D = TRUE;
for(counter = 0; counter < 1000; counter++)
{
if (gDungeonBrightness < 0x1f) {
@ -1516,7 +1516,7 @@ static void sub_8042A84(s16 param_1, Entity *entity, u32 param_3)
iVar3 = (entity->pixelPos.y - entity->unk1C) / 256;
} while (-8 <= iVar3 - gDungeon->unk181e8.cameraPixelPos.y);
entity->isVisible = 0;
sub_804178C_Async(0);
sub_804178C_Async(FALSE);
}
}

View File

@ -62,7 +62,7 @@ bool8 ExecuteEntityDungeonAction_Async(Entity *entity)
DungeonPos pos;
DungeonPos pos1;
sub_804178C_Async(1);
sub_804178C_Async(TRUE);
gUnknown_203B434 = TRUE;
info = GetEntInfo(entity);
info->useHeldItem = FALSE;

View File

@ -1250,7 +1250,7 @@ void SetDungeonBGColorRGB(s32 r, s32 g, s32 b, bool8 a3, bool8 a4)
colorS16.r = r;
colorS16.g = g;
colorS16.b = b;
sub_8004C00(gUnknown_202EE8C, 160, 32, gDungeonBrightness, gDungeon->colorRamp, &colorS16);
sub_8004C00(gDungeonAnimatedColors, 160, 32, gDungeonBrightness, gDungeon->colorRamp, &colorS16);
palIndex += 32;
colorPtr = gUnknown_202ECA4;
@ -1305,12 +1305,12 @@ void SetDungeonBGColorRGB(s32 r, s32 g, s32 b, bool8 a3, bool8 a4)
void sub_8085E98(void)
{
gDungeon->unk181e8.unk18215 = 0;
gDungeon->unk181e8.unk18215 = FALSE;
}
void sub_8085EB0(void)
{
gDungeon->unk181e8.unk18215 = 1;
gDungeon->unk181e8.unk18215 = TRUE;
}
static const unkStruct_2039DB0 sDefaultSpriteMasks = DEFAULT_UNK_2039DB0_MASKS;
@ -1762,7 +1762,7 @@ UNUSED static void sub_80866FC(void)
s32 i;
for (i = 0; i >= -250; i -= 10) {
SetDungeonBGColorRGB(i, i, i, 1, 0);
SetDungeonBGColorRGB(i, i, i, TRUE, FALSE);
DungeonRunFrameActions(70);
}
}
@ -1777,7 +1777,7 @@ void sub_8086738(void)
s32 i;
for (i = 0; i < 250; i += 10) {
SetDungeonBGColorRGB(i, i, i, 1, 0);
SetDungeonBGColorRGB(i, i, i, TRUE, FALSE);
DungeonRunFrameActions(70);
}
}
@ -1787,7 +1787,7 @@ void sub_8086764(void)
s32 i;
for (i = 250; i >= 0; i -= 5) {
SetDungeonBGColorRGB(i, i, i, 1, 0);
SetDungeonBGColorRGB(i, i, i, TRUE, FALSE);
DungeonRunFrameActions(70);
}
@ -1801,7 +1801,7 @@ void sub_8086794(void)
gDungeonBrightness = 0;
for (i = 0; i < 200; i++) {
SetDungeonBGColorRGB(0, 0, 0, 1, 0);
SetDungeonBGColorRGB(0, 0, 0, TRUE, FALSE);
BgColorCallNullsub4();
DungeonRunFrameActions(70);

View File

@ -237,17 +237,17 @@ void ArticunoPostStoryPreFightDialogue(void)
}
}
static void sub_8088484(Entity *param_1)
static void sub_8088484(Entity *entity)
{
s32 iVar1;
GetEntInfo(param_1)->unk15C = 1;
GetEntInfo(param_1)->unk15E = 0;
GetEntInfo(entity)->unk15C = 1;
GetEntInfo(entity)->unk15E = 0;
PlaySoundEffect(0x1ea);
for(iVar1 = 250; iVar1 >= 0; iVar1 -= 5)
{
GetEntInfo(param_1)->unk174 = IntToF248(iVar1);
SetDungeonBGColorRGB(iVar1,iVar1,iVar1 / 2,1,0);
GetEntInfo(entity)->unk174 = IntToF248(iVar1);
SetDungeonBGColorRGB(iVar1,iVar1,iVar1 / 2,TRUE,FALSE);
DungeonRunFrameActions(0x46);
}
}
@ -259,19 +259,19 @@ static void ArticunoScreenFlash(void)
PlaySoundEffect(0x2ad);
for(iVar1 = 250; iVar1 > 0x95; iVar1 -= 10)
{
SetDungeonBGColorRGB(iVar1 / 2,iVar1,iVar1,1,1);
SetDungeonBGColorRGB(iVar1 / 2,iVar1,iVar1,TRUE,TRUE);
DungeonRunFrameActions(0x46);
}
DungeonWaitFrames_Async(4,0x46);
for(iVar1 = 250; iVar1 > 199; iVar1 -= 10)
{
SetDungeonBGColorRGB(0,iVar1,iVar1,1,1);
SetDungeonBGColorRGB(0,iVar1,iVar1,TRUE,TRUE);
DungeonRunFrameActions(0x46);
}
DungeonWaitFrames_Async(4,0x46);
for(iVar1 = 250; iVar1 >= 0; iVar1 -= 10)
{
SetDungeonBGColorRGB(iVar1 / 2,iVar1,iVar1,1,1);
SetDungeonBGColorRGB(iVar1 / 2,iVar1,iVar1,TRUE,TRUE);
DungeonRunFrameActions(0x46);
}
DungeonWaitFrames_Async(4,0x46);
@ -284,7 +284,7 @@ static void sub_8088574(void)
for(iVar1 = 0; iVar1 <= 80; iVar1 += 8)
{
SetDungeonBGColorRGB(iVar1,iVar1,iVar1,0,0);
SetDungeonBGColorRGB(iVar1,iVar1,iVar1,FALSE,FALSE);
DungeonRunFrameActions(0x46);
}
}

View File

@ -98,17 +98,17 @@ static void DeoxysScreenFlash(void)
PlaySoundEffect(0x2c1);
for(iVar1 = 250; iVar1 > 149; iVar1 -= 10){
SetDungeonBGColorRGB(iVar1,0,0,1,1);
SetDungeonBGColorRGB(iVar1,0,0,TRUE,TRUE);
DungeonRunFrameActions(0x46);
}
DungeonWaitFrames_Async(10,0x46);
for(iVar1 = 250; iVar1 > 199; iVar1 -= 10){
SetDungeonBGColorRGB(iVar1,iVar1,0,1,1);
SetDungeonBGColorRGB(iVar1,iVar1,0,TRUE,TRUE);
DungeonRunFrameActions(0x46);
}
DungeonWaitFrames_Async(10,0x46);
for(iVar1 = 250; iVar1 >= 0; iVar1 -= 10){
SetDungeonBGColorRGB(iVar1,0,0,1,1);
SetDungeonBGColorRGB(iVar1,0,0,TRUE,TRUE);
DungeonRunFrameActions(0x46);
}
DungeonWaitFrames_Async(10,0x46);
@ -118,7 +118,7 @@ static void DeoxysScreenFlash(void)
static void sub_808C550(void)
{
gDungeonBrightness = 0x1f;
SetDungeonBGColorRGB(0,0,0,1,1);
SetDungeonBGColorRGB(0,0,0,TRUE,TRUE);
BgColorCallNullsub4();
DungeonRunFrameActions(0x46);
gDungeon->unk7 = 0;

View File

@ -142,19 +142,19 @@ static void EnteiScreenFlash(void)
PlaySoundEffect(0x1ed);
for(iVar1 = 250; iVar1 >= 150; iVar1 -= 10)
{
SetDungeonBGColorRGB(iVar1, iVar1 / 2, iVar1 / 2, 1, 1);
SetDungeonBGColorRGB(iVar1, iVar1 / 2, iVar1 / 2, TRUE, TRUE);
DungeonRunFrameActions(70);
}
DungeonWaitFrames_Async(10,70);
for(iVar1 = 250; iVar1 >= 200; iVar1 -= 10)
{
SetDungeonBGColorRGB(iVar1, 0, 0, 1, 1);
SetDungeonBGColorRGB(iVar1, 0, 0, TRUE, TRUE);
DungeonRunFrameActions(70);
}
DungeonWaitFrames_Async(10,70);
for(iVar1 = 250; iVar1 >= 0; iVar1 -= 10)
{
SetDungeonBGColorRGB(iVar1, iVar1 / 2, iVar1 / 2, 1, 1);
SetDungeonBGColorRGB(iVar1, iVar1 / 2, iVar1 / 2, TRUE, TRUE);
DungeonRunFrameActions(70);
}
DungeonWaitFrames_Async(10,70);

View File

@ -305,21 +305,21 @@ static void GroudonScreenFlash(void)
for(iVar1 = 250; iVar1 > 0x95; iVar1 -= 10)
{
SetDungeonBGColorRGB(iVar1,iVar1 / 2,iVar1 / 2,1,1);
SetDungeonBGColorRGB(iVar1,iVar1 / 2,iVar1 / 2,TRUE,TRUE);
DungeonRunFrameActions(0x46);
}
DungeonWaitFrames_Async(10,0x46);
for(iVar1 = 250; iVar1 > 199; iVar1 -= 10)
{
SetDungeonBGColorRGB(iVar1,iVar1 / 2,0,1,1);
SetDungeonBGColorRGB(iVar1,iVar1 / 2,0,TRUE,TRUE);
DungeonRunFrameActions(0x46);
}
DungeonWaitFrames_Async(10,0x46);
for(iVar1 = 250; iVar1 >= 0; iVar1 -= 10)
{
SetDungeonBGColorRGB(iVar1,iVar1 / 2,iVar1 / 2,1,1);
SetDungeonBGColorRGB(iVar1,iVar1 / 2,iVar1 / 2,TRUE,TRUE);
DungeonRunFrameActions(0x46);
}
DungeonWaitFrames_Async(10,0x46);
@ -332,21 +332,21 @@ static void GroudonScreenFlash2(void)
for(iVar1 = 250; iVar1 > 0x95; iVar1 -= 10)
{
SetDungeonBGColorRGB(iVar1,iVar1 / 2,iVar1 / 2,1,1);
SetDungeonBGColorRGB(iVar1,iVar1 / 2,iVar1 / 2,TRUE,TRUE);
DungeonRunFrameActions(0x46);
}
DungeonWaitFrames_Async(10,0x46);
for(iVar1 = 250; iVar1 > 199; iVar1 -= 10)
{
SetDungeonBGColorRGB(iVar1,iVar1 / 2,0,1,1);
SetDungeonBGColorRGB(iVar1,iVar1 / 2,0,TRUE,TRUE);
DungeonRunFrameActions(0x46);
}
DungeonWaitFrames_Async(10,0x46);
for(iVar1 = 250; iVar1 >= 0; iVar1 -= 10)
{
SetDungeonBGColorRGB(iVar1,iVar1 / 2,iVar1 / 2,1,1);
SetDungeonBGColorRGB(iVar1,iVar1 / 2,iVar1 / 2,TRUE,TRUE);
DungeonRunFrameActions(0x46);
}
DungeonWaitFrames_Async(10,0x46);

View File

@ -194,19 +194,19 @@ static void HoOhScreenFlash(void)
PlaySoundEffect(0x1ed);
for(iVar1 = 250; iVar1 > 149; iVar1 -= 10)
{
SetDungeonBGColorRGB(iVar1,iVar1,iVar1,1,1);
SetDungeonBGColorRGB(iVar1,iVar1,iVar1,TRUE,TRUE);
DungeonRunFrameActions(70);
}
DungeonWaitFrames_Async(10,70);
for(iVar1 = 250; iVar1 > 199; iVar1 -= 10)
{
SetDungeonBGColorRGB(iVar1,iVar1,iVar1,1,1);
SetDungeonBGColorRGB(iVar1,iVar1,iVar1,TRUE,TRUE);
DungeonRunFrameActions(70);
}
DungeonWaitFrames_Async(10,70);
for(iVar1 = 250; iVar1 >= 0; iVar1 -= 10)
{
SetDungeonBGColorRGB(iVar1,iVar1,iVar1,1,1);
SetDungeonBGColorRGB(iVar1,iVar1,iVar1,TRUE,TRUE);
DungeonRunFrameActions(70);
}
DungeonWaitFrames_Async(10,70);

View File

@ -368,21 +368,21 @@ static void JirachiWishGrantFlash(void)
for(iVar1 = 0xFA; iVar1 > 0x95; iVar1 -= 10)
{
SetDungeonBGColorRGB(iVar1,iVar1,iVar1,1,1);
SetDungeonBGColorRGB(iVar1,iVar1,iVar1,TRUE,TRUE);
DungeonRunFrameActions(0x46);
}
DungeonWaitFrames_Async(10,0x46);
for(iVar1 = 0xFA; iVar1 > 0xC7; iVar1 -= 10)
{
SetDungeonBGColorRGB(iVar1,iVar1,iVar1,1,1);
SetDungeonBGColorRGB(iVar1,iVar1,iVar1,TRUE,TRUE);
DungeonRunFrameActions(0x46);
}
DungeonWaitFrames_Async(10,0x46);
for(iVar1 = 0xFA; iVar1 >= 0; iVar1 -= 10)
{
SetDungeonBGColorRGB(iVar1,iVar1,iVar1,1,1);
SetDungeonBGColorRGB(iVar1,iVar1,iVar1,TRUE,TRUE);
DungeonRunFrameActions(0x46);
}
DungeonWaitFrames_Async(10,0x46);

View File

@ -131,17 +131,17 @@ static void KyogreScreenFlash(void)
PlaySoundEffect(0x1f8);
for(iVar1 = 250; iVar1 > 149; iVar1 -= 10){
SetDungeonBGColorRGB(0,0,iVar1,1,1);
SetDungeonBGColorRGB(0,0,iVar1,TRUE,TRUE);
DungeonRunFrameActions(0x46);
}
DungeonWaitFrames_Async(10,0x46);
for(iVar1 = 250; iVar1 > 199; iVar1 -= 10){
SetDungeonBGColorRGB(0,iVar1,iVar1,1,1);
SetDungeonBGColorRGB(0,iVar1,iVar1,TRUE,TRUE);
DungeonRunFrameActions(0x46);
}
DungeonWaitFrames_Async(10,0x46);
for(iVar1 = 250; iVar1 >= 0; iVar1 -= 10){
SetDungeonBGColorRGB(0,0,iVar1,1,1);
SetDungeonBGColorRGB(0,0,iVar1,TRUE,TRUE);
DungeonRunFrameActions(0x46);
}
DungeonWaitFrames_Async(10,0x46);
@ -151,7 +151,7 @@ static void KyogreScreenFlash(void)
static void sub_808C360(void)
{
gDungeonBrightness = 0x1f;
SetDungeonBGColorRGB(0,0,0,1,1);
SetDungeonBGColorRGB(0,0,0,TRUE,TRUE);
BgColorCallNullsub4();
DungeonRunFrameActions(0x46);
gDungeon->unk7 = 0;

View File

@ -157,13 +157,13 @@ static void LatiosScreenFlash(void)
gDungeonBrightness = 0x1f;
for(iVar1 = 250; iVar1 > 149; iVar1 -= 10)
{
SetDungeonBGColorRGB(iVar1,iVar1,iVar1,1,1);
SetDungeonBGColorRGB(iVar1,iVar1,iVar1,TRUE,TRUE);
DungeonRunFrameActions(70);
}
DungeonWaitFrames_Async(10,70);
for(iVar1 = 250; iVar1 >= 0; iVar1 -= 10)
{
SetDungeonBGColorRGB(iVar1,iVar1,iVar1,1,1);
SetDungeonBGColorRGB(iVar1,iVar1,iVar1,TRUE,TRUE);
DungeonRunFrameActions(70);
}
DungeonWaitFrames_Async(10,70);

View File

@ -96,7 +96,7 @@ void LugiaPreFightDialogue(void)
LugiaScreenFlash();
DisplayDungeonDialogue_Async(&gLugiaPreFightDialogue_6);
LugiaScreenFlash2();
SetDungeonBGColorRGB(-250,-250,-250,1,0);
SetDungeonBGColorRGB(-250,-250,-250,TRUE,FALSE);
DungeonStopBGM();
sub_80861D4(lugiaEntity,7,DIRECTION_SOUTH);
DisplayDungeonDialogue_Async(&gLugiaPreFightDialogue_7);
@ -113,17 +113,17 @@ static void LugiaScreenFlash(void)
PlaySoundEffect(0x1f6);
for(iVar1 = 250; iVar1 > 149; iVar1 -= 10){
SetDungeonBGColorRGB(0,0,iVar1,1,1);
SetDungeonBGColorRGB(0,0,iVar1,TRUE,TRUE);
DungeonRunFrameActions(0x46);
}
DungeonWaitFrames_Async(10,0x46);
for(iVar1 = 250; iVar1 > 199; iVar1 -= 10){
SetDungeonBGColorRGB(0,iVar1,iVar1,1,1);
SetDungeonBGColorRGB(0,iVar1,iVar1,TRUE,TRUE);
DungeonRunFrameActions(0x46);
}
DungeonWaitFrames_Async(10,0x46);
for(iVar1 = 250; iVar1 >= 0; iVar1 -= 10){
SetDungeonBGColorRGB(0,0,iVar1,1,1);
SetDungeonBGColorRGB(0,0,iVar1,TRUE,TRUE);
DungeonRunFrameActions(0x46);
}
DungeonWaitFrames_Async(10,0x46);
@ -137,24 +137,24 @@ static void LugiaScreenFlash2(void)
PlaySoundEffect(0x1f6);
for(iVar1 = 0; iVar1 < 200; iVar1 += 100){
SetDungeonBGColorRGB(iVar1,iVar1,iVar1,1,0);
SetDungeonBGColorRGB(iVar1,iVar1,iVar1,TRUE,FALSE);
DungeonRunFrameActions(0x46);
}
for(iVar1 = 200; iVar1 >= 0; iVar1 -= 100){
SetDungeonBGColorRGB(iVar1,iVar1,iVar1,1,0);
SetDungeonBGColorRGB(iVar1,iVar1,iVar1,TRUE,FALSE);
DungeonRunFrameActions(0x46);
}
DungeonWaitFrames_Async(4,0x46);
for(iVar1 = 0; iVar1 < 200; iVar1 += 100){
SetDungeonBGColorRGB(iVar1,iVar1,iVar1,1,0);
SetDungeonBGColorRGB(iVar1,iVar1,iVar1,TRUE,FALSE);
DungeonRunFrameActions(0x46);
}
for(iVar1 = 200; iVar1 >= 0; iVar1 -= 100){
SetDungeonBGColorRGB(iVar1,iVar1,iVar1,1,0);
SetDungeonBGColorRGB(iVar1,iVar1,iVar1,TRUE,FALSE);
DungeonRunFrameActions(0x46);
}
@ -165,7 +165,7 @@ static void LugiaScreenFlash2(void)
static void sub_808C0CC(void)
{
gDungeonBrightness = 0x1f;
SetDungeonBGColorRGB(0,0,0,1,1);
SetDungeonBGColorRGB(0,0,0,TRUE,TRUE);
BgColorCallNullsub4();
DungeonRunFrameActions(0x46);
gDungeon->unk7 = 0;

View File

@ -167,19 +167,19 @@ static void MewtwoScreenFlash(void)
PlaySoundEffect(0x1f6);
for(iVar1 = 250; iVar1 > 149; iVar1 -= 10)
{
SetDungeonBGColorRGB(iVar1,iVar1,iVar1,1,1);
SetDungeonBGColorRGB(iVar1,iVar1,iVar1,TRUE,TRUE);
DungeonRunFrameActions(0x46);
}
DungeonWaitFrames_Async(10,0x46);
for(iVar1 = 250; iVar1 > 199; iVar1 -= 10)
{
SetDungeonBGColorRGB(iVar1,iVar1,0,1,1);
SetDungeonBGColorRGB(iVar1,iVar1,0,TRUE,TRUE);
DungeonRunFrameActions(0x46);
}
DungeonWaitFrames_Async(10,0x46);
for(iVar1 = 250; iVar1 >= 0; iVar1 -= 10)
{
SetDungeonBGColorRGB(iVar1,iVar1,iVar1,1,1);
SetDungeonBGColorRGB(iVar1,iVar1,iVar1,TRUE,TRUE);
DungeonRunFrameActions(0x46);
}
DungeonWaitFrames_Async(10,0x46);

View File

@ -289,13 +289,13 @@ static void MoltresScreenFlash2(s32 xArg, s32 yArg)
PlaySoundEffect(0x1EC);
for (i = 250; i >= 20; i -= 10) {
SetDungeonBGColorRGB(i, 0, 0, 1, 1);
SetDungeonBGColorRGB(i, 0, 0, TRUE, TRUE);
DungeonRunFrameActions(0x46);
}
DungeonWaitFrames_Async(0xA, 0x46);
for (i = 250; i >= 0; i -= 10) {
SetDungeonBGColorRGB(i, 0, 0, 1, 1);
SetDungeonBGColorRGB(i, 0, 0, TRUE, TRUE);
DungeonRunFrameActions(0x46);
}
DungeonWaitFrames_Async(0xA, 0x46);
@ -312,14 +312,14 @@ static void MoltresScreenFlash3(void)
iVar1 = 0xfa;
for(iVar1 = 250; iVar1 > 9; iVar1 -= 10)
{
SetDungeonBGColorRGB(iVar1,iVar1,iVar1 / 2,1,1);
SetDungeonBGColorRGB(iVar1,iVar1,iVar1 / 2,TRUE,TRUE);
DungeonRunFrameActions(0x46);
}
DungeonWaitFrames_Async(0x1e,0x46);
PlaySoundEffect(0x1ed);
for(iVar1 = 250; iVar1 >= 0; iVar1 -= 10)
{
SetDungeonBGColorRGB(iVar1,iVar1,iVar1 / 2,1,1);
SetDungeonBGColorRGB(iVar1,iVar1,iVar1 / 2,TRUE,TRUE);
DungeonRunFrameActions(0x46);
}
DungeonWaitFrames_Async(0x1e,0x46);
@ -332,7 +332,7 @@ static void MoltresScreenDarken(void)
for(iVar1 = 0; iVar1 >= -80; iVar1 -= 8)
{
SetDungeonBGColorRGB(iVar1,iVar1,iVar1,0,0);
SetDungeonBGColorRGB(iVar1,iVar1,iVar1,FALSE,FALSE);
DungeonRunFrameActions(0x46);
}
}

View File

@ -168,19 +168,19 @@ static void RaikouScreenFlash(void)
PlaySoundEffect(0x1f6);
for(iVar1 = 250; iVar1 > 149; iVar1 -= 10)
{
SetDungeonBGColorRGB(iVar1,iVar1,iVar1,1,1);
SetDungeonBGColorRGB(iVar1,iVar1,iVar1,TRUE,TRUE);
DungeonRunFrameActions(70);
}
DungeonWaitFrames_Async(10,70);
for(iVar1 = 250; iVar1 > 199; iVar1 -= 10)
{
SetDungeonBGColorRGB(iVar1,iVar1,iVar1,1,1);
SetDungeonBGColorRGB(iVar1,iVar1,iVar1,TRUE,TRUE);
DungeonRunFrameActions(70);
}
DungeonWaitFrames_Async(10,70);
for(iVar1 = 250; iVar1 >= 0; iVar1 -= 10)
{
SetDungeonBGColorRGB(iVar1,iVar1,iVar1,1,1);
SetDungeonBGColorRGB(iVar1,iVar1,iVar1,TRUE,TRUE);
DungeonRunFrameActions(70);
}
DungeonWaitFrames_Async(10,70);

View File

@ -204,19 +204,19 @@ static void RayquazaScreenFlash(void)
PlaySoundEffect(0x1f6);
for(iVar1 = 250; iVar1 > 149; iVar1 -= 10)
{
SetDungeonBGColorRGB(iVar1 / 2, iVar1, iVar1 / 2, 1, 1);
SetDungeonBGColorRGB(iVar1 / 2, iVar1, iVar1 / 2, TRUE, TRUE);
DungeonRunFrameActions(70);
}
DungeonWaitFrames_Async(10,70);
for(iVar1 = 250; iVar1 > 199; iVar1 -= 10)
{
SetDungeonBGColorRGB(iVar1 / 2, iVar1, 0, 1, 1);
SetDungeonBGColorRGB(iVar1 / 2, iVar1, 0, TRUE, TRUE);
DungeonRunFrameActions(70);
}
DungeonWaitFrames_Async(10,70);
for(iVar1 = 250; iVar1 >= 0; iVar1 -= 10)
{
SetDungeonBGColorRGB(iVar1 / 2, iVar1, iVar1 / 2, 1, 1);
SetDungeonBGColorRGB(iVar1 / 2, iVar1, iVar1 / 2, TRUE, TRUE);
DungeonRunFrameActions(70);
}
DungeonWaitFrames_Async(10,70);

View File

@ -190,19 +190,19 @@ static void SuicuneScreenFlash(void)
PlaySoundEffect(0x1ee);
for(iVar1 = 250; iVar1 > 149; iVar1 -= 10)
{
SetDungeonBGColorRGB(iVar1,iVar1,iVar1,1,1);
SetDungeonBGColorRGB(iVar1,iVar1,iVar1,TRUE,TRUE);
DungeonRunFrameActions(70);
}
DungeonWaitFrames_Async(10,70);
for(iVar1 = 250; iVar1 > 199; iVar1 -= 10)
{
SetDungeonBGColorRGB(iVar1,iVar1,iVar1,1,1);
SetDungeonBGColorRGB(iVar1,iVar1,iVar1,TRUE,TRUE);
DungeonRunFrameActions(70);
}
DungeonWaitFrames_Async(10,70);
for(iVar1 = 250; iVar1 >= 0; iVar1 -= 10)
{
SetDungeonBGColorRGB(iVar1,iVar1,iVar1,1,1);
SetDungeonBGColorRGB(iVar1,iVar1,iVar1,TRUE,TRUE);
DungeonRunFrameActions(70);
}
DungeonWaitFrames_Async(10,70);

View File

@ -256,20 +256,20 @@ static void ZapdosScreenFlash(s32 numFlashes)
if (2 < numFlashes) {
for(index = 250; index > 199; index -= 10)
{
SetDungeonBGColorRGB(index,index,index / 2,1,1);
SetDungeonBGColorRGB(index,index,index / 2,TRUE,TRUE);
DungeonRunFrameActions(0x46);
}
}
if (1 < numFlashes) {
for(index = 250; index > 199; index -= 10)
{
SetDungeonBGColorRGB(index,index,index / 2,1,1);
SetDungeonBGColorRGB(index,index,index / 2,TRUE,TRUE);
DungeonRunFrameActions(0x46);
}
}
for(index = 250; index >= 0; index -= 10)
{
SetDungeonBGColorRGB(index,index,index / 4,1,1);
SetDungeonBGColorRGB(index,index,index / 4,TRUE,TRUE);
DungeonRunFrameActions(0x46);
}
sub_8085EB0();

View File

@ -806,7 +806,7 @@ static void MusicBoxCreation_Async(void)
PlaySoundEffect(0xd4);
DisplayDungeonMessage_Async(0,gUnknown_8105434,1);
DungeonWaitFrames_Async(10,0x41);
sub_804178C_Async(1);
sub_804178C_Async(TRUE);
gDungeon->unk1356C = FALSE;
UpdateMinimap();
}

View File

@ -127,7 +127,7 @@ void sub_8084448(Entity *pokemon)
sub_80843BC(entInfo->id);
sub_8042A34(&pokemon->pos);
HandleFaint_Async(pokemon,DUNGEON_EXIT_DELETED_FOR_EVENT,0);
sub_804178C_Async(1);
sub_804178C_Async(TRUE);
while (TRUE) {
if (DisplayDungeonYesNoMessage_Async(0,str,1) == 1) {
if (DisplayDungeonYesNoMessage_Async(0,gUnknown_80FA394,0) == 1) {
@ -187,7 +187,7 @@ void sub_80845E0(Entity *pokemon)
sub_8042A34(&entity->pos);
HandleFaint_Async(pokemon,DUNGEON_EXIT_DELETED_FOR_EVENT,0);
HandleFaint_Async(entity,DUNGEON_EXIT_DELETED_FOR_EVENT,0);
sub_804178C_Async(1);
sub_804178C_Async(TRUE);
while (TRUE) {
if (DisplayDungeonYesNoMessage_Async(0,gUnknown_80FA4D8,1) == 1) {
if (DisplayDungeonYesNoMessage_Async(0,gUnknown_80FA394,0) == 1) {

View File

@ -22,8 +22,8 @@
#include "dungeon_8041AD0.h"
EWRAM_DATA OpenedFile *gDungeonPaletteFile = {0};
EWRAM_DATA unkStruct_202EE8C gUnknown_202EE8C[32] = {0};
EWRAM_DATA OpenedFile *gUnknown_202F18C = {0};
EWRAM_DATA AnimatedColor gDungeonAnimatedColors[32] = {0};
EWRAM_DATA OpenedFile *gDungeonAnimatedColorsFile = {0};
EWRAM_DATA Tile gOutOfBoundsTileData = {0};
EWRAM_INIT const Tile *gCurTilesetOobTile = {NULL};
@ -107,8 +107,8 @@ void LoadDungeonTilesetAssets(void)
CloseFile(file);
}
sprintf(fileName,"b%02dcanm",gDungeon->tileset);
gUnknown_202F18C = OpenFileAndGetFileDataPtr(fileName,&gDungeonFileArchive);
sub_8004AA4(gUnknown_202EE8C,gUnknown_202F18C,0x20);
gDungeonAnimatedColorsFile = OpenFileAndGetFileDataPtr(fileName,&gDungeonFileArchive);
ReadAnimatedColorData(gDungeonAnimatedColors,gDungeonAnimatedColorsFile,0x20);
gWalkableTileToCrossableTerrain[0] = CROSSABLE_TERRAIN_REGULAR;
gWalkableTileToCrossableTerrain[1] = CROSSABLE_TERRAIN_LIQUID;
gWalkableTileToCrossableTerrain[MOVEMENT_TYPE_CHASM] = CROSSABLE_TERRAIN_CREVICE;
@ -128,7 +128,7 @@ void LoadDungeonTilesetAssets(void)
void sub_8049820(void)
{
CloseFile(gUnknown_202F18C);
CloseFile(gDungeonAnimatedColorsFile);
CloseFile(gDungeonPaletteFile);
}

View File

@ -1256,7 +1256,7 @@ void TryPointCameraToMonster(Entity *pokemon, u8 param_2)
{
if ((EntityIsValid(pokemon)) && (GetEntityType(pokemon) == ENTITY_MONSTER) && (gDungeon->unk181e8.cameraTarget != pokemon)) {
if (param_2 != '\0') {
sub_804178C_Async(1);
sub_804178C_Async(TRUE);
while (gDungeon->unk12 < 0x3c) {
DungeonRunFrameActions(0x34);
}

View File

@ -179,6 +179,6 @@ void TriggerMonsterHouse_Async(Entity *entity, bool8 forcedMonsterHouse)
}
sub_804178C_Async(1);
sub_804178C_Async(TRUE);
}

View File

@ -170,7 +170,7 @@ bool32 sub_8055A00(Entity *attacker, s32 firstMoveId, s32 var_34, s32 itemId, s3
}
}
sub_804178C_Async(1);
sub_804178C_Async(TRUE);
if (!EntityIsValid(attacker) || IsFloorOver())
break;
if (++moveId >= MAX_MON_MOVES)
@ -197,7 +197,7 @@ bool32 sub_8055A00(Entity *attacker, s32 firstMoveId, s32 var_34, s32 itemId, s3
}
TryUseChosenMove(attacker, 0, itemId, arg_0, isLinkedMove, movePtr);
}
sub_804178C_Async(1);
sub_804178C_Async(TRUE);
}
}
}
@ -288,14 +288,14 @@ bool8 TryUseChosenMove(struct Entity *attacker, u32 r6, s32 itemId, u32 var_30,
msg = NULL;
targetsArray[0] = NULL;
sub_804178C_Async(1);
sub_804178C_Async(TRUE);
if (move->id == MOVE_METRONOME) {
gMetronomeCalledArrayId = DungeonRandInt(METRONOME_AVAILABLE_CALLED_MOVES);
InitPokemonMove(&metronomeMove, gMetronomeCalledMoves[gMetronomeCalledArrayId].moveID);
metronomeMove.moveFlags = move->moveFlags;
metronomeMove.moveFlags2 = move->moveFlags2;
sub_8056468(attacker, move, gUnknown_80FECBC, targetsArray, itemId, TRUE, FALSE);
sub_804178C_Async(1);
sub_804178C_Async(TRUE);
move = &metronomeMove;
}
else if (move->id == MOVE_NATURE_POWER)
@ -311,7 +311,7 @@ bool8 TryUseChosenMove(struct Entity *attacker, u32 r6, s32 itemId, u32 var_30,
naturePwrMove.moveFlags = move->moveFlags;
naturePwrMove.moveFlags2 = move->moveFlags2;
sub_8056468(attacker, move, gUnknown_80FECE0, targetsArray, itemId, TRUE, FALSE);
sub_804178C_Async(1);
sub_804178C_Async(TRUE);
move = &naturePwrMove;
}
@ -722,7 +722,7 @@ void sub_80566F8(Entity *attacker, Move *move, s32 a2, bool8 a3, s32 itemId, s32
if (var_34 >= 0) {
sub_800DC14(var_34);
}
sub_804178C_Async(1);
sub_804178C_Async(TRUE);
gDungeon->unk1BDD4.unk1C05E = 0;
if (targetArrId > 0) {

View File

@ -82,7 +82,7 @@ void sub_803F27C(bool8 a0)
strPtr->rotateModeDirection = 0;
strPtr->prevRotateModeDirection = 0;
strPtr->inFloorMapMode = 0;
strPtr->unk18215 = 1;
strPtr->unk18215 = TRUE;
sub_803F38C();
gUnknown_202EDFC = 0xFFFF;

View File

@ -68,7 +68,7 @@ UNUSED static EWRAM_DATA s32 sUnused = 0;
EWRAM_DATA struct UnkStruct_202EDE8 gUnknown_202EDE8 = {0};
EWRAM_INIT u8 gUnknown_203B40C = 0;
EWRAM_INIT u8 gUnknown_203B40D = 0;
EWRAM_INIT u8 gUnknown_203B40D = FALSE;
static const DungeonPos gUnknown_80F61EC[2][6] = {
[0] = {{-4, -4}, {-8, -4}, {-16, -4}, {-16, -4}, {-16, -4}, {-16, -4}},
@ -93,7 +93,7 @@ void sub_803E250(void)
gUnknown_202EDD0 = 999;
sUnknown_202EDD4 = 0;
gUnknown_203B40D = 0;
gUnknown_203B40D = FALSE;
gUnknown_202EDE8.unk0 = 0;
SpriteSetY(&gUnknown_202EDC0, 0);
@ -200,8 +200,8 @@ static void sub_803E490(u32 unused)
sub_803EDF0();
if(gDungeon->unk181e8.unk18215 != 0 && gDungeon->unk1BDD4.unk1C06C != 3)
sub_8004AF0(gUnknown_203B40D, gUnknown_202EE8C, 0xA0, 0x20, gDungeonBrightness, gDungeon->colorRamp);
if(gDungeon->unk181e8.unk18215 && gDungeon->unk1BDD4.unk1C06C != 3)
UpdateAnimatedColors(gUnknown_203B40D, gDungeonAnimatedColors, 0xA0, 0x20, gDungeonBrightness, gDungeon->colorRamp);
nullsub_8(gGameOptionsRef->touchScreen);
sub_8005180();
@ -282,7 +282,7 @@ void sub_803E748(void)
s32 index2;
index2 = 0x1F;
gUnknown_203B40D = 1;
gUnknown_203B40D = TRUE;
gDungeonBrightness = 0;
sub_803E874(1, 0x1F);
@ -305,7 +305,7 @@ void sub_803E748(void)
sub_803E874(1, index2);
DungeonRunFrameActions(5);
}
gUnknown_203B40D = 0;
gUnknown_203B40D = FALSE;
gDungeonBrightness = 0x1F;
}
@ -315,7 +315,7 @@ void sub_803E7C8(void)
s32 index2;
index2 = 0x1F;
gUnknown_203B40D = 1;
gUnknown_203B40D = TRUE;
gDungeonBrightness = 0;
DungeonRunFrameActions(5);
@ -335,14 +335,14 @@ void sub_803E7C8(void)
}
DungeonRunFrameActions(5);
}
gUnknown_203B40D = 0;
gUnknown_203B40D = FALSE;
}
void sub_803E830(void)
{
s32 index;
gUnknown_203B40D = 1;
gUnknown_203B40D = TRUE;
for(index = 0; index < 0x20; index++)
{
sub_803E874(0, 0);
@ -351,7 +351,7 @@ void sub_803E830(void)
gDungeonBrightness--;
}
gDungeonBrightness = 0;
gUnknown_203B40D = 0;
gUnknown_203B40D = FALSE;
}
static const RGB_Struct sBlackRgb = {0, 0, 0};
@ -372,8 +372,8 @@ void sub_803E874(bool8 r10, s32 r9)
index++;
}
if (gDungeon->unk181e8.unk18215 == 0 || gDungeon->unk1BDD4.unk1C06C == 3) {
sub_8004AF0(TRUE, gUnknown_202EE8C, 0xA0, 0x20, gDungeonBrightness, gDungeon->colorRamp);
if (!gDungeon->unk181e8.unk18215 || gDungeon->unk1BDD4.unk1C06C == 3) {
UpdateAnimatedColors(TRUE, gDungeonAnimatedColors, 0xA0, 0x20, gDungeonBrightness, gDungeon->colorRamp);
}
index += 32;
@ -440,8 +440,8 @@ void sub_803EA10(void)
index++;
}
if (gDungeon->unk181e8.unk18215 == 0 || gDungeon->unk1BDD4.unk1C06C == 3) {
sub_8004AF0(TRUE, gUnknown_202EE8C, 0xA0, 0x20, gDungeonBrightness, gDungeon->colorRamp);
if (!gDungeon->unk181e8.unk18215 || gDungeon->unk1BDD4.unk1C06C == 3) {
UpdateAnimatedColors(TRUE, gDungeonAnimatedColors, 0xA0, 0x20, gDungeonBrightness, gDungeon->colorRamp);
}
index += 32;

View File

@ -1038,13 +1038,13 @@ bool8 sub_800E9E4(u32 param_1)
}
}
bool8 sub_800E9FC(u8 a0)
bool8 sub_800E9FC(bool8 a0)
{
s32 i;
struct unkStruct_203B0CC_sub *ptr = gUnknown_203B0CC->unk0;
for (i = 0; i < UNK_203B0CC_ARR_COUNT; i++, ptr++) {
if (ptr->unk4 != -1) {
if (a0 != 0)
if (a0)
return TRUE;
if (ptr->unk54 == 0)
return TRUE;
@ -1177,7 +1177,7 @@ static s32 sub_800EC68(s32 param_1)
return ret->unk1c;
}
u8 sub_800EC74(void)
bool8 sub_800EC74(void)
{
return sub_800F19C(1);
}

View File

@ -87,11 +87,11 @@ unkStruct_800F18C *sub_800F18C(s32 index)
return &gUnknown_203B0D4->unk0[index];
}
s32 sub_800F19C(s32 index)
bool8 sub_800F19C(s32 index)
{
if (gUnknown_203B0D4->unk0[index].counter == 0)
return 0;
return FALSE;
else
return 1;
return TRUE;
}

View File

@ -70,7 +70,7 @@ void FriendAreasMap_InitGfx(void)
sub_8005610(gFriendAreasMapPtr->unk0[2], 0x40, 0x1F, 0);
DecompressATGlobalFile((u32 *)(VRAM + 0x8000), 0x0, file);
sub_8004AA4(gFriendAreasMapPtr->unk4C4C, gFriendAreasMapPtr->unk0[4], 0x10);
ReadAnimatedColorData(gFriendAreasMapPtr->unk4C4C, gFriendAreasMapPtr->unk0[4], 0x10);
size = 0x4000;
DecompressATFile(&gFriendAreasMapPtr->unk14, size, file2);
@ -372,7 +372,7 @@ void FriendAreasMap_RunFrameActions(void)
SetBG2RegOffsets(gFriendAreasMapPtr->bgPos.x, gFriendAreasMapPtr->bgPos.y);
SetBG3RegOffsets(gFriendAreasMapPtr->bgPos.x, gFriendAreasMapPtr->bgPos.y);
AnimateSprites();
sub_8004AF0(FadeScreen(), gFriendAreasMapPtr->unk4C4C, 0xB0, 16, gFriendAreasMapPtr->brightness, NULL);
UpdateAnimatedColors(FadeScreen(), gFriendAreasMapPtr->unk4C4C, 0xB0, 16, gFriendAreasMapPtr->brightness, NULL);
sub_8005838(NULL, 0);
nullsub_8(gGameOptionsRef->touchScreen);
sub_8005180();

View File

@ -502,7 +502,7 @@ void sub_80A3440(GroundBg *groundBg, s32 mapFileId_, const DungeonLocation *dung
sub0Ptr = groundBg->unk0;
if (groundBg->unk440 != NULL) {
sub_8004AA4(groundBg->unkE0, groundBg->unk440, UNK_E0_ARR_COUNT);
ReadAnimatedColorData(groundBg->unkE0, groundBg->unk440, UNK_E0_ARR_COUNT);
}
groundBg->animationSpecifications = NULL;
groundBg->unk470 = 0;
@ -1371,19 +1371,19 @@ void sub_80A4764(GroundBg *groundBg)
}
else if (groundBg->unk440 != NULL) {
s32 i;
unkStruct_202EE8C *unkE0Ptr = groundBg->unkE0;
AnimatedColor *unkE0Ptr = groundBg->unkE0;
s32 r6 = 160;
for (i = 0; i < 32; i++, unkE0Ptr++, r6++) {
RGB_Array color;
if (sub_8004D14(unkE0Ptr, 1) && !sub_8004D40(unkE0Ptr, 1) && --unkE0Ptr->unk6 <= 0) {
unkE0Ptr->unk6 = unkE0Ptr->unk4;
if (unkE0Ptr->unkC >= unkE0Ptr->unk10) {
unkE0Ptr->unkC = unkE0Ptr->unk8;
if (sub_8004D14(unkE0Ptr, 1) && !sub_8004D40(unkE0Ptr, 1) && --unkE0Ptr->timer <= 0) {
unkE0Ptr->timer = unkE0Ptr->duration;
if (unkE0Ptr->currentColor >= unkE0Ptr->colorsEnd) {
unkE0Ptr->currentColor = unkE0Ptr->colorsStart;
}
unkE0Ptr->unk14 = *unkE0Ptr->unkC++;
color = (RGB_Array) {unkE0Ptr->unk14.r, unkE0Ptr->unk14.g, unkE0Ptr->unk14.b, unkE0Ptr->unk14.unk4};
unkE0Ptr->color = *unkE0Ptr->currentColor++;
color = (RGB_Array) {unkE0Ptr->color.r, unkE0Ptr->color.g, unkE0Ptr->color.b, unkE0Ptr->color.unk4};
sub_8003810(r6, color);
}
}

View File

@ -593,7 +593,7 @@ void HandleStockpile(Entity * pokemon, Entity * target)
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
if (entityInfo->stockpileStage < MAX_STOCKPILE_STAGE) {
entityInfo->stockpileStage++;
sub_804178C_Async(1);
sub_804178C_Async(TRUE);
sub_8041D5C(target);
gFormatArgs[0] = entityInfo->stockpileStage;
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FBA38);

View File

@ -91,9 +91,9 @@ static void sub_807E698(bool8 arg0)
sub_8042818(GetApparentWeather(NULL), arg0);
DungeonRunFrameActions(0x25);
sub_804178C_Async(1);
sub_804178C_Async(TRUE);
savedByte = gUnknown_203B40D;
gUnknown_203B40D = 1;
gUnknown_203B40D = TRUE;
for (i = 0; i < 64; i++) {
bool8 r7 = FALSE;

View File

@ -294,7 +294,7 @@ static void sub_801059C(void)
sub_8005610(sWorldMapPtr->unk1100[2], 0x40, 0x1F, 0);
DecompressATGlobalFile((u32 *)(VRAM + 0x8000), 0x0, file);
sub_8004AA4(sWorldMapPtr->unk5150, sWorldMapPtr->unk1100[4], 0x10);
ReadAnimatedColorData(sWorldMapPtr->unk5150, sWorldMapPtr->unk1100[4], 0x10);
size = 0x4000;
DecompressATFile(&sWorldMapPtr->unk1114, size, file2);