Shiftable BSS (#1092)

* Shiftable BSS

* osFlash cleanup

* Fix warning

* PRomment

* fixes

* gulp

* yummy

* more

* more

* more alignment

* oopth

* fix budges

* Several budges

* more

* more budges

* fix black screen before "today..."

* final cleanup
This commit is contained in:
Ethan Roseman 2023-07-22 01:53:09 +09:00 committed by GitHub
parent e6b5b033a5
commit d516801b5f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
84 changed files with 753 additions and 960 deletions

View File

@ -63,7 +63,7 @@ typedef struct {
u32 sectorSize; /* size of transfering sector */
u32 C1ErrNum; /* total # of C1 errors */
u32 C1ErrSector[4]; /* error sectors */
} __OSBlockInfo;
} __OSBlockInfo; // size = 0x24
typedef struct {
u32 cmdType; /* for disk only */
@ -74,7 +74,7 @@ typedef struct {
u32 bmCtlShadow; /* asic bm_ctl(510) register shadow ram */
u32 seqCtlShadow; /* asic seq_ctl(518) register shadow ram */
__OSBlockInfo block[2]; /* bolck transfer info */
} __OSTranxInfo;
} __OSTranxInfo; // size = 0x60
typedef struct OSPiHandle_s {
@ -89,7 +89,7 @@ typedef struct OSPiHandle_s {
u32 speed; /* for roms only */
/* The following are "private" elements" */
__OSTranxInfo transferInfo; /* for disk only */
} OSPiHandle;
} OSPiHandle; // size = 0x74
typedef struct {
u8 type;

View File

@ -3058,7 +3058,7 @@ EffectInstance* huff_puff_breath_main(s32, f32, f32, f32, f32, f32, f32, s32);
EffectInstance* cold_breath_main(s32, f32, f32, f32, f32, s32);
EffectInstance* embers_main(s32, f32, f32, f32, f32, f32, f32, s32, s32, f32, f32);
EffectInstance* hieroglyphs_main(s32, f32, f32, f32, f32, s32);
EffectInstance *misc_particles_main(s32, f32, f32, f32, f32, f32, f32, s32, s32);
EffectInstance* misc_particles_main(s32, f32, f32, f32, f32, f32, f32, s32, s32);
EffectInstance* static_status_main(s32, f32, f32, f32, f32, s32, s32);
EffectInstance* moving_cloud_main(s32, f32, f32, f32, f32, f32, f32, f32, f32);
EffectInstance* effect_75_main(s32, f32, f32, f32, f32, s32);

View File

@ -13,51 +13,26 @@ extern GameStatus gGameStatus;
extern GameStatus* gGameStatusPtr;
extern u32 gRandSeed;
extern ItemData gItemTable[365];
extern UNK_FUN_PTR(gCurrentUpdateFunction);
extern MoveData gMoveTable[185];
extern s32 gBattleState;
extern BattleStatus gBattleStatus;
extern s32 gLastDrawBattleState;
extern s32 D_800DC4D4;
extern s32 gDefeatedBattleSubstate;
extern s32 gBattleSubState;
extern s32 gDefeatedBattleState;
extern s32 gCurrentBattleID;
extern s32 D_800DC4E0;
extern s32 gCurrentStageID;
extern s32 D_800DC4F0;
extern struct Battle* gOverrideBattlePtr;
extern s32 D_800DC4F8;
extern s32 D_802DAC98;
extern EntityList gWorldEntityList;
extern EntityList gBattleEntityList;
extern EntityList* gCurrentEntityListPtr;
extern WorkerList gWorldWorkerList;
extern WorkerList gBattleWorkerList;
extern WorkerList* gCurrentWorkerListPtr;
extern NpcList gWorldNpcList;
extern NpcList gBattleNpcList;
extern NpcList* gCurrentNpcListPtr;
extern ShadowList gWorldShadowList;
extern ShadowList gBattleShadowList;
extern ShadowList* gCurrentShadowListPtr;
extern Camera gCameras[4];
extern s32 gCurrentCameraID;
extern CollisionData gCollisionData;
extern s8 D_800A0900;
extern f32 GravityParamsStartFall[];
extern s16 FootstepSoundSelector;
extern u8* gBackgroundFogModePtr;
extern u16 gCurrentRoomDoorSounds;
extern s32 gEntityHideMode;
extern s32 D_8010C92C;
@ -73,56 +48,16 @@ extern f32 D_800F7B74;
extern CollisionData gZoneCollisionData;
// Animation related
extern AnimatedMeshList* gCurrentAnimMeshListPtr;
extern PartnerAnimations gPartnerAnimations[12];
// Triggers
extern s16 gTriggerCount;
extern TriggerList wTriggerList;
extern TriggerList bTriggerList;
extern TriggerList* gCurrentTriggerListPtr;
// Map transition data. Should probably be a struct
extern s16 gMapTransitionAlpha;
extern s8 D_800A0930;
extern s8 D_800A0931;
extern s16 D_800A0932[1];
extern s16 gMapTransitionFadeRate;
extern s16 gMapTransitionState;
extern s16 gMapTransitionStateTime;
extern s16 gLoadedFromFileSelect;
extern s16 D_800A0954;
extern s16 D_800A0956;
extern s16 D_800A0958;
extern s16 D_800A095A;
extern u8 D_800A095B;
extern s16 D_800A095C;
extern u8 D_800A095D;
extern s16 D_800A095E;
extern u8 D_800A095F;
extern s32 D_800A0960;
extern s32 D_800A0964;
extern s8 gNpcPlayerCollisionsEnabled;
extern s16 D_800A0BB8;
extern SpriteShadingProfile* gAuxSpriteShadingProfile;
extern SpriteShadingProfile* gSpriteShadingProfile;
extern Window gWindows[64];
extern s32 gEncounterState;
extern s16 gNpcCount;
extern s32 gOverrideFlags;
extern s16 D_8009A6A0;
extern s16 D_8009A6A2;
extern s16 D_8009A6A4;
extern s16 D_8009A6A6;
extern s8 D_800A0920;
extern s32 SavedReverbMode;
extern s8 D_800A0921;
extern s16 D_800A0922;
extern char wMapTexName[];
extern char wMapHitName[];
extern char wMapShapeName[];
@ -130,22 +65,13 @@ extern char wMapBgName[];
extern u8 D_802D9D70; // player alpha1 copy?
extern u8 D_802D9D71; // player alpha2 copy?
extern DisplayContext D_80164000[];
extern DisplayContext D_80164000[2];
extern WindowStyle gWindowStyles[];
extern MessagePrintState gMessagePrinters[3];
extern f32 gCurtainScale;
extern f32 gCurtainScaleGoal;
extern f32 gCurtainFade;
extern f32 gCurtainFadeGoal;
extern UNK_FUN_PTR(gCurtainDrawCallback);
extern u16 gCurrentDoorSounds;
extern u16 gCurrentRoomDoorSounds;
extern UNK_TYPE D_800E92D8;
extern UNK_TYPE D_80147574;
extern b8 D_8014C248;
extern UNK_FUN_PTR(TalkNotificationCallback);
@ -159,7 +85,6 @@ extern Entity* TweesterTouchingPlayer;
extern s32 PrevPlayerDirection;
extern s32 PeachDisguiseNpcIndex;
extern s32 D_8010C980;
extern s32 D_8010C9A0;
extern s32 PrevPlayerCamRelativeYaw;
extern s32 D_800F7B44;
extern f32 D_8010C938;
@ -174,25 +99,14 @@ extern s32 timeFreezeMode;
extern s32 D_8009A678;
extern u8 D_800779B0;
extern u32 D_80078174;
extern s32 D_8008EEC0[12]; // partner IDs
extern u8 D_800A0963;
extern s32 D_802EA310[];
extern s32 Entity_WoodenCrate_RenderShatteredScript[];
// Scripts
extern EvtScript EVS_NpcDefeat;
extern EvtScript ShakeCam1;
extern EvtScript ShakeCamX;
extern MusicSettings gMusicSettings[4];
// OS
extern OSThread IdleThread; // idle thread, id 1
extern OSThread MainThread; // id 3
extern OSDevMgr __osPiDevMgr;
extern MusicSettings gMusicSettings[2];
// gfx
extern DisplayContext* gDisplayContext;
@ -200,20 +114,6 @@ extern Gfx* gMainGfxPos;
extern u16 gMatrixListPos;
extern s32 gCurrentDisplayContextIndex;
extern s32 D_80291FA8[];
extern s32 D_80291FD0[];
extern s32 D_80291FF8[];
extern s32 D_80292020[];
extern s32 D_80292048[];
extern s32 D_80292070[];
extern s32 D_80292098[];
extern s32 D_802920C0[];
extern s32 D_802920E8[];
extern s32 D_80292110[];
extern AnimID KoopatrolDisguiseExtraAnims[];
extern AnimID HammerBroDisguiseExtraAnims[];
extern s16 gCurrentCamID;
extern s32 D_8029C890[10][5];
@ -224,39 +124,6 @@ extern u32 bMarioIdleAnims[];
extern s32 bMarioDefendAnims[];
extern s32 bPeachIdleAnims[];
extern s32 D_802EBFF0[];
extern s32 D_802EC010[];
extern s32 D_802EC030[];
extern s32 D_802EC050[];
extern s32 D_802EC070[];
extern s32 D_802EC090[];
extern s32 D_802EC0B0[];
extern s32 D_802EC0D0[];
extern s32 D_802EC0F0[];
extern s32 D_802EC110[];
extern s32 D_802EC130[];
extern s32 D_802EC150[];
extern s32 D_802EC170[];
extern s32 D_802EC190[];
extern s32 D_802EC1B0[];
extern s32 D_802EC1D0[];
extern s32 D_802EC1F0[];
extern s32 D_802EC210[];
extern s32 D_802EC230[];
extern s32 D_802EC250[];
extern s32 D_802EC270[];
extern s32 D_802EC290[];
extern s32 D_802EC2B0[];
extern s32 D_802EC2D0[];
extern s32 D_802EC2F0[];
extern s32 D_802EC310[];
extern s32 D_802EC330[];
extern s32 D_802EC350[];
extern s32 D_802EC370[];
extern s32 D_802EC390[];
extern s32 D_802EC3B0[];
extern s32 D_802EC3D0[];
extern PartnerStatus gPartnerStatus;
extern UiStatus gUIStatus;
extern PlayerStatus gPlayerStatus;

View File

@ -1,6 +1,12 @@
#include "common.h"
#include "nu/nusys.h"
SHIFT_BSS s16 gMapTransitionAlpha;
SHIFT_BSS s16 gMapTransitionFadeRate;
SHIFT_BSS s16 gMapTransitionState;
SHIFT_BSS s16 gMapTransitionStateTime;
SHIFT_BSS s16 gLoadedFromFileSelect;
void set_map_change_fade_rate(s16 fadeRate) {
gMapTransitionFadeRate = fadeRate;
}

View File

@ -831,11 +831,11 @@ void tattle_cam_pre_render(Camera* camera) {
gSPClipRatio(gMainGfxPos++, FRUSTRATIO_2);
gDPPipeSync(gMainGfxPos++);
gDPSetCycleType(gMainGfxPos++, G_CYC_FILL);
gDPSetColorImage(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 320, osVirtualToPhysical(nuGfxZBuffer));
gDPSetColorImage(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, osVirtualToPhysical(nuGfxZBuffer));
gDPSetFillColor(gMainGfxPos++, PACK_FILL_DEPTH(G_MAXFBZ, 0));
gDPFillRectangle(gMainGfxPos++, cam->viewportStartX, cam->viewportStartY, cam->viewportStartX + cam->viewportW - 1, cam->viewportStartY + cam->viewportH - 1);
gDPPipeSync(gMainGfxPos++);
gDPSetColorImage(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 320, osVirtualToPhysical(nuGfxCfb_ptr));
gDPSetColorImage(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, osVirtualToPhysical(nuGfxCfb_ptr));
if (!(gGameStatusPtr->backgroundFlags & BACKGROUND_FLAG_TEXTURE)) {
gDPSetCycleType(gMainGfxPos++, G_CYC_FILL);

View File

@ -2666,7 +2666,6 @@ PartnerDMAData bPartnerDmaTable[] = {
BATTLE_PARTNER_ENTRY(twink, 30),
};
// BSS
BSS PopupMessage popupMessages[32];
BSS s16 D_8029F640;
BSS s16 D_8029F642;

View File

@ -17,9 +17,14 @@
#define i_spy_VRAM_DEF (void*)0x802B7000
#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;
extern f32 D_800F7B48;
extern s32 D_800F7B4C;
extern s8 D_8015A57A;
extern s32 WorldTattleInteractionID;
s32 player_raycast_down(f32*, f32*, f32*, f32*);
@ -997,7 +1002,7 @@ void player_render_interact_prompts(void) {
void check_for_ispy(void) {
PlayerStatus* playerStatus = &gPlayerStatus;
if (D_8015A57A != 0 && ISpyNotificationCallback == NULL) {
if (gCurrentHiddenPanels.activateISpy && ISpyNotificationCallback == NULL) {
if (!(playerStatus->animFlags &
(PA_FLAG_SPEECH_PROMPT_AVAILABLE | PA_FLAG_INTERACT_PROMPT_AVAILABLE))) {
dma_copy(i_spy_ROM_START, i_spy_ROM_END, i_spy_VRAM_DEF);

View File

@ -1,5 +1,15 @@
#include "common.h"
SHIFT_BSS s32 PeachDisguiseNpcIndex;
SHIFT_BSS Entity* TweesterTouchingPartner;
SHIFT_BSS Entity* TweesterTouchingPlayer;
SHIFT_BSS s32 PrevPlayerDirection;
SHIFT_BSS s32 D_8010C980;
SHIFT_BSS f32 D_8010C938;
SHIFT_BSS f32 D_8010C990;
SHIFT_BSS PlayerSpinState gPlayerSpinState;
SHIFT_BSS s32 D_8010C9A0;
void update_player_input(void) {
PlayerStatus* playerStatus = &gPlayerStatus;
s32 inputBufPos = playerStatus->inputBufPos;

View File

@ -13,14 +13,15 @@
#define PLAYER_ACTION_VRAM_DEF (void*) 0x802B6000
#endif
extern void* D_8010C924;
extern s32 D_8010C964;
extern s32 gSpinHistoryBufferPos;
extern s16 D_8010C9B0;
extern s32 gSpinHistoryPosY[5];
extern s32 gSpinHistoryPosX[5];
extern s32 gSpinHistoryPosZ[5];
extern s16 gSpinHistoryPosAngle[5];
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 func_800E5520(void) {
D_8010C9B0 = 0;

View File

@ -2,11 +2,13 @@
#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;
extern f32 GravityParamsStartJump[];
extern f32 D_8010C928;
extern f32 JumpedOnSwitchX;
extern f32 JumpedOnSwitchZ;
extern f32 D_8010C984;
s32 collision_check_player_intersecting_world(s32 mode, s32 arg1, f32 yaw);
s32 phys_check_interactable_collision(void);

View File

@ -1,6 +1,8 @@
#include "common.h"
#include "hud_element.h"
SHIFT_BSS UiStatus gUIStatus;
extern HudScript* TimesHudScript;
extern HudScript* SPIncrementHudScripts[];
extern HudScript* SPStarHudScripts[];

View File

@ -4,12 +4,17 @@
#include "hud_element.h"
#include "camera.h"
//extern f32 D_8009A5EC; TODO BSS
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];
void update_cameras(void) {
s32 i;

View File

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

View File

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

View File

@ -51,46 +51,46 @@ s16 PopupContentScissorWidths[] = {
[POPUP_MENU_POST_OFFICE] 137,
};
extern s32 gPopupState;
extern s32 D_8010D644;
extern s32 PopupMenu_SelectedIndex;
extern s32 PopupMenu_PrevSelectedIndex;
extern s32 PopupMenu_Alpha;
extern s8 PopupMenu_FirstDisplayIndex;
extern s8 PopupMenu_LastDisplayIndex;
extern s8 PopupMenu_DisplayedEntryCount;
extern s16 D_8010D658;
extern s16 D_8010D65A;
extern s32 PopupMenu_EmptybarHEID;
extern s32 PopupMenu_TitleIconHEID;
extern s32 PopupMenu_TimesHEID;
extern s32 PopupMenu_PartnerLevelHEID;
extern s32 PopupMenu_CursorHEID;
extern s32 PopupMenu_UpArrowHEID;
extern s32 PopupMenu_DownArrowHEID;
extern s32 PopupMenu_EntryIconHEID;
extern s16 D_8010D67C;
extern s16 D_8010D67E;
extern s16 D_8010D680;
extern s16 D_8010D682;
extern s16 D_8010D684;
extern s16 D_8010D686;
extern s16 PopupMenu_StarPieceCounterPosX;
extern s16 PopupMenu_StarPieceCounterPosY;
extern s16 D_8010D68C;
extern s8 PopupNotBattle;
extern s8 PopupMenu_MaxDisplayableEntryCount;
extern s8 D_8010D690;
extern s8 D_8010D691;
extern s8 D_8010D692;
extern s8 D_8010D693;
extern s32 gPopupWorker;
extern s8 PopupNotDipping;
extern s8 PopupDipMode;
extern s8 D_8010D69A;
extern PopupMenu* gPopupMenu;
extern MessagePrintState* D_8010D6A0;
extern s32 D_8010D6A4;
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 D_8010D69A;
SHIFT_BSS PopupMenu* gPopupMenu;
SHIFT_BSS MessagePrintState* D_8010D6A0;
SHIFT_BSS s32 D_8010D6A4;
s8 func_800E98D4(void);

View File

@ -1,11 +1,11 @@
#include "common.h"
extern CamConfiguration gCurrentCamConfiguration;
extern f32 D_800A08DC;
extern f32 D_800A08E0;
extern f32 D_800A08E4;
extern f32 D_800A08E8;
extern f32 D_800A08EC;
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;
void cam_interp_lookat_pos(Camera* camera, f32 arg1, f32 arg2, s16 arg3);
void func_8003034C(Camera* camera);

View File

@ -2,13 +2,6 @@
#include "animation_script.h"
#include "model.h"
AnimScript gAnimScriptDefault = {
AS_WAIT, 60,
AS_END,
};
extern s32 gAnimCount;
typedef struct DisplayListBufferHandle {
/* 0x0 */ s32 ttl;
/* 0x4 */ void* addr;
@ -16,23 +9,25 @@ typedef struct DisplayListBufferHandle {
typedef DisplayListBufferHandle AnimatedMeshVertexCopyList[0x60];
extern AnimatedMeshVertexCopyList D_801533C0;
extern AnimatedMeshVertexCopyList D_801536C0;
extern AnimatedMeshList D_801539C0;
extern AnimatedMeshList D_80153A00;
extern s32 gAnimModelFogEnabled;
extern s32 gAnimModelFogR;
extern s32 gAnimModelFogG;
extern s32 gAnimModelFogB;
extern s32 gAnimModelFogA;
extern s32 gAnimModelFogStart;
extern s32 gAnimModelFogEnd;
extern s32 gAnimVtxSegment;
extern Matrix4f gAnimRotMtx;
extern Matrix4f gAnimScaleMtx;
extern Matrix4f gAnimTranslateMtx;
extern Matrix4f gAnimRotScaleMtx;
extern StaticAnimatorNode** gAnimTreeRoot;
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;
extern Gfx D_8014B7F8[];
extern Gfx D_8014B820[];
@ -49,6 +44,11 @@ extern Gfx D_8014BF18[];
extern Gfx D_8014BF40[];
extern Gfx D_8014BF68[];
AnimScript gAnimScriptDefault = {
AS_WAIT, 60,
AS_END,
};
void appendGfx_animator_node(ModelAnimator*, AnimatorNode*, Matrix4f);
// copy Vtx array from node->fcData.vtxList, but overwrite xyz coordinates with ones from buffer

View File

@ -29,27 +29,27 @@ extern HudCacheEntry* gHudElementCacheTablePalette;
extern u8* gHudElementCacheBuffer;
extern s32* gHudElementCacheSize;
extern s32 ItemEntitiesCreated;
extern s32 D_80155D80;
extern s32 ItemEntityAlternatingSpawn;
extern s32 ItemEntityRenderGroup;
extern s16 D_80155D8C;
extern s16 D_80155D8E;
extern s16 D_80155D90;
extern ItemEntity* WorldItemEntities[MAX_ITEM_ENTITIES];
extern ItemEntity* BattleItemEntities[MAX_ITEM_ENTITIES];
extern ItemEntity** gCurrentItemEntities;
extern s16 isPickingUpItem;
extern s16 D_801565A6;
extern s16 D_801565A8; // some hack relating to kooper item pickups
extern PopupMenu D_801565B0;
extern s32 ItemPickupIconID;
extern s32 ItemPickupStateDelay;
extern s32 D_801568E8;
extern s32 D_801568EC;
extern EffectInstance* ItemPickupGotOutline;
extern MessagePrintState* GotItemTutorialPrinter;
extern b32 GotItemTutorialClosed;
SHIFT_BSS s32 ItemEntitiesCreated;
SHIFT_BSS s32 D_80155D80;
SHIFT_BSS s32 ItemEntityAlternatingSpawn;
SHIFT_BSS s32 ItemEntityRenderGroup;
SHIFT_BSS s16 D_80155D8C;
SHIFT_BSS s16 D_80155D8E;
SHIFT_BSS s16 D_80155D90;
SHIFT_BSS ItemEntity* WorldItemEntities[MAX_ITEM_ENTITIES];
SHIFT_BSS ItemEntity* BattleItemEntities[MAX_ITEM_ENTITIES];
SHIFT_BSS ItemEntity** gCurrentItemEntities;
SHIFT_BSS s16 isPickingUpItem;
SHIFT_BSS s16 D_801565A6;
SHIFT_BSS s16 D_801565A8; // some hack relating to kooper item pickups
SHIFT_BSS PopupMenu D_801565B0;
SHIFT_BSS s32 ItemPickupIconID;
SHIFT_BSS s32 ItemPickupStateDelay;
SHIFT_BSS s32 D_801568E8;
SHIFT_BSS s32 D_801568EC;
SHIFT_BSS EffectInstance* ItemPickupGotOutline;
SHIFT_BSS MessagePrintState* GotItemTutorialPrinter;
SHIFT_BSS b32 GotItemTutorialClosed;
void item_entity_update(ItemEntity*);
void appendGfx_item_entity(void*);

View File

@ -1214,20 +1214,10 @@ extern u8 AuSynStereoDirty;
extern AuGlobals* gSoundGlobals;
extern BGMPlayer* gBGMPlayerC;
extern BGMPlayer* gBGMPlayerB;
extern AuCallback BeginSoundUpdateCallback;
extern AmbienceManager* gAuAmbienceManager;
extern SoundManager* gSoundManager;
extern BGMPlayer* gBGMPlayerA;
extern u16 AuInitialGlobalVolume;
extern s16* AuDelayBufferMain;
extern s16* AuDelayBufferAux;
extern s32 AuDelayCounter;
extern u8 AuDelayedVoiceGroup;
extern s16 AuDelayedChannel;
extern s32 AuDelayCount;
#include "audio/private.h"
#endif

View File

@ -12,23 +12,27 @@ u32 nuAuFrameCounter = 0;
u8 nuAuTaskStop = NU_AU_TASK_RUN;
u8 volatile AuSynUseStereo = TRUE;
//bss
extern Acmd* AlCmdListBuffers[3];
extern NUScTask nuAuTasks[3];
extern u8* D_800A3628[3];
extern s32 AlFrameSize;
extern s32 AlMinFrameSize;
extern OSMesgQueue nuAuDmaMesgQ;
extern OSMesg nuAuDmaMesgBuf[50];
extern OSIoMesg nuAuDmaIOMesgBuf[];
extern NUDMABuffer nuAuDmaBufList[50];
extern AuSynDriver auSynDriver;
extern u64 rspbootUcodeBuffer[];
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;
extern u64 n_aspMain_text_bin[];
extern u64 n_aspMain_data_bin[];
extern u8 AuHeapBase[AUDIO_HEAP_SIZE];
extern u64 AuStack[NU_AU_STACK_SIZE / sizeof(u64)];
void create_audio_system(void) {
u32 i;
@ -61,7 +65,7 @@ void create_audio_system(void) {
nuAuTasks[i].list.t.ucode_boot = (u64*) rspbootTextStart;
nuAuTasks[i].list.t.ucode_boot_size = (u32) rspbootTextEnd - (u32) rspbootTextStart;
#else
nuAuTasks[i].list.t.ucode_boot = rspbootUcodeBuffer;
nuAuTasks[i].list.t.ucode_boot = (u64*) rspbootUcodeBuffer;
nuAuTasks[i].list.t.ucode_boot_size = 0x100;
#endif
nuAuTasks[i].list.t.ucode = n_aspMain_text_bin;

View File

@ -1,13 +1,20 @@
#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;
// data
extern u16 D_80078530[9];
extern u8 EnvelopePressDefault[];
extern u8 EnvelopeReleaseDefault[];
extern f32 AlTuneScaling[];
#ifdef SHIFT
#define SBN_ROM_OFFSET (s32) SBN_ROM_START
#elif VERSION_JP

View File

@ -4,6 +4,13 @@
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;
AuSynDriver* gActiveSynDriverPtr = NULL;
AuSynDriver* gSynDriverPtr = NULL;
u8 AuUseGlobalVolume = FALSE;

View File

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

View File

@ -5,10 +5,11 @@ void bgm_update_volume(void);
void bgm_set_target_volume(s16 volume);
// these are BSS
extern s16 MusicDefaultVolume;
extern s16 MusicMaxVolume;
extern s16 MusicCurrentVolume;
extern s16 MusicTargetVolume;
SHIFT_BSS s16 MusicDefaultVolume;
SHIFT_BSS s16 MusicMaxVolume;
SHIFT_BSS s16 MusicCurrentVolume;
SHIFT_BSS s16 MusicTargetVolume;
SHIFT_BSS MusicSettings gMusicSettings[2];
MusicSettings BlankMusicSettings = {
.flags = 0,
@ -62,7 +63,7 @@ s32 bgm_get_map_default_variation(s32 songID) {
void bgm_reset_sequence_players(void) {
s32 i;
for (i = 0; i < 2; i++) {
for (i = 0; i < ARRAY_COUNT(gMusicSettings); i++) {
gMusicSettings[i] = BlankMusicSettings;
}
@ -79,7 +80,7 @@ void bgm_reset_volume(void) {
//TODO refactor out constants
void bgm_update_music_settings(void) {
MusicSettings* music = gMusicSettings;
MusicSettings* music = &gMusicSettings[0];
s32 i = 0;
s16 state2 = 2;
s16 flag4 = MUSIC_SETTINGS_FLAG_4;

View File

@ -3,6 +3,9 @@
#define MAX_SOUND_INSTANCES 10
SHIFT_BSS u16 gCurrentDoorSounds;
SHIFT_BSS u16 gCurrentRoomDoorSounds;
// sound IDs
s32 LoopingSounds[] = {
SOUND_287, SOUND_2A8, SOUND_54, SOUND_56, SOUND_24, SOUND_27, SOUND_21, SOUND_22, SOUND_349,
@ -205,10 +208,10 @@ s32 OpenCloseSounds[][2] = {
{ SOUND_20A3, SOUND_20A4 },
};
extern SoundInstance wEnvSounds[MAX_SOUND_INSTANCES];
extern SoundInstance bEnvSounds[MAX_SOUND_INSTANCES];
extern SoundInstance* gCurrentEnvSounds;
extern s32 SfxReverbMode;
SHIFT_BSS SoundInstance wEnvSounds[MAX_SOUND_INSTANCES];
SHIFT_BSS SoundInstance bEnvSounds[MAX_SOUND_INSTANCES];
SHIFT_BSS SoundInstance* gCurrentEnvSounds;
SHIFT_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,8 @@ f32 AlTuneScaling[] = {
extern s32* AU_FX_CUSTOM_PARAMS[0]; // points to 80078290
extern void (*CurrentSeqCmdHandler)(BGMPlayer*, BGMPlayerTrack*);
extern void (*CurrentSefCmdHandler)(SoundManager*, SoundPlayer*);
SHIFT_BSS void (*CurrentSeqCmdHandler)(BGMPlayer*, BGMPlayerTrack*);
SHIFT_BSS void (*CurrentSefCmdHandler)(SoundManager*, SoundPlayer*);
void au_sfx_init(SoundManager* manager, u8 priority, u8 busId, AuGlobals* globals, u8 minVoiceIdx) {
u32 i;

View File

@ -8,9 +8,8 @@ s8 gBackroundWaveEnabled = FALSE;
s16 gBackroundTextureYOffset = 0;
f32 gBackroundWavePhase = 0.0f;
// BSS
extern PAL_BIN gBackgroundPalette[256];
extern f32 gBackroundLastScrollValue;
SHIFT_BSS PAL_BIN gBackgroundPalette[256];
SHIFT_BSS f32 gBackroundLastScrollValue;
void load_map_bg(char* optAssetName) {
if (optAssetName != NULL) {

View File

@ -5,8 +5,22 @@
#include "hud_element.h"
#include "sprite.h"
extern s32 D_800DC060;
extern StageListRow* gCurrentStagePtr;
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;
// standard battle area table entry
#define BTL_AREA(id, jpName) { \

View File

@ -1,13 +1,12 @@
#include "common.h"
#include "overlay.h"
// BSS
extern s32 screen_overlay_frontType;
extern f32 screen_overlay_frontZoom;
extern s32 screen_overlay_backType;
extern f32 screen_overlay_backZoom;
extern s32 D_80156910;
extern ScreenOverlay ScreenOverlays[2];
SHIFT_BSS s32 screen_overlay_frontType;
SHIFT_BSS f32 screen_overlay_frontZoom;
SHIFT_BSS s32 screen_overlay_backType;
SHIFT_BSS f32 screen_overlay_backZoom;
SHIFT_BSS s32 D_80156910;
SHIFT_BSS ScreenOverlay ScreenOverlays[2];
ScreenTransition CurrentScreenTransition = TRANSITION_END_DEMO_SCENE_BLACK;

View File

@ -32,23 +32,26 @@ 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;
extern Vec3s gEntityColliderFaces[];
extern Vec3f gEntityColliderNormals[];
extern f32 gCollisionRayStartX;
extern f32 gCollisionRayStartY;
extern f32 gCollisionRayStartZ;
extern f32 gCollisionRayDirX;
extern f32 gCollisionRayDirY;
extern f32 gCollisionRayDirZ;
extern f32 gCollisionPointX;
extern f32 gCollisionPointY;
extern f32 gCollisionPointZ;
extern f32 gCollisionRayLength;
extern f32 gCollisionNormalX;
extern f32 gCollisionNormalY;
extern f32 gCollisionNormalZ;
extern ColliderBackupEntry* gCollisionDataBackup;
extern ColliderBackupEntry* gCollisionDataZoneBackup;
s32 collision_heap_create(void);
void* collision_heap_malloc(s32 size);

View File

@ -14,7 +14,7 @@ typedef struct {
/* 0x9D2 */ u16 height;
} CrashScreen; // size = 0x9D4
extern CrashScreen gCrashScreen; // bss, externed for now until issues are figured out
SHIFT_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

@ -200,8 +200,12 @@ Gfx NoControllerGfx[] = {
gsSPEndDisplayList(),
};
// BSS
extern Mtx D_8009BAA8[];
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);
void initialize_curtains(void) {
gCurtainDrawCallback = NULL;

View File

@ -12,7 +12,7 @@ typedef struct DefaultWindowStyle {
} DefaultWindowStyle; // size = 0x0B
#define BOX_QUAD_BUFFER_NUM 21
extern Vtx gBoxQuadBuffer[BOX_QUAD_BUFFER_NUM][16];
SHIFT_BSS Vtx gBoxQuadBuffer[BOX_QUAD_BUFFER_NUM][16];
DefaultWindowStyle gBoxDefaultStyles[] = {
{
@ -329,9 +329,15 @@ Mtx gBoxMatrix = RDP_MATRIX(
0.000000, 0.000000, 0.000000, 0.000000
);
// @bug there's an issue with the way the "quads" temp below is used, sometimes going out of bounds.
// In vanilla, this results in some data being written to an unused struct field inside gPartnerStatus, which doesn't
// cause any issues. In shiftable builds, there's no telling where quads might be, so we make some adjustments to
// prevent the overflow
s32 draw_box(s32 flags, WindowStyle windowStyle, s32 posX, s32 posY, s32 posZ, s32 width, s32 height, u8 opacity,
u8 darkening, f32 scaleX, f32 scaleY, f32 rotX, f32 rotY, f32 rotZ, void (*fpDrawContents)(s32, s32, s32, s32, s32, s32, s32),
void* drawContentsArg0, Matrix4f rotScaleMtx, s32 translateX, s32 translateY, Matrix4f outMtx) {
u8 darkening, f32 scaleX, f32 scaleY, f32 rotX, f32 rotY, f32 rotZ,
void (*fpDrawContents)(s32, s32, s32, s32, s32, s32, s32), void* drawContentsArg0, Matrix4f rotScaleMtx,
s32 translateX, s32 translateY, Matrix4f outMtx)
{
Matrix4f mtx1, mtx2, mtx3;
u8 primR, primG, primB, primA, envR, envG, envB, envA;
DefaultWindowStyle* defaultStyle = NULL;
@ -622,7 +628,9 @@ s32 draw_box(s32 flags, WindowStyle windowStyle, s32 posX, s32 posY, s32 posZ, s
quads[7].v.tc[0] = width * 32;
quads[7].v.tc[1] = (height / 2) * 32;
#ifndef SHIFT
quads += 4;
#endif
break;
case 2:
quads[8].v.ob[0] = -width / 2;
@ -653,7 +661,9 @@ s32 draw_box(s32 flags, WindowStyle windowStyle, s32 posX, s32 posY, s32 posZ, s
quads[11].v.tc[0] = (width / 2) * 32;
quads[11].v.tc[1] = height * 32;
#ifndef SHIFT
quads += 8;
#endif
break;
case 3:
quads[12].v.ob[0] = 0;
@ -684,10 +694,16 @@ s32 draw_box(s32 flags, WindowStyle windowStyle, s32 posX, s32 posY, s32 posZ, s
quads[15].v.tc[0] = width * 32;
quads[15].v.tc[1] = height * 32;
#ifndef SHIFT
quads += 12;
#endif
break;
}
#ifdef SHIFT
gSPVertex(gMainGfxPos++, &quads[idx*4], 4, 0);
#else
gSPVertex(gMainGfxPos++, quads, 4, 0);
#endif
gSP2Triangles(gMainGfxPos++, 0, 3, 1, 0, 0, 2, 3, 0);
} else {
switch (idx) {

View File

@ -5,8 +5,8 @@
typedef s32 TlbEntry[0x1000 / 4];
typedef TlbEntry TlbMappablePage[15];
extern EffectGraphics gEffectGraphicsData[15];
extern EffectInstance* gEffectInstances[96];
SHIFT_BSS EffectGraphics gEffectGraphicsData[15];
SHIFT_BSS EffectInstance* gEffectInstances[96];
extern TlbMappablePage D_80197000;
extern Addr D_801A6000;
@ -183,7 +183,7 @@ void clear_effect_data(void) {
}
for (i = 0; i < ARRAY_COUNT(gEffectInstances); i++) {
gEffectInstances[i] = 0;
gEffectInstances[i] = NULL;
}
osUnmapTLBAll();

View File

@ -168,16 +168,21 @@ EvtScript EnemyNpcDefeat = {
EVT_END
};
extern s8 D_8009A63C;
extern s8 D_8009A654;
extern s16 gFirstStrikeMessagePos;
extern s8 D_8009A670;
extern s32 D_800A0BA0;
extern f32 D_800A0BA4;
extern Evt* D_800A0BB0;
extern s32 D_800A0BB4;
extern EffectInstance* WorldMerleeOrbEffect;
extern EffectInstance* WorldMerleeWaveEffect;
SHIFT_BSS s32 gEncounterState;
SHIFT_BSS s32 gEncounterSubState;
SHIFT_BSS EncounterStatus gCurrentEncounter;
SHIFT_BSS s8 D_8009A63C;
SHIFT_BSS s8 D_8009A654;
SHIFT_BSS s16 gFirstStrikeMessagePos;
SHIFT_BSS s8 D_8009A670;
SHIFT_BSS s32 D_8009A678;
SHIFT_BSS s32 D_800A0BA0;
SHIFT_BSS f32 D_800A0BA4;
SHIFT_BSS Evt* D_800A0BB0;
SHIFT_BSS s32 D_800A0BB4;
SHIFT_BSS s16 D_800A0BB8;
SHIFT_BSS EffectInstance* WorldMerleeOrbEffect;
SHIFT_BSS EffectInstance* WorldMerleeWaveEffect;
void set_battle_formation(Battle*);
void func_800E97E4(void);

View File

@ -29,25 +29,36 @@ extern Addr WorldEntityHeapBase;
s32 D_8014AFB0 = 255;
// BSS
extern s32 D_801516FC;
extern s32 D_801512BC;
extern s32 D_80151304;
extern s32 D_80151344;
extern s32 entity_numEntities;
extern s32 gEntityHeapBase;
extern s32 gLastCreatedEntityIndex;
SHIFT_BSS s32 CreateEntityVarArgBuffer[4];
SHIFT_BSS HiddenPanelsData gCurrentHiddenPanels;
SHIFT_BSS s32 gEntityHideMode;
extern s32 gEntityHeapBottom;
extern s32 entity_numShadows;
extern s32 isAreaSpecificEntityDataLoaded;
extern s32 entity_updateCounter;
SHIFT_BSS s32 D_801516FC;
SHIFT_BSS s32 D_801512BC;
SHIFT_BSS s32 D_80151304;
SHIFT_BSS s32 D_80151344;
SHIFT_BSS s32 entity_numEntities;
SHIFT_BSS s32 gEntityHeapBase;
SHIFT_BSS s32 gLastCreatedEntityIndex;
extern s32 wEntityDataLoadedSize;
extern s32 bEntityDataLoadedSize;
SHIFT_BSS s32 gEntityHeapBottom;
SHIFT_BSS s32 entity_numShadows;
SHIFT_BSS s32 isAreaSpecificEntityDataLoaded;
SHIFT_BSS s32 entity_updateCounter;
extern EntityBlueprint* wEntityBlueprint[30];
extern EntityBlueprint* bEntityBlueprint[4];
SHIFT_BSS s32 wEntityDataLoadedSize;
SHIFT_BSS s32 bEntityDataLoadedSize;
SHIFT_BSS EntityBlueprint* wEntityBlueprint[30];
SHIFT_BSS EntityBlueprint* bEntityBlueprint[4];
SHIFT_BSS EntityList gWorldEntityList;
SHIFT_BSS EntityList gBattleEntityList;
SHIFT_BSS EntityList* gCurrentEntityListPtr;
SHIFT_BSS ShadowList gWorldShadowList;
SHIFT_BSS ShadowList gBattleShadowList;
SHIFT_BSS ShadowList* gCurrentShadowListPtr;
extern Addr BattleEntityHeapBottom; // todo ???
@ -799,7 +810,7 @@ void clear_entity_data(s32 arg0) {
}
} else {
bEntityDataLoadedSize = 0;
for (i = 0; i < 4; i++) {
for (i = 0; i < ARRAY_COUNT(bEntityBlueprint); i++) {
bEntityBlueprint[i] = NULL;
}
}
@ -832,7 +843,7 @@ void init_entity_data(void) {
} else {
s32 i;
for (i = 0; i < 4; i++) {
for (i = 0; i < ARRAY_COUNT(bEntityBlueprint); i++) {
bEntityBlueprint[i] = 0;
}
gEntityHeapBottom = (s32) BattleEntityHeapBottom;

View File

@ -15,6 +15,8 @@ extern StaticAnimatorNode* Entity_HitFloatingYellowBlock_Mesh[];
extern AnimScript Entity_HitRedBlock_AnimationHit;
extern StaticAnimatorNode* Entity_HitRedBlock_Mesh[];
extern s32 D_802EA310[];
extern EntityBlueprint Entity_HitGroundedYellowBlock;
extern EntityBlueprint Entity_HitFloatingYellowBlock;
extern EntityBlueprint Entity_HitRedBlock;

View File

@ -7,6 +7,7 @@ extern Gfx Entity_RenderNone[];
extern Gfx Entity_WoodenCrate_Render[];
extern Gfx* Entity_WoodenCrate_FragmentsRender[];
extern Mtx Entity_WoodenCrate_FragmentsMatrices[];
extern s32 Entity_WoodenCrate_RenderShatteredScript[];
void entity_WoodenCrate_setupGfx(s32);

View File

@ -7,19 +7,19 @@ EntityModelScript D_8014C260 = {
};
Lights1 D_8014C268 = gdSPDefLights1(255, 255, 255, 0, 0, 0, 0, 0, 0);
extern EntityModelList gWorldEntityModelList;
extern EntityModelList gBattleEntityModelList;
extern EntityModelList* gCurrentEntityModelList;
extern s32 gEntityModelCount;
SHIFT_BSS EntityModelList gWorldEntityModelList;
SHIFT_BSS EntityModelList gBattleEntityModelList;
SHIFT_BSS EntityModelList* gCurrentEntityModelList;
SHIFT_BSS s32 gEntityModelCount;
extern s32 D_80154374;
extern s32 entity_fog_enabled;
extern s32 entity_fog_red;
extern s32 entity_fog_green;
extern s32 entity_fog_blue;
extern s32 entity_fog_alpha;
extern s32 entity_fog_dist_min;
extern s32 entity_fog_dist_max;
SHIFT_BSS s32 D_80154374;
SHIFT_BSS s32 entity_fog_enabled;
SHIFT_BSS s32 entity_fog_red;
SHIFT_BSS s32 entity_fog_green;
SHIFT_BSS s32 entity_fog_blue;
SHIFT_BSS s32 entity_fog_alpha;
SHIFT_BSS s32 entity_fog_dist_min;
SHIFT_BSS s32 entity_fog_dist_max;
extern Gfx D_8014B7F8[];
extern Gfx D_8014B820[];

View File

@ -4,6 +4,7 @@
extern LavaReset* gLavaResetList;
extern s32 LastSafeFloor;
extern ModelTreeInfoList* mdl_currentModelTreeNodeInfo;
ApiStatus TranslateModel(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;

View File

@ -4,6 +4,9 @@
#include "world/partners.h"
#include "sprite/player.h"
SHIFT_BSS PlayerStatus gPlayerStatus;
SHIFT_BSS PlayerData gPlayerData;
extern Npc playerNpcData;
extern u16 PlayerImgFXFlags;
extern s32 D_802DB5B4[3]; // unused

View File

@ -2,10 +2,12 @@
#include "PR/os_flash.h"
#include "gcc/string.h"
extern SaveData D_8009A6B0;
extern s32 logicalSaveInfo[4][2];
extern s32 physicalSaveInfo[6][2];
extern s32 nextAvailableSavePage;
SHIFT_BSS SaveData D_8009A6B0;
SHIFT_BSS s32 logicalSaveInfo[4][2];
SHIFT_BSS s32 physicalSaveInfo[6][2];
SHIFT_BSS s32 nextAvailableSavePage;
SHIFT_BSS SaveDataHeader D_800D95E8;
SHIFT_BSS SaveData gCurrentSaveFile;
char magicSaveString[] = "Mario Story 006";

View File

@ -92,8 +92,7 @@ GameMode* gameModeMap[] = {
NULL,
};
// BSS
extern s16 gameMode;
SHIFT_BSS s16 gameMode;
GameMode* set_game_mode_slot(s32 i, GameMode* mode);

View File

@ -1,6 +1,6 @@
#include "common.h"
extern GameMode gMainGameState[2]; // TODO rename
SHIFT_BSS GameMode gMainGameState[2]; // TODO rename
void state_delegate_NOP(void) {
}

View File

@ -105,23 +105,23 @@ Vtx D_8014F0C8[] = {
Lights1 D_8014F108 = gdSPDefLights1(255, 255, 255, 0, 0, 0, 0, 0, 0);
extern s32 gHudElementsNumber;
extern s32 D_80159180;
extern HudElementList* gHudElements;
extern HudElementList gHudElementsWorld;
extern HudElementList gHudElementsBattle;
extern s32* gHudElementCacheSize;
extern s32 gHudElementCacheSizeWorld;
extern s32 gHudElementCacheSizeBattle;
extern HudCacheEntry* gHudElementCacheTableRaster;
extern HudCacheEntry* gHudElementCacheTablePalette;
extern HudCacheEntry gHudElementCacheTableRasterWorld[];
extern HudCacheEntry gHudElementCacheTablePaletteWorld[];
extern HudCacheEntry gHudElementCacheTableRasterBattle[];
extern HudCacheEntry gHudElementCacheTablePaletteBattle[];
extern u8* gHudElementCacheBufferWorld;
extern u8* gHudElementCacheBufferBattle;
extern u8* gHudElementCacheBuffer;
SHIFT_BSS s32 gHudElementsNumber;
SHIFT_BSS s32 D_80159180;
SHIFT_BSS HudElementList* gHudElements;
SHIFT_BSS HudElementList gHudElementsWorld;
SHIFT_BSS HudElementList gHudElementsBattle;
SHIFT_BSS s32* gHudElementCacheSize;
SHIFT_BSS s32 gHudElementCacheSizeWorld;
SHIFT_BSS s32 gHudElementCacheSizeBattle;
SHIFT_BSS HudCacheEntry* gHudElementCacheTableRaster;
SHIFT_BSS HudCacheEntry* gHudElementCacheTablePalette;
SHIFT_BSS HudCacheEntry gHudElementCacheTableRasterWorld[192];
SHIFT_BSS HudCacheEntry gHudElementCacheTablePaletteWorld[192];
SHIFT_BSS HudCacheEntry gHudElementCacheTableRasterBattle[192];
SHIFT_BSS HudCacheEntry gHudElementCacheTablePaletteBattle[192];
SHIFT_BSS u8* gHudElementCacheBufferWorld;
SHIFT_BSS u8* gHudElementCacheBufferBattle;
SHIFT_BSS u8* gHudElementCacheBuffer;
void func_801413F8(void);

View File

@ -113,7 +113,7 @@ enum {
typedef struct HudCacheEntry {
/* 0x00 */ s32 id;
/* 0x04 */ u8* data;
} HudCacheEntry; // size = 0x08;
} HudCacheEntry; // size = 0x8;
typedef struct PopupMenu {
/* 0x000 */ HudScript* ptrIcon[32];

View File

@ -113,16 +113,16 @@ typedef ImgFXState ImgFXInstanceList[MAX_IMGFX_INSTANCES];
extern HeapNode heap_spriteHead;
// BSS
extern ImgFXWorkingTexture ImgFXCurrentTexture;
extern Vtx* ImgFXVtxBuffers[2];
extern Vtx* imgfx_vtxBuf;
extern ImgFXInstanceList* ImgFXInstances;
extern s8 D_80156958[2];
extern s32 D_80156960[2];
extern s32 D_80156968[2];
extern s8 D_80156970;
extern ImgFXAnimHeader ImgFXAnimHeaders[4];
SHIFT_BSS ImgFXWorkingTexture ImgFXCurrentTexture;
SHIFT_BSS Vtx* ImgFXVtxBuffers[2];
SHIFT_BSS Vtx* imgfx_vtxBuf;
SHIFT_BSS ImgFXInstanceList* ImgFXInstances;
SHIFT_BSS s8 D_80156958[2];
SHIFT_BSS s32 D_80156960[2];
SHIFT_BSS s32 D_80156968[2];
SHIFT_BSS s8 D_80156970;
SHIFT_BSS ImgFXAnimHeader ImgFXAnimHeaders[MAX_IMGFX_INSTANCES];
SHIFT_BSS ImgFXCacheEntry ImgFXDataCache[8];
// Data
ImgFXWorkingTexture* ImgFXCurrentTexturePtr = &ImgFXCurrentTexture;
@ -223,8 +223,6 @@ u8* ImgFXAnimOffsets[] = {
[IMGFX_ANIM_CYMBAL_CRUSH] cymbal_crush_header,
};
extern ImgFXCacheEntry ImgFXDataCache[8];
void imgfx_cache_instance_data(ImgFXState* state);
void imgfx_clear_instance_data(ImgFXState* state);
void imgfx_init_instance(ImgFXState* state);

View File

@ -1,7 +1,11 @@
#include "common.h"
#include "nu/nusys.h"
extern OSContPad D_8009A5B8;
SHIFT_BSS OSContPad D_8009A5B8;
SHIFT_BSS s16 D_8009A6A0;
SHIFT_BSS s16 D_8009A6A2;
SHIFT_BSS s16 D_8009A6A4;
SHIFT_BSS s16 D_8009A6A6;
void func_800287F0(void) {
gGameStatusPtr->currentButtons[0] = 0;

View File

@ -1,6 +1,98 @@
#include "common.h"
#include "nu/nusys.h"
//
// Start of libultra BSS
//
#include "PR/controller.h"
#include "PR/osint.h"
SHIFT_BSS OSPifRam __osEepPifRam;
SHIFT_BSS OSPifRam __osPfsPifRam;
SHIFT_BSS __OSEventState __osEventStateTab[OS_NUM_EVENTS];
SHIFT_BSS u32 __osFinalrom;
SHIFT_BSS __OSInode __osPfsInodeCache;
SHIFT_BSS OSPifRam __MotorDataBuf[MAXCONTROLLERS];
SHIFT_BSS u16 retrace;
SHIFT_BSS OSThread viThread;
SHIFT_BSS unsigned char viThreadStack[OS_VIM_STACKSIZE] ALIGNED(16);
SHIFT_BSS char piThreadStack[OS_PIM_STACKSIZE] ALIGNED(16);
SHIFT_BSS OSMesgQueue viEventQueue;
SHIFT_BSS OSMesg viEventBuf[5] ALIGNED(8);
SHIFT_BSS OSIoMesg viRetraceMsg ALIGNED(8);
SHIFT_BSS OSIoMesg viCounterMsg ALIGNED(8);
SHIFT_BSS OSTask tmp_task;
SHIFT_BSS OSMesg piAccessBuf[1] ALIGNED(16);
SHIFT_BSS OSMesgQueue __osPiAccessQueue;
SHIFT_BSS OSThread piThread;
SHIFT_BSS OSMesgQueue piEventQueue;
SHIFT_BSS OSMesg piEventBuf[1];
SHIFT_BSS OSContStatus nuContStatus[5]; // ??? enough space for 5, but it makes no sense
SHIFT_BSS OSMesgQueue nuSiMesgQ;
SHIFT_BSS u32 nuContDataLockKey;
SHIFT_BSS OSMesg nuContWaitMesgBuf;
SHIFT_BSS OSMesg nuContDataMutexBuf;
SHIFT_BSS OSMesgQueue nuContDataMutexQ ALIGNED(16);
SHIFT_BSS OSMesgQueue nuContWaitMesgQ;
SHIFT_BSS OSContPad nuContData[4];
SHIFT_BSS u32 nuContNum;
SHIFT_BSS volatile u32 nuGfxTaskSpool;
SHIFT_BSS OSMesgQueue nuGfxMesgQ;
SHIFT_BSS char GfxStack[NU_GFX_STACK_SIZE] ALIGNED(16);
SHIFT_BSS OSThread D_800B1B90;
SHIFT_BSS OSMesg nuGfxMesgBuf[NU_GFX_MESGS];
SHIFT_BSS OSPiHandle* nuPiCartHandle;
SHIFT_BSS NUContRmbCtl nuContRmbCtl[4];
SHIFT_BSS OSPfs nuContPfs[4];
SHIFT_BSS NUUcode* nuGfxUcode;
SHIFT_BSS OSMesgQueue D_800AC5D0;
SHIFT_BSS OSMesg D_800AC5E8[NU_PI_MESG_NUM];
SHIFT_BSS u32 nuGfxDisplay;
SHIFT_BSS u32 nuGfxCfbCounter;
SHIFT_BSS NUSched nusched;
SHIFT_BSS u8 nuScPreNMIFlag;
SHIFT_BSS u64 nuScStack[NU_SC_STACK_SIZE / sizeof(u64)];
SHIFT_BSS u64 nuScAudioStack[NU_SC_STACK_SIZE / sizeof(u64)];
SHIFT_BSS u64 nuScGraphicsStack[NU_SC_STACK_SIZE / sizeof(u64)];
SHIFT_BSS NUIdleFunc nuIdleFunc;
SHIFT_BSS OSMesgQueue nuSiMgrMesgQ;
SHIFT_BSS OSMesg nuSiMesgBuf[8];
SHIFT_BSS OSThread siMgrThread;
SHIFT_BSS u64 siMgrStack[NU_SI_STACK_SIZE/sizeof(u64)];
SHIFT_BSS OSMesg D_8009E6D0[NU_GFX_TASKMGR_MESGS];
SHIFT_BSS OSMesgQueue D_800DAC90;
SHIFT_BSS NUScTask* nuGfxTask_ptr;
SHIFT_BSS s16 taskDoneMsg;
SHIFT_BSS s16 swapBufMsg;
SHIFT_BSS OSThread GfxTaskMgrThread;
SHIFT_BSS NUScTask nuGfxTask[NU_GFX_TASK_NUM];
SHIFT_BSS u64 D_800DA040[0x400 / sizeof(u64)];
SHIFT_BSS s32 D_800B91D0[NU_GFX_RDP_OUTPUTBUFF_SIZE / sizeof(u32)];
SHIFT_BSS u64 GfxTaskMgrStack[NU_GFX_TASKMGR_STACK_SIZE / sizeof(u64)];
SHIFT_BSS u8 nuYieldBuf[0xC10] ALIGNED(16);
SHIFT_BSS OSMesg siAccessBuf[1] ALIGNED(8);
SHIFT_BSS OSMesgQueue __osSiAccessQueue;
SHIFT_BSS OSThread __osThreadSave;
// boot.s
SHIFT_BSS u8 nuBootStack[0x2000] ALIGNED(8);
//osFlash.c (IDO)
SHIFT_BSS u32 __osFlashID[4];
SHIFT_BSS OSIoMesg __osFlashMsg;
SHIFT_BSS OSMesgQueue __osFlashMessageQ;
SHIFT_BSS OSPiHandle __osFlashHandler;
SHIFT_BSS OSMesg __osFlashMsgBuf;
SHIFT_BSS s32 __osFlashVersion;
//
// End of libultra BSS
//
// used in effects/gfx/flame.c
SHIFT_BSS unsigned char D_800B32E0[0x800] ALIGNED(16);
SHIFT_BSS unsigned char D_800B3AE0[0x800] ALIGNED(16);
s16 D_80074010 = 8; // might be an array, could be size 1-8
void gfxRetrace_Callback(s32);
@ -18,13 +110,15 @@ extern u16* D_80073E04;
extern s16 D_80073E08;
extern s16 D_80073E0A;
extern s32 D_80073E10[];
extern u16* D_8009A680;
#ifdef SHIFT
#define shim_create_audio_system_obfuscated create_audio_system
#define shim_load_engine_data_obfuscated load_engine_data
#endif
SHIFT_BSS u16* D_8009A680;
SHIFT_BSS u16* nuGfxZBuffer;
void boot_main(void* data) {
#if VERSION_JP
if (osTvType == OS_TV_NTSC) {

View File

@ -5,6 +5,12 @@
#include "sprite.h"
#include "overlay.h"
SHIFT_BSS s32 gOverrideFlags;
SHIFT_BSS s32 timeFreezeMode;
SHIFT_BSS u16** nuGfxCfb;
SHIFT_BSS s16 D_8009A690;
SHIFT_BSS DisplayContext D_80164000[2];
s8 gGameStepDelayAmount = 1;
s8 gGameStepDelayCount = 5;
@ -38,8 +44,6 @@ s32 gCurrentDisplayContextIndex = 0;
s32 gPauseBackgroundFade = 0;
s32 D_800741FC = 0;
extern s16 D_8009A690;
void gfx_init_state(void);
void gfx_draw_background(void);

View File

@ -8,6 +8,11 @@
#define MAP_TEXTURE_MEMORY_SIZE 0x20000
#define BTL_TEXTURE_MEMORY_SIZE 0x8000
SHIFT_BSS u8* gBackgroundFogModePtr;
SHIFT_BSS ModelList* gCurrentModels;
SHIFT_BSS ModelTreeInfoList* mdl_currentModelTreeNodeInfo;
extern Addr MapTextureMemory;
typedef struct Fog {
@ -1076,68 +1081,59 @@ s32 mdl_renderTaskBasePriorities[RENDER_MODE_COUNT] = {
b8 D_8014C248 = FALSE;
// BSS
extern ModelCustomGfxBuilderList* gCurrentCustomModelGfxBuildersPtr;
extern s32 D_801512BC;
extern s32 D_80151304;
extern s32 D_80151344;
extern s32 entity_numEntities;
extern s32 gEntityHeapBase;
extern HudCacheEntry* gHudElementCacheTableRaster;
extern HudCacheEntry* gHudElementCacheTablePalette;
extern ModelNode** gCurrentModelTreeRoot;
extern ModelTransformGroupList* gCurrentTransformGroups;
extern ModelCustomGfxList* gCurrentCustomModelGfxPtr;
SHIFT_BSS ModelCustomGfxBuilderList* gCurrentCustomModelGfxBuildersPtr;
SHIFT_BSS ModelNode** gCurrentModelTreeRoot;
SHIFT_BSS ModelTransformGroupList* gCurrentTransformGroups;
SHIFT_BSS ModelCustomGfxList* gCurrentCustomModelGfxPtr;
extern TextureHeader gCurrentTextureHeader;
SHIFT_BSS TextureHeader gCurrentTextureHeader ALIGNED(16);
extern ModelList wModelList;
extern ModelList bModelList;
SHIFT_BSS ModelList wModelList;
SHIFT_BSS ModelList bModelList;
extern ModelTransformGroupList wTransformGroups;
extern ModelTransformGroupList bTransformGroups;
SHIFT_BSS ModelTransformGroupList wTransformGroups;
SHIFT_BSS ModelTransformGroupList bTransformGroups;
extern ModelCustomGfxList wCustomModelGfx;
extern ModelCustomGfxList bCustomModelGfx;
SHIFT_BSS ModelCustomGfxList wCustomModelGfx;
SHIFT_BSS ModelCustomGfxList bCustomModelGfx;
extern ModelCustomGfxBuilderList wCustomModelGfxBuilders;
extern ModelCustomGfxBuilderList bCustomModelGfxBuilders;
extern ModelLocalVertexCopyList wModelLocalVtxBuffers;
extern ModelLocalVertexCopyList bModelLocalVtxBuffers;
extern ModelLocalVertexCopyList* gCurrentModelLocalVtxBuffers;
SHIFT_BSS ModelCustomGfxBuilderList wCustomModelGfxBuilders;
SHIFT_BSS ModelCustomGfxBuilderList bCustomModelGfxBuilders;
SHIFT_BSS ModelLocalVertexCopyList wModelLocalVtxBuffers;
SHIFT_BSS ModelLocalVertexCopyList bModelLocalVtxBuffers;
SHIFT_BSS ModelLocalVertexCopyList* gCurrentModelLocalVtxBuffers;
extern ModelNode* wModelTreeRoot;
extern ModelNode* bModelTreeRoot;
extern ModelTreeInfoList D_80152220;
extern ModelTreeInfoList D_80152A20;
SHIFT_BSS ModelNode* wModelTreeRoot;
SHIFT_BSS ModelNode* bModelTreeRoot;
SHIFT_BSS ModelTreeInfoList D_80152220;
SHIFT_BSS ModelTreeInfoList D_80152A20;
extern s8 wBackgroundFogMode;
extern s8 bBackgroundFogMode;
extern s32 mdl_treeIterPos;
extern Fog wFogSettings;
extern Fog bFogSettings;
extern Fog* gCurrentFogSettings;
extern s32 texPannerMainU[MAX_TEX_PANNERS];
extern s32 texPannerMainV[MAX_TEX_PANNERS];
extern s32 texPannerAuxU[MAX_TEX_PANNERS];
extern s32 texPannerAuxV[MAX_TEX_PANNERS];
extern void* TextureHeapPos;
extern u16 mtg_IterIdx;
extern u16 D_80153226;
extern ModelNode* mtg_FoundModelNode;
extern u16 mtg_MinChild;
extern u16 mtg_MaxChild;
extern u16 mtg_SearchModelID;
extern RenderTask* mdl_renderTaskLists[3];
extern s32 mdl_renderTaskQueueIdx;
extern s32 mdl_renderTaskCount;
SHIFT_BSS s8 wBackgroundFogMode;
SHIFT_BSS s8 bBackgroundFogMode;
SHIFT_BSS s32 mdl_treeIterPos;
SHIFT_BSS Fog wFogSettings;
SHIFT_BSS Fog bFogSettings;
SHIFT_BSS Fog* gCurrentFogSettings;
SHIFT_BSS s32 texPannerMainU[MAX_TEX_PANNERS];
SHIFT_BSS s32 texPannerMainV[MAX_TEX_PANNERS];
SHIFT_BSS s32 texPannerAuxU[MAX_TEX_PANNERS];
SHIFT_BSS s32 texPannerAuxV[MAX_TEX_PANNERS];
SHIFT_BSS void* TextureHeapPos;
SHIFT_BSS u16 mtg_IterIdx;
SHIFT_BSS ModelNode* mtg_FoundModelNode;
SHIFT_BSS u16 mtg_MinChild;
SHIFT_BSS u16 mtg_MaxChild;
SHIFT_BSS u16 mtg_SearchModelID;
SHIFT_BSS RenderTask* mdl_renderTaskLists[3];
SHIFT_BSS s32 mdl_renderTaskQueueIdx;
SHIFT_BSS s32 mdl_renderTaskCount;
extern TextureHandle mdl_textureHandles[128];
SHIFT_BSS TextureHandle mdl_textureHandles[128];
SHIFT_BSS u16 depthCopyBuffer[16];
extern Addr BattleEntityHeapBottom; // todo ???
extern u16 depthCopyBuffer[16];
void func_80117D00(Model* model);
void appendGfx_model_group(void* model);
void render_transform_group_node(ModelNode* node);
@ -2049,12 +2045,12 @@ void load_texture_variants(u32 romOffset, s32 textureID, s32 baseOffset, s32 siz
auxPaletteSize = 0;
auxRasterSize = 0;
}
textureID++;
currentTextureID = textureID;
textureHandle = &mdl_textureHandles[currentTextureID];
load_texture_impl(offset + sizeof(*header), textureHandle, header, rasterSize, paletteSize, auxRasterSize, auxPaletteSize);
mainSize = rasterSize + paletteSize + sizeof(*header);
offset += mainSize;
offset += auxRasterSize + auxPaletteSize;
@ -2100,7 +2096,7 @@ void load_next_model_textures(ModelNode* model, s32 romOffset, s32 texSize) {
// load all textures used by models, starting from the root
void mdl_load_all_textures(ModelNode* rootModel, s32 romOffset, s32 size) {
s32 baseOffset = 0;
// textures are loaded to the upper half of the texture heap when not in the world
if (gGameStatusPtr->isBattle != 0) {
baseOffset = MAP_TEXTURE_MEMORY_SIZE;
@ -2286,7 +2282,7 @@ void mdl_create_model(ModelBlueprint* bp, s32 unused) {
(*gCurrentModels)[modelIdx] = model = heap_malloc(sizeof(*model));
model->flags = bp->flags | MODEL_FLAG_VALID;
model->modelID = D_80153226;
model->modelID = mdl_treeIterPos;
model->modelNode = bp->mdlNode;
model->groupData = bp->groupData;
model->matrixFreshness = 0;
@ -3250,11 +3246,11 @@ void func_8011B1D8(ModelNode* node) {
// stop searching if node is a model
if (node->type == SHAPE_TYPE_MODEL) {
mtg_MaxChild = D_80153226;
mtg_MaxChild = mdl_treeIterPos;
return;
}
// stop searching if node is a group with GROUP_TYPE_0
// stop searching if node is a group with GROUP_TYPE_0
if (node->type == SHAPE_TYPE_GROUP) {
prop = get_model_property(node, MODEL_PROP_KEY_GROUP_INFO);
if (prop != NULL && prop->data.s != GROUP_TYPE_0) {
@ -4110,7 +4106,7 @@ s32 is_model_center_visible(u16 modelID, s32 depthQueryID, f32* screenX, f32* sc
if (outX >= 0.0f && outY >= 0.0f && outX < 320.0f && outY < 240.0f) {
gDPPipeSync(gMainGfxPos++);
// Load a 4x1 pixel tile of the depth buffer
gDPLoadTextureTile(gMainGfxPos++, osVirtualToPhysical(&nuGfxZBuffer[(s32) outY * 320]), G_IM_FMT_RGBA, G_IM_SIZ_16b, 320, 1,
gDPLoadTextureTile(gMainGfxPos++, osVirtualToPhysical(&nuGfxZBuffer[(s32) outY * SCREEN_WIDTH]), G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, 1,
(s32) outX, 0, (s32) outX + 3, 0,
0,
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP,
@ -4118,7 +4114,7 @@ s32 is_model_center_visible(u16 modelID, s32 depthQueryID, f32* screenX, f32* sc
G_TX_NOLOD, G_TX_NOLOD);
gDPPipeSync(gMainGfxPos++);
// Set the current color image to the buffer where copied depth values are stored.
gDPSetColorImage(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 320, depthCopyBuffer);
gDPSetColorImage(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, depthCopyBuffer);
gDPPipeSync(gMainGfxPos++);
// Set up 1 cycle mode and all other relevant othermode params.
// One cycle mode must be used here because only one pixel is copied, and copy mode only supports multiples of 4 pixels.
@ -4137,7 +4133,7 @@ s32 is_model_center_visible(u16 modelID, s32 depthQueryID, f32* screenX, f32* sc
gSPTextureRectangle(gMainGfxPos++, depthQueryID << 2, 0 << 2, 4 << 2, 1 << 2, G_TX_RENDERTILE, (s32) outX << 5, 0, 1 << 10, 1 << 10);
// Sync and swap the color image back to the current framebuffer.
gDPPipeSync(gMainGfxPos++);
gDPSetColorImage(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 320, osVirtualToPhysical(nuGfxCfb_ptr));
gDPSetColorImage(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, osVirtualToPhysical(nuGfxCfb_ptr));
gDPPipeSync(gMainGfxPos++);
// Reconfigure the frame's normal scissor.
gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, camera->viewportStartX, camera->viewportStartY, camera->viewportStartX + camera->viewportW, camera->viewportStartY + camera->viewportH);
@ -4216,7 +4212,7 @@ s32 is_point_visible(f32 x, f32 y, f32 z, s32 depthQueryID, f32* screenX, f32* s
if (outX >= 0.0f && outY >= 0.0f && outX < 320.0f && outY < 240.0f) {
gDPPipeSync(gMainGfxPos++);
// Load a 4x1 pixel tile of the depth buffer
gDPLoadTextureTile(gMainGfxPos++, osVirtualToPhysical(&nuGfxZBuffer[(s32) outY * 320]), G_IM_FMT_RGBA, G_IM_SIZ_16b, 320, 1,
gDPLoadTextureTile(gMainGfxPos++, osVirtualToPhysical(&nuGfxZBuffer[(s32) outY * SCREEN_WIDTH]), G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, 1,
(s32) outX, 0, (s32) outX + 3, 0,
0,
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP,
@ -4224,7 +4220,7 @@ s32 is_point_visible(f32 x, f32 y, f32 z, s32 depthQueryID, f32* screenX, f32* s
G_TX_NOLOD, G_TX_NOLOD);
gDPPipeSync(gMainGfxPos++);
// Set the current color image to the buffer where copied depth values are stored.
gDPSetColorImage(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 320, depthCopyBuffer);
gDPSetColorImage(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, depthCopyBuffer);
gDPPipeSync(gMainGfxPos++);
// Set up 1 cycle mode and all other relevant othermode params.
// One cycle mode must be used here because only one pixel is copied, and copy mode only supports multiples of 4 pixels.
@ -4243,7 +4239,7 @@ s32 is_point_visible(f32 x, f32 y, f32 z, s32 depthQueryID, f32* screenX, f32* s
gSPTextureRectangle(gMainGfxPos++, depthQueryID << 2, 0 << 2, (depthQueryID + 1) << 2, 1 << 2, G_TX_RENDERTILE, (s32) outX << 5, 0, 1 << 10, 1 << 10);
// Sync and swap the color image back to the current framebuffer.
gDPPipeSync(gMainGfxPos++);
gDPSetColorImage(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 320, osVirtualToPhysical(nuGfxCfb_ptr));
gDPSetColorImage(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, osVirtualToPhysical(nuGfxCfb_ptr));
gDPPipeSync(gMainGfxPos++);
// Reconfigure the frame's normal scissor.
gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, camera->viewportStartX, camera->viewportStartY, camera->viewportStartX + camera->viewportW, camera->viewportStartY + camera->viewportH);

View File

@ -68,23 +68,21 @@ Gfx D_8014C2D8[] = {
gsSPEndDisplayList(),
};
// unsorted
extern u8* D_8015131C;
extern MessageDrawState D_80155D20;
extern IMG_BIN D_80159B50[];
extern PAL_BIN D_8015C7E0[];
// BSS
extern s32 gMsgBGScrollAmtX;
extern u16 gMsgGlobalWaveCounter;
extern MessageImageDataList gMsgVarImages;
extern s32 gMsgBGScrollAmtY;
extern Gfx* D_80151338;
extern char gMessageBuffers[2][1024];
extern u8 gMessageMsgVars[3][32];
extern s16 D_80155C98;
extern Mtx gMessageWindowProjMatrix[2];
extern MessageDrawState* msg_drawState;
SHIFT_BSS s32 gMsgBGScrollAmtX;
SHIFT_BSS u16 gMsgGlobalWaveCounter;
SHIFT_BSS MessageImageDataList gMsgVarImages;
SHIFT_BSS s32 gMsgBGScrollAmtY;
SHIFT_BSS u8* D_8015131C;
SHIFT_BSS Gfx* D_80151338;
SHIFT_BSS char gMessageBuffers[2][1024];
SHIFT_BSS u8 gMessageMsgVars[3][32];
SHIFT_BSS s16 D_80155C98;
SHIFT_BSS Mtx gMessageWindowProjMatrix[2];
SHIFT_BSS MessageDrawState D_80155D20;
SHIFT_BSS MessageDrawState* msg_drawState;
SHIFT_BSS IMG_BIN D_80159B50[0x200];
SHIFT_BSS PAL_BIN D_8015C7E0[0x10];
SHIFT_BSS MessagePrintState gMessagePrinters[3];
extern s16 D_802EB644[22];

View File

@ -5,6 +5,12 @@
#include "sprite.h"
#include "world/partners.h"
SHIFT_BSS s16 gNpcCount;
SHIFT_BSS NpcList gWorldNpcList;
SHIFT_BSS NpcList gBattleNpcList;
SHIFT_BSS NpcList* gCurrentNpcListPtr;
SHIFT_BSS b8 gNpcPlayerCollisionsEnabled;
u8 D_80077BF0[] = {
1, 2,
0, 52,

View File

@ -1,10 +1,11 @@
#include "common.h"
extern s32 D_8010C94C;
extern s32 D_8010C968;
extern s32 D_8010C970;
extern s32 D_8010C974;
extern s32 D_8010C98C;
SHIFT_BSS s32 D_8010C94C;
SHIFT_BSS s32 D_8010C968;
SHIFT_BSS s32 D_8010C98C;
SHIFT_BSS s32 D_8010C970;
SHIFT_BSS s32 D_8010C974;
SHIFT_BSS s32 NpcHitQueryColliderID;
PlayerStatus* gPlayerStatusPtr = &gPlayerStatus; // maybe wPlayerStatus

View File

@ -2,6 +2,7 @@
#include "macros.h"
extern __OSInode __osPfsInodeCache;
s32 __osPfsInodeCacheChannel = -1;
u8 __osPfsInodeCacheBank = 250;

View File

@ -5,8 +5,10 @@
NOP_FIX
extern u64 nuMainStack[NU_SC_STACK_SIZE / sizeof(u64)];
extern u64 IdleStack[NU_SC_STACK_SIZE / sizeof(u64)];
SHIFT_BSS u64 nuMainStack[NU_SC_STACK_SIZE / sizeof(u64)];
SHIFT_BSS u64 IdleStack[NU_SC_STACK_SIZE / sizeof(u64)];
SHIFT_BSS OSThread IdleThread; // idle thread, id 1
SHIFT_BSS OSThread MainThread; // id 3
void nuBoot(void) {
osInitialize();

View File

@ -3,12 +3,12 @@
void gfxThread(void*);
extern s32 GfxStack[NU_GFX_STACK_SIZE / 4];
extern char GfxStack[NU_GFX_STACK_SIZE];
extern OSThread D_800B1B90;
extern OSMesg nuGfxMesgBuf[NU_GFX_MESGS];
void nuGfxThreadStart(void) {
osCreateThread(&D_800B1B90, 4, gfxThread, NULL, &GfxStack[NU_GFX_STACK_SIZE / 4], NU_GFX_THREAD_PRI);
osCreateThread(&D_800B1B90, 4, gfxThread, NULL, &GfxStack[NU_GFX_STACK_SIZE], NU_GFX_THREAD_PRI);
osStartThread(&D_800B1B90);
}

View File

@ -5,7 +5,6 @@ NUCallBackList* nuSiCallBackList = NULL;
extern OSMesg nuSiMesgBuf[8];
extern OSThread siMgrThread;
extern s32 D_800A08C0;
static void nuSiMgrThread(void* arg);

View File

@ -1,15 +1,3 @@
// #include "ultra64.h"
// #include "include_asm.h"
// OSDevMgr __osPiDevMgr = {0};
// OSPiHandle* __osPiTable = NULL;
// extern OSPiHandle __Dom1SpeedParam;
// extern OSPiHandle __Dom2SpeedParam;
// OSPiHandle* __osCurrentHandle[2] = {&__Dom1SpeedParam, &__Dom2SpeedParam};
// INCLUDE_ASM(void, "os/osCreatePiManager", osCreatePiManager, OSPri prio, OSMesgQueue* queue, OSMesg* mesg, s32 unk);
#include "macros.h"
#include "PR/os_internal.h"
#include "PR/piint.h"

View File

@ -2,6 +2,7 @@
#define SI_Q_BUF_LEN 1
u32 __osSiAccessQueueEnabled = 0;
extern OSMesg siAccessBuf[SI_Q_BUF_LEN];
extern OSMesgQueue __osSiAccessQueue;

View File

@ -2,11 +2,13 @@
#include "sprite.h"
#include "nu/nusys.h"
extern SpriteShadingProfile wSpriteShadingProfile;
extern SpriteShadingProfile bSpriteShadingProfile;
extern SpriteShadingProfile wSpriteShadingProfileAux;
extern SpriteShadingProfile bSpriteShadingProfileAux;
extern PAL_BIN SpriteShadingPalette[16];
SHIFT_BSS SpriteShadingProfile* gSpriteShadingProfile;
SHIFT_BSS SpriteShadingProfile wSpriteShadingProfile;
SHIFT_BSS SpriteShadingProfile bSpriteShadingProfile;
SHIFT_BSS SpriteShadingProfile wSpriteShadingProfileAux;
SHIFT_BSS SpriteShadingProfile bSpriteShadingProfileAux;
SHIFT_BSS SpriteShadingProfile* gAuxSpriteShadingProfile;
SHIFT_BSS PAL_BIN SpriteShadingPalette[16];
void appendGfx_shading_palette(Matrix4f mtx, s32 uls, s32 ult, s32 lrs, s32 lrt, s32 alpha,
f32 shadowX, f32 shadowY, f32 shadowZ,

View File

@ -18,9 +18,9 @@ s32 D_800778AC[] = {
0x00000000, 0xFFFFFF00, 0xFFFFFF00, 0x00000000, 0x00000000
};
// BSS
extern s32 D_800A0904;
extern s32 D_800A0908;
SHIFT_BSS s8 D_800A0900;
SHIFT_BSS s32 D_800A0904;
SHIFT_BSS s32 D_800A0908;
#ifdef SHIFT
#define shim_battle_heap_create_obfuscated battle_heap_create

View File

@ -41,6 +41,10 @@ u8 D_800779B0 = 0;
extern s32 D_80200000;
extern ShapeFile gMapShapeData;
SHIFT_BSS s8 D_800A0930;
SHIFT_BSS s8 D_800A0931;
SHIFT_BSS s16 D_800A0932[1];
void state_init_language_select(void) {
D_800A0931 = 0;
D_800A0932[0] = 0;

View File

@ -2,7 +2,15 @@
#include "hud_element.h"
#include "sprite.h"
extern s32 D_800A0950;
SHIFT_BSS s32 D_800A0950;
SHIFT_BSS s16 D_800A0954;
SHIFT_BSS s16 D_800A0956;
SHIFT_BSS s16 D_800A0958;
SHIFT_BSS s16 D_800A095A;
SHIFT_BSS s16 D_800A095C;
SHIFT_BSS s16 D_800A095E;
SHIFT_BSS s32 D_800A0960;
SHIFT_BSS s32 D_800A0964;
void state_init_intro(void) {
s8 unk_A8;
@ -66,8 +74,8 @@ void state_init_intro(void) {
break;
}
set_screen_overlay_params_back(D_800A0963, D_800A0954);
set_screen_overlay_color(SCREEN_LAYER_BACK, D_800A095B, D_800A095D, D_800A095F);
set_screen_overlay_params_back(D_800A0960, D_800A0954);
set_screen_overlay_color(SCREEN_LAYER_BACK, D_800A095A, D_800A095C, D_800A095E);
intro_logos_update_fade();
}
@ -227,8 +235,8 @@ void state_step_intro(void) {
break;
}
set_screen_overlay_params_back(D_800A0963, D_800A0954);
set_screen_overlay_color(SCREEN_LAYER_BACK, D_800A095B, D_800A095D, D_800A095F);
set_screen_overlay_params_back(D_800A0960, D_800A0954);
set_screen_overlay_color(SCREEN_LAYER_BACK, D_800A095A, D_800A095C, D_800A095E);
intro_logos_update_fade();
}

View File

@ -40,11 +40,10 @@ Gfx D_80077908[] = {
gsSPEndDisplayList(),
};
// BSS
extern u8* gLogosImages;
extern u8* gLogosImage3;
extern u8* gLogosImage1;
extern u8* gLogosImage2;
SHIFT_BSS u8* gLogosImages;
SHIFT_BSS u8* gLogosImage3;
SHIFT_BSS u8* gLogosImage1;
SHIFT_BSS u8* gLogosImage2;
void state_init_logos(void) {
s8* romStart;

View File

@ -38,6 +38,11 @@ NUPiOverlaySegment D_8007795C = {
.bssEnd = pause_BSS_END,
};
SHIFT_BSS s8 D_800A0920;
SHIFT_BSS s8 D_800A0921;
SHIFT_BSS s16 D_800A0922;
SHIFT_BSS s32 SavedReverbMode;
void state_init_pause(void) {
D_800A0921 = 0;
D_800A0922 = 0;

View File

@ -76,15 +76,15 @@ typedef struct TitleDataStruct {
#define COPYRIGHT_WIDTH 144
#endif
extern s16 D_800A0970;
extern TitleDataStruct* TitleScreen_ImgList;
extern s32* TitleScreen_ImgList_Logo;
extern u8 (*TitleScreen_ImgList_Copyright)[COPYRIGHT_WIDTH];
extern s32* TitleScreen_ImgList_PressStart;
SHIFT_BSS s16 D_800A0970;
SHIFT_BSS TitleDataStruct* TitleScreen_ImgList;
SHIFT_BSS s32* TitleScreen_ImgList_Logo;
SHIFT_BSS u8 (*TitleScreen_ImgList_Copyright)[COPYRIGHT_WIDTH];
SHIFT_BSS s32* TitleScreen_ImgList_PressStart;
#if VERSION_JP
extern s32* TitleScreen_ImgList_CopyrightPalette;
SHIFT_BSS s32* TitleScreen_ImgList_CopyrightPalette;
#endif
extern s16 D_800A0988;
SHIFT_BSS s16 D_800A0988;
void appendGfx_title_screen(void);
void draw_title_screen_NOP(void);

View File

@ -80,12 +80,11 @@ s32 D_80078168[] = {
MSG_Menus_Merlee_Exhausted,
};
SHIFT_BSS PopupMessage D_800A0BC0[32];
SHIFT_BSS s32 D_800A0F40;
SHIFT_BSS HudStatusIcon* D_800A0F44;
extern HudScript HES_Item_Present;
extern PopupMessage D_800A0BC0[32];
extern s32 D_800A0F40;
extern HudStatusIcon* D_800A0F44;
extern HudScript HES_AsleepBegin;
extern HudScript HES_AsleepEnd;
extern HudScript HES_ElectrifiedBegin;

View File

@ -1,5 +1,10 @@
#include "common.h"
SHIFT_BSS s16 gTriggerCount;
SHIFT_BSS TriggerList wTriggerList;
SHIFT_BSS TriggerList bTriggerList;
SHIFT_BSS TriggerList* gCurrentTriggerListPtr;
void default_trigger_on_activate(Trigger* self) {
self->flags.flags |= TRIGGER_ACTIVATED;
}

View File

@ -20,6 +20,8 @@ typedef struct WindowGroup {
/* 0x01 */ u8 max;
} WindowGroup; // size = 0x02
SHIFT_BSS Window gWindows[64];
WindowStyle gWindowStyles[64] = {
{ WINDOW_STYLE_3 }, { WINDOW_STYLE_3 }, { WINDOW_STYLE_11 }, { WINDOW_STYLE_12 },
{ WINDOW_STYLE_13 }, { WINDOW_STYLE_14 }, { WINDOW_STYLE_3 }, { WINDOW_STYLE_21 },

View File

@ -1,5 +1,9 @@
#include "common.h"
SHIFT_BSS WorkerList gWorldWorkerList;
SHIFT_BSS WorkerList gBattleWorkerList;
SHIFT_BSS WorkerList* gCurrentWorkerListPtr;
void worker_delegate_do_nothing(void) {
}

View File

@ -41,25 +41,27 @@
extern s32 D_8010CD20;
// BSS
SHIFT_BSS PartnerStatus gPartnerStatus;
SHIFT_BSS Npc* wPartnerNpc;
BSS s32 PartnerCommandState;
BSS PlayerPathElement gPlayerMoveHistory[40];
BSS s32 gPlayerMoveHistoryIndex;
BSS s32 D_8010CFBC;
extern f32 wPartnerTetherDistance;
extern s32 D_8010CFC4;
extern s16 wPartnerFollowState;
extern s16 D_8010CFCA;
extern s16 D_8010CFCC;
extern s16 D_8010CFCE;
extern s32 wPartnerNpcIndex;
extern Evt* wPartnerCurrentScript;
extern s32 wCurrentPartnerId;
extern s32 wPartnerCurrentScriptID;
extern s32 D_8010CFE0;
extern s32 NextPartnerID;
extern s32 NextPartnerCommand;
extern WorldPartner* wPartner;
SHIFT_BSS f32 wPartnerTetherDistance;
SHIFT_BSS s32 D_8010CFC4;
SHIFT_BSS s16 wPartnerFollowState;
SHIFT_BSS s16 D_8010CFCA;
SHIFT_BSS s16 D_8010CFCC;
SHIFT_BSS s16 D_8010CFCE;
SHIFT_BSS s32 wPartnerNpcIndex;
SHIFT_BSS Evt* wPartnerCurrentScript;
SHIFT_BSS s32 wCurrentPartnerId;
SHIFT_BSS s32 wPartnerCurrentScriptID;
SHIFT_BSS s32 D_8010CFE0;
SHIFT_BSS s32 NextPartnerID;
SHIFT_BSS s32 NextPartnerCommand;
SHIFT_BSS WorldPartner* wPartner;
extern HudScript HES_Partner0;
extern HudScript HES_Goombario;

View File

@ -34,7 +34,7 @@ Vec3f gEntityColliderNormals[] = {
s32 pad_map_table[] = { 0, 0 };
#ifdef SHIFT
#define ASSET_TABLE_ROM_START mapfs_ROM_START
#define ASSET_TABLE_ROM_START (s32) mapfs_ROM_START
#elif VERSION_JP
#define ASSET_TABLE_ROM_START 0x1E00000
#else
@ -44,9 +44,12 @@ s32 pad_map_table[] = { 0, 0 };
#define ASSET_TABLE_HEADER_SIZE 0x20
#define ASSET_TABLE_FIRST_ENTRY (ASSET_TABLE_ROM_START + ASSET_TABLE_HEADER_SIZE)
// bss
extern MapSettings gMapSettings;
extern MapConfig* gMapConfig;
SHIFT_BSS MapSettings gMapSettings;
SHIFT_BSS MapConfig* gMapConfig;
SHIFT_BSS char wMapHitName[0x18];
SHIFT_BSS char wMapShapeName[0x18];
SHIFT_BSS char wMapTexName[0x18];
SHIFT_BSS char wMapBgName[0x18];
typedef struct {
/* 0x00 */ char name[16];

View File

@ -195,7 +195,7 @@ def write_ninja_rules(
ninja.rule(
"as",
description="as $in",
command=f"{cross}as -EB -march=vr4300 -mtune=vr4300 -Iinclude $in -o $out",
command=f"{cpp} {CPPFLAGS} {extra_cppflags} $cppflags $in -o - | {cross}as -EB -march=vr4300 -mtune=vr4300 -Iinclude -o $out",
)
ninja.rule(
@ -618,7 +618,7 @@ class Configure:
)
# Not dead cod
else:
if seg.get_most_parent().name not in ["main", "engine1", "engine2"]:
if non_matching or seg.get_most_parent().name not in ["main", "engine1", "engine2"]:
cflags += " -fno-common"
build(
entry.object_path,
@ -1287,7 +1287,7 @@ if __name__ == "__main__":
if args.shift:
extra_cppflags += " -DSHIFT"
extra_cflags += " -Wmissing-braces -Wimplicit -Wredundant-decls -Wstrict-prototypes"
extra_cflags += " -Wmissing-braces -Wimplicit -Wredundant-decls -Wstrict-prototypes -Wno-redundant-decls"
# add splat to python import path
sys.path.insert(0, str((ROOT / args.splat).resolve()))

View File

@ -374,28 +374,16 @@ dlabel D_800A0958
.space 2
dlabel D_800A095A
.space 1
dlabel D_800A095B
.space 1
.space 2
dlabel D_800A095C
.space 1
dlabel D_800A095D
.space 1
.space 2
dlabel D_800A095E
.space 1
dlabel D_800A095F
.space 1
.space 2
dlabel D_800A0960
.space 0x00000003
dlabel D_800A0963
.space 1
.space 0x00000004
dlabel D_800A0964
.space 4
@ -515,10 +503,7 @@ dlabel D_800A363C
.space 4
dlabel nuAuDmaMesgQ
.space 4
dlabel D_800A3644
.space 0x00000014
.space 0x18
dlabel nuAuDmaMesgBuf
.space 0x000000c8
@ -569,16 +554,7 @@ dlabel D_800A3FF4
.space 0x0000000c
dlabel gEffectGraphicsData
.space 0x000001b4
dlabel D_800A41B4
.space 0x0000000c
dlabel D_800A41C0
.space 4
dlabel D_800A41C4
.space 0x0000001c
.space 0x000001E0
dlabel gMapConfig
.space 4
@ -587,10 +563,9 @@ dlabel D_800A41E4
.space 4
dlabel gMapSettings
.space 4
.space 0x40
dlabel D_800A41EC
.space 0x00000044
.space 8
dlabel gCollisionRayStartX
.space 4
@ -735,23 +710,16 @@ dlabel piEventQueue
.space 0x18
dlabel piEventBuf
.space 4
dlabel D_800AF8AC
.space 4
.space 0x8
dlabel piAccessBuf
.space 4
.space 0x8
.space 0x24
.space 0x20
dlabel wMapTexName
.space 4
.space 0x18
dlabel D_800B0CF4
.space 0x00000014
dlabel D_800B0D08
dlabel __osThreadSave
.space 0x1b0

View File

@ -38,10 +38,7 @@ dlabel gAnimCount
.space 4
dlabel gMsgBGScrollAmtX
.space 2
dlabel D_801512DA
.space 2
.space 4
dlabel D_801512DC
.space 4
@ -161,12 +158,8 @@ dlabel D_80151664
.space 4
dlabel wEntityBlueprint
.space 0x00000074
.space 0x00000078
dlabel D_801516DC
.space 4
dlabel D_8015DCE0
.space 8
dlabel bEntityBlueprint
@ -242,10 +235,7 @@ dlabel D_80153223
.space 1
dlabel mdl_treeIterPos
.space 2
dlabel D_80153226
.space 2
.space 4
dlabel wFogSettings
.space 0x00000020
@ -374,52 +364,16 @@ dlabel entity_fog_enabled
.space 4
dlabel entity_fog_red
.space 1
dlabel D_8015437D
.space 1
dlabel D_8015437E
.space 1
dlabel D_8015437F
.space 1
.space 4
dlabel entity_fog_green
.space 1
dlabel D_80154381
.space 1
dlabel D_80154382
.space 1
dlabel D_80154383
.space 1
.space 4
dlabel entity_fog_blue
.space 1
dlabel D_80154385
.space 1
dlabel D_80154386
.space 1
dlabel D_80154387
.space 1
.space 4
dlabel entity_fog_alpha
.space 1
dlabel D_80154389
.space 1
dlabel D_8015438A
.space 1
dlabel D_8015438B
.space 1
.space 4
dlabel entity_fog_dist_min
.space 4
@ -643,10 +597,7 @@ dlabel D_80159394
.space 0x0000000c
dlabel gBackgroundPalette
.space 0x000001fe
dlabel D_8015959E
.space 2
.space 0x00000200
dlabel gBackroundLastScrollValue
.space 0x00000020
@ -709,13 +660,9 @@ dlabel gCollisionStatus
.space 0x00000028
dlabel gCurrentHiddenPanels
.space 2
.space 0x10
dlabel D_8015A57A
.space 2
dlabel D_8015A57C
.space 0x00000014
.space 8
dlabel mdl_textureHandles
.space 0x00002200

View File

@ -296,28 +296,16 @@ dlabel D_800A0958
.space 2
dlabel D_800A095A
.space 1
dlabel D_800A095B
.space 1
.space 2
dlabel D_800A095C
.space 1
dlabel D_800A095D
.space 1
.space 2
dlabel D_800A095E
.space 1
dlabel D_800A095F
.space 1
.space 2
dlabel D_800A0960
.space 3
dlabel D_800A0963
.space 1
.space 4
dlabel D_800A0964
.space 12

View File

@ -5,6 +5,8 @@
.set noreorder # don't insert nops after branches
.set gp=64 # allow use of 64-bit general purpose registers
#ifndef SHIFT
.section .bss
dlabel nuScPreNMIFlag
@ -366,28 +368,16 @@ dlabel D_800A0958
.space 2
dlabel D_800A095A
.space 1
dlabel D_800A095B
.space 1
.space 2
dlabel D_800A095C
.space 1
dlabel D_800A095D
.space 1
.space 2
dlabel D_800A095E
.space 1
dlabel D_800A095F
.space 1
.space 2
dlabel D_800A0960
.space 0x00000003
dlabel D_800A0963
.space 1
.space 0x00000004
dlabel D_800A0964
.space 4
@ -504,10 +494,7 @@ dlabel D_800A363C
.space 4
dlabel nuAuDmaMesgQ
.space 4
dlabel D_800A3644
.space 0x00000014
.space 0x18
dlabel nuAuDmaMesgBuf
.space 0x000000c8
@ -554,16 +541,7 @@ dlabel D_800A3FF4
.space 0x0000000c
dlabel gEffectGraphicsData
.space 0x000001b4
dlabel D_800A41B4
.space 0x0000000c
dlabel D_800A41C0
.space 4
dlabel D_800A41C4
.space 0x0000001c
.space 0x000001E0
dlabel gMapConfig
.space 4
@ -572,10 +550,9 @@ dlabel D_800A41E4
.space 4
dlabel gMapSettings
.space 4
.space 0x40
dlabel D_800A41EC
.space 0x00000044
.space 8
dlabel gCollisionRayStartX
.space 4
@ -674,22 +651,13 @@ dlabel piThreadStack
.space 0x1000
dlabel piEventQueue
.space 4
dlabel D_800AF890
.space 0x00000014
.space 0x18
dlabel piEventBuf
.space 4
dlabel D_800AF8AC
.space 4
.space 0x8
dlabel piAccessBuf
.space 4
dlabel D_800AF8B4
.space 0x0000000c
.space 0x10
dlabel tmp_task
.space 0x00000040
@ -707,85 +675,37 @@ dlabel D_800AF914
.space 4
dlabel viThread
.space 4
dlabel D_800AF91C
.space 0x1B4
.space 0x1B8
dlabel viThreadStack
.space 0x1000
dlabel viEventQueue
.space 4
dlabel D_800B0AD4
.space 0x00000014
.space 0x18
dlabel viEventBuf
.space 4
dlabel D_800B0AEC
.space 0x00000014
.space 0x18
dlabel viRetraceMsg
.space 2
dlabel D_800B0B02
.space 2
dlabel D_800B0B04
.space 4
dlabel D_800B0B08
.space 0x00000010
.space 0x18
dlabel viCounterMsg
.space 2
dlabel D_800B0B1A
.space 2
dlabel D_800B0B1C
.space 4
dlabel D_800B0B20
.space 0x00000010
.space 0x18
dlabel __MotorDataBuf
.space 4
dlabel D_800B0B34
.space 0x00000038
dlabel D_800B0B6C
.space 4
dlabel D_800B0B70
.space 0x000000c0
.space 0x100
dlabel __osFlashID
.space 4
dlabel D_800B0C34
.space 0x0000000c
.space 0x10
dlabel __osFlashMsg
.space 4
dlabel D_800B0C44
.space 0x00000014
.space 0x18
dlabel __osFlashMessageQ
.space 4
dlabel D_800B0C5C
.space 0x00000014
.space 0x18
dlabel __osFlashHandler
.space 4
dlabel D_800B0C74
.space 0x00000070
.space 0x74
dlabel __osFlashMsgBuf
.space 4
@ -797,34 +717,16 @@ dlabel D_800B0CEC
.space 4
dlabel wMapTexName
.space 4
.space 0x18
dlabel D_800B0CF4
.space 0x00000014
dlabel D_800B0D08
.space 4
dlabel D_800B0D0C
.space 0x000001ac
dlabel __osThreadSave
.space 0x000001B0
dlabel nuContWaitMesgQ
.space 4
dlabel D_800B0EBC
.space 0x00000014
.space 0x18
dlabel __osContPifRam
.space 4
dlabel D_800B0ED4
.space 0x00000034
dlabel D_800B0F08
.space 4
dlabel D_800B0F0C
.space 4
.space 0x40
dlabel gCurrentEncounter
.space 0x00000bf8
@ -872,16 +774,10 @@ dlabel D_800B3AE0
.space 0x800
dlabel gCollisionData
.space 4
dlabel D_800B42E4
.space 0x0000000c
.space 0x10
dlabel nuGfxMesgQ
.space 4
dlabel D_800B42F4
.space 0x00000014
.space 0x18
dlabel __CartRomHandle
.space 4
@ -914,10 +810,7 @@ dlabel D_800B431C
.space 0x00000064
dlabel __osPiAccessQueue
.space 4
dlabel D_800B4384
.space 0x00000014
.space 0x18
dlabel gEffectInstances
.space 0x00000180
@ -998,10 +891,7 @@ dlabel __osEventStateTab
.space 0x00000080
dlabel __osPfsPifRam
.space 0x0000003c
dlabel D_800DA03C
.space 4
.space 0x00000040
dlabel D_800DA040
.space 0x00000400
@ -1080,3 +970,5 @@ dlabel D_800DC4F8
dlabel gCurrentBattlePtr
.space 4
#endif

View File

@ -5,6 +5,8 @@
.set noreorder # don't insert nops after branches
.set gp=64 # allow use of 64-bit general purpose registers
#ifndef SHIFT
.section .bss
dlabel PulseStoneNotificationCallback
@ -108,3 +110,5 @@ dlabel D_8010C9B0
dlabel D_8010C9B4
.space 0x0000000c
#endif

View File

@ -5,6 +5,8 @@
.set noreorder # don't insert nops after branches
.set gp=64 # allow use of 64-bit general purpose registers
#ifndef SHIFT
.section .bss
dlabel wPartnerTetherDistance
@ -59,11 +61,11 @@ dlabel D_8010CFF8
.space 8
dlabel D_8010D000
.space 4
dlabel D_8010D004
.space 0x63C
dlabel D_8010D63C
.space 0x4
dlabel gPopupState
.space 4
@ -219,3 +221,5 @@ dlabel gPlayerData
dlabel gSpinHistoryPosAngle
.space 0x10
#endif

View File

@ -5,6 +5,8 @@
.set noreorder # don't insert nops after branches
.set gp=64 # allow use of 64-bit general purpose registers
#ifndef SHIFT
.section .bss
dlabel gAuxSpriteShadingProfile
@ -38,10 +40,7 @@ dlabel gAnimCount
.space 4
dlabel gMsgBGScrollAmtX
.space 2
dlabel D_801512DA
.space 2
.space 4
dlabel D_801512DC
.space 4
@ -161,12 +160,8 @@ dlabel D_80151664
.space 4
dlabel wEntityBlueprint
.space 0x00000074
.space 0x00000078
dlabel D_801516DC
.space 4
dlabel D_8015DCE0
.space 8
dlabel bEntityBlueprint
@ -242,10 +237,7 @@ dlabel D_80153223
.space 1
dlabel mdl_treeIterPos
.space 2
dlabel D_80153226
.space 2
.space 4
dlabel wFogSettings
.space 0x00000020
@ -374,52 +366,16 @@ dlabel entity_fog_enabled
.space 4
dlabel entity_fog_red
.space 1
dlabel D_8015437D
.space 1
dlabel D_8015437E
.space 1
dlabel D_8015437F
.space 1
.space 4
dlabel entity_fog_green
.space 1
dlabel D_80154381
.space 1
dlabel D_80154382
.space 1
dlabel D_80154383
.space 1
.space 4
dlabel entity_fog_blue
.space 1
dlabel D_80154385
.space 1
dlabel D_80154386
.space 1
dlabel D_80154387
.space 1
.space 4
dlabel entity_fog_alpha
.space 1
dlabel D_80154389
.space 1
dlabel D_8015438A
.space 1
dlabel D_8015438B
.space 1
.space 4
dlabel entity_fog_dist_min
.space 4
@ -638,10 +594,7 @@ dlabel D_80159394
.space 0x0000000c
dlabel gBackgroundPalette
.space 0x000001fe
dlabel D_8015959E
.space 2
.space 0x00000200
dlabel gBackroundLastScrollValue
.space 0x00000020
@ -704,13 +657,9 @@ dlabel gCollisionStatus
.space 0x00000028
dlabel gCurrentHiddenPanels
.space 2
.space 0x10
dlabel D_8015A57A
.space 2
dlabel D_8015A57C
.space 0x00000014
.space 8
dlabel mdl_textureHandles
.space 0x00002200
@ -725,7 +674,12 @@ dlabel CreateEntityVarArgBuffer
.space 0x00000010
dlabel D_8015C7E0
.space 0x7820
.space 0x20
dlabel D_8015C800
.space 0x7800
dlabel D_80164000
.space 0x32C60
#endif

View File

@ -8,10 +8,10 @@
.section .text, "ax"
glabel entry_point
/* 1000 80025C00 3C08800A */ lui $t0, %hi(nuScPreNMIFlag)
/* 1004 80025C04 2508A5B0 */ addiu $t0, $t0, %lo(nuScPreNMIFlag)
/* 1008 80025C08 3C090004 */ lui $t1, 4
/* 100C 80025C0C 25291F50 */ addiu $t1, $t1, 0x1f50
/* 1000 80025C00 3C08800A */ lui $t0, %hi(main_BSS_START)
/* 1004 80025C04 2508A5B0 */ addiu $t0, $t0, %lo(main_BSS_START)
/* 1008 80025C08 3C090004 */ lui $t1, %hi(main_BSS_SIZE)
/* 100C 80025C0C 25291F50 */ addiu $t1, $t1, %lo(main_BSS_SIZE)
.L80025C10:
/* 1010 80025C10 AD000000 */ sw $zero, ($t0)
/* 1014 80025C14 AD000004 */ sw $zero, 4($t0)

View File

@ -16,14 +16,14 @@ dlabel jtbl_80099DA0
.section .text, "ax"
glabel __osExceptionPreamble
/* 45DF0 8006A9F0 3C1A8007 */ lui $k0, %hi(osExceptionPreamble)
/* 45DF4 8006A9F4 275AAA00 */ addiu $k0, $k0, %lo(osExceptionPreamble)
/* 45DF0 8006A9F0 3C1A8007 */ lui $k0, %hi(__osException)
/* 45DF4 8006A9F4 275AAA00 */ addiu $k0, $k0, %lo(__osException)
/* 45DF8 8006A9F8 03400008 */ jr $k0
/* 45DFC 8006A9FC 00000000 */ nop
glabel osExceptionPreamble
/* 45E00 8006AA00 3C1A800B */ lui $k0, %hi(D_800B0D08)
/* 45E04 8006AA04 275A0D08 */ addiu $k0, $k0, %lo(D_800B0D08)
glabel __osException
/* 45E00 8006AA00 3C1A800B */ lui $k0, %hi(__osThreadSave)
/* 45E04 8006AA04 275A0D08 */ addiu $k0, $k0, %lo(__osThreadSave)
/* 45E08 8006AA08 FF410020 */ sd $at, 0x20($k0)
/* 45E0C 8006AA0C 401B6000 */ mfc0 $k1, $12
/* 45E10 8006AA10 AF5B0118 */ sw $k1, 0x118($k0)

View File

@ -2742,13 +2742,9 @@ D_800A0954 = 0x800A0954; // rom:0x7BD54
D_800A0956 = 0x800A0956; // rom:0x7BD56
D_800A0958 = 0x800A0958; // rom:0x7BD58
D_800A095A = 0x800A095A; // rom:0x7BD5A
D_800A095B = 0x800A095B; // rom:0x7BD5B
D_800A095C = 0x800A095C; // rom:0x7BD5C
D_800A095D = 0x800A095D; // rom:0x7BD5D
D_800A095E = 0x800A095E; // rom:0x7BD5E
D_800A095F = 0x800A095F; // rom:0x7BD5F
D_800A0960 = 0x800A0960; // rom:0x7BD60
D_800A0963 = 0x800A0963; // rom:0x7BD63
D_800A0964 = 0x800A0964; // rom:0x7BD64
D_800A0968 = 0x800A0968; // rom:0x7BD68
D_800A0970 = 0x800A0970; // rom:0x7BD70
@ -2820,7 +2816,6 @@ AlFrameSize = 0x800A3634; // rom:0x7EA34
AlMinFrameSize = 0x800A3638; // rom:0x7EA38
D_800A363C = 0x800A363C; // rom:0x7EA3C
nuAuDmaMesgQ = 0x800A3640; // rom:0x7EA40
D_800A3644 = 0x800A3644; // rom:0x7EA44
nuAuDmaMesgBuf = 0x800A3658; // rom:0x7EA58
nuAuDmaIOMesgBuf = 0x800A3720; // rom:0x7EB20
phys_clear_spin_history = 0x800E58F0; // type:func rom:0x7EDA0
@ -2847,13 +2842,9 @@ start_falling = 0x800E5FD0; // type:func rom:0x7F480
start_bounce_a = 0x800E6034; // type:func rom:0x7F4E4
start_bounce_b = 0x800E608C; // type:func rom:0x7F53C
check_input_hammer = 0x800E60E0; // type:func rom:0x7F590
D_800A41B4 = 0x800A41B4; // rom:0x7F5B4
D_800A41C0 = 0x800A41C0; // rom:0x7F5C0
D_800A41C4 = 0x800A41C4; // rom:0x7F5C4
gMap = 0x800A41E0; // rom:0x7F5E0
D_800A41E4 = 0x800A41E4; // rom:0x7F5E4
gMapSettings = 0x800A41E8; // rom:0x7F5E8
D_800A41EC = 0x800A41EC; // rom:0x7F5EC
check_input_jump = 0x800E6160; // type:func rom:0x7F610
gCollisionRayStartX = 0x800A4230; // rom:0x7F630
gCollisionRayStartY = 0x800A4234; // rom:0x7F634
@ -3037,50 +3028,25 @@ func_800F102C = 0x800F102C; // type:func rom:0x8A4DC
hide_popup_menu = 0x800F13B0; // type:func rom:0x8A860
destroy_popup_menu = 0x800F1538; // type:func rom:0x8A9E8
func_800F16CC = 0x800F16CC; // type:func rom:0x8AB7C
D_800AF890 = 0x800AF894; // rom:0x8AC94
piEventBuf = 0x800AF8A8; // rom:0x8ACA8
D_800AF8AC = 0x800AF8AC; // rom:0x8ACAC
piAccessBuf = 0x800AF8B0; // rom:0x8ACB0
D_800AF8B4 = 0x800AF8B4; // rom:0x8ACB4
tmp_task = 0x800AF8C0; // rom:0x8ACC0
siAccessBuf = 0x800AF900; // rom:0x8AD00
D_800AF904 = 0x800AF904; // rom:0x8AD04
retrace = 0x800AF910; // rom:0x8AD10
D_800AF914 = 0x800AF914; // rom:0x8AD14
viThread = 0x800AF918; // rom:0x8AD18
D_800AF91C = 0x800AF91C; // rom:0x8AD1C
popup_menu_update = 0x800F1A10; // type:func rom:0x8AEC0
viEventQueue = 0x800B0AD0; // rom:0x8BED0
D_800B0AD4 = 0x800B0AD4; // rom:0x8BED4
viEventBuf = 0x800B0AE8; // rom:0x8BEE8
D_800B0AEC = 0x800B0AEC; // rom:0x8BEEC
viRetraceMsg = 0x800B0B00; // rom:0x8BF00
D_800B0B02 = 0x800B0B02; // rom:0x8BF02
D_800B0B04 = 0x800B0B04; // rom:0x8BF04
D_800B0B08 = 0x800B0B08; // rom:0x8BF08
viCounterMsg = 0x800B0B18; // rom:0x8BF18
D_800B0B1A = 0x800B0B1A; // rom:0x8BF1A
D_800B0B1C = 0x800B0B1C; // rom:0x8BF1C
D_800B0B20 = 0x800B0B20; // rom:0x8BF20
__MotorDataBuf = 0x800B0B30; // rom:0x8BF30
D_800B0B34 = 0x800B0B34; // rom:0x8BF34
D_800B0B6C = 0x800B0B6C; // rom:0x8BF6C
D_800B0B70 = 0x800B0B70; // rom:0x8BF70
D_800B0C34 = 0x800B0C34; // rom:0x8C034
D_800B0C44 = 0x800B0C44; // rom:0x8C044
D_800B0C5C = 0x800B0C5C; // rom:0x8C05C
D_800B0C74 = 0x800B0C74; // rom:0x8C074
D_800B0CEC = 0x800B0CEC; // rom:0x8C0EC
wMapTexName = 0x800B0CF0; // rom:0x8C0F0
D_800B0CF4 = 0x800B0CF4; // rom:0x8C0F4
D_800B0D08 = 0x800B0D08; // rom:0x8C108
D_800B0D0C = 0x800B0D0C; // rom:0x8C10C
nuContWaitMesgQ = 0x800B0EB8; // rom:0x8C2B8
D_800B0EBC = 0x800B0EBC; // rom:0x8C2BC
__osContPifRam = 0x800B0ED0; // rom:0x8C2D0
D_800B0ED4 = 0x800B0ED4; // rom:0x8C2D4
D_800B0F08 = 0x800B0F08; // rom:0x8C308
D_800B0F0C = 0x800B0F0C; // rom:0x8C30C
gCurrentEncounter = 0x800B0F10; // rom:0x8C310 size:0xB0
popup_menu_draw_menu_contents = 0x800F3680; // type:func rom:0x8CB30
__Dom2SpeedParam = 0x800B1B08; // rom:0x8CF08
@ -3108,9 +3074,7 @@ create_battle_popup_menu = 0x800F513C; // type:func rom:0x8E5EC
func_800F52BC = 0x800F52BC; // type:func rom:0x8E76C
draw_box = 0x800F52E0; // type:func rom:0x8E790
gCollisionData = 0x800B42E0; // rom:0x8F6E0 size:0x10
D_800B42E4 = 0x800B42E4; // rom:0x8F6E4
nuGfxMesgQ = 0x800B42F0; // rom:0x8F6F0
D_800B42F4 = 0x800B42F4; // rom:0x8F6F4
__CartRomHandle = 0x800B4308; // rom:0x8F708
D_800B430C = 0x800B430C; // rom:0x8F70C
D_800B430D = 0x800B430D; // rom:0x8F70D
@ -3122,7 +3086,6 @@ D_800B4314 = 0x800B4314; // rom:0x8F714
D_800B4318 = 0x800B4318; // rom:0x8F718
D_800B431C = 0x800B431C; // rom:0x8F71C
__osPiAccessQueue = 0x800B4380; // rom:0x8F780
D_800B4384 = 0x800B4384; // rom:0x8F784
gEffectInstances = 0x800B4398; // rom:0x8F798
__Dom1SpeedParam = 0x800B4518; // rom:0x8F918
D_800B451C = 0x800B451C; // rom:0x8F91C
@ -4104,7 +4067,6 @@ update_model_animator_with_transform = 0x8011EA54; // type:func rom:0xB5154
step_model_animator = 0x8011EBF0; // type:func rom:0xB52F0
__osEventStateTab = 0x800D9F80; // rom:0xB5380
__osPfsPifRam = 0x800DA000; // rom:0xB5400
D_800DA03C = 0x800DA03C; // rom:0xB543C
D_800DA040 = 0x800DA040; // rom:0xB5440
animator_update_model_transforms = 0x8011F058; // type:func rom:0xB5758
animator_node_update_model_transform = 0x8011F118; // type:func rom:0xB5818
@ -4811,7 +4773,6 @@ gCurrentModels = 0x801512CC; // rom:0xE79CC
gHudElementCacheTablePalette = 0x801512D0; // rom:0xE79D0
gAnimCount = 0x801512D4; // rom:0xE79D4
gMsgBGScrollAmtX = 0x801512D8; // rom:0xE79D8
D_801512DA = 0x801512DA; // rom:0xE79DA
D_801512DC = 0x801512DC; // rom:0xE79DC
gCurrentTransformGroups = 0x801512E0; // rom:0xE79E0
gMsgGlobalWaveCounter = 0x801512E4; // rom:0xE79E4
@ -4856,8 +4817,6 @@ bEntityBlueprintSize = 0x80151660; // rom:0xE7D60
D_80151664 = 0x80151664; // rom:0xE7D64
wEntityBlueprint = 0x80151668; // rom:0xE7D68
start_script = 0x802C33E0; // type:func rom:0xE7D90
D_801516DC = 0x801516DC; // rom:0xE7DDC
D_8015DCE0 = 0x801516E0; // rom:0xE7DE0
bEntityBlueprint = 0x801516E8; // rom:0xE7DE8
D_801516FC = 0x801516FC; // rom:0xE7DFC
gMainGameState = 0x80151700; // rom:0xE7E00
@ -4936,7 +4895,6 @@ bBackgroundFogMode = 0x80153221; // rom:0xE9921
D_80153222 = 0x80153222; // rom:0xE9922
D_80153223 = 0x80153223; // rom:0xE9923
evt_handle_switch = 0x802C4F74; // type:func rom:0xE9924
D_80153226 = 0x80153226; // rom:0xE9926
wFogSettings = 0x80153228; // rom:0xE9928
bFogSettings = 0x80153248; // rom:0xE9948
gCurrentFogSettings = 0x80153264; // rom:0xE9964
@ -5027,21 +4985,9 @@ gCurrentEntityModelList = 0x80154370; // rom:0xEAA70
D_80154374 = 0x80154374; // rom:0xEAA74
entity_fog_enabled = 0x80154378; // rom:0xEAA78
entity_fog_red = 0x8015437C; // rom:0xEAA7C
D_8015437D = 0x8015437D; // rom:0xEAA7D
D_8015437E = 0x8015437E; // rom:0xEAA7E
D_8015437F = 0x8015437F; // rom:0xEAA7F
entity_fog_green = 0x80154380; // rom:0xEAA80
D_80154381 = 0x80154381; // rom:0xEAA81
D_80154382 = 0x80154382; // rom:0xEAA82
D_80154383 = 0x80154383; // rom:0xEAA83
entity_fog_blue = 0x80154384; // rom:0xEAA84
D_80154385 = 0x80154385; // rom:0xEAA85
D_80154386 = 0x80154386; // rom:0xEAA86
D_80154387 = 0x80154387; // rom:0xEAA87
entity_fog_alpha = 0x80154388; // rom:0xEAA88
D_80154389 = 0x80154389; // rom:0xEAA89
D_8015438A = 0x8015438A; // rom:0xEAA8A
D_8015438B = 0x8015438B; // rom:0xEAA8B
entity_fog_dist_min = 0x8015438C; // rom:0xEAA8C
entity_fog_dist_max = 0x80154390; // rom:0xEAA90
D_80154394 = 0x80154394; // rom:0xEAA94
@ -5224,7 +5170,6 @@ gCurrentTriggerListPtr = 0x80159390; // rom:0xEFA90
D_80159394 = 0x80159394; // rom:0xEFA94
gBackgroundPalette = 0x801593A0; // rom:0xEFAA0
ShakeCam = 0x802CB2A8; // type:func rom:0xEFC58
D_8015959E = 0x8015959E; // rom:0xEFC9E
gBackroundLastScrollValue = 0x801595A0; // rom:0xEFCA0
wSpriteShadingProfile = 0x801595C0; // rom:0xEFCC0
bSpriteShadingProfile = 0x80159670; // rom:0xEFD70
@ -5288,8 +5233,6 @@ GetCamPosC = 0x802CC214; // type:func rom:0xF0BC4
gCollisionStatus = 0x8015A550; // rom:0xF0C50 size:0x28
GetCamPosition = 0x802CC2A4; // type:func rom:0xF0C54
gCurrentHiddenPanels = 0x8015A578; // rom:0xF0C78
D_8015A57A = 0x8015A57A; // rom:0xF0C7A
D_8015A57C = 0x8015A57C; // rom:0xF0C7C
mdl_textureHandles = 0x8015A590; // rom:0xF0C90
WaitForCam = 0x802CC354; // type:func rom:0xF0D04
SetCamProperties = 0x802CC3EC; // type:func rom:0xF0D9C