mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-03 06:24:30 +00:00
Match retail BSS ordering (#1927)
* Match retail BSS ordering * Revert moving some global variables to headers * Adjust block numbers after header changes * Fix debug build * Overlay bss ordering * Fix BSS ordering after header changes * gc-eu-mq OK * Implement preprocessor for #pragma increment_block_number * Transfer usage comment from reencode.sh * Use temporary directory instead of temporary file * Move ColChkMassType back
This commit is contained in:
parent
a94661054e
commit
f643499462
25 changed files with 224 additions and 165 deletions
|
@ -100,12 +100,22 @@ static ColliderCylinderInit sLightBallCylinderInit = {
|
|||
static u8 D_808E4C58[] = { 0, 12, 10, 12, 14, 16, 12, 14, 16, 12, 14, 16, 12, 14, 16, 10, 16, 14 };
|
||||
static Vec3f sZeroVec = { 0.0f, 0.0f, 0.0f };
|
||||
|
||||
// For retail BSS ordering, the block number of sGanondorf must be 0 or just above.
|
||||
|
||||
// TODO: There's probably a way to do this with less padding by spreading the variables out and moving
|
||||
// data around. It would be easier if we had more options for controlling BSS ordering in debug.
|
||||
#pragma increment_block_number 50
|
||||
|
||||
static EnGanonMant* sCape;
|
||||
|
||||
#pragma increment_block_number 200
|
||||
|
||||
static s32 sSeed1;
|
||||
static s32 sSeed2;
|
||||
static s32 sSeed3;
|
||||
|
||||
#pragma increment_block_number 200
|
||||
|
||||
static BossGanon* sGanondorf;
|
||||
|
||||
static EnZl3* sZelda;
|
||||
|
|
|
@ -14,6 +14,9 @@
|
|||
#include "assets/scenes/dungeons/ice_doukutu/ice_doukutu_scene.h"
|
||||
#include "terminal.h"
|
||||
|
||||
// For retail BSS ordering, the block number of sSfxPos
|
||||
// must be between 0 and 213 inclusive.
|
||||
|
||||
#define FLAGS ACTOR_FLAG_4
|
||||
|
||||
void EnXc_Init(Actor* thisx, PlayState* play);
|
||||
|
@ -387,6 +390,8 @@ s32 EnXc_SerenadeCS(EnXc* this, PlayState* play) {
|
|||
void EnXc_DoNothing(EnXc* this, PlayState* play) {
|
||||
}
|
||||
|
||||
static Vec3f sSfxPos;
|
||||
|
||||
void EnXc_SetWalkingSFX(EnXc* this, PlayState* play) {
|
||||
s32 pad[2];
|
||||
u32 sfxId;
|
||||
|
@ -432,7 +437,6 @@ void EnXc_SetLandingSFX(EnXc* this, PlayState* play) {
|
|||
}
|
||||
|
||||
void EnXc_SetColossusAppearSFX(EnXc* this, PlayState* play) {
|
||||
static Vec3f sXyzDist;
|
||||
s16 sceneId;
|
||||
|
||||
if (gSaveContext.sceneLayer == 4) {
|
||||
|
@ -445,14 +449,14 @@ void EnXc_SetColossusAppearSFX(EnXc* this, PlayState* play) {
|
|||
if (csCurFrame == 119) {
|
||||
Vec3f pos = { -611.0f, 728.0f, -2.0f };
|
||||
|
||||
SkinMatrix_Vec3fMtxFMultXYZW(&play->viewProjectionMtxF, &pos, &sXyzDist, wDest);
|
||||
Sfx_PlaySfxAtPos(&sXyzDist, NA_SE_EV_JUMP_CONC);
|
||||
SkinMatrix_Vec3fMtxFMultXYZW(&play->viewProjectionMtxF, &pos, &sSfxPos, wDest);
|
||||
Sfx_PlaySfxAtPos(&sSfxPos, NA_SE_EV_JUMP_CONC);
|
||||
} else if (csCurFrame == 164) {
|
||||
Vec3f pos = { -1069.0f, 38.0f, 0.0f };
|
||||
s32 pad;
|
||||
|
||||
SkinMatrix_Vec3fMtxFMultXYZW(&play->viewProjectionMtxF, &pos, &sXyzDist, wDest);
|
||||
Sfx_PlaySfxAtPos(&sXyzDist, NA_SE_PL_WALK_GROUND + SURFACE_SFX_OFFSET_STONE);
|
||||
SkinMatrix_Vec3fMtxFMultXYZW(&play->viewProjectionMtxF, &pos, &sSfxPos, wDest);
|
||||
Sfx_PlaySfxAtPos(&sSfxPos, NA_SE_PL_WALK_GROUND + SURFACE_SFX_OFFSET_STONE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -466,8 +470,6 @@ void func_80B3D118(PlayState* play) {
|
|||
}
|
||||
}
|
||||
|
||||
static Vec3f D_80B42DA0;
|
||||
|
||||
void EnXc_SetColossusWindSFX(PlayState* play) {
|
||||
if (gSaveContext.sceneLayer == 4) {
|
||||
static s32 D_80B41D90 = 0;
|
||||
|
@ -1394,7 +1396,10 @@ void func_80B3F3D8(void) {
|
|||
Sfx_PlaySfxCentered2(NA_SE_PL_SKIP);
|
||||
}
|
||||
|
||||
#pragma increment_block_number 20
|
||||
|
||||
void EnXc_PlayDiveSFX(Vec3f* src, PlayState* play) {
|
||||
static Vec3f D_80B42DA0;
|
||||
f32 wDest[2];
|
||||
|
||||
SkinMatrix_Vec3fMtxFMultXYZW(&play->viewProjectionMtxF, src, &D_80B42DA0, wDest);
|
||||
|
|
|
@ -10,6 +10,9 @@
|
|||
#include "assets/objects/object_fish/object_fish.h"
|
||||
#include "terminal.h"
|
||||
|
||||
// For retail BSS ordering, the block number of sStreamSfxProjectedPos must be 0.
|
||||
#pragma increment_block_number 201
|
||||
|
||||
#define FLAGS ACTOR_FLAG_4
|
||||
|
||||
#define WATER_SURFACE_Y(play) play->colCtx.colHeader->waterBoxes->ySurface
|
||||
|
|
|
@ -353,11 +353,24 @@ void Player_Action_80850E84(Player* this, PlayState* play);
|
|||
void Player_Action_CsAction(Player* this, PlayState* play);
|
||||
|
||||
// .bss part 1
|
||||
|
||||
// For retail BSS ordering, the block number of sDogSpawnPos in Player_Update
|
||||
// must be between 0 and 53 inclusive.
|
||||
|
||||
// TODO: There's probably a way to do this with less padding by spreading the variables out and moving
|
||||
// data around. It would be easier if we had more options for controlling BSS ordering in debug.
|
||||
#pragma increment_block_number 30
|
||||
|
||||
static s32 D_80858AA0;
|
||||
|
||||
#pragma increment_block_number 250
|
||||
|
||||
static s32 D_80858AA4;
|
||||
static Vec3f sInteractWallCheckResult;
|
||||
static Input* sControlInput;
|
||||
|
||||
#pragma increment_block_number 50
|
||||
|
||||
// .data
|
||||
|
||||
static u8 sUpperBodyLimbCopyMap[PLAYER_LIMB_MAX] = {
|
||||
|
@ -11376,8 +11389,6 @@ typedef struct {
|
|||
|
||||
static BunnyEarKinematics sBunnyEarKinematics;
|
||||
|
||||
static Vec3s D_80858AD8[25];
|
||||
|
||||
static Gfx* sMaskDlists[PLAYER_MASK_MAX - 1] = {
|
||||
gLinkChildKeatonMaskDL, gLinkChildSkullMaskDL, gLinkChildSpookyMaskDL, gLinkChildBunnyHoodDL,
|
||||
gLinkChildGoronMaskDL, gLinkChildZoraMaskDL, gLinkChildGerudoMaskDL, gLinkChildMaskOfTruthDL,
|
||||
|
@ -14080,6 +14091,7 @@ void Player_Action_80850AEC(Player* this, PlayState* play) {
|
|||
|
||||
void Player_Action_80850C68(Player* this, PlayState* play) {
|
||||
if ((this->av2.actionVar2 != 0) && ((this->unk_858 != 0.0f) || (this->unk_85C != 0.0f))) {
|
||||
static Vec3s D_80858AD8[25];
|
||||
f32 updateScale = R_UPDATE_RATE * 0.5f;
|
||||
|
||||
this->skelAnime.curFrame += this->skelAnime.playSpeed * updateScale;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue