mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-06 06:10:21 +00:00
Decompile King Dodongo and his fire effect (#744)
* Fixed upstream * move .data * match init * mathc func_808C1D00 * match func_808C32F4, func_808C2B38, func_808C3224, func_808C2AB0 * match func_808C30F4, func_808C2A40, func_808C3704, func_808C3704 * func_808C18B0 * match another chain of functions * Match func_808C29B0, Draw, and most of OverrideLimbDraw * start update * Really close * Almost match update, match Override Limb Draw * start the big switch * Make a little progress on the big switch function * Test * chip away at the big one some more * test * progress * More progress * Add * Finished another chain of functions * Decomp effect functions * Get the whole file in C * Move data to its own C file * Start the effect file en_bdfire.c * Messed up expected * Finish EnBdfire.c * A little clean up * done as far as I can get it * Delete scenes directory * Delete graphs directory * Delete graphovl.py * match and such * Delete BossDodongo_Update.s * PR fixes * restore old IDO * Color Filter * PR fixes (Roman) * Fixed added assets * remove asm * PR fixes (Roman) * quick format change * remove unwanted files Co-authored-by: Louis <5883445+louist103@users.noreply.github.com> Co-authored-by: petrie911 <pmontag@DESKTOP-LG8A167.localdomain> Co-authored-by: Fig02 <fig02srl@gmail.com>
This commit is contained in:
parent
8d2a2a8e46
commit
d22b746128
64 changed files with 2294 additions and 6396 deletions
File diff suppressed because it is too large
Load diff
|
@ -6,9 +6,96 @@
|
|||
|
||||
struct BossDodongo;
|
||||
|
||||
typedef void (*BossDodongoActionFunc)(struct BossDodongo*, GlobalContext*);
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ Vec3f unk_00;
|
||||
/* 0x0C */ Vec3f unk_0C;
|
||||
/* 0x18 */ Vec3f unk_18;
|
||||
/* 0x24 */ u8 unk_24;
|
||||
/* 0x25 */ u8 unk_25;
|
||||
/* 0x26 */ Color_RGB8 color;
|
||||
/* 0x2A */ s16 alpha;
|
||||
/* 0x2C */ f32 unk_2C;
|
||||
} BossDodongoEffect; // Size = 0x30
|
||||
|
||||
typedef struct BossDodongo {
|
||||
/* 0x0000 */ Actor actor;
|
||||
/* 0x014C */ char unk_14C[0x16D4];
|
||||
/* 0x014C */ SkelAnime skelAnime;
|
||||
/* 0x0190 */ BossDodongoActionFunc actionFunc;
|
||||
/* 0x0194 */ s16 health;
|
||||
/* 0x0196 */ s16 unk_196;
|
||||
/* 0x0198 */ s16 unk_198;
|
||||
/* 0x019A */ s16 unk_19A;
|
||||
/* 0x019C */ s16 csState;
|
||||
/* 0x019E */ s16 unk_19E;
|
||||
/* 0x01A0 */ s16 unk_1A0;
|
||||
/* 0x01A2 */ s16 unk_1A2;
|
||||
/* 0x01A4 */ s16 unk_1A4;
|
||||
/* 0x01A6 */ s16 unk_1A6;
|
||||
/* 0x01A8 */ s16 numWallCollisions;
|
||||
/* 0x01AA */ s16 unk_1AA;
|
||||
/* 0x01AC */ s16 unk_1AC;
|
||||
/* 0x01AE */ s16 unk_1AE;
|
||||
/* 0x01B0 */ s16 unk_1B0;
|
||||
/* 0x01B2 */ char unk_1B2[0x2];
|
||||
/* 0x01B4 */ s16 cutsceneCamera;
|
||||
/* 0x01B6 */ s16 unk_1B6;
|
||||
/* 0x01B8 */ s16 playerYawInRange;
|
||||
/* 0x01BA */ s16 playerPosInRange;
|
||||
/* 0x01BC */ s16 unk_1BC;
|
||||
/* 0x01BE */ s16 unk_1BE;
|
||||
/* 0x01C0 */ s16 unk_1C0;
|
||||
/* 0x01C2 */ s16 unk_1C2;
|
||||
/* 0x01C4 */ s16 unk_1C4; // Some kind of angle
|
||||
/* 0x01C6 */ s16 unk_1C6;
|
||||
/* 0x01C8 */ s16 unk_1C8;
|
||||
/* 0x01CA */ char unk_1CA[0x2];
|
||||
/* 0x01CC */ s16 unk_1CC;
|
||||
/* 0x01CE */ char unk_1CE[0xC];
|
||||
/* 0x01DA */ s16 unk_1DA;
|
||||
/* 0x01DC */ s16 unk_1DC;
|
||||
/* 0x01DE */ s16 unk_1DE;
|
||||
/* 0x01E0 */ s16 unk_1E0;
|
||||
/* 0x01E2 */ u8 unk_1E2;
|
||||
/* 0x01E3 */ s8 unk_1E3;
|
||||
/* 0x01E4 */ f32 unk_1E4;
|
||||
/* 0x01E8 */ f32 unk_1E8;
|
||||
/* 0x01EC */ f32 unk_1EC;
|
||||
/* 0x01F0 */ char unk_1F0[0x8];
|
||||
/* 0x01F8 */ f32 unk_1F8;
|
||||
/* 0x01FC */ f32 unk_1FC;
|
||||
/* 0x0200 */ f32 unk_200;
|
||||
/* 0x0204 */ f32 unk_204;
|
||||
/* 0x0208 */ f32 unk_208;
|
||||
/* 0x020C */ f32 unk_20C;
|
||||
/* 0x0210 */ f32 colorFilterR;
|
||||
/* 0x0214 */ f32 colorFilterG;
|
||||
/* 0x0214 */ f32 colorFilterB;
|
||||
/* 0x021C */ f32 colorFilterMin;
|
||||
/* 0x0220 */ f32 colorFilterMax;
|
||||
/* 0x0224 */ f32 unk_224;
|
||||
/* 0x0228 */ f32 unk_228;
|
||||
/* 0x022C */ f32 unk_22C;
|
||||
/* 0x0230 */ f32 unk_230;
|
||||
/* 0x0234 */ f32 unk_234;
|
||||
/* 0x0238 */ f32 unk_238;
|
||||
/* 0x023C */ f32 unk_23C;
|
||||
/* 0x0240 */ f32 unk_240;
|
||||
/* 0x0244 */ f32 unk_244;
|
||||
/* 0x0248 */ char unk_248[0x14];
|
||||
/* 0x025C */ f32 unk_25C[50];
|
||||
/* 0x0324 */ f32 unk_324[50];
|
||||
/* 0x03EC */ Vec3f vec;
|
||||
/* 0x03F8 */ Vec3f firePos;
|
||||
/* 0x0404 */ Vec3f unk_404;
|
||||
/* 0x0410 */ Vec3f unk_410;
|
||||
/* 0x041C */ Vec3f mouthPos;
|
||||
/* 0x0428 */ Vec3f cameraEye;
|
||||
/* 0x0434 */ Vec3f cameraAt;
|
||||
/* 0x0440 */ ColliderJntSph collider;
|
||||
/* 0x0460 */ ColliderJntSphElement items[19];
|
||||
/* 0x0920 */ BossDodongoEffect effects[80];
|
||||
} BossDodongo; // size = 0x1820
|
||||
|
||||
extern const ActorInit Boss_Dodongo_InitVars;
|
||||
|
|
246
src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo_data.c
Normal file
246
src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo_data.c
Normal file
|
@ -0,0 +1,246 @@
|
|||
#include "z_boss_dodongo.h"
|
||||
|
||||
static u8 D_808C7000[] = {
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1,
|
||||
1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0,
|
||||
1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0,
|
||||
0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1,
|
||||
1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1,
|
||||
1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0,
|
||||
1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0,
|
||||
};
|
||||
|
||||
static ColliderJntSphElementInit sJntSphElementsInit[19] = {
|
||||
{
|
||||
{
|
||||
ELEMTYPE_UNK3,
|
||||
{ 0xFFCFFFFF, 0x00, 0x04 },
|
||||
{ 0xFFCFFFFF, 0x00, 0x00 },
|
||||
TOUCH_ON | TOUCH_SFX_NORMAL,
|
||||
BUMP_ON,
|
||||
OCELEM_ON,
|
||||
},
|
||||
{ 7, { { 8500, 1200, 0 }, 40 }, 100 },
|
||||
},
|
||||
{
|
||||
{
|
||||
ELEMTYPE_UNK3,
|
||||
{ 0xFFCFFFFF, 0x00, 0x04 },
|
||||
{ 0xFFCFFFFF, 0x00, 0x00 },
|
||||
TOUCH_ON | TOUCH_SFX_NORMAL,
|
||||
BUMP_ON,
|
||||
OCELEM_ON,
|
||||
},
|
||||
{ 33, { { 2000, -2000, 0 }, 60 }, 100 },
|
||||
},
|
||||
{
|
||||
{
|
||||
ELEMTYPE_UNK2,
|
||||
{ 0xFFCFFFFF, 0x00, 0x04 },
|
||||
{ 0xFFCFFFFF, 0x00, 0x00 },
|
||||
TOUCH_ON | TOUCH_SFX_NORMAL,
|
||||
BUMP_ON,
|
||||
OCELEM_ON,
|
||||
},
|
||||
{ 1, { { 0, 0, 0 }, 60 }, 100 },
|
||||
},
|
||||
{
|
||||
{
|
||||
ELEMTYPE_UNK2,
|
||||
{ 0xFFCFFFFF, 0x00, 0x04 },
|
||||
{ 0xFFCFFFFF, 0x00, 0x00 },
|
||||
TOUCH_ON | TOUCH_SFX_NORMAL,
|
||||
BUMP_ON,
|
||||
OCELEM_ON,
|
||||
},
|
||||
{ 15, { { 0, 0, 0 }, 20 }, 100 },
|
||||
},
|
||||
{
|
||||
{
|
||||
ELEMTYPE_UNK2,
|
||||
{ 0xFFCFFFFF, 0x00, 0x04 },
|
||||
{ 0xFFCFFFFF, 0x00, 0x00 },
|
||||
TOUCH_ON | TOUCH_SFX_NORMAL,
|
||||
BUMP_ON,
|
||||
OCELEM_ON,
|
||||
},
|
||||
{ 16, { { 0, 0, 0 }, 30 }, 100 },
|
||||
},
|
||||
{
|
||||
{
|
||||
ELEMTYPE_UNK2,
|
||||
{ 0xFFCFFFFF, 0x00, 0x04 },
|
||||
{ 0xFFCFFFFF, 0x00, 0x00 },
|
||||
TOUCH_ON | TOUCH_SFX_NORMAL,
|
||||
BUMP_ON,
|
||||
OCELEM_ON,
|
||||
},
|
||||
{ 17, { { 0, 0, 0 }, 40 }, 100 },
|
||||
},
|
||||
{
|
||||
{
|
||||
ELEMTYPE_UNK2,
|
||||
{ 0xFFCFFFFF, 0x00, 0x04 },
|
||||
{ 0xFFCFFFFF, 0x00, 0x00 },
|
||||
TOUCH_ON | TOUCH_SFX_NORMAL,
|
||||
BUMP_ON,
|
||||
OCELEM_ON,
|
||||
},
|
||||
{ 22, { { 0, 0, 0 }, 30 }, 100 },
|
||||
},
|
||||
{
|
||||
{
|
||||
ELEMTYPE_UNK2,
|
||||
{ 0xFFCFFFFF, 0x00, 0x04 },
|
||||
{ 0xFFCFFFFF, 0x00, 0x00 },
|
||||
TOUCH_ON | TOUCH_SFX_NORMAL,
|
||||
BUMP_ON,
|
||||
OCELEM_ON,
|
||||
},
|
||||
{ 23, { { 0, 0, 0 }, 20 }, 100 },
|
||||
},
|
||||
{
|
||||
{
|
||||
ELEMTYPE_UNK2,
|
||||
{ 0xFFCFFFFF, 0x00, 0x04 },
|
||||
{ 0xFFCFFFFF, 0x00, 0x00 },
|
||||
TOUCH_ON | TOUCH_SFX_NORMAL,
|
||||
BUMP_ON,
|
||||
OCELEM_ON,
|
||||
},
|
||||
{ 24, { { 0, 0, 0 }, 30 }, 100 },
|
||||
},
|
||||
{
|
||||
{
|
||||
ELEMTYPE_UNK2,
|
||||
{ 0xFFCFFFFF, 0x00, 0x04 },
|
||||
{ 0xFFCFFFFF, 0x00, 0x00 },
|
||||
TOUCH_ON | TOUCH_SFX_NORMAL,
|
||||
BUMP_ON,
|
||||
OCELEM_ON,
|
||||
},
|
||||
{ 29, { { 0, 0, 0 }, 30 }, 100 },
|
||||
},
|
||||
{
|
||||
{
|
||||
ELEMTYPE_UNK2,
|
||||
{ 0xFFCFFFFF, 0x00, 0x04 },
|
||||
{ 0xFFCFFFFF, 0x00, 0x00 },
|
||||
TOUCH_ON | TOUCH_SFX_NORMAL,
|
||||
BUMP_ON,
|
||||
OCELEM_ON,
|
||||
},
|
||||
{ 30, { { 0, 0, 0 }, 30 }, 100 },
|
||||
},
|
||||
{
|
||||
{
|
||||
ELEMTYPE_UNK2,
|
||||
{ 0xFFCFFFFF, 0x00, 0x04 },
|
||||
{ 0xFFCFFFFF, 0x00, 0x00 },
|
||||
TOUCH_ON | TOUCH_SFX_NORMAL,
|
||||
BUMP_ON,
|
||||
OCELEM_ON,
|
||||
},
|
||||
{ 31, { { 0, 0, 0 }, 30 }, 100 },
|
||||
},
|
||||
{
|
||||
{
|
||||
ELEMTYPE_UNK2,
|
||||
{ 0xFFCFFFFF, 0x00, 0x04 },
|
||||
{ 0xFFCFFFFF, 0x00, 0x00 },
|
||||
TOUCH_ON | TOUCH_SFX_NORMAL,
|
||||
BUMP_ON,
|
||||
OCELEM_ON,
|
||||
},
|
||||
{ 32, { { 0, 0, 0 }, 50 }, 100 },
|
||||
},
|
||||
{
|
||||
{
|
||||
ELEMTYPE_UNK2,
|
||||
{ 0xFFCFFFFF, 0x00, 0x04 },
|
||||
{ 0xFFCFFFFF, 0x00, 0x00 },
|
||||
TOUCH_ON | TOUCH_SFX_NORMAL,
|
||||
BUMP_ON,
|
||||
OCELEM_ON,
|
||||
},
|
||||
{ 38, { { 0, 0, 0 }, 30 }, 100 },
|
||||
},
|
||||
{
|
||||
{
|
||||
ELEMTYPE_UNK2,
|
||||
{ 0xFFCFFFFF, 0x00, 0x04 },
|
||||
{ 0xFFCFFFFF, 0x00, 0x00 },
|
||||
TOUCH_ON | TOUCH_SFX_NORMAL,
|
||||
BUMP_ON,
|
||||
OCELEM_ON,
|
||||
},
|
||||
{ 39, { { 0, 0, 0 }, 30 }, 100 },
|
||||
},
|
||||
{
|
||||
{
|
||||
ELEMTYPE_UNK2,
|
||||
{ 0xFFCFFFFF, 0x00, 0x04 },
|
||||
{ 0xFFCFFFFF, 0x00, 0x00 },
|
||||
TOUCH_ON | TOUCH_SFX_NORMAL,
|
||||
BUMP_ON,
|
||||
OCELEM_ON,
|
||||
},
|
||||
{ 40, { { 0, 0, 0 }, 40 }, 100 },
|
||||
},
|
||||
{
|
||||
{
|
||||
ELEMTYPE_UNK2,
|
||||
{ 0xFFCFFFFF, 0x00, 0x04 },
|
||||
{ 0xFFCFFFFF, 0x00, 0x00 },
|
||||
TOUCH_ON | TOUCH_SFX_NORMAL,
|
||||
BUMP_ON,
|
||||
OCELEM_ON,
|
||||
},
|
||||
{ 45, { { 0, 0, 0 }, 30 }, 100 },
|
||||
},
|
||||
{
|
||||
{
|
||||
ELEMTYPE_UNK2,
|
||||
{ 0xFFCFFFFF, 0x00, 0x04 },
|
||||
{ 0xFFCFFFFF, 0x00, 0x00 },
|
||||
TOUCH_ON | TOUCH_SFX_NORMAL,
|
||||
BUMP_ON,
|
||||
OCELEM_ON,
|
||||
},
|
||||
{ 46, { { 0, 0, 0 }, 30 }, 100 },
|
||||
},
|
||||
{
|
||||
{
|
||||
ELEMTYPE_UNK2,
|
||||
{ 0xFFCFFFFF, 0x00, 0x04 },
|
||||
{ 0xFFCFFFFF, 0x00, 0x00 },
|
||||
TOUCH_ON | TOUCH_SFX_NORMAL,
|
||||
BUMP_ON,
|
||||
OCELEM_ON,
|
||||
},
|
||||
{ 47, { { 0, 0, 0 }, 40 }, 100 },
|
||||
},
|
||||
};
|
||||
|
||||
static ColliderJntSphInit sJntSphInit = {
|
||||
{
|
||||
COLTYPE_HIT3,
|
||||
AT_ON | AT_TYPE_ENEMY,
|
||||
AC_ON | AC_TYPE_PLAYER,
|
||||
OC1_ON | OC1_TYPE_PLAYER,
|
||||
OC2_TYPE_1,
|
||||
COLSHAPE_JNTSPH,
|
||||
},
|
||||
19,
|
||||
sJntSphElementsInit,
|
||||
};
|
||||
|
||||
static Vec3f sUnkZeroVec = { 0.0f, 0.0f, 0.0f };
|
||||
|
||||
static u64 sLavaFloorLavaTex[] = {
|
||||
#include "assets/overlays/ovl_Boss_Dodongo/lava_floor_lava.rgb5a1.inc.c"
|
||||
};
|
||||
|
||||
static u64 sLavaFloorRockTex[] = {
|
||||
#include "assets/overlays/ovl_Boss_Dodongo/lava_floor_rock.rgb5a1.inc.c"
|
||||
};
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* File: z_en_bdfire.c
|
||||
* Overlay: ovl_En_Bdfire
|
||||
* Description: King Dodongo's Fire
|
||||
* Description: King Dodongo's Fire Breath
|
||||
*/
|
||||
|
||||
#include "z_en_bdfire.h"
|
||||
|
@ -15,9 +15,12 @@ void EnBdfire_Destroy(Actor* thisx, GlobalContext* globalCtx);
|
|||
void EnBdfire_Update(Actor* thisx, GlobalContext* globalCtx);
|
||||
void EnBdfire_Draw(Actor* thisx, GlobalContext* globalCtx);
|
||||
|
||||
extern UNK_TYPE D_0601D950;
|
||||
void EnBdfire_DrawFire(EnBdfire* this, GlobalContext* globalCtx);
|
||||
void func_809BC2A4(EnBdfire* this, GlobalContext* globalCtx);
|
||||
void func_809BC598(EnBdfire* this, GlobalContext* globalCtx);
|
||||
|
||||
extern Gfx D_0601D950[];
|
||||
|
||||
/*
|
||||
const ActorInit En_Bdfire_InitVars = {
|
||||
0,
|
||||
ACTORCAT_ENEMY,
|
||||
|
@ -29,21 +32,199 @@ const ActorInit En_Bdfire_InitVars = {
|
|||
(ActorFunc)EnBdfire_Update,
|
||||
(ActorFunc)EnBdfire_Draw,
|
||||
};
|
||||
*/
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Bdfire/func_809BC030.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Bdfire/func_809BC038.s")
|
||||
void EnBdfire_SetupAction(EnBdfire* this, EnBdfireActionFunc actionFunc) {
|
||||
this->actionFunc = actionFunc;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Bdfire/EnBdfire_Init.s")
|
||||
void EnbdFire_SetupDraw(EnBdfire* this, EnBdfireDrawFunc drawFunc) {
|
||||
this->drawFunc = drawFunc;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Bdfire/EnBdfire_Destroy.s")
|
||||
void EnBdfire_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
EnBdfire* this = THIS;
|
||||
s32 pad;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Bdfire/func_809BC2A4.s")
|
||||
Actor_SetScale(&this->actor, 0.6f);
|
||||
EnbdFire_SetupDraw(this, EnBdfire_DrawFire);
|
||||
if (this->actor.params < 0) {
|
||||
EnBdfire_SetupAction(this, func_809BC2A4);
|
||||
this->actor.scale.x = 2.8f;
|
||||
this->unk_154 = 90;
|
||||
Lights_PointNoGlowSetInfo(&this->lightInfoNoGlow, this->actor.world.pos.x, this->actor.world.pos.y,
|
||||
this->actor.world.pos.z, 255, 255, 255, 300);
|
||||
this->lightNode = LightContext_InsertLight(globalCtx, &globalCtx->lightCtx, &this->lightInfoNoGlow);
|
||||
} else {
|
||||
EnBdfire_SetupAction(this, func_809BC598);
|
||||
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 0.0f);
|
||||
this->actor.speedXZ = 30.0f;
|
||||
this->unk_154 = (25 - (s32)(this->actor.params * 0.8f));
|
||||
if (this->unk_154 < 0) {
|
||||
this->unk_154 = 0;
|
||||
}
|
||||
this->unk_188 = 4.2000003f - (this->actor.params * 0.25f * 0.6f);
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Bdfire/func_809BC598.s")
|
||||
if (this->unk_188 < 0.90000004f) {
|
||||
this->unk_188 = 0.90000004f;
|
||||
}
|
||||
this->unk_18C = 255.0f - (this->actor.params * 10.0f);
|
||||
if (this->unk_18C < 20.0f) {
|
||||
this->unk_18C = 20.0f;
|
||||
}
|
||||
this->unk_156 = (Rand_ZeroOne() * 8.0f);
|
||||
}
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Bdfire/EnBdfire_Update.s")
|
||||
void EnBdfire_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
EnBdfire* this = THIS;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Bdfire/func_809BC8C8.s")
|
||||
if (this->actor.params < 0) {
|
||||
LightContext_RemoveLight(globalCtx, &globalCtx->lightCtx, this->lightNode);
|
||||
}
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Bdfire/EnBdfire_Draw.s")
|
||||
void func_809BC2A4(EnBdfire* this, GlobalContext* globalCtx) {
|
||||
BossDodongo* kingDodongo;
|
||||
s32 temp;
|
||||
|
||||
kingDodongo = (BossDodongo*)this->actor.parent;
|
||||
this->actor.world.pos.x = kingDodongo->firePos.x;
|
||||
this->actor.world.pos.y = kingDodongo->firePos.y;
|
||||
this->actor.world.pos.z = kingDodongo->firePos.z;
|
||||
if (kingDodongo->unk_1E2 == 0) {
|
||||
Math_SmoothStepToF(&this->actor.scale.x, 0.0f, 1.0f, 0.6f, 0.0f);
|
||||
if (Math_SmoothStepToF(&this->unk_18C, 0.0f, 1.0f, 20.0f, 0.0f) == 0.0f) {
|
||||
Actor_Kill(&this->actor);
|
||||
}
|
||||
} else {
|
||||
if (this->unk_154 < 70) {
|
||||
Math_SmoothStepToF(&this->unk_18C, 128.0f, 0.1f, 1.5f, 0.0f);
|
||||
Math_SmoothStepToF(&this->unk_190, 255.0f, 1.0f, 3.8249998f, 0.0f);
|
||||
Math_SmoothStepToF(&this->unk_194, 100.0f, 1.0f, 1.5f, 0.0f);
|
||||
}
|
||||
if (this->unk_154 == 0) {
|
||||
temp = 0;
|
||||
} else {
|
||||
this->unk_154--;
|
||||
temp = this->unk_154;
|
||||
}
|
||||
if (temp == 0) {
|
||||
Math_SmoothStepToF(&this->actor.scale.x, 0.0f, 1.0f, 0.3f, 0.0f);
|
||||
Math_SmoothStepToF(&this->unk_190, 0.0f, 1.0f, 25.5f, 0.0f);
|
||||
Math_SmoothStepToF(&this->unk_194, 0.0f, 1.0f, 10.0f, 0.0f);
|
||||
if (Math_SmoothStepToF(&this->unk_18C, 0.0f, 1.0f, 10.0f, 0.0f) == 0.0f) {
|
||||
Actor_Kill(&this->actor);
|
||||
}
|
||||
}
|
||||
Actor_SetScale(&this->actor, this->actor.scale.x);
|
||||
Lights_PointSetColorAndRadius(&this->lightInfoNoGlow, this->unk_190, this->unk_194, 0, 300);
|
||||
}
|
||||
}
|
||||
|
||||
void func_809BC598(EnBdfire* this, GlobalContext* globalCtx) {
|
||||
s16 phi_v1_2;
|
||||
Player* player = PLAYER;
|
||||
f32 distToBurn;
|
||||
BossDodongo* bossDodongo;
|
||||
s16 i;
|
||||
s16 phi_v1;
|
||||
s32 temp;
|
||||
|
||||
bossDodongo = ((BossDodongo*)this->actor.parent);
|
||||
this->unk_158 = bossDodongo->unk_1A2;
|
||||
phi_v1_2 = 0;
|
||||
if (this->actor.params == 0) {
|
||||
Audio_PlaySoundGeneral(NA_SE_EN_DODO_K_FIRE - SFX_FLAG, &this->actor.projectedPos, 4, &D_801333E0, &D_801333E0,
|
||||
&D_801333E8);
|
||||
}
|
||||
Math_SmoothStepToF(&this->actor.scale.x, this->unk_188, 0.3f, 0.5f, 0.0f);
|
||||
Actor_SetScale(&this->actor, this->actor.scale.x);
|
||||
if (this->actor.world.pos.x < -1390.0f) {
|
||||
if (this->actor.velocity.x < -10.0f) {
|
||||
this->actor.world.pos.x = -1390.0f;
|
||||
phi_v1_2 = 1;
|
||||
}
|
||||
}
|
||||
if ((this->actor.world.pos.x > -390.0f) && (this->actor.velocity.x > 10.0f)) {
|
||||
this->actor.world.pos.x = -390.0f;
|
||||
phi_v1_2 = 1;
|
||||
}
|
||||
if ((this->actor.world.pos.z > -2804.0f) && (this->actor.velocity.z > 10.0f)) {
|
||||
this->actor.world.pos.z = -2804.0f;
|
||||
phi_v1_2 = 1;
|
||||
}
|
||||
if ((this->actor.world.pos.z < -3804.0f) && (this->actor.velocity.z < -10.0f)) {
|
||||
this->actor.world.pos.z = -3804.0f;
|
||||
phi_v1_2 = 1;
|
||||
}
|
||||
if (phi_v1_2 != 0) {
|
||||
if (this->unk_158 == 0) {
|
||||
this->actor.world.rot.y += 0x4000;
|
||||
} else {
|
||||
this->actor.world.rot.y -= 0x4000;
|
||||
}
|
||||
}
|
||||
if (this->unk_154 == 0) {
|
||||
temp = 0;
|
||||
} else {
|
||||
this->unk_154--;
|
||||
temp = this->unk_154;
|
||||
}
|
||||
if (temp == 0) {
|
||||
Math_SmoothStepToF(&this->unk_18C, 0.0f, 1.0f, 10.0f, 0.0f);
|
||||
if (this->unk_18C < 10.0f) {
|
||||
Actor_Kill(&this->actor);
|
||||
return;
|
||||
}
|
||||
} else if (!player->isBurning) {
|
||||
distToBurn = (this->actor.scale.x * 130.0f) / 4.2000003f;
|
||||
if (this->actor.xyzDistToPlayerSq < SQ(distToBurn)) {
|
||||
for (i = 0; i < 18; i++) {
|
||||
player->flameTimers[i] = Rand_S16Offset(0, 200);
|
||||
}
|
||||
player->isBurning = true;
|
||||
func_8002F6D4(globalCtx, &this->actor, 20.0f, this->actor.world.rot.y, 0.0f, 8);
|
||||
osSyncPrintf("POWER\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void EnBdfire_Update(Actor* thisx, GlobalContext* globalCtx) {
|
||||
EnBdfire* this = THIS;
|
||||
|
||||
this->unk_156++;
|
||||
this->actionFunc(this, globalCtx);
|
||||
Actor_MoveForward(&this->actor);
|
||||
}
|
||||
|
||||
void EnBdfire_DrawFire(EnBdfire* this, GlobalContext* globalCtx) {
|
||||
static void* D_809BCB10[] = {
|
||||
0x060264E0, 0x060274E0, 0x060284E0, 0x060294E0, 0x0602A4E0, 0x0602B4E0, 0x0602C4E0, 0x0602D4E0,
|
||||
};
|
||||
s16 temp;
|
||||
s32 pad;
|
||||
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_bdfire.c", 612);
|
||||
temp = this->unk_156 & 7;
|
||||
func_800D1FD4(&globalCtx->mf_11DA0);
|
||||
func_80094BC4(globalCtx->state.gfxCtx);
|
||||
POLY_XLU_DISP = func_80094968(POLY_XLU_DISP);
|
||||
gDPSetCombineLERP(POLY_XLU_DISP++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, PRIMITIVE, ENVIRONMENT, TEXEL0,
|
||||
ENVIRONMENT, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, PRIMITIVE, ENVIRONMENT, TEXEL0,
|
||||
ENVIRONMENT);
|
||||
gDPPipeSync(POLY_XLU_DISP++);
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 100, (s8)this->unk_18C);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, 200, 0, 0, 0);
|
||||
gSPSegment(POLY_XLU_DISP++, 8, SEGMENTED_TO_VIRTUAL(D_809BCB10[temp]));
|
||||
Matrix_Translate(0.0f, 11.0f, 0.0f, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_bdfire.c", 647),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_XLU_DISP++, D_0601D950);
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_bdfire.c", 651);
|
||||
}
|
||||
|
||||
void EnBdfire_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
EnBdfire* this = THIS;
|
||||
|
||||
this->drawFunc(this, globalCtx);
|
||||
}
|
||||
|
|
|
@ -3,12 +3,28 @@
|
|||
|
||||
#include "ultra64.h"
|
||||
#include "global.h"
|
||||
#include "overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.h"
|
||||
|
||||
struct EnBdfire;
|
||||
|
||||
typedef void (*EnBdfireActionFunc)(struct EnBdfire*, GlobalContext*);
|
||||
typedef void (*EnBdfireDrawFunc)(struct EnBdfire*, GlobalContext*);
|
||||
|
||||
typedef struct EnBdfire {
|
||||
/* 0x0000 */ Actor actor;
|
||||
/* 0x014C */ char unk_14C[0x98];
|
||||
/* 0x014C */ EnBdfireActionFunc actionFunc;
|
||||
/* 0x0150 */ EnBdfireDrawFunc drawFunc;
|
||||
/* 0x0154 */ s16 unk_154;
|
||||
/* 0x0156 */ s16 unk_156;
|
||||
/* 0x0158 */ s16 unk_158;
|
||||
/* 0x015A */ char unk_15A[0x2E];
|
||||
/* 0x0188 */ f32 unk_188;
|
||||
/* 0x018C */ f32 unk_18C;
|
||||
/* 0x0190 */ f32 unk_190;
|
||||
/* 0x0194 */ f32 unk_194;
|
||||
/* 0x0198 */ char unk_198[0x38];
|
||||
/* 0x01D0 */ LightNode* lightNode;
|
||||
/* 0x01D4 */ LightInfo lightInfoNoGlow;
|
||||
} EnBdfire; // size = 0x01E4
|
||||
|
||||
extern const ActorInit En_Bdfire_InitVars;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue