1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-03 06:24:30 +00:00

Document object_pu_box and related actors (#918)

* object_pu_box-related doc

* Cleanup undefined_syms.txt
This commit is contained in:
Dragorn421 2021-10-23 03:28:16 +02:00 committed by GitHub
parent 5d89d85aba
commit 4b10b22baa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 19 additions and 24 deletions

View file

@ -1,10 +1,11 @@
/*
* File: z_bg_pushbox.c
* Overlay: ovl_Bg_Pushbox
* Description:
* Description: Unused (and non functional) pushable block
*/
#include "z_bg_pushbox.h"
#include "objects/object_pu_box/object_pu_box.h"
#define FLAGS 0x00000000
@ -15,12 +16,13 @@ void BgPushbox_Destroy(Actor* thisx, GlobalContext* globalCtx);
void BgPushbox_Update(Actor* thisx, GlobalContext* globalCtx);
void BgPushbox_Draw(Actor* thisx, GlobalContext* globalCtx);
void func_808A8BAC(BgPushbox* this, GlobalContext* globalCtx);
void BgPushbox_UpdateImpl(BgPushbox* this, GlobalContext* globalCtx);
const ActorInit Bg_Pushbox_InitVars = {
ACTOR_BG_PUSHBOX,
ACTORCAT_BG,
FLAGS,
//! @bug fixing this actor would involve using OBJECT_PU_BOX
OBJECT_GAMEPLAY_DANGEON_KEEP,
sizeof(BgPushbox),
(ActorFunc)BgPushbox_Init,
@ -29,9 +31,6 @@ const ActorInit Bg_Pushbox_InitVars = {
(ActorFunc)BgPushbox_Draw,
};
extern Gfx D_06000000[];
extern CollisionHeader D_06000350;
static InitChainEntry sInitChain[] = {
ICHAIN_F32_DIV1000(gravity, -2000, ICHAIN_STOP),
};
@ -48,10 +47,10 @@ void BgPushbox_Init(Actor* thisx, GlobalContext* globalCtx) {
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
DynaPolyActor_Init(&this->dyna, DPM_UNK);
CollisionHeader_GetVirtual(&D_06000350, &colHeader);
CollisionHeader_GetVirtual(&gBlockSmallCol, &colHeader);
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
ActorShape_Init(&this->dyna.actor.shape, 0.0f, NULL, 0.0f);
BgPushbox_SetupAction(this, func_808A8BAC);
BgPushbox_SetupAction(this, BgPushbox_UpdateImpl);
}
void BgPushbox_Destroy(Actor* thisx, GlobalContext* globalCtx) {
@ -60,7 +59,7 @@ void BgPushbox_Destroy(Actor* thisx, GlobalContext* globalCtx) {
DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
}
void func_808A8BAC(BgPushbox* this, GlobalContext* globalCtx) {
void BgPushbox_UpdateImpl(BgPushbox* this, GlobalContext* globalCtx) {
this->dyna.actor.speedXZ += this->dyna.unk_150 * 0.2f;
this->dyna.actor.speedXZ = (this->dyna.actor.speedXZ < -1.0f)
? -1.0f
@ -86,7 +85,7 @@ void BgPushbox_Draw(Actor* thisx, GlobalContext* globalCtx) {
func_80093D18(globalCtx->state.gfxCtx);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_pushbox.c", 269),
G_MTX_NOPUSH | G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(POLY_OPA_DISP++, &D_06000000);
gSPDisplayList(POLY_OPA_DISP++, &gBlockSmallDL);
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_pushbox.c", 272);
}

View file

@ -57,7 +57,7 @@ void EnPubox_Init(Actor* thisx, GlobalContext* globalCtx) {
this->dyna.unk_15C = DPM_UNK;
thisx->targetMode = 1;
thisx->gravity = -2.0f;
CollisionHeader_GetVirtual(&gUnknownUnusedBox2Col, &colHeader);
CollisionHeader_GetVirtual(&gBlockMediumCol, &colHeader);
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, thisx, colHeader);
}
@ -87,5 +87,5 @@ void EnPubox_Update(Actor* thisx, GlobalContext* globalCtx) {
}
void EnPubox_Draw(Actor* thisx, GlobalContext* globalCtx) {
Gfx_DrawDListOpa(globalCtx, gUnknownUnusedBox2DL);
Gfx_DrawDListOpa(globalCtx, gBlockMediumDL);
}