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

#include <collisiondata.hpp>

Public Member Functions

int GetMonsterOwner (int index)
 
int GetFlags (int index)
 
int GetUserID (int index)
 
void SetUserID (int id, int attack)
 
COLLISION_HIT * Get (int index)
 
void SetVelocity (int index, float *direction, float scale)
 
int FindMonsterHit (float *position, float radius)
 
int Set (float *position, int damage, int life, float radius, float scale_rate, int target_mask, int kind, int flags, int attribute)
 
int CheckHitUser (float *position, int mask, float height)
 
void SetKickBack (float *origin, float speed, float decay, int mode)
 

Public Attributes

COLLISION_HIT hit [96]
 
s32 active [96]
 
s32 now_hit
 
u8 unk_3D84 [0xC]
 

Detailed Description

Holds the hits the collision test found this frame.

Definition at line 99 of file collisiondata.hpp.

Member Function Documentation

◆ GetMonsterOwner()

int CCollisionData::GetMonsterOwner ( int  index)
inline

Monster that dealt a hit, or -1.

Definition at line 109 of file collisiondata.hpp.

◆ GetFlags()

int CCollisionData::GetFlags ( int  index)
inline

What a hit does besides damage.

Definition at line 114 of file collisiondata.hpp.

◆ GetUserID()

int CCollisionData::GetUserID ( int  index)
inline

What dealt a hit, or -1.

Definition at line 119 of file collisiondata.hpp.

◆ SetUserID()

void CCollisionData::SetUserID ( int  id,
int  attack 
)
inline

Names what deals the hit being filled in.

Definition at line 124 of file collisiondata.hpp.

◆ Get()

COLLISION_HIT * CCollisionData::Get ( int  index)
inline

The record of one hit.

Definition at line 132 of file collisiondata.hpp.

◆ SetVelocity()

void CCollisionData::SetVelocity ( int  index,
float *  direction,
float  scale 
)
inline

Sets the way a hit throws what it hit.

Definition at line 137 of file collisiondata.hpp.

◆ FindMonsterHit()

int CCollisionData::FindMonsterHit ( float *  position,
float  radius 
)
inline

Finds an active hit that reaches a sphere, or -1.

Definition at line 146 of file collisiondata.hpp.

◆ Set()

int CCollisionData::Set ( float *  position,
int  damage,
int  life,
float  radius,
float  scale_rate,
int  target_mask,
int  kind,
int  flags,
int  attribute 
)

Records a hit, and returns the index of its record.

Mangled name:
Set__14CCollisionDataFPfiiffiiii
Address:
0x1B57A0
Size:
0x180

Definition at line 797 of file collisiondata.cpp.

◆ CheckHitUser()

int CCollisionData::CheckHitUser ( float *  position,
int  mask,
float  height 
)

Reports which recorded hit reaches the player.

Mangled name:
CheckHitUser__14CCollisionDataFPfif
Address:
0x1B5920
Size:
0x1BC

Definition at line 841 of file collisiondata.cpp.

◆ SetKickBack()

void CCollisionData::SetKickBack ( float *  origin,
float  speed,
float  decay,
int  mode 
)

Records the push a hit gives whatever it struck.

Mangled name:
SetKickBack__14CCollisionDataFPfffi
Address:
0x1B5AE0
Size:
0xA4

Definition at line 897 of file collisiondata.cpp.

Member Data Documentation

◆ hit

COLLISION_HIT CCollisionData::hit[96]

Every hit the test found this frame.

Definition at line 101 of file collisiondata.hpp.

◆ active

s32 CCollisionData::active[96]

Nonzero while each hit is still in use.

Definition at line 102 of file collisiondata.hpp.

◆ now_hit

s32 CCollisionData::now_hit

Indexes the hit record being filled in.

Definition at line 103 of file collisiondata.hpp.

◆ unk_3D84

u8 CCollisionData::unk_3D84[0xC]

Definition at line 104 of file collisiondata.hpp.