Sync Makefile and common syms (#676)
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
#define FSP_ON 0x01
|
||||
#define FSP_START 0x02
|
||||
|
||||
LINK_MANAGER lman;
|
||||
COMMON_DATA LINK_MANAGER lman = {0};
|
||||
|
||||
static void rfu_LMAN_clearVariables(void);
|
||||
static void rfu_LMAN_settingPCSWITCH(u32 rand);
|
||||
|
||||
+10
-10
@@ -6,16 +6,16 @@ static u16 sTimerCount;
|
||||
static vu16 *sTimerReg;
|
||||
static u16 sSavedIme;
|
||||
|
||||
u8 gFlashTimeoutFlag;
|
||||
u8 (*PollFlashStatus)(u8 *);
|
||||
u16 (*WaitForFlashWrite)(u8 phase, u8 *addr, u8 lastData);
|
||||
u16 (*ProgramFlashSector)(u16 sectorNum, void *src);
|
||||
const struct FlashType *gFlash;
|
||||
u16 (*ProgramFlashByte)(u16 sectorNum, u32 offset, u8 data);
|
||||
u16 gFlashNumRemainingBytes;
|
||||
u16 (*EraseFlashChip)();
|
||||
u16 (*EraseFlashSector)(u16 sectorNum);
|
||||
const u16 *gFlashMaxTime;
|
||||
COMMON_DATA u8 gFlashTimeoutFlag = 0;
|
||||
COMMON_DATA u8 (*PollFlashStatus)(u8 *) = NULL;
|
||||
COMMON_DATA u16 (*WaitForFlashWrite)(u8 phase, u8 *addr, u8 lastData) = NULL;
|
||||
COMMON_DATA u16 (*ProgramFlashSector)(u16 sectorNum, void *src) = NULL;
|
||||
COMMON_DATA const struct FlashType *gFlash = NULL;
|
||||
COMMON_DATA u16 (*ProgramFlashByte)(u16 sectorNum, u32 offset, u8 data) = NULL;
|
||||
COMMON_DATA u16 gFlashNumRemainingBytes = 0;
|
||||
COMMON_DATA u16 (*EraseFlashChip)() = NULL;
|
||||
COMMON_DATA u16 (*EraseFlashSector)(u16 sectorNum) = NULL;
|
||||
COMMON_DATA const u16 *gFlashMaxTime = NULL;
|
||||
|
||||
void SetReadFlash1(u16 *dest);
|
||||
|
||||
|
||||
@@ -30,9 +30,9 @@
|
||||
#define TAG_PARTICLES_LUXURYBALL 55030
|
||||
#define TAG_PARTICLES_PREMIERBALL 55031
|
||||
|
||||
u32 gMonShrinkDuration;
|
||||
u16 gMonShrinkDelta;
|
||||
u16 gMonShrinkDistance;
|
||||
COMMON_DATA u32 gMonShrinkDuration = 0;
|
||||
COMMON_DATA u16 gMonShrinkDelta = 0;
|
||||
COMMON_DATA u16 gMonShrinkDistance = 0;
|
||||
|
||||
static void AnimTask_UnusedLevelUpHealthBox_Step(u8);
|
||||
static void AnimTask_FlashHealthboxOnLevelUp_Step(u8);
|
||||
|
||||
@@ -2424,7 +2424,7 @@ static const struct PokedudeBattlePartyInfo *const sPokedudeBattlePartyPointers[
|
||||
[TTVSCR_CATCHING] = sParties_Catching,
|
||||
};
|
||||
|
||||
struct PokedudeBattlerState *gPokedudeBattlerStates[MAX_BATTLERS_COUNT];
|
||||
COMMON_DATA struct PokedudeBattlerState *gPokedudeBattlerStates[MAX_BATTLERS_COUNT] = {0};
|
||||
|
||||
static void PokedudeSimulateInputChooseAction(void)
|
||||
{
|
||||
|
||||
+9
-9
@@ -220,15 +220,15 @@ EWRAM_DATA u16 gBattleMovePower = 0;
|
||||
EWRAM_DATA u16 gMoveToLearn = 0;
|
||||
EWRAM_DATA u8 gBattleMonForms[MAX_BATTLERS_COUNT] = {0};
|
||||
|
||||
void (*gPreBattleCallback1)(void);
|
||||
void (*gBattleMainFunc)(void);
|
||||
struct BattleResults gBattleResults;
|
||||
u8 gLeveledUpInBattle;
|
||||
void (*gBattlerControllerFuncs[MAX_BATTLERS_COUNT])(void);
|
||||
u8 gHealthboxSpriteIds[MAX_BATTLERS_COUNT];
|
||||
u8 gMultiUsePlayerCursor;
|
||||
u8 gNumberOfMovesToChoose;
|
||||
u8 gBattleControllerData[MAX_BATTLERS_COUNT];
|
||||
COMMON_DATA void (*gPreBattleCallback1)(void) = NULL;
|
||||
COMMON_DATA void (*gBattleMainFunc)(void) = NULL;
|
||||
COMMON_DATA struct BattleResults gBattleResults = {0};
|
||||
COMMON_DATA u8 gLeveledUpInBattle = 0;
|
||||
COMMON_DATA void (*gBattlerControllerFuncs[MAX_BATTLERS_COUNT])(void) = {0};
|
||||
COMMON_DATA u8 gHealthboxSpriteIds[MAX_BATTLERS_COUNT] = {0};
|
||||
COMMON_DATA u8 gMultiUsePlayerCursor = 0;
|
||||
COMMON_DATA u8 gNumberOfMovesToChoose = 0;
|
||||
COMMON_DATA u8 gBattleControllerData[MAX_BATTLERS_COUNT] = {0};
|
||||
|
||||
static const struct ScanlineEffectParams sIntroScanlineParams16Bit =
|
||||
{
|
||||
|
||||
@@ -32,10 +32,10 @@ enum {
|
||||
STATE_RETRY,
|
||||
};
|
||||
|
||||
const void *gMultibootStart;
|
||||
int gMultibootStatus;
|
||||
size_t gMultibootSize;
|
||||
struct MultiBootParam gMultibootParam;
|
||||
COMMON_DATA const void *gMultibootStart = NULL;
|
||||
COMMON_DATA int gMultibootStatus = 0;
|
||||
COMMON_DATA size_t gMultibootSize = 0;
|
||||
COMMON_DATA struct MultiBootParam gMultibootParam = {0};
|
||||
|
||||
static void CB2_BerryFix(void);
|
||||
static void Task_BerryFixMain(u8 taskId);
|
||||
|
||||
@@ -43,7 +43,7 @@ static struct BgConfig2 sGpuBgConfigs2[4];
|
||||
static u32 sDmaBusyBitfield[4];
|
||||
static u8 gpu_tile_allocation_map_bg[0x100];
|
||||
|
||||
bool32 gWindowTileAutoAllocEnabled;
|
||||
COMMON_DATA bool32 gWindowTileAutoAllocEnabled = 0;
|
||||
|
||||
static const struct BgConfig sZeroedBgControlStruct = { 0 };
|
||||
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@
|
||||
#include "constants/field_weather.h"
|
||||
#include "constants/maps.h"
|
||||
|
||||
u32 UnusedVarNeededToMatch[8];
|
||||
COMMON_DATA u32 UnusedVarNeededToMatch[8] = {0};
|
||||
|
||||
static void Task_LinkupStart(u8 taskId);
|
||||
static void Task_LinkupAwaitConnection(u8 taskId);
|
||||
|
||||
@@ -41,7 +41,7 @@ struct EReaderData
|
||||
|
||||
static void Task_EReader(u8);
|
||||
|
||||
struct EReaderData gEReaderData;
|
||||
COMMON_DATA struct EReaderData gEReaderData = {0};
|
||||
|
||||
extern const u8 gMultiBootProgram_EReader_Start[];
|
||||
extern const u8 gMultiBootProgram_EReader_End[];
|
||||
|
||||
+1
-1
@@ -35,7 +35,7 @@ EWRAM_DATA u16 gSpecialVar_PrevTextColor = 0;
|
||||
EWRAM_DATA u16 gSpecialVar_0x8014 = 0;
|
||||
EWRAM_DATA u8 sSpecialFlags[SPECIAL_FLAGS_SIZE] = {};
|
||||
|
||||
u16 gLastQuestLogStoredFlagOrVarIdx;
|
||||
COMMON_DATA u16 gLastQuestLogStoredFlagOrVarIdx = 0;
|
||||
|
||||
extern u16 *const gSpecialVars[];
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ static EWRAM_DATA struct EvoInfo *sEvoStructPtr = NULL;
|
||||
static EWRAM_DATA u16 *sBgAnimPal = NULL;
|
||||
|
||||
// IWRAM common
|
||||
void (*gCB2_AfterEvolution)(void);
|
||||
COMMON_DATA void (*gCB2_AfterEvolution)(void) = NULL;
|
||||
|
||||
#define sEvoCursorPos gBattleCommunication[1] // when learning a new move
|
||||
#define sEvoGraphicsTaskId gBattleCommunication[2]
|
||||
|
||||
+2
-2
@@ -57,8 +57,8 @@ static EWRAM_DATA struct FameCheckerData * sFameCheckerData = NULL;
|
||||
static EWRAM_DATA struct ListMenuItem * sListMenuItems = NULL;
|
||||
static EWRAM_DATA s32 sLastMenuIdx = 0;
|
||||
|
||||
struct ListMenuTemplate gFameChecker_ListMenuTemplate;
|
||||
u8 gIconDescriptionBoxIsOpen;
|
||||
COMMON_DATA struct ListMenuTemplate gFameChecker_ListMenuTemplate = {0};
|
||||
COMMON_DATA u8 gIconDescriptionBoxIsOpen = 0;
|
||||
|
||||
static void MainCB2_LoadFameChecker(void);
|
||||
static void LoadUISpriteSheetsAndPalettes(void);
|
||||
|
||||
+3
-3
@@ -37,9 +37,9 @@ static s16 sVerticalCameraPan;
|
||||
static u8 sBikeCameraPanFlag;
|
||||
static void (*sFieldCameraPanningCallback)(void);
|
||||
|
||||
struct CameraObject gFieldCamera;
|
||||
u16 gTotalCameraPixelOffsetY;
|
||||
u16 gTotalCameraPixelOffsetX;
|
||||
COMMON_DATA struct CameraObject gFieldCamera = {0};
|
||||
COMMON_DATA u16 gTotalCameraPixelOffsetY = 0;
|
||||
COMMON_DATA u16 gTotalCameraPixelOffsetX = 0;
|
||||
|
||||
// text
|
||||
static void move_tilemap_camera_to_upper_left_corner_(struct FieldCameraOffset *cameraOffset)
|
||||
|
||||
@@ -71,7 +71,7 @@ static bool8 TryDoorWarp(struct MapPosition * position, u16 metatileBehavior, u8
|
||||
static s8 GetWarpEventAtPosition(struct MapHeader * mapHeader, u16 x, u16 y, u8 z);
|
||||
static const u8 *GetCoordEventScriptAtPosition(struct MapHeader * mapHeader, u16 x, u16 y, u8 z);
|
||||
|
||||
struct FieldInput gFieldInputRecord;
|
||||
COMMON_DATA struct FieldInput gFieldInputRecord = {0};
|
||||
|
||||
void FieldClearPlayerInput(struct FieldInput *input)
|
||||
{
|
||||
|
||||
@@ -50,8 +50,8 @@ static EWRAM_DATA u16 sListMenuLastScrollPosition = 0;
|
||||
static EWRAM_DATA u8 sPCBoxToSendMon = 0;
|
||||
static EWRAM_DATA u8 sBrailleTextCursorSpriteID = 0;
|
||||
|
||||
struct ListMenuTemplate sFieldSpecialsListMenuTemplate;
|
||||
u16 sFieldSpecialsListMenuScrollBuffer;
|
||||
COMMON_DATA struct ListMenuTemplate sFieldSpecialsListMenuTemplate = {0};
|
||||
COMMON_DATA u16 sFieldSpecialsListMenuScrollBuffer = 0;
|
||||
|
||||
static void Task_AnimatePcTurnOn(u8 taskId);
|
||||
static void PcTurnOnUpdateMetatileId(bool16 flag);
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@ struct ConnectionFlags
|
||||
u8 east:1;
|
||||
};
|
||||
|
||||
struct BackupMapLayout VMap;
|
||||
COMMON_DATA struct BackupMapLayout VMap = {0};
|
||||
EWRAM_DATA u16 gBackupMapData[VIRTUAL_MAP_SIZE] = {};
|
||||
EWRAM_DATA struct MapHeader gMapHeader = {};
|
||||
EWRAM_DATA struct Camera gCamera = {};
|
||||
|
||||
+2
-2
@@ -51,8 +51,8 @@ struct HelpSystemState
|
||||
u8 scrollSub;
|
||||
};
|
||||
|
||||
struct HelpSystemState gHelpSystemState;
|
||||
u16 gHelpContextIdBackup;
|
||||
COMMON_DATA struct HelpSystemState gHelpSystemState = {0};
|
||||
COMMON_DATA u16 gHelpContextIdBackup = 0;
|
||||
|
||||
static bool32 IsCurrentMapInArray(const u16 * mapIdxs);
|
||||
static void BuildMainTopicsListAndMoveToH00(struct HelpSystemListMenu * a0, struct ListMenuItem * a1);
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
#define ZERO 0
|
||||
|
||||
bool8 gHelpSystemEnabled;
|
||||
COMMON_DATA bool8 gHelpSystemEnabled = 0;
|
||||
|
||||
struct HelpSystemVideoState
|
||||
{
|
||||
|
||||
@@ -2,16 +2,16 @@
|
||||
#include "image_processing_effects.h"
|
||||
|
||||
// IWRAM common
|
||||
u8 gCanvasColumnStart;
|
||||
u16 (*gCanvasPixels)[][32];
|
||||
u8 gCanvasRowEnd;
|
||||
u8 gCanvasHeight;
|
||||
u8 gCanvasColumnEnd;
|
||||
u8 gCanvasRowStart;
|
||||
u8 gCanvasMonPersonality;
|
||||
u8 gCanvasWidth;
|
||||
u16 *gCanvasPalette;
|
||||
u16 gCanvasPaletteStart;
|
||||
COMMON_DATA u8 gCanvasColumnStart = 0;
|
||||
COMMON_DATA u16 (*gCanvasPixels)[][32] = {0};
|
||||
COMMON_DATA u8 gCanvasRowEnd = 0;
|
||||
COMMON_DATA u8 gCanvasHeight = 0;
|
||||
COMMON_DATA u8 gCanvasColumnEnd = 0;
|
||||
COMMON_DATA u8 gCanvasRowStart = 0;
|
||||
COMMON_DATA u8 gCanvasMonPersonality = 0;
|
||||
COMMON_DATA u8 gCanvasWidth = 0;
|
||||
COMMON_DATA u16 *gCanvasPalette = NULL;
|
||||
COMMON_DATA u16 gCanvasPaletteStart = 0;
|
||||
|
||||
static void ApplyImageEffect_Pointillism(void);
|
||||
static void ApplyImageEffect_Blur(void);
|
||||
|
||||
+5
-5
@@ -68,11 +68,11 @@ static void rfu_STC_NI_receive_Sender(u8, u8, const struct RfuLocalStruct *, con
|
||||
static void rfu_STC_NI_initSlot_asRecvDataEntity(u8, struct NIComm *);
|
||||
static void rfu_STC_NI_initSlot_asRecvControllData(u8, struct NIComm *);
|
||||
|
||||
struct RfuSlotStatusUNI *gRfuSlotStatusUNI[RFU_CHILD_MAX];
|
||||
struct RfuSlotStatusNI *gRfuSlotStatusNI[RFU_CHILD_MAX];
|
||||
struct RfuLinkStatus *gRfuLinkStatus;
|
||||
struct RfuStatic *gRfuStatic;
|
||||
struct RfuFixed *gRfuFixed;
|
||||
COMMON_DATA struct RfuSlotStatusUNI *gRfuSlotStatusUNI[RFU_CHILD_MAX] = {0};
|
||||
COMMON_DATA struct RfuSlotStatusNI *gRfuSlotStatusNI[RFU_CHILD_MAX] = {0};
|
||||
COMMON_DATA struct RfuLinkStatus *gRfuLinkStatus = NULL;
|
||||
COMMON_DATA struct RfuStatic *gRfuStatic = NULL;
|
||||
COMMON_DATA struct RfuFixed *gRfuFixed = NULL;
|
||||
|
||||
static const struct LLSFStruct llsf_struct[2] = {
|
||||
[MODE_CHILD] = {
|
||||
|
||||
@@ -15,7 +15,7 @@ struct RfuSIO32Id
|
||||
u16 lastId;
|
||||
};
|
||||
|
||||
struct RfuSIO32Id gRfuSIO32Id;
|
||||
COMMON_DATA struct RfuSIO32Id gRfuSIO32Id = {0};
|
||||
|
||||
static const u16 Sio32ConnectionData[] = { 0x494e, 0x544e, 0x4e45, 0x4f44 }; // NINTENDO
|
||||
static const char Sio32IDLib_Var[] = "Sio32ID_030820";
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ static void STWI_stop_timer(void);
|
||||
static s32 STWI_restart_Command(void);
|
||||
static s32 STWI_reset_ClockCounter(void);
|
||||
|
||||
struct STWIStatus *gSTWIStatus;
|
||||
COMMON_DATA struct STWIStatus *gSTWIStatus = NULL;
|
||||
|
||||
void STWI_init_all(struct RfuIntrStruct *interruptStruct, IntrFunc *interrupt, bool8 copyInterruptToRam)
|
||||
{
|
||||
|
||||
+35
-35
@@ -62,41 +62,41 @@ static u16 sRecvNonzeroCheck;
|
||||
static u8 sChecksumAvailable;
|
||||
static u8 sHandshakePlayerCount;
|
||||
|
||||
u16 gLinkPartnersHeldKeys[6];
|
||||
u32 gLinkDebugSeed;
|
||||
struct LinkPlayerBlock gLocalLinkPlayerBlock;
|
||||
bool8 gLinkErrorOccurred;
|
||||
u32 gLinkDebugFlags;
|
||||
u32 gLinkFiller1;
|
||||
bool8 gRemoteLinkPlayersNotReceived[MAX_LINK_PLAYERS];
|
||||
u8 gBlockReceivedStatus[MAX_LINK_PLAYERS];
|
||||
u32 gLinkFiller2;
|
||||
u16 gLinkHeldKeys;
|
||||
u16 gRecvCmds[MAX_RFU_PLAYERS][CMD_LENGTH];
|
||||
u32 gLinkStatus;
|
||||
bool8 gLinkDummy1; // Never read
|
||||
bool8 gLinkDummy2; // Never read
|
||||
bool8 gReadyToExitStandby[MAX_LINK_PLAYERS];
|
||||
bool8 gReadyToCloseLink[MAX_LINK_PLAYERS];
|
||||
u16 gReadyCloseLinkType;
|
||||
u8 gSuppressLinkErrorMessage;
|
||||
u8 gWirelessCommType;
|
||||
u8 gSavedLinkPlayerCount;
|
||||
u16 gSendCmd[CMD_LENGTH];
|
||||
u8 gSavedMultiplayerId;
|
||||
bool8 gReceivedRemoteLinkPlayers;
|
||||
struct LinkTestBGInfo gLinkTestBGInfo;
|
||||
void (*gLinkCallback)(void);
|
||||
u8 gShouldAdvanceLinkState;
|
||||
u16 gLinkTestBlockChecksums[MAX_LINK_PLAYERS];
|
||||
u8 gBlockRequestType;
|
||||
u32 gLinkFiller3; // file
|
||||
u32 gLinkFiller4; // boundary
|
||||
u32 gLinkFiller5; // here?
|
||||
u8 gLastSendQueueCount;
|
||||
struct Link gLink;
|
||||
u8 gLastRecvQueueCount;
|
||||
u16 gLinkSavedIme;
|
||||
COMMON_DATA u16 gLinkPartnersHeldKeys[6] = {0};
|
||||
COMMON_DATA u32 gLinkDebugSeed = 0;
|
||||
COMMON_DATA struct LinkPlayerBlock gLocalLinkPlayerBlock = {0};
|
||||
COMMON_DATA bool8 gLinkErrorOccurred = 0;
|
||||
COMMON_DATA u32 gLinkDebugFlags = 0;
|
||||
COMMON_DATA u32 gLinkFiller1 = 0;
|
||||
COMMON_DATA bool8 gRemoteLinkPlayersNotReceived[MAX_LINK_PLAYERS] = {0};
|
||||
COMMON_DATA u8 gBlockReceivedStatus[MAX_LINK_PLAYERS] = {0};
|
||||
COMMON_DATA u32 gLinkFiller2 = 0;
|
||||
COMMON_DATA u16 gLinkHeldKeys = 0;
|
||||
COMMON_DATA u16 gRecvCmds[MAX_RFU_PLAYERS][CMD_LENGTH] = {0};
|
||||
COMMON_DATA u32 gLinkStatus = 0;
|
||||
COMMON_DATA bool8 gLinkDummy1 = 0; // Never read
|
||||
COMMON_DATA bool8 gLinkDummy2 = 0; // Never read
|
||||
COMMON_DATA bool8 gReadyToExitStandby[MAX_LINK_PLAYERS] = {0};
|
||||
COMMON_DATA bool8 gReadyToCloseLink[MAX_LINK_PLAYERS] = {0};
|
||||
COMMON_DATA u16 gReadyCloseLinkType = 0;
|
||||
COMMON_DATA u8 gSuppressLinkErrorMessage = 0;
|
||||
COMMON_DATA u8 gWirelessCommType = 0;
|
||||
COMMON_DATA u8 gSavedLinkPlayerCount = 0;
|
||||
COMMON_DATA u16 gSendCmd[CMD_LENGTH] = {0};
|
||||
COMMON_DATA u8 gSavedMultiplayerId = 0;
|
||||
COMMON_DATA bool8 gReceivedRemoteLinkPlayers = 0;
|
||||
COMMON_DATA struct LinkTestBGInfo gLinkTestBGInfo = {0};
|
||||
COMMON_DATA void (*gLinkCallback)(void) = NULL;
|
||||
COMMON_DATA u8 gShouldAdvanceLinkState = 0;
|
||||
COMMON_DATA u16 gLinkTestBlockChecksums[MAX_LINK_PLAYERS] = {0};
|
||||
COMMON_DATA u8 gBlockRequestType = 0;
|
||||
COMMON_DATA u32 gLinkFiller3 = 0; // file
|
||||
COMMON_DATA u32 gLinkFiller4 = 0; // boundary
|
||||
COMMON_DATA u32 gLinkFiller5 = 0; // here?
|
||||
COMMON_DATA u8 gLastSendQueueCount = 0;
|
||||
COMMON_DATA struct Link gLink = {0};
|
||||
COMMON_DATA u8 gLastRecvQueueCount = 0;
|
||||
COMMON_DATA u16 gLinkSavedIme = 0;
|
||||
|
||||
static EWRAM_DATA bool8 sLinkTestDebugValuesEnabled = FALSE;
|
||||
static EWRAM_DATA bool8 sDummyFlag = FALSE;
|
||||
|
||||
+3
-3
@@ -75,9 +75,9 @@ static u32 sRfuAPIBuffer[RFU_API_BUFF_SIZE_RAM / 4];
|
||||
static u8 sResendBlock8[CMD_LENGTH * 2];
|
||||
static u16 sResendBlock16[CMD_LENGTH];
|
||||
|
||||
struct RfuGameData gHostRfuGameData;
|
||||
struct RfuManager gRfu;
|
||||
u8 gHostRfuUsername[PLAYER_NAME_LENGTH + 1];
|
||||
COMMON_DATA struct RfuGameData gHostRfuGameData = {0};
|
||||
COMMON_DATA struct RfuManager gRfu = {0};
|
||||
COMMON_DATA u8 gHostRfuUsername[PLAYER_NAME_LENGTH + 1] = {0};
|
||||
|
||||
static void InitChildRecvBuffers(void);
|
||||
static void InitParentSendData(void);
|
||||
|
||||
+2
-2
@@ -39,8 +39,8 @@ struct MoveMenuInfoIcon
|
||||
|
||||
static EWRAM_DATA struct MysteryGiftLinkMenuStruct sMysteryGiftLinkMenu = {0};
|
||||
|
||||
struct ListMenuOverride gListMenuOverride;
|
||||
struct ListMenuTemplate gMultiuseListMenuTemplate;
|
||||
COMMON_DATA struct ListMenuOverride gListMenuOverride = {0};
|
||||
COMMON_DATA struct ListMenuTemplate gMultiuseListMenuTemplate = {0};
|
||||
|
||||
static u8 ListMenuInitInternal(const struct ListMenuTemplate *listMenuTemplate, u16 cursorPos, u16 itemsAbove);
|
||||
static bool8 ListMenuChangeSelection(struct ListMenu *list, bool8 updateCursorAndCallCallback, u8 count, bool8 movingDown);
|
||||
|
||||
+4
-4
@@ -37,10 +37,10 @@ EWRAM_DATA struct LoadedSaveData gLoadedSaveData = {0};
|
||||
EWRAM_DATA u32 gLastEncryptionKey = 0;
|
||||
|
||||
// IWRAM common
|
||||
bool32 gFlashMemoryPresent;
|
||||
struct SaveBlock1 *gSaveBlock1Ptr;
|
||||
struct SaveBlock2 *gSaveBlock2Ptr;
|
||||
struct PokemonStorage *gPokemonStoragePtr;
|
||||
COMMON_DATA bool32 gFlashMemoryPresent = 0;
|
||||
COMMON_DATA struct SaveBlock1 *gSaveBlock1Ptr = NULL;
|
||||
COMMON_DATA struct SaveBlock2 *gSaveBlock2Ptr = NULL;
|
||||
COMMON_DATA struct PokemonStorage *gPokemonStoragePtr = NULL;
|
||||
|
||||
void CheckForFlashMemory(void)
|
||||
{
|
||||
|
||||
@@ -7,18 +7,18 @@ extern const u8 gCgb3Vol[];
|
||||
|
||||
BSS_CODE ALIGNED(4) char SoundMainRAM_Buffer[0x800] = {0};
|
||||
|
||||
struct SoundInfo gSoundInfo;
|
||||
struct PokemonCrySong gPokemonCrySongs[MAX_POKEMON_CRIES];
|
||||
struct MusicPlayerInfo gPokemonCryMusicPlayers[MAX_POKEMON_CRIES];
|
||||
MPlayFunc gMPlayJumpTable[36];
|
||||
struct CgbChannel gCgbChans[4];
|
||||
struct MusicPlayerTrack gPokemonCryTracks[MAX_POKEMON_CRIES * 2];
|
||||
struct PokemonCrySong gPokemonCrySong;
|
||||
struct MusicPlayerInfo gMPlayInfo_BGM;
|
||||
struct MusicPlayerInfo gMPlayInfo_SE1;
|
||||
struct MusicPlayerInfo gMPlayInfo_SE2;
|
||||
struct MusicPlayerInfo gMPlayInfo_SE3;
|
||||
u8 gMPlayMemAccArea[0x10];
|
||||
COMMON_DATA struct SoundInfo gSoundInfo = {0};
|
||||
COMMON_DATA struct PokemonCrySong gPokemonCrySongs[MAX_POKEMON_CRIES] = {0};
|
||||
COMMON_DATA struct MusicPlayerInfo gPokemonCryMusicPlayers[MAX_POKEMON_CRIES] = {0};
|
||||
COMMON_DATA MPlayFunc gMPlayJumpTable[36] = {0};
|
||||
COMMON_DATA struct CgbChannel gCgbChans[4] = {0};
|
||||
COMMON_DATA struct MusicPlayerTrack gPokemonCryTracks[MAX_POKEMON_CRIES * 2] = {0};
|
||||
COMMON_DATA struct PokemonCrySong gPokemonCrySong = {0};
|
||||
COMMON_DATA struct MusicPlayerInfo gMPlayInfo_BGM = {0};
|
||||
COMMON_DATA struct MusicPlayerInfo gMPlayInfo_SE1 = {0};
|
||||
COMMON_DATA struct MusicPlayerInfo gMPlayInfo_SE2 = {0};
|
||||
COMMON_DATA u8 gMPlayMemAccArea[0x10] = {0};
|
||||
COMMON_DATA struct MusicPlayerInfo gMPlayInfo_SE3 = {0};
|
||||
|
||||
u32 MidiKeyToFreq(struct WaveData *wav, u8 key, u8 fineAdjust)
|
||||
{
|
||||
|
||||
+12
-15
@@ -58,21 +58,18 @@ const IntrFunc gIntrTableTemplate[] =
|
||||
|
||||
#define INTR_COUNT ((int)(sizeof(gIntrTableTemplate)/sizeof(IntrFunc)))
|
||||
|
||||
u16 gKeyRepeatStartDelay;
|
||||
u8 gLinkTransferringData;
|
||||
struct Main gMain;
|
||||
u16 gKeyRepeatContinueDelay;
|
||||
u8 gSoftResetDisabled;
|
||||
IntrFunc gIntrTable[INTR_COUNT];
|
||||
bool8 gLinkVSyncDisabled;
|
||||
u32 IntrMain_Buffer[0x200];
|
||||
u8 gPcmDmaCounter;
|
||||
|
||||
// These variables are not defined in RS or Emerald, and are never read.
|
||||
// They were likely used to debug the audio engine and VCount interrupt.
|
||||
u8 sVcountAfterSound;
|
||||
u8 sVcountAtIntr;
|
||||
u8 sVcountBeforeSound;
|
||||
COMMON_DATA u16 gKeyRepeatStartDelay = 0;
|
||||
COMMON_DATA u8 gLinkTransferringData = 0;
|
||||
COMMON_DATA struct Main gMain = {0};
|
||||
COMMON_DATA u16 gKeyRepeatContinueDelay = 0;
|
||||
COMMON_DATA u8 gSoftResetDisabled = 0;
|
||||
COMMON_DATA IntrFunc gIntrTable[INTR_COUNT] = {0};
|
||||
COMMON_DATA u8 sVcountAfterSound = 0;
|
||||
COMMON_DATA bool8 gLinkVSyncDisabled = 0;
|
||||
COMMON_DATA u32 IntrMain_Buffer[0x200] = {0};
|
||||
COMMON_DATA u8 sVcountAtIntr = 0;
|
||||
COMMON_DATA u8 sVcountBeforeSound = 0;
|
||||
COMMON_DATA u8 gPcmDmaCounter = 0;
|
||||
|
||||
static IntrFunc * const sTimerIntrFunc = gIntrTable + 0x7;
|
||||
|
||||
|
||||
+8
-8
@@ -106,14 +106,14 @@ static EWRAM_DATA s16 sCreditsOverworld_CmdIndex = 0;
|
||||
|
||||
EWRAM_DATA struct LinkPlayerObjectEvent gLinkPlayerObjectEvents[4] = {};
|
||||
|
||||
u16 *gBGTilemapBuffers1;
|
||||
u16 *gBGTilemapBuffers2;
|
||||
u16 *gBGTilemapBuffers3;
|
||||
void (*gFieldCallback)(void);
|
||||
bool8 (*gFieldCallback2)(void);
|
||||
u16 gHeldKeyCodeToSend;
|
||||
u8 gLocalLinkPlayerId;
|
||||
u8 gFieldLinkPlayerCount;
|
||||
COMMON_DATA u16 *gBGTilemapBuffers1 = NULL;
|
||||
COMMON_DATA u16 *gBGTilemapBuffers2 = NULL;
|
||||
COMMON_DATA u16 *gBGTilemapBuffers3 = NULL;
|
||||
COMMON_DATA void (*gFieldCallback)(void) = NULL;
|
||||
COMMON_DATA bool8 (*gFieldCallback2)(void) = NULL;
|
||||
COMMON_DATA u16 gHeldKeyCodeToSend = 0;
|
||||
COMMON_DATA u8 gLocalLinkPlayerId = 0;
|
||||
COMMON_DATA u8 gFieldLinkPlayerCount = 0;
|
||||
|
||||
static u8 sPlayerLinkStates[MAX_LINK_PLAYERS];
|
||||
static KeyInterCB sPlayerKeyInterceptCallback;
|
||||
|
||||
+1
-1
@@ -414,7 +414,7 @@ EWRAM_DATA u8 gSelectedOrderFromParty[3] = {0};
|
||||
static EWRAM_DATA u16 sPartyMenuItemId = ITEM_NONE;
|
||||
ALIGNED(4) EWRAM_DATA u8 gBattlePartyCurrentOrder[PARTY_SIZE / 2] = {0}; // bits 0-3 are the current pos of Slot 1, 4-7 are Slot 2, and so on
|
||||
|
||||
void (*gItemUseCB)(u8, TaskFunc);
|
||||
COMMON_DATA void (*gItemUseCB)(u8, TaskFunc) = NULL;
|
||||
|
||||
#include "data/pokemon/tutor_learnsets.h"
|
||||
#include "data/party_menu.h"
|
||||
|
||||
+4
-4
@@ -67,10 +67,10 @@ struct FlagOrVarRecord
|
||||
u16 value;
|
||||
};
|
||||
|
||||
u8 gQuestLogPlaybackState;
|
||||
u16 sMaxActionsInScene;
|
||||
struct FieldInput gQuestLogFieldInput;
|
||||
struct QuestLogAction * sCurSceneActions;
|
||||
COMMON_DATA u8 gQuestLogPlaybackState = 0;
|
||||
COMMON_DATA u16 sMaxActionsInScene = 0;
|
||||
COMMON_DATA struct FieldInput gQuestLogFieldInput = {0};
|
||||
COMMON_DATA struct QuestLogAction * sCurSceneActions = NULL;
|
||||
|
||||
static struct FlagOrVarRecord * sFlagOrVarRecords;
|
||||
static u16 sNumFlagsOrVars;
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
// The number 1103515245 comes from the example implementation
|
||||
// of rand and srand in the ISO C standard.
|
||||
|
||||
u32 gRngValue;
|
||||
COMMON_DATA u32 gRngValue = 0;
|
||||
|
||||
u16 Random(void)
|
||||
{
|
||||
|
||||
+12
-12
@@ -77,18 +77,18 @@ STATIC_ASSERT(sizeof(struct SaveBlock1) <= SECTOR_DATA_SIZE * (SECTOR_ID_SAVEBLO
|
||||
STATIC_ASSERT(sizeof(struct PokemonStorage) <= SECTOR_DATA_SIZE * (SECTOR_ID_PKMN_STORAGE_END - SECTOR_ID_PKMN_STORAGE_START + 1), PokemonStorageFreeSpace);
|
||||
|
||||
// Sector num to begin writing save data. Sectors are rotated each time the game is saved. (possibly to avoid wear on flash memory?)
|
||||
u16 gLastWrittenSector;
|
||||
u32 gLastSaveCounter;
|
||||
u16 gLastKnownGoodSector;
|
||||
u32 gDamagedSaveSectors;
|
||||
u32 gSaveCounter;
|
||||
struct SaveSector *gSaveDataBufferPtr; // the pointer is in fast IWRAM but points to the slower EWRAM.
|
||||
u16 gIncrementalSectorId;
|
||||
u16 gSaveUnusedVar;
|
||||
u16 gSaveFileStatus;
|
||||
void (*gGameContinueCallback)(void);
|
||||
struct SaveSectorLocation gRamSaveSectorLocations[NUM_SECTORS_PER_SLOT];
|
||||
u16 gSaveAttemptStatus;
|
||||
COMMON_DATA u16 gLastWrittenSector = 0;
|
||||
COMMON_DATA u32 gLastSaveCounter = 0;
|
||||
COMMON_DATA u16 gLastKnownGoodSector = 0;
|
||||
COMMON_DATA u32 gDamagedSaveSectors = 0;
|
||||
COMMON_DATA u32 gSaveCounter = 0;
|
||||
COMMON_DATA struct SaveSector *gSaveDataBufferPtr = NULL; // the pointer is in fast IWRAM but points to the slower EWRAM.
|
||||
COMMON_DATA u16 gIncrementalSectorId = 0;
|
||||
COMMON_DATA u16 gSaveUnusedVar = 0;
|
||||
COMMON_DATA u16 gSaveFileStatus = 0;
|
||||
COMMON_DATA void (*gGameContinueCallback)(void) = NULL;
|
||||
COMMON_DATA struct SaveSectorLocation gRamSaveSectorLocations[NUM_SECTORS_PER_SLOT] = {0};
|
||||
COMMON_DATA u16 gSaveAttemptStatus = 0;
|
||||
|
||||
EWRAM_DATA struct SaveSector gSaveDataBuffer = {0};
|
||||
EWRAM_DATA u32 gSaveUnusedVar2 = 0;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include "save.h"
|
||||
#include "strings.h"
|
||||
|
||||
bool32 sIsInSaveFailedScreen;
|
||||
COMMON_DATA bool32 sIsInSaveFailedScreen = 0;
|
||||
|
||||
static EWRAM_DATA u16 sSaveType = SAVE_NORMAL;
|
||||
static EWRAM_DATA u16 sUnused = 0;
|
||||
|
||||
+2
-2
@@ -54,8 +54,8 @@ static EWRAM_DATA u16 sMovingNpcMapGroup = 0;
|
||||
static EWRAM_DATA u16 sMovingNpcMapNum = 0;
|
||||
static EWRAM_DATA u16 sFieldEffectScriptId = 0;
|
||||
|
||||
struct ScriptContext * sQuestLogScriptContextPtr;
|
||||
u8 gSelectedObjectEvent;
|
||||
COMMON_DATA struct ScriptContext * sQuestLogScriptContextPtr = NULL;
|
||||
COMMON_DATA u8 gSelectedObjectEvent = 0;
|
||||
|
||||
// This is defined in here so the optimizer can't see its value when compiling
|
||||
// script.c.
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@ static u8 sMapMusicFadeInSpeed;
|
||||
static u16 sFanfareCounter;
|
||||
|
||||
// iwram common
|
||||
bool8 gDisableMusic;
|
||||
COMMON_DATA bool8 gDisableMusic = 0;
|
||||
|
||||
extern u32 gBattleTypeFlags;
|
||||
extern struct MusicPlayerInfo gMPlayInfo_BGM;
|
||||
|
||||
+2
-2
@@ -270,8 +270,8 @@ static u16 sSpriteTileRanges[MAX_SPRITES * 2];
|
||||
static struct AffineAnimState sAffineAnimStates[OAM_MATRIX_COUNT];
|
||||
static u16 sSpritePaletteTags[16];
|
||||
|
||||
u32 gOamMatrixAllocBitmap;
|
||||
u8 gReservedSpritePaletteCount;
|
||||
COMMON_DATA u32 gOamMatrixAllocBitmap = 0;
|
||||
COMMON_DATA u8 gReservedSpritePaletteCount = 0;
|
||||
|
||||
EWRAM_DATA struct Sprite gSprites[MAX_SPRITES + 1] = {0};
|
||||
EWRAM_DATA u16 gSpritePriorities[MAX_SPRITES] = {0};
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
#define HEAD_SENTINEL 0xFE
|
||||
#define TAIL_SENTINEL 0xFF
|
||||
|
||||
struct Task gTasks[NUM_TASKS];
|
||||
COMMON_DATA struct Task gTasks[NUM_TASKS] = {0};
|
||||
|
||||
static void InsertTask(u8 newTaskId);
|
||||
static u8 FindFirstActiveTask();
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@ static s32 GetGlyphWidth_Male(u16 glyphId, bool32 isJapanese);
|
||||
static s32 GetGlyphWidth_Female(u16 glyphId, bool32 isJapanese);
|
||||
static void SpriteCB_TextCursor(struct Sprite *sprite);
|
||||
|
||||
TextFlags gTextFlags;
|
||||
COMMON_DATA TextFlags gTextFlags = {0};
|
||||
|
||||
static const u8 sDownArrowTiles[] = INCBIN_U8("graphics/fonts/down_arrow.4bpp");
|
||||
static const u8 sDarkDownArrowTiles[] = INCBIN_U8("graphics/fonts/down_arrow_RS.4bpp");
|
||||
|
||||
+2
-2
@@ -10,8 +10,8 @@ static u16 sLastTextBgColor;
|
||||
static u16 sLastTextFgColor;
|
||||
static u16 sLastTextShadowColor;
|
||||
|
||||
const struct FontInfo *gFonts;
|
||||
struct GlyphInfo gGlyphInfo;
|
||||
COMMON_DATA const struct FontInfo *gFonts = NULL;
|
||||
COMMON_DATA struct GlyphInfo gGlyphInfo = {0};
|
||||
|
||||
static const u8 sFontHalfRowOffsets[] =
|
||||
{
|
||||
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
#include "global.h"
|
||||
#include "gflib.h"
|
||||
|
||||
u8 gWindowClearTile;
|
||||
void *gWindowBgTilemapBuffers[4];
|
||||
COMMON_DATA u8 gWindowClearTile = {0};
|
||||
COMMON_DATA void *gWindowBgTilemapBuffers[4] = {0};
|
||||
|
||||
EWRAM_DATA struct Window gWindows[WINDOWS_MAX] = {0};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user