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

#include <shot_effect.hpp>

Public Member Functions

void Draw ()
 
void Step ()
 
void EndEffect ()
 
void OffEffect (int slot)
 
int Entry (BT_SHOT_EFFECT *description, unsigned int *pack, int tex_block, CDataAlloc2< 1 > *allocator, int slots)
 
int Entry2 (BT_SHOT_EFFECT *description, unsigned int *pack, int tex_block, CDataAlloc2< 1 > *allocator, int slots)
 
int ReEntry (BT_SHOT_EFFECT *description, CDataAlloc2< 1 > *allocator)
 
void SetLoop (int loop)
 
int Set (float *position, float *target, int owner, int sub_id, int source, CFrame *parent, int initial_phase)
 
void SetWait (int wait)
 
void SetNoSound ()
 
void SetRandomRate (float rate)
 
void SetLifeTime (int life_time)
 
void SetEnemyAttr (int attribute)
 
void SetDmg (int damage)
 
void SetAttribute (int attribute)
 
void SetWepStatus (int status)
 
void SetVsMonster (char *effectiveness)
 
void SetUserID2 (int id)
 
void Initialize ()
 

Public Attributes

BT_SHOT_EFFECT * effect_data
 
CCharacter template_chara
 
CCharacter chara [8]
 
sceVu0FVECTOR velocity [8]
 
s16 source_id [8]
 
s32 phase_delay [8]
 
s16 phase [8]
 
s16 active [8]
 
s32 damage [8]
 
s32 weapon_status [8]
 
s16 user_id [8]
 
s16 user_id_2 [8]
 
s32 user_sub_id [8]
 
char * vs_monster [8]
 
s32 loop [8]
 
float random_rate [8]
 
s32 life_time [8]
 
s32 enemy_attribute [8]
 
char no_sound [8]
 
char wait [8]
 
char wait_state [8]
 
s32 status
 
s32 slot_count
 
s32 current_slot
 
s32 texture_block
 
u8 unk_A158 [8]
 

Detailed Description

Manages the eight active projectile-effect slots.

Definition at line 18 of file shot_effect.hpp.

Member Function Documentation

◆ Draw()

void CSHOT_EFFECT::Draw ( )

Draws every active projectile-effect slot.

Mangled name:
Draw__12CSHOT_EFFECTFv
Address:
0x1ABF20
Size:
0x25C

Definition at line 89 of file shot_effect.cpp.

◆ Step()

void CSHOT_EFFECT::Step ( )

Advances every active projectile-effect slot: plays its motions through their phases, moves it, records its hit, and ends it when its last motion finishes.

Mangled name:
Step__12CSHOT_EFFECTFv
Address:
0x1AC180
Size:
0x9B0

Definition at line 126 of file shot_effect.cpp.

◆ EndEffect()

void CSHOT_EFFECT::EndEffect ( )

Moves eligible active projectile effects into their ending phase.

Mangled name:
EndEffect__12CSHOT_EFFECTFv
Address:
0x1ACB30
Size:
0xD4

Definition at line 294 of file shot_effect.cpp.

◆ OffEffect()

void CSHOT_EFFECT::OffEffect ( int  slot)

Disables one projectile-effect slot, or every slot when given -1.

Mangled name:
OffEffect__12CSHOT_EFFECTFi
Address:
0x1ACC10
Size:
0x60

Definition at line 308 of file shot_effect.cpp.

◆ Entry()

int CSHOT_EFFECT::Entry ( BT_SHOT_EFFECT *  description,
unsigned int *  pack,
int  tex_block,
CDataAlloc2< 1 > *  allocator,
int  slots 
)

Loads the effect's model file into the pack, reads its model from it and gives every slot a copy; returns 1, or 0 when a description is already loaded.

Mangled name:
Entry__12CSHOT_EFFECTFP14BT_SHOT_EFFECTPUiiP14CDataAlloc2_1_i
Address:
0x1ACC70
Size:
0x5E4

Definition at line 319 of file shot_effect.cpp.

◆ Entry2()

int CSHOT_EFFECT::Entry2 ( BT_SHOT_EFFECT *  description,
unsigned int *  pack,
int  tex_block,
CDataAlloc2< 1 > *  allocator,
int  slots 
)

Reads the effect's model from a pack that is already loaded and gives every slot a copy; returns 1, or 0 when a description is already loaded.

Mangled name:
Entry2__12CSHOT_EFFECTFP14BT_SHOT_EFFECTPUiiP14CDataAlloc2_1_i
Address:
0x1AD260
Size:
0x5A8

Definition at line 347 of file shot_effect.cpp.

