mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-06 22:30:15 +00:00
z_En_Ossan and dependencies (#824)
* fix colliderinit typo * fix initchain * reloc * progress * progress * Pick off a few easy functions, reduce number of warnings * more tough OKs * Getting closer to all OK, fix en_girla header * some hard OKs, 7 to go * two funcs remaining * func_80AC7094 OK! * Fix warnings, begin documentation * get most of object_ossan documented, document some of en_ossan * improve en_girla function names * more EnOssan documentation * more documentation * en_tana basically complete, en_girla vars all named, en_ossan documentation improvements * delete TIME ITSELF * object_oF1d_map OK * more names, fixed a poition typo * Nearly all en_ossan functions named, all variables named * format.sh * forgot to delete data * implement pr changes * EnOssan OK! implement most of Roman's suggestions * ugh * implement figs suggestions * implement roman's suggestion * Can't tell my left from my other left Co-authored-by: fig02 <fig02srl@gmail.com>
This commit is contained in:
parent
7446e5eb80
commit
3fd05c9147
134 changed files with 3479 additions and 7998 deletions
|
@ -1,6 +1,7 @@
|
|||
#include "z_en_go.h"
|
||||
#include "overlays/actors/ovl_En_Bom/z_en_bom.h"
|
||||
#include "objects/gameplay_keep/gameplay_keep.h"
|
||||
#include "objects/object_oF1d_map/object_oF1d_map.h"
|
||||
|
||||
#define FLAGS 0x00000039
|
||||
|
||||
|
@ -34,17 +35,6 @@ void EnGo_AddDust(EnGo* this, Vec3f* pos, Vec3f* velocity, Vec3f* accel, u8 init
|
|||
void EnGo_UpdateDust(EnGo* this);
|
||||
void EnGo_DrawDust(EnGo* this, GlobalContext* globalCtx);
|
||||
|
||||
extern AnimationHeader D_060029A8;
|
||||
extern AnimationHeader D_06004930;
|
||||
extern Gfx D_0600BD80[];
|
||||
extern Gfx D_0600C140[];
|
||||
extern u64 D_0600CE80[];
|
||||
extern u64 D_0600DE80[];
|
||||
extern Gfx D_0600FD40[];
|
||||
extern Gfx D_0600FD50[];
|
||||
extern FlexSkeletonHeader D_0600FEF0;
|
||||
extern AnimationHeader D_06010590;
|
||||
|
||||
const ActorInit En_Go_InitVars = {
|
||||
ACTOR_EN_GO,
|
||||
ACTORCAT_NPC,
|
||||
|
@ -89,10 +79,10 @@ typedef struct {
|
|||
} EnGoAnimation;
|
||||
|
||||
static EnGoAnimation sAnimationEntries[] = {
|
||||
{ &D_06004930, 0.0f, ANIMMODE_LOOP_INTERP, 0.0f },
|
||||
{ &D_06004930, 0.0f, ANIMMODE_LOOP_INTERP, -10.0f },
|
||||
{ &D_060029A8, 1.0f, ANIMMODE_LOOP_INTERP, -10.0f },
|
||||
{ &D_06010590, 1.0f, ANIMMODE_LOOP_INTERP, -10.0f },
|
||||
{ &gGoronAnim_004930, 0.0f, ANIMMODE_LOOP_INTERP, 0.0f },
|
||||
{ &gGoronAnim_004930, 0.0f, ANIMMODE_LOOP_INTERP, -10.0f },
|
||||
{ &gGoronAnim_0029A8, 1.0f, ANIMMODE_LOOP_INTERP, -10.0f },
|
||||
{ &gGoronAnim_010590, 1.0f, ANIMMODE_LOOP_INTERP, -10.0f },
|
||||
};
|
||||
|
||||
void EnGo_SetupAction(EnGo* this, EnGoActionFunc actionFunc) {
|
||||
|
@ -463,10 +453,10 @@ void EnGo_ReverseAnimation(EnGo* this) {
|
|||
void EnGo_UpdateShadow(EnGo* this) {
|
||||
s16 shadowAlpha;
|
||||
f32 currentFrame = this->skelAnime.curFrame;
|
||||
s16 shadowAlphaTarget =
|
||||
(this->skelAnime.animation == &D_06004930 && currentFrame > 32.0f) || this->skelAnime.animation != &D_06004930
|
||||
? 255
|
||||
: 0;
|
||||
s16 shadowAlphaTarget = (this->skelAnime.animation == &gGoronAnim_004930 && currentFrame > 32.0f) ||
|
||||
this->skelAnime.animation != &gGoronAnim_004930
|
||||
? 255
|
||||
: 0;
|
||||
|
||||
shadowAlpha = this->actor.shape.shadowAlpha;
|
||||
Math_SmoothStepToS(&shadowAlpha, shadowAlphaTarget, 10, 60, 1);
|
||||
|
@ -636,7 +626,7 @@ void EnGo_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
Vec3f D_80A41BA8 = { 0.0f, 0.0f, 0.0f }; // unused
|
||||
|
||||
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f);
|
||||
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_0600FEF0, NULL, 0, 0, 0);
|
||||
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &gGoronSkel, NULL, 0, 0, 0);
|
||||
Collider_InitCylinder(globalCtx, &this->collider);
|
||||
Collider_SetCylinder(globalCtx, &this->collider, &this->actor, &sCylinderInit);
|
||||
CollisionCheck_SetInfo2(&this->actor.colChkInfo, DamageTable_Get(0x16), &sColChkInfoInit);
|
||||
|
@ -669,7 +659,7 @@ void EnGo_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
}
|
||||
break;
|
||||
case 0x10:
|
||||
this->skelAnime.curFrame = Animation_GetLastFrame(&D_06004930);
|
||||
this->skelAnime.curFrame = Animation_GetLastFrame(&gGoronAnim_004930);
|
||||
Actor_SetScale(&this->actor, 0.01f);
|
||||
EnGo_SetupAction(this, EnGo_FireGenericActionFunc);
|
||||
break;
|
||||
|
@ -846,7 +836,7 @@ void func_80A405CC(EnGo* this, GlobalContext* globalCtx) {
|
|||
f32 lastFrame;
|
||||
f32 frame;
|
||||
|
||||
lastFrame = Animation_GetLastFrame(&D_06004930);
|
||||
lastFrame = Animation_GetLastFrame(&gGoronAnim_004930);
|
||||
Math_SmoothStepToF(&this->skelAnime.playSpeed, (this->actor.params & 0xF0) == 0x90 ? 0.5f : 1.0f, 0.1f, 1000.0f,
|
||||
0.1f);
|
||||
|
||||
|
@ -931,13 +921,13 @@ void func_80A408D8(EnGo* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80A40A54(EnGo* this, GlobalContext* globalCtx) {
|
||||
f32 float1 = ((f32)0x8000 / Animation_GetLastFrame(&D_06010590));
|
||||
f32 float1 = ((f32)0x8000 / Animation_GetLastFrame(&gGoronAnim_010590));
|
||||
f32 float2 = this->skelAnime.curFrame * float1;
|
||||
|
||||
this->actor.speedXZ = Math_SinS((s16)float2);
|
||||
if (EnGo_FollowPath(this, globalCtx) && this->unk_218 == 0) {
|
||||
EnGo_ChangeAnimation(this, 1);
|
||||
this->skelAnime.curFrame = Animation_GetLastFrame(&D_06004930);
|
||||
this->skelAnime.curFrame = Animation_GetLastFrame(&gGoronAnim_004930);
|
||||
this->actor.speedXZ = 0.0f;
|
||||
EnGo_SetupAction(this, EnGo_BiggoronActionFunc);
|
||||
}
|
||||
|
@ -1019,7 +1009,7 @@ void EnGo_Eyedrops(EnGo* this, GlobalContext* globalCtx) {
|
|||
void func_80A40DCC(EnGo* this, GlobalContext* globalCtx) {
|
||||
if (this->unk_1E0.unk_00 == 2) {
|
||||
EnGo_ChangeAnimation(this, 1);
|
||||
this->skelAnime.curFrame = Animation_GetLastFrame(&D_06004930);
|
||||
this->skelAnime.curFrame = Animation_GetLastFrame(&gGoronAnim_004930);
|
||||
func_80106CCC(globalCtx);
|
||||
EnGo_SetupAction(this, EnGo_GetItem);
|
||||
EnGo_GetItem(this, globalCtx);
|
||||
|
@ -1063,7 +1053,7 @@ void EnGo_DrawCurledUp(EnGo* this, GlobalContext* globalCtx) {
|
|||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_go.c", 2326),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
||||
gSPDisplayList(POLY_OPA_DISP++, D_0600BD80);
|
||||
gSPDisplayList(POLY_OPA_DISP++, gGoronDL_00BD80);
|
||||
|
||||
Matrix_MultVec3f(&D_80A41BB4, &this->actor.focus.pos);
|
||||
Matrix_Pop();
|
||||
|
@ -1082,7 +1072,7 @@ void EnGo_DrawRolling(EnGo* this, GlobalContext* globalCtx) {
|
|||
MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_go.c", 2368),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_OPA_DISP++, D_0600C140);
|
||||
gSPDisplayList(POLY_OPA_DISP++, gGoronDL_00C140);
|
||||
Matrix_MultVec3f(&D_80A41BC0, &this->actor.focus.pos);
|
||||
Matrix_Pop();
|
||||
|
||||
|
@ -1151,8 +1141,8 @@ void EnGo_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
} else {
|
||||
func_800943C8(globalCtx->state.gfxCtx);
|
||||
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(D_0600CE80));
|
||||
gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(D_0600DE80));
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(gGoronCsEyeOpenTex));
|
||||
gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(gGoronCsMouthNeutralTex));
|
||||
|
||||
SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable,
|
||||
this->skelAnime.dListCount, EnGo_OverrideLimbDraw, EnGo_PostLimbDraw, &this->actor);
|
||||
|
@ -1225,7 +1215,7 @@ void EnGo_DrawDust(EnGo* this, GlobalContext* globalCtx) {
|
|||
if (dustEffect->type) {
|
||||
if (!firstDone) {
|
||||
POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 0);
|
||||
gSPDisplayList(POLY_XLU_DISP++, D_0600FD40);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gGoronDL_00FD40);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, 100, 60, 20, 0);
|
||||
firstDone = true;
|
||||
}
|
||||
|
@ -1241,7 +1231,7 @@ void EnGo_DrawDust(EnGo* this, GlobalContext* globalCtx) {
|
|||
|
||||
index = dustEffect->timer * (8.0f / dustEffect->initialTimer);
|
||||
gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(dustTex[index]));
|
||||
gSPDisplayList(POLY_XLU_DISP++, D_0600FD50);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gGoronDL_00FD50);
|
||||
}
|
||||
}
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_go.c", 2678);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue