summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarcus Huderle <huderlem@gmail.com>2018-10-18 14:02:18 -0500
committerMarcus Huderle <huderlem@gmail.com>2018-10-18 14:02:18 -0500
commit548dc0db9e84a947cff80a9a850c945da806e250 (patch)
treeae99d4dbe11ac90d34a0063308bf6461c91427da /src
parent68dcbea52ecc048e4c0eac1bed1845a182498bb7 (diff)
Decompile some more stuff
Diffstat (limited to 'src')
-rwxr-xr-xsrc/main.c56
-rwxr-xr-xsrc/titlescreen.c4
2 files changed, 56 insertions, 4 deletions
diff --git a/src/main.c b/src/main.c
index 1f5dc58..6d6f4f4 100755
--- a/src/main.c
+++ b/src/main.c
@@ -3,6 +3,58 @@
void SetMainGameState(u16 mainState)
{
- gMain.mainState = mainState;
- gMain.subState = 0;
+ gMain.mainState = mainState;
+ gMain.subState = 0;
+}
+
+void sub_24C(void)
+{
+ u16 i;
+
+ REG_BLDCNT = 0;
+ REG_BLDY = 0x10;
+ REG_BLDCNT = ((REG_DISPCNT & (DISPCNT_OBJ_ON | DISPCNT_BG_ALL_ON)) >> 8)
+ | BLDCNT_EFFECT_LIGHTEN
+ | BLDCNT_TGT1_BD;
+ REG_DISPCNT &= ~DISPCNT_FORCED_BLANK;
+ gMain.unk16 = REG_DISPCNT;
+
+ for (i = 0; i < 32; i++)
+ {
+ REG_BLDY = 15 - i / 2;
+ sub_D74();
+ }
+
+ REG_BLDCNT = 0;
+}
+
+void sub_2B4(void)
+{
+ u16 i;
+
+ REG_BLDCNT = 0;
+ REG_BLDY = 0;
+ REG_BLDCNT = ((REG_DISPCNT & (DISPCNT_OBJ_ON | DISPCNT_BG_ALL_ON)) >> 8)
+ | BLDCNT_EFFECT_LIGHTEN
+ | BLDCNT_TGT1_BD;
+
+ for (i = 0; i < 16; i++)
+ {
+ REG_BLDY = i + 1;
+ sub_D74();
+ }
+
+ gMain.unk16 |= DISPCNT_FORCED_BLANK;
+ REG_DISPCNT |= DISPCNT_FORCED_BLANK;
+ DmaFill16(3, 0, (void *)BG_VRAM, 0x18000);
+ REG_BG0HOFS = 0;
+ REG_BG0VOFS = 0;
+ REG_BG1HOFS = 0;
+ REG_BG1VOFS = 0;
+ REG_BG2HOFS = 0;
+ REG_BG2VOFS = 0;
+ REG_BG3HOFS = 0;
+ REG_BG3VOFS = 0;
+ REG_BLDCNT = 0;
+ REG_BLDY = 0;
}
diff --git a/src/titlescreen.c b/src/titlescreen.c
index 3c679c4..0527bbe 100755
--- a/src/titlescreen.c
+++ b/src/titlescreen.c
@@ -27,15 +27,14 @@ extern const s8 gUnknown_086A9672[9][2];
extern const u16 gUnknown_086A96A4[];
extern const u16 gUnknown_086A96D4[];
extern const s16 gEReaderAccessButtonSequence[];
+extern const u8 *const gUnknown_086A96E4[];
-extern void sub_2B4(void);
extern void sub_438(void);
extern void sub_CBC(void);
extern void sub_D10(void);
extern void sub_FE04(void (*func)(void));
extern void sub_FD5C(void (*func)(void));
extern void sub_10708(void*, void*, u16, s16);
-extern void sub_11640(void);
extern void sub_52C44(void);
extern void sub_10AC0(void);
@@ -45,6 +44,7 @@ extern void sub_11B74(void);
static void sub_114FC(void);
static void sub_1157C(void);
+extern void sub_11640(void);
// If the user doesn't press any buttons at the title screen,
// it will transition to a demo gameplay experience.