DCDecomp
A decompilation of Dark Cloud for the PlayStation 2
Loading...
Searching...
No Matches
hit_machingun_effect.cpp
1#pragma helper_mask_gpr 0x30
2#pragma helper_mask_fpr 0x1000
3#pragma name_counter 1116
4
5#include "hit_machingun_effect.hpp"
6
7#include <libvu0.h>
8
9#include "shot_utils.hpp"
10
11void CHIT_MACHINGUN_EFFECT::Set(float *position) {
12 s32 free_index = -1;
13
14 for (s32 i = 0; i < 16; i++) {
15 if (this->timer[i] < 0) {
16 free_index = i;
17 break;
18 }
19 }
20
21 if (free_index != -1) {
22 sceVu0CopyVector(this->position[free_index], position);
23 this->timer[free_index] = 17;
24 }
25}
26
28 s32 cell;
29
30 for (s32 i = 0; i < 16; i++) {
31 if (this->timer[i] >= 0) {
32 cell = 2 - this->timer[i] / 6;
33 set3DCellModel(this->position[i], "basefx00", 5.0f, cell << 4, 0x70, 0x10, 0x10, 0x80);
34 }
35 }
36}
37
39 for (s32 i = 0; i < 16; i++) {
40 if (this->timer[i] >= 0) {
41 this->timer[i]--;
42 }
43 }
44}
void Set(float *position)