Get pokefirered_modern to build
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#ifndef GUARD_BATTLE_H
|
||||
#define GUARD_BATTLE_H
|
||||
|
||||
#include <limits.h>
|
||||
#include "global.h"
|
||||
#include "constants/battle.h"
|
||||
#include "battle_util.h"
|
||||
|
||||
+9
-3
@@ -18,14 +18,14 @@
|
||||
#define GAME_VERSION VERSION_FIRE_RED
|
||||
#else // Default version seems to be LeafGreen
|
||||
#define GAME_VERSION VERSION_LEAF_GREEN
|
||||
#endif
|
||||
#endif // GAME_VERSION
|
||||
|
||||
// rev1 renamed the source folder for reasons
|
||||
#if REVISION == 0
|
||||
#define CODE_ROOT "C:/WORK/POKeFRLG/src/pm_lgfr_ose/source/"
|
||||
#else
|
||||
#define CODE_ROOT "C:/WORK/POKeFRLG/Src/pm_lgfr_ose/source/"
|
||||
#endif
|
||||
#endif // REVISION
|
||||
|
||||
#define ABSPATH(x) (CODE_ROOT x)
|
||||
|
||||
@@ -33,6 +33,12 @@
|
||||
#define UNITS_IMPERIAL
|
||||
#else
|
||||
#define UNITS_METRIC
|
||||
#endif
|
||||
#endif // ENGLISH
|
||||
|
||||
// Crashes may occur due to section reordering in the modern build,
|
||||
// so we force BUGFIX here.
|
||||
#if MODERN
|
||||
#define BUGFIX
|
||||
#endif // MODERN
|
||||
|
||||
#endif // GUARD_CONFIG_H
|
||||
|
||||
@@ -13,7 +13,7 @@ enum HiddenItemAttr
|
||||
|
||||
u8 GetLeadMonIndex(void);
|
||||
s32 CountDigits(s32 number);
|
||||
void TV_PrintIntToStringVar(u8, int);
|
||||
void TV_PrintIntToStringVar(u8 varidx, s32 number);
|
||||
u16 GetStarterSpecies(void);
|
||||
void StopPokemonLeagueLightingEffectTask(void);
|
||||
void nullsub_60(void);
|
||||
|
||||
+3
-3
@@ -14,11 +14,11 @@
|
||||
extern struct BackupMapLayout VMap;
|
||||
extern const struct MapLayout Route1_Layout;
|
||||
|
||||
u32 MapGridGetMetatileIdAt(int, int);
|
||||
u32 MapGridGetMetatileIdAt(s32, s32);
|
||||
u32 MapGridGetMetatileBehaviorAt(s16, s16);
|
||||
u8 MapGridGetMetatileLayerTypeAt(s16 x, s16 y);
|
||||
void MapGridSetMetatileIdAt(int, int, u16);
|
||||
void MapGridSetMetatileEntryAt(int, int, u16);
|
||||
void MapGridSetMetatileIdAt(s32, s32, u16);
|
||||
void MapGridSetMetatileEntryAt(s32, s32, u16);
|
||||
u8 MapGridGetZCoordAt(s32 x, s32 y);
|
||||
void GetCameraCoords(u16*, u16*);
|
||||
bool8 MapGridIsImpassableAt(s32, s32);
|
||||
|
||||
@@ -14,6 +14,12 @@
|
||||
#define EWRAM_DATA __attribute__((section("ewram_data")))
|
||||
#endif
|
||||
|
||||
#if MODERN
|
||||
#define NOINLINE __attribute__((noinline))
|
||||
#else
|
||||
#define NOINLINE
|
||||
#endif
|
||||
|
||||
#define ALIGNED(n) __attribute__((aligned(n)))
|
||||
|
||||
#define SOUND_INFO_PTR (*(struct SoundInfo **)0x3007FF0)
|
||||
|
||||
@@ -50,6 +50,10 @@
|
||||
#define min(a, b) ((a) < (b) ? (a) : (b))
|
||||
#define max(a, b) ((a) >= (b) ? (a) : (b))
|
||||
|
||||
#if MODERN
|
||||
#define abs(x) (((x) < 0) ? -(x) : (x))
|
||||
#endif
|
||||
|
||||
// There are many quirks in the source code which have overarching behavioral differences from
|
||||
// a number of other files. For example, diploma.c seems to declare rodata before each use while
|
||||
// other files declare out of order and must be at the beginning. There are also a number of
|
||||
|
||||
+2
-2
@@ -71,8 +71,8 @@ void Overworld_SetObjEventTemplateMovementType(u8, u8);
|
||||
|
||||
void SetWarpDestination(s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y);
|
||||
|
||||
void SetDynamicWarp(int unused, s8 mapGroup, s8 mapNum, s8 warpId);
|
||||
void SetDynamicWarpWithCoords(int unused, s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y);
|
||||
void SetDynamicWarp(s32 unused, s8 mapGroup, s8 mapNum, s8 warpId);
|
||||
void SetDynamicWarpWithCoords(s32 unused, s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y);
|
||||
void SetFixedDiveWarp(s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y);
|
||||
void SetFixedHoleWarp(s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y);
|
||||
void SetEscapeWarp(s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y);
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@
|
||||
void Task_VsSeeker_0(u8 taskId);
|
||||
void sub_810CB90(void);
|
||||
void sub_810CDE8(void);
|
||||
int GetRematchTrainerId(u16 a0);
|
||||
s32 GetRematchTrainerId(u16 a0);
|
||||
bool8 sub_810CF04(u8 a0);
|
||||
void sub_810D0D0(void);
|
||||
void sub_810CB90(void);
|
||||
|
||||
Reference in New Issue
Block a user