SHIFT_BSS be gone (#1173)

* merge asm in src all versions

* main: refactor and eliminate SHIFT_BSS

* engine1 static BSS

* engine2

* folder move

* fix shift build

* cleanup msg & msg_draw

* wtf?

* un-static-ized

* .

* remove unnecess. rodata pad

* populate dangling common syms
This commit is contained in:
AltoXorg 2024-03-05 18:54:53 +08:00 committed by GitHub
parent e303e2a04b
commit 8d5b066b7d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
235 changed files with 1512 additions and 12570 deletions

View File

@ -218,6 +218,8 @@ u8 __osContAddressCrc(u16 addr);
u8 __osContDataCrc(u8 *data);
s32 __osPfsGetStatus(OSMesgQueue *queue, int channel);
#ifndef NO_EXTERN_VARIABLES
extern u8 __osContLastCmd;
extern OSTimer __osEepromTimer;
extern OSMesg __osEepromTimerMsg;
@ -227,6 +229,8 @@ extern OSPifRam __osContPifRam;
extern OSPifRam __osPfsPifRam;
extern u8 __osMaxControllers;
#endif
//some version of this almost certainly existed since there's plenty of times where it's used right before a return 0
#define ERRCK(fn) \
ret = fn; \

View File

@ -76,7 +76,11 @@ typedef struct OSMesgQueue_s {
/* Events */
#ifdef _FINALROM
#define OS_NUM_EVENTS 15
# ifndef BBPLAYER
# define OS_NUM_EVENTS 15
# else
# define OS_NUM_EVENTS 32
# endif
#else
#define OS_NUM_EVENTS 23
#endif

View File

@ -26,6 +26,8 @@ extern void __osTimerInterrupt(void);
extern u32 __osProbeTLB(void *);
extern int __osSpDeviceBusy(void);
#ifndef NO_EXTERN_VARIABLES
extern OSThread *__osRunningThread;
extern OSThread *__osActiveQueue;
extern OSThread *__osFaultedThread;
@ -41,6 +43,7 @@ extern u32 __osShutdown;
extern __OSEventState __osEventStateTab[OS_NUM_EVENTS];
#endif
//not sure if this should be here
extern s32 osViClock;

View File

@ -6,7 +6,9 @@
#include "types.h"
#include "common_structs.h"
#include "functions.h"
#ifndef NO_EXTERN_VARIABLES
#include "variables.h"
#endif
#include "macros.h"
#include "enums.h"
#include "evt.h"

View File

@ -2514,6 +2514,13 @@ typedef struct PartnerDMAData {
/* 0x10 */ s32 y;
} PartnerDMAData; // size = 0x14
typedef struct UseItemStruct {
/* 0x00 */ u8* dmaStart;
/* 0x04 */ u8* dmaEnd;
/* 0x08 */ EvtScript* main;
/* 0x0C */ s32 unk_0C;
} UseItemStruct;
typedef struct MsgVoice {
/* 0x00 */ s32 voiceA;
/* 0x04 */ s32 voiceB;

View File

@ -18,7 +18,7 @@
#define MATCHING_BSS(size) static BSS u8 padding_bss[size];
#endif
#define BSS __attribute__ ((section (".bss")))
#define BSS __attribute__ ((nocommon, section (".bss")))
#define TRANSPARENT_UNION __attribute__ ((__transparent_union__))
#else
#define SHIFT_BSS static
@ -26,13 +26,15 @@
#define TRANSPARENT_UNION
#endif
#define ALIGNED(x) __attribute__((aligned(x)))
#ifndef BBPLAYER
# define ALIGNED(x) __attribute__((aligned(x)))
# define OSALIGNED(x) ALIGNED(x)
#else
# define ALIGNED(x)
# define OSALIGNED(x)
#endif
#define BBALIGNED(x) __attribute__((aligned(x)))
# define BBALIGNED(x) ALIGNED(x)
#define ALIGN16(val) (((val) + 0xF) & ~0xF)
#define ALIGN8(val) (((val) + 0x7) & ~0x7)

View File

@ -185,9 +185,14 @@ typedef struct ShapeFile {
} ShapeFile; // size = variable
typedef ModelTreeInfo ModelTreeInfoList[0x200];
#ifndef NO_EXTERN_VARIABLES
extern ModelTreeInfoList* gCurrentModelTreeNodeInfo;
extern ModelList* gCurrentModels;
#endif
void mdl_set_depth_tint_params(u8 primR, u8 primG, u8 primB, u8 primA, u8 fogR, u8 fogG, u8 fogB, s32 fogStart, s32 fogEnd);
void mdl_set_remap_tint_params(u8 primR, u8 primG, u8 primB, u8 envR, u8 envG, u8 envB);
void mdl_get_remap_tint_params(u8* primR, u8* primG, u8* primB, u8* envR, u8* envG, u8* envB);

View File

@ -416,12 +416,15 @@ typedef struct EncounterStatus {
/* 0x0A8 */ FieldStatus unusedAttack2;
/* 0x0AC */ FieldStatus unusedAttack3;
/* 0x0B0 */ s32 defeatFlags[60][12];
/* 0xFB0 */ s16 recentMaps[2];
/* 0xFB4 */ char unk_FB4[4];
} EncounterStatus; // size = 0xFB8
/* 0xBF0 */ s16 recentMaps[2];
} EncounterStatus; // size = 0xBF4
#ifndef NO_EXTERN_VARIABLES
extern EncounterStatus gCurrentEncounter;
#endif
s32 basic_ai_check_player_dist(EnemyDetectVolume* arg0, Enemy* arg1, f32 arg2, f32 arg3, s8 arg4);
/// The default Npc::onUpdate and Npc::onRender callback.

View File

@ -186,6 +186,8 @@ typedef struct st_SndState {
typedef void (*NUAuPreNMIFunc)(NUScMsg,u32); /* PRENMI callback function */
typedef void (*NUAuMgrFunc)(void); /* Acmd callback function */
#ifndef NO_EXTERN_VARIABLES
/*----------------------------------------------------------------------*/
/*----------------------------------------------------------------------*/
/* extern variables */
@ -194,11 +196,15 @@ typedef void (*NUAuMgrFunc)(void); /* Acmd callback function */
/*--------------------------------------*/
/* audio variables */
/*--------------------------------------*/
// NOTE: some variables have been commented out due to
// being declared static which affects bss reordering
extern u64* nuAuMgrStack;
extern NUScTask nuAuTask; /* Audio task buffer*/
extern s16* nuAuBuffer_ptr[]; /* Audio buffer */
extern NUScClient nuAuClient;
extern OSThread nuAuMgrThread;
//extern OSThread nuAuMgrThread;
extern u32 nuAuFrameCounter; /* Frame counter */
extern ALHeap nuAuHeap; /* Heap structure */
extern NUAuSeqPlayer nuAuSeqPlayer[];
@ -219,7 +225,7 @@ extern OSMesgQueue nuAuMesgQ; /* Audio Manager queue */
extern ALGlobals nuAuGlobal;
extern s16 nuAuDmaBufNum;
extern s16 nuAuDmaBufSize;
extern NUDMAState nuAuDmaState;
//extern NUDMAState nuAuDmaState;
extern NUDMABuffer* nuAuDmaBuf;
extern Acmd* nuAuCmdListBuf; /* pointer of command list */
extern u32 nuAuAcmdLen;
@ -240,6 +246,8 @@ extern u32 nuAuDebAcmdLenMax; /* Maximum length of the audio command list */
extern s16 nuAuFrameSampleSize; /* Number of samples created at one time */
extern s16 nuAuExtraSampleSize; /* Number of extra samples */
#endif
/*----------------------------------------------------------------------*/
/*----------------------------------------------------------------------*/
/* Global Function */

View File

@ -652,6 +652,8 @@ typedef struct st_DebConWindow {
u16 text[NU_DEB_CON_TEXT_SIZE]; /* Character buffer*/
} NUDebConWindow;
#ifndef NO_EXTERN_VARIABLES
/*----------------------------------------------------------------------*/
/*----------------------------------------------------------------------*/
/* extern variables */
@ -752,6 +754,7 @@ extern u32 nuDebTaskPerfInterval;
extern volatile u32 nuDebTaskPerfCnt;
extern volatile u32 nuDebTaskPerfEnd;
#endif
/*----------------------------------------------------------------------*/
/*----------------------------------------------------------------------*/

View File

@ -2,11 +2,11 @@
#include "nu/nusys.h"
#include "game_modes.h"
SHIFT_BSS s16 gMapTransitionAlpha;
SHIFT_BSS s16 gMapTransitionFadeRate;
SHIFT_BSS s16 gMapTransitionState;
SHIFT_BSS s16 gMapTransitionStateTime;
SHIFT_BSS s16 gLoadedFromFileSelect;
BSS s16 gMapTransitionAlpha;
BSS s16 gMapTransitionFadeRate;
BSS s16 gMapTransitionState;
BSS s16 gMapTransitionStateTime;
BSS s16 gLoadedFromFileSelect;
void set_map_change_fade_rate(s16 fadeRate) {
gMapTransitionFadeRate = fadeRate;

View File

@ -28,11 +28,14 @@ extern Addr inspect_icon_ROM_START;
extern Addr inspect_icon_ROM_END;
#endif
SHIFT_BSS UNK_FUN_PTR(ISpyNotificationCallback);
SHIFT_BSS UNK_FUN_PTR(PulseStoneNotificationCallback);
SHIFT_BSS UNK_FUN_PTR(TalkNotificationCallback);
SHIFT_BSS UNK_FUN_PTR(InteractNotificationCallback);
SHIFT_BSS s32 D_8010C950;
UNK_FUN_PTR(ISpyNotificationCallback);
UNK_FUN_PTR(PulseStoneNotificationCallback);
UNK_FUN_PTR(TalkNotificationCallback);
UNK_FUN_PTR(InteractNotificationCallback);
s32 D_8010C950;
PlayerStatus gPlayerStatus;
PlayerData gPlayerData;
extern f32 D_800F7B48;
extern s32 D_800F7B4C;

View File

@ -1,14 +1,15 @@
#include "common.h"
SHIFT_BSS s32 PeachDisguiseNpcIndex;
SHIFT_BSS Entity* TweesterTouchingPartner;
SHIFT_BSS Entity* TweesterTouchingPlayer;
SHIFT_BSS s32 PrevPlayerDirection;
SHIFT_BSS s32 PlayerRunStateTime;
SHIFT_BSS f32 PlayerNormalYaw;
SHIFT_BSS f32 PlayerNormalPitch;
SHIFT_BSS PlayerSpinState gPlayerSpinState;
SHIFT_BSS s32 PlayerYInterpUpdateDelay;
s32 PeachDisguiseNpcIndex;
Entity* TweesterTouchingPartner;
Entity* TweesterTouchingPlayer;
s32 PrevPlayerDirection;
s32 PlayerRunStateTime;
f32 PlayerNormalYaw;
f32 PlayerNormalPitch;
PlayerSpinState gPlayerSpinState;
BSS s32 PlayerYInterpUpdateDelay;
void update_player_input(void) {
PlayerStatus* playerStatus = &gPlayerStatus;

View File

@ -2,11 +2,11 @@
#include "world/partners.h"
#include "sprite/player.h"
SHIFT_BSS CollisionStatus gCollisionStatus;
SHIFT_BSS f32 D_8010C928;
SHIFT_BSS f32 JumpedOnSwitchX;
SHIFT_BSS f32 JumpedOnSwitchZ;
SHIFT_BSS f32 D_8010C984;
CollisionStatus gCollisionStatus;
f32 D_8010C928;
f32 JumpedOnSwitchX;
f32 JumpedOnSwitchZ;
f32 D_8010C984;
extern f32 GravityParamsStartJump[];

View File

@ -13,15 +13,16 @@
#define PLAYER_ACTION_VRAM_DEF (void*) 0x802B6000
#endif
SHIFT_BSS void* D_8010C924;
SHIFT_BSS s32 D_8010C92C;
SHIFT_BSS s32 D_8010C964;
SHIFT_BSS s32 gSpinHistoryBufferPos;
SHIFT_BSS s16 D_8010C9B0;
SHIFT_BSS s32 gSpinHistoryPosY[5];
SHIFT_BSS s32 gSpinHistoryPosX[5];
SHIFT_BSS s32 gSpinHistoryPosZ[5];
SHIFT_BSS s16 gSpinHistoryPosAngle[5];
void* D_8010C924;
s32 D_8010C92C;
s32 D_8010C964;
s32 gSpinHistoryBufferPos;
s32 gSpinHistoryPosY[5];
s32 gSpinHistoryPosX[5];
s32 gSpinHistoryPosZ[5];
s16 gSpinHistoryPosAngle[5];
BSS s16 D_8010C9B0;
void func_800E5520(void) {
D_8010C9B0 = 0;

View File

@ -26,8 +26,8 @@ s32 D_801094A8 = 0;
s16 D_801094AC = 4;
s16 D_801094AE = 4;
SHIFT_BSS s32 D_8010CFF0;
SHIFT_BSS s32 D_8010CFF4;
BSS s32 D_8010CFF0;
BSS s32 D_8010CFF4;
void func_800EFD00(void) {
}

View File

@ -45,7 +45,7 @@ typedef struct Unk8a160Outer {
/* 0x00 */ Unk8a160 subs[57]; // one base + 56 others?
} Unk8a160Outer;
SHIFT_BSS Unk8a160Outer D_8010D000[1];
BSS Unk8a160Outer D_8010D000[1];
void func_800F0CB0(s32 arg0, f32 x, f32 y, f32 scale) {
Unk8a160Outer* outer = &D_8010D000[arg0];

View File

@ -79,46 +79,46 @@ s16 PopupContentScissorWidths[] = {
};
#endif
SHIFT_BSS s32 gPopupState;
SHIFT_BSS s32 D_8010D644;
SHIFT_BSS s32 PopupMenu_SelectedIndex;
SHIFT_BSS s32 PopupMenu_PrevSelectedIndex;
SHIFT_BSS s32 PopupMenu_Alpha;
SHIFT_BSS s8 PopupMenu_FirstDisplayIndex;
SHIFT_BSS s8 PopupMenu_LastDisplayIndex;
SHIFT_BSS s8 PopupMenu_DisplayedEntryCount;
SHIFT_BSS s16 D_8010D658;
SHIFT_BSS s16 D_8010D65A;
SHIFT_BSS s32 PopupMenu_EmptybarHEID;
SHIFT_BSS s32 PopupMenu_TitleIconHEID;
SHIFT_BSS s32 PopupMenu_TimesHEID;
SHIFT_BSS s32 PopupMenu_PartnerLevelHEID;
SHIFT_BSS s32 PopupMenu_CursorHEID;
SHIFT_BSS s32 PopupMenu_UpArrowHEID;
SHIFT_BSS s32 PopupMenu_DownArrowHEID;
SHIFT_BSS s32 PopupMenu_EntryIconHEID;
SHIFT_BSS s16 D_8010D67C;
SHIFT_BSS s16 D_8010D67E;
SHIFT_BSS s16 D_8010D680;
SHIFT_BSS s16 D_8010D682;
SHIFT_BSS s16 D_8010D684;
SHIFT_BSS s16 D_8010D686;
SHIFT_BSS s16 PopupMenu_StarPieceCounterPosX;
SHIFT_BSS s16 PopupMenu_StarPieceCounterPosY;
SHIFT_BSS s16 D_8010D68C;
SHIFT_BSS s8 PopupNotBattle;
SHIFT_BSS s8 PopupMenu_MaxDisplayableEntryCount;
SHIFT_BSS s8 D_8010D690;
SHIFT_BSS s8 D_8010D691;
SHIFT_BSS s8 D_8010D692;
SHIFT_BSS s8 D_8010D693;
SHIFT_BSS s32 gPopupWorker;
SHIFT_BSS s8 PopupNotDipping;
SHIFT_BSS s8 PopupDipMode;
SHIFT_BSS s8 PopupMenu_WasStatusBarIgnoringChanges;
SHIFT_BSS PopupMenu* gPopupMenu;
SHIFT_BSS MessagePrintState* D_8010D6A0;
SHIFT_BSS s32 D_8010D6A4;
BSS s32 gPopupState;
BSS s32 D_8010D644;
BSS s32 PopupMenu_SelectedIndex;
BSS s32 PopupMenu_PrevSelectedIndex;
BSS s32 PopupMenu_Alpha;
BSS s8 PopupMenu_FirstDisplayIndex;
BSS s8 PopupMenu_LastDisplayIndex;
BSS s8 PopupMenu_DisplayedEntryCount;
BSS s16 D_8010D658;
BSS s16 D_8010D65A;
BSS s32 PopupMenu_EmptybarHEID;
BSS s32 PopupMenu_TitleIconHEID;
BSS s32 PopupMenu_TimesHEID;
BSS s32 PopupMenu_PartnerLevelHEID;
BSS s32 PopupMenu_CursorHEID;
BSS s32 PopupMenu_UpArrowHEID;
BSS s32 PopupMenu_DownArrowHEID;
BSS s32 PopupMenu_EntryIconHEID;
BSS s16 D_8010D67C;
BSS s16 D_8010D67E;
BSS s16 D_8010D680;
BSS s16 D_8010D682;
BSS s16 D_8010D684;
BSS s16 D_8010D686;
BSS s16 PopupMenu_StarPieceCounterPosX;
BSS s16 PopupMenu_StarPieceCounterPosY;
BSS s16 D_8010D68C;
BSS s8 PopupNotBattle;
BSS s8 PopupMenu_MaxDisplayableEntryCount;
BSS s8 D_8010D690;
BSS s8 D_8010D691;
BSS s8 D_8010D692;
BSS s8 D_8010D693;
BSS s32 gPopupWorker;
BSS s8 PopupNotDipping;
BSS s8 PopupDipMode;
BSS s8 PopupMenu_WasStatusBarIgnoringChanges;
BSS PopupMenu* gPopupMenu;
BSS MessagePrintState* D_8010D6A0;
BSS s32 D_8010D6A4;
s8 status_bar_is_ignoring_changes(void);

View File

@ -9,25 +9,27 @@ typedef struct DisplayListBufferHandle {
typedef DisplayListBufferHandle AnimatedMeshVertexCopyList[0x60];
SHIFT_BSS AnimatedMeshList* gCurrentAnimMeshListPtr;
SHIFT_BSS s32 gAnimCount;
SHIFT_BSS AnimatedMeshVertexCopyList D_801533C0;
SHIFT_BSS AnimatedMeshVertexCopyList D_801536C0;
SHIFT_BSS AnimatedMeshList D_801539C0;
SHIFT_BSS AnimatedMeshList D_80153A00;
SHIFT_BSS s32 gAnimModelFogEnabled;
SHIFT_BSS s32 gAnimModelFogR;
SHIFT_BSS s32 gAnimModelFogG;
SHIFT_BSS s32 gAnimModelFogB;
SHIFT_BSS s32 gAnimModelFogA;
SHIFT_BSS s32 gAnimModelFogStart;
SHIFT_BSS s32 gAnimModelFogEnd;
SHIFT_BSS s32 gAnimVtxSegment;
SHIFT_BSS Matrix4f gAnimRotMtx;
SHIFT_BSS Matrix4f gAnimScaleMtx;
SHIFT_BSS Matrix4f gAnimTranslateMtx;
SHIFT_BSS Matrix4f gAnimRotScaleMtx;
SHIFT_BSS StaticAnimatorNode** gAnimTreeRoot;
s32 gAnimCount;
BSS AnimatedMeshVertexCopyList D_801533C0;
BSS AnimatedMeshVertexCopyList D_801536C0;
BSS AnimatedMeshList D_801539C0;
BSS AnimatedMeshList D_80153A00;
BSS AnimatedMeshList* gCurrentAnimMeshListPtr;
BSS s32 gAnimModelFogEnabled;
BSS s32 gAnimModelFogR;
BSS s32 gAnimModelFogG;
BSS s32 gAnimModelFogB;
BSS s32 gAnimModelFogA;
BSS s32 gAnimModelFogStart;
BSS s32 gAnimModelFogEnd;
BSS s32 gAnimVtxSegment;
BSS s32 D_80153A64;
BSS Matrix4f gAnimRotMtx;
BSS Matrix4f gAnimScaleMtx;
BSS Matrix4f gAnimTranslateMtx;
BSS Matrix4f gAnimRotScaleMtx;
BSS StaticAnimatorNode** gAnimTreeRoot;
extern Gfx Gfx_RM1_SURFACE_OPA[];
extern Gfx Gfx_RM1_DECAL_OPA[];

View File

@ -1186,6 +1186,8 @@ typedef struct ALConfig {
/* 0x14 */ ALHeap* heap;
} ALConfig; // size = 0x18;
#ifndef NO_EXTERN_VARIABLES
extern volatile u8 AuSynUseStereo;
extern u16 DummyInstrumentPredictor[32];
extern u8 DummyInstrumentBase[190];
@ -1212,6 +1214,8 @@ extern AmbienceManager* gAuAmbienceManager;
extern SoundManager* gSoundManager;
extern BGMPlayer* gBGMPlayerA;
#endif
#include "audio/private.h"
#endif

View File

@ -12,22 +12,28 @@ u32 nuAuFrameCounter = 0;
u8 nuAuTaskStop = NU_AU_TASK_RUN;
u8 volatile AuSynUseStereo = TRUE;
SHIFT_BSS NUDMAState nuAuDmaState;
SHIFT_BSS Acmd* AlCmdListBuffers[3];
SHIFT_BSS NUScTask nuAuTasks[3];
SHIFT_BSS u8* D_800A3628[3];
SHIFT_BSS s32 AlFrameSize;
SHIFT_BSS s32 AlMinFrameSize;
SHIFT_BSS OSMesgQueue nuAuDmaMesgQ;
SHIFT_BSS OSMesg nuAuDmaMesgBuf[50];
SHIFT_BSS OSIoMesg nuAuDmaIOMesgBuf[50];
SHIFT_BSS NUDMABuffer nuAuDmaBufList[50];
SHIFT_BSS AuSynDriver auSynDriver;
SHIFT_BSS u8 rspbootUcodeBuffer[0x100] ALIGNED(16);
SHIFT_BSS u64 AuStack[NU_AU_STACK_SIZE / sizeof(u64)];
SHIFT_BSS u16 AuInitialGlobalVolume;
SHIFT_BSS OSThread nuAuMgrThread;
SHIFT_BSS ALHeap nuAuHeap;
BSS u16 AuInitialGlobalVolume;
BSS OSThread nuAuMgrThread;
BSS char D_800A1108[0x408];
BSS u64 AuStack[NU_AU_STACK_SIZE / sizeof(u64)];
BSS Acmd* AlCmdListBuffers[3];
BSS NUScTask nuAuTasks[3];
BSS u8* D_800A3628[3];
BSS s32 AlFrameSize;
BSS s32 AlMinFrameSize;
BSS s32 D_800A363C;
BSS OSMesgQueue nuAuDmaMesgQ;
BSS OSMesg nuAuDmaMesgBuf[50];
BSS OSIoMesg nuAuDmaIOMesgBuf[50];
BSS NUDMAState nuAuDmaState;
BSS s32 D_800A3BDC;
BSS NUDMABuffer nuAuDmaBufList[50];
ALHeap nuAuHeap;
AuSynDriver auSynDriver;
#if !VERSION_IQUE
u8 rspbootUcodeBuffer[0x100] ALIGNED(16);
#endif
extern u64 n_aspMain_text_bin[];
extern u64 n_aspMain_data_bin[];

View File

@ -1,10 +1,11 @@
#include "audio.h"
BSS void (*CurrentSeqCmdHandler)(BGMPlayer*, BGMPlayerTrack*);
extern u8 EnvelopeReleaseDefaultFast[];
extern u8 BgmDivisors[8];
extern u8 D_80078558[40];
extern void (*CurrentSeqCmdHandler)(BGMPlayer*, BGMPlayerTrack*);
extern void (*SefCmdHandlers[])(SoundManager*, SoundPlayer*);
extern void (*SeqCmdHandlers[])(BGMPlayer*, BGMPlayerTrack*);
extern u8 SeqCmdArgCounts[];

View File

@ -1,13 +1,13 @@
#include "audio.h"
#include "ld_addrs.h"
SHIFT_BSS AuCallback BeginSoundUpdateCallback;
SHIFT_BSS BGMPlayer* gBGMPlayerA;
SHIFT_BSS BGMPlayer* gBGMPlayerB;
SHIFT_BSS BGMPlayer* gBGMPlayerC;
SHIFT_BSS SoundManager* gSoundManager;
SHIFT_BSS AuGlobals* gSoundGlobals;
SHIFT_BSS AmbienceManager* gAuAmbienceManager;
AuCallback BeginSoundUpdateCallback;
BGMPlayer* gBGMPlayerA;
BGMPlayer* gBGMPlayerB;
BGMPlayer* gBGMPlayerC;
SoundManager* gSoundManager;
AuGlobals* gSoundGlobals;
AmbienceManager* gAuAmbienceManager;
// data
extern u16 D_80078530[9];

View File

@ -4,12 +4,12 @@
static s16 _getVol(s16 arg0, s32 arg1, s16 arg2, u16 arg3);
SHIFT_BSS s16* AuDelayBufferMain;
SHIFT_BSS s16* AuDelayBufferAux;
SHIFT_BSS s32 AuDelayCounter;
SHIFT_BSS u8 AuDelayedVoiceGroup;
SHIFT_BSS s16 AuDelayedChannel;
SHIFT_BSS s32 AuDelayCount;
BSS s16* AuDelayBufferMain;
BSS s16* AuDelayBufferAux;
BSS s32 AuDelayCounter;
BSS u8 AuDelayedVoiceGroup;
BSS s16 AuDelayedChannel;
BSS s32 AuDelayCount;
AuSynDriver* gActiveSynDriverPtr = NULL;
AuSynDriver* gSynDriverPtr = NULL;

View File

@ -23,7 +23,7 @@ AmbientSoundSettings DefaultAmbientSoundData = {
.unkC = -1
};
SHIFT_BSS AmbientSoundSettings AmbientSoundData;
AmbientSoundSettings AmbientSoundData;
void reset_ambient_sounds(void) {
AmbientSoundData = DefaultAmbientSoundData;

View File

@ -4,11 +4,12 @@
void bgm_update_volume(void);
void bgm_set_target_volume(s16 volume);
SHIFT_BSS s16 MusicDefaultVolume;
SHIFT_BSS s16 MusicMaxVolume;
SHIFT_BSS s16 MusicCurrentVolume;
SHIFT_BSS s16 MusicTargetVolume;
SHIFT_BSS MusicSettings gMusicSettings[2];
BSS s16 MusicDefaultVolume;
BSS s16 MusicTargetVolume;
BSS s16 MusicMaxVolume;
BSS s16 MusicCurrentVolume;
MusicSettings gMusicSettings[2];
MusicSettings BlankMusicSettings = {
.flags = 0,

View File

@ -3,8 +3,8 @@
#define MAX_SOUND_INSTANCES 10
SHIFT_BSS u16 gCurrentDoorSounds;
SHIFT_BSS u16 gCurrentRoomDoorSounds;
u16 gCurrentDoorSounds;
u16 gCurrentRoomDoorSounds;
#define SOUND_LOOP_IDX(soundID) (soundID & 0xFFFF)
@ -209,10 +209,10 @@ s32 OpenCloseSounds[][2] = {
{ SOUND_CREAKY_WINDOW_OPEN, SOUND_CREAKY_WINDOW_CLOSE },
};
SHIFT_BSS SoundInstance wEnvSounds[MAX_SOUND_INSTANCES];
SHIFT_BSS SoundInstance bEnvSounds[MAX_SOUND_INSTANCES];
SHIFT_BSS SoundInstance* gCurrentEnvSounds;
SHIFT_BSS s32 SfxReverbMode;
BSS SoundInstance wEnvSounds[MAX_SOUND_INSTANCES];
BSS SoundInstance bEnvSounds[MAX_SOUND_INSTANCES];
BSS SoundInstance* gCurrentEnvSounds;
BSS s32 SfxReverbMode;
void sfx_compute_spatialized_sound_params_full(f32 x, f32 y, f32 z, s16* volume, s16* pan, s32 flags) {
s32 screenX, screenY, screenZ;

View File

@ -418,8 +418,7 @@ f32 AlTuneScaling[] = {
extern s32* AU_FX_CUSTOM_PARAMS[0]; // points to 80078290
SHIFT_BSS void (*CurrentSeqCmdHandler)(BGMPlayer*, BGMPlayerTrack*);
SHIFT_BSS void (*CurrentSefCmdHandler)(SoundManager*, SoundPlayer*);
void (*CurrentSefCmdHandler)(SoundManager*, SoundPlayer*);
void au_sfx_init(SoundManager* manager, u8 priority, u8 busId, AuGlobals* globals, u8 minVoiceIdx) {
u32 i;

View File

@ -8,8 +8,12 @@ s8 gBackroundWaveEnabled = FALSE;
s16 gBackroundTextureYOffset = 0;
f32 gBackroundWavePhase = 0.0f;
SHIFT_BSS PAL_BIN gBackgroundPalette[256];
SHIFT_BSS f32 gBackroundLastScrollValue;
BSS PAL_BIN gBackgroundPalette[256];
BSS f32 gBackroundLastScrollValue;
BSS s32 D_801595A4[3];
#if !VERSION_PAL
BSS s32 D_801595AC;
#endif
void load_map_bg(char* optAssetName) {
if (optAssetName != NULL) {

View File

@ -30,8 +30,6 @@ Gfx D_80074230[] = {
gsSPEndDisplayList(),
};
//extern s32 timeFreezeMode; // TODO bss
void gfx_init_state(void) {
gSPSegment(gMainGfxPos++, 0x00, 0x0);
gSPDisplayList(gMainGfxPos++, OS_K0_TO_PHYSICAL(D_80074230));

View File

@ -6,22 +6,22 @@
#include "sprite.h"
#include "game_modes.h"
SHIFT_BSS s32 D_800DC060;
SHIFT_BSS StageListRow* gCurrentStagePtr;
SHIFT_BSS s32 gBattleState;
SHIFT_BSS BattleStatus gBattleStatus;
SHIFT_BSS s32 gLastDrawBattleState;
SHIFT_BSS s32 D_800DC4D4;
SHIFT_BSS s32 gDefeatedBattleSubstate;
SHIFT_BSS s32 gBattleSubState;
SHIFT_BSS s32 D_800DC4E0;
SHIFT_BSS s32 gDefeatedBattleState;
SHIFT_BSS s32 gCurrentBattleID;
SHIFT_BSS s32 gCurrentStageID;
SHIFT_BSS s32 D_800DC4F0;
SHIFT_BSS Battle* gOverrideBattlePtr;
SHIFT_BSS s32 D_800DC4F8;
SHIFT_BSS Battle* gCurrentBattlePtr;
extern s32 D_800DC060;
extern StageListRow* gCurrentStagePtr;
extern s32 gBattleState;
extern BattleStatus gBattleStatus;
extern s32 gLastDrawBattleState;
extern s32 D_800DC4D4;
extern s32 gDefeatedBattleSubstate;
extern s32 gBattleSubState;
extern s32 D_800DC4E0;
extern s32 gDefeatedBattleState;
extern s32 gCurrentBattleID;
extern s32 gCurrentStageID;
extern s32 D_800DC4F0;
extern Battle* gOverrideBattlePtr;
extern s32 D_800DC4F8;
extern Battle* gCurrentBattlePtr;
// standard battle area table entry
#define BTL_AREA(id, jpName) { \

View File

@ -254,10 +254,14 @@ typedef struct PlayerCelebrationAnimOptions {
/* 0x04 */ s32 options[80];
} PlayerCelebrationAnimOptions; // size = 0x8
#ifndef NO_EXTERN_VARIABLES
extern Battle* gCurrentBattlePtr;
extern ActorOffsets bActorOffsets[];
#endif
void func_80072BCC(s32 arg0);
void load_demo_battle(u32 index);
Actor* create_actor(Formation formation);

25
src/battle/battle_bss.c Normal file
View File

@ -0,0 +1,25 @@
#define NO_EXTERN_VARIABLES
#include "common.h"
#include "battle/battle.h"
//
// battle.c bss symbols
//
BSS s32 D_800DC060;
BSS StageListRow* gCurrentStagePtr;
BSS s32 gBattleState;
BSS s32 D_800DC06C;
BSS BattleStatus gBattleStatus;
BSS s32 gLastDrawBattleState;
BSS s32 D_800DC4D4;
BSS s32 gDefeatedBattleSubstate;
BSS s32 gBattleSubState;
BSS s32 D_800DC4E0;
BSS s32 gDefeatedBattleState;
BSS s32 gCurrentBattleID;
BSS s32 gCurrentStageID;
BSS s32 D_800DC4F0;
BSS Battle* gOverrideBattlePtr;
BSS s32 D_800DC4F8;
BSS Battle* gCurrentBattlePtr;

View File

@ -0,0 +1,19 @@
#define NO_EXTERN_VARIABLES
#include "common.h"
// DON'T DARE to put include headers here containing extern declarations...
// This will ruin the ordering of bss symbols below if you care about matching.
#ifndef SHIFT
BSS PartnerStatus gPartnerStatus;
BSS s32 gSpinHistoryPosY[6];
BSS s32 gSpinHistoryPosX[6];
BSS s32 gSpinHistoryPosZ[6];
BSS StatusBar gStatusBar;
BSS PlayerStatus gPlayerStatus;
BSS PlayerSpinState gPlayerSpinState;
BSS s32 D_8010F284[3];
BSS PlayerData gPlayerData;
BSS s16 gSpinHistoryPosAngle[5];
#endif

38
src/bss/engine1_pre_bss.c Normal file
View File

@ -0,0 +1,38 @@
#define NO_EXTERN_VARIABLES
#include "common.h"
// DON'T DARE to put include headers here containing extern declarations...
// This will ruin the ordering of bss symbols below if you care about matching.
#ifndef SHIFT
BSS UNK_FUN_PTR(PulseStoneNotificationCallback);
BSS void* D_8010C924;
BSS f32 D_8010C928;
BSS s32 D_8010C92C;
BSS Npc* wPartnerNpc;
BSS Entity* TweesterTouchingPlayer;
BSS f32 PlayerNormalYaw;
BSS UNK_FUN_PTR(ISpyNotificationCallback);
BSS UNK_FUN_PTR(TalkNotificationCallback);
BSS s32 gSpinHistoryBufferPos;
BSS s32 D_8010C948;
BSS s32 NpcHitQueryBehindRightY;
BSS s32 D_8010C950;
BSS Entity* TweesterTouchingPartner;
BSS UNK_FUN_PTR(InteractNotificationCallback);
BSS s32 PrevPlayerDirection;
BSS f32 JumpedOnSwitchX;
BSS s32 D_8010C964;
BSS s32 NpcHitQueryBehindCollider;
BSS s32 PeachDisguiseNpcIndex;
BSS s32 NpcHitQueryAheadY;
BSS s32 NpcHitQueryBehindLeftY;
BSS s32 NpcHitQueryColliderID;
BSS f32 JumpedOnSwitchZ;
BSS s32 PlayerRunStateTime;
BSS f32 D_8010C984;
BSS s32 D_8010C988;
BSS s32 NpcHitQueryAheadCollider;
BSS f32 PlayerNormalPitch;
#endif

View File

@ -0,0 +1,39 @@
#define NO_EXTERN_VARIABLES
#include "common.h"
#include "model.h"
#include "overlay.h"
// DON'T DARE to put include headers here containing extern declarations...
// This will ruin the ordering of bss symbols below if you care about matching.
#ifndef SHIFT
// from audio/ambience.c
typedef struct {
/* 0x0 */ s16 flags;
/* 0x2 */ s16 fadeState;
/* 0x4 */ s32 fadeTime;
/* 0x8 */ s32 soundID;
/* 0xC */ s32 unkC;
} AmbientSoundSettings;
BSS MusicSettings gMusicSettings[2];
BSS IMG_BIN D_80159B50[0x200];
BSS Window gWindows[64];
BSS CollisionStatus gCollisionStatus;
BSS HiddenPanelsData gCurrentHiddenPanels;
BSS s32 _PLS_NAME_ME[2];
BSS TextureHandle TextureHandles[128];
BSS ScreenOverlay ScreenOverlays[2];
BSS AmbientSoundSettings AmbientSoundData;
BSS s32 CreateEntityVarArgBuffer[4];
BSS PAL_BIN D_8015C7E0[0x10];
#if VERSION_IQUE
BSS char D_8015C800[0x3C80];
#elif VERSION_JP
BSS char D_8015C800[0x2880];
#else
BSS char D_8015C800[0x7800];
#endif
BSS DisplayContext D_80164000[2];
#endif

56
src/bss/engine2_pre_bss.c Normal file
View File

@ -0,0 +1,56 @@
#define NO_EXTERN_VARIABLES
#include "common.h"
#include "model.h"
#include "hud_element.h"
// DON'T DARE to put include headers here containing extern declarations...
// This will ruin the ordering of bss symbols below if you care about matching.
#ifndef SHIFT
BSS SpriteShadingProfile* gAuxSpriteShadingProfile;
BSS s32 gHudElementsNumber;
BSS ModelCustomGfxBuilderList* gCurrentCustomModelGfxBuildersPtr;
BSS s32 D_801512BC;
BSS s32 entity_numEntities;
BSS s32 gEntityHeapBase;
BSS HudCacheEntry* gHudElementCacheTableRaster;
BSS ModelList* gCurrentModels;
BSS HudCacheEntry* gHudElementCacheTablePalette;
BSS s32 gAnimCount;
BSS s32 gMsgBGScrollAmtX;
BSS s32 D_801512DC;
BSS ModelTransformGroupList* gCurrentTransformGroups;
BSS u16 gMsgGlobalWaveCounter;
BSS ModelCustomGfxList* gCurrentCustomModelGfxPtr;
BSS s32 gLastCreatedEntityIndex;
BSS u8* gBackgroundTintModePtr;
BSS MessageImageData* gMsgVarImages[1];
BSS s32 ItemEntitiesCreated;
BSS ModelNode** gCurrentModelTreeRoot;
BSS s32 gEntityHeapBottom;
BSS s32 D_80151304;
BSS u16 gCurrentRoomDoorSounds;
BSS s32 gMsgBGScrollAmtY;
BSS s32 gEntityHideMode;
BSS u8* gHudElementCacheBuffer;
BSS s32 gEntityModelCount;
BSS u8* D_8015131C;
BSS s32 D_80151320;
BSS s32 entity_numShadows;
BSS SpriteShadingProfile* gSpriteShadingProfile;
BSS s32 isAreaSpecificEntityDataLoaded;
BSS s32 entity_updateCounter;
BSS s16 gTriggerCount;
BSS Gfx* D_80151338;
BSS s32* gHudElementCacheSize;
BSS u16 gCurrentDoorSounds;
BSS s32 D_80151344;
#if VERSION_JP
BSS s32 D_80151348[4];
#elif VERSION_PAL || VERSION_IQUE
BSS s32 D_80151348[8];
#else
BSS s32 D_80151348[12];
#endif
#endif

88
src/bss/main_post_bss.c Normal file
View File

@ -0,0 +1,88 @@
#define NO_EXTERN_VARIABLES
#include "common.h"
#include "PR/osint.h"
#include "PR/controller.h"
#include "nu/nusys.h"
#include "npc.h"
#include "effects.h"
#include "audio.h"
// DON'T DARE to put include headers here containing extern declarations...
// This will ruin the ordering of bss symbols below if you care about matching.
#ifndef SHIFT
//
// main segment COMMON/.scommon symbols
//
#if VERSION_IQUE
BSS OSIoMesg __osFlashMsg OSALIGNED(8);
#endif
BSS char wMapTexName[0x18];
BSS OSThread __osThreadSave;
BSS OSMesgQueue nuContWaitMesgQ;
BSS OSPifRam __osContPifRam BBALIGNED(16);
BSS EncounterStatus gCurrentEncounter;
BSS OSPiHandle __Dom2SpeedParam OSALIGNED(8);
BSS OSContStatus nuContStatus[NU_CONT_MAXCONTROLLERS];
BSS OSThread D_800B1B90;
BSS NUContRmbCtl nuContRmbCtl[NU_CONT_MAXCONTROLLERS];
#if VERSION_IQUE
BSS u32 __osFlashID[4] OSALIGNED(8);
#endif
BSS OSContPad nuContData[NU_CONT_MAXCONTROLLERS];
BSS Camera gCameras[4] ALIGNED(16);
BSS unsigned char D_800B32E0[0x800] ALIGNED(16);
BSS unsigned char D_800B3AE0[0x800] ALIGNED(16);
BSS CollisionData gCollisionData;
BSS OSMesgQueue nuGfxMesgQ;
BSS OSPiHandle __CartRomHandle OSALIGNED(8);
BSS OSMesgQueue __osPiAccessQueue OSALIGNED(8);
BSS EffectInstance* gEffectInstances[96] ALIGNED(8);
BSS OSPiHandle __Dom1SpeedParam OSALIGNED(8);
BSS u8 nuBootStack[0x2000] ALIGNED(8);
BSS u64 nuMainStack[NU_SC_STACK_SIZE / sizeof(u64)];
BSS u8 nuYieldBuf[NU_GFX_YIELD_BUF_SIZE];
BSS AuSynDriver auSynDriver;
BSS s32 D_800B91D0[NU_GFX_RDP_OUTPUTBUFF_SIZE / sizeof(u32)] ALIGNED(16);
#if VERSION_IQUE
BSS OSPiHandle __osFlashHandler OSALIGNED(8);
#endif
BSS CollisionData gZoneCollisionData ALIGNED(8);
#if VERSION_JP || VERSION_IQUE
BSS char wMapHitName[0x14];
#else
BSS char wMapHitName[0x18];
#endif
BSS OSMesgQueue nuSiMgrMesgQ;
BSS OSTimer __osBaseTimer;
BSS char wMapShapeName[0x18];
BSS ALHeap nuAuHeap;
#if VERSION_IQUE
BSS OSMesgQueue __osFlashMessageQ OSALIGNED(8);
#endif
BSS OSTimer __osEepromTimer;
BSS NUScTask nuGfxTask[NU_GFX_TASK_NUM];
BSS SaveGlobals gSaveGlobals;
BSS char wMapBgName[0x14];
BSS __OSInode __osPfsInodeCache OSALIGNED(8);
#if !VERSION_IQUE
BSS u8 rspbootUcodeBuffer[0x100] ALIGNED(16);
BSS char D_800D9880[0x700];
#endif
BSS __OSEventState __osEventStateTab[OS_NUM_EVENTS];
BSS OSPifRam __osPfsPifRam BBALIGNED(16);
BSS u64 D_800DA040[0x400 / sizeof(u64)];
BSS NUSched nusched;
BSS OSMesgQueue __osEepromTimerQ OSALIGNED(8);
BSS OSPfs nuContPfs[NU_CONT_MAXCONTROLLERS];
BSS OSMesgQueue nuSiMesgQ;
BSS OSMesgQueue D_800DAC90;
BSS OSMesgQueue __osSiAccessQueue OSALIGNED(8);
#ifdef BBPLAYER
BSS u8 __osBbFlashBuffer[0x80];
#endif
BSS SaveData gCurrentSaveFile;
BSS OSMesgQueue nuContDataMutexQ;
#endif

89
src/bss/main_pre_bss.c Normal file
View File

@ -0,0 +1,89 @@
#define NO_EXTERN_VARIABLES
#include "common.h"
#include "audio.h"
#include "model.h"
// DON'T DARE to put include headers here containing extern declarations...
// This will ruin the ordering of bss symbols below if you care about matching.
#ifndef SHIFT
//
// Main segment COMMON/.scommon symbols
//
BSS u8 nuScPreNMIFlag;
BSS s32 D_8009A5B4;
BSS s32 D_8009A5B8;
BSS s32 D_8009A5BC;
#if VERSION_IQUE
BSS s32 __osFlashVersion;
#endif
BSS AuGlobals* gSoundGlobals;
BSS s32 D_8009A5C4;
BSS u32 __osBaseCounter;
BSS BGMPlayer* gBGMPlayerC;
BSS s32 gEncounterSubState;
#ifdef BBPLAYER
BSS u32 __osBbRCountWraps;
#endif
BSS void *CurrentSefCmdHandler;
BSS s32 timeFreezeMode;
#ifdef BBPLAYER
BSS u32 __osBbLastRCount;
#endif
BSS u16* nuGfxZBuffer;
BSS u32 nuContDataLockKey;
BSS u32 __osViIntrCount;
BSS AuCallback BeginSoundUpdateCallback;
BSS f32 D_8009A5EC;
BSS u32 nuGfxCfbCounter;
BSS ModelTreeInfoList* gCurrentModelTreeNodeInfo;
BSS u32 nuGfxDisplay;
BSS BGMPlayer* gBGMPlayerB;
BSS s32 gEncounterState;
BSS s16 gNpcCount;
BSS u8 __osMaxControllers;
#if VERSION_IQUE
BSS OSMesg __osFlashMsgBuf;
#endif
BSS OSTime __osCurrentTime;
BSS NUUcode* nuGfxUcode;
BSS u32 nuContNum;
#ifdef BBPLAYER
BSS u32 __osBbLastVCount;
#endif
BSS volatile u32 nuGfxTaskSpool;
BSS u8 __osContLastCmd;
BSS OSMesg __osEepromTimerMsg;
BSS s32 D_8009A624;
BSS AmbienceManager* gAuAmbienceManager;
BSS u32 __osTimerCounter;
BSS void (*nuIdleFunc)(void);
BSS s16 gCurrentCamID;
BSS OSPiHandle* nuPiCartHandle;
#ifdef BBPLAYER
BSS u32 __osBbVCountWraps;
#endif
BSS s8 D_8009A63C;
BSS SoundManager* gSoundManager;
BSS s32 D_8009A644;
BSS s32 D_8009A648;
BSS u16* nuGfxCfb_ptr;
BSS s32 gOverrideFlags;
BSS s8 HasPreBattleSongPushed;
BSS u16** nuGfxCfb;
BSS s32 D_8009A65C;
BSS u32 __osFinalrom;
BSS BGMPlayer* gBGMPlayerA;
BSS s16 gFirstStrikeMessagePos;
BSS Gfx* gMainGfxPos;
BSS s8 D_8009A670;
BSS DisplayContext* gDisplayContext;
BSS s32 D_8009A678;
BSS s32 D_8009A67C;
#if VERSION_IQUE
BSS s32 D_80099258[2];
#endif
BSS u16* ResetFrameBufferArray;
#endif

View File

@ -8,12 +8,12 @@ void render_models(void);
void execute_render_tasks(void);
void render_item_entities(void);
SHIFT_BSS f32 D_8009A5EC;
SHIFT_BSS s16 gCurrentCamID;
SHIFT_BSS u16* nuGfxCfb_ptr;
SHIFT_BSS Gfx* gMainGfxPos;
SHIFT_BSS DisplayContext* gDisplayContext;
SHIFT_BSS Camera gCameras[4];
f32 D_8009A5EC;
s16 gCurrentCamID;
u16* nuGfxCfb_ptr;
Gfx* gMainGfxPos;
DisplayContext* gDisplayContext;
Camera gCameras[4];
void update_cameras(void) {
s32 i;

View File

@ -1,11 +1,11 @@
#include "common.h"
SHIFT_BSS CamConfiguration gCurrentCamConfiguration;
SHIFT_BSS f32 D_800A08DC;
SHIFT_BSS f32 D_800A08E0;
SHIFT_BSS f32 D_800A08E4;
SHIFT_BSS f32 D_800A08E8;
SHIFT_BSS f32 D_800A08EC;
BSS CamConfiguration gCurrentCamConfiguration;
BSS f32 D_800A08DC;
BSS f32 D_800A08E0;
BSS f32 D_800A08E4;
BSS f32 D_800A08E8;
BSS f32 D_800A08EC;
void cam_interp_lookat_pos(Camera* camera, f32 arg1, f32 arg2, s16 arg3);
void func_8003034C(Camera* camera);

View File

@ -32,23 +32,24 @@ typedef struct HitAssetCollider {
/* 0x08 */ s32 trianglesOffset;
} HitAssetCollider; // size = 0x0C
SHIFT_BSS CollisionData gCollisionData;
SHIFT_BSS CollisionData gZoneCollisionData;
SHIFT_BSS f32 gCollisionRayStartX;
SHIFT_BSS f32 gCollisionRayStartY;
SHIFT_BSS f32 gCollisionRayStartZ;
SHIFT_BSS f32 gCollisionRayDirX;
SHIFT_BSS f32 gCollisionRayDirY;
SHIFT_BSS f32 gCollisionRayDirZ;
SHIFT_BSS f32 gCollisionPointX;
SHIFT_BSS f32 gCollisionPointY;
SHIFT_BSS f32 gCollisionPointZ;
SHIFT_BSS f32 gCollisionRayLength;
SHIFT_BSS f32 gCollisionNormalX;
SHIFT_BSS f32 gCollisionNormalY;
SHIFT_BSS f32 gCollisionNormalZ;
SHIFT_BSS ColliderBackupEntry* gCollisionDataBackup;
SHIFT_BSS ColliderBackupEntry* gCollisionDataZoneBackup;
CollisionData gCollisionData;
CollisionData gZoneCollisionData;
BSS f32 gCollisionRayStartX;
BSS f32 gCollisionRayStartY;
BSS f32 gCollisionRayStartZ;
BSS f32 gCollisionRayDirX;
BSS f32 gCollisionRayDirY;
BSS f32 gCollisionRayDirZ;
BSS f32 gCollisionPointX;
BSS f32 gCollisionPointY;
BSS f32 gCollisionPointZ;
BSS f32 gCollisionRayLength;
BSS f32 gCollisionNormalX;
BSS f32 gCollisionNormalY;
BSS f32 gCollisionNormalZ;
BSS ColliderBackupEntry* gCollisionDataBackup;
BSS ColliderBackupEntry* gCollisionDataZoneBackup;
extern Vec3s gEntityColliderFaces[];
extern Vec3f gEntityColliderNormals[];

View File

@ -15,7 +15,7 @@ typedef struct {
/* 0x9D2 */ u16 height;
} CrashScreen; // size = 0x9D4
SHIFT_BSS CrashScreen gCrashScreen;
BSS CrashScreen gCrashScreen;
u8 gCrashScreencharToGlyph[128] = {
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,

View File

@ -202,12 +202,12 @@ Gfx NoControllerGfx[] = {
gsSPEndDisplayList(),
};
SHIFT_BSS Mtx D_8009BAA8[2];
SHIFT_BSS f32 gCurtainScale;
SHIFT_BSS f32 gCurtainScaleGoal;
SHIFT_BSS f32 gCurtainFade;
SHIFT_BSS f32 gCurtainFadeGoal;
SHIFT_BSS UNK_FUN_PTR(gCurtainDrawCallback);
BSS f32 gCurtainScale;
BSS f32 gCurtainScaleGoal;
BSS f32 gCurtainFade;
BSS f32 gCurtainFadeGoal;
BSS UNK_FUN_PTR(gCurtainDrawCallback);
BSS Mtx D_8009BAA8[2];
void initialize_curtains(void) {
gCurtainDrawCallback = NULL;

View File

@ -13,7 +13,7 @@ typedef struct DefaultWindowStyle {
} DefaultWindowStyle; // size = 0x0B
#define BOX_QUAD_BUFFER_NUM 21
SHIFT_BSS Vtx gBoxQuadBuffer[BOX_QUAD_BUFFER_NUM][16];
BSS Vtx gBoxQuadBuffer[BOX_QUAD_BUFFER_NUM][16];
DefaultWindowStyle gBoxDefaultStyles[] = {
{