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

#include <mapparts.hpp>

Inheritance diagram for CMapParts:
CMapObject CObjectFrame CObjectFrame CObjectFrame CObjectFrame CObjectFrame CObjectFrame CObjectFrame CObjectFrame

Public Member Functions

void GetPosition (float *out_position)
 
virtual void SetPosition (float *position)
 
virtual void SetPosition (float x, float y, float z)
 
virtual void SetRotation (float x, float y, float z)
 
void SetRotY (int direction)
 
int GetRotY ()
 
void Initialize ()
 
 CMapParts ()
 
virtual void FrameObjectOnOff (char *name, int on)
 
int GetWidth ()
 
int GetHeight ()
 
int GetInfoData (int x, int y)
 
int ChangeAltData ()
 
int ChangeDigData ()
 
int CheckBox (CBoxVu0 *box)
 
int CheckBox2 (CBoxVu0 *box)
 
virtual void DrawLOD (float *distance, int lowest, int highest, int *out_level)
 
void DrawParts (float time, float *distance, int lowest, int highest, int *out_level)
 
void DrawEffect (CCamera *camera, float time, CEffectGroup *group)
 
- Public Member Functions inherited from CMapObject
virtual void Draw ()
 
void Initialize ()
 
void DrawShadow (int unknown0)
 
virtual void Draw ()
 
void Initialize ()
 
void DrawShadow (int fast)
 
virtual void Draw ()
 
void Initialize ()
 
void DrawShadow (int fast)
 
virtual void Draw ()
 
void Initialize ()
 
void DrawShadow (int fast)
 
virtual void Draw ()
 
void Initialize ()
 
void DrawShadow (int fast)
 
virtual void Draw ()
 
void Initialize ()
 
void DrawShadow (int fast)
 
virtual void Draw ()
 
void Initialize ()
 
void DrawShadow (int fast)
 
CFrame * GetCollisionFrame ()
 
virtual void Draw ()
 
void DrawShadow (int fast)
 
void DrawShade ()
 
void Initialize ()
 
 CMapObject ()
 
- Public Member Functions inherited from CObjectFrame
void SetFrame (CFrameVu1 *frame, int unknown0)
 
void SetFrame (CFrameVu1 *frame, int level)
 
void SetFrame (CFrameVu1 *frame, int level)
 
void SetFrame (CFrameVu1 *frame, int level)
 
void SetFrame (CFrameVu1 *frame, int level)
 
void SetFrame (CFrameVu1 *frame, int level)
 
void SetFrame (CFrameVu1 *frame, int level)
 
virtual void SetMoment (CVector3_f_ moment)
 
virtual void SetRotation (CVector3_f_ rotation)
 
virtual void SetRotVelocity (CVector3_f_ rot_velocity)
 
virtual void SetRotAcceleration (CVector3_f_ rot_acceleration)
 
void SetFrame (CFrameVu1 *frame, int level)
 
void Initialize (CFrameVu1 *frame)
 
 CObjectFrame ()
 
- Public Member Functions inherited from CObject
CObject & operator= (const CObject &source)
 
virtual void Step ()
 
float GetDistance (CObject &other)
 
void GetDir (CObject &other, float *out_direction)
 
virtual void SetMass (float mass)
 
virtual void SetPosition (CVector3_f_ position)
 
virtual void SetVelocity (CVector3_f_ velocity)
 
virtual void SetAcceleration (CVector3_f_ acceleration)
 
virtual void SetGravity (CVector3_f_ gravity)
 
virtual void SetRotation (float *rotation)
 
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 SetScale (float x, float y, float z)
 
virtual void SetScale (float *scale)
 
virtual void GetScale (float *out_scale)
 
 CObject (float mass=1.0f)
 
void Initialize (float mass)
 

Public Attributes

s32 parts_no
 
s32 area
 
s32 rot_y
 
s32 preview_frame
 
s32 blocked_preview_frame
 
CFrame * ripple_frame
 
EDITPARTS_INFO * info
 
s32 func_count
 
s32 func_data
 
s32 def_parts_no
 
s32 subtype
 
float lift
 
float draw_distance
 
s32 unk_124
 
s32 unk_128
 
s32 unk_12C
 
CBoxVu0 bound
 
u8 unk_150 [128]
 
float unit_size
 
s32 unk_1D4
 
s32 effect_on [MAP_PARTS_EFFECT_MAX]
 
EDIT_EFFECT_INFO * effect [MAP_PARTS_EFFECT_MAX]
 
- Public Attributes inherited from CMapObject
CFrameVu1 * collision_frame
 
CFrameVu1 * shadow_frame
 
CFrameVu1 * shade_frame
 
CFrameVu1 * camera_frame
 
float shadow_offset
 
int unk_34
 
int handle
 
char unk_EC [4]
 
char unk_3C [4]
 
CFrameVu1 * unk_D4
 
float unk_E0
 
int unk_E4
 
int unk_E8
 
int category_no
 
char unk_18 [36]
 
char unk_4C [8]
 
CFrame * collision_frame
 
CFrame * shadow_frame
 
CFrame * shade_frame
 
CFrame * camera_frame
 
s32 category_no
 
s32 handle
 
s32 unk_0EC
 
- Public Attributes inherited from CObjectFrame
CFrameVu1 * frame [4]
 
s32 rotation_changed
 
s32 draw_on
 
- Public Attributes inherited from CObject
float mass
 
float unk_004 [3]
 
float pos [4]
 
CVector3_f_ velocity
 
CVector3_f_ acceleration
 
CVector3_f_ gravity
 
CVector3_f_ moment
 
CVector3_f_ rotation
 
CVector3_f_ rot_velocity
 
CVector3_f_ rot_acceleration
 
float scale [4]
 

Detailed Description

Draws one part of an edited map, together with the effects that stand on it, and answers which cells of the grid the part covers.

A part faces one of the four compass directions, and the grid that its definition holds is read through that direction, so that one definition serves all four.

Definition at line 49 of file mapparts.hpp.

Constructor & Destructor Documentation

◆ CMapParts()

CMapParts::CMapParts ( )

Makes a part that a map has yet to define.

Mangled name:
__ct__9CMapPartsFv
Address:
0x19A960
Size:
0x48

Definition at line 76 of file mapparts.cpp.

Member Function Documentation

◆ GetPosition()

void CMapParts::GetPosition ( float *  out_position)

Gets the world position of the part.

Mangled name:
GetPosition__9CMapPartsFPf
Address:
0x19A7B0
Size:
0x2C

Definition at line 16 of file mapparts.cpp.

◆ SetPosition() [1/2]

void CMapParts::SetPosition ( float *  position)
virtual

Puts the part at a world position.

Mangled name:
SetPosition__9CMapPartsFPf
Address:
0x19A7E0
Size:
0x24

Reimplemented from CObject.

Definition at line 20 of file mapparts.cpp.

◆ SetPosition() [2/2]

void CMapParts::SetPosition ( float  x,
float  y,
float  z 
)
virtual

Puts the part at a world position.

Mangled name:
SetPosition__9CMapPartsFfff
Address:
0x19A810
Size:
0x14

Reimplemented from CObject.

Definition at line 24 of file mapparts.cpp.

◆ SetRotation()

void CMapParts::SetRotation ( float  x,
float  y,
float  z 
)
virtual

Turns the part to an angle about each axis.

Mangled name:
SetRotation__9CMapPartsFfff
Address:
0x19A830
Size:
0x14

Reimplemented from CObjectFrame.

Definition at line 30 of file mapparts.cpp.

◆ SetRotY()

void CMapParts::SetRotY ( int  direction)

Turns the part to face one of the four compass directions.

Mangled name:
SetRotY__9CMapPartsFi
Address:
0x19A850
Size:
0x5C

Definition at line 36 of file mapparts.cpp.

◆ GetRotY()

int CMapParts::GetRotY ( )

Gets the compass direction that the part faces.

Mangled name:
GetRotY__9CMapPartsFv
Address:
0x19A8B0
Size:
0xC

Definition at line 46 of file mapparts.cpp.

◆ Initialize()

void CMapParts::Initialize ( )

Puts the part at rest at the world origin, with no definition and no effect.

Mangled name:
Initialize__9CMapPartsFv
Address:
0x19A8C0
Size:
0x9C

Definition at line 50 of file mapparts.cpp.

◆ FrameObjectOnOff()

void CMapParts::FrameObjectOnOff ( char *  name,
int  on 
)
virtual

Turns a named part of every frame the part holds on or off.

Mangled name:
FrameObjectOnOff__9CMapPartsFPci
Address:
0x19A9B0
Size:
0x68

Reimplemented from CMapObject.

Definition at line 80 of file mapparts.cpp.

◆ GetWidth()

int CMapParts::GetWidth ( )

Gets the number of grid cells that the part covers from west to east.

Mangled name:
GetWidth__9CMapPartsFv
Address:
0x19AA20
Size:
0x58

Definition at line 94 of file mapparts.cpp.

◆ GetHeight()

int CMapParts::GetHeight ( )

Gets the number of grid cells that the part covers from north to south.

Mangled name:
GetHeight__9CMapPartsFv
Address:
0x19AA80
Size:
0x58

Definition at line 111 of file mapparts.cpp.

◆ GetInfoData()

int CMapParts::GetInfoData ( int  x,
int  y 
)

Reads the definition of one grid cell of the part, through the direction that the part faces.

Mangled name:
GetInfoData__9CMapPartsFii
Address:
0x19AAE0
Size:
0x160

Definition at line 127 of file mapparts.cpp.

◆ ChangeAltData()

int CMapParts::ChangeAltData ( )

Gives back 1 while one cell of the part accepts a change of height.

Mangled name:
ChangeAltData__9CMapPartsFv
Address:
0x19AC40
Size:
0x98

Definition at line 160 of file mapparts.cpp.

◆ ChangeDigData()

int CMapParts::ChangeDigData ( )

Gives back 1 while one cell of the part accepts digging.

Mangled name:
ChangeDigData__9CMapPartsFv
Address:
0x19ACE0
Size:
0x98

Definition at line 183 of file mapparts.cpp.

