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

#include <savedata.hpp>

Public Member Functions

 CSaveData ()
 
void Initialize ()
 
void * GetConfigData ()
 
CMenuCursor * GetMenuCursor ()
 
s16 * GetCharaName (int chara_no)
 
void AddPlayTime (int time)
 
int GetPlayTime ()
 
void SetNowTime (float time)
 
float GetNowTime ()
 
void AddNowTime (float add)
 
void SetDay (int day)
 
int GetDay ()
 
void AddDay (int add)
 
void AddFishingPoint (int add)
 
void SetFishingPoint (int value)
 
void SetFishingRank (int fish_id, float score)
 
SV_FISH_DATA * GetFishingRank (int rank_index)
 
SV_GEORAMA_DATA * GetGrdData (int georama_no)
 
SV_EDIT_PARTS_INFO * GetEditPartsInfo (int georama_no, int plot_no)
 
SV_GRD_PART * GetParts (int georama_no, int *out_count)
 
SV_GRD_NPC * GetGrdNPCData (int map_no, int npc_no)
 
s16 * GetElemData (int georama_no)
 
CDngStatusData * GetDngStatus ()
 
CStockItem * GetStockItem ()
 
int GetGameFlag (int flag_no)
 
int SetGameFlag (int flag_no, int value)
 
int GetGameIntFlag (int flag_no)
 
int SetGameIntFlag (int flag_no, int value)
 
int GetMapFlag (int map_no, int flag_no)
 
int SetMapFlag (int map_no, int flag_no, int value)
 
int GetMapInitFlag (int map_no, int flag_no)
 
int SetMapInitFlag (int map_no, int flag_no, int value)
 
int AtraPartsGet (int georama_no, int plot_no)
 
int AtraChipGet (int georama_no, int chip_id)
 
int VisitMap (int map_no, int add)
 
int QuestDungeon (int dungeon_no, int add)
 
void ConvertConfig (SV_CONFIG_SYS *out)
 
int InvertConfig (SV_CONFIG_SYS *in)
 
s32 GetFishingPoint () const
 
s32 GetMardanGareyanFlag () const
 

Private Attributes

s32 config [18]
 
s16 chara_name [6][32]
 
s32 map_no
 
s32 unk_1CC
 
float now_time
 
s32 play_time
 
s32 day
 
s32 fishing_point
 
SV_FISH_DATA fish_data [64]
 
char unk_5E0 [112]
 
CMenuCursor menu_cursor
 
SV_GEORAMA_DATA georama [6]
 
s16 elem_data [6][128]
 
char special_npc [320]
 
CDngStatusData dng_status
 
CStockItem stock_item
 
u32 game_flags [256]
 
s32 game_int_flag [32]
 
u32 map_flags [80][16]
 
u32 map_init_flags [80][16]
 
s16 visit_map [80]
 
s16 quest_dungeon [6]
 
s32 mardan_garayan_caught
 
s32 quest_dungeon_total
 
char unk_12F9C [548]
 

Friends

class CMemoryCardAccess
 
void EdMoveChara ()
 

Detailed Description

Contains the data of one save slot.

Definition at line 107 of file savedata.hpp.

Constructor & Destructor Documentation

◆ CSaveData()

CSaveData::CSaveData ( )

Sets all save data fields to their initial state.

Mangled name:
__ct__9CSaveDataFv
Address:
0x158D30
Size:
0x44

Definition at line 669 of file savedata.cpp.

Member Function Documentation

◆ Initialize()

void CSaveData::Initialize ( )

Sets all save data fields to their initial state.

Mangled name:
Initialize__9CSaveDataFv
Address:
0x158B60
Size:
0x1C8

Definition at line 628 of file savedata.cpp.

◆ GetConfigData()

void * CSaveData::GetConfigData ( )

Returns the configuration values.

Mangled name:
GetConfigData__9CSaveDataFv
Address:
0x157B30
Size:
0xC

Returns the definition table entry of a Georama plot.

Mangled name:
GetEditAtraPartsData__Fii
Address:
0x158E00
Size:
0x74

Definition at line 33 of file savedata.cpp.

◆ GetMenuCursor()

CMenuCursor * CSaveData::GetMenuCursor ( )

Returns the menu cursor.

Mangled name:
GetMenuCursor__9CSaveDataFv
Address:
0x157B40
Size:
0xC

Definition at line 37 of file savedata.cpp.

◆ GetCharaName()

s16 * CSaveData::GetCharaName ( int  chara_no)

Returns the name of a character, or NULL if the character number is not valid.

Mangled name:
GetCharaName__9CSaveDataFi
Address:
0x157B50
Size:
0x34

Definition at line 41 of file savedata.cpp.

◆ AddPlayTime()

void CSaveData::AddPlayTime ( int  time)

Adds a value to the play time.

Mangled name:
AddPlayTime__9CSaveDataFi
Address:
0x157B90
Size:
0x14

Definition at line 49 of file savedata.cpp.

◆ GetPlayTime()

int CSaveData::GetPlayTime ( )

Returns the play time.

Mangled name:
GetPlayTime__9CSaveDataFv
Address:
0x157BB0
Size:
0xC

Definition at line 53 of file savedata.cpp.

◆ SetNowTime()

void CSaveData::SetNowTime ( float  time)

Sets the time of day.

Mangled name:
SetNowTime__9CSaveDataFf
Address:
0x157BC0
Size:
0xC

Definition at line 57 of file savedata.cpp.

◆ GetNowTime()

float CSaveData::GetNowTime ( )

Returns the time of day.

Mangled name:
GetNowTime__9CSaveDataFv
Address:
0x157BD0
Size:
0xC

Definition at line 61 of file savedata.cpp.

◆ AddNowTime()

void CSaveData::AddNowTime ( float  add)

Adds a value to the time of day and starts a new day if necessary.

Mangled name:
AddNowTime__9CSaveDataFf
Address:
0x157BE0
Size:
0xDC

Definition at line 65 of file savedata.cpp.

◆ SetDay()

void CSaveData::SetDay ( int  day)

Sets the day count and keeps the count in the permitted range.

Mangled name:
SetDay__9CSaveDataFi
Address:
0x157CC0
Size:
0x34

Definition at line 84 of file savedata.cpp.

◆ GetDay()

int CSaveData::GetDay ( )

Returns the day count.

Mangled name:
GetDay__9CSaveDataFv
Address:
0x157D00
Size:
0xC

Definition at line 96 of file savedata.cpp.

◆ AddDay()

void CSaveData::AddDay ( int  add)

Adds a value to the day count.

Mangled name:
AddDay__9CSaveDataFi
Address:
0x157D10
Size:
0x30

Definition at line 100 of file savedata.cpp.

◆ AddFishingPoint()

void CSaveData::AddFishingPoint ( int  add)

Adds a value to the fishing points and keeps the points in the permitted range.

Mangled name:
AddFishingPoint__9CSaveDataFi
Address:
0x157D40
Size:
0x3C

Definition at line 105 of file savedata.cpp.

◆ SetFishingPoint()

void CSaveData::SetFishingPoint ( int  value)

Sets the fishing points and keeps the points in the permitted range.

Mangled name:
SetFishingPoint__9CSaveDataFi
Address:
0x157D80
Size:
0x34

Definition at line 117 of file savedata.cpp.

◆ SetFishingRank()

void CSaveData::SetFishingRank ( int  fish_id,
float  score 
)

Puts a fish score in the leaderboard and sorts the leaderboard again.

Mangled name:
SetFishingRank__9CSaveDataFif
Address:
0x157DC0
Size:
0x180

Definition at line 129 of file savedata.cpp.

◆ GetFishingRank()

SV_FISH_DATA * CSaveData::GetFishingRank ( int  rank_index)

Returns a leaderboard entry, or NULL if the entry is empty.

Mangled name:
GetFishingRank__9CSaveDataFi
Address:
0x157F40
Size:
0x68

Definition at line 163 of file savedata.cpp.

◆ GetGrdData()

SV_GEORAMA_DATA * CSaveData::GetGrdData ( int  georama_no)

Returns the Georama data of a town, or NULL if the town number is not valid.

Mangled name:
GetGrdData__9CSaveDataFi
Address:
0x157FB0
Size:
0x38

Definition at line 175 of file savedata.cpp.

◆ GetEditPartsInfo()

SV_EDIT_PARTS_INFO * CSaveData::GetEditPartsInfo ( int  georama_no,
int  plot_no 
)

Returns the state of a Georama plot, or NULL if a number is not valid.

Mangled name:
GetEditPartsInfo__9CSaveDataFii
Address:
0x157FF0
Size:
0x68

Definition at line 183 of file savedata.cpp.

◆ GetParts()

SV_GRD_PART * CSaveData::GetParts ( int  georama_no,
int *  out_count 
)

Returns the Georama parts of a town and gives the number of parts that the town has.

Mangled name:
GetParts__9CSaveDataFiPi
Address:
0x158060
Size:
0x6C

Definition at line 195 of file savedata.cpp.

◆ GetGrdNPCData()

SV_GRD_NPC * CSaveData::GetGrdNPCData ( int  map_no,
int  npc_no 
)

Returns an NPC slot of a map, or NULL if a number is not valid.

Mangled name:
GetGrdNPCData__9CSaveDataFii
Address:
0x1580D0
Size:
0xD0

Definition at line 215 of file savedata.cpp.

◆ GetElemData()

s16 * CSaveData::GetElemData ( int  georama_no)

Returns the chips of a town, or NULL if the town number is not valid.

Mangled name:
GetElemData__9CSaveDataFi
Address:
0x1581A0
Size:
0x34

Definition at line 242 of file savedata.cpp.

◆ GetDngStatus()

CDngStatusData * CSaveData::GetDngStatus ( )

Returns the dungeon status data.

Mangled name:
GetDngStatus__9CSaveDataFv
Address:
0x1581E0
Size:
0xC

Definition at line 250 of file savedata.cpp.

◆ GetStockItem()

CStockItem * CSaveData::GetStockItem ( )

Returns the stock inventory.

Mangled name:
GetStockItem__9CSaveDataFv
Address:
0x1581F0
Size:
0x10

Definition at line 254 of file savedata.cpp.

◆ GetGameFlag()

int CSaveData::GetGameFlag ( int  flag_no)

Returns the value of a game flag, or zero if the flag number is not valid.

Mangled name:
GetGameFlag__9CSaveDataFi
Address:
0x158200
Size:
0x74

Definition at line 258 of file savedata.cpp.

◆ SetGameFlag()

int CSaveData::SetGameFlag ( int  flag_no,
int  value 
)

Sets a game flag and returns the new value.

Mangled name:
SetGameFlag__9CSaveDataFii
Address:
0x158280
Size:
0x94

Definition at line 279 of file savedata.cpp.

◆ GetGameIntFlag()

int CSaveData::GetGameIntFlag ( int  flag_no)

Returns the value of a game integer flag, or zero if the flag number is not valid.

Mangled name:
GetGameIntFlag__9CSaveDataFi
Address:
0x158320
Size:
0x38

Definition at line 310 of file savedata.cpp.

◆ SetGameIntFlag()

int CSaveData::SetGameIntFlag ( int  flag_no,
int  value 
)

Sets a game integer flag and returns the new value.

Mangled name:
SetGameIntFlag__9CSaveDataFii
Address:
0x158360
Size:
0x38

Definition at line 318 of file savedata.cpp.

◆ GetMapFlag()

int CSaveData::GetMapFlag ( int  map_no,
int  flag_no 
)

Returns the value of a map flag, or zero if a number is not valid.

Mangled name:
GetMapFlag__9CSaveDataFii
Address:
0x1583A0
Size:
0x9C

Definition at line 327 of file savedata.cpp.

◆ SetMapFlag()

int CSaveData::SetMapFlag ( int  map_no,
int  flag_no,
int  value 
)

Sets a map flag and returns the new value.

Mangled name:
SetMapFlag__9CSaveDataFiii
Address:
0x158440
Size:
0xBC

Definition at line 356 of file savedata.cpp.

◆ GetMapInitFlag()

int CSaveData::GetMapInitFlag ( int  map_no,
int  flag_no 
)

Returns the value of a map initialization flag, or zero if a number is not valid.

Mangled name:
GetMapInitFlag__9CSaveDataFii
Address:
0x158500
Size:
0x9C

Definition at line 391 of file savedata.cpp.

◆ SetMapInitFlag()

int CSaveData::SetMapInitFlag ( int  map_no,
int  flag_no,
int  value 
)

Sets a map initialization flag and returns the new value.

Mangled name:
SetMapInitFlag__9CSaveDataFiii
Address:
0x1585A0
Size:
0xBC

Definition at line 420 of file savedata.cpp.

◆ AtraPartsGet()

int CSaveData::AtraPartsGet ( int  georama_no,
int  plot_no 
)

Gives the player a Georama building and returns one if the state changed.

Mangled name:
AtraPartsGet__9CSaveDataFii
Address:
0x158660
Size:
0x100

Definition at line 455 of file savedata.cpp.

◆ AtraChipGet()

int CSaveData::AtraChipGet ( int  georama_no,
int  chip_id 
)

Puts a chip in the first empty chip slot of a town and returns one if a slot was empty.

Mangled name:
AtraChipGet__9CSaveDataFii
Address:
0x158760
Size:
0x94

Definition at line 494 of file savedata.cpp.

◆ VisitMap()

int CSaveData::VisitMap ( int  map_no,
int  add 
)

Adds a value to the visit count of a map and returns the new count.

Mangled name:
VisitMap__9CSaveDataFii
Address:
0x158800
Size:
0x68

Definition at line 521 of file savedata.cpp.

◆ QuestDungeon()

int CSaveData::QuestDungeon ( int  dungeon_no,
int  add 
)

Adds a value to the quest count of a dungeon and returns the new count.

Mangled name:
QuestDungeon__9CSaveDataFii
Address:
0x158870
Size:
0xCC

Definition at line 535 of file savedata.cpp.

◆ ConvertConfig()

void CSaveData::ConvertConfig ( SV_CONFIG_SYS *  out)

Writes the configuration values in the format that the memory card uses.

Mangled name:
ConvertConfig__9CSaveDataFP13SV_CONFIG_SYS
Address:
0x158940
Size:
0xB8

Definition at line 559 of file savedata.cpp.

◆ InvertConfig()

int CSaveData::InvertConfig ( SV_CONFIG_SYS *  in)

Reads the configuration values from the memory card and returns zero if the copies do not agree.

Mangled name:
InvertConfig__9CSaveDataFP13SV_CONFIG_SYS
Address:
0x158A00
Size:
0xDC

Definition at line 580 of file savedata.cpp.

◆ GetFishingPoint()

s32 CSaveData::GetFishingPoint ( ) const
inline

Returns the fishing points the player holds.

Definition at line 492 of file savedata.hpp.

◆ GetMardanGareyanFlag()

s32 CSaveData::GetMardanGareyanFlag ( ) const
inline

Returns the state of the Mardan Garayan fishing quest.

Definition at line 495 of file savedata.hpp.

Friends And Related Symbol Documentation

◆ CMemoryCardAccess

friend class CMemoryCardAccess
friend

Definition at line 110 of file savedata.hpp.

◆ EdMoveChara

