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

Public Member Functions

int GetFreeCashNo ()
 
int GetFreeModelNo ()
 
int SetCashModel (int item_no, unsigned int *model_data, unsigned int *texture_data, int texture_size)
 
void DeleteModel (int model_no)
 
int SetHandModel (int source_no)
 
void AllReleasItem ()
 
int SetThrowModel (int source_no, float *position, float *heading)
 
void Draw ()
 
void Step ()
 
void Initialize ()
 

Public Attributes

u_int * cash [6]
 
s32 cash_item [6]
 
s32 cash_lock [6]
 
s32 model [16]
 
s32 model_cash [16]
 
u8 unk_0C8 [8]
 
CFrame frame [16]
 
float velocity [16][4]
 
s32 throw_time [16]
 

Detailed Description

Definition at line 35 of file mainitemmodel.hpp.

Member Function Documentation

◆ GetFreeCashNo()

int CMainItemModel::GetFreeCashNo ( )

Gives a free cache slot, or -1 where none is free.

Mangled name:
GetFreeCashNo__14CMainItemModelFv
Address:
0x1D4540
Size:
0x44

Definition at line 24 of file mainitemmodel.cpp.

◆ GetFreeModelNo()

int CMainItemModel::GetFreeModelNo ( )

Gives a free model slot, or -1 where none is free.

Mangled name:
GetFreeModelNo__14CMainItemModelFv
Address:
0x1D4590
Size:
0x48

Definition at line 34 of file mainitemmodel.cpp.

◆ SetCashModel()

int CMainItemModel::SetCashModel ( int  item_no,
unsigned int *  model_data,
unsigned int *  texture_data,
int  texture_size 
)

Reads one item model into a cache slot.

Mangled name:
SetCashModel__14CMainItemModelFiPUiPUii
Address:
0x1D45E0
Size:
0x190

Definition at line 44 of file mainitemmodel.cpp.

◆ DeleteModel()

void CMainItemModel::DeleteModel ( int  model_no)

Releases one model slot.

Mangled name:
DeleteModel__14CMainItemModelFi
Address:
0x1D4770
Size:
0xA4

Definition at line 71 of file mainitemmodel.cpp.

◆ SetHandModel()

int CMainItemModel::SetHandModel ( int  source_no)

Puts one item model in the player's hand.

Mangled name:
SetHandModel__14CMainItemModelFi
Address:
0x1D4820
Size:
0x120

Definition at line 84 of file mainitemmodel.cpp.

◆ AllReleasItem()

void CMainItemModel::AllReleasItem ( )

Releases every item model.

Mangled name:
AllReleasItem__14CMainItemModelFv
Address:
0x1D4940
Size:
0x78

Definition at line 102 of file mainitemmodel.cpp.

◆ SetThrowModel()

int CMainItemModel::SetThrowModel ( int  source_no,
float *  position,
float *  heading 
)

Starts an item model flying from a position along a heading and returns its slot.

Mangled name:
SetThrowModel__14CMainItemModelFiPfPf
Address:
0x1D49C0
Size:
0x108

Creates a thrown model at a position with a copied heading vector.

Definition at line 115 of file mainitemmodel.cpp.

◆ Draw()

void CMainItemModel::Draw ( )

Draws every item model the player is carrying or has thrown.

Mangled name:
Draw__14CMainItemModelFv
Address:
0x1D4AD0
Size:
0x350

Definition at line 127 of file mainitemmodel.cpp.

◆ Step()

void CMainItemModel::Step ( )

Advances every item model by a frame.

Mangled name:
Step__14CMainItemModelFv
Address:
0x1D4E20
Size:
0x520

Definition at line 182 of file mainitemmodel.cpp.

◆ Initialize()

void CMainItemModel::Initialize ( )

Clears every item model and cache slot.

Mangled name:
Initialize__14CMainItemModelFv
Address:
0x1D5340
Size:
0xE4

Definition at line 271 of file mainitemmodel.cpp.

Member Data Documentation

◆ cash

u_int* CMainItemModel::cash[6]

Model data each cache slot holds, or zero where the slot is free.

Definition at line 37 of file mainitemmodel.hpp.

◆ cash_item

s32 CMainItemModel::cash_item[6]

Item whose model each cache slot holds.

Definition at line 38 of file mainitemmodel.hpp.

◆ cash_lock

s32 CMainItemModel::cash_lock[6]

Number of model slots that draw each cache slot's model.

Definition at line 39 of file mainitemmodel.hpp.

◆ model

s32 CMainItemModel::model[16]

What each model slot holds; -1 where the slot is free.

Definition at line 40 of file mainitemmodel.hpp.

◆ model_cash

s32 CMainItemModel::model_cash[16]

Cache slot whose model each model slot draws.

Definition at line 41 of file mainitemmodel.hpp.

◆ unk_0C8

u8 CMainItemModel::unk_0C8[8]

Definition at line 42 of file mainitemmodel.hpp.

◆ frame

CFrame CMainItemModel::frame[16]

Frame that places each model slot's model.

Definition at line 43 of file mainitemmodel.hpp.

◆ velocity

float CMainItemModel::velocity[16][4]

Distance each thrown model moves in a frame.

Definition at line 44 of file mainitemmodel.hpp.

◆ throw_time

s32 CMainItemModel::throw_time[16]

Frames each thrown model has flown.

Definition at line 45 of file mainitemmodel.hpp.