Fix/suppress warnings when building with gcc-8

This commit is contained in:
PikalaxALT 2019-06-26 16:23:00 -04:00
parent fb06e4a3c9
commit b839c21307
37 changed files with 114 additions and 111 deletions

View file

@ -41,7 +41,7 @@ ROM := pokeemerald.gba
OBJ_DIR := build/emerald OBJ_DIR := build/emerald
else else
CC1 := $(shell $(PREFIX)gcc --print-prog-name=cc1) CC1 := $(shell $(PREFIX)gcc --print-prog-name=cc1)
override CFLAGS += -mthumb -mthumb-interwork -O2 -mabi=apcs-gnu -mtune=arm7tdmi -march=armv4t -quiet -fno-toplevel-reorder -Wno-aggressive-loop-optimizations override CFLAGS += -mthumb -mthumb-interwork -O2 -mabi=apcs-gnu -mtune=arm7tdmi -march=armv4t -quiet -fno-toplevel-reorder -Wno-aggressive-loop-optimizations -Wno-pointer-to-int-cast
ROM := pokeemerald_modern.gba ROM := pokeemerald_modern.gba
OBJ_DIR := build/modern OBJ_DIR := build/modern
endif endif

View file

@ -7,11 +7,7 @@
#define FALSE 0 #define FALSE 0
#define BSS_DATA __attribute__((section(".bss"))) #define BSS_DATA __attribute__((section(".bss")))
#if MODERN
#define IWRAM_DATA
#else
#define IWRAM_DATA __attribute__((section("iwram_data"))) #define IWRAM_DATA __attribute__((section("iwram_data")))
#endif
#define EWRAM_DATA __attribute__((section("ewram_data"))) #define EWRAM_DATA __attribute__((section("ewram_data")))
#if MODERN #if MODERN

View file

@ -16,7 +16,7 @@
#include "constants/moves.h" #include "constants/moves.h"
// IWRAM bss // IWRAM bss
static IWRAM_DATA bool8 sPerformedRentalSwap; static bool8 sPerformedRentalSwap;
// This file's functions. // This file's functions.
static void InitFactoryChallenge(void); static void InitFactoryChallenge(void);

View file

@ -227,9 +227,9 @@ static EWRAM_DATA u8 *sSwapMenuTilemapBuffer = NULL;
static EWRAM_DATA u8 *sSwapMonCardBgTilemapBuffer = NULL; static EWRAM_DATA u8 *sSwapMonCardBgTilemapBuffer = NULL;
// IWRAM bss // IWRAM bss
static IWRAM_DATA struct FactorySelectMonsStruct *sFactorySelectScreen; static struct FactorySelectMonsStruct *sFactorySelectScreen;
static IWRAM_DATA void (*sSwap_CurrentTableFunc)(u8 taskId); static void (*sSwap_CurrentTableFunc)(u8 taskId);
static IWRAM_DATA struct FactorySwapMonsStruct *sFactorySwapScreen; static struct FactorySwapMonsStruct *sFactorySwapScreen;
// IWRAM common // IWRAM common
u8 (*gUnknown_030062E8)(void); u8 (*gUnknown_030062E8)(void);

View file

@ -53,11 +53,11 @@ struct PikeWildMon
}; };
// IWRAM bss // IWRAM bss
static IWRAM_DATA u8 sRoomType; static u8 sRoomType;
static IWRAM_DATA u8 sStatusMon; static u8 sStatusMon;
static IWRAM_DATA bool8 sUnknown_0300128E; static bool8 sUnknown_0300128E;
static IWRAM_DATA u32 sStatusFlags; static u32 sStatusFlags;
static IWRAM_DATA u8 sNpcId; static u8 sNpcId;
// This file's functions. // This file's functions.
static void SetRoomType(void); static void SetRoomType(void);

View file

@ -44,7 +44,7 @@ static void sub_81BA040(void);
static void sub_81B9EC0(void); static void sub_81B9EC0(void);
// IWRAM bss // IWRAM bss
static IWRAM_DATA u16 sRandMonSetId; static u16 sRandMonSetId;
// const rom data // const rom data
void static (*const gUnknown_086160B4[])(void) = void static (*const gUnknown_086160B4[])(void) =

View file

