mirror of
https://github.com/zeldaret/mm.git
synced 2026-08-18 13:13:22 -04:00
ovl_En_Ma_Yto: Cremia OK and mostly documented (#209)
* EnMaYto_Update * init * func_80B8E84C * CURRENT_DAY and run format * a few other functions * symlink to diff.py * identify lots of functions * and more functions * small * and a bunch more * Another bunch * small * another bunch of functions * And so on * Another bunch * func_80B8E6E0 * func_80B8E938 * func_80B8EA38 * Fix conflicts * Another bunch * two functions * func_80B9083C * func_80B8FA14 * OK * Import data * params and a bit of function renaming * Minor reorder in object_script * Fix merge issues and warnings * Rename a few stuff * fix merge issues * And more renames * More renames * And moreeee * Almost everything renamed * Clock time and reformat * Fix merge issues and add some undeclared functions * Reorder alphabetically * run format * Minor styling stuff * review changes * Update src/overlays/actors/ovl_En_Ma_Yto/z_en_ma_yto.h Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com> * Kenix's suggestions * engineer's suggestions * Run formatter * whoops Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>
This commit is contained in:
@@ -36,46 +36,11 @@ const ActorInit En_Ginko_Man_InitVars = {
|
||||
};
|
||||
|
||||
ActorAnimationEntry animations[] = {
|
||||
{
|
||||
object_ginko_floorsmacking_anim,
|
||||
1.0f,
|
||||
0.0f,
|
||||
0.0f,
|
||||
0,
|
||||
-4.0f,
|
||||
},
|
||||
{
|
||||
object_ginko_sitting_anim,
|
||||
1.0f,
|
||||
0.0f,
|
||||
0.0f,
|
||||
0,
|
||||
-4.0f,
|
||||
},
|
||||
{
|
||||
object_ginko_stamp_reach_anim,
|
||||
1.0f,
|
||||
0.0f,
|
||||
0.0f,
|
||||
2,
|
||||
-4.0f,
|
||||
},
|
||||
{
|
||||
object_ginko_advertising_anim,
|
||||
1.0f,
|
||||
0.0f,
|
||||
0.0f,
|
||||
0,
|
||||
-4.0f,
|
||||
}, // looking around for customers
|
||||
{
|
||||
object_ginko_amazed_anim,
|
||||
1.0f,
|
||||
0.0f,
|
||||
0.0f,
|
||||
0,
|
||||
-4.0f,
|
||||
},
|
||||
{ object_ginko_floorsmacking_anim, 1.0f, 0.0f, 0.0f, 0, -4.0f },
|
||||
{ object_ginko_sitting_anim, 1.0f, 0.0f, 0.0f, 0, -4.0f },
|
||||
{ object_ginko_stamp_reach_anim, 1.0f, 0.0f, 0.0f, 2, -4.0f },
|
||||
{ object_ginko_advertising_anim, 1.0f, 0.0f, 0.0f, 0, -4.0f }, // looking around for customers
|
||||
{ object_ginko_amazed_anim, 1.0f, 0.0f, 0.0f, 0, -4.0f },
|
||||
};
|
||||
|
||||
void EnGinkoMan_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -2,14 +2,71 @@
|
||||
#define Z_EN_MA_YTO_H
|
||||
|
||||
#include <global.h>
|
||||
#include "overlays/actors/ovl_En_Ma_Yts/z_en_ma_yts.h"
|
||||
|
||||
struct EnMaYto;
|
||||
|
||||
typedef void (*EnMaYtoActionFunc)(struct EnMaYto*, GlobalContext*);
|
||||
|
||||
typedef enum {
|
||||
/* 00 */ MA2_LIMB_NONE,
|
||||
/* 01 */ MA2_LIMB_ROOT,
|
||||
/* 02 */ MA2_LIMB_TORSO,
|
||||
/* 03 */ MA2_LIMB_ARM_LEFT,
|
||||
/* 04 */ MA2_LIMB_FOREARM_LEFT,
|
||||
/* 05 */ MA2_LIMB_HAND_LEFT,
|
||||
/* 06 */ MA2_LIMB_ARM_RIGHT,
|
||||
/* 07 */ MA2_LIMB_FOREARM_RIGHT,
|
||||
/* 08 */ MA2_LIMB_HAND_RIGHT,
|
||||
/* 09 */ MA2_LIMB_HEAD,
|
||||
/* 10 */ MA2_LIMB_HAIR,
|
||||
/* 11 */ MA2_LIMB_PELVIS,
|
||||
/* 12 */ MA2_LIMB_TIGHT_LEFT,
|
||||
/* 13 */ MA2_LIMB_LEG_LEFT,
|
||||
/* 14 */ MA2_LIMB_FOOT_LEFT,
|
||||
/* 15 */ MA2_LIMB_TIGHT_RIGHT,
|
||||
/* 16 */ MA2_LIMB_LEG_RIGHT,
|
||||
/* 17 */ MA2_LIMB_FOOT_RIGHT,
|
||||
/* 18 */ MA2_LIMB_DRESS_0,
|
||||
/* 19 */ MA2_LIMB_DRESS_1,
|
||||
/* 20 */ MA2_LIMB_DRESS_2,
|
||||
/* 21 */ MA2_LIMB_DRESS_3,
|
||||
/* 22 */ MA2_LIMB_MAX
|
||||
} ObjectMa2Limbs;
|
||||
|
||||
typedef struct EnMaYto {
|
||||
/* 0x000 */ Actor actor;
|
||||
/* 0x144 */ char unk_144[0x1E0];
|
||||
/* 0x144 */ SkelAnime skelAnime;
|
||||
/* 0x188 */ EnMaYtoActionFunc actionFunc;
|
||||
/* 0x18C */ ColliderCylinder collider;
|
||||
/* 0x1D8 */ struct_800BD888_arg1 unk_1D8;
|
||||
/* 0x200 */ s32 unk200; // unused
|
||||
/* 0x204 */ s32 type;
|
||||
/* 0x208 */ Vec3s limbDrawTbl[MA2_LIMB_MAX];
|
||||
/* 0x28C */ Vec3s transitionDrawTbl[MA2_LIMB_MAX];
|
||||
/* 0x310 */ s16 unk310; // state?
|
||||
/* 0x312 */ UNK_TYPE1 unk_312[0x2];
|
||||
/* 0x314 */ s16 currentAnim; // Used only in DefaultWait
|
||||
/* 0x316 */ s16 overrideEyeTexIndex; // If non-zero, then this index will be used instead of eyeTexIndex
|
||||
/* 0x318 */ s16 mouthTexIndex;
|
||||
/* 0x31A */ s16 eyeTexIndex;
|
||||
/* 0x31C */ s16 blinkTimer;
|
||||
/* 0x31E */ s16 unk31E;
|
||||
/* 0x320 */ s16 unk320;
|
||||
/* 0x322 */ u16 textId;
|
||||
} EnMaYto; // size = 0x324
|
||||
|
||||
extern const ActorInit En_Ma_Yto_InitVars;
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ MA_YTO_TYPE_DEFAULT, // Strokes cow on day 1
|
||||
/* 1 */ MA_YTO_TYPE_BARN,
|
||||
/* 2 */ MA_YTO_TYPE_DINNER,
|
||||
/* 3 */ MA_YTO_TYPE_AFTERMILKRUN, // After Milk Run minigame
|
||||
/* 4 */ MA_YTO_TYPE_4 // HugCutscene? Doesn't seem to work properly in-game
|
||||
} EnMaYtoType;
|
||||
|
||||
#define EN_MA_YTO_PARSE_TYPE(params) (((params)&0xF000) >> 12)
|
||||
#define EN_MA_YTO_PARAM(enMaYtsType, arg1) (((enMaYtsType) << 12) | ((arg1) << 8))
|
||||
|
||||
#endif // Z_EN_MA_YTO_H
|
||||
|
||||
@@ -146,7 +146,7 @@ void func_80B8D12C(EnMaYts* this, GlobalContext* globalCtx) {
|
||||
Player* player = PLAYER;
|
||||
s16 flag = this->unk_32C == 2 ? true : false;
|
||||
|
||||
if ((this->unk_32C == 0) || (this->actor.parent == NULL)) {
|
||||
if (this->unk_32C == 0 || this->actor.parent == NULL) {
|
||||
this->unk_1D8.unk_18 = player->actor.world.pos;
|
||||
this->unk_1D8.unk_18.y -= -10.0f;
|
||||
} else {
|
||||
@@ -218,7 +218,7 @@ s32 EnMaYts_CheckValidSpawn(EnMaYts* this, GlobalContext* globalCtx) {
|
||||
// Failing the alien invasion
|
||||
if (!(gSaveContext.weekEventReg[0x16] & 1)) {
|
||||
return false;
|
||||
} else if ((gSaveContext.time >= 0xD555) && (CURRENT_DAY == 3)) {
|
||||
} else if (gSaveContext.time >= CLOCK_TIME(20, 0) && CURRENT_DAY == 3) {
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -7,7 +7,6 @@ struct EnMaYts;
|
||||
|
||||
typedef void (*EnMaYtsActionFunc)(struct EnMaYts*, GlobalContext*);
|
||||
|
||||
// Limbs of OBJECT_MA1
|
||||
typedef enum {
|
||||
/* 00 */ MA1_LIMB_NONE,
|
||||
/* 01 */ MA1_LIMB_ROOT,
|
||||
|
||||
@@ -162,7 +162,7 @@ void EnNutsball_Update(Actor* thisx, GlobalContext* globalCtx) {
|
||||
void EnNutsball_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
EnNutsball* this = THIS;
|
||||
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx)
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx);
|
||||
func_8012C28C(globalCtx->state.gfxCtx);
|
||||
SysMatrix_InsertMatrix(&globalCtx->mf_187FC, 1);
|
||||
SysMatrix_InsertZRotation_s(this->actor.home.rot.z, 1);
|
||||
|
||||
@@ -383,7 +383,7 @@ s32 func_80BA3ED4(EnToto* this, GlobalContext* globalCtx) {
|
||||
|
||||
s32 func_80BA3EE8(EnToto* this, GlobalContext* globalCtx) {
|
||||
if (this->text->unk1 == 2) {
|
||||
func_800B7298(globalCtx, 0, 7);
|
||||
func_800B7298(globalCtx, NULL, 7);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -478,7 +478,7 @@ s32 func_80BA42BC(EnToto* this, GlobalContext* globalCtx) {
|
||||
Vec3s* end = &D_80BA510C[3];
|
||||
|
||||
func_80BA3FB0(this, globalCtx);
|
||||
func_800B7298(globalCtx, 0, 6);
|
||||
func_800B7298(globalCtx, NULL, 6);
|
||||
if (player->actor.world.pos.z > -310.0f) {
|
||||
if ((player->actor.world.pos.x > -150.0f) || (player->actor.world.pos.z > -172.0f)) {
|
||||
phi_s0 = 3;
|
||||
@@ -498,7 +498,7 @@ s32 func_80BA42BC(EnToto* this, GlobalContext* globalCtx) {
|
||||
s32 func_80BA43F4(EnToto* this, GlobalContext* globalCtx) {
|
||||
func_80BA3C88(this);
|
||||
if (func_80122760(globalCtx, this->unk2BC, 60.0f)) {
|
||||
func_800B7298(globalCtx, 0, 0x13);
|
||||
func_800B7298(globalCtx, NULL, 0x13);
|
||||
return func_80BA4204(this, globalCtx);
|
||||
}
|
||||
return 0;
|
||||
@@ -506,7 +506,7 @@ s32 func_80BA43F4(EnToto* this, GlobalContext* globalCtx) {
|
||||
|
||||
s32 func_80BA445C(EnToto* this, GlobalContext* globalCtx) {
|
||||
if (func_80BA4128(this, globalCtx)) {
|
||||
func_800B7298(globalCtx, 0, 6);
|
||||
func_800B7298(globalCtx, NULL, 6);
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
@@ -570,7 +570,7 @@ s32 func_80BA4530(EnToto* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
s32 func_80BA46D8(EnToto* this, GlobalContext* globalCtx) {
|
||||
func_800B7298(globalCtx, 0, 0x44);
|
||||
func_800B7298(globalCtx, NULL, 0x44);
|
||||
func_80152434(globalCtx, D_80BA5120[gSaveContext.playerForm == 4 ? 0 : gSaveContext.playerForm]);
|
||||
return 0;
|
||||
}
|
||||
@@ -626,7 +626,7 @@ s32 func_80BA47E0(EnToto* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
s32 func_80BA49A4(EnToto* this, GlobalContext* globalCtx) {
|
||||
func_800B7298(globalCtx, 0, 0x44);
|
||||
func_800B7298(globalCtx, NULL, 0x44);
|
||||
func_801A31EC(0x54, 4, this->unk2B3 ^ 0xF);
|
||||
this->unk2B1 = 4;
|
||||
return 0;
|
||||
@@ -646,7 +646,7 @@ s32 func_80BA4A00(EnToto* this, GlobalContext* globalCtx) {
|
||||
if (this->spotlights != NULL) {
|
||||
Actor_MarkForDeath(this->spotlights);
|
||||
}
|
||||
func_800B7298(globalCtx, 0, 0x45);
|
||||
func_800B7298(globalCtx, NULL, 0x45);
|
||||
if (this->unk2B3 == 0xF) {
|
||||
if (CURRENT_DAY == 1) {
|
||||
gSaveContext.weekEventReg[50] |= 1;
|
||||
|
||||
@@ -39,10 +39,11 @@ void ObjDinner_Update(Actor* thisx, GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
void ObjDinner_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
GraphicsContext* gfxCtx = globalCtx->state.gfxCtx;
|
||||
s32 pad;
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx);
|
||||
func_8012C28C(globalCtx->state.gfxCtx);
|
||||
|
||||
func_8012C28C(gfxCtx);
|
||||
gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(gfxCtx->polyOpa.p++, D_060011E0);
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_OPA_DISP++, D_060011E0);
|
||||
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user