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

#include <randomitem.hpp>

Public Member Functions

void Draw ()
 
void MapSymbolDraw ()
 
int checkEvent ()
 
int checkErr ()
 
int CheckPosition ()
 
void Set (float *drop_position, int slot_id, int gold, int item)
 
int CheckID ()
 
int CheckItemNo (int item)
 
void Step ()
 

Public Attributes

CTexture * gold_texture
 
u8 unk_004 [0xC]
 
float position [32][4]
 
float distance [32]
 
s32 id [32]
 
s32 amount [32]
 
s32 state [32]
 
float phase [32]
 
float bob_phase
 
s32 pickup_event [32]
 
s32 pickup_blocked [32]
 
s32 item_no [32]
 
u8 unk_614 [0xC]
 

Detailed Description

Keeps the gold and items that defeated monsters leave lying on the floor.

Definition at line 22 of file randomitem.hpp.

Member Function Documentation

◆ Draw()

void CRandomItem::Draw ( )

Draws the items lying on the floor.

Mangled name:
Draw__11CRandomItemFv
Address:
0x1D6BE0
Size:
0x1BC

Definition at line 23 of file randomitem.cpp.

◆ MapSymbolDraw()

void CRandomItem::MapSymbolDraw ( )

Draws the corner-map marks of the items lying on the floor.

Mangled name:
MapSymbolDraw__11CRandomItemFv
Address:
0x1D6DA0
Size:
0x148

Definition at line 79 of file randomitem.cpp.

◆ checkEvent()

int CRandomItem::checkEvent ( )

Raises the pickup event for an item the party has walked onto.

Mangled name:
checkEvent__11CRandomItemFv
Address:
0x1D6EF0
Size:
0x50

Definition at line 91 of file randomitem.cpp.

◆ checkErr()

int CRandomItem::checkErr ( )

Drops items that ended up somewhere they may not lie.

Mangled name:
checkErr__11CRandomItemFv
Address:
0x1D6F40
Size:
0x60

Definition at line 104 of file randomitem.cpp.

◆ CheckPosition()

int CRandomItem::CheckPosition ( )

Reports which lying item the party is standing on.

Mangled name:
CheckPosition__11CRandomItemFv
Address:
0x1D6FA0
Size:
0x250

Definition at line 115 of file randomitem.cpp.

◆ Set()

void CRandomItem::Set ( float *  drop_position,
int  slot_id,
int  gold,
int  item 
)

Puts one item on the floor at a position.

Mangled name:
Set__11CRandomItemFPfiii
Address:
0x1D71F0
Size:
0xD8

Definition at line 162 of file randomitem.cpp.

◆ CheckID()

int CRandomItem::CheckID ( )

Finds a free slot among the thirty-two lying items.

Mangled name:
CheckID__11CRandomItemFv
Address:
0x1D72D0
Size:
0x4C

Definition at line 178 of file randomitem.cpp.

◆ CheckItemNo()

int CRandomItem::CheckItemNo ( int  item)

Reports whether one item number is already lying on the floor.

Mangled name:
CheckItemNo__11CRandomItemFi
Address:
0x1D7320
Size:
0x58

Definition at line 189 of file randomitem.cpp.

◆ Step()

void CRandomItem::Step ( )

Advances the lying items' bob and sparkle by a frame.

Mangled name:
Step__11CRandomItemFv
Address:
0x1D7380
Size:
0x158

Definition at line 199 of file randomitem.cpp.

Member Data Documentation

◆ gold_texture

CTexture* CRandomItem::gold_texture

Texture that a dropped pile of gold draws with.

Definition at line 24 of file randomitem.hpp.

◆ unk_004

u8 CRandomItem::unk_004[0xC]

Definition at line 25 of file randomitem.hpp.

◆ position

float CRandomItem::position[32][4]

World position of each dropped item.

Definition at line 26 of file randomitem.hpp.

◆ distance

float CRandomItem::distance[32]

Distance from each item to the player.

Definition at line 27 of file randomitem.hpp.

◆ id

s32 CRandomItem::id[32]

Slot identifier, or -1 where the slot is free.

Definition at line 28 of file randomitem.hpp.

◆ amount

s32 CRandomItem::amount[32]

Gold value, or -1 when the slot contains an item.

Definition at line 29 of file randomitem.hpp.

◆ state

s32 CRandomItem::state[32]

Appearance and pickup animation state.

Definition at line 30 of file randomitem.hpp.

◆ phase

float CRandomItem::phase[32]

Phase of each item's appearance or pickup animation.

Definition at line 31 of file randomitem.hpp.

◆ bob_phase

float CRandomItem::bob_phase

Shared phase used to make active items hover.

Definition at line 32 of file randomitem.hpp.

◆ pickup_event

s32 CRandomItem::pickup_event[32]

Event each dropped item raises when the party walks onto it, or -1.

Definition at line 33 of file randomitem.hpp.

◆ pickup_blocked

s32 CRandomItem::pickup_blocked[32]

Nonzero while inventory capacity prevents pickup.

Definition at line 34 of file randomitem.hpp.

◆ item_no

s32 CRandomItem::item_no[32]

Item number, or -1 when the slot contains gold.

Definition at line 35 of file randomitem.hpp.

◆ unk_614

u8 CRandomItem::unk_614[0xC]

Definition at line 36 of file randomitem.hpp.