more improvements

This commit is contained in:
mzxrules
2023-10-16 21:50:02 -04:00
parent efc9ad4f3d
commit 60d953cac4
2 changed files with 21 additions and 16 deletions
@@ -64,8 +64,12 @@ void EnHonotrap_UpdateFlameGroup(Actor* thisx, PlayState* play);
void EnHonotrap_DrawFlame(Actor* thisx, PlayState* play);
void EnHonotrap_DrawFlameGroup(Actor* thisx, PlayState* play);
static TexturePtr sSilverEyeTextures[HONOTRAP_EYE_MAX] = { gEyeSwitchSilverOpenTex, gEyeSwitchSilverHalfTex,
gEyeSwitchSilverClosedTex, gEyeSwitchSilverClosedTex };
static TexturePtr sSilverEyeTextures[HONOTRAP_EYE_MAX] = {
gEyeSwitchSilverOpenTex,
gEyeSwitchSilverHalfTex,
gEyeSwitchSilverClosedTex,
gEyeSwitchSilverClosedTex,
};
static s32 sIsFirstInitEye = true;
@@ -81,7 +85,7 @@ ActorInit En_Honotrap_InitVars = {
(ActorFunc)EnHonotrap_Draw,
};
static ColliderTrisElementInit sTrisElementsInit[2] = {
static ColliderTrisElementInit sTrisElementsInit[] = {
{
{
ELEMTYPE_UNK4,
@@ -187,7 +191,7 @@ void EnHonotrap_InitEye(EnHonotrap* this, PlayState* play) {
if (sIsFirstInitEye) {
sIsFirstInitEye = false;
for (k = 0; k < ARRAY_COUNT(sSilverEyeTextures); k++) {
for (k = 0; k < HONOTRAP_EYE_MAX; k++) {
sSilverEyeTextures[k] = Lib_SegmentedToVirtual(sSilverEyeTextures[k]);
}
}
@@ -684,8 +688,8 @@ void EnHonotrap_FlameGroup(EnHonotrap* this, PlayState* play) {
}
void EnHonotrap_Update(Actor* thisx, PlayState* play) {
static Vec3f velocity = { 0.0f, 0.0f, 0.0f };
static Vec3f accel = { 0.0f, 0.1f, 0.0f };
static Vec3f sVelocity = { 0.0f, 0.0f, 0.0f };
static Vec3f sAccel = { 0.0f, 0.1f, 0.0f };
EnHonotrap* this = (EnHonotrap*)thisx;
if (this->timer > 0) {
@@ -696,7 +700,7 @@ void EnHonotrap_Update(Actor* thisx, PlayState* play) {
}
this->actionFunc(this, play);
if (this->collider.tris.base.acFlags & AC_HIT) {
EffectSsBomb2_SpawnLayered(play, &this->actor.world.pos, &velocity, &accel, 15, 8);
EffectSsBomb2_SpawnLayered(play, &this->actor.world.pos, &sVelocity, &sAccel, 15, 8);
Actor_Kill(&this->actor);
return;
}
@@ -786,6 +790,7 @@ void EnHonotrap_DrawFlameGroup(Actor* thisx, PlayState* play) {
gDPSetEnvColor(POLY_XLU_DISP++, 255, 0, 0, 0);
Camera_GetCamDir(&camDir, GET_ACTIVE_CAM(play));
camDir.y += 0x8000;
//! FAKE:
this = ((EnHonotrap*)thisx);
flameGroup = &this->flameGroup;
for (i = 0; i < ARRAY_COUNT(flameGroup->flameList); i++) {
@@ -23,10 +23,10 @@ typedef struct {
} EnHonotrapFlameElement; // size = 0x14
typedef struct {
/* 0x00 */ f32 unk0;
/* 0x04 */ f32 unk4;
/* 0x08 */ f32 unk8;
/* 0x0C */ EnHonotrapFlameElement flameList[6];
/* 0x0 */ f32 unk0;
/* 0x4 */ f32 unk4;
/* 0x8 */ f32 unk8;
/* 0xC */ EnHonotrapFlameElement flameList[6];
} EnHonotrapFlameGroup; // size = 0x84;
typedef struct EnHonotrap {
@@ -45,11 +45,11 @@ typedef struct EnHonotrap {
} EnHonotrap; // size = 0x2C4
typedef enum {
HONOTRAP_TYPE_EYE,
HONOTRAP_TYPE_FLAME_MOVE,
HONOTRAP_TYPE_FLAME_DROP,
HONOTRAP_TYPE_EYE_MUTI_FLAME,
HONOTRAP_TYPE_FLAME_GROUP
/* 0 */ HONOTRAP_TYPE_EYE,
/* 1 */ HONOTRAP_TYPE_FLAME_MOVE,
/* 2 */ HONOTRAP_TYPE_FLAME_DROP,
/* 3 */ HONOTRAP_TYPE_EYE_MUTI_FLAME,
/* 4 */ HONOTRAP_TYPE_FLAME_GROUP
} EnHonotrapType;
#endif // Z_EN_HONOTRAP_H