DCDecomp
A decompilation of Dark Cloud for the PlayStation 2
Loading...
Searching...
No Matches
CWeaponElement Class Reference

#include <weaponelement.hpp>

Public Member Functions

void Initialize ()
 
void Set (sceVu0FVECTOR *origin, float *position, float power, int kind, float spread)
 
void Step ()
 
void Draw ()
 
void Init_Holy (float *position)
 
void Step_Holy ()
 
void Draw_Holy ()
 
void Init_Cold (float *position)
 
void Step_Cold ()
 
void Draw_Cold ()
 
void Init_Wind (float *position)
 
void Step_Wind ()
 
void Draw_Wind ()
 
void Init_Fire (float *position)
 
void Step_Fire ()
 
void Draw_Fire ()
 
void Init_Thunder (float *position)
 
void Step_Thunder ()
 
void Draw_Thunder ()
 

Public Attributes

sceVu0FVECTOR * origin
 
u8 unk_04 [0xC]
 
sceVu0FVECTOR fire_pos
 
sceVu0FVECTOR offset [WEAPON_ELEMENT_SPARK_MAX]
 
sceVu0FVECTOR velocity [WEAPON_ELEMENT_SPARK_MAX]
 
float size [WEAPON_ELEMENT_SPARK_MAX]
 
float shrink [WEAPON_ELEMENT_SPARK_MAX]
 
float alpha [WEAPON_ELEMENT_SPARK_MAX]
 
float spread
 
s16 kind
 
float power
 
s16 on
 
s16 count
 
float scale
 
float spin [WEAPON_ELEMENT_SPARK_MAX]
 
float spin_speed [WEAPON_ELEMENT_SPARK_MAX]
 
s16 spawn_delay_max
 
s16 spawn_delay
 
s16 spawn_budget
 
s16 fading [WEAPON_ELEMENT_SPARK_MAX]
 
s16 frame [WEAPON_ELEMENT_SPARK_MAX]
 
s16 frame_timer
 
s16 bolt_head [WEAPON_ELEMENT_BOLT_MAX]
 
s16 bolt_tail [WEAPON_ELEMENT_BOLT_MAX]
 
s16 bolt_timer [WEAPON_ELEMENT_BOLT_MAX]
 
s16 bolt_frame [WEAPON_ELEMENT_BOLT_MAX]
 
s16 bolt_count
 

Detailed Description

Throws a cloud of sparks off a weapon for as long as its element is charged, giving each spark the motion its element calls for and drawing them all from the one "element" texture.

Definition at line 36 of file weaponelement.hpp.

Member Function Documentation

◆ Initialize()

void CWeaponElement::Initialize ( )

Frees every spark slot, so that the cloud throws nothing.

Mangled name:
Initialize__14CWeaponElementFv
Address:
0x1B7800
Size:
0x3C

Definition at line 16 of file weaponelement.cpp.

◆ Set()

void CWeaponElement::Set ( sceVu0FVECTOR *  origin,
float *  position,
float  power,
int  kind,
float  spread 
)

Charges the cloud with one element and starts its first sparks.

Mangled name:
Set__14CWeaponElementFPA4_fPffif
Address:
0x1B7840
Size:
0xF4

Definition at line 27 of file weaponelement.cpp.

◆ Step()

void CWeaponElement::Step ( )

Moves the cloud one step, by the way the charged element calls for.

Mangled name:
Step__14CWeaponElementFv
Address:
0x1B7940
Size:
0xB0

Definition at line 55 of file weaponelement.cpp.

◆ Draw()

void CWeaponElement::Draw ( )

Draws the cloud, by the way the charged element calls for.

Mangled name:
Draw__14CWeaponElementFv
Address:
0x1B79F0
Size:
0xB0

Definition at line 78 of file weaponelement.cpp.

◆ Init_Holy()

void CWeaponElement::Init_Holy ( float *  position)

Starts a cloud of sparks that rise slowly away from the blade.

Mangled name:
Init_Holy__14CWeaponElementFPf
Address:
0x1B7AA0
Size:
0x340

Definition at line 101 of file weaponelement.cpp.

◆ Step_Holy()

void CWeaponElement::Step_Holy ( )

Raises every holy spark, and starts free slots again while the budget lasts.

Mangled name:
Step_Holy__14CWeaponElementFv
Address:
0x1B7DE0
Size:
0x4AC

Definition at line 128 of file weaponelement.cpp.

◆ Draw_Holy()

