summaryrefslogtreecommitdiff
path: root/src/engine/main.c
diff options
context:
space:
mode:
authorPikalaxALT <pikalaxalt@gmail.com>2018-01-12 10:15:31 -0500
committerPikalaxALT <pikalaxalt@gmail.com>2018-01-12 10:15:31 -0500
commitcce4c9e92bfe7e10be3a0cf4940299e84701dba0 (patch)
tree514282760474bf038fb734f87e4f84ac3fb0df12 /src/engine/main.c
parent3b8f6133865af6ede3628f3df8dd71648b43b3bc (diff)
parent6a2e39eb97db47b542eea76c1e45df37184a0705 (diff)
Merge branch 'master' into pokemon_storage_system
Diffstat (limited to 'src/engine/main.c')
-rw-r--r--src/engine/main.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/engine/main.c b/src/engine/main.c
index 82a5fffb4..54a443e80 100644
--- a/src/engine/main.c
+++ b/src/engine/main.c
@@ -13,7 +13,7 @@
#include "rtc.h"
#include "siirtc.h"
#include "sound.h"
-#include "unknown_task.h"
+#include "scanline_effect.h"
extern struct SoundInfo gSoundInfo;
extern u32 IntrMain[];
@@ -83,6 +83,10 @@ static void WaitForVBlank(void);
#define B_START_SELECT (B_BUTTON | START_BUTTON | SELECT_BUTTON)
+#ifndef NDEBUG
+ #include <stdlib.h> // don't include if not needed.
+#endif
+
void AgbMain()
{
RegisterRamReset(RESET_ALL);
@@ -98,6 +102,14 @@ void AgbMain()
gSoftResetDisabled = FALSE;
+// In Fire Red, AGBPrintInit is called at this spot. For user convenience, I
+// opt to initialize the print area here. It is up to the user where they choose
+// to print stuff from, as anything else declared is NOT authoritative.
+#ifndef NDEBUG
+ AGBPrintInit();
+ __mb_cur_max = 1; // fix for AGBPrintf
+#endif
+
if (gFlashMemoryPresent != TRUE)
SetMainCallback2(NULL);
@@ -350,7 +362,7 @@ void DoSoftReset(void)
{
REG_IME = 0;
m4aSoundVSyncOff();
- remove_some_task();
+ ScanlineEffect_Stop();
DmaStop(1);
DmaStop(2);
DmaStop(3);