summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/field/pc_screen_effect.c17
-rw-r--r--src/pokemon/pokemon_storage_system.c35
-rw-r--r--src/scene/hall_of_fame.c4
3 files changed, 39 insertions, 17 deletions
diff --git a/src/field/pc_screen_effect.c b/src/field/pc_screen_effect.c
index 364fca0aa..dda569ea4 100644
--- a/src/field/pc_screen_effect.c
+++ b/src/field/pc_screen_effect.c
@@ -2,18 +2,7 @@
#include "main.h"
#include "palette.h"
#include "sprite.h"
-
-struct UnkStruct
-{
- /*0x00*/ u16 tileTag;
- /*0x02*/ u16 paletteTag;
- /*0x04*/ u16 unk04;
- /*0x06*/ u16 unk06;
- /*0x08*/ u16 unk08;
- /*0x0A*/ u16 unk0A;
- /*0x0C*/ s16 unk0C;
- /*0x10*/ u32 selectedPalettes;
-};
+#include "pc_screen_effect.h"
void sub_80C603C(void);
void sub_80C6078(void);
@@ -30,7 +19,7 @@ extern const u16 gUnknownPal_083D18EC[16];
extern const u8 gUnknownGfx_083D190C[128];
-extern struct UnkStruct *gUnknown_020387EC;
+extern struct PCScreenEffectStruct *gUnknown_020387EC;
const struct SpriteSheet gUnknown_083D1898 = { gUnknownGfx_083D190C, sizeof(gUnknownGfx_083D190C), 0 };
@@ -58,7 +47,7 @@ const struct SpriteTemplate gSpriteTemplate_83D18C0 =
sub_80C6130,
};
-void sub_80C5CD4(struct UnkStruct *unkStruct)
+void sub_80C5CD4(struct PCScreenEffectStruct *unkStruct)
{
u16 i;
diff --git a/src/pokemon/pokemon_storage_system.c b/src/pokemon/pokemon_storage_system.c
index f09d9b302..d6119476c 100644
--- a/src/pokemon/pokemon_storage_system.c
+++ b/src/pokemon/pokemon_storage_system.c
@@ -14,6 +14,7 @@
#include "ewram.h"
#include "script.h"
#include "pokemon_summary_screen.h"
+#include "pc_screen_effect.h"
#include "naming_screen.h"
#include "pokemon_storage_system.h"
@@ -53,7 +54,7 @@ struct PokemonStorageSystemData {
u8 unk_0006;
u16 unk_0008;
u16 unk_000a;
- u8 filler_000c[20];
+ struct PCScreenEffectStruct unk_000c;
struct UnkStruct_2000020 unk_0020[274]; // refine size later
u8 filler_08b0[4];
u16 unk_08b4;
@@ -82,6 +83,7 @@ void sub_8096B38(void);
void sub_8096BE0(void (*func)(void));
void sub_8096BF0(void);
void sub_8096C68(void);
+void sub_8096C84(void);
void sub_8097DE0(void);
void sub_8097E44(void);
void sub_8097E70(void);
@@ -1011,6 +1013,37 @@ void sub_8096BE0(void (*func)(void))
ePokemonStorageSystem.unk_0004 = 0;
}
+void sub_8096BF0(void)
+{
+ switch (ePokemonStorageSystem.unk_0004)
+ {
+ case 0:
+ BlendPalettes(0xffffffff, 16, 0);
+ ePokemonStorageSystem.unk_0004++;
+ break;
+ case 1:
+ PlaySE(SE_PC_LOGON);
+ ePokemonStorageSystem.unk_000c.tileTag = 14;
+ ePokemonStorageSystem.unk_000c.paletteTag = 0xdad0;
+ ePokemonStorageSystem.unk_000c.unk04 = 0;
+ ePokemonStorageSystem.unk_000c.unk06 = 0;
+ sub_80C5CD4(&ePokemonStorageSystem.unk_000c);
+ BlendPalettes(0xffffffff, 0, 0);
+ ePokemonStorageSystem.unk_0004++;
+ break;
+ case 2:
+ if (sub_80C5DCC())
+ sub_8096BE0(sub_8096C84);
+ break;
+ }
+}
+
+void sub_8096C68(void)
+{
+ if (!UpdatePaletteFade())
+ sub_8096BE0(sub_8096C84);
+}
+
asm(".section .text.8098898");
void sub_8098898(u8 index) {
diff --git a/src/scene/hall_of_fame.c b/src/scene/hall_of_fame.c
index 1751ee99c..812c28137 100644
--- a/src/scene/hall_of_fame.c
+++ b/src/scene/hall_of_fame.c
@@ -17,6 +17,7 @@
#include "decompress.h"
#include "random.h"
#include "trig.h"
+#include "pc_screen_effect.h"
#include "ewram.h"
static EWRAM_DATA u32 sUnknown_0203931C = 0;
@@ -89,7 +90,6 @@ static bool8 sub_81438C4(void);
// functions from different files
void sub_81439D0(void);
-void sub_80C5CD4(void*); // ?
void sub_80C5E38(void*); // ?
bool8 sub_80C5DCC(void);
bool8 sub_80C5F98(void);
@@ -811,7 +811,7 @@ void sub_81428CC(void)
fameMons = eHallOfFameMons1;
fameMons->mons[0] = sDummyFameMon;
- sub_80C5CD4(fameMons);
+ sub_80C5CD4((struct PCScreenEffectStruct *)fameMons);
gMain.state++;
}
break;