mirror of
https://github.com/zeldaret/oot.git
synced 2024-11-13 04:39:36 +00:00
Improve Matches: Part 4 (#1545)
* more improvements * small cleanup * PR Review
This commit is contained in:
parent
fefeb369dd
commit
873c55faad
12 changed files with 426 additions and 413 deletions
|
@ -200,50 +200,54 @@ void ArrowFire_Draw(Actor* thisx, PlayState* play2) {
|
|||
|
||||
stateFrames = play->state.frames;
|
||||
arrow = (EnArrow*)this->actor.parent;
|
||||
if (1) {}
|
||||
|
||||
if ((arrow != NULL) && (arrow->actor.update != NULL) && (this->timer < 255)) {
|
||||
if (1) {}
|
||||
transform = (arrow->hitFlags & 2) ? &this->actor : &arrow->actor;
|
||||
|
||||
OPEN_DISPS(play->state.gfxCtx, "../z_arrow_fire.c", 618);
|
||||
|
||||
Matrix_Translate(transform->world.pos.x, transform->world.pos.y, transform->world.pos.z, MTXMODE_NEW);
|
||||
Matrix_RotateY(BINANG_TO_RAD(transform->shape.rot.y), MTXMODE_APPLY);
|
||||
Matrix_RotateX(BINANG_TO_RAD(transform->shape.rot.x), MTXMODE_APPLY);
|
||||
Matrix_RotateZ(BINANG_TO_RAD(transform->shape.rot.z), MTXMODE_APPLY);
|
||||
Matrix_Scale(0.01f, 0.01f, 0.01f, MTXMODE_APPLY);
|
||||
|
||||
// Draw red effect over the screen when arrow hits
|
||||
if (this->unk_15C > 0) {
|
||||
POLY_XLU_DISP = Gfx_SetupDL_57(POLY_XLU_DISP);
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, (s32)(40.0f * this->unk_15C) & 0xFF, 0, 0,
|
||||
(s32)(150.0f * this->unk_15C) & 0xFF);
|
||||
gDPSetAlphaDither(POLY_XLU_DISP++, G_AD_DISABLE);
|
||||
gDPSetColorDither(POLY_XLU_DISP++, G_CD_DISABLE);
|
||||
gDPFillRectangle(POLY_XLU_DISP++, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1);
|
||||
}
|
||||
|
||||
// Draw fire on the arrow
|
||||
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, 255, 200, 0, this->alpha);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, 255, 0, 0, 128);
|
||||
Matrix_RotateZYX(0x4000, 0x0, 0x0, MTXMODE_APPLY);
|
||||
if (this->timer != 0) {
|
||||
Matrix_Translate(0.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
} else {
|
||||
Matrix_Translate(0.0f, 1500.0f, 0.0f, MTXMODE_APPLY);
|
||||
}
|
||||
Matrix_Scale(this->radius * 0.2f, this->unk_158 * 4.0f, this->radius * 0.2f, MTXMODE_APPLY);
|
||||
Matrix_Translate(0.0f, -700.0f, 0.0f, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_arrow_fire.c", 666),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_XLU_DISP++, sMaterialDL);
|
||||
gSPDisplayList(POLY_XLU_DISP++,
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 255 - (stateFrames * 2) % 256, 0, 64, 32,
|
||||
1, 255 - stateFrames % 256, 511 - (stateFrames * 10) % 512, 64, 64));
|
||||
gSPDisplayList(POLY_XLU_DISP++, sModelDL);
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx, "../z_arrow_fire.c", 682);
|
||||
if ((arrow == NULL) || (arrow->actor.update == NULL)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this->timer >= 255) {
|
||||
return;
|
||||
}
|
||||
|
||||
transform = (arrow->hitFlags & 2) ? &this->actor : &arrow->actor;
|
||||
|
||||
OPEN_DISPS(play->state.gfxCtx, "../z_arrow_fire.c", 618);
|
||||
|
||||
Matrix_Translate(transform->world.pos.x, transform->world.pos.y, transform->world.pos.z, MTXMODE_NEW);
|
||||
Matrix_RotateY(BINANG_TO_RAD(transform->shape.rot.y), MTXMODE_APPLY);
|
||||
Matrix_RotateX(BINANG_TO_RAD(transform->shape.rot.x), MTXMODE_APPLY);
|
||||
Matrix_RotateZ(BINANG_TO_RAD(transform->shape.rot.z), MTXMODE_APPLY);
|
||||
Matrix_Scale(0.01f, 0.01f, 0.01f, MTXMODE_APPLY);
|
||||
|
||||
// Draw red effect over the screen when arrow hits
|
||||
if (this->unk_15C > 0) {
|
||||
POLY_XLU_DISP = Gfx_SetupDL_57(POLY_XLU_DISP);
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, (s32)(40.0f * this->unk_15C) & 0xFF, 0, 0,
|
||||
(s32)(150.0f * this->unk_15C) & 0xFF);
|
||||
gDPSetAlphaDither(POLY_XLU_DISP++, G_AD_DISABLE);
|
||||
gDPSetColorDither(POLY_XLU_DISP++, G_CD_DISABLE);
|
||||
gDPFillRectangle(POLY_XLU_DISP++, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1);
|
||||
}
|
||||
|
||||
// Draw fire on the arrow
|
||||
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, 255, 200, 0, this->alpha);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, 255, 0, 0, 128);
|
||||
Matrix_RotateZYX(0x4000, 0x0, 0x0, MTXMODE_APPLY);
|
||||
if (this->timer != 0) {
|
||||
Matrix_Translate(0.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
} else {
|
||||
Matrix_Translate(0.0f, 1500.0f, 0.0f, MTXMODE_APPLY);
|
||||
}
|
||||
Matrix_Scale(this->radius * 0.2f, this->unk_158 * 4.0f, this->radius * 0.2f, MTXMODE_APPLY);
|
||||
Matrix_Translate(0.0f, -700.0f, 0.0f, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_arrow_fire.c", 666),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_XLU_DISP++, sMaterialDL);
|
||||
gSPDisplayList(POLY_XLU_DISP++,
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 255 - (stateFrames * 2) % 256, 0, 64, 32, 1,
|
||||
255 - stateFrames % 256, 511 - (stateFrames * 10) % 512, 64, 64));
|
||||
gSPDisplayList(POLY_XLU_DISP++, sModelDL);
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx, "../z_arrow_fire.c", 682);
|
||||
}
|
||||
|
|
|
@ -199,50 +199,53 @@ void ArrowIce_Draw(Actor* thisx, PlayState* play) {
|
|||
u32 stateFrames = play->state.frames;
|
||||
EnArrow* arrow = (EnArrow*)this->actor.parent;
|
||||
|
||||
if (1) {}
|
||||
|
||||
if ((arrow != NULL) && (arrow->actor.update != NULL) && (this->timer < 255)) {
|
||||
if (1) {}
|
||||
transform = (arrow->hitFlags & 2) ? &this->actor : &arrow->actor;
|
||||
|
||||
OPEN_DISPS(play->state.gfxCtx, "../z_arrow_ice.c", 610);
|
||||
|
||||
Matrix_Translate(transform->world.pos.x, transform->world.pos.y, transform->world.pos.z, MTXMODE_NEW);
|
||||
Matrix_RotateY(BINANG_TO_RAD(transform->shape.rot.y), MTXMODE_APPLY);
|
||||
Matrix_RotateX(BINANG_TO_RAD(transform->shape.rot.x), MTXMODE_APPLY);
|
||||
Matrix_RotateZ(BINANG_TO_RAD(transform->shape.rot.z), MTXMODE_APPLY);
|
||||
Matrix_Scale(0.01f, 0.01f, 0.01f, MTXMODE_APPLY);
|
||||
|
||||
// Draw blue effect over the screen when arrow hits
|
||||
if (this->unk_164 > 0) {
|
||||
POLY_XLU_DISP = Gfx_SetupDL_57(POLY_XLU_DISP);
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 0, (s32)(10.0f * this->unk_164) & 0xFF,
|
||||
(s32)(50.0f * this->unk_164) & 0xFF, (s32)(150.0f * this->unk_164) & 0xFF);
|
||||
gDPSetAlphaDither(POLY_XLU_DISP++, G_AD_DISABLE);
|
||||
gDPSetColorDither(POLY_XLU_DISP++, G_CD_DISABLE);
|
||||
gDPFillRectangle(POLY_XLU_DISP++, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1);
|
||||
}
|
||||
|
||||
// Draw ice on the arrow
|
||||
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, 170, 255, 255, this->alpha);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, 0, 0, 255, 128);
|
||||
Matrix_RotateZYX(0x4000, 0x0, 0x0, MTXMODE_APPLY);
|
||||
if (this->timer != 0) {
|
||||
Matrix_Translate(0.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
} else {
|
||||
Matrix_Translate(0.0f, 1500.0f, 0.0f, MTXMODE_APPLY);
|
||||
}
|
||||
Matrix_Scale(this->radius * 0.2f, this->unk_160 * 3.0f, this->radius * 0.2f, MTXMODE_APPLY);
|
||||
Matrix_Translate(0.0f, -700.0f, 0.0f, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_arrow_ice.c", 660),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_XLU_DISP++, sMaterialDL);
|
||||
gSPDisplayList(POLY_XLU_DISP++,
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 511 - (stateFrames * 5) % 512, 0, 128, 32,
|
||||
1, 511 - (stateFrames * 10) % 512, 511 - (stateFrames * 10) % 512, 4, 16));
|
||||
gSPDisplayList(POLY_XLU_DISP++, sModelDL);
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx, "../z_arrow_ice.c", 676);
|
||||
if ((arrow == NULL) || (arrow->actor.update == NULL)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this->timer >= 255) {
|
||||
return;
|
||||
}
|
||||
|
||||
transform = (arrow->hitFlags & 2) ? &this->actor : &arrow->actor;
|
||||
|
||||
OPEN_DISPS(play->state.gfxCtx, "../z_arrow_ice.c", 610);
|
||||
|
||||
Matrix_Translate(transform->world.pos.x, transform->world.pos.y, transform->world.pos.z, MTXMODE_NEW);
|
||||
Matrix_RotateY(BINANG_TO_RAD(transform->shape.rot.y), MTXMODE_APPLY);
|
||||
Matrix_RotateX(BINANG_TO_RAD(transform->shape.rot.x), MTXMODE_APPLY);
|
||||
Matrix_RotateZ(BINANG_TO_RAD(transform->shape.rot.z), MTXMODE_APPLY);
|
||||
Matrix_Scale(0.01f, 0.01f, 0.01f, MTXMODE_APPLY);
|
||||
|
||||
// Draw blue effect over the screen when arrow hits
|
||||
if (this->unk_164 > 0) {
|
||||
POLY_XLU_DISP = Gfx_SetupDL_57(POLY_XLU_DISP);
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 0, (s32)(10.0f * this->unk_164) & 0xFF,
|
||||
(s32)(50.0f * this->unk_164) & 0xFF, (s32)(150.0f * this->unk_164) & 0xFF);
|
||||
gDPSetAlphaDither(POLY_XLU_DISP++, G_AD_DISABLE);
|
||||
gDPSetColorDither(POLY_XLU_DISP++, G_CD_DISABLE);
|
||||
gDPFillRectangle(POLY_XLU_DISP++, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1);
|
||||
}
|
||||
|
||||
// Draw ice on the arrow
|
||||
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, 170, 255, 255, this->alpha);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, 0, 0, 255, 128);
|
||||
Matrix_RotateZYX(0x4000, 0x0, 0x0, MTXMODE_APPLY);
|
||||
if (this->timer != 0) {
|
||||
Matrix_Translate(0.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
} else {
|
||||
Matrix_Translate(0.0f, 1500.0f, 0.0f, MTXMODE_APPLY);
|
||||
}
|
||||
Matrix_Scale(this->radius * 0.2f, this->unk_160 * 3.0f, this->radius * 0.2f, MTXMODE_APPLY);
|
||||
Matrix_Translate(0.0f, -700.0f, 0.0f, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_arrow_ice.c", 660),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_XLU_DISP++, sMaterialDL);
|
||||
gSPDisplayList(POLY_XLU_DISP++,
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 511 - (stateFrames * 5) % 512, 0, 128, 32, 1,
|
||||
511 - (stateFrames * 10) % 512, 511 - (stateFrames * 10) % 512, 4, 16));
|
||||
gSPDisplayList(POLY_XLU_DISP++, sModelDL);
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx, "../z_arrow_ice.c", 676);
|
||||
}
|
||||
|
|
|
@ -197,50 +197,53 @@ void ArrowLight_Draw(Actor* thisx, PlayState* play) {
|
|||
EnArrow* arrow = (EnArrow*)this->actor.parent;
|
||||
Actor* transform;
|
||||
|
||||
if (1) {}
|
||||
|
||||
if ((arrow != NULL) && (arrow->actor.update != NULL) && (this->timer < 255)) {
|
||||
if (1) {}
|
||||
transform = (arrow->hitFlags & 2) ? &this->actor : &arrow->actor;
|
||||
|
||||
OPEN_DISPS(play->state.gfxCtx, "../z_arrow_light.c", 598);
|
||||
|
||||
Matrix_Translate(transform->world.pos.x, transform->world.pos.y, transform->world.pos.z, MTXMODE_NEW);
|
||||
Matrix_RotateY(BINANG_TO_RAD(transform->shape.rot.y), MTXMODE_APPLY);
|
||||
Matrix_RotateX(BINANG_TO_RAD(transform->shape.rot.x), MTXMODE_APPLY);
|
||||
Matrix_RotateZ(BINANG_TO_RAD(transform->shape.rot.z), MTXMODE_APPLY);
|
||||
Matrix_Scale(0.01f, 0.01f, 0.01f, MTXMODE_APPLY);
|
||||
|
||||
// Draw yellow effect over the screen when arrow hits
|
||||
if (this->unk_164 > 0) {
|
||||
POLY_XLU_DISP = Gfx_SetupDL_57(POLY_XLU_DISP);
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, (s32)(30.0f * this->unk_164) & 0xFF,
|
||||
(s32)(40.0f * this->unk_164) & 0xFF, 0, (s32)(150.0f * this->unk_164) & 0xFF);
|
||||
gDPSetAlphaDither(POLY_XLU_DISP++, G_AD_DISABLE);
|
||||
gDPSetColorDither(POLY_XLU_DISP++, G_CD_DISABLE);
|
||||
gDPFillRectangle(POLY_XLU_DISP++, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1);
|
||||
}
|
||||
|
||||
// Draw light on the arrow
|
||||
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, 255, 255, 170, this->alpha);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, 255, 255, 0, 128);
|
||||
Matrix_RotateZYX(0x4000, 0x0, 0x0, MTXMODE_APPLY);
|
||||
if (this->timer != 0) {
|
||||
Matrix_Translate(0.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
} else {
|
||||
Matrix_Translate(0.0f, 1500.0f, 0.0f, MTXMODE_APPLY);
|
||||
}
|
||||
Matrix_Scale(this->radius * 0.2f, this->unk_160 * 4.0f, this->radius * 0.2f, MTXMODE_APPLY);
|
||||
Matrix_Translate(0.0f, -700.0f, 0.0f, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_arrow_light.c", 648),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_XLU_DISP++, sMaterialDL);
|
||||
gSPDisplayList(POLY_XLU_DISP++,
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 511 - (stateFrames * 5) % 512, 0, 4, 32, 1,
|
||||
511 - (stateFrames * 10) % 512, 511 - (stateFrames * 30) % 512, 8, 16));
|
||||
gSPDisplayList(POLY_XLU_DISP++, sModelDL);
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx, "../z_arrow_light.c", 664);
|
||||
if ((arrow == NULL) || (arrow->actor.update == NULL)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this->timer >= 255) {
|
||||
return;
|
||||
}
|
||||
|
||||
transform = (arrow->hitFlags & 2) ? &this->actor : &arrow->actor;
|
||||
|
||||
OPEN_DISPS(play->state.gfxCtx, "../z_arrow_light.c", 598);
|
||||
|
||||
Matrix_Translate(transform->world.pos.x, transform->world.pos.y, transform->world.pos.z, MTXMODE_NEW);
|
||||
Matrix_RotateY(BINANG_TO_RAD(transform->shape.rot.y), MTXMODE_APPLY);
|
||||
Matrix_RotateX(BINANG_TO_RAD(transform->shape.rot.x), MTXMODE_APPLY);
|
||||
Matrix_RotateZ(BINANG_TO_RAD(transform->shape.rot.z), MTXMODE_APPLY);
|
||||
Matrix_Scale(0.01f, 0.01f, 0.01f, MTXMODE_APPLY);
|
||||
|
||||
// Draw yellow effect over the screen when arrow hits
|
||||
if (this->unk_164 > 0) {
|
||||
POLY_XLU_DISP = Gfx_SetupDL_57(POLY_XLU_DISP);
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, (s32)(30.0f * this->unk_164) & 0xFF, (s32)(40.0f * this->unk_164) & 0xFF,
|
||||
0, (s32)(150.0f * this->unk_164) & 0xFF);
|
||||
gDPSetAlphaDither(POLY_XLU_DISP++, G_AD_DISABLE);
|
||||
gDPSetColorDither(POLY_XLU_DISP++, G_CD_DISABLE);
|
||||
gDPFillRectangle(POLY_XLU_DISP++, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1);
|
||||
}
|
||||
|
||||
// Draw light on the arrow
|
||||
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, 255, 255, 170, this->alpha);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, 255, 255, 0, 128);
|
||||
Matrix_RotateZYX(0x4000, 0x0, 0x0, MTXMODE_APPLY);
|
||||
if (this->timer != 0) {
|
||||
Matrix_Translate(0.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
} else {
|
||||
Matrix_Translate(0.0f, 1500.0f, 0.0f, MTXMODE_APPLY);
|
||||
}
|
||||
Matrix_Scale(this->radius * 0.2f, this->unk_160 * 4.0f, this->radius * 0.2f, MTXMODE_APPLY);
|
||||
Matrix_Translate(0.0f, -700.0f, 0.0f, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_arrow_light.c", 648),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_XLU_DISP++, sMaterialDL);
|
||||
gSPDisplayList(POLY_XLU_DISP++,
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 511 - (stateFrames * 5) % 512, 0, 4, 32, 1,
|
||||
511 - (stateFrames * 10) % 512, 511 - (stateFrames * 30) % 512, 8, 16));
|
||||
gSPDisplayList(POLY_XLU_DISP++, sModelDL);
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx, "../z_arrow_light.c", 664);
|
||||
}
|
||||
|
|
|
@ -100,10 +100,11 @@ void BgGndDarkmeiro_Destroy(Actor* thisx, PlayState* play2) {
|
|||
PlayState* play = play2;
|
||||
BgGndDarkmeiro* this = (BgGndDarkmeiro*)thisx;
|
||||
|
||||
if ((this->dyna.actor.params & 0xFF) == 1) {
|
||||
if (1) {}
|
||||
DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
if ((this->dyna.actor.params & 0xFF) != 1) {
|
||||
return;
|
||||
}
|
||||
|
||||
DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
}
|
||||
|
||||
void BgGndDarkmeiro_Noop(BgGndDarkmeiro* this, PlayState* play) {
|
||||
|
|
|
@ -51,10 +51,11 @@ void BgGndFiremeiro_Destroy(Actor* thisx, PlayState* play2) {
|
|||
PlayState* play = play2;
|
||||
BgGndFiremeiro* this = (BgGndFiremeiro*)thisx;
|
||||
|
||||
if (this->dyna.actor.params == 0) {
|
||||
if (1) {}
|
||||
DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
if (this->dyna.actor.params != 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
}
|
||||
|
||||
void BgGndFiremeiro_Sink(BgGndFiremeiro* this, PlayState* play) {
|
||||
|
|
|
@ -298,15 +298,16 @@ void BgJyaCobra_UpdateShadowFromSide(BgJyaCobra* this) {
|
|||
z = (88.0f - spBC.z) * 0.64f + 0.5f;
|
||||
for (k = 0; k < 11; k++) {
|
||||
temp_z = z - 5 + k;
|
||||
if (!(temp_z & ~0x3F)) {
|
||||
temp_z *= 0x40;
|
||||
for (l = 0; l < 11; l++) {
|
||||
temp_x = x - 5 + l;
|
||||
if (!(temp_x & ~0x3F)) {
|
||||
shadowTex[temp_z + temp_x] |= D_8089731C[k][l];
|
||||
}
|
||||
if (1) {}
|
||||
if (temp_z & ~0x3F) {
|
||||
continue;
|
||||
}
|
||||
temp_z *= 0x40;
|
||||
for (l = 0; l < 11; l++) {
|
||||
temp_x = x - 5 + l;
|
||||
if (temp_x & ~0x3F) {
|
||||
continue;
|
||||
}
|
||||
shadowTex[temp_z + temp_x] |= D_8089731C[k][l];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -326,14 +327,16 @@ void BgJyaCobra_UpdateShadowFromSide(BgJyaCobra* this) {
|
|||
z = (s32)(((88.0f - spBC.z) * 0.64f) + 0.5f);
|
||||
for (k = 0; k < 3; k++) {
|
||||
temp_z = z - 1 + k;
|
||||
if (!(temp_z & ~0x3F)) {
|
||||
temp_z *= 0x40;
|
||||
for (l = 0; l < 3; l++) {
|
||||
temp_x = x - 1 + l;
|
||||
if (!(temp_x & ~0x3F)) {
|
||||
shadowTex[temp_z + temp_x] |= D_80897398[k][l];
|
||||
}
|
||||
if (temp_z & ~0x3F) {
|
||||
continue;
|
||||
}
|
||||
temp_z *= 0x40;
|
||||
for (l = 0; l < 3; l++) {
|
||||
temp_x = x - 1 + l;
|
||||
if (temp_x & ~0x3F) {
|
||||
continue;
|
||||
}
|
||||
shadowTex[temp_z + temp_x] |= D_80897398[k][l];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -348,7 +351,6 @@ void BgJyaCobra_UpdateShadowFromSide(BgJyaCobra* this) {
|
|||
shadowTex[j * 0x40 + 0] = 0;
|
||||
shadowTex[j * 0x40 + 0x3F] = 0;
|
||||
}
|
||||
if (D_80897398[0][0]) {}
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -137,23 +137,19 @@ void BgSpot00Hanebasi_Destroy(Actor* thisx, PlayState* play) {
|
|||
void BgSpot00Hanebasi_DrawbridgeWait(BgSpot00Hanebasi* this, PlayState* play) {
|
||||
BgSpot00Hanebasi* child = (BgSpot00Hanebasi*)this->dyna.actor.child;
|
||||
|
||||
if (IS_CUTSCENE_LAYER || !CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD) || !CHECK_QUEST_ITEM(QUEST_GORON_RUBY) ||
|
||||
!CHECK_QUEST_ITEM(QUEST_ZORA_SAPPHIRE) || GET_EVENTCHKINF(EVENTCHKINF_80)) {
|
||||
if (this->dyna.actor.shape.rot.x != 0) {
|
||||
if (CutsceneFlags_Get(play, 0) || (!IS_CUTSCENE_LAYER && IS_DAY)) {
|
||||
this->actionFunc = BgSpot00Hanebasi_DrawbridgeRiseAndFall;
|
||||
this->destAngle = 0;
|
||||
child->destAngle = 0;
|
||||
return;
|
||||
}
|
||||
if (!IS_CUTSCENE_LAYER && CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD) && CHECK_QUEST_ITEM(QUEST_GORON_RUBY) &&
|
||||
CHECK_QUEST_ITEM(QUEST_ZORA_SAPPHIRE) && !GET_EVENTCHKINF(EVENTCHKINF_80)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this) {} // required to match
|
||||
}
|
||||
if ((this->dyna.actor.shape.rot.x == 0) && !IS_CUTSCENE_LAYER && !LINK_IS_ADULT && !IS_DAY) {
|
||||
this->actionFunc = BgSpot00Hanebasi_DrawbridgeRiseAndFall;
|
||||
this->destAngle = -0x4000;
|
||||
child->destAngle = -0xFE0;
|
||||
}
|
||||
if ((this->dyna.actor.shape.rot.x != 0) && (CutsceneFlags_Get(play, 0) || (!IS_CUTSCENE_LAYER && IS_DAY))) {
|
||||
this->actionFunc = BgSpot00Hanebasi_DrawbridgeRiseAndFall;
|
||||
this->destAngle = 0;
|
||||
child->destAngle = 0;
|
||||
} else if ((this->dyna.actor.shape.rot.x == 0) && !IS_CUTSCENE_LAYER && !LINK_IS_ADULT && !IS_DAY) {
|
||||
this->actionFunc = BgSpot00Hanebasi_DrawbridgeRiseAndFall;
|
||||
this->destAngle = -0x4000;
|
||||
child->destAngle = -0xFE0;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -932,7 +932,6 @@ void BossDodongo_Update(Actor* thisx, PlayState* play2) {
|
|||
} else if (this->unk_224 > 1.7f) {
|
||||
phi_s0_3 = 3;
|
||||
sp90 = 1;
|
||||
if (play) {}
|
||||
magma2DrawMode = 0;
|
||||
} else if (this->unk_224 > 1.4f) {
|
||||
phi_s0_3 = 7;
|
||||
|
@ -1025,9 +1024,10 @@ void BossDodongo_Update(Actor* thisx, PlayState* play2) {
|
|||
this->collider.elements[0].dim.scale = (this->actionFunc == BossDodongo_Inhale) ? 0.0f : 1.0f;
|
||||
|
||||
for (i = 6; i < 19; i++) {
|
||||
if (i != 12) {
|
||||
this->collider.elements[i].dim.scale = (this->actionFunc == BossDodongo_Roll) ? 0.0f : 1.0f;
|
||||
if (i == 12) {
|
||||
continue;
|
||||
}
|
||||
this->collider.elements[i].dim.scale = (this->actionFunc == BossDodongo_Roll) ? 0.0f : 1.0f;
|
||||
}
|
||||
|
||||
if (this->unk_244 != 0) {
|
||||
|
|
|
@ -1914,8 +1914,6 @@ void BossGoma_Update(Actor* thisx, PlayState* play) {
|
|||
this->sfxFaintTimer--;
|
||||
}
|
||||
|
||||
if (1) {}
|
||||
|
||||
this->eyeState = EYESTATE_IRIS_FOLLOW_BONUS_IFRAMES;
|
||||
this->actionFunc(this, play);
|
||||
this->actor.shape.rot.y = this->actor.world.rot.y;
|
||||
|
@ -1937,15 +1935,17 @@ void BossGoma_Update(Actor* thisx, PlayState* play) {
|
|||
BossGoma_UpdateEyeEnvColor(this);
|
||||
BossGoma_UpdateTailLimbsScale(this);
|
||||
|
||||
if (!this->disableGameplayLogic) {
|
||||
BossGoma_UpdateHit(this, play);
|
||||
CollisionCheck_SetAC(play, &play->colChkCtx, &this->collider.base);
|
||||
CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider.base);
|
||||
if (this->disableGameplayLogic) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this->actionFunc != BossGoma_FloorStunned && this->actionFunc != BossGoma_FloorDamaged &&
|
||||
(this->actionFunc != BossGoma_FloorMain || this->timer == 0)) {
|
||||
CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider.base);
|
||||
}
|
||||
BossGoma_UpdateHit(this, play);
|
||||
CollisionCheck_SetAC(play, &play->colChkCtx, &this->collider.base);
|
||||
CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider.base);
|
||||
|
||||
if (this->actionFunc != BossGoma_FloorStunned && this->actionFunc != BossGoma_FloorDamaged &&
|
||||
(this->actionFunc != BossGoma_FloorMain || this->timer == 0)) {
|
||||
CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider.base);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -920,7 +920,6 @@ void BossMo_Tentacle(BossMo* this, PlayState* play) {
|
|||
this->actor.flags &= ~ACTOR_FLAG_0;
|
||||
Math_ApproachF(&this->baseAlpha, 0.0, 1.0f, 5.0f);
|
||||
for (indS1 = 0; indS1 < 40; indS1++) {
|
||||
if (sMorphaTent2->tentSpawnPos) {}
|
||||
indT5 = Rand_ZeroFloat(20.9f);
|
||||
indS0 = sTentSpawnIndex[indT5];
|
||||
spFC.x = 0;
|
||||
|
@ -930,16 +929,17 @@ void BossMo_Tentacle(BossMo* this, PlayState* play) {
|
|||
Matrix_MultVec3f(&spFC, &spF0);
|
||||
spF0.x = player->actor.world.pos.x + spF0.x;
|
||||
spF0.z = player->actor.world.pos.z + spF0.z;
|
||||
if ((fabsf(spF0.x - sTentSpawnPos[indS0].x) <= 320) &&
|
||||
(fabsf(spF0.z - sTentSpawnPos[indS0].y) <= 320) &&
|
||||
((sMorphaTent2 == NULL) || (sMorphaTent2->tentSpawnPos != indS0))) {
|
||||
this->targetPos.x = sTentSpawnPos[indS0].x;
|
||||
this->targetPos.z = sTentSpawnPos[indS0].y;
|
||||
this->tentSpawnPos = indS0;
|
||||
this->timers[0] = (s16)Rand_ZeroFloat(20.0f) + 30;
|
||||
this->work[MO_TENT_ACTION_STATE] = MO_TENT_DESPAWN;
|
||||
break;
|
||||
if (!(fabsf(spF0.x - sTentSpawnPos[indS0].x) <= 320) ||
|
||||
!(fabsf(spF0.z - sTentSpawnPos[indS0].y) <= 320) ||
|
||||
((sMorphaTent2 != NULL) && (sMorphaTent2->tentSpawnPos == indS0))) {
|
||||
continue;
|
||||
}
|
||||
this->targetPos.x = sTentSpawnPos[indS0].x;
|
||||
this->targetPos.z = sTentSpawnPos[indS0].y;
|
||||
this->tentSpawnPos = indS0;
|
||||
this->timers[0] = (s16)Rand_ZeroFloat(20.0f) + 30;
|
||||
this->work[MO_TENT_ACTION_STATE] = MO_TENT_DESPAWN;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ((this == sMorphaTent1) && (sMorphaCore->hitCount >= 3) && (sMorphaTent2 == NULL)) {
|
||||
|
|
|
@ -2863,9 +2863,6 @@ void BossTw_Update(Actor* thisx, PlayState* play) {
|
|||
|
||||
this->blastTailPos[this->work[TAIL_IDX]] = this->actor.world.pos;
|
||||
|
||||
if (1) {}
|
||||
if (1) {}
|
||||
|
||||
for (i = 0; i < 5; i++) {
|
||||
if (this->timers[i] != 0) {
|
||||
this->timers[i]--;
|
||||
|
@ -2890,68 +2887,62 @@ void BossTw_Update(Actor* thisx, PlayState* play) {
|
|||
|
||||
this->actionFunc(this, play);
|
||||
|
||||
if (this->actionFunc != BossTw_Wait) {
|
||||
this->collider.dim.radius = 45;
|
||||
if (this->actionFunc == BossTw_Wait) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this->actionFunc == BossTw_Spin) {
|
||||
this->collider.dim.radius *= 2;
|
||||
this->collider.dim.radius = 45;
|
||||
|
||||
if (this->actionFunc == BossTw_Spin) {
|
||||
this->collider.dim.radius *= 2;
|
||||
}
|
||||
|
||||
this->collider.dim.height = 120;
|
||||
this->collider.dim.yShift = -30;
|
||||
|
||||
if (this->work[INVINC_TIMER] == 0) {
|
||||
if (this->collider.base.acFlags & AC_HIT) {
|
||||
this->collider.base.acFlags &= ~AC_HIT;
|
||||
}
|
||||
|
||||
this->collider.dim.height = 120;
|
||||
this->collider.dim.yShift = -30;
|
||||
Collider_UpdateCylinder(&this->actor, &this->collider);
|
||||
CollisionCheck_SetAC(play, &play->colChkCtx, &this->collider.base);
|
||||
CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider.base);
|
||||
}
|
||||
|
||||
if (this->work[INVINC_TIMER] == 0) {
|
||||
if (this->collider.base.acFlags & AC_HIT) {
|
||||
this->collider.base.acFlags &= ~AC_HIT;
|
||||
}
|
||||
if (this->actor.params == TW_KOTAKE) {
|
||||
this->workf[OUTR_CRWN_TX_X2] += 1.0f;
|
||||
this->workf[OUTR_CRWN_TX_Y2] -= 7.0f;
|
||||
this->workf[INNR_CRWN_TX_Y1] += 1.0f;
|
||||
} else {
|
||||
this->workf[OUTR_CRWN_TX_X2] += 0.0f;
|
||||
this->workf[INNR_CRWN_TX_X2] += 0.0f;
|
||||
this->workf[OUTR_CRWN_TX_Y2] += -15.0f;
|
||||
this->workf[INNR_CRWN_TX_Y2] += -10.0f;
|
||||
}
|
||||
|
||||
Collider_UpdateCylinder(&this->actor, &this->collider);
|
||||
CollisionCheck_SetAC(play, &play->colChkCtx, &this->collider.base);
|
||||
CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider.base);
|
||||
}
|
||||
if (((this->work[CS_TIMER_2] % 32) == 0) && (Rand_ZeroOne() < 0.3f)) {
|
||||
this->work[BLINK_IDX] = 4;
|
||||
}
|
||||
|
||||
if (this->actor.params == TW_KOTAKE) {
|
||||
this->workf[OUTR_CRWN_TX_X2] += 1.0f;
|
||||
this->workf[OUTR_CRWN_TX_Y2] -= 7.0f;
|
||||
this->workf[INNR_CRWN_TX_Y1] += 1.0f;
|
||||
} else {
|
||||
this->workf[OUTR_CRWN_TX_X2] += 0.0f;
|
||||
this->workf[INNR_CRWN_TX_X2] += 0.0f;
|
||||
this->workf[OUTR_CRWN_TX_Y2] += -15.0f;
|
||||
this->workf[INNR_CRWN_TX_Y2] += -10.0f;
|
||||
}
|
||||
this->eyeTexIdx = D_8094A900[this->work[BLINK_IDX]];
|
||||
|
||||
if (((this->work[CS_TIMER_2] % 32) == 0) && (Rand_ZeroOne() < 0.3f)) {
|
||||
this->work[BLINK_IDX] = 4;
|
||||
}
|
||||
if (this->work[BLINK_IDX] != 0) {
|
||||
this->work[BLINK_IDX]--;
|
||||
}
|
||||
|
||||
this->eyeTexIdx = D_8094A900[this->work[BLINK_IDX]];
|
||||
if ((this->actionFunc == BossTw_MergeCS) || (this->unk_5F8 == 0)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this->work[BLINK_IDX] != 0) {
|
||||
this->work[BLINK_IDX]--;
|
||||
}
|
||||
|
||||
if (this->actionFunc != BossTw_MergeCS && this->unk_5F8 != 0) {
|
||||
Vec3f pos;
|
||||
Vec3f velocity = { 0.0f, 0.0f, 0.0f };
|
||||
Vec3f accel = { 0.0f, 0.0f, 0.0f };
|
||||
|
||||
if (this->scepterAlpha > 0.0f) {
|
||||
for (i = 0; i <= 0; i++) {
|
||||
pos = this->scepterFlamePos[0];
|
||||
pos.x += Rand_CenteredFloat(70.0f);
|
||||
pos.y += Rand_CenteredFloat(70.0f);
|
||||
pos.z += Rand_CenteredFloat(70.0f);
|
||||
accel.y = 0.4f;
|
||||
accel.x = Rand_CenteredFloat(0.5f);
|
||||
accel.z = Rand_CenteredFloat(0.5f);
|
||||
BossTw_AddDotEffect(play, &pos, &velocity, &accel, (s16)Rand_ZeroFloat(2.0f) + 8,
|
||||
this->actor.params, 37);
|
||||
}
|
||||
}
|
||||
{
|
||||
Vec3f pos;
|
||||
Vec3f velocity = { 0.0f, 0.0f, 0.0f };
|
||||
Vec3f accel = { 0.0f, 0.0f, 0.0f };
|
||||
|
||||
if (this->scepterAlpha > 0.0f) {
|
||||
for (i = 0; i <= 0; i++) {
|
||||
pos = this->crownPos;
|
||||
pos = this->scepterFlamePos[0];
|
||||
pos.x += Rand_CenteredFloat(70.0f);
|
||||
pos.y += Rand_CenteredFloat(70.0f);
|
||||
pos.z += Rand_CenteredFloat(70.0f);
|
||||
|
@ -2962,6 +2953,17 @@ void BossTw_Update(Actor* thisx, PlayState* play) {
|
|||
37);
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i <= 0; i++) {
|
||||
pos = this->crownPos;
|
||||
pos.x += Rand_CenteredFloat(70.0f);
|
||||
pos.y += Rand_CenteredFloat(70.0f);
|
||||
pos.z += Rand_CenteredFloat(70.0f);
|
||||
accel.y = 0.4f;
|
||||
accel.x = Rand_CenteredFloat(0.5f);
|
||||
accel.z = Rand_CenteredFloat(0.5f);
|
||||
BossTw_AddDotEffect(play, &pos, &velocity, &accel, (s16)Rand_ZeroFloat(2.0f) + 8, this->actor.params, 37);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -3285,201 +3285,202 @@ void BossVa_UpdateEffects(PlayState* play) {
|
|||
BossVa* refActor;
|
||||
|
||||
for (i = 0; i < BOSS_VA_EFFECT_COUNT; i++, effect++) {
|
||||
if (effect->type != VA_NONE) {
|
||||
effect->timer--;
|
||||
if (effect->type == VA_NONE) {
|
||||
continue;
|
||||
}
|
||||
|
||||
effect->pos.x += effect->velocity.x;
|
||||
effect->pos.y += effect->velocity.y;
|
||||
effect->pos.z += effect->velocity.z;
|
||||
effect->timer--;
|
||||
|
||||
effect->velocity.x += effect->accel.x;
|
||||
effect->velocity.y += effect->accel.y;
|
||||
effect->velocity.z += effect->accel.z;
|
||||
effect->pos.x += effect->velocity.x;
|
||||
effect->pos.y += effect->velocity.y;
|
||||
effect->pos.z += effect->velocity.z;
|
||||
|
||||
if ((effect->type == VA_LARGE_SPARK) || (effect->type == VA_SMALL_SPARK)) {
|
||||
refActor = effect->parent;
|
||||
effect->velocity.x += effect->accel.x;
|
||||
effect->velocity.y += effect->accel.y;
|
||||
effect->velocity.z += effect->accel.z;
|
||||
|
||||
effect->rot.z += (s16)(Rand_ZeroOne() * 0x4E20) + 0x2000;
|
||||
effect->rot.y += (s16)(Rand_ZeroOne() * 0x2710) + 0x2000;
|
||||
if ((effect->type == VA_LARGE_SPARK) || (effect->type == VA_SMALL_SPARK)) {
|
||||
refActor = effect->parent;
|
||||
|
||||
if ((effect->mode == SPARK_TETHER) || (effect->mode == SPARK_UNUSED)) {
|
||||
pitch = effect->rot.x - Math_Vec3f_Pitch(&refActor->actor.world.pos, &GET_BODY(refActor)->unk_1D8);
|
||||
spAC = Math_SinS(refActor->actor.world.rot.y);
|
||||
effect->pos.x = refActor->actor.world.pos.x - (effect->offset.x * spAC);
|
||||
spB0 = Math_CosS(refActor->actor.world.rot.y);
|
||||
effect->pos.z = refActor->actor.world.pos.z - (effect->offset.x * spB0);
|
||||
spB0 = Math_CosS(-pitch);
|
||||
effect->pos.y = (effect->offset.y * spB0) + refActor->actor.world.pos.y;
|
||||
} else if ((effect->mode == SPARK_BARI) || (effect->mode == SPARK_BODY)) {
|
||||
effect->pos.x = effect->offset.x + refActor->actor.world.pos.x;
|
||||
effect->pos.y = effect->offset.y + refActor->actor.world.pos.y;
|
||||
effect->pos.z = effect->offset.z + refActor->actor.world.pos.z;
|
||||
} else {
|
||||
spB6 = Rand_ZeroFloat(PLAYER_BODYPART_MAX - 0.1f);
|
||||
effect->pos.x = player->bodyPartsPos[spB6].x + Rand_CenteredFloat(10.0f);
|
||||
effect->pos.y = player->bodyPartsPos[spB6].y + Rand_CenteredFloat(15.0f);
|
||||
effect->pos.z = player->bodyPartsPos[spB6].z + Rand_CenteredFloat(10.0f);
|
||||
}
|
||||
effect->rot.z += (s16)(Rand_ZeroOne() * 0x4E20) + 0x2000;
|
||||
effect->rot.y += (s16)(Rand_ZeroOne() * 0x2710) + 0x2000;
|
||||
|
||||
if (effect->timer < 100) {
|
||||
effect->primColor[3] -= 50;
|
||||
if (effect->primColor[3] < 0) {
|
||||
effect->primColor[3] = 0;
|
||||
effect->timer = 0;
|
||||
effect->type = VA_NONE;
|
||||
}
|
||||
}
|
||||
if ((effect->mode == SPARK_TETHER) || (effect->mode == SPARK_UNUSED)) {
|
||||
pitch = effect->rot.x - Math_Vec3f_Pitch(&refActor->actor.world.pos, &GET_BODY(refActor)->unk_1D8);
|
||||
spAC = Math_SinS(refActor->actor.world.rot.y);
|
||||
effect->pos.x = refActor->actor.world.pos.x - (effect->offset.x * spAC);
|
||||
spB0 = Math_CosS(refActor->actor.world.rot.y);
|
||||
effect->pos.z = refActor->actor.world.pos.z - (effect->offset.x * spB0);
|
||||
spB0 = Math_CosS(-pitch);
|
||||
effect->pos.y = (effect->offset.y * spB0) + refActor->actor.world.pos.y;
|
||||
} else if ((effect->mode == SPARK_BARI) || (effect->mode == SPARK_BODY)) {
|
||||
effect->pos.x = effect->offset.x + refActor->actor.world.pos.x;
|
||||
effect->pos.y = effect->offset.y + refActor->actor.world.pos.y;
|
||||
effect->pos.z = effect->offset.z + refActor->actor.world.pos.z;
|
||||
} else {
|
||||
spB6 = Rand_ZeroFloat(PLAYER_BODYPART_MAX - 0.1f);
|
||||
effect->pos.x = player->bodyPartsPos[spB6].x + Rand_CenteredFloat(10.0f);
|
||||
effect->pos.y = player->bodyPartsPos[spB6].y + Rand_CenteredFloat(15.0f);
|
||||
effect->pos.z = player->bodyPartsPos[spB6].z + Rand_CenteredFloat(10.0f);
|
||||
}
|
||||
|
||||
if (effect->type == VA_BLAST_SPARK) {
|
||||
effect->rot.z += (s16)(Rand_ZeroOne() * 0x4E20) + 0x4000;
|
||||
if (effect->timer < 100) {
|
||||
effect->primColor[3] -= 50;
|
||||
if (effect->primColor[3] < 0) {
|
||||
effect->primColor[3] = 0;
|
||||
effect->timer = 0;
|
||||
effect->type = VA_NONE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (effect->type == VA_SPARK_BALL) {
|
||||
refActor2 = effect->parent;
|
||||
|
||||
effect->rot.z += (s16)(Rand_ZeroOne() * 0x2710) + 0x24A8;
|
||||
effect->pos.x = effect->offset.x + refActor2->actor.world.pos.x;
|
||||
effect->pos.y =
|
||||
refActor2->actor.world.pos.y + 310.0f + (refActor2->actor.shape.yOffset * refActor2->actor.scale.y);
|
||||
effect->pos.z = effect->offset.z + refActor2->actor.world.pos.z;
|
||||
effect->mode = (effect->mode + 1) & 7;
|
||||
|
||||
if (effect->timer < 100) {
|
||||
effect->primColor[3] -= 50;
|
||||
if (effect->primColor[3] < 0) {
|
||||
effect->primColor[3] = 0;
|
||||
effect->timer = 0;
|
||||
effect->type = VA_NONE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (effect->type == VA_ZAP_CHARGE) {
|
||||
effect->mode = (effect->mode + 1) & 7;
|
||||
effect->primColor[3] -= 20;
|
||||
if (effect->primColor[3] <= 0) {
|
||||
if (effect->timer < 100) {
|
||||
effect->primColor[3] -= 50;
|
||||
if (effect->primColor[3] < 0) {
|
||||
effect->primColor[3] = 0;
|
||||
effect->timer = 0;
|
||||
effect->type = VA_NONE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (effect->type == VA_BLOOD) {
|
||||
if (effect->mode < BLOOD_SPOT) {
|
||||
Vec3f checkPos;
|
||||
CollisionPoly* groundPoly;
|
||||
f32 floorY;
|
||||
if (effect->type == VA_BLAST_SPARK) {
|
||||
effect->rot.z += (s16)(Rand_ZeroOne() * 0x4E20) + 0x4000;
|
||||
if (effect->timer < 100) {
|
||||
effect->primColor[3] -= 50;
|
||||
if (effect->primColor[3] < 0) {
|
||||
effect->primColor[3] = 0;
|
||||
effect->timer = 0;
|
||||
effect->type = VA_NONE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
checkPos = effect->pos;
|
||||
checkPos.y -= effect->velocity.y + 4.0f;
|
||||
floorY = BgCheck_EntityRaycastDown1(&play->colCtx, &groundPoly, &checkPos);
|
||||
if ((groundPoly != NULL) && (effect->pos.y <= floorY)) {
|
||||
effect->mode = BLOOD_SPOT;
|
||||
effect->pos.y = floorY + 1.0f;
|
||||
if (sCsState <= DEATH_SHELL_BURST) {
|
||||
effect->timer = 80;
|
||||
} else {
|
||||
effect->timer = 60000;
|
||||
}
|
||||
if (effect->type == VA_SPARK_BALL) {
|
||||
refActor2 = effect->parent;
|
||||
|
||||
effect->accel = effect->velocity = sZeroVec;
|
||||
}
|
||||
if (!effect->timer) {
|
||||
effect->type = VA_NONE;
|
||||
}
|
||||
} else {
|
||||
if (effect->timer < 20) {
|
||||
effect->envColor[3] = effect->timer * 5;
|
||||
effect->primColor[3] = effect->timer * 10;
|
||||
} else if (effect->timer > 50000) {
|
||||
effect->timer++;
|
||||
effect->rot.z += (s16)(Rand_ZeroOne() * 0x2710) + 0x24A8;
|
||||
effect->pos.x = effect->offset.x + refActor2->actor.world.pos.x;
|
||||
effect->pos.y =
|
||||
refActor2->actor.world.pos.y + 310.0f + (refActor2->actor.shape.yOffset * refActor2->actor.scale.y);
|
||||
effect->pos.z = effect->offset.z + refActor2->actor.world.pos.z;
|
||||
effect->mode = (effect->mode + 1) & 7;
|
||||
|
||||
if (effect->timer < 100) {
|
||||
effect->primColor[3] -= 50;
|
||||
if (effect->primColor[3] < 0) {
|
||||
effect->primColor[3] = 0;
|
||||
effect->timer = 0;
|
||||
effect->type = VA_NONE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (effect->type == VA_ZAP_CHARGE) {
|
||||
effect->mode = (effect->mode + 1) & 7;
|
||||
effect->primColor[3] -= 20;
|
||||
if (effect->primColor[3] <= 0) {
|
||||
effect->primColor[3] = 0;
|
||||
effect->timer = 0;
|
||||
effect->type = VA_NONE;
|
||||
}
|
||||
}
|
||||
|
||||
if (effect->type == VA_BLOOD) {
|
||||
if (effect->mode < BLOOD_SPOT) {
|
||||
Vec3f checkPos;
|
||||
CollisionPoly* groundPoly;
|
||||
f32 floorY;
|
||||
|
||||
checkPos = effect->pos;
|
||||
checkPos.y -= effect->velocity.y + 4.0f;
|
||||
floorY = BgCheck_EntityRaycastDown1(&play->colCtx, &groundPoly, &checkPos);
|
||||
if ((groundPoly != NULL) && (effect->pos.y <= floorY)) {
|
||||
effect->mode = BLOOD_SPOT;
|
||||
effect->pos.y = floorY + 1.0f;
|
||||
if (sCsState <= DEATH_SHELL_BURST) {
|
||||
effect->timer = 80;
|
||||
} else {
|
||||
effect->timer = 60000;
|
||||
}
|
||||
|
||||
effect->accel = effect->velocity = sZeroVec;
|
||||
}
|
||||
if (!effect->timer) {
|
||||
effect->type = VA_NONE;
|
||||
}
|
||||
} else {
|
||||
if (effect->timer < 20) {
|
||||
effect->envColor[3] = effect->timer * 5;
|
||||
effect->primColor[3] = effect->timer * 10;
|
||||
} else if (effect->timer > 50000) {
|
||||
effect->timer++;
|
||||
}
|
||||
}
|
||||
|
||||
if (!effect->timer) {
|
||||
effect->type = VA_NONE;
|
||||
}
|
||||
}
|
||||
|
||||
if (effect->type == VA_GORE) {
|
||||
if (effect->mode == GORE_PERMANENT) {
|
||||
Vec3f checkPos;
|
||||
CollisionPoly* groundPoly;
|
||||
f32 floorY;
|
||||
|
||||
checkPos = effect->pos;
|
||||
checkPos.y -= effect->velocity.y + 4.0f;
|
||||
effect->rot.x += 0x1770;
|
||||
floorY = BgCheck_EntityRaycastDown1(&play->colCtx, &groundPoly, &checkPos);
|
||||
if ((groundPoly != NULL) && (effect->pos.y <= floorY)) {
|
||||
effect->mode = GORE_FLOOR;
|
||||
effect->timer = 30;
|
||||
effect->pos.y = floorY + 1.0f;
|
||||
effect->accel = effect->velocity = sZeroVec;
|
||||
effect->rot.x = -0x4000;
|
||||
}
|
||||
|
||||
if (!effect->timer) {
|
||||
effect->type = VA_NONE;
|
||||
}
|
||||
|
||||
} else if (effect->mode == GORE_FADING) {
|
||||
if (effect->timer == 0) {
|
||||
effect->type = VA_NONE;
|
||||
if (1) {}
|
||||
}
|
||||
|
||||
} else {
|
||||
Math_SmoothStepToF(&effect->scaleMod, 0.075f, 1.0f, 0.005f, 0.0f);
|
||||
Math_SmoothStepToF(&effect->vaGorePulseRate, 0.0f, 0.6f, 0.005f, 0.0013f);
|
||||
if ((play->gameplayFrames % 4) == 0) {
|
||||
Math_SmoothStepToS(&effect->primColor[0], 95, 1, 1, 0);
|
||||
}
|
||||
}
|
||||
effect->vaGorePulse += effect->vaGorePulseRate;
|
||||
}
|
||||
|
||||
if (effect->type == VA_GORE) {
|
||||
if (effect->mode == GORE_PERMANENT) {
|
||||
Vec3f checkPos;
|
||||
CollisionPoly* groundPoly;
|
||||
f32 floorY;
|
||||
if (effect->type == VA_TUMOR) {
|
||||
s16 yaw;
|
||||
|
||||
checkPos = effect->pos;
|
||||
checkPos.y -= effect->velocity.y + 4.0f;
|
||||
effect->rot.x += 0x1770;
|
||||
floorY = BgCheck_EntityRaycastDown1(&play->colCtx, &groundPoly, &checkPos);
|
||||
if ((groundPoly != NULL) && (effect->pos.y <= floorY)) {
|
||||
effect->mode = GORE_FLOOR;
|
||||
effect->timer = 30;
|
||||
effect->pos.y = floorY + 1.0f;
|
||||
effect->accel = effect->velocity = sZeroVec;
|
||||
effect->rot.x = -0x4000;
|
||||
}
|
||||
refActor = effect->parent;
|
||||
|
||||
if (!effect->timer) {
|
||||
effect->type = VA_NONE;
|
||||
}
|
||||
effect->rot.z += 0x157C;
|
||||
effect->envColor[3] = (s16)(Math_SinS(effect->rot.z) * 50.0f) + 80;
|
||||
Math_SmoothStepToF(&effect->scale, effect->scaleMod, 1.0f, 0.01f, 0.005f);
|
||||
effect->pos.x = effect->offset.x + refActor->actor.world.pos.x;
|
||||
effect->pos.y = effect->offset.y + refActor->actor.world.pos.y;
|
||||
effect->pos.z = effect->offset.z + refActor->actor.world.pos.z;
|
||||
|
||||
} else if (effect->mode == GORE_FADING) {
|
||||
switch (effect->mode) {
|
||||
case TUMOR_UNUSED:
|
||||
if (effect->timer == 0) {
|
||||
yaw = Math_Vec3f_Yaw(&refActor->actor.world.pos, &effect->pos);
|
||||
effect->type = VA_NONE;
|
||||
if (1) {}
|
||||
BossVa_BloodSplatter(play, effect, yaw, effect->scale * 4500.0f, 1);
|
||||
BossVa_Gore(play, effect, yaw, effect->scale * 1.2f);
|
||||
}
|
||||
|
||||
} else {
|
||||
Math_SmoothStepToF(&effect->scaleMod, 0.075f, 1.0f, 0.005f, 0.0f);
|
||||
Math_SmoothStepToF(&effect->vaGorePulseRate, 0.0f, 0.6f, 0.005f, 0.0013f);
|
||||
if ((play->gameplayFrames % 4) == 0) {
|
||||
Math_SmoothStepToS(&effect->primColor[0], 95, 1, 1, 0);
|
||||
break;
|
||||
case TUMOR_BODY:
|
||||
case TUMOR_ARM:
|
||||
if (refActor->burst) {
|
||||
effect->type = VA_NONE;
|
||||
yaw = Math_Vec3f_Yaw(&refActor->actor.world.pos, &effect->pos);
|
||||
BossVa_BloodSplatter(play, effect, yaw, effect->scale * 4500.0f, 1);
|
||||
BossVa_Gore(play, effect, yaw, effect->scale * 1.2f);
|
||||
}
|
||||
}
|
||||
effect->vaGorePulse += effect->vaGorePulseRate;
|
||||
}
|
||||
|
||||
if (effect->type == VA_TUMOR) {
|
||||
s16 yaw;
|
||||
|
||||
refActor = effect->parent;
|
||||
|
||||
effect->rot.z += 0x157C;
|
||||
effect->envColor[3] = (s16)(Math_SinS(effect->rot.z) * 50.0f) + 80;
|
||||
Math_SmoothStepToF(&effect->scale, effect->scaleMod, 1.0f, 0.01f, 0.005f);
|
||||
effect->pos.x = effect->offset.x + refActor->actor.world.pos.x;
|
||||
effect->pos.y = effect->offset.y + refActor->actor.world.pos.y;
|
||||
effect->pos.z = effect->offset.z + refActor->actor.world.pos.z;
|
||||
|
||||
switch (effect->mode) {
|
||||
case TUMOR_UNUSED:
|
||||
if (effect->timer == 0) {
|
||||
yaw = Math_Vec3f_Yaw(&refActor->actor.world.pos, &effect->pos);
|
||||
effect->type = VA_NONE;
|
||||
BossVa_BloodSplatter(play, effect, yaw, effect->scale * 4500.0f, 1);
|
||||
BossVa_Gore(play, effect, yaw, effect->scale * 1.2f);
|
||||
}
|
||||
break;
|
||||
case TUMOR_BODY:
|
||||
case TUMOR_ARM:
|
||||
if (refActor->burst) {
|
||||
effect->type = VA_NONE;
|
||||
yaw = Math_Vec3f_Yaw(&refActor->actor.world.pos, &effect->pos);
|
||||
BossVa_BloodSplatter(play, effect, yaw, effect->scale * 4500.0f, 1);
|
||||
BossVa_Gore(play, effect, yaw, effect->scale * 1.2f);
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (1) {}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue