Import some bss (#1301)

* flg_set

* EnItem00

* pad_801DC9C0

* EventMgr

* sPad

* files.txt

* const s32 sPad
This commit is contained in:
Derek Hensley 2023-06-25 16:49:39 -07:00 committed by GitHub
parent 283a37affb
commit a2c2c45a0e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 56 additions and 56 deletions

View File

@ -2066,7 +2066,6 @@ extern u8 gSequenceTable[];
extern u8 gSampleBankTable[];
// bss
// extern UNK_TYPE1 D_801ED890;
// extern UNK_TYPE1 D_801ED894;
extern CollisionPoly* D_801ED8B0;
extern s32 D_801ED8B4;
@ -2154,11 +2153,6 @@ extern UNK_TYPE D_801F4DDC;
extern u8 gDisablePlayerCsModeStartPos;
extern s16 gDungeonBossWarpSceneId;
extern ActorCutscene* sSceneCutsceneList;
extern s16 sSceneCutsceneCount;
extern u8 sWaitingCutsceneList[16];
// extern UNK_TYPE1 D_801F4E08;
extern u8 sNextCutsceneList[16];
// extern UNK_TYPE1 D_801F4E20;
extern u8 D_801F4E30;
// extern UNK_TYPE1 D_801F4E31;

4
spec
View File

@ -434,7 +434,6 @@ beginseg
include "build/data/code/gspS2DEX2.fifo.data.o"
include "build/data/code/njpgdspMain.data.o"
include "build/src/code/z_en_a_keep.o"
include "build/data/code/code_801E3FA0.bss.o"
include "build/src/code/z_en_item00.o"
include "build/src/code/z_eff_blure.o"
include "build/src/code/z_eff_shield_particle.o"
@ -446,8 +445,6 @@ beginseg
include "build/src/code/z_effect_soft_sprite_old_init.o"
include "build/src/code/z_effect_soft_sprite_dlftbls.o"
include "build/src/code/flg_set.o"
include "build/data/code/flg_set.bss.o"
include "build/src/code/pad_801DC9C0.o"
include "build/src/code/z_DLF.o"
include "build/src/code/z_actor.o"
include "build/data/code/z_actor.bss.o"
@ -473,7 +470,6 @@ beginseg
include "build/src/code/z_face_reaction.o"
include "build/src/code/z_env_flags.o"
include "build/src/code/z_eventmgr.o"
include "build/data/code/z_eventmgr.bss.o"
include "build/src/code/z_fcurve_data.o"
include "build/src/code/z_fcurve_data_skelanime.o"
include "build/src/code/z_fireobj.o"

View File

@ -265,7 +265,7 @@ void FlagSet_Update(GameState* gameState) {
}
}
extern s32 D_801ED890;
s32 sFlagBitIndex;
void FlagSet_Draw(GameState* gameState) {
GraphicsContext* gfxCtx = gameState->gfxCtx;
@ -288,23 +288,23 @@ void FlagSet_Draw(GameState* gameState) {
GfxPrint_SetPos(&printer, 12, 15);
// Print the flag bits in the current byte, largest to smallest
for (D_801ED890 = 7; D_801ED890 >= 0; D_801ED890--) {
for (sFlagBitIndex = 7; sFlagBitIndex >= 0; sFlagBitIndex--) {
// Highlight current flag bit in white, rest in grey
if ((u32)D_801ED890 == sCurrentBit) {
if (sFlagBitIndex == sCurrentBit) {
GfxPrint_SetColor(&printer, 200, 200, 200, 255);
} else {
GfxPrint_SetColor(&printer, 100, 100, 100, 255);
}
// Display 1 if flag set and 0 if not
if (*sFlagEntries[sEntryIndex].value & (1 << D_801ED890)) {
if (*sFlagEntries[sEntryIndex].value & (1 << sFlagBitIndex)) {
GfxPrint_Printf(&printer, "1");
} else {
GfxPrint_Printf(&printer, "0");
}
// Add a space after each group of 4
if ((D_801ED890 % 4) == 0) {
if ((sFlagBitIndex % 4) == 0) {
GfxPrint_Printf(&printer, " ");
}
}
@ -318,3 +318,5 @@ void FlagSet_Draw(GameState* gameState) {
CLOSE_DISPS(gfxCtx);
}
static const s32 sPad[5] = { 0 };

View File

@ -1 +0,0 @@
static const char pad_801DC9C0[] = { 0 };

View File

@ -59,6 +59,8 @@ static InitChainEntry sInitChain[] = {
ICHAIN_F32(targetArrowOffset, 2000, ICHAIN_STOP),
};
static s32 sBssPad;
void EnItem00_SetObject(EnItem00* this, PlayState* play, f32* shadowOffset, f32* shadowScale) {
Actor_SetObjectDependency(play, &this->actor);
Actor_SetScale(&this->actor, 0.5f);
@ -74,43 +76,43 @@ void EnItem00_Init(Actor* thisx, PlayState* play) {
f32 shadowOffset = 980.0f;
f32 shadowScale = 6.0f;
s32 getItemId = GI_NONE;
s32 sp30 = ENITEM00_GET_8000(&this->actor) ? 1 : 0;
s32 sp30 = ENITEM00_GET_8000(thisx) ? 1 : 0;
this->collectibleFlag = ENITEM00_GET_7F00(&this->actor);
this->collectibleFlag = ENITEM00_GET_7F00(thisx);
thisx->params &= 0xFF; // Has to be thisx to match
thisx->params &= 0xFF;
if (Flags_GetCollectible(play, this->collectibleFlag)) {
if (this->actor.params == ITEM00_HEART_PIECE) {
if (thisx->params == ITEM00_HEART_PIECE) {
sp30 = 0;
this->collectibleFlag = 0;
this->actor.params = ITEM00_RECOVERY_HEART;
thisx->params = ITEM00_RECOVERY_HEART;
} else {
Actor_Kill(&this->actor);
Actor_Kill(thisx);
return;
}
}
if (this->actor.params == ITEM00_3_HEARTS) {
this->actor.params = ITEM00_RECOVERY_HEART;
if (thisx->params == ITEM00_3_HEARTS) {
thisx->params = ITEM00_RECOVERY_HEART;
}
Actor_ProcessInitChain(&this->actor, sInitChain);
Collider_InitAndSetCylinder(play, &this->collider, &this->actor, &sCylinderInit);
Actor_ProcessInitChain(thisx, sInitChain);
Collider_InitAndSetCylinder(play, &this->collider, thisx, &sCylinderInit);
this->unk150 = 1;
switch (this->actor.params) {
switch (thisx->params) {
case ITEM00_RUPEE_GREEN:
case ITEM00_RUPEE_BLUE:
case ITEM00_RUPEE_RED:
Actor_SetScale(&this->actor, 0.015f);
Actor_SetScale(thisx, 0.015f);
this->unk154 = 0.015f;
shadowOffset = 750.0f;
break;
case ITEM00_SMALL_KEY:
this->unk150 = 0;
Actor_SetScale(&this->actor, 0.03f);
Actor_SetScale(thisx, 0.03f);
this->unk154 = 0.03f;
shadowOffset = 350.0f;
break;
@ -118,18 +120,18 @@ void EnItem00_Init(Actor* thisx, PlayState* play) {
case ITEM00_HEART_PIECE:
case ITEM00_HEART_CONTAINER:
this->unk150 = 0;
Actor_SetScale(&this->actor, 0.02f);
Actor_SetScale(thisx, 0.02f);
this->unk154 = 0.02f;
shadowOffset = 650.0f;
if (this->actor.params == ITEM00_HEART_CONTAINER) {
if (thisx->params == ITEM00_HEART_CONTAINER) {
sp30 = -1;
}
break;
case ITEM00_RECOVERY_HEART:
this->actor.home.rot.z = Rand_CenteredFloat(0xFFFF);
thisx->home.rot.z = Rand_CenteredFloat(0xFFFF);
shadowOffset = 430.0f;
Actor_SetScale(&this->actor, 0.02f);
Actor_SetScale(thisx, 0.02f);
this->unk154 = 0.02f;
break;
@ -137,7 +139,7 @@ void EnItem00_Init(Actor* thisx, PlayState* play) {
case ITEM00_ARROWS_30:
case ITEM00_ARROWS_40:
case ITEM00_ARROWS_50:
Actor_SetScale(&this->actor, 0.035f);
Actor_SetScale(thisx, 0.035f);
this->unk154 = 0.035f;
shadowOffset = 250.0f;
break;
@ -149,25 +151,25 @@ void EnItem00_Init(Actor* thisx, PlayState* play) {
case ITEM00_MAGIC_SMALL:
case ITEM00_NUTS_10:
case ITEM00_BOMBS_0:
Actor_SetScale(&this->actor, 0.03f);
Actor_SetScale(thisx, 0.03f);
this->unk154 = 0.03f;
shadowOffset = 320.0f;
break;
case ITEM00_MAGIC_LARGE:
Actor_SetScale(&this->actor, 4.5f * 0.01f);
Actor_SetScale(thisx, 4.5f * 0.01f);
this->unk154 = 4.5f * 0.01f;
shadowOffset = 320.0f;
break;
case ITEM00_RUPEE_HUGE:
Actor_SetScale(&this->actor, 4.5f * 0.01f);
Actor_SetScale(thisx, 4.5f * 0.01f);
this->unk154 = 4.5f * 0.01f;
shadowOffset = 750.0f;
break;
case ITEM00_RUPEE_PURPLE:
Actor_SetScale(&this->actor, 0.03f);
Actor_SetScale(thisx, 0.03f);
this->unk154 = 0.03f;
shadowOffset = 750.0f;
break;
@ -175,22 +177,22 @@ void EnItem00_Init(Actor* thisx, PlayState* play) {
case ITEM00_FLEXIBLE:
case ITEM00_BIG_FAIRY:
shadowOffset = 500.0f;
Actor_SetScale(&this->actor, 0.01f);
Actor_SetScale(thisx, 0.01f);
this->unk154 = 0.01f;
break;
case ITEM00_SHIELD_HERO:
this->actor.objBankIndex = Object_GetIndex(&play->objectCtx, OBJECT_GI_SHIELD_2);
thisx->objBankIndex = Object_GetIndex(&play->objectCtx, OBJECT_GI_SHIELD_2);
EnItem00_SetObject(this, play, &shadowOffset, &shadowScale);
break;
case ITEM00_MAP:
this->actor.objBankIndex = Object_GetIndex(&play->objectCtx, OBJECT_GI_MAP);
thisx->objBankIndex = Object_GetIndex(&play->objectCtx, OBJECT_GI_MAP);
EnItem00_SetObject(this, play, &shadowOffset, &shadowScale);
break;
case ITEM00_COMPASS:
this->actor.objBankIndex = Object_GetIndex(&play->objectCtx, OBJECT_GI_COMPASS);
thisx->objBankIndex = Object_GetIndex(&play->objectCtx, OBJECT_GI_COMPASS);
EnItem00_SetObject(this, play, &shadowOffset, &shadowScale);
break;
@ -199,9 +201,9 @@ void EnItem00_Init(Actor* thisx, PlayState* play) {
}
this->unk14E = 0;
ActorShape_Init(&this->actor.shape, shadowOffset, ActorShadow_DrawCircle, shadowScale);
this->actor.shape.shadowAlpha = 180;
this->actor.focus.pos = this->actor.world.pos;
ActorShape_Init(&thisx->shape, shadowOffset, ActorShadow_DrawCircle, shadowScale);
thisx->shape.shadowAlpha = 180;
thisx->focus.pos = thisx->world.pos;
this->getItemId = GI_NONE;
if (sp30 < 0) {
@ -219,11 +221,11 @@ void EnItem00_Init(Actor* thisx, PlayState* play) {
this->unk152 = 15;
this->unk14C = 35;
this->actor.speed = 0.0f;
this->actor.velocity.y = 0.0f;
this->actor.gravity = 0.0f;
thisx->speed = 0.0f;
thisx->velocity.y = 0.0f;
thisx->gravity = 0.0f;
switch (this->actor.params) {
switch (thisx->params) {
case ITEM00_RUPEE_GREEN:
Item_Give(play, ITEM_RUPEE_GREEN);
break;
@ -298,8 +300,8 @@ void EnItem00_Init(Actor* thisx, PlayState* play) {
break;
}
if ((getItemId != GI_NONE) && !Actor_HasParent(&this->actor, play)) {
Actor_OfferGetItem(&this->actor, play, getItemId, 50.0f, 20.0f);
if ((getItemId != GI_NONE) && !Actor_HasParent(thisx, play)) {
Actor_OfferGetItem(thisx, play, getItemId, 50.0f, 20.0f);
}
this->actionFunc = func_800A6A40;
@ -373,7 +375,7 @@ static Vec3f sEffectVelocity = { 0.0f, 0.1f, 0.0f };
static Vec3f sEffectAccel = { 0.0f, 0.01f, 0.0f };
void func_800A6650(EnItem00* this, PlayState* play) {
u32 pad;
s32 pad;
Vec3f pos;
if (this->actor.params <= ITEM00_RUPEE_RED) {

View File

@ -55,6 +55,13 @@ CutsceneManager sCutsceneMgr = {
CS_ID_NONE, 0, CS_ID_NONE, SUB_CAM_ID_DONE, NULL, CS_START_0, NULL, CAM_ID_MAIN, false,
};
ActorCutscene* sSceneCutsceneList;
s16 sSceneCutsceneCount;
u8 sWaitingCutsceneList[16];
static s32 sBssPad;
u8 sNextCutsceneList[16];
static s32 sBssPad2;
s16 CutsceneManager_SetHudVisibility(s16 csHudVisibility) {
u16 hudVisibility;

View File

@ -68,7 +68,7 @@ Vec3f D_80947B10[] = {
{ -1.0f, -2.0f, -0.2f }, { 0.0f, -2.0f, -0.2f }, { 1.0f, -2.0f, -0.2f }, { 0.0f, -3.0f, -0.5f },
};
static s32 sPad[2] = { 0, 0 };
static s32 sPad[2] = { 0 };
#include "overlays/ovl_En_Sda/ovl_En_Sda.c"

View File

@ -30,7 +30,7 @@ ActorInit En_Tanron1_InitVars = {
(ActorFunc)EnTanron1_Draw,
};
static u64 sPad = { 0 };
static s32 sPad[2] = { 0 };
#include "overlays/ovl_En_Tanron1/ovl_En_Tanron1.c"

View File

@ -691,7 +691,7 @@
0x801E3F40 : "njpgdspMain",
# .bss section
0x801E3FA0 : "code_801E3FA0",
0x801E3FA0 : "z_en_item00",
0x801E3FB0 : "z_effect",
0x801ED890 : "flg_set",
0x801ED8A0 : "z_actor",

View File

@ -3799,7 +3799,7 @@
0x801E3F40:("njpgdspMainDataStart","UNK_TYPE1","",0x1),
0x801E3FA0:("D_801E3FA0","UNK_TYPE1","",0x1),
0x801E3FB0:("sEffectContext","EffectContext","",0x98E0),
0x801ED890:("D_801ED890","UNK_TYPE1","",0x1),
0x801ED890:("sFlagBitIndex","UNK_TYPE1","",0x1),
0x801ED894:("D_801ED894","UNK_TYPE1","",0x1),
0x801ED8A0:("sActorFaultClient","UNK_TYPE1","",0x1),
0x801ED8B0:("D_801ED8B0","UNK_TYPE1","",0x1),