void CWeaponElement::Draw_Holy ( )

Draws every holy spark that still carries a blend.

Mangled name:
Draw_Holy__14CWeaponElementFv
Address:
0x1B8290
Size:
0x1EC

Definition at line 201 of file weaponelement.cpp.

◆ Init_Cold()

void CWeaponElement::Init_Cold ( float *  position)

Starts a cloud of sparks that fall away from the blade.

Mangled name:
Init_Cold__14CWeaponElementFPf
Address:
0x1B8480
Size:
0x340

Definition at line 250 of file weaponelement.cpp.

◆ Step_Cold()

void CWeaponElement::Step_Cold ( )

Drops every cold spark, and starts free slots again while the budget lasts.

Mangled name:
Step_Cold__14CWeaponElementFv
Address:
0x1B87C0
Size:
0x4E0

Definition at line 277 of file weaponelement.cpp.

◆ Draw_Cold()

void CWeaponElement::Draw_Cold ( )

Draws every cold spark that still carries a blend.

Mangled name:
Draw_Cold__14CWeaponElementFv
Address:
0x1B8CA0
Size:
0x1EC

Definition at line 349 of file weaponelement.cpp.

◆ Init_Wind()

void CWeaponElement::Init_Wind ( float *  position)

Starts a cloud of sparks that blow away on a rising wind, each spinning.

Mangled name:
Init_Wind__14CWeaponElementFPf
Address:
0x1B8E90
Size:
0x434

Definition at line 398 of file weaponelement.cpp.

◆ Step_Wind()

void CWeaponElement::Step_Wind ( )

Blows every wind spark along, turning it, and starts free slots again.

Mangled name:
Step_Wind__14CWeaponElementFv
Address:
0x1B92D0
Size:
0x5AC

Definition at line 432 of file weaponelement.cpp.

◆ Draw_Wind()

void CWeaponElement::Draw_Wind ( )

Draws every wind spark, turned about the vertical by the spin it carries.

Mangled name:
Draw_Wind__14CWeaponElementFv
Address:
0x1B9880
Size:
0x234

Definition at line 511 of file weaponelement.cpp.

◆ Init_Fire()

void CWeaponElement::Init_Fire ( float *  position)

Starts a cloud of sparks that drift upward off the blade.

Mangled name:
Init_Fire__14CWeaponElementFPf
Address:
0x1B9AC0
Size:
0x354

Definition at line 567 of file weaponelement.cpp.

◆ Step_Fire()

void CWeaponElement::Step_Fire ( )

Raises every fire spark, and starts free slots again while the budget lasts.

Mangled name:
Step_Fire__14CWeaponElementFv
Address:
0x1B9E20
Size:
0x4E0

Definition at line 597 of file weaponelement.cpp.

◆ Draw_Fire()

void CWeaponElement::Draw_Fire ( )

Draws every fire spark that still carries a blend.

Mangled name:
Draw_Fire__14CWeaponElementFv
Address:
0x1BA300
Size:
0x1E8

Definition at line 669 of file weaponelement.cpp.

◆ Init_Thunder()

void CWeaponElement::Init_Thunder ( float *  position)

Starts a cloud of sparks that fly apart, and the bolts that arc between them.

Mangled name:
Init_Thunder__14CWeaponElementFPf
Address:
0x1BA4F0
Size:
0x528

Definition at line 718 of file weaponelement.cpp.

◆ Step_Thunder()

void CWeaponElement::Step_Thunder ( )

Carries every thunder spark along its own line, and gives the bolts new ends.

Mangled name:
Step_Thunder__14CWeaponElementFv
Address:
0x1BAA20
Size:
0x2D8

Definition at line 752 of file weaponelement.cpp.

◆ Draw_Thunder()

void CWeaponElement::Draw_Thunder ( )

Draws every thunder spark, then a bolt across each pair the charge picked.

Mangled name:
Draw_Thunder__14CWeaponElementFv
Address:
0x1BAD00
Size:
0x35C

Definition at line 796 of file weaponelement.cpp.

Member Data Documentation

◆ origin

sceVu0FVECTOR* CWeaponElement::origin

Point the cloud is drawn around, held by the weapon.

Definition at line 38 of file weaponelement.hpp.

◆ unk_04

u8 CWeaponElement::unk_04[0xC]

Definition at line 39 of file weaponelement.hpp.

◆ fire_pos

sceVu0FVECTOR CWeaponElement::fire_pos

