|
DCDecomp
A decompilation of Dark Cloud for the PlayStation 2
|
#include <character.hpp>
Public Member Functions | |
| CCharacter () | |
| void | SetMotion (int no, int mode, float speed=-1.0f) |
| void | SetMotionSpeed (float speed) |
| void | ClearPointLight () |
| int | SetPointLight (float *pos, float inner_range, float outer_range, float red, float green, float blue, float alpha) |
| void | InitializeTexAnime (CTexAnimeData *data, int count) |
| void | ClearTexAnime () |
| void | TextureAnime (int step) |
| void | TexAnimeOn (int no) |
| void | TexAnimeOff (int no) |
| int | SetFootSound (float left_frame, float right_frame, int motion_no) |
| void | SetFootSoundID (int id) |
| void | FootSoundEnable (int on) |
| void | EventEnable (int on) |
| void | SetEvent (float frame, int kind, int no, int motion_no) |
| void | ClearEvent (int motion_no) |
| void | SetMotionCamera (CCamera *camera) |
| tagMOTION_TYPE * | GetMotionParam (int motion_no, int *out_index, int *out_start, int *out_end, int *out_set) |
| MOTION_INFO * | GetMotionInfo (int motion_no) |
| float | GetNowTime () |
| virtual void | Step () |
| virtual void | ShadowStep () |
| virtual void | ClothStep (int step) |
| virtual void | ClothFloor (int floor) |
| virtual void | StopCloth (int unused) |
| virtual void | GetPosition (float *out_position) |
| virtual void | SetPosition (float x, float y, float z) |
| virtual void | GetWorldPosition (float *out_position) |
| virtual int | PickUpPoly (float *position, CCPoly *polygons) |
| virtual void | SetPosition (float *position) |
| virtual void | SetPosition (CVector3_f_ position) |
| virtual void | SetRotation (float x, float y, float z) |
| virtual void | SetRotation (float *rotation) |
| virtual void | SetRotation (CVector3_f_ rotation) |
| virtual void | SetScale (float x, float y, float z) |
| virtual void | SetScale (float *scale) |
| virtual void | Draw () |
| virtual void | DrawShadow () |
| virtual void | LoadPackData (unsigned int *pack, char *name, CDataAlloc2< 1 > *model_alloc, CDataAlloc2< 1 > *texture_alloc) |
| virtual void | LoadPackData (unsigned int *pack, char *name, CDataAlloc2< 1 > *model_alloc, CDataAlloc2< 1 > *motion_alloc, CDataAlloc2< 1 > *texture_alloc) |
| virtual void | LoadPackData2 (unsigned int *pack, char *name, CDataAlloc2< 1 > *alloc, int texture_block_no, CDataAlloc2< 1 > *image_alloc, int visual_type) |
| virtual void | LoadPackData3 (unsigned int *pack, char *name, CDataAlloc2< 1 > *alloc, int texture_block_no, CDataAlloc2< 1 > *image_alloc, int keep_textures, int visual_type) |
| void | DeleteExtendTexture (int block_no) |
| void | DeleteExtendMotion () |
| virtual void | Initialize () |
Public Member Functions inherited from CObject | |
| CObject & | operator= (const CObject &source) |
| float | GetDistance (CObject &other) |
| void | GetDir (CObject &other, float *out_direction) |
| virtual void | SetMass (float mass) |
| virtual void | SetVelocity (CVector3_f_ velocity) |
| virtual void | SetAcceleration (CVector3_f_ acceleration) |
| virtual void | SetGravity (CVector3_f_ gravity) |
| virtual void | SetMoment (CVector3_f_ moment) |
| virtual void | SetRotVelocity (CVector3_f_ rot_velocity) |
| virtual void | SetRotAcceleration (CVector3_f_ rot_acceleration) |
| virtual float | GetMass () |
| virtual void | GetPosition (CVector3_f_ *out_position) |
| virtual void | GetVelocity (CVector3_f_ *out_velocity) |
| virtual void | GetAcceleration (CVector3_f_ *out_acceleration) |
| virtual void | GetGravity (CVector3_f_ *out_gravity) |
| virtual void | GetMoment (CVector3_f_ *out_moment) |
| virtual void | GetRotation (float *out_rotation) |
| virtual void | GetRotation (CVector3_f_ *out_rotation) |
| virtual void | GetRotVelocity (CVector3_f_ *out_rot_velocity) |
| virtual void | GetRotAcceleration (CVector3_f_ *out_rot_acceleration) |
| virtual CVector3_f_ * | GetVelocity () |
| virtual CVector3_f_ * | GetAcceleration () |
| virtual CVector3_f_ * | GetGravity () |
| virtual CVector3_f_ * | GetMoment () |
| virtual CVector3_f_ * | GetRotation () |
| virtual CVector3_f_ * | GetRotVelocity () |
| virtual CVector3_f_ * | GetRotAcceleration () |
| virtual void | GetScale (float *out_scale) |
| CObject (float mass=1.0f) | |
| void | Initialize (float mass) |
Static Public Attributes | |
| static s32 | MotionStopFlag |
Moves and animates one character in the world.
Definition at line 115 of file character.hpp.
|
inline |
Sets a character to the state it starts in. The call goes through the table: this compiler dispatches a virtual from a constructor rather than binding it to the class being built.
Definition at line 167 of file character.hpp.
|
inline |
Selects the motion the character plays next, without advancing it.
Definition at line 172 of file character.hpp.
|
inline |
Sets the speed of the motion the character plays.
Definition at line 181 of file character.hpp.
| void CCharacter::ClearPointLight | ( | ) |
Clears every point light that affects the character.
Definition at line 277 of file character.cpp.
| int CCharacter::SetPointLight | ( | float * | pos, |
| float | inner_range, | ||
| float | outer_range, | ||
| float | red, | ||
| float | green, | ||
| float | blue, | ||
| float | alpha | ||
| ) |
Adds a point light to the first free light slot.
Definition at line 286 of file character.cpp.
| void CCharacter::InitializeTexAnime | ( | CTexAnimeData * | data, |
| int | count | ||
| ) |
Initializes the character texture animation from animation data.
Definition at line 308 of file character.cpp.
| void CCharacter::ClearTexAnime | ( | ) |
Clears the character texture animation.
Definition at line 312 of file character.cpp.
| void CCharacter::TextureAnime | ( | int | step | ) |
Advances the character texture animation.
Definition at line 316 of file character.cpp.
| void CCharacter::TexAnimeOn | ( | int | no | ) |
Enables one character texture animation.
Definition at line 320 of file character.cpp.
| void CCharacter::TexAnimeOff | ( | int | no | ) |
Disables one character texture animation.
Definition at line 324 of file character.cpp.
| int CCharacter::SetFootSound | ( | float | left_frame, |
| float | right_frame, | ||
| int | motion_no | ||
| ) |
Adds footstep events across a motion frame range.
Definition at line 328 of file character.cpp.
| void CCharacter::SetFootSoundID | ( | int | id | ) |
Selects the footstep sound set for the current ground.
Definition at line 358 of file character.cpp.
| void CCharacter::FootSoundEnable | ( | int | on | ) |
Enables or disables motion footstep sounds.
Definition at line 362 of file character.cpp.
| void CCharacter::EventEnable | ( | int | on | ) |
Enables or disables motion events.
Definition at line 366 of file character.cpp.
| void CCharacter::SetEvent | ( | float | frame, |
| int | kind, | ||
| int | no, | ||
| int | motion_no | ||
| ) |
Adds an event to one motion frame.
Definition at line 370 of file character.cpp.
| void CCharacter::ClearEvent | ( | int | motion_no | ) |
Clears events for one motion or every motion.
Definition at line 387 of file character.cpp.
| void CCharacter::SetMotionCamera | ( | CCamera * | camera | ) |
Assigns a camera to every loaded motion set.
Definition at line 400 of file character.cpp.
| tagMOTION_TYPE * CCharacter::GetMotionParam | ( | int | motion_no, |
| int * | out_index, | ||
| int * | out_start, | ||
| int * | out_end, | ||
| int * | out_set | ||
| ) |
Finds the motion set and local index for a motion number.
Definition at line 410 of file character.cpp.
| MOTION_INFO * CCharacter::GetMotionInfo | ( | int | motion_no | ) |
Gets the motion information for one motion number.
Definition at line 457 of file character.cpp.
| float CCharacter::GetNowTime | ( | ) |
Gets the current frame time of the active motion.
Definition at line 474 of file character.cpp.
|
virtual |
Advances the model motion and fires frame events.
Reimplemented from CObject.
Reimplemented in CNPCharacter.
Definition at line 487 of file character.cpp.
|
virtual |
Synchronizes and advances the shadow motion.
Reimplemented in CNPCharacter.
Definition at line 688 of file character.cpp.
|
virtual |
Advances every cloth simulation worn by the character.
Definition at line 768 of file character.cpp.
|
virtual |
Sets the floor height for every cloth simulation.
Definition at line 799 of file character.cpp.
|
virtual |
Stops every cloth simulation worn by the character.
Definition at line 784 of file chararead.cpp.
|
virtual |
Copies the character position to an output vector.
Definition at line 830 of file character.cpp.
|
virtual |
Sets the character, model, and shadow positions.
Reimplemented from CObject.
Definition at line 809 of file character.cpp.
|
virtual |
Gets the character position in world coordinates.
Definition at line 821 of file character.cpp.
|
virtual |
Moves the character onto a reachable collision polygon.
Reimplemented in CNPCharacter.
Definition at line 211 of file npcharacter.cpp.
|
virtual |
Sets the character position from a vector.
Reimplemented from CObject.
Definition at line 834 of file character.cpp.
|
virtual |
Sets the character position from a three-component vector.
Reimplemented from CObject.
Definition at line 838 of file character.cpp.
|
virtual |
Sets the character, model, and shadow rotations.
Reimplemented from CObject.
Definition at line 842 of file character.cpp.
|
virtual |
Sets the character rotation from a vector.
Reimplemented from CObject.
Definition at line 854 of file character.cpp.
|
virtual |
Sets the character rotation from a three-component vector.
Reimplemented from CObject.
Definition at line 858 of file character.cpp.
|
virtual |
Sets the character, model, and shadow scales.
Reimplemented from CObject.
Definition at line 862 of file character.cpp.
|
virtual |
Sets the character scale from a vector.
Reimplemented from CObject.
Definition at line 874 of file character.cpp.
|
virtual |
Draws the model and every cloth simulation.
Reimplemented in CMainChara, and CNPCharacter.
Definition at line 878 of file character.cpp.
|
virtual |
Draws the character shadow below the model.
Reimplemented in CNPCharacter.
Definition at line 994 of file character.cpp.
|
virtual |
Loads model and texture data from a character pack.
Definition at line 1015 of file character.cpp.
|
virtual |
Loads model, motion, and texture data from a character pack.
Definition at line 1019 of file character.cpp.
|
virtual |
Loads a character pack from one arena, putting its textures in the given texture block.
Definition at line 1023 of file character.cpp.
|
virtual |
Loads a character pack from one arena into a texture block, optionally keeping the textures the block already holds.
Definition at line 1027 of file character.cpp.
| void CCharacter::DeleteExtendTexture | ( | int | block_no | ) |
Restores a texture block after extended character textures are deleted.
Definition at line 1031 of file character.cpp.
| void CCharacter::DeleteExtendMotion | ( | ) |
Releases every extended motion set.
Definition at line 1052 of file character.cpp.
|
virtual |
Resets the character and all animation state.
Reimplemented in CMainChara, and CNPCharacter.
Definition at line 1065 of file character.cpp.
| float CCharacter::body_width |
Width of the character collision body.
Definition at line 117 of file character.hpp.
| float CCharacter::body_height |
Height used for targeting and camera framing.
Definition at line 118 of file character.hpp.
| float CCharacter::body_depth |
Depth of the character collision body.
Definition at line 119 of file character.hpp.
| CFrame* CCharacter::frame |
Frame that draws the character; zero if it has no model.
Definition at line 120 of file character.hpp.
| CFrame* CCharacter::shadow_frame |
Frame that draws the shadow; zero if it casts none.
Definition at line 121 of file character.hpp.
| u_int* CCharacter::images[4] |
Texture images the character loaded; the first is its own, the rest come from extension packs.
Definition at line 122 of file character.hpp.
| char* CCharacter::config |
Configuration text the character was loaded from, kept to reload its texture animations.
Definition at line 123 of file character.hpp.
| s32 CCharacter::config_size |
Size in bytes of the configuration text.
Definition at line 124 of file character.hpp.
| CTextureAnime CCharacter::tex_anime |
Animation of every texture that the character draws.
Definition at line 125 of file character.hpp.
| tagFRAME_INF* CCharacter::frame_info |
Frame bindings every motion set of the model shares.
Definition at line 126 of file character.hpp.
| tagFRAME_INF* CCharacter::shadow_frame_info |
Frame bindings every motion set of the shadow shares.
Definition at line 127 of file character.hpp.
| tagMOTION_TYPE CCharacter::motion_type |
Motions of the model.
Definition at line 128 of file character.hpp.
| tagMOTION_TYPE CCharacter::shadow_motion_type |
Motions of the shadow.
Definition at line 129 of file character.hpp.
| s32 CCharacter::motion_start[CHARA_MOTION_MAX] |
First motion number of each set; -1 where it holds none.
Definition at line 130 of file character.hpp.
| s32 CCharacter::motion_end[CHARA_MOTION_MAX] |
Motion number after the last one of each set.
Definition at line 131 of file character.hpp.
| MotionParam CCharacter::motion_storage[CHARA_MOTION_MAX] |
Storage the motions of each set beyond the first are built in.
Definition at line 132 of file character.hpp.
| MotionParam CCharacter::shadow_motion_storage[CHARA_MOTION_MAX] |
Storage the shadow motions of each set beyond the first are built in.
Definition at line 133 of file character.hpp.
| tagMOTION_TYPE* CCharacter::motion[CHARA_MOTION_MAX] |
Motions of each set; zero where it holds none.
Definition at line 134 of file character.hpp.
| tagMOTION_TYPE* CCharacter::shadow_motion[CHARA_MOTION_MAX] |
Shadow motions of each set.
Definition at line 135 of file character.hpp.
| float CCharacter::motion_speed |
Speed of the motion; -1.0 for the speed the motion gives.
Definition at line 136 of file character.hpp.
| s32 CCharacter::motion_flags |
Playback flags: 1 holds the motion still, 2 stops it on its last frame, 4 restarts it from its first frame without blending.
Definition at line 137 of file character.hpp.
| s32 CCharacter::motion_no |
Identifier of the motion that the character plays.
Definition at line 138 of file character.hpp.
| float CCharacter::unk_C6C |
Definition at line 139 of file character.hpp.
| s32 CCharacter::motion_state |
0 while no motion plays, 2 while one plays, 3 as one ends.
Definition at line 140 of file character.hpp.
| CCloth** CCharacter::cloth |
Pieces of cloth that the character wears.
Definition at line 141 of file character.hpp.
| CCloth* CCharacter::cloth_buf[8] |
Storage the cloth pointers start in.
Definition at line 142 of file character.hpp.
| s32 CCharacter::wind |
Wind the character's cloth sways in, or zero for none.
Definition at line 143 of file character.hpp.
| s32 CCharacter::fade_out |
1 while the ground fades the character down to its lowest alpha.
Definition at line 144 of file character.hpp.
| s32 CCharacter::ground_ambient_no |
Which of the two ground ambient colours the character takes on, or -1 for neither.
Definition at line 145 of file character.hpp.
| sceVu0FVECTOR CCharacter::ground_ambient[2] |
Ambient colours the character takes on over the two kinds of tinted ground.
Definition at line 146 of file character.hpp.
| sceVu0FVECTOR CCharacter::ambient_tint |
Ambient colour added while drawing, stepping towards the selected ground colour.
Definition at line 147 of file character.hpp.
| sceVu0FVECTOR CCharacter::ambient_offset |
Ambient RGB added while drawing and an optional alpha override.
Definition at line 148 of file character.hpp.
| float CCharacter::fade[4] |
Alpha the character draws with, two spare values, and the alpha it fades down to.
Definition at line 149 of file character.hpp.
| CFakePointLight CCharacter::point_light[CHARA_POINT_LIGHT_MAX] |
Lights that the character stands in.
Definition at line 150 of file character.hpp.
| CHARA_FOOT_SOUND CCharacter::foot_sound[CHARA_FOOT_SOUND_MAX] |
Sounds that the feet play.
Definition at line 151 of file character.hpp.
| s32 CCharacter::foot_sound_id |
Set of foot sounds that the ground asks for; below zero for none.
Definition at line 152 of file character.hpp.
| s32 CCharacter::foot_sound_enable |
1 while the feet play a sound.
Definition at line 153 of file character.hpp.
| s32 CCharacter::foot_sound_wait |
Frames before the feet may play another sound.
Definition at line 154 of file character.hpp.
| s32 CCharacter::event_enable |
1 while the motion fires its events.
Definition at line 155 of file character.hpp.
| CHARA_EVENT CCharacter::event[CHARA_EVENT_MAX] |
Events that the motions fire.
Definition at line 156 of file character.hpp.
| CHARA_UNK_1068 CCharacter::unk_1068[16] |
Definition at line 157 of file character.hpp.
|
static |
1 while every character holds the motion where it stands.
Definition at line 160 of file character.hpp.