more misc. cleanup (#2232)

This commit is contained in:
Caroline Madsen
2024-10-31 20:36:11 -04:00
committed by GitHub
parent 30777a85b5
commit 09423b6fa0
121 changed files with 2254 additions and 17343 deletions
+1 -65
View File
@@ -8,75 +8,11 @@
#include "SSystem/SComponent/c_math.h"
#include "c/c_damagereaction.h"
#include "cmath.h"
#include "d/actor/d_a_midna.h"
#include "d/actor/d_a_player.h"
#include "d/d_com_inf_game.h"
#include "d/d_s_play.h"
#include "d/d_camera.h"
// NONMATCHING load order and regalloc
static int setMidnaBindEffect(fopEn_enemy_c* i_enemy, Z2CreatureEnemy* i_sound,
cXyz* i_pos, cXyz* i_scale) {
static GXColor e_prim[2] = {
{0xFF, 0x78, 0x00, 0x00},
{0xFF, 0x64, 0x78, 0x00},
};
static GXColor e_env[2] = {
{0x5A, 0x2D, 0x2D, 0x00},
{0x3C, 0x1E, 0x1E, 0x00},
};
daPy_py_c* player = daPy_getPlayerActorClass();
if (player->getMidnaActor() != NULL && player->checkWolfLock(i_enemy)) {
cXyz local_48;
int world = dKy_darkworld_check() ? 1 : 0;
if (i_enemy->getMidnaBindMode() == 0) {
i_enemy->setMidnaBindMode(1);
csXyz angle;
MTXCopy(daPy_py_c::getMidnaActor()->getMtxHairTop(), mDoMtx_stack_c::get());
cXyz local_54(100.0f, 0.0f, 0.0f);
mDoMtx_stack_c::multVec(&local_54, &local_48);
cXyz local_60 = local_48 - *i_pos;
angle.y = cM_atan2s(local_60.x, local_60.z);
angle.x = -cM_atan2s(local_60.y,
JMAFastSqrt(local_60.x * local_60.x + local_60.z * local_60.z));
angle.z = 0;
JPABaseEmitter* emitter =
dComIfGp_particle_set(0x29B, i_pos, &i_enemy->tevStr, &angle, i_scale,
0xff, NULL, fopAcM_GetRoomNo(i_enemy),
&e_prim[world], &e_env[world], NULL);
if (emitter != NULL) {
emitter->setGlobalParticleHeightScale(0.01f * local_60.abs());
}
dComIfGp_particle_set(0x29C, i_pos, &i_enemy->tevStr, &i_enemy->shape_angle,
i_scale, 0xff, NULL, fopAcM_GetRoomNo(i_enemy),
&e_prim[world], &e_env[world], NULL);
i_sound->startCreatureSound(Z2SE_MIDNA_BIND_LOCK_ON, 0, -1);
}
static u16 eff_id[3] = {0x029D, 0x029E, 0x029F};
for (int i = 0; i < 3; i++) {
u32* bind_id = i_enemy->getMidnaBindID(i);
*bind_id = dComIfGp_particle_set(*bind_id, eff_id[i], i_pos, &i_enemy->tevStr,
&i_enemy->shape_angle, i_scale, 0xff, NULL,
fopAcM_GetRoomNo(i_enemy),
&e_prim[world], &e_env[world], NULL);
}
i_sound->startCreatureSoundLevel(Z2SE_MIDNA_BIND_LOCK_SUS, 0, -1);
return 1;
} else {
i_enemy->setMidnaBindMode(0);
return 0;
}
}
#include "f_op/f_op_actor_enemy.h"
#define WL_CUT_TYPE_SMALL 1
#define WL_CUT_TYPE_JUMP 2