1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-06 06:10:21 +00:00

Volvagia (ovl_Boss_Fd) and related actors (#352)

* Darkmeiro decompilation

Bg_Gnd_Darkmeiro decompiled, matched, and documented.

* Lots of functions matched. Some big ones are close.

* Five left unmatched, one close.

* Merged data and decompiled the giant function into something readable. Its branch structure has yet to be matched.

* Three unmatched, one essentially matched, the rest matched.

* More fixes.

* Documented more of the structure and cleaned up a bit.

* BossFd2, BgVbSima, and EnVbBall matched and documented

* Also removed unneeded .s files

* And need to name EnVbBall's functions

* give this a shot

* fix conflict

* one more try

* removing darkmeiro changes

* and again

* now OK from make clean

* minor cleanup

* One more matching function for BossFd

* which means it doesn't need its .s

* splitting

* splitting

* splitting

* forgot some .s

* fancy new names

* fancy new names

* trying again

* sneaky .s files

* sound effects and some hex to decimal conversions

* Sound effects and static variable cleanup

* format.sh and clean up static variables

* sfx and formatting

* ZAP and cleanup

* small cleanup

* cleanup and ZAP

* ZAP

* looking at the giant function again

* looking at the giant function again

* Only the big function left.

* Those .s files aren't mine, officer

* float literals might be fixed. regalloc still a nightmare

* almost done with the big function

* should make now

* not much of a change

* all functions match. rodata somehow doesn't.

* forgot some things

* lots of cleanup

* and a little more

* small error

* large cleanup. Also BossFd has function names and inlined variable declarations

* still more cleanup

* the quest for 0.1f continues

* forgot to put NON_MATCHING back in

* Data structures fully documented. Still more cleanup.

* DECR now works with BossFd2

* should match now

* cleanup

* small cleanup

* cleanup and names

* tiny thing

* particles and headers and stuff

* now with more enums

* merge

* test

* end test

* update

* cleanup

* object 2

* object 1

* doc object_fd2

* git subrepo pull --force tools/ZAPD

subrepo:
  subdir:   "tools/ZAPD"
  merged:   "6f874af4a"
upstream:
  origin:   "https://github.com/zeldaret/ZAPD.git"
  branch:   "master"
  commit:   "6f874af4a"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo.git"
  commit:   "2f68596"

* formatting

* .s

* merge actor

* vertex arrays

* a little more

* formatting

* merge opd

* fixed damage check

* cleanup

* fixes

* effect struct

* review

Co-authored-by: petrie911 <pmontag@DESKTOP-LG8A167.localdomain>
Co-authored-by: fig02 <fig02srl@gmail.com>
This commit is contained in:
petrie911 2021-04-17 12:12:46 -05:00 committed by GitHub
parent 7306d13897
commit 7b2b88d552
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
95 changed files with 4290 additions and 11359 deletions

View file

@ -1,4 +1,12 @@
/*
* File: z_bg_vb_sima.c
* Overlay: ovl_Bg_Vb_Sima
* Description: Volvagia's platform
*/
#include "z_bg_vb_sima.h"
#include "objects/object_fd/object_fd.h"
#include "overlays/actors/ovl_Boss_Fd/z_boss_fd.h"
#define FLAGS 0x00000000
@ -9,7 +17,6 @@ void BgVbSima_Destroy(Actor* thisx, GlobalContext* globalCtx);
void BgVbSima_Update(Actor* thisx, GlobalContext* globalCtx);
void BgVbSima_Draw(Actor* thisx, GlobalContext* globalCtx);
/*
const ActorInit Bg_Vb_Sima_InitVars = {
ACTOR_BG_VB_SIMA,
ACTORCAT_BG,
@ -21,13 +28,134 @@ const ActorInit Bg_Vb_Sima_InitVars = {
(ActorFunc)BgVbSima_Update,
(ActorFunc)BgVbSima_Draw,
};
*/
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Vb_Sima/BgVbSima_Init.s")
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Vb_Sima/BgVbSima_Destroy.s")
static InitChainEntry sInitChain[] = {
ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_STOP),
};
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Vb_Sima/func_808BDDF8.s")
void BgVbSima_Init(Actor* thisx, GlobalContext* globalCtx) {
s32 pad;
BgVbSima* this = THIS;
CollisionHeader* colHeader = NULL;
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Vb_Sima/BgVbSima_Update.s")
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
DynaPolyActor_Init(&this->dyna, DPM_PLAYER);
CollisionHeader_GetVirtual(&gVolvagiaPlatformCol, &colHeader);
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Vb_Sima/BgVbSima_Draw.s")
void BgVbSima_Destroy(Actor* thisx, GlobalContext* globalCtx) {
s32 pad;
BgVbSima* this = THIS;
DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
}
void BgVbSima_SpawnEmber(BossFdEffect* effect, Vec3f* position, Vec3f* velocity, Vec3f* acceleration, f32 scale) {
s16 i;
for (i = 0; i < 180; i++, effect++) {
if (effect->type == BFD_FX_NONE) {
effect->type = BFD_FX_EMBER;
effect->pos = *position;
effect->velocity = *velocity;
effect->accel = *acceleration;
effect->scale = scale / 1000.0f;
effect->alpha = 255;
effect->timer1 = (s16)Rand_ZeroFloat(10.0f);
break;
}
}
}
void BgVbSima_Update(Actor* thisx, GlobalContext* globalCtx) {
static Color_RGBA8 colorYellow = { 255, 255, 0, 255 };
static Color_RGBA8 colorRed = { 255, 10, 0, 255 };
s32 pad;
BgVbSima* this = THIS;
BossFd* bossFd = (BossFd*)this->dyna.actor.parent;
f32 minus1 = -1.0f;
this->shakeTimer++;
if (!Flags_GetClear(globalCtx, globalCtx->roomCtx.curRoom.num)) {
s32 signal = bossFd->platformSignal;
if (signal == VBSIMA_COLLAPSE) {
Math_SmoothStepToF(&this->dyna.actor.world.pos.y, -1000.0f, 1.0f, 1.5f, 0.0f);
this->dyna.actor.world.pos.z += 2.0f * Math_CosS(this->shakeTimer * 0x8000);
this->dyna.actor.shape.rot.x = (s16)Math_SinS(this->shakeTimer * 0x7000) * 0x37;
this->dyna.actor.shape.rot.z = (s16)Math_SinS(this->shakeTimer * 0x5000) * 0x37;
Audio_PlaySoundGeneral(NA_SE_EV_BLOCKSINK - SFX_FLAG, &this->dyna.actor.projectedPos, 4, &D_801333E0,
&D_801333E0, &D_801333E8);
} else if (signal == VBSIMA_KILL) {
Actor_Kill(&this->dyna.actor);
}
if (bossFd->platformSignal != VBSIMA_STAND) {
s16 i2;
s16 i1;
Vec3f splashVel;
Vec3f splashAcc;
Vec3f splashPos;
Vec3f emberPos;
Vec3f emberVel;
Vec3f emberAcc;
f32 edgeX;
f32 edgeZ;
for (i1 = 0; i1 < 10; i1++) {
if (Rand_ZeroOne() < 0.33f) {
edgeX = -80.0f;
edgeZ = Rand_CenteredFloat(160.0f);
} else {
edgeZ = 80.0f;
if (Rand_ZeroOne() < 0.5f) {
// minus1 = -1.0f; // Not a fake match; the game really does this.
edgeZ = 80.0f * minus1;
}
edgeX = Rand_CenteredFloat(160.0f);
}
splashVel.x = edgeX * 0.05f;
splashVel.y = Rand_ZeroFloat(3.0f) + 3.0f;
splashVel.z = edgeZ * 0.05f;
splashAcc.y = -0.3f;
splashAcc.x = splashVel.x;
splashAcc.z = splashVel.z;
splashPos.x = this->dyna.actor.world.pos.x + edgeX;
splashPos.y = -80.0f;
splashPos.z = this->dyna.actor.world.pos.z + edgeZ;
func_8002836C(globalCtx, &splashPos, &splashVel, &splashAcc, &colorYellow, &colorRed,
(s16)Rand_ZeroFloat(100.0f) + 500, 10, 20);
for (i2 = 0; i2 < 3; i2++) {
emberVel.x = splashVel.x;
emberVel.y = Rand_ZeroFloat(5.0f);
emberVel.z = splashVel.z;
emberAcc.y = 0.4f;
emberAcc.x = Rand_CenteredFloat(0.5f);
emberAcc.z = Rand_CenteredFloat(0.5f);
emberPos.x = Rand_CenteredFloat(60.0f) + splashPos.x;
emberPos.y = Rand_ZeroFloat(40.0f) + splashPos.y;
emberPos.z = Rand_CenteredFloat(60.0f) + splashPos.z;
BgVbSima_SpawnEmber(bossFd->effects, &emberPos, &emberVel, &emberAcc,
(s16)Rand_ZeroFloat(2.0f) + 8);
}
}
}
}
}
void BgVbSima_Draw(Actor* thisx, GlobalContext* globalCtx) {
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_vb_sima.c", 285);
func_80093D18(globalCtx->state.gfxCtx);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_vb_sima.c", 291),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, gVolvagiaPlatformDL);
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_vb_sima.c", 296);
}

View file

@ -6,9 +6,17 @@
struct BgVbSima;
typedef enum {
/* 0 */ VBSIMA_STAND,
/* 1 */ VBSIMA_COLLAPSE,
/* 2 */ VBSIMA_KILL
} BgVbSimaSignal;
typedef struct BgVbSima {
/* 0x0000 */ Actor actor;
/* 0x014C */ char unk_14C[0x30];
/* 0x0000 */ DynaPolyActor dyna;
/* 0x0164 */ char unk_164[0x10];
/* 0x0174 */ s16 shakeTimer;
/* 0x0176 */ char unk_176[6];
} BgVbSima; // size = 0x017C
extern const ActorInit Bg_Vb_Sima_InitVars;

File diff suppressed because it is too large Load diff

View file

@ -6,9 +6,180 @@
struct BossFd;
typedef void (*BossFdActionFunc)(struct BossFd*, GlobalContext*);
typedef enum {
/* -1 */ BOSSFD_WAIT_INTRO = -1,
/* 0 */ BOSSFD_FLY_MAIN,
/* 1 */ BOSSFD_FLY_HOLE,
/* 2 */ BOSSFD_BURROW,
/* 3 */ BOSSFD_EMERGE,
/* 50 */ BOSSFD_FLY_CEILING = 50,
/* 51 */ BOSSFD_DROP_ROCKS,
/* 100 */ BOSSFD_FLY_CHASE = 100,
/* 101 */ BOSSFD_FLY_UNUSED,
/* 200 */ BOSSFD_DEATH_START = 200,
/* 201 */ BOSSFD_SKIN_BURN,
/* 202 */ BOSSFD_BONES_FALL,
/* 203 */ BOSSFD_SKULL_PAUSE,
/* 204 */ BOSSFD_SKULL_FALL,
/* 205 */ BOSSFD_SKULL_BURN
} BossFdActionState;
typedef enum {
/* 0 */ BFD_CS_NONE,
/* 1 */ BFD_CS_WAIT,
/* 2 */ BFD_CS_START,
/* 3 */ BFD_CS_LOOK_LINK,
/* 4 */ BFD_CS_LOOK_GROUND,
/* 5 */ BFD_CS_COLLAPSE,
/* 6 */ BFD_CS_EMERGE
} BossFdCutsceneState;
typedef struct {
/* 0x00 */ Vec3f pos;
/* 0x0C */ Vec3f velocity;
/* 0x18 */ Vec3f accel;
/* 0x24 */ u8 type;
/* 0x25 */ u8 timer1;
/* 0x26 */ Color_RGB8 color;
/* 0x2A */ s16 alpha;
/* 0x2C */ s16 timer2;
/* 0x2E */ s16 kbAngle;
/* 0x30 */ f32 scale;
/* 0x34 */ f32 bFdFxFloat1;
/* 0x38 */ f32 bFdFxFloat2;
} BossFdEffect; // size = 0x3C
#define BOSSFD_EFFECT_COUNT 180
#define vFdFxRotX bFdFxFloat1
#define vFdFxScaleMod bFdFxFloat1
#define vFdFxRotY bFdFxFloat2
#define vFdFxYStop bFdFxFloat2
typedef enum {
/* 0 */ BFD_FX_NONE,
/* 1 */ BFD_FX_EMBER,
/* 2 */ BFD_FX_DEBRIS,
/* 3 */ BFD_FX_DUST,
/* 4 */ BFD_FX_FIRE_BREATH,
/* 5 */ BFD_FX_SKULL_PIECE
} BossFdEffectType;
typedef struct {
/* 0x000 */ Vec3f pos[30];
/* 0x168 */ f32 scale[30];
/* 0x1E0 */ Vec3f head;
} BossFdMane; // size = 0x1EC
typedef struct {
/* 0x00 */ Vec3f eye;
/* 0x0C */ Vec3f at;
/* 0x18 */ Vec3f pad[2];
/* 0x30 */ Vec3f eyeVel;
/* 0x3C */ Vec3f atVel;
/* 0x48 */ Vec3f nextEye;
/* 0x54 */ Vec3f eyeMaxVel;
/* 0x60 */ Vec3f nextAt;
/* 0x6C */ Vec3f atMaxVel;
/* 0x78 */ f32 speedMod;
/* 0x7C */ f32 accel;
/* 0x80 */ f32 yMod;
/* 0x84 */ f32 shake;
} BossFdCam; // size = 0x88
typedef enum {
/* 0 */ BFD_ACTION_STATE,
/* 1 */ BFD_MOVE_TIMER,
/* 2 */ BFD_VAR_TIMER,
/* 3 */ BFD_LEAD_BODY_SEG,
/* 4 */ BFD_LEAD_MANE_SEG,
/* 5 */ BFD_BLINK_TIMER,
/* 6 */ BFD_ROAR_TIMER,
/* 7 */ BFD_DAMAGE_FLASH_TIMER,
/* 8 */ BFD_START_ATTACK,
/* 9 */ BFD_UNK_234,
/* 10 */ BFD_UNK_236,
/* 11 */ BFD_MANE_EMBERS_TIMER,
/* 12 */ BFD_ROCK_TIMER,
/* 13 */ BFD_CEILING_TARGET,
/* 14 */ BFD_INVINC_TIMER,
/* 15 */ BFD_SPLASH_TIMER,
/* 16 */ BFD_CAM_SHAKE_TIMER,
/* 17 */ BFD_STOP_FLAG,
/* 18 */ BFD_FLY_COUNT,
/* 19 */ BFD_SHORT_COUNT
} BossFdS16Var;
typedef enum {
/* 0 */ BFD_TEX1_SCROLL_X,
/* 1 */ BFD_TEX1_SCROLL_Y,
/* 2 */ BFD_TEX2_SCROLL_X,
/* 3 */ BFD_TEX2_SCROLL_Y,
/* 4 */ BFD_UNUSED_F4,
/* 5 */ BFD_UNUSED_F5,
/* 6 */ BFD_UNUSED_F6,
/* 7 */ BFD_BODY_TEX2_ALPHA,
/* 8 */ BFD_HEAD_TEX2_ALPHA,
/* 9 */ BFD_TARGET_Y_OFFSET,
/* 10 */ BFD_CEILING_BOUNCE,
/* 11 */ BFD_BODY_PULSE,
/* 12 */ BFD_MANE_COLOR_CENTER,
/* 13 */ BFD_MANE_COLOR_RIGHT,
/* 14 */ BFD_MANE_COLOR_LEFT,
/* 15 */ BFD_MANE_EMBER_SPEED,
/* 16 */ BFD_MANE_EMBER_RATE,
/* 17 */ BFD_UNUSED_F17,
/* 18 */ BFD_UNUSED_F18,
/* 19 */ BFD_UNUSED_F19,
/* 20 */ BFD_FLY_SPEED,
/* 21 */ BFD_TURN_RATE,
/* 22 */ BFD_TURN_RATE_MAX,
/* 23 */ BFD_FLY_WOBBLE_AMP,
/* 24 */ BFD_FLY_WOBBLE_RATE,
/* 25 */ BFD_UNUSED_F25,
/* 26 */ BFD_FLOAT_COUNT
} BossFdF32Var;
typedef struct BossFd {
/* 0x0000 */ Actor actor;
/* 0x014C */ char unk_14C[0x4254];
/* 0x014C */ SkelAnime skelAnimeHead;
/* 0x0190 */ SkelAnime skelAnimeRightArm;
/* 0x01D4 */ SkelAnime skelAnimeLeftArm;
/* 0x0218 */ BossFdActionFunc actionFunc;
/* 0x021C */ s16 fireBreathTimer;
/* 0x021E */ s16 skinSegments;
/* 0x0220 */ u8 fogMode;
/* 0x0222 */ s16 work[BFD_SHORT_COUNT];
/* 0x0248 */ s16 timers[6];
/* 0x0254 */ f32 fwork[BFD_FLOAT_COUNT];
/* 0x02BC */ Vec3f targetPosition;
/* 0x02C8 */ Vec3f holePosition;
/* 0x02D4 */ u8 holeIndex;
/* 0x02D5 */ u8 eyeState;
/* 0x02D6 */ u8 platformSignal;
/* 0x02D7 */ u8 faceExposed;
/* 0x02D8 */ u8 handoffSignal;
/* 0x02DC */ Vec3f bodySegsRot[100];
/* 0x078C */ Vec3f bodySegsPos[100];
/* 0x0C3C */ Vec3f rightArmRot[4];
/* 0x0C6C */ Vec3f leftArmRot[4];
/* 0x0C9C */ Vec3f fireManeRot[30];
/* 0x0E04 */ BossFdMane centerMane;
/* 0x0FF0 */ BossFdMane rightMane;
/* 0x11DC */ BossFdMane leftMane;
/* 0x13C8 */ f32 flattenMane;
/* 0x13CC */ f32 jawOpening;
/* 0x13D0 */ s16 bodyFallApart[18];
/* 0x13F4 */ Vec3f headPos;
/* 0x1400 */ s16 introFlyState;
/* 0x1402 */ s16 introState;
/* 0x1404 */ s16 introCamera;
/* 0x1408 */ BossFdCam camData;
/* 0x1490 */ ColliderJntSph collider;
/* 0x14B0 */ ColliderJntSphElement elements[19];
/* 0x1970 */ BossFdEffect effects[180];
} BossFd; // size = 0x43A0
extern const ActorInit Boss_Fd_InitVars;

View file

@ -0,0 +1,226 @@
#include "global.h"
static ColliderJntSphElementInit sJntSphItemsInit[19] = {
{
{
ELEMTYPE_UNK3,
{ 0xFFCFFFFF, 0x00, 0x10 },
{ 0xFFCDFFFE, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 0, { { 0, 0, 0 }, 20 }, 100 },
},
{
{
ELEMTYPE_UNK2,
{ 0xFFCFFFFF, 0x00, 0x10 },
{ 0xFFCDFFFE, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_NONE,
OCELEM_ON,
},
{ 1, { { 0, 0, 0 }, 20 }, 100 },
},
{
{
ELEMTYPE_UNK2,
{ 0xFFCFFFFF, 0x00, 0x10 },
{ 0xFFCDFFFE, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_NONE,
OCELEM_ON,
},
{ 2, { { 0, 0, 0 }, 20 }, 100 },
},
{
{
ELEMTYPE_UNK2,
{ 0xFFCFFFFF, 0x00, 0x10 },
{ 0xFFCDFFFE, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_NONE,
OCELEM_ON,
},
{ 3, { { 0, 0, 0 }, 20 }, 100 },
},
{
{
ELEMTYPE_UNK2,
{ 0xFFCFFFFF, 0x00, 0x10 },
{ 0xFFCDFFFE, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_NONE,
OCELEM_ON,
},
{ 4, { { 0, 0, 0 }, 20 }, 100 },
},
{
{
ELEMTYPE_UNK2,
{ 0xFFCFFFFF, 0x00, 0x10 },
{ 0xFFCDFFFE, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_NONE,
OCELEM_ON,
},
{ 5, { { 0, 0, 0 }, 20 }, 100 },
},
{
{
ELEMTYPE_UNK2,
{ 0xFFCFFFFF, 0x00, 0x10 },
{ 0xFFCDFFFE, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_NONE,
OCELEM_ON,
},
{ 6, { { 0, 0, 0 }, 20 }, 100 },
},
{
{
ELEMTYPE_UNK2,
{ 0xFFCFFFFF, 0x00, 0x10 },
{ 0xFFCDFFFE, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_NONE,
OCELEM_ON,
},
{ 7, { { 0, 0, 0 }, 20 }, 100 },
},
{
{
ELEMTYPE_UNK2,
{ 0xFFCFFFFF, 0x00, 0x10 },
{ 0xFFCDFFFE, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_NONE,
OCELEM_ON,
},
{ 8, { { 0, 0, 0 }, 20 }, 100 },
},
{
{
ELEMTYPE_UNK2,
{ 0xFFCFFFFF, 0x00, 0x10 },
{ 0xFFCDFFFE, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_NONE,
OCELEM_ON,
},
{ 9, { { 0, 0, 0 }, 20 }, 100 },
},
{
{
ELEMTYPE_UNK2,
{ 0xFFCFFFFF, 0x00, 0x10 },
{ 0xFFCDFFFE, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_NONE,
OCELEM_ON,
},
{ 10, { { 0, 0, 0 }, 20 }, 100 },
},
{
{
ELEMTYPE_UNK2,
{ 0xFFCFFFFF, 0x00, 0x10 },
{ 0xFFCDFFFE, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_NONE,
OCELEM_ON,
},
{ 11, { { 0, 0, 0 }, 20 }, 100 },
},
{
{
ELEMTYPE_UNK2,
{ 0xFFCFFFFF, 0x00, 0x10 },
{ 0xFFCDFFFE, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_NONE,
OCELEM_ON,
},
{ 12, { { 0, 0, 0 }, 20 }, 100 },
},
{
{
ELEMTYPE_UNK2,
{ 0xFFCFFFFF, 0x00, 0x10 },
{ 0xFFCDFFFE, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_NONE,
OCELEM_ON,
},
{ 13, { { 0, 0, 0 }, 20 }, 100 },
},
{
{
ELEMTYPE_UNK2,
{ 0xFFCFFFFF, 0x00, 0x10 },
{ 0xFFCDFFFE, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_NONE,
OCELEM_ON,
},
{ 14, { { 0, 0, 0 }, 18 }, 100 },
},
{
{
ELEMTYPE_UNK2,
{ 0xFFCFFFFF, 0x00, 0x10 },
{ 0xFFCDFFFE, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_NONE,
OCELEM_ON,
},
{ 15, { { 0, 0, 0 }, 16 }, 100 },
},
{
{
ELEMTYPE_UNK2,
{ 0xFFCFFFFF, 0x00, 0x10 },
{ 0xFFCDFFFE, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_NONE,
OCELEM_ON,
},
{ 16, { { 0, 0, 0 }, 14 }, 100 },
},
{
{
ELEMTYPE_UNK2,
{ 0xFFCFFFFF, 0x00, 0x10 },
{ 0xFFCDFFFE, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_NONE,
OCELEM_ON,
},
{ 17, { { 0, 0, 0 }, 12 }, 100 },
},
{
{
ELEMTYPE_UNK2,
{ 0xFFCFFFFF, 0x00, 0x10 },
{ 0xFFCDFFFE, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_NONE,
OCELEM_ON,
},
{ 18, { { 0, 0, 0 }, 10 }, 100 },
},
};
static ColliderJntSphInit sJntSphInit = {
{
COLTYPE_METAL,
AT_ON | AT_TYPE_ENEMY,
AC_ON | AC_TYPE_PLAYER,
OC1_ON | OC1_TYPE_PLAYER,
OC2_TYPE_1,
COLSHAPE_JNTSPH,
},
19,
sJntSphItemsInit,
};

File diff suppressed because it is too large Load diff

View file

@ -6,9 +6,87 @@
struct BossFd2;
typedef void (*BossFd2ActionFunc)(struct BossFd2*, GlobalContext*);
typedef enum {
/* 0 */ FD2_SIGNAL_NONE,
/* 1 */ FD2_SIGNAL_FLY,
/* 2 */ FD2_SIGNAL_DEATH,
/* 100 */ FD2_SIGNAL_GROUND = 100
} BossFd2Signal;
typedef struct {
/* 0x000 */ Vec3f rot[10];
/* 0x078 */ Vec3f pos[10];
/* 0x0F0 */ Vec3f pull[10];
/* 0x168 */ f32 scale[10];
/* 0x190 */ Vec3f head;
} BossFd2Mane; // size = 0x19C
typedef struct {
/* 0x00 */ Vec3f eye;
/* 0x0C */ Vec3f at;
/* 0x18 */ Vec3f pad[2];
/* 0x30 */ Vec3f eyeVel;
/* 0x3C */ Vec3f atVel;
/* 0x48 */ Vec3f nextEye;
/* 0x54 */ Vec3f eyeMaxVel;
/* 0x60 */ Vec3f nextAt;
/* 0x6C */ Vec3f atMaxVel;
/* 0x78 */ f32 speedMod;
/* 0x7C */ f32 accel;
/* 0x80 */ f32 yMod;
/* 0x84 */ f32 shake;
} BossFd2Cam; // size = 0x88
typedef enum {
/* 0 */ FD2_TURN_TO_LINK,
/* 1 */ FD2_ACTION_STATE,
/* 2 */ FD2_UNK_TIMER,
/* 3 */ FD2_VAR_TIMER,
/* 4 */ FD2_UNUSED_4,
/* 5 */ FD2_UNUSED_5,
/* 6 */ FD2_BLINK_TIMER,
/* 7 */ FD2_SCREAM_TIMER,
/* 8 */ FD2_DAMAGE_FLASH_TIMER,
/* 9 */ FD2_HOLE_COUNTER,
/* 10 */ FD2_INVINC_TIMER,
/* 11 */ FD2_FAKEOUT_COUNT,
/* 19 */ FD2_SHORT_COUNT = 19
} BossFd2S16Var;
typedef enum {
/* 0 */ FD2_TEX1_SCROLL_X,
/* 1 */ FD2_TEX1_SCROLL_Y,
/* 2 */ FD2_TEX2_SCROLL_X,
/* 3 */ FD2_TEX2_SCROLL_Y,
/* 10 */ FD2_END_FRAME = 10,
/* 18 */ FD2_FLOAT_COUNT = 18
} BossFd2F32Var;
typedef struct BossFd2 {
/* 0x0000 */ Actor actor;
/* 0x014C */ char unk_14C[0x1530];
/* 0x014C */ SkelAnime skelAnime;
/* 0x0190 */ BossFd2ActionFunc actionFunc;
/* 0x0194 */ u8 disableAT;
/* 0x0196 */ s16 work[FD2_SHORT_COUNT];
/* 0x01BC */ s16 timers[5];
/* 0x01C8 */ f32 fwork[FD2_FLOAT_COUNT];
/* 0x0210 */ Vec3f headPos;
/* 0x021C */ Vec3s headRot;
/* 0x0222 */ char unk_222;
/* 0x0223 */ u8 eyeState;
/* 0x0224 */ char unk_224[0xC90]; // despite its size, seems to be unused.
/* 0x0EB4 */ BossFd2Mane centerMane;
/* 0x1050 */ BossFd2Mane rightMane;
/* 0x11EC */ BossFd2Mane leftMane;
/* 0x1388 */ char unk_1388[4];
/* 0x138C */ f32 jawOpening;
/* 0x1390 */ s16 deathState;
/* 0x1392 */ s16 deathCamera;
/* 0x1394 */ BossFd2Cam camData;
/* 0x141C */ ColliderJntSph collider;
/* 0x143C */ ColliderJntSphElement elements[9];
} BossFd2; // size = 0x167C
extern const ActorInit Boss_Fd2_InitVars;

View file

@ -0,0 +1,116 @@
#include "global.h"
static ColliderJntSphElementInit sJntSphElementsInit[9] = {
{
{
ELEMTYPE_UNK3,
{ 0xFFCFFFFF, 0x00, 0x20 },
{ 0xFFCDFFFE, 0x00, 0x00 },
TOUCH_NONE,
BUMP_ON | BUMP_HOOKABLE,
OCELEM_ON,
},
{ 35, { { 6000, 0, 0 }, 21 }, 100 },
},
{
{
ELEMTYPE_UNK2,
{ 0xFFCFFFFF, 0x00, 0x20 },
{ 0xFFCDFFFE, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_NONE,
OCELEM_ON,
},
{ 18, { { 4000, 0, 0 }, 13 }, 100 },
},
{
{
ELEMTYPE_UNK2,
{ 0xFFCFFFFF, 0x00, 0x20 },
{ 0xFFCDFFFE, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_NONE,
OCELEM_ON,
},
{ 19, { { 3000, 0, 0 }, 13 }, 100 },
},
{
{
ELEMTYPE_UNK2,
{ 0xFFCFFFFF, 0x00, 0x20 },
{ 0xFFCDFFFE, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_NONE,
OCELEM_ON,
},
{ 20, { { 4000, 0, 0 }, 15 }, 100 },
},
{
{
ELEMTYPE_UNK2,
{ 0xFFCFFFFF, 0x00, 0x20 },
{ 0xFFCDFFFE, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_NONE,
OCELEM_ON,
},
{ 24, { { 4000, 0, 0 }, 13 }, 100 },
},
{
{
ELEMTYPE_UNK2,
{ 0xFFCFFFFF, 0x00, 0x20 },
{ 0xFFCDFFFE, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_NONE,
OCELEM_ON,
},
{ 25, { { 3000, 0, 0 }, 13 }, 100 },
},
{
{
ELEMTYPE_UNK2,
{ 0xFFCFFFFF, 0x00, 0x20 },
{ 0xFFCDFFFE, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_NONE,
OCELEM_ON,
},
{ 26, { { 3500, 1500, 0 }, 15 }, 100 },
},
{
{
ELEMTYPE_UNK2,
{ 0xFFCFFFFF, 0x00, 0x20 },
{ 0xFFCDFFFE, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_NONE,
OCELEM_ON,
},
{ 17, { { 0, 0, 0 }, 26 }, 100 },
},
{
{
ELEMTYPE_UNK2,
{ 0xFFCFFFFF, 0x00, 0x20 },
{ 0xFFCDFFFE, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_NONE,
OCELEM_ON,
},
{ 30, { { 0, 0, 0 }, 17 }, 100 },
},
};
static ColliderJntSphInit sJntSphInit = {
{
COLTYPE_METAL,
AT_ON | AT_TYPE_ENEMY,
AC_ON | AC_TYPE_PLAYER,
OC1_ON | OC1_TYPE_PLAYER,
OC2_TYPE_1,
COLSHAPE_JNTSPH,
},
9,
sJntSphElementsInit,
};

View file

@ -181,7 +181,9 @@ void EnAnubiceFire_Update(Actor* thisx, GlobalContext* globalCtx) {
func_8002D7EC(&this->actor);
this->unk_160[0] = this->actor.world.pos;
for (i = 4; i >= 0; --i) {
if (1) {}
for (i = 4; i >= 0; i--) {
this->unk_160[i + 1] = this->unk_160[i];
}

View file

@ -1,10 +1,13 @@
/*
* File: z_en_vb_ball.c
* Overlay: ovl_En_Vb_Ball
* Description: Volvagia's Rocks
* Description: Volvagia's rocks and bones
*/
#include "z_en_vb_ball.h"
#include "objects/object_fd/object_fd.h"
#include "objects/gameplay_keep/gameplay_keep.h"
#include "overlays/actors/ovl_Boss_Fd/z_boss_fd.h"
#define FLAGS 0x00000030
@ -15,7 +18,6 @@ void EnVbBall_Destroy(Actor* thisx, GlobalContext* globalCtx);
void EnVbBall_Update(Actor* thisx, GlobalContext* globalCtx);
void EnVbBall_Draw(Actor* thisx, GlobalContext* globalCtx);
/*
const ActorInit En_Vb_Ball_InitVars = {
0,
ACTORCAT_BOSS,
@ -28,7 +30,7 @@ const ActorInit En_Vb_Ball_InitVars = {
(ActorFunc)EnVbBall_Draw,
};
static ColliderCylinderInit D_80B2A000 = {
static ColliderCylinderInit sCylinderInit = {
{
COLTYPE_NONE,
AT_ON | AT_TYPE_ENEMY,
@ -47,17 +49,279 @@ static ColliderCylinderInit D_80B2A000 = {
},
{ 20, 30, 10, { 0, 0, 0 } },
};
*/
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Vb_Ball/EnVbBall_Init.s")
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Vb_Ball/EnVbBall_Destroy.s")
void EnVbBall_Init(Actor* thisx, GlobalContext* globalCtx) {
s32 pad;
EnVbBall* this = THIS;
s32 pad2;
f32 angle;
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Vb_Ball/func_80B29158.s")
if (this->actor.params >= 200) { // Volvagia's bones
this->yRotVel = Rand_CenteredFloat(0x300);
this->xRotVel = Rand_CenteredFloat(0x300);
angle = Math_FAtan2F(this->actor.world.pos.x, this->actor.world.pos.z);
this->actor.velocity.y = Rand_ZeroFloat(3.0f);
this->actor.velocity.x = 2.0f * sinf(angle);
this->actor.velocity.z = 2.0f * cosf(angle);
this->actor.gravity = -0.8f;
} else { // Volvagia's rocks
Collider_InitCylinder(globalCtx, &this->collider);
Collider_SetCylinder(globalCtx, &this->collider, &this->actor, &sCylinderInit);
Actor_SetScale(&this->actor, this->actor.world.rot.z / 10000.0f);
this->collider.dim.radius = this->actor.scale.y * 3000.0f;
this->collider.dim.height = this->actor.scale.y * 5000.0f;
this->collider.dim.yShift = this->actor.scale.y * -2500.0f;
this->xRotVel = Rand_CenteredFloat(0x2000);
this->yRotVel = Rand_CenteredFloat(0x2000);
this->shadowSize = this->actor.scale.y * 68.0f;
}
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Vb_Ball/func_80B29230.s")
void EnVbBall_Destroy(Actor* thisx, GlobalContext* globalCtx) {
s32 pad;
EnVbBall* this = THIS;
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Vb_Ball/func_80B292D0.s")
if (this->actor.params < 200) {
Collider_DestroyCylinder(globalCtx, &this->collider);
}
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Vb_Ball/EnVbBall_Update.s")
void EnVbBall_SpawnDebris(GlobalContext* globalCtx, BossFdEffect* effect, Vec3f* position, Vec3f* velocity,
Vec3f* acceleration, f32 scale) {
s16 i;
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Vb_Ball/EnVbBall_Draw.s")
for (i = 0; i < 180; i++, effect++) {
if (effect->type == BFD_FX_NONE) {
effect->type = BFD_FX_DEBRIS;
effect->pos = *position;
effect->velocity = *velocity;
effect->accel = *acceleration;
effect->scale = scale / 1000.0f;
effect->vFdFxRotX = Rand_ZeroFloat(100.0f);
effect->vFdFxRotY = Rand_ZeroFloat(100.0f);
break;
}
}
}
void EnVbBall_SpawnDust(GlobalContext* globalCtx, BossFdEffect* effect, Vec3f* position, Vec3f* velocity,
Vec3f* acceleration, f32 scale) {
s16 i;
for (i = 0; i < 180; i++, effect++) {
if (effect->type == BFD_FX_NONE) {
effect->type = BFD_FX_DUST;
effect->pos = *position;
effect->velocity = *velocity;
effect->accel = *acceleration;
effect->timer2 = 0;
effect->scale = scale / 400.0f;
break;
}
}
}
void EnVbBall_UpdateBones(EnVbBall* this, GlobalContext* globalCtx) {
BossFd* bossFd = (BossFd*)this->actor.parent;
f32 pad2;
f32 pad1;
f32 angle;
s16 i;
Actor_UpdateBgCheckInfo(globalCtx, &this->actor, 50.0f, 50.0f, 100.0f, 4);
if ((this->actor.bgCheckFlags & 1) && (this->actor.velocity.y <= 0.0f)) {
this->xRotVel = Rand_CenteredFloat((f32)0x4000);
this->yRotVel = Rand_CenteredFloat((f32)0x4000);
angle = Math_FAtan2F(this->actor.world.pos.x, this->actor.world.pos.z);
this->actor.velocity.x = sinf(angle) * 10.0f;
this->actor.velocity.z = cosf(angle) * 10.0f;
this->actor.velocity.y *= -0.5f;
if (this->actor.params & 1) {
Audio_PlaySoundGeneral(NA_SE_EN_VALVAISA_LAND, &this->actor.projectedPos, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
}
for (i = 0; i < 10; i++) {
Vec3f dustVel = { 0.0f, 0.0f, 0.0f };
Vec3f dustAcc = { 0.0f, 0.0f, 0.0f };
Vec3f dustPos;
dustVel.x = Rand_CenteredFloat(8.0f);
dustVel.y = Rand_ZeroFloat(1.0f);
dustVel.z = Rand_CenteredFloat(8.0f);
dustAcc.y = 0.3f;
dustPos.x = Rand_CenteredFloat(20.0f) + this->actor.world.pos.x;
dustPos.y = this->actor.floorHeight + 10.0f;
dustPos.z = Rand_CenteredFloat(20.0f) + this->actor.world.pos.z;
EnVbBall_SpawnDust(globalCtx, bossFd->effects, &dustPos, &dustVel, &dustAcc,
Rand_ZeroFloat(80.0f) + 200.0f);
}
}
if (this->actor.world.pos.y < 50.0f) {
Actor_Kill(&this->actor);
}
}
void EnVbBall_Update(Actor* thisx, GlobalContext* globalCtx) {
GlobalContext* globalCtx2 = globalCtx;
EnVbBall* this = THIS;
BossFd* bossFd = (BossFd*)this->actor.parent;
f32 radius;
f32 pad2;
s16 spawnNum;
s16 i;
this->unkTimer2++;
if (this->unkTimer1 != 0) {
this->unkTimer1--;
}
this->actor.shape.rot.x += (s16)this->xRotVel;
this->actor.shape.rot.y += (s16)this->yRotVel;
this->actor.velocity.y += -1.0f;
this->actor.gravity = -1.0f;
func_8002D7EC(&this->actor);
if (this->actor.params >= 200) {
EnVbBall_UpdateBones(this, globalCtx2);
} else {
Math_ApproachF(&this->shadowOpacity, 175.0f, 1.0f, 40.0f);
radius = this->actor.scale.y * 1700.0f;
this->actor.world.pos.y -= radius;
Actor_UpdateBgCheckInfo(globalCtx2, &this->actor, 50.0f, 50.0f, 100.0f, 4);
this->actor.world.pos.y += radius;
if ((this->actor.bgCheckFlags & 1) && (this->actor.velocity.y <= 0.0f)) {
if ((this->actor.params == 100) || (this->actor.params == 101)) {
Actor_Kill(&this->actor);
if (this->actor.params == 100) {
func_80033E88(&this->actor, globalCtx2, 5, 0xA);
}
if (this->actor.params == 100) {
spawnNum = 2;
} else {
spawnNum = 2;
}
for (i = 0; i < spawnNum; i++) {
Vec3f spawnOffset;
EnVbBall* newActor;
f32 xRotVel;
if (this->actor.params == 100) {
spawnOffset.x = Rand_CenteredFloat(13.0f);
spawnOffset.y = Rand_ZeroFloat(5.0f) + 6.0f;
spawnOffset.z = Rand_CenteredFloat(13);
} else {
spawnOffset.x = Rand_CenteredFloat(10.0f);
spawnOffset.y = Rand_ZeroFloat(3.0f) + 4.0f;
spawnOffset.z = Rand_CenteredFloat(10.0f);
}
newActor = (EnVbBall*)Actor_SpawnAsChild(&globalCtx2->actorCtx, &this->actor, globalCtx2,
ACTOR_EN_VB_BALL, this->actor.world.pos.x + spawnOffset.x,
this->actor.world.pos.y + spawnOffset.y,
this->actor.world.pos.z + spawnOffset.z, 0, 0,
this->actor.world.rot.z * 0.5f, this->actor.params + 1);
if (newActor != NULL) {
if ((i == 0) && (this->actor.params == 100)) {
Audio_PlaySoundGeneral(NA_SE_EN_VALVAISA_ROCK, &newActor->actor.projectedPos, 4,
&D_801333E0, &D_801333E0, &D_801333E8);
}
newActor->actor.parent = this->actor.parent;
newActor->actor.velocity = spawnOffset;
newActor->yRotVel = 0.0f;
xRotVel = sqrtf(SQ(spawnOffset.x) + SQ(spawnOffset.z));
newActor->xRotVel = 0x1000 / 10.0f * xRotVel;
newActor->actor.shape.rot.y = Math_FAtan2F(spawnOffset.x, spawnOffset.z) * ((f32)0x8000 / M_PI);
newActor->shadowOpacity = 200.0f;
}
}
for (i = 0; i < 15; i++) {
Vec3f debrisVel1 = { 0.0f, 0.0f, 0.0f };
Vec3f debrisAcc1 = { 0.0f, -1.0f, 0.0f };
Vec3f debrisPos1;
debrisVel1.x = Rand_CenteredFloat(25.0f);
debrisVel1.y = Rand_ZeroFloat(5.0f) + 8;
debrisVel1.z = Rand_CenteredFloat(25.0f);
debrisPos1.x = Rand_CenteredFloat(10.0f) + this->actor.world.pos.x;
debrisPos1.y = Rand_CenteredFloat(10.0f) + this->actor.world.pos.y;
debrisPos1.z = Rand_CenteredFloat(10.0f) + this->actor.world.pos.z;
EnVbBall_SpawnDebris(globalCtx2, bossFd->effects, &debrisPos1, &debrisVel1, &debrisAcc1,
(s16)Rand_ZeroFloat(12.0f) + 15);
}
for (i = 0; i < 10; i++) {
Vec3f dustVel = { 0.0f, 0.0f, 0.0f };
Vec3f dustAcc = { 0.0f, 0.0f, 0.0f };
Vec3f dustPos;
dustVel.x = Rand_CenteredFloat(8.0f);
dustVel.y = Rand_ZeroFloat(1.0f);
dustVel.z = Rand_CenteredFloat(8.0f);
dustAcc.y = 1.0f / 2;
dustPos.x = Rand_CenteredFloat(30.0f) + this->actor.world.pos.x;
dustPos.y = Rand_CenteredFloat(30.0f) + this->actor.world.pos.y;
dustPos.z = Rand_CenteredFloat(30.0f) + this->actor.world.pos.z;
EnVbBall_SpawnDust(globalCtx2, bossFd->effects, &dustPos, &dustVel, &dustAcc,
Rand_ZeroFloat(100.0f) + 350.0f);
}
} else {
for (i = 0; i < 5; i++) {
Vec3f debrisVel2 = { 0.0f, 0.0f, 0.0f };
Vec3f debrisAcc2 = { 0.0f, -1.0f, 0.0f };
Vec3f debrisPos2;
debrisVel2.x = Rand_CenteredFloat(10.0f);
debrisVel2.y = Rand_ZeroFloat(3.0f) + 3.0f;
debrisVel2.z = Rand_CenteredFloat(10.0f);
debrisPos2.x = Rand_CenteredFloat(5.0f) + this->actor.world.pos.x;
debrisPos2.y = Rand_CenteredFloat(5.0f) + this->actor.world.pos.y;
debrisPos2.z = Rand_CenteredFloat(5.0f) + this->actor.world.pos.z;
EnVbBall_SpawnDebris(globalCtx2, bossFd->effects, &debrisPos2, &debrisVel2, &debrisAcc2,
(s16)Rand_ZeroFloat(12.0f) + 15);
}
Actor_Kill(&this->actor);
}
}
if (this->collider.base.atFlags & AT_HIT) {
Player* player = PLAYER;
this->collider.base.atFlags &= ~AT_HIT;
Audio_PlayActorSound2(&player->actor, NA_SE_PL_BODY_HIT);
}
Collider_UpdateCylinder(&this->actor, &this->collider);
CollisionCheck_SetAT(globalCtx2, &globalCtx2->colChkCtx, &this->collider.base);
}
}
void EnVbBall_Draw(Actor* thisx, GlobalContext* globalCtx) {
s32 pad;
EnVbBall* this = THIS;
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_vb_ball.c", 604);
if (1) {} // needed for match
func_80093D18(globalCtx->state.gfxCtx);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_vb_ball.c", 607),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
if (this->actor.params >= 200) {
gSPDisplayList(POLY_OPA_DISP++, SEGMENTED_TO_VIRTUAL(gVolvagiaRibsDL));
} else {
gSPDisplayList(POLY_OPA_DISP++, SEGMENTED_TO_VIRTUAL(gVolvagiaRockDL));
func_80094044(globalCtx->state.gfxCtx);
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 0, 0, 0, (s8)this->shadowOpacity);
Matrix_Translate(this->actor.world.pos.x, 100.0f, this->actor.world.pos.z, MTXMODE_NEW);
Matrix_Scale(this->shadowSize, 1.0f, this->shadowSize, MTXMODE_APPLY);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_vb_ball.c", 626),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(gCircleShadowDL));
}
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_vb_ball.c", 632);
}

View file

@ -8,7 +8,15 @@ struct EnVbBall;
typedef struct EnVbBall {
/* 0x0000 */ Actor actor;
/* 0x014C */ char unk_14C[0x68];
/* 0x014C */ char unk_14C[4];
/* 0x0150 */ s16 unkTimer1; // These count up and down, but nothing uses them.
/* 0x0152 */ s16 unkTimer2;
/* 0x0154 */ char unk_154[4];
/* 0x0158 */ f32 xRotVel;
/* 0x015C */ f32 yRotVel;
/* 0x0160 */ f32 shadowSize;
/* 0x0164 */ f32 shadowOpacity;
/* 0x0168 */ ColliderCylinder collider;
} EnVbBall; // size = 0x01B4
extern const ActorInit En_Vb_Ball_InitVars;