@ -262,10 +262,10 @@ static bool8 sub_814842C(struct Sprite *sprite);
static bool8 sub_8148458(struct Sprite *sprite); static bool8 sub_8148458(struct Sprite *sprite);
// iwram bss vars // iwram bss vars
IWRAM_DATA static s16 sUnusedRectangularSpiralVar; static s16 sUnusedRectangularSpiralVar;
IWRAM_DATA static u8 sTestingTransitionId; static u8 sTestingTransitionId;
IWRAM_DATA static u8 sTestingTransitionState; static u8 sTestingTransitionState;
IWRAM_DATA static struct StructRectangularSpiral sRectangularSpiralTransition[4]; static struct StructRectangularSpiral sRectangularSpiralTransition[4];
// ewram vars // ewram vars
EWRAM_DATA static struct TransitionData *sTransitionStructPtr = NULL; EWRAM_DATA static struct TransitionData *sTransitionStructPtr = NULL;

View file

@ -194,10 +194,10 @@ EWRAM_DATA static s32 sUnknown_020322BC[5] = {0};
EWRAM_DATA static u32 sUnknown_020322D0 = 0; EWRAM_DATA static u32 sUnknown_020322D0 = 0;
// IWRAM bss // IWRAM bss
IWRAM_DATA static s16 sUnknown_03000DE8[8]; static s16 sUnknown_03000DE8[8];
IWRAM_DATA static s16 sUnknown_03000DF8[6]; static s16 sUnknown_03000DF8[6];
IWRAM_DATA static s16 sUnknown_03000E04; static s16 sUnknown_03000E04;
IWRAM_DATA static s16 sUnknown_03000E06; static s16 sUnknown_03000E06;
// IWRAM common // IWRAM common
u8 gInGameOpponentsNo; u8 gInGameOpponentsNo;

View file

@ -37,9 +37,9 @@ struct BgConfig2
s32 bg_y; s32 bg_y;
}; };
static IWRAM_DATA struct BgControl sGpuBgConfigs; static struct BgControl sGpuBgConfigs;
static IWRAM_DATA struct BgConfig2 sGpuBgConfigs2[4]; static struct BgConfig2 sGpuBgConfigs2[4];
static IWRAM_DATA u32 sDmaBusyBitfield[4]; static u32 sDmaBusyBitfield[4];
u32 gUnneededFireRedVariable; u32 gUnneededFireRedVariable;

View file

@ -73,7 +73,7 @@ static void CreateRandomEggShardSprite(void);
static void CreateEggShardSprite(u8 x, u8 y, s16 data1, s16 data2, s16 data3, u8 spriteAnimIndex); static void CreateEggShardSprite(u8 x, u8 y, s16 data1, s16 data2, s16 data3, u8 spriteAnimIndex);
// IWRAM bss // IWRAM bss
static IWRAM_DATA struct EggHatchData *sEggHatchData; static struct EggHatchData *sEggHatchData;
// rom data // rom data
static const u16 sEggPalette[] = INCBIN_U16("graphics/pokemon/egg/normal.gbapal"); static const u16 sEggPalette[] = INCBIN_U16("graphics/pokemon/egg/normal.gbapal");

View file

@ -36,11 +36,11 @@ static void DrawMetatile(s32 a, u16 *b, u16 c);
static void CameraPanningCB_PanAhead(void); static void CameraPanningCB_PanAhead(void);
// IWRAM bss vars // IWRAM bss vars
static IWRAM_DATA struct FieldCameraOffset sFieldCameraOffset; static struct FieldCameraOffset sFieldCameraOffset;
static IWRAM_DATA s16 sHorizontalCameraPan; static s16 sHorizontalCameraPan;
static IWRAM_DATA s16 sVerticalCameraPan; static s16 sVerticalCameraPan;
static IWRAM_DATA u8 gUnknown_03000E2C; static u8 gUnknown_03000E2C;
static IWRAM_DATA void (*sFieldCameraPanningCallback)(void); static void (*sFieldCameraPanningCallback)(void);
struct CameraObject gFieldCamera; struct CameraObject gFieldCamera;
u16 gTotalCameraPixelOffsetY; u16 gTotalCameraPixelOffsetY;

View file

@ -232,7 +232,7 @@ static void Fldeff_MoveDeoxysRock_Step(u8 taskId);
// Static RAM declarations // Static RAM declarations
static IWRAM_DATA u8 sActiveList[32]; static u8 sActiveList[32];
// External declarations // External declarations
extern struct CompressedSpritePalette gMonPaletteTable[]; // GF made a mistake and did not extern it as const. extern struct CompressedSpritePalette gMonPaletteTable[]; // GF made a mistake and did not extern it as const.

View file

@ -68,7 +68,7 @@ static u8 None_Finish(void);
EWRAM_DATA struct Weather gWeather = {0}; EWRAM_DATA struct Weather gWeather = {0};
EWRAM_DATA static u8 sFieldEffectPaletteGammaTypes[32] = {0}; EWRAM_DATA static u8 sFieldEffectPaletteGammaTypes[32] = {0};
IWRAM_DATA static const u8 *sPaletteGammaTypes; static const u8 *sPaletteGammaTypes;
// The drought weather effect uses a precalculated color lookup table. Presumably this // The drought weather effect uses a precalculated color lookup table. Presumably this
// is because the underlying color shift calculation is slow. // is because the underlying color shift calculation is slow.

View file

@ -59,11 +59,11 @@ static void CutGrassSpriteCallbackEnd(struct Sprite *);
static void HandleLongGrassOnHyper(u8, s16, s16); static void HandleLongGrassOnHyper(u8, s16, s16);
// IWRAM variables // IWRAM variables
static IWRAM_DATA u8 sCutSquareSide; static u8 sCutSquareSide;
static IWRAM_DATA u8 sTileCountFromPlayer_X; static u8 sTileCountFromPlayer_X;
static IWRAM_DATA u8 sTileCountFromPlayer_Y; static u8 sTileCountFromPlayer_Y;
static IWRAM_DATA u32 sUnused; static u32 sUnused;
static IWRAM_DATA bool8 sHyperCutTiles[CUT_HYPER_AREA]; static bool8 sHyperCutTiles[CUT_HYPER_AREA];
// EWRAM variables // EWRAM variables
static EWRAM_DATA u8 *sCutGrassSpriteArrayPtr = NULL; static EWRAM_DATA u8 *sCutGrassSpriteArrayPtr = NULL;

View file

@ -42,10 +42,10 @@ EWRAM_DATA struct LoadedSaveData gLoadedSaveData = {0};
EWRAM_DATA u32 gLastEncryptionKey = 0; EWRAM_DATA u32 gLastEncryptionKey = 0;
// IWRAM common // IWRAM common
IWRAM_DATA bool32 gFlashMemoryPresent; bool32 gFlashMemoryPresent;
IWRAM_DATA struct SaveBlock1 *gSaveBlock1Ptr; struct SaveBlock1 *gSaveBlock1Ptr;
IWRAM_DATA struct SaveBlock2 *gSaveBlock2Ptr; struct SaveBlock2 *gSaveBlock2Ptr;
IWRAM_DATA struct PokemonStorage *gPokemonStoragePtr; struct PokemonStorage *gPokemonStoragePtr;
// code // code
void CheckForFlashMemory(void) void CheckForFlashMemory(void)

View file

