16void CHitMark::Set(
float *position,
float *direction,
int kind,
float spread,
float shrink,
float gravity,
float speed,
int count,
float floor_y) {
28 sceVu0Normalize(direction, direction);
29 direction[0] *= this->
speed;
30 direction[1] *= this->
speed;
31 direction[2] *= this->
speed;
33 for (i = 0; i <
count; i++) {
36 this->
offset[i][0] = rand() / 2147483648.0f - 0.5f;
37 this->
offset[i][1] = rand() / 2147483648.0f - 0.5f;
38 this->
offset[i][2] = rand() / 2147483648.0f - 0.5f;
40 this->
velocity[i][0] = direction[0] + this->spread * rand() / 2147483648.0f - this->spread / 2.0f;
41 this->
velocity[i][1] = direction[0] + this->spread * rand() / 2147483648.0f - this->spread / 2.0f;
42 this->
velocity[i][2] = direction[0] + this->spread * rand() / 2147483648.0f - this->spread / 2.0f;
43 this->
size[i] = 0.1f + 1.2f * rand() / 2147483648.0f;
56 sceVu0FVECTOR mark_pos;
60 if (this->
count == 0) {
64 sceVu0CopyVector(base, this->
pos);
65 texture = TexManager.GetTexture(
"basefx00", -1);
67 for (i = 0; i < this->
count; i++) {
68 if (this->
used[i] == 0) {
72 mark_pos[0] = base[0] + this->
offset[i][0];
73 mark_pos[1] = base[1] + this->offset[i][1];
74 mark_pos[2] = base[2] + this->offset[i][2];
77 if (MGRotTransPers3DSprite(top_left, bottom_right, mark_pos, this->
size[i], this->
size[i] / 2.0f, 0) != 1) {
83 top_right[0] = bottom_right[0];
84 top_right[1] = top_left[1];
85 top_right[2] = top_left[2];
86 bottom_left[0] = top_left[0];
87 bottom_left[1] = bottom_right[1];
88 bottom_left[2] = bottom_right[2];
97 set3DSprite(Vif1Packet, texture, rect, top_left, top_right, bottom_left, bottom_right, 0x80);
106 set3DSprite(Vif1Packet, texture, rect, top_left, top_right, bottom_left, bottom_right, 0x80);
115 set3DSprite(Vif1Packet, texture, rect, top_left, top_right, bottom_left, bottom_right, 0x80);
124 set3DSprite(Vif1Packet, texture, rect, top_left, top_right, bottom_left, bottom_right, 0x40);
133 set3DSprite(Vif1Packet, texture, rect, top_left, top_right, bottom_left, bottom_right, 0x80);
199 if (MGRotTransPers3DSprite(top_left, bottom_right, this->
pos, 5.0f, 2.5f, 0) != 1) {
203 if (this->
blink != 1) {
207 top_right[0] = bottom_right[0];
208 top_right[1] = top_left[1];
209 top_right[2] = top_left[2];
210 bottom_left[0] = top_left[0];
211 bottom_left[1] = bottom_right[1];
212 bottom_left[2] = bottom_right[2];
218 set3DSprite(Vif1Packet, TexManager.GetTexture(
"basefx00", -1), rect, top_left, top_right, bottom_left, bottom_right, 0x80);
void Set(float *position, float *direction, int kind, float spread, float shrink, float gravity, float speed, int count, float floor_y)