29void damage_stars_main(s32 type, f32 x, f32 y, f32 z, f32 rotAxisX, f32 rotAxisY, f32 rotAxisZ, s32 number) {
47 norm =
SQ(rotAxisX) +
SQ(rotAxisY) +
SQ(rotAxisZ);
51 norm = -1.0f /
sqrtf(norm);
57 if (rotAxisX != 0.0f) {
59 var_f30 = -rotAxisY / rotAxisX;
61 }
else if (rotAxisY != 0.0f) {
62 sp70 = -rotAxisX / rotAxisY;
68 var_f28 = -rotAxisX / rotAxisZ;
71 norm =
SQ(var_f30) +
SQ(sp70) +
SQ(var_f28);
73 norm = 1.0f /
sqrtf(norm);
91 bpPtr->
effectID = EFFECT_DAMAGE_STARS;
98 for (i = 0; i < number; i++, part++) {
108 guRotateF(mtxRot, (i * 360) / (number - 1), rotAxisX, rotAxisY, rotAxisZ);
109 part->
vel.
x = rotAxisX + mtxRot[0][0] * var_f30 + mtxRot[1][0] * sp70 + mtxRot[2][0] * var_f28;
110 part->
vel.
y = rotAxisY + mtxRot[0][1] * var_f30 + mtxRot[1][1] * sp70 + mtxRot[2][1] * var_f28;
111 part->
vel.
z = rotAxisZ + mtxRot[0][2] * var_f30 + mtxRot[1][2] * sp70 + mtxRot[2][2] * var_f28;
117 (number != 1) ? (i * 100) / (number - 1) - 50 : 0.0f,
118 rotateX, 0.0f, rotateZ);
119 part->
vel.
x = mtxRot[0][0] * rotAxisX + mtxRot[1][0] * rotAxisY + mtxRot[2][0] * rotAxisZ;
120 part->
vel.
y = mtxRot[0][1] * rotAxisX + mtxRot[1][1] * rotAxisY + mtxRot[2][1] * rotAxisZ;
121 part->
vel.
z = mtxRot[0][2] * rotAxisX + mtxRot[1][2] * rotAxisY + mtxRot[2][2] * rotAxisZ;
126 guRotateF(mtxRot, (i * 360.0f) / (number - 1), rotateX, 0.0f, rotateZ);
127 part->
vel.
x = mtxRot[0][0] * rotAxisX + mtxRot[1][0] * rotAxisY + mtxRot[2][0] * rotAxisZ;
128 part->
vel.
y = mtxRot[0][1] * rotAxisX + mtxRot[1][1] * rotAxisY + mtxRot[2][1] * rotAxisZ;
129 part->
vel.
z = mtxRot[0][2] * rotAxisX + mtxRot[1][2] * rotAxisY + mtxRot[2][2] * rotAxisZ;
250 for (i = 0; i < ((
EffectInstance*)effect)->numParts; i++, part++) {
251 s32 rIdx = baseIdx + i * 3;
252 s32 gIdx = baseIdx + 1 + i * 3;
253 s32 bIdx = baseIdx + 2 + i * 3;
258 guMtxCatF(mtxTemp, mtxTransform, mtxTransform);
void damage_stars_main(s32 type, f32 x, f32 y, f32 z, f32 rotAxisX, f32 rotAxisY, f32 rotAxisZ, s32 number)