◆ CheckBox()

int CMapParts::CheckBox ( CBoxVu0 *  box)

Gives back 1 while the part meets a box.

Mangled name:
CheckBox__9CMapPartsFP7CBoxVu0
Address:
0x19AD80
Size:
0x134

Definition at line 206 of file mapparts.cpp.

◆ CheckBox2()

int CMapParts::CheckBox2 ( CBoxVu0 *  box)

Gives back 1 while the part meets a box, taking every corner of the part into account.

Mangled name:
CheckBox2__9CMapPartsFP7CBoxVu0
Address:
0x19AEC0
Size:
0x1D8

Definition at line 241 of file mapparts.cpp.

◆ DrawLOD()

void CMapParts::DrawLOD ( float *  distance,
int  lowest,
int  highest,
int *  out_level 
)
virtual

Draws the part at the level of detail that suits its distance from the eye, lifted by the height that its definition asks for.

Mangled name:
DrawLOD__9CMapPartsFPfiiPi
Address:
0x19B0A0
Size:
0x1B8

Reimplemented from CMapObject.

Definition at line 287 of file mapparts.cpp.

◆ DrawParts()

void CMapParts::DrawParts ( float  time,
float *  distance,
int  lowest,
int  highest,
int *  out_level 
)

Draws the part with the lights that the effects standing on it give.

Mangled name:
DrawParts__9CMapPartsFfPfiiPi
Address:
0x19B260
Size:
0x2EC

Definition at line 335 of file mapparts.cpp.

◆ DrawEffect()

void CMapParts::DrawEffect ( CCamera *  camera,
float  time,
CEffectGroup *  group 
)

Draws every effect that stands on the part.

Mangled name:
DrawEffect__9CMapPartsFP7CCamerafP12CEffectGroup
Address:
0x19B550
Size:
0x130

Definition at line 446 of file mapparts.cpp.

Member Data Documentation

◆ parts_no

s32 CMapParts::parts_no

Plot the part stands on, as the part catalogue numbers it.

Definition at line 51 of file mapparts.hpp.

◆ area

s32 CMapParts::area

Area of the ground the part stands in, or -1.

Definition at line 52 of file mapparts.hpp.

◆ rot_y

s32 CMapParts::rot_y

Quarter turns about the vertical axis that the part faces.

Definition at line 53 of file mapparts.hpp.

◆ preview_frame

s32 CMapParts::preview_frame

Frame drawn as the placement preview where the part fits: its finest level of detail.

Definition at line 54 of file mapparts.hpp.

◆ blocked_preview_frame

s32 CMapParts::blocked_preview_frame

Frame drawn as the placement preview where the part does not fit.

Definition at line 55 of file mapparts.hpp.

◆ ripple_frame

CFrame* CMapParts::ripple_frame

Extra model drawn with the part, such as a river's ripples; zero where the part has none.

Definition at line 56 of file mapparts.hpp.

◆ info

EDITPARTS_INFO* CMapParts::info

Definition of the part; zero until a map gives it one.

Definition at line 57 of file mapparts.hpp.

◆ func_count

s32 CMapParts::func_count

Number of function points the part's definition holds.

Definition at line 58 of file mapparts.hpp.

◆ func_data

s32 CMapParts::func_data

Function points of the part's definition.

Definition at line 59 of file mapparts.hpp.

◆ def_parts_no

s32 CMapParts::def_parts_no

Part number that the part's definition gives.

Definition at line 60 of file mapparts.hpp.

◆ subtype

s32 CMapParts::subtype

Subtype of the part.

See also
MapPartsSubtype.

Definition at line 61 of file mapparts.hpp.

◆ lift

float CMapParts::lift

Scale of the height the part is raised by to keep it from cutting into the ground; above 1 raises it by a fixed step.

Definition at line 62 of file mapparts.hpp.

◆ draw_distance

float CMapParts::draw_distance

Distance beyond which the part is not drawn; zero or below to draw it at any distance.

Definition at line 63 of file mapparts.hpp.

◆ unk_124

s32 CMapParts::unk_124

Definition at line 64 of file mapparts.hpp.

◆ unk_128

s32 CMapParts::unk_128

Definition at line 65 of file mapparts.hpp.

◆ unk_12C

s32 CMapParts::unk_12C

Definition at line 66 of file mapparts.hpp.

◆ bound

CBoxVu0 CMapParts::bound

Extremes of everything the part draws, in its own space.

Definition at line 67 of file mapparts.hpp.

◆ unk_150

u8 CMapParts::unk_150[128]

Definition at line 68 of file mapparts.hpp.

◆ unit_size

float CMapParts::unit_size

Width of one grid cell of the area the part stands on.

Definition at line 69 of file mapparts.hpp.

◆ unk_1D4

s32 CMapParts::unk_1D4

Definition at line 70 of file mapparts.hpp.

◆ effect_on

s32 CMapParts::effect_on[MAP_PARTS_EFFECT_MAX]

1 where the slot carries an effect; below zero where no slot after it does.

Definition at line 72 of file mapparts.hpp.

◆ effect

Effect of each slot.

Definition at line 73 of file mapparts.hpp.