Point the fire element was started at, which its sparks stay around.

Definition at line 40 of file weaponelement.hpp.

◆ offset

sceVu0FVECTOR CWeaponElement::offset[WEAPON_ELEMENT_SPARK_MAX]

Distance of each spark from the origin.

Definition at line 41 of file weaponelement.hpp.

◆ velocity

sceVu0FVECTOR CWeaponElement::velocity[WEAPON_ELEMENT_SPARK_MAX]

Distance each spark moves per step.

Definition at line 42 of file weaponelement.hpp.

◆ size

float CWeaponElement::size[WEAPON_ELEMENT_SPARK_MAX]

Width each spark draws at before it shrinks.

Definition at line 43 of file weaponelement.hpp.

◆ shrink

float CWeaponElement::shrink[WEAPON_ELEMENT_SPARK_MAX]

Share of the width left, from one down to nothing.

Definition at line 44 of file weaponelement.hpp.

◆ alpha

float CWeaponElement::alpha[WEAPON_ELEMENT_SPARK_MAX]

Blend each spark draws at; nothing means the slot is free.

Definition at line 45 of file weaponelement.hpp.

◆ spread

float CWeaponElement::spread

Distance from the origin that a new spark can start.

Definition at line 46 of file weaponelement.hpp.

◆ kind

s16 CWeaponElement::kind

Element the weapon is charged with.

Definition at line 47 of file weaponelement.hpp.

◆ power

float CWeaponElement::power

Strength of the charge, which sets the count and the size.

Definition at line 48 of file weaponelement.hpp.

◆ on

s16 CWeaponElement::on

1 while any spark still draws.

Definition at line 49 of file weaponelement.hpp.

◆ count

s16 CWeaponElement::count

Number of sparks the charge starts with.

Definition at line 50 of file weaponelement.hpp.

◆ scale

float CWeaponElement::scale

Width every spark is drawn at, over the size it carries.

Definition at line 51 of file weaponelement.hpp.

◆ spin

float CWeaponElement::spin[WEAPON_ELEMENT_SPARK_MAX]

Angle each spark is turned about the vertical.

Definition at line 52 of file weaponelement.hpp.

◆ spin_speed

float CWeaponElement::spin_speed[WEAPON_ELEMENT_SPARK_MAX]

Angle the spin turns each step.

Definition at line 53 of file weaponelement.hpp.

◆ spawn_delay_max

s16 CWeaponElement::spawn_delay_max

Longest wait between two sparks being started again.

Definition at line 54 of file weaponelement.hpp.

◆ spawn_delay

s16 CWeaponElement::spawn_delay

Steps left before the next spark is started again.

Definition at line 55 of file weaponelement.hpp.

◆ spawn_budget

s16 CWeaponElement::spawn_budget

Number of sparks the charge can still start again.

Definition at line 56 of file weaponelement.hpp.

◆ fading

s16 CWeaponElement::fading[WEAPON_ELEMENT_SPARK_MAX]

0 while a spark brightens, 1 once it is fading out.

Definition at line 57 of file weaponelement.hpp.

◆ frame

s16 CWeaponElement::frame[WEAPON_ELEMENT_SPARK_MAX]

Row of the texture each spark draws.

Definition at line 58 of file weaponelement.hpp.

◆ frame_timer

s16 CWeaponElement::frame_timer

Counts four steps down, and the sparks pick new rows on the fourth.

Definition at line 59 of file weaponelement.hpp.

◆ bolt_head

s16 CWeaponElement::bolt_head[WEAPON_ELEMENT_BOLT_MAX]

Spark each bolt arcs from.

Definition at line 60 of file weaponelement.hpp.

◆ bolt_tail

s16 CWeaponElement::bolt_tail[WEAPON_ELEMENT_BOLT_MAX]

Spark each bolt arcs to.

Definition at line 61 of file weaponelement.hpp.

◆ bolt_timer

s16 CWeaponElement::bolt_timer[WEAPON_ELEMENT_BOLT_MAX]

Steps left before a bolt picks new ends.

Definition at line 62 of file weaponelement.hpp.

◆ bolt_frame

s16 CWeaponElement::bolt_frame[WEAPON_ELEMENT_BOLT_MAX]

Part of the texture each bolt draws.

Definition at line 63 of file weaponelement.hpp.

◆ bolt_count

s16 CWeaponElement::bolt_count

Number of bolts the charge arcs between its sparks.

Definition at line 64 of file weaponelement.hpp.