From 5d7a038cea2cdb57df1354e8e9cbc57931cd4170 Mon Sep 17 00:00:00 2001 From: ProjectRevoTPP Date: Sat, 6 Jan 2018 21:29:51 -0500 Subject: add NDEBUG define --- include/config.h | 13 +++++++++++++ include/global.h | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/config.h b/include/config.h index 162af3143..6619cfa9a 100644 --- a/include/config.h +++ b/include/config.h @@ -1,6 +1,19 @@ #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 NOAGBPRN before release, which is actually supposed to be +// NDEBUG, however this has been changed as Ruby's actual debug build +// does not use the AGBPrint features. +// #define NDEBUG + +// Fire Red likely forgot to define NDEBUG/NOAGBPRN before release, leading +// to the inclusion of asserts in the retail ROM. Don't try to re-enable this yet +// since not all baseroms and pointers have been dumped yet and will result in +// a broken ROM. + #define ENGLISH #ifdef ENGLISH diff --git a/include/global.h b/include/global.h index 50d3f9104..dd466678d 100644 --- a/include/global.h +++ b/include/global.h @@ -1,8 +1,8 @@ #ifndef GUARD_GLOBAL_H #define GUARD_GLOBAL_H -#include "gba/gba.h" #include "config.h" +#include "gba/gba.h" // Prevent cross-jump optimization. #define BLOCK_CROSS_JUMP asm(""); -- cgit v1.2.3