mirror of
https://github.com/zeldaret/mm.git
synced 2026-08-19 13:24:02 -04:00
ovl_Boss_03: Gyorg OK (#736)
* Boss03_Init NON_EQUIVALENT * rand functions * Boss03_Draw * match the limb draws * Match Boss03_Init by Synray and Engineer * A bit of cleanup * a bunch of functions * another bunch of functions * func_809E299C and GyorgEffect * import data * A bit of cleanup * effects related functions * func_809E2DA0 * func_809E34B8 NON_EQUIVALENT * func_809E3968 NON_EQUIVALENT * func_809E3D98 * func_809E421C NON_EQUIVALENT * func_809E475C * func_809E497C * func_809E4C90 * func_809E6640 NON_MATCHING * func_809E6A38 * Match func_809E6640 by Tharo * func_809E7D00 * func_809E8810 * func_809E4E80 NON_EQUIVALENT * func_809E5B64 * func_809E6CB4 * Boss03_Update NON_EQUIVALENT * func_809E81E4 attempt * Boss03_Update improvement thanks to Petrie * func_809E81E4 NON_MATCHING * func_809E34B8 is at least equivalent * cleanups * format * import bss * more cleanup and minor renames * Match func_809E81E4 * cleanup effect functions * a few more renames * func_809E4E80 matched by Maide * documentation pass * name workTimer * macros * More renames * Improve func_809E34B8 a bit and match Boss03_ChewPlayer * defines placeholders for work timer, enum for effects and other minor renames * actorfixer * some cleanups * effects named * Some more renames and cleanups * more cleanups * Boss03_UpdateCollision, Boss03_SeaweedUpdate and Boss03_SeaweedDraw * Rename more actionfuncs * cleanup undefined syms * collision stuff and run formatter * more cleanups * more cleanups i forgot to commit * and yet more clenaup * Add notes * Remove debugging stuff * format * Match the last 3 functions by Anon58 * bit of cleaning * Update src/overlays/actors/ovl_Boss_03/z_boss_03.c Co-authored-by: Derek Hensley <hensley.derek58@gmail.com> * Update src/overlays/actors/ovl_Boss_03/z_boss_03.c Co-authored-by: Derek Hensley <hensley.derek58@gmail.com> * Update src/overlays/actors/ovl_Boss_03/z_boss_03.c Co-authored-by: Derek Hensley <hensley.derek58@gmail.com> * Update src/overlays/actors/ovl_Boss_03/z_boss_03.c Co-authored-by: Derek Hensley <hensley.derek58@gmail.com> * Update src/overlays/actors/ovl_Boss_03/z_boss_03.c Co-authored-by: Derek Hensley <hensley.derek58@gmail.com> * Update src/overlays/actors/ovl_Boss_03/z_boss_03.c Co-authored-by: Derek Hensley <hensley.derek58@gmail.com> * PR * format * Remove some if (1) from Boss03_IntroCutscene * Update src/overlays/actors/ovl_Boss_03/z_boss_03.h Co-authored-by: EllipticEllipsis <73679967+EllipticEllipsis@users.noreply.github.com> * Update src/overlays/actors/ovl_Boss_03/z_boss_03.c Co-authored-by: EllipticEllipsis <73679967+EllipticEllipsis@users.noreply.github.com> * Update src/overlays/actors/ovl_Boss_03/z_boss_03.c Co-authored-by: EllipticEllipsis <73679967+EllipticEllipsis@users.noreply.github.com> * Update src/overlays/actors/ovl_Boss_03/z_boss_03.c Co-authored-by: EllipticEllipsis <73679967+EllipticEllipsis@users.noreply.github.com> * Update src/overlays/actors/ovl_Boss_03/z_boss_03.c Co-authored-by: EllipticEllipsis <73679967+EllipticEllipsis@users.noreply.github.com> * Update src/overlays/actors/ovl_Boss_03/z_boss_03.c Co-authored-by: EllipticEllipsis <73679967+EllipticEllipsis@users.noreply.github.com> * Update src/overlays/actors/ovl_Boss_03/z_boss_03.c Co-authored-by: EllipticEllipsis <73679967+EllipticEllipsis@users.noreply.github.com> * Update src/overlays/actors/ovl_Boss_03/z_boss_03.c Co-authored-by: EllipticEllipsis <73679967+EllipticEllipsis@users.noreply.github.com> * Update src/overlays/actors/ovl_Boss_03/z_boss_03.c Co-authored-by: EllipticEllipsis <73679967+EllipticEllipsis@users.noreply.github.com> * Update src/overlays/actors/ovl_Boss_03/z_boss_03.c Co-authored-by: EllipticEllipsis <73679967+EllipticEllipsis@users.noreply.github.com> * PR * address pr * prevent_bss_reordering * Anon review * seaweed stuff thanks to elliptic * format * whoops * huh * Update src/overlays/actors/ovl_Boss_03/z_boss_03.c Co-authored-by: EllipticEllipsis <73679967+EllipticEllipsis@users.noreply.github.com> * Update src/overlays/actors/ovl_Boss_03/z_boss_03.c Co-authored-by: EllipticEllipsis <73679967+EllipticEllipsis@users.noreply.github.com> * Update src/overlays/actors/ovl_Boss_03/z_boss_03.c Co-authored-by: EllipticEllipsis <73679967+EllipticEllipsis@users.noreply.github.com> * address PR Co-authored-by: EllipticEllipsis <elliptic.ellipsis@gmail.com> * Update src/overlays/actors/ovl_Boss_03/z_boss_03.c Co-authored-by: EllipticEllipsis <73679967+EllipticEllipsis@users.noreply.github.com> * Update src/overlays/actors/ovl_Boss_03/z_boss_03.c Co-authored-by: EllipticEllipsis <73679967+EllipticEllipsis@users.noreply.github.com> * Address PR Co-authored-by: EllipticEllipsis <elliptic.ellipsis@gmail.com> * Sectioning * whoops * a Co-authored-by: EllipticEllipsis <elliptic.ellipsis@gmail.com> * a * kinda * , * Update src/overlays/actors/ovl_Boss_03/z_boss_03.c Co-authored-by: Tom Overton <tom-overton@users.noreply.github.com> * Update src/overlays/actors/ovl_Boss_03/z_boss_03.c Co-authored-by: Tom Overton <tom-overton@users.noreply.github.com> * Update src/overlays/actors/ovl_Boss_03/z_boss_03.c Co-authored-by: Tom Overton <tom-overton@users.noreply.github.com> * Update src/overlays/actors/ovl_Boss_03/z_boss_03.c Co-authored-by: Tom Overton <tom-overton@users.noreply.github.com> * Update src/overlays/actors/ovl_Boss_03/z_boss_03.c Co-authored-by: Tom Overton <tom-overton@users.noreply.github.com> * Update src/overlays/actors/ovl_Boss_03/z_boss_03.c Co-authored-by: Tom Overton <tom-overton@users.noreply.github.com> * Update src/overlays/actors/ovl_Boss_03/z_boss_03.c Co-authored-by: Tom Overton <tom-overton@users.noreply.github.com> * remove redundant comment * actorfixer Co-authored-by: Derek Hensley <hensley.derek58@gmail.com> Co-authored-by: EllipticEllipsis <73679967+EllipticEllipsis@users.noreply.github.com> Co-authored-by: EllipticEllipsis <elliptic.ellipsis@gmail.com> Co-authored-by: Tom Overton <tom-overton@users.noreply.github.com>
This commit is contained in:
+5
-5
@@ -3799,13 +3799,13 @@ void func_800BC7D8(GlobalContext* globalCtx, s16 y, s16 countdown, s16 speed) {
|
||||
Quake_SetCountdown(idx, countdown);
|
||||
}
|
||||
|
||||
void func_800BC848(Actor* actor, GlobalContext* globalCtx, s16 arg2, s16 arg3) {
|
||||
if (arg2 >= 5) {
|
||||
void func_800BC848(Actor* actor, GlobalContext* globalCtx, s16 y, s16 countdown) {
|
||||
if (y >= 5) {
|
||||
func_8013ECE0(actor->xyzDistToPlayerSq, 255, 20, 150);
|
||||
} else {
|
||||
func_8013ECE0(actor->xyzDistToPlayerSq, 180, 20, 100);
|
||||
}
|
||||
func_800BC770(globalCtx, arg2, arg3);
|
||||
func_800BC770(globalCtx, y, countdown);
|
||||
}
|
||||
|
||||
typedef struct {
|
||||
@@ -4232,11 +4232,11 @@ Gfx D_801AEFA0[] = {
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
void* func_800BD9A0(GraphicsContext* gfxCtx) {
|
||||
Gfx* func_800BD9A0(GraphicsContext* gfxCtx) {
|
||||
Gfx* displayListHead;
|
||||
Gfx* displayList;
|
||||
|
||||
displayListHead = displayList = GRAPH_ALLOC(gfxCtx, 0x10);
|
||||
displayListHead = displayList = GRAPH_ALLOC(gfxCtx, sizeof(Gfx) * 2);
|
||||
|
||||
gDPSetRenderMode(displayListHead++,
|
||||
AA_EN | Z_CMP | Z_UPD | IM_RD | CLR_ON_CVG | CVG_DST_WRAP | ZMODE_XLU | FORCE_BL |
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -2,22 +2,109 @@
|
||||
#define Z_BOSS_03_H
|
||||
|
||||
#include "global.h"
|
||||
#include "objects/object_boss03/object_boss03.h"
|
||||
|
||||
struct Boss03;
|
||||
|
||||
typedef void (*Boss03ActionFunc)(struct Boss03*, GlobalContext*);
|
||||
|
||||
#define GYORG_WORK_TIMER_MAX 3
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u8 type;
|
||||
/* 0x02 */ s16 unk_02;
|
||||
/* 0x04 */ Vec3f pos;
|
||||
/* 0x10 */ Vec3f velocity;
|
||||
/* 0x1C */ Vec3f accel;
|
||||
/* 0x28 */ UNK_TYPE1 unk_28[0x4];
|
||||
/* 0x2C */ s16 alpha;
|
||||
/* 0x2E */ s16 alphaDelta;
|
||||
/* 0x30 */ UNK_TYPE1 unk_30[0x4];
|
||||
/* 0x34 */ Vec3f unk_34; // it may not be a Vec3f
|
||||
/* 0x40 */ f32 unk_40; // colorIntensity?
|
||||
} GyorgEffect; // size = 0x44
|
||||
|
||||
#define GYORG_EFFECT_COUNT 150
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ GYORG_EFFECT_NONE,
|
||||
/* 1 */ GYORG_EFFECT_BUBBLE,
|
||||
/* 2 */ GYORG_EFFECT_DROPLET,
|
||||
/* 3 */ GYORG_EFFECT_SPLASH,
|
||||
/* 4 */ GYORG_EFFECT_WET_SPOT,
|
||||
} GyorgEffectType;
|
||||
|
||||
typedef struct Boss03 {
|
||||
/* 0x0000 */ Actor actor;
|
||||
/* 0x0144 */ UNK_TYPE1 unk_144[0x10E];
|
||||
/* 0x0252 */ s8 unk_252; // number of Tanron3 fish that are currently alive, maybe "numSmallFishAlive"?
|
||||
/* 0x0253 */ UNK_TYPE1 unk_253[0xD1];
|
||||
/* 0x0324 */ s16 unk_324;
|
||||
/* 0x0326 */ UNK_TYPE1 unk_326[0x2];
|
||||
/* 0x0144 */ UNK_TYPE1 unk_144[0x04];
|
||||
/* 0x0148 */ SkelAnime skelAnime;
|
||||
/* 0x018C */ Vec3s jointTable[GYORG_LIMB_MAX];
|
||||
/* 0x01E6 */ Vec3s morphTable[GYORG_LIMB_MAX];
|
||||
/* 0x0240 */ s16 unk_240; // generic timer? used by Gyorg and seaweed
|
||||
/* 0x0242 */ u8 unk_242;
|
||||
/* 0x0243 */ UNK_TYPE1 unk_243[0x09];
|
||||
/* 0x024C */ s16 workTimer[GYORG_WORK_TIMER_MAX];
|
||||
/* 0x0252 */ s8 numSpawnedSmallFish; // number of Tanron3 fish that are currently alive, -1 indexed
|
||||
/* 0x0253 */ u8 hasSpwanedSmallFishes; // Tanron
|
||||
/* 0x0254 */ s16 bubbleEffectSpawnCount; // Amount of bubble effect which will be spawned by Update
|
||||
/* 0x0258 */ f32 waterHeight; // always 430.0f
|
||||
/* 0x025C */ s16 unk_25C; // Timer related to collision?
|
||||
/* 0x025E */ s16 unk_25E;
|
||||
/* 0x0260 */ f32 unk_260; // rotY
|
||||
/* 0x0264 */ UNK_TYPE1 unk_264[0x04];
|
||||
/* 0x0268 */ Vec3f unk_268; // set to player.world.pos or random values
|
||||
/* 0x0274 */ s16 unk_274;
|
||||
/* 0x0276 */ s16 unk_276;
|
||||
/* 0x0278 */ f32 unk_278;
|
||||
/* 0x027C */ f32 unk_27C;
|
||||
/* 0x0280 */ s16 unk_280;
|
||||
/* 0x0284 */ f32 unk_284; // Maybe a Vec3f
|
||||
/* 0x0288 */ f32 unk_288; // Set but not used
|
||||
/* 0x028C */ f32 unk_28C;
|
||||
/* 0x0290 */ u8 unk_290;
|
||||
/* 0x0294 */ f32 unk_294;
|
||||
/* 0x0298 */ f32 unk_298;
|
||||
/* 0x029C */ s16 leftFinYRot;
|
||||
/* 0x029E */ s16 rightFinYRot;
|
||||
/* 0x02A0 */ s16 bodyYRot;
|
||||
/* 0x02A2 */ Vec3s unk_2A2;
|
||||
/* 0x02A8 */ s16 jawZRot;
|
||||
/* 0x02AC */ Vec3f insideJawPos; // used to grab player
|
||||
/* 0x02B8 */ f32 unk_2B8;
|
||||
/* 0x02BC */ u8 unk_2BC; // set but not used
|
||||
/* 0x02BD */ u8 unk_2BD; // playerUnderwater?
|
||||
/* 0x02BE */ s16 unk_2BE;
|
||||
/* 0x02C0 */ UNK_TYPE1 unk_2C0[0x04];
|
||||
/* 0x02C0 */ f32 unk_2C4;
|
||||
/* 0x02C8 */ Vec3f prevPlayerPos;
|
||||
/* 0x02D4 */ u8 wetSpotEffectSpawnCount;
|
||||
/* 0x02D5 */ u8 unk_2D5; // flag
|
||||
/* 0x02D6 */ s16 shapeRotTargetX;
|
||||
/* 0x02D8 */ s16 shapeRotTargetY;
|
||||
/* 0x02DA */ s16 shapeRotTargetZ;
|
||||
/* 0x02DC */ Vec3f seaweedSegmentPositions[6];
|
||||
/* 0x0324 */ s16 unk_324; // timer? set by Tanron3
|
||||
/* 0x0328 */ Boss03ActionFunc actionFunc;
|
||||
/* 0x032C */ UNK_TYPE1 unk_32C[0x250];
|
||||
/* 0x032C */ ColliderJntSph headCollider;
|
||||
/* 0x034C */ ColliderJntSphElement headColliderElements[2];
|
||||
/* 0x03CC */ ColliderJntSph bodyCollider;
|
||||
/* 0x03EC */ ColliderJntSphElement bodyColliderElements[5];
|
||||
/* 0x052C */ f32 floppingAnimLastFrame;
|
||||
/* 0x0530 */ u32 csTimer;
|
||||
/* 0x0534 */ s16 csState;
|
||||
/* 0x0536 */ s16 csCamId;
|
||||
/* 0x0538 */ Vec3f csCamEye;
|
||||
/* 0x0544 */ Vec3f csCamAt;
|
||||
/* 0x0550 */ Vec3f csCamTargetEye;
|
||||
/* 0x055C */ Vec3f csCamTargetAt;
|
||||
/* 0x0568 */ f32 unk_568;
|
||||
/* 0x056C */ f32 unk_56C;
|
||||
/* 0x0570 */ f32 unk_570; // set but not used
|
||||
/* 0x0574 */ UNK_TYPE1 unk_574[0x04];
|
||||
/* 0x0578 */ f32 cameraFov;
|
||||
} Boss03; // size = 0x57C
|
||||
|
||||
extern const ActorInit Boss_03_InitVars;
|
||||
|
||||
#define GYORG_PARAM_DEFAULT (0)
|
||||
#define GYORG_PARAM_SEAWEED (0x23)
|
||||
|
||||
#endif // Z_BOSS_03_H
|
||||
|
||||
@@ -86,12 +86,12 @@ static ColliderCylinderInit sUnusedCylinderInit = {
|
||||
};
|
||||
|
||||
void EnTanron3_CreateEffect(GlobalContext* globalCtx, Vec3f* effectPos) {
|
||||
UnkTanron3Effect* effectPtr = (UnkTanron3Effect*)globalCtx->specialEffects;
|
||||
GyorgEffect* effectPtr = globalCtx->specialEffects;
|
||||
s16 i;
|
||||
|
||||
for (i = 0; i < 150; i++, effectPtr++) {
|
||||
if ((effectPtr->type == 0) || (effectPtr->type == 1)) {
|
||||
effectPtr->type = 2;
|
||||
for (i = 0; i < GYORG_EFFECT_COUNT; i++, effectPtr++) {
|
||||
if ((effectPtr->type == GYORG_EFFECT_NONE) || (effectPtr->type == GYORG_EFFECT_BUBBLE)) {
|
||||
effectPtr->type = GYORG_EFFECT_DROPLET;
|
||||
effectPtr->pos = *effectPos;
|
||||
effectPtr->velocity = *sZeroVec;
|
||||
effectPtr->accel = *sZeroVec;
|
||||
@@ -124,7 +124,7 @@ void EnTanron3_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
void EnTanron3_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
sGyorg->unk_252--;
|
||||
sGyorg->numSpawnedSmallFish--;
|
||||
}
|
||||
|
||||
void EnTanron3_SpawnBubbles(EnTanron3* this, GlobalContext* globalCtx) {
|
||||
|
||||
@@ -10,17 +10,6 @@ typedef void (*EnTanron3ActionFunc)(struct EnTanron3*, GlobalContext*);
|
||||
|
||||
#define TANRON3_WORK_TIMER_MAX 3
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u8 type;
|
||||
/* 0x02 */ s16 unk_02;
|
||||
/* 0x04 */ Vec3f pos;
|
||||
/* 0x10 */ Vec3f velocity;
|
||||
/* 0x1C */ Vec3f accel;
|
||||
/* 0x28 */ char unk_28[0xC];
|
||||
/* 0x34 */ Vec3f unk_34;
|
||||
/* 0x40 */ char unk_40[0x4];
|
||||
} UnkTanron3Effect;
|
||||
|
||||
typedef struct EnTanron3 {
|
||||
/* 0x000 */ Actor actor;
|
||||
/* 0x144 */ SkelAnime skelAnime;
|
||||
|
||||
Reference in New Issue
Block a user