◆ ReEntry()

int CSHOT_EFFECT::ReEntry ( BT_SHOT_EFFECT *  description,
CDataAlloc2< 1 > *  allocator 
)

Gives every slot a fresh copy of the template character and switches to a replacement description; returns 1.

Mangled name:
ReEntry__12CSHOT_EFFECTFP14BT_SHOT_EFFECTP14CDataAlloc2_1_
Address:
0x1AD810
Size:
0x508

Definition at line 371 of file shot_effect.cpp.

◆ SetLoop()

void CSHOT_EFFECT::SetLoop ( int  loop)

Selects whether the current projectile effect loops.

Mangled name:
SetLoop__12CSHOT_EFFECTFi
Address:
0x1ADD20
Size:
0x34

Definition at line 382 of file shot_effect.cpp.

◆ Set()

int CSHOT_EFFECT::Set ( float *  position,
float *  target,
int  owner,
int  sub_id,
int  source,
CFrame *  parent,
int  initial_phase 
)

Starts one shot effect and gives back the slot it went into; with no description loaded or no free slot it returns without a value.

Mangled name:
Set__12CSHOT_EFFECTFPfPfiiiP6CFramei
Address:
0x1ADD60
Size:
0x458

Definition at line 392 of file shot_effect.cpp.

◆ SetWait()

void CSHOT_EFFECT::SetWait ( int  wait)

Delays the current projectile effect and clears its secondary wait state.

Mangled name:
SetWait__12CSHOT_EFFECTFi
Address:
0x1AE1C0
Size:
0x4C

Definition at line 481 of file shot_effect.cpp.

◆ SetNoSound()

void CSHOT_EFFECT::SetNoSound ( )

Suppresses sound for the current projectile effect.

Mangled name:
SetNoSound__12CSHOT_EFFECTFv
Address:
0x1AE210
Size:
0x34

Definition at line 492 of file shot_effect.cpp.

◆ SetRandomRate()

void CSHOT_EFFECT::SetRandomRate ( float  rate)

Sets the randomization rate for the current projectile effect.

Mangled name:
SetRandomRate__12CSHOT_EFFECTFf
Address:
0x1AE250
Size:
0x34

Definition at line 502 of file shot_effect.cpp.

◆ SetLifeTime()

void CSHOT_EFFECT::SetLifeTime ( int  life_time)

Sets the lifetime of the current projectile effect.

Mangled name:
SetLifeTime__12CSHOT_EFFECTFi
Address:
0x1AE290
Size:
0x34

Definition at line 512 of file shot_effect.cpp.

◆ SetEnemyAttr()

void CSHOT_EFFECT::SetEnemyAttr ( int  attribute)

Sets the enemy attribute of the current projectile effect.

Mangled name:
SetEnemyAttr__12CSHOT_EFFECTFi
Address:
0x1AE2D0
Size:
0x34

Definition at line 522 of file shot_effect.cpp.

◆ SetDmg()

void CSHOT_EFFECT::SetDmg ( int  damage)

Sets the damage dealt by the current projectile effect.

Mangled name:
SetDmg__12CSHOT_EFFECTFi
Address:
0x1AE310
Size:
0x34

Definition at line 532 of file shot_effect.cpp.

◆ SetAttribute()

void CSHOT_EFFECT::SetAttribute ( int  attribute)

Sets the source effect's attribute when an effect slot is selected.

Mangled name:
SetAttribute__12CSHOT_EFFECTFi
Address:
0x1AE350
Size:
0x28

Definition at line 542 of file shot_effect.cpp.

◆ SetWepStatus()

void CSHOT_EFFECT::SetWepStatus ( int  status)

Sets the weapon status of the current projectile effect.

Mangled name:
SetWepStatus__12CSHOT_EFFECTFi
Address:
0x1AE380
Size:
0x34

Definition at line 548 of file shot_effect.cpp.

◆ SetVsMonster()

void CSHOT_EFFECT::SetVsMonster ( char *  effectiveness)

Sets the monster-effectiveness table of the current projectile effect.

Mangled name:
SetVsMonster__12CSHOT_EFFECTFPc
Address:
0x1AE3C0
Size:
0x34

Definition at line 558 of file shot_effect.cpp.

◆ SetUserID2()

void CSHOT_EFFECT::SetUserID2 ( int  id)

Sets the secondary user identifier of the current projectile effect.

Mangled name:
SetUserID2__12CSHOT_EFFECTFi
Address:
0x1AE400
Size:
0x34

Definition at line 568 of file shot_effect.cpp.

◆ Initialize()

void CSHOT_EFFECT::Initialize ( )

