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
11
void
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
27
void
CHIT_MACHINGUN_EFFECT::Draw
() {
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
38
void
CHIT_MACHINGUN_EFFECT::Step
() {
39
for
(s32 i = 0; i < 16; i++) {
40
if
(this->
timer
[i] >= 0) {
41
this->
timer
[i]--;
42
}
43
}
44
}
CHIT_MACHINGUN_EFFECT::timer
s32 timer[16]
Definition
hit_machingun_effect.hpp:11
CHIT_MACHINGUN_EFFECT::Draw
void Draw()
Definition
hit_machingun_effect.cpp:27
CHIT_MACHINGUN_EFFECT::Set
void Set(float *position)
Definition
hit_machingun_effect.cpp:11
CHIT_MACHINGUN_EFFECT::Step
void Step()
Definition
hit_machingun_effect.cpp:38
CHIT_MACHINGUN_EFFECT::position
float position[16][4]
Definition
hit_machingun_effect.hpp:10
ps2
src
hit_machingun_effect.cpp
Generated by
1.9.8