summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/config.h17
-rw-r--r--include/dma3.h4
-rw-r--r--include/field_camera.h1
-rw-r--r--include/field_door.h15
-rw-r--r--include/field_effect.h2
-rw-r--r--include/fldeff_teleport.h7
-rw-r--r--include/gba/gba.h1
-rwxr-xr-xinclude/gba/isagbprint.h50
-rw-r--r--include/global.h4
-rw-r--r--include/overworld.h3
-rw-r--r--include/party_menu.h2
-rw-r--r--include/rom6.h1
12 files changed, 104 insertions, 3 deletions
diff --git a/include/config.h b/include/config.h
index 162af3143..318ed39d8 100644
--- a/include/config.h
+++ b/include/config.h
@@ -1,6 +1,23 @@
#ifndef GUARD_CONFIG_H
#define GUARD_CONFIG_H
+// In the Generation 3 games, Asserts were used in various debug builds.
+// Ruby/Sapphire and Emerald do not have these asserts while Fire Red
+// still has them in the ROM. This is because the developers forgot
+// to define NDEBUG before release, however this has been changed as
+// Ruby's actual debug build does not use the AGBPrint features.
+#define NDEBUG
+
+// To enable print debugging, comment out "#define NDEBUG". This allows
+// the various AGBPrint functions to be used. (See include/gba/isagbprint.h).
+// Some emulators support a debug console window: uncomment NoCashGBAPrint()
+// and NoCashGBAPrintf() in libisagbprn.c to use no$gba's own proprietary
+// printing system. Use NoCashGBAPrint() and NoCashGBAPrintf() like you
+// would normally use AGBPrint() and AGBPrintf().
+
+// NOTE: Don't try to enable assert right now as many pointers
+// still exist in defines and WILL likely result in a broken ROM.
+
#define ENGLISH
#ifdef ENGLISH
diff --git a/include/dma3.h b/include/dma3.h
index 265b47824..d58e41850 100644
--- a/include/dma3.h
+++ b/include/dma3.h
@@ -3,8 +3,8 @@
void ClearDma3Requests(void);
void ProcessDma3Requests(void);
-int RequestDma3Copy(const void *src, void *dest, u16 size, u8 mode);
-int RequestDma3Fill(s32 value, void *dest, u16 size, u8 mode);
+s16 RequestDma3Copy(const void *src, void *dest, u16 size, u8 mode);
+s16 RequestDma3Fill(s32 value, void *dest, u16 size, u8 mode);
int CheckForSpaceForDma3Request(s16 index);
#endif // GUARD_DMA3_H
diff --git a/include/field_camera.h b/include/field_camera.h
index 4686742d3..6daa9a8a2 100644
--- a/include/field_camera.h
+++ b/include/field_camera.h
@@ -25,5 +25,6 @@ extern u16 gUnknown_03005DE8;
void DrawWholeMapView(void);
void CurrentMapDrawMetatileAt(int x, int y);
void sub_8089C08(s16 *a0, s16 *a1);
+void DrawDoorMetatileAt(int x, int y, u16 *arr);
#endif //GUARD_FIELD_CAMERA_H
diff --git a/include/field_door.h b/include/field_door.h
index f1dfc551d..8b4955cac 100644
--- a/include/field_door.h
+++ b/include/field_door.h
@@ -1,6 +1,21 @@
#ifndef GUARD_FIELDDOOR_H
#define GUARD_FIELDDOOR_H
+struct DoorGraphics
+{
+ u16 metatileNum;
+ u8 sound;
+ u8 size;
+ const void *tiles;
+ const void *palette;
+};
+
+struct DoorAnimFrame
+{
+ u8 time;
+ u16 offset;
+};
+
void FieldSetDoorOpened(u32, u32);
void FieldSetDoorClosed(u32, u32);
s8 FieldAnimateDoorClose(u32, u32);
diff --git a/include/field_effect.h b/include/field_effect.h
index 2d1d3b3b0..1fdcbe22c 100644
--- a/include/field_effect.h
+++ b/include/field_effect.h
@@ -76,5 +76,7 @@ bool8 FieldEffectActiveListContains(u8 id);
void sub_80B69DC(void);
void FieldEffectStop(struct Sprite *sprite, u8 id);
u8 CreateTrainerSprite(u8 trainerSpriteID, s16 x, s16 y, u8 subpriority, u8 *buffer);
+void sub_80B7FC8(void);
+void FieldEffectActiveListRemove(u8 id);
#endif //GUARD_FIELD_EFFECTS_H
diff --git a/include/fldeff_teleport.h b/include/fldeff_teleport.h
new file mode 100644
index 000000000..71fb64ad2
--- /dev/null
+++ b/include/fldeff_teleport.h
@@ -0,0 +1,7 @@
+#ifndef GUARD_FLDEFF_TELEPORT_H
+#define GUARD_FLDEFF_TELEPORT_H
+
+void hm_teleport_run_dp02scr(void);
+void sub_817C94C(void);
+
+#endif // GUARD_FLDEFF_TELEPORT_H
diff --git a/include/gba/gba.h b/include/gba/gba.h
index 42ae3cdde..349344031 100644
--- a/include/gba/gba.h
+++ b/include/gba/gba.h
@@ -7,5 +7,6 @@
#include "gba/multiboot.h"
#include "gba/syscall.h"
#include "gba/macro.h"
+#include "gba/isagbprint.h"
#endif // GUARD_GBA_GBA_H
diff --git a/include/gba/isagbprint.h b/include/gba/isagbprint.h
new file mode 100755
index 000000000..c5eb456c3
--- /dev/null
+++ b/include/gba/isagbprint.h
@@ -0,0 +1,50 @@
+#ifndef GUARD_GBA_ISAGBPRINT_H
+#define GUARD_GBA_ISAGBPRINT_H
+
+#ifdef NDEBUG
+#define AGBPrintInit()
+#define AGBPutc(cChr)
+#define AGBPrint(pBuf)
+#define AGBPrintf(pBuf, ...)
+#define AGBPrintFlush1Block()
+#define AGBPrintFlush()
+#define AGBAssert(pFile, nLine, pExpression, nStopProgram)
+#else
+void AGBPrintInit(void);
+void AGBPutc(const char cChr);
+void AGBPrint(const char *pBuf);
+void AGBPrintf(const char *pBuf, ...);
+void AGBPrintFlush1Block(void);
+void AGBPrintFlush(void);
+void AGBAssert(const char *pFile, int nLine, const char *pExpression, int nStopProgram);
+#endif
+
+#undef AGB_ASSERT
+#ifdef NDEBUG
+#define AGB_ASSERT(exp)
+#else
+#define AGB_ASSERT(exp) (exp) ? ((void*)0) : AGBAssert(__FILE__, __LINE__, #exp, 1);
+#endif
+
+#undef AGB_WARNING
+#ifdef NDEBUG
+#define AGB_WARNING(exp)
+#else
+#define AGB_WARNING(exp) (exp) ? ((void*)0) : AGBAssert(__FILE__, __LINE__, #exp, 0);
+#endif
+
+// for matching purposes
+
+#ifdef NDEBUG
+#define AGB_ASSERT_EX(exp, file, line)
+#else
+#define AGB_ASSERT_EX(exp, file, line) (exp) ? ((void*)0) : AGBAssert(file, line, #exp, 1);
+#endif
+
+#ifdef NDEBUG
+#define AGB_WARNING_EX(exp, file, line)
+#else
+#define AGB_WARNING_EX(exp, file, line) (exp) ? ((void*)0) : AGBAssert(file, line, #exp, 0);
+#endif
+
+#endif // GUARD_GBA_ISAGBPRINT_H
diff --git a/include/global.h b/include/global.h
index b6a496dd1..3e260fd2a 100644
--- a/include/global.h
+++ b/include/global.h
@@ -1,8 +1,8 @@
#ifndef GUARD_GLOBAL_H
#define GUARD_GLOBAL_H
+#include "config.h" // we need to define config before gba headers as print stuff needs the functions nulled before defines.
#include "gba/gba.h"
-#include "config.h"
// Prevent cross-jump optimization.
#define BLOCK_CROSS_JUMP asm("");
@@ -31,6 +31,8 @@ char* strcpy(char *dst0, const char *src0);
#define POKEMON_NAME_LENGTH 10
#define OT_NAME_LENGTH 7
+#define HEAP_SIZE 0x1C000
+
extern u8 gStringVar1[];
extern u8 gStringVar2[];
extern u8 gStringVar3[];
diff --git a/include/overworld.h b/include/overworld.h
index 9f0f80a23..597a160ed 100644
--- a/include/overworld.h
+++ b/include/overworld.h
@@ -42,6 +42,9 @@ void sub_8084EBC(s16, s16);
void player_avatar_init_params_reset(void);
+bool8 Overworld_MapTypeAllowsTeleportAndFly(u8 mapType);
+void Overworld_ResetStateAfterTeleport(void);
+
void Overworld_SetFlashLevel(s32 a1);
//u8 Overworld_GetFlashLevel(void);
void sub_8085524(u16);
diff --git a/include/party_menu.h b/include/party_menu.h
index 3756ef569..1d1661cee 100644
--- a/include/party_menu.h
+++ b/include/party_menu.h
@@ -16,5 +16,7 @@ void sub_81B58A8(void);
void DoWallyTutorialBagMenu(void);
u8 pokemon_ailments_get_primary(u32 status);
u8 *GetMonNickname(struct Pokemon *mon, u8 *dst);
+u8 GetCursorSelectionMonId(void);
+bool8 FieldCallback_Teleport(void);
#endif // GUARD_PARTY_MENU_H
diff --git a/include/rom6.h b/include/rom6.h
index fc33b7d1f..f91b34b4a 100644
--- a/include/rom6.h
+++ b/include/rom6.h
@@ -11,5 +11,6 @@ void UpdateBirchState(u16 days);
void UpdateFrontierManiac(u16 days);
void UpdateFrontierGambler(u16 days);
void SetShoalItemFlag(u16 days);
+u8 oei_task_add(void);
#endif //GUARD_ROM6_H