21 {
26 s32 numParts = 1;
27 f32 temp_f12;
28 f32 sp68;
29 f32 sp6C;
30 f32 sp70;
31 f32 var_f24;
32 f32 var_f20;
33 f32 var_f22;
35
36 if (arg4 == 0.0f && arg5 == 0.0f && arg6 == 0.0f) {
37 return NULL;
38 }
39
40 temp_f12 =
SQ(arg4) +
SQ(arg5) +
SQ(arg6);
41 if (temp_f12 == 0.0f) {
42 return NULL;
43 }
44
45 temp_f12 = 1.0f /
sqrtf(temp_f12);
46 arg4 *= temp_f12;
47 arg5 *= temp_f12;
48 arg6 *= temp_f12;
49
50 if (arg4 != 0.0f) {
51 var_f20 = -arg4;
52 var_f22 = arg6;
53 var_f24 = 0.0f;
54 } else if (arg6 != 0.0f) {
55 var_f20 = -arg4;
56 var_f22 = arg6;
57 var_f24 = 0.0f;
58 } else {
59 var_f20 = 0.0f;
60 var_f22 = 1.0f;
61 var_f24 = 0.0f;
62 }
63
64 temp_f12 =
SQ(var_f22) +
SQ(var_f24) +
SQ(var_f20);
65 if (temp_f12 == 0.0f) {
66 return NULL;
67 }
68
69 temp_f12 = 1.0f /
sqrtf(temp_f12);
70 var_f22 *= temp_f12;
71 var_f24 *= temp_f12;
72 var_f20 *= temp_f12;
73
74 sp68 = var_f24 * arg6 - var_f20 * arg5;
75 sp6C = var_f20 * arg4 - var_f22 * arg6;
76 sp70 = var_f22 * arg5 - var_f24 * arg4;
77
78 temp_f12 =
SQ(sp68) +
SQ(sp6C) +
SQ(sp70);
79 if (temp_f12 == 0.0f) {
80 return NULL;
81 }
82
83 temp_f12 = 1.0f /
sqrtf(temp_f12);
84 sp68 *= temp_f12;
85 sp6C *= temp_f12;
86 sp70 *= temp_f12;
87
93 bpPtr->
effectID = EFFECT_PURPLE_RING;
94
99
113 data->
unk_10 = -arg4 * 4.0f;
114 data->
unk_14 = -arg5 * 4.0f;
115 data->
unk_18 = -arg6 * 4.0f;
116 data->
unk_1C[0][0] = var_f22;
117 data->
unk_1C[0][1] = var_f24;
118 data->
unk_1C[0][2] = var_f20;
120 data->
unk_1C[1][0] = sp68;
121 data->
unk_1C[1][1] = sp6C;
122 data->
unk_1C[1][2] = sp70;
124 data->
unk_1C[2][0] = arg4;
125 data->
unk_1C[2][1] = arg5;
126 data->
unk_1C[2][2] = arg6;
133 data->
unk_1C[3][3] = 1.0f;
134 data->
unk_64 = arg7 * 0.1;
135
136 return effect;
137}
#define general_heap_malloc
#define create_effect_instance
#define ASSERT(condition)
void purple_ring_update(EffectInstance *effect)
void purple_ring_init(EffectInstance *effect)
void purple_ring_render(EffectInstance *effect)
void(* renderUI)(EffectInstance *effectInst)
void(* init)(EffectInstance *effectInst)
void(* update)(EffectInstance *effectInst)
void(* renderWorld)(EffectInstance *effectInst)