@ -85,7 +85,14 @@ void EnableVCountIntrAtLine150(void);
void AgbMain() void AgbMain()
{ {
RegisterRamReset(MODERN ? RESET_ALL & ~RESET_IWRAM : RESET_ALL); #if MODERN
// Modern compilers are liberal with the stack on entry to this function,
// so RegisterRamReset may crash if it resets IWRAM.
RegisterRamReset(RESET_ALL & ~RESET_IWRAM);
DmaFill32(3, 0, IWRAM_START, 0x7E00);
#else
RegisterRamReset(RESET_ALL);
#endif //MODERN
*(vu16 *)BG_PLTT = 0x7FFF; *(vu16 *)BG_PLTT = 0x7FFF;
InitGpuRegManager(); InitGpuRegManager();
REG_WAITCNT = WAITCNT_PREFETCH_ENABLE | WAITCNT_WS0_S_1 | WAITCNT_WS0_N_3; REG_WAITCNT = WAITCNT_PREFETCH_ENABLE | WAITCNT_WS0_S_1 | WAITCNT_WS0_N_3;

View file

@ -176,7 +176,7 @@
static EWRAM_DATA u8 gUnknown_02022D04 = 0; static EWRAM_DATA u8 gUnknown_02022D04 = 0;
static EWRAM_DATA u16 sCurrItemAndOptionMenuCheck = 0; static EWRAM_DATA u16 sCurrItemAndOptionMenuCheck = 0;
static IWRAM_DATA u8 sBirchSpeechMainTaskId; static u8 sBirchSpeechMainTaskId;
// Static ROM declarations // Static ROM declarations

View file

@ -27,7 +27,7 @@ EWRAM_DATA static struct YesNoFuncTable gUnknown_0203A138 = {0};
EWRAM_DATA static u8 gUnknown_0203A140 = 0; EWRAM_DATA static u8 gUnknown_0203A140 = 0;
// IWRAM bss vars // IWRAM bss vars
IWRAM_DATA static TaskFunc gUnknown_0300117C; static TaskFunc gUnknown_0300117C;
// const rom data // const rom data
static const struct OamData sOamData_859F4E8 = static const struct OamData sOamData_859F4E8 =

View file

@ -258,7 +258,7 @@ EWRAM_DATA static struct Struct203CF10 *sUnknown_0203CF10 = NULL;
EWRAM_DATA static struct BgRegOffsets *sBgShakeOffsets = NULL; EWRAM_DATA static struct BgRegOffsets *sBgShakeOffsets = NULL;
EWRAM_DATA struct MirageTowerPulseBlend *sMirageTowerPulseBlend = NULL; EWRAM_DATA struct MirageTowerPulseBlend *sMirageTowerPulseBlend = NULL;
IWRAM_DATA static u16 gUnknown_030012A8[8]; static u16 gUnknown_030012A8[8];
bool8 IsMirageTowerVisible(void) bool8 IsMirageTowerVisible(void)
{ {

View file

@ -1,7 +1,7 @@
#include "gba/gba.h" #include "gba/gba.h"
#include "multiboot.h" #include "multiboot.h"
IWRAM_DATA static u16 MultiBoot_required_data[MULTIBOOT_NCHILD]; static u16 MultiBoot_required_data[MULTIBOOT_NCHILD];
static int MultiBootSend(struct MultiBootParam *mp, u16 data); static int MultiBootSend(struct MultiBootParam *mp, u16 data);
static int MultiBootHandShake(struct MultiBootParam *mp); static int MultiBootHandShake(struct MultiBootParam *mp);

View file

@ -186,15 +186,15 @@ static u8 GetAdjustedInitialDirection(struct InitialPlayerAvatarState *playerStr
static u16 GetCenterScreenMetatileBehavior(void); static u16 GetCenterScreenMetatileBehavior(void);
// IWRAM bss vars // IWRAM bss vars
IWRAM_DATA static void *sUnusedOverworldCallback; static void *sUnusedOverworldCallback;
IWRAM_DATA static u8 sPlayerTradingStates[4]; static u8 sPlayerTradingStates[4];
// This callback is called with a player's key code. It then returns an // This callback is called with a player's key code. It then returns an
// adjusted key code, effectively intercepting the input before anything // adjusted key code, effectively intercepting the input before anything
// can process it. // can process it.
IWRAM_DATA static u16 (*sPlayerKeyInterceptCallback)(u32); static u16 (*sPlayerKeyInterceptCallback)(u32);
IWRAM_DATA static bool8 sUnknown_03000E18; static bool8 sUnknown_03000E18;
IWRAM_DATA static u8 sRfuKeepAliveTimer; static u8 sRfuKeepAliveTimer;
IWRAM_DATA static u32 sUnusedVar; static u32 sUnusedVar;
// IWRAM common // IWRAM common
u16 *gBGTilemapBuffers1; u16 *gBGTilemapBuffers1;

View file

@ -1596,8 +1596,8 @@ static void InitPartyMenu(u8 a, u8 b, u8 c, u8 d, u8 messageId, TaskFunc task, M
gUnknown_0203CEC4->task = task; gUnknown_0203CEC4->task = task;
gUnknown_0203CEC4->exitCallback = NULL; gUnknown_0203CEC4->exitCallback = NULL;
gUnknown_0203CEC4->unk8_1 = 0; gUnknown_0203CEC4->unk8_1 = 0;
gUnknown_0203CEC4->unk8_2 = 0xFF; gUnknown_0203CEC4->unk8_2 = 0x7F;
gUnknown_0203CEC4->unk9_0 = 0xFF; gUnknown_0203CEC4->unk9_0 = 0x7F;
if (a == 4) if (a == 4)
gUnknown_0203CEC4->unk8_0 = TRUE; gUnknown_0203CEC4->unk8_0 = TRUE;

View file

@ -763,11 +763,11 @@ static void sub_813D6B4(void)
static void CreateAreaMarkerSprites(void) static void CreateAreaMarkerSprites(void)
{ {
u8 spriteId; u8 spriteId;
static IWRAM_DATA s16 x; static s16 x;
static IWRAM_DATA s16 y; static s16 y;
static IWRAM_DATA s16 i; static s16 i;
static IWRAM_DATA s16 mapSecId; static s16 mapSecId;
static IWRAM_DATA s16 numSprites; static s16 numSprites;
LoadSpriteSheet(&sAreaMarkerSpriteSheet); LoadSpriteSheet(&sAreaMarkerSpriteSheet);
LoadSpritePalette(&sAreaMarkerSpritePalette); LoadSpritePalette(&sAreaMarkerSpritePalette);

View file

@ -177,9 +177,9 @@ static void SpriteCB_SetDummyOnAnimEnd(struct Sprite *sprite);
#define STRUCT_COUNT 4 #define STRUCT_COUNT 4
// IWRAM bss // IWRAM bss
static IWRAM_DATA struct UnkAnimStruct sUnknown_03001240[STRUCT_COUNT]; static struct UnkAnimStruct sUnknown_03001240[STRUCT_COUNT];
static IWRAM_DATA u8 sUnknown_03001270; static u8 sUnknown_03001270;
static IWRAM_DATA bool32 sUnknown_03001274; static bool32 sUnknown_03001274;
// const rom data // const rom data
static const u8 sSpeciesToBackAnimSet[] = static const u8 sSpeciesToBackAnimSet[] =

View file

@ -443,7 +443,7 @@ enum
#define TAG_TILE_1 0x1 #define TAG_TILE_1 0x1
// IWRAM bss // IWRAM bss
IWRAM_DATA static u32 gUnknown_03000F78[98]; static u32 gUnknown_03000F78[98];
// EWRAM DATA // EWRAM DATA
EWRAM_DATA static u8 sPreviousBoxOption = 0; EWRAM_DATA static u8 sPreviousBoxOption = 0;

View file

@ -8,8 +8,8 @@ EWRAM_DATA static u8 sUnknown = 0;
EWRAM_DATA static u32 sRandCount = 0; EWRAM_DATA static u32 sRandCount = 0;
// IWRAM common // IWRAM common
IWRAM_DATA u32 gRngValue; u32 gRngValue;
IWRAM_DATA u32 gRng2Value; u32 gRng2Value;
u16 Random(void) u16 Random(void)
{ {

View file

@ -82,21 +82,21 @@ union PlayerRecords
// Static RAM declarations // Static RAM declarations
static IWRAM_DATA bool8 gUnknown_03001130; static bool8 gUnknown_03001130;
static IWRAM_DATA struct SecretBase *sSecretBasesSave; static struct SecretBase *sSecretBasesSave;
static IWRAM_DATA TVShow *sTvShowsSave; static TVShow *sTvShowsSave;
static IWRAM_DATA PokeNews *sPokeNewsSave; static PokeNews *sPokeNewsSave;
static IWRAM_DATA OldMan *sOldManSave; static OldMan *sOldManSave;
static IWRAM_DATA struct EasyChatPair *sEasyChatPairsSave; static struct EasyChatPair *sEasyChatPairsSave;
static IWRAM_DATA struct RecordMixingDayCareMail *gUnknown_03001148; static struct RecordMixingDayCareMail *gUnknown_03001148;
static IWRAM_DATA void *sBattleTowerSave; static void *sBattleTowerSave;
static IWRAM_DATA LilycoveLady *sLilycoveLadySave; static LilycoveLady *sLilycoveLadySave;
static IWRAM_DATA void *sApprenticesSave; static void *sApprenticesSave;
static IWRAM_DATA void *sBattleTowerSave_Duplicate; static void *sBattleTowerSave_Duplicate;
static IWRAM_DATA u32 sRecordStructSize; static u32 sRecordStructSize;
static IWRAM_DATA u8 gUnknown_03001160; static u8 gUnknown_03001160;
static IWRAM_DATA u32 filler_03001164; static u32 filler_03001164;
static IWRAM_DATA struct PlayerHallRecords *gUnknown_03001168[3]; static struct PlayerHallRecords *gUnknown_03001168[3];
static EWRAM_DATA struct RecordMixingDayCareMail gUnknown_02039F9C = {0}; static EWRAM_DATA struct RecordMixingDayCareMail gUnknown_02039F9C = {0};
static EWRAM_DATA union PlayerRecords *sReceivedRecords = NULL; static EWRAM_DATA union PlayerRecords *sReceivedRecords = NULL;

View file

@ -100,8 +100,8 @@ EWRAM_DATA static u8 sApprenticeId = 0;
EWRAM_DATA static u16 sEasyChatSpeech[6] = {0}; EWRAM_DATA static u16 sEasyChatSpeech[6] = {0};
EWRAM_DATA static u8 sBattleOutcome = 0; EWRAM_DATA static u8 sBattleOutcome = 0;
IWRAM_DATA static u8 sRecordMixFriendLanguage; static u8 sRecordMixFriendLanguage;
IWRAM_DATA static u8 sApprenticeLanguage; static u8 sApprenticeLanguage;
// this file's functions // this file's functions
static u8 sub_8185278(u8 *arg0, u8 *arg1, u8 *arg2); static u8 sub_8185278(u8 *arg0, u8 *arg1, u8 *arg2);

View file

@ -14,7 +14,7 @@ void sub_81700F8(void)
imeBackup = REG_IME; imeBackup = REG_IME;
REG_IME = 0; REG_IME = 0;
RegisterRamReset(0x00000001); RegisterRamReset(RESET_EWRAM);
ClearGpuRegBits(REG_OFFSET_DISPCNT, DISPCNT_FORCED_BLANK); ClearGpuRegBits(REG_OFFSET_DISPCNT, DISPCNT_FORCED_BLANK);
REG_IME = imeBackup; REG_IME = imeBackup;
gMain.inBattle = FALSE; gMain.inBattle = FALSE;

View file

@ -43,9 +43,9 @@ static bool32 SharesPalWithAnyActive(u32 id);
static void sub_8035648(void); static void sub_8035648(void);
// iwram // iwram
static IWRAM_DATA s32 gUnknown_03000DD4; static s32 gUnknown_03000DD4;
static IWRAM_DATA s32 gUnknown_03000DD8; static s32 gUnknown_03000DD8;
static IWRAM_DATA s32 gUnknown_03000DDC; static s32 gUnknown_03000DDC;
// ewram // ewram
static EWRAM_DATA struct UnkStruct1 *gUnknown_02022E10 = {0}; static EWRAM_DATA struct UnkStruct1 *gUnknown_02022E10 = {0};

View file

@ -408,8 +408,8 @@ void UpdatePulseBlend(struct PulseBlend *pulseBlend)
} }
} }
break; break;
case 2: // Flip back and forth case (MODERN ? -2 : 2): // Flip back and forth
// This code is never reached // This code is never reached in vanilla
if (pulseBlendPalette->fadeDirection) if (pulseBlendPalette->fadeDirection)
pulseBlendPalette->blendCoeff = 0; pulseBlendPalette->blendCoeff = 0;
else else

View file

@ -4,10 +4,10 @@
#include "text.h" #include "text.h"
// iwram bss // iwram bss
IWRAM_DATA static u16 sErrorStatus; static u16 sErrorStatus;
IWRAM_DATA static struct SiiRtcInfo sRtc; static struct SiiRtcInfo sRtc;
IWRAM_DATA static u8 sProbeResult; static u8 sProbeResult;
IWRAM_DATA static u16 sSavedIme; static u16 sSavedIme;
// iwram common // iwram common
struct Time gLocalTime; struct Time gLocalTime;

View file

@ -10,12 +10,12 @@
extern const u8* gUnknown_020375C0; extern const u8* gUnknown_020375C0;
// ewram bss // ewram bss
IWRAM_DATA static u8 sScriptContext1Status; static u8 sScriptContext1Status;
IWRAM_DATA static u32 sUnusedVariable1; static u32 sUnusedVariable1;
IWRAM_DATA static struct ScriptContext sScriptContext1; static struct ScriptContext sScriptContext1;
IWRAM_DATA static u32 sUnusedVariable2; static u32 sUnusedVariable2;
IWRAM_DATA static struct ScriptContext sScriptContext2; static struct ScriptContext sScriptContext2;
IWRAM_DATA static bool8 sScriptContext2Enabled; static bool8 sScriptContext2Enabled;
extern ScrCmdFunc gScriptCmdTable[]; extern ScrCmdFunc gScriptCmdTable[];
extern ScrCmdFunc gScriptCmdTableEnd[]; extern ScrCmdFunc gScriptCmdTableEnd[];

View file

@ -350,7 +350,7 @@ static EWRAM_DATA struct SpriteSheet *sUnknown_0203AB30 = NULL;
static EWRAM_DATA struct SlotMachineEwramStruct *sSlotMachine = NULL; static EWRAM_DATA struct SlotMachineEwramStruct *sSlotMachine = NULL;
// IWRAM bss // IWRAM bss
static IWRAM_DATA struct SpriteFrameImage *gUnknown_03001188[26]; static struct SpriteFrameImage *gUnknown_03001188[26];
// Const rom data. // Const rom data.
extern const struct UnkStruct1 *const gUnknown_083ED048[]; extern const struct UnkStruct1 *const gUnknown_083ED048[];

View file

@ -19,11 +19,11 @@ EWRAM_DATA struct MusicPlayerInfo* gMPlay_PokemonCry = NULL;
EWRAM_DATA u8 gPokemonCryBGMDuckingCounter = 0; EWRAM_DATA u8 gPokemonCryBGMDuckingCounter = 0;
// iwram bss // iwram bss
IWRAM_DATA static u16 sCurrentMapMusic; static u16 sCurrentMapMusic;
IWRAM_DATA static u16 sNextMapMusic; static u16 sNextMapMusic;
IWRAM_DATA static u8 sMapMusicState; static u8 sMapMusicState;
IWRAM_DATA static u8 sMapMusicFadeInSpeed; static u8 sMapMusicFadeInSpeed;
IWRAM_DATA static u16 sFanfareCounter; static u16 sFanfareCounter;
// iwram common // iwram common
bool8 gDisableMusic; bool8 gDisableMusic;

View file

@ -285,10 +285,10 @@ static const struct OamDimensions sOamDimensions[3][4] =
}; };
// iwram bss // iwram bss
IWRAM_DATA static u16 sSpriteTileRangeTags[MAX_SPRITES]; static u16 sSpriteTileRangeTags[MAX_SPRITES];
IWRAM_DATA static u16 sSpriteTileRanges[MAX_SPRITES * 2]; static u16 sSpriteTileRanges[MAX_SPRITES * 2];
IWRAM_DATA static struct AffineAnimState sAffineAnimStates[OAM_MATRIX_COUNT]; static struct AffineAnimState sAffineAnimStates[OAM_MATRIX_COUNT];
IWRAM_DATA static u16 sSpritePaletteTags[16]; static u16 sSpritePaletteTags[16];
// iwram common // iwram common
u32 gOamMatrixAllocBitmap; u32 gOamMatrixAllocBitmap;

View file

@ -51,7 +51,7 @@ void sub_81346DC(struct Sprite *sprite);
void sub_813473C(struct Sprite *sprite); void sub_813473C(struct Sprite *sprite);
void StarterPokemonSpriteCallback(struct Sprite *sprite); void StarterPokemonSpriteCallback(struct Sprite *sprite);
static IWRAM_DATA u16 sStarterChooseWindowId; static u16 sStarterChooseWindowId;
// .rodata // .rodata
const u16 gBirchBagGrassPal[][16] = const u16 gBirchBagGrassPal[][16] =