void EdMoveChara ( )
friend

Runs the player character for one editor frame.

Mangled name:
EdMoveChara__Fv
Address:
0x16A160
Size:
0x35B4

Definition at line 1504 of file ebattle.cpp.

Member Data Documentation

◆ config

s32 CSaveData::config[18]
private

Contains the configuration values.

Definition at line 118 of file savedata.hpp.

◆ chara_name

s16 CSaveData::chara_name[6][32]
private

Contains the name of each character, as sixteen-bit characters.

Definition at line 119 of file savedata.hpp.

◆ map_no

s32 CSaveData::map_no
private

Map that the game resumes on.

Definition at line 120 of file savedata.hpp.

◆ unk_1CC

s32 CSaveData::unk_1CC
private

Definition at line 121 of file savedata.hpp.

◆ now_time

float CSaveData::now_time
private

Contains the time of day.

Definition at line 122 of file savedata.hpp.

◆ play_time

s32 CSaveData::play_time
private

Contains the play time.

Definition at line 123 of file savedata.hpp.

◆ day

s32 CSaveData::day
private

Contains the day count.

Definition at line 124 of file savedata.hpp.

◆ fishing_point

s32 CSaveData::fishing_point
private

Contains the fishing points.

Definition at line 125 of file savedata.hpp.

◆ fish_data

SV_FISH_DATA CSaveData::fish_data[64]
private

Contains the fishing leaderboard.

Definition at line 126 of file savedata.hpp.

◆ unk_5E0

char CSaveData::unk_5E0[112]
private

Definition at line 127 of file savedata.hpp.

◆ menu_cursor

CMenuCursor CSaveData::menu_cursor
private

Contains the menu positions.

Definition at line 128 of file savedata.hpp.

◆ georama

SV_GEORAMA_DATA CSaveData::georama[6]
private

Contains the Georama data of each town.

Definition at line 129 of file savedata.hpp.

◆ elem_data

s16 CSaveData::elem_data[6][128]
private

Contains the chips of each town.

Definition at line 130 of file savedata.hpp.

◆ special_npc

char CSaveData::special_npc[320]
private

Contains the NPC slots that the sub-maps share.

Definition at line 131 of file savedata.hpp.

◆ dng_status

CDngStatusData CSaveData::dng_status
private

Contains the dungeon status data.

Definition at line 136 of file savedata.hpp.

◆ stock_item

CStockItem CSaveData::stock_item
private

Contains the stock inventory.

Definition at line 137 of file savedata.hpp.

◆ game_flags

u32 CSaveData::game_flags[256]
private

Contains the game flag bits.

Definition at line 138 of file savedata.hpp.

◆ game_int_flag

s32 CSaveData::game_int_flag[32]
private

Contains the game integer flags.

Definition at line 139 of file savedata.hpp.

◆ map_flags

u32 CSaveData::map_flags[80][16]
private

Contains the map flag bits of each map.

Definition at line 140 of file savedata.hpp.

◆ map_init_flags

u32 CSaveData::map_init_flags[80][16]
private

Contains the map initialization flag bits of each map.

Definition at line 141 of file savedata.hpp.

◆ visit_map

s16 CSaveData::visit_map[80]
private

Contains the visit count of each map.

Definition at line 142 of file savedata.hpp.

◆ quest_dungeon

s16 CSaveData::quest_dungeon[6]
private

Contains the quest count of each dungeon.

Definition at line 143 of file savedata.hpp.

◆ mardan_garayan_caught

s32 CSaveData::mardan_garayan_caught
private

Number of Mardan Garayan caught.

Definition at line 144 of file savedata.hpp.

◆ quest_dungeon_total

s32 CSaveData::quest_dungeon_total
private

Contains the quest count of all the dungeons.

Definition at line 145 of file savedata.hpp.

◆ unk_12F9C

char CSaveData::unk_12F9C[548]
private

Definition at line 146 of file savedata.hpp.