Clears the loaded effect and resets all projectile-effect slots.

Mangled name:
Initialize__12CSHOT_EFFECTFv
Address:
0x1AE440
Size:
0x80

Definition at line 578 of file shot_effect.cpp.

Member Data Documentation

◆ effect_data

BT_SHOT_EFFECT* CSHOT_EFFECT::effect_data

Description shared by the active effect slots.

Definition at line 20 of file shot_effect.hpp.

◆ template_chara

CCharacter CSHOT_EFFECT::template_chara

Model read from the pack that every slot's character is copied from.

Definition at line 21 of file shot_effect.hpp.

◆ chara

CCharacter CSHOT_EFFECT::chara[8]

Model that each projectile-effect slot draws and animates.

Definition at line 22 of file shot_effect.hpp.

◆ velocity

sceVu0FVECTOR CSHOT_EFFECT::velocity[8]

Movement applied to each projectile-effect slot.

Definition at line 23 of file shot_effect.hpp.

◆ source_id

s16 CSHOT_EFFECT::source_id[8]

Source identifier supplied when each slot starts.

Definition at line 24 of file shot_effect.hpp.

◆ phase_delay

s32 CSHOT_EFFECT::phase_delay[8]

Remaining delay before each slot changes phase.

Definition at line 25 of file shot_effect.hpp.

◆ phase

s16 CSHOT_EFFECT::phase[8]

Current animation and collision phase of each slot.

Definition at line 26 of file shot_effect.hpp.

◆ active

s16 CSHOT_EFFECT::active[8]

Nonzero while each effect slot is active.

Definition at line 27 of file shot_effect.hpp.

◆ damage

s32 CSHOT_EFFECT::damage[8]

Damage dealt by each effect slot.

Definition at line 28 of file shot_effect.hpp.

◆ weapon_status

s32 CSHOT_EFFECT::weapon_status[8]

Weapon status carried by each effect slot.

Definition at line 29 of file shot_effect.hpp.

◆ user_id

s16 CSHOT_EFFECT::user_id[8]

Primary user identifier of each effect slot.

Definition at line 30 of file shot_effect.hpp.

◆ user_id_2

s16 CSHOT_EFFECT::user_id_2[8]

Secondary user identifier of each effect slot.

Definition at line 31 of file shot_effect.hpp.

◆ user_sub_id

s32 CSHOT_EFFECT::user_sub_id[8]

Secondary collision-owner value of each effect slot.

Definition at line 32 of file shot_effect.hpp.

◆ vs_monster

char* CSHOT_EFFECT::vs_monster[8]

Monster-effectiveness table of each effect slot.

Definition at line 33 of file shot_effect.hpp.

◆ loop

s32 CSHOT_EFFECT::loop[8]

Whether each effect slot loops.

Definition at line 34 of file shot_effect.hpp.

◆ random_rate

float CSHOT_EFFECT::random_rate[8]

Randomization rate of each effect slot.

Definition at line 35 of file shot_effect.hpp.

◆ life_time

s32 CSHOT_EFFECT::life_time[8]

Lifetime of each effect slot.

Definition at line 36 of file shot_effect.hpp.

◆ enemy_attribute

s32 CSHOT_EFFECT::enemy_attribute[8]

Enemy attribute of each effect slot.

Definition at line 37 of file shot_effect.hpp.

◆ no_sound

char CSHOT_EFFECT::no_sound[8]

Whether sound is suppressed for each effect slot.

Definition at line 38 of file shot_effect.hpp.

◆ wait

char CSHOT_EFFECT::wait[8]

Delay applied to each effect slot.

Definition at line 39 of file shot_effect.hpp.

◆ wait_state

char CSHOT_EFFECT::wait_state[8]

Secondary delay state of each effect slot.

Definition at line 40 of file shot_effect.hpp.

◆ status

s32 CSHOT_EFFECT::status

Shared runtime status reset whenever a shot starts.

Definition at line 41 of file shot_effect.hpp.

◆ slot_count

s32 CSHOT_EFFECT::slot_count

Number of effect slots initialized by the loader.

Definition at line 42 of file shot_effect.hpp.

◆ current_slot

s32 CSHOT_EFFECT::current_slot

Currently selected effect slot, or -1.

Definition at line 43 of file shot_effect.hpp.

◆ texture_block

s32 CSHOT_EFFECT::texture_block

Texture block the effect's model was loaded into and is reloaded from before drawing.

Definition at line 44 of file shot_effect.hpp.

◆ unk_A158

u8 CSHOT_EFFECT::unk_A158[8]

Definition at line 45 of file shot_effect.hpp.