|
DCDecomp
A decompilation of Dark Cloud for the PlayStation 2
|
#include <memorycardaccess.hpp>
Public Member Functions | |
| void | Initialize () |
| int | InitForMC () |
| void | SetBuff (char *buffer) |
| void | SetIconData (MC_ICON_DATA *icon) |
| void | MakeMcIconSysInfo () |
| void | SetFuncNo (int func_no) |
| int | GetFuncNo () |
| int | Step () |
| void | SetVersion (char *version) |
| char * | GetVersion () |
| int | SearchMcType () |
| int | GetDir () |
| int | LoadSysConfig () |
| int | SaveSysConfig () |
| int | Write () |
| int | Convert () |
| int | MakeDir () |
| int | GetSaveFileInfoFromMc (int file_no) |
| int | GetAllSaveFileInfo () |
| int | CheckFileNo (int file_no) |
| int | SaveToMc (int file_no) |
| int | LoadFromMc (int file_no) |
| int | FormatForMc () |
| int | DeleteFile (int file_no) |
| int | GetMsgNo (int msg_no) |
| int | McError (int result) |
| void | DmySync () |
| int | McUnFormatForDebug () |
Public Attributes | |
| s32 | port |
| s32 | file_no |
| MC_ERROR_INFO | error |
| char | version [0x20] |
| char | dir_name [0x20] |
| char | file_name [0x20] |
| char | current_dir [0x40] |
| s32 | func_no |
| u8 | unk_C0 [4] |
| s32 | step |
| s32 | fd |
| MC_DIR_ENTRY * | dir_table |
| CSaveData * | save_buffer |
| char * | check_sum |
| char * | load_buffer |
| char * | read_buffer |
| s32 | idle_code |
| s32 | transferred |
| s32 | transfer_size |
| sceMcIconSys | icon_sys |
| MC_ICON_DATA | icon |
| MC_CARD_INFO | card [MC_CARD_MAX] |
| SAVEDATA_INFO | file_info [MC_SAVE_FILE_MAX] |
| u8 | unk_7BC [4] |
Runs the memory card operations of the game one step at a time.
Definition at line 145 of file memorycardaccess.hpp.
| void CMemoryCardAccess::Initialize | ( | ) |
Fills the class with its starting values and names the save directory after the menu language.
Definition at line 33 of file memorycardaccess.cpp.
| int CMemoryCardAccess::InitForMC | ( | ) |
Starts the memory card library and the class, and returns one if the library fails to start.
Definition at line 76 of file memorycardaccess.cpp.
| void CMemoryCardAccess::SetBuff | ( | char * | buffer | ) |
Builds the save image in the given buffer out of the save data, the version string and one checksum byte for every 64 bytes of save data.
Definition at line 105 of file memorycardaccess.cpp.
| void CMemoryCardAccess::SetIconData | ( | MC_ICON_DATA * | icon | ) |
Sets the file descriptors for the save directory's browser icons.
Definition at line 136 of file memorycardaccess.cpp.
| void CMemoryCardAccess::MakeMcIconSysInfo | ( | ) |
Fills the icon.sys image that MakeDir writes into the save directory.
Definition at line 142 of file memorycardaccess.cpp.
| void CMemoryCardAccess::SetFuncNo | ( | int | func_no | ) |
Starts the given operation from its first step and polls the memory card library once.
Definition at line 178 of file memorycardaccess.cpp.
| int CMemoryCardAccess::GetFuncNo | ( | ) |
Returns the operation that the class is running.
Definition at line 189 of file memorycardaccess.cpp.
| int CMemoryCardAccess::Step | ( | ) |
Runs one step of the current operation and returns its result.
Definition at line 193 of file memorycardaccess.cpp.
| void CMemoryCardAccess::SetVersion | ( | char * | version | ) |
Copies the given version string into the class.
Definition at line 257 of file memorycardaccess.cpp.
| char * CMemoryCardAccess::GetVersion | ( | ) |
Returns the version string that every save file carries after its data.
Definition at line 261 of file memorycardaccess.cpp.
| int CMemoryCardAccess::SearchMcType | ( | ) |
Reads the type, the free space and the format of the card in the current port.
Definition at line 265 of file memorycardaccess.cpp.
| int CMemoryCardAccess::GetDir | ( | ) |
Enters the save directory of the card and reads its entries into the directory table.
Definition at line 358 of file memorycardaccess.cpp.
| int CMemoryCardAccess::LoadSysConfig | ( | ) |
Reads the configuration file of the save directory and applies it to the save data.
Definition at line 436 of file memorycardaccess.cpp.
| int CMemoryCardAccess::SaveSysConfig | ( | ) |
Writes the configuration of the save data to the configuration file of the save directory.
Definition at line 517 of file memorycardaccess.cpp.
| int CMemoryCardAccess::Write | ( | ) |
Writes a test file of 0x76F800 bytes into the root directory of the card.
Definition at line 612 of file memorycardaccess.cpp.
| int CMemoryCardAccess::Convert | ( | ) |
Creates the save directory and copies the save files of the BASCUS-97112dkcloud directory into it.
Definition at line 632 of file memorycardaccess.cpp.
| int CMemoryCardAccess::MakeDir | ( | ) |
Creates the save directory and writes a default configuration file, icon.sys and the icon files into it.
Definition at line 703 of file memorycardaccess.cpp.
| int CMemoryCardAccess::GetSaveFileInfoFromMc | ( | int | file_no | ) |
Reads the save file with the given number and fills its entry of the save file table from it.
Definition at line 943 of file memorycardaccess.cpp.
| int CMemoryCardAccess::GetAllSaveFileInfo | ( | ) |
Reads the twelve save files of the card in turn into the save file table.
Definition at line 1104 of file memorycardaccess.cpp.
| int CMemoryCardAccess::CheckFileNo | ( | int | file_no | ) |
Returns one when the directory table already holds the save file with the given number.
Definition at line 1135 of file memorycardaccess.cpp.
| int CMemoryCardAccess::SaveToMc | ( | int | file_no | ) |
Writes the save image to the save file with the given number and the configuration to the configuration file.
Definition at line 1148 of file memorycardaccess.cpp.
| int CMemoryCardAccess::LoadFromMc | ( | int | file_no | ) |
Reads the save file with the given number into the save data.
Definition at line 1361 of file memorycardaccess.cpp.
| int CMemoryCardAccess::FormatForMc | ( | ) |
Formats the card in the current port.
Definition at line 1482 of file memorycardaccess.cpp.
| int CMemoryCardAccess::DeleteFile | ( | int | file_no | ) |
Deletes the save file with the given number.
Definition at line 1548 of file memorycardaccess.cpp.
| int CMemoryCardAccess::GetMsgNo | ( | int | msg_no | ) |
Returns the message of the operation that the class is running, counted from the given message number.
Definition at line 1593 of file memorycardaccess.cpp.
| int CMemoryCardAccess::McError | ( | int | result | ) |
Records the kind of the given error and the operation, file and step that it stopped.
Definition at line 1631 of file memorycardaccess.cpp.
| void CMemoryCardAccess::DmySync | ( | ) |
Waits until the memory card library has no command left to finish.
Definition at line 1672 of file memorycardaccess.cpp.
| int CMemoryCardAccess::McUnFormatForDebug | ( | ) |
Unformats the card in the current port.
Definition at line 1684 of file memorycardaccess.cpp.
| s32 CMemoryCardAccess::port |
Port that every command of the class names.
Definition at line 147 of file memorycardaccess.hpp.
| s32 CMemoryCardAccess::file_no |
Save file that the current operation works on.
Definition at line 148 of file memorycardaccess.hpp.
| MC_ERROR_INFO CMemoryCardAccess::error |
What stopped the last operation.
Definition at line 149 of file memorycardaccess.hpp.
| char CMemoryCardAccess::version[0x20] |
Version string that every save file carries after its data.
Definition at line 150 of file memorycardaccess.hpp.
| char CMemoryCardAccess::dir_name[0x20] |
Name of the save directory on the card.
Definition at line 151 of file memorycardaccess.hpp.
| char CMemoryCardAccess::file_name[0x20] |
Name that every save file of the game starts with.
Definition at line 152 of file memorycardaccess.hpp.
| char CMemoryCardAccess::current_dir[0x40] |
Directory that sceMcChdir writes back.
Definition at line 153 of file memorycardaccess.hpp.
| s32 CMemoryCardAccess::func_no |
Operation that the class is running.
Definition at line 154 of file memorycardaccess.hpp.
| u8 CMemoryCardAccess::unk_C0[4] |
Definition at line 155 of file memorycardaccess.hpp.
| s32 CMemoryCardAccess::step |
Step that the current operation has reached.
Definition at line 156 of file memorycardaccess.hpp.
| s32 CMemoryCardAccess::fd |
File that the last sceMcOpen returned, -1 until one does.
Definition at line 157 of file memorycardaccess.hpp.
| MC_DIR_ENTRY* CMemoryCardAccess::dir_table |
Table that GetDir fills with the entries of the save directory.
Definition at line 158 of file memorycardaccess.hpp.
| CSaveData* CMemoryCardAccess::save_buffer |
Save data at the start of the save image.
Definition at line 159 of file memorycardaccess.hpp.
| char* CMemoryCardAccess::check_sum |
Checksum bytes of the save image, one for every 64 bytes of the save data.
Definition at line 160 of file memorycardaccess.hpp.
| char* CMemoryCardAccess::load_buffer |
Area behind the save image that a load or a conversion reads a whole save file into.
Definition at line 161 of file memorycardaccess.hpp.
| char* CMemoryCardAccess::read_buffer |
Area behind the save image that a read fills.
Definition at line 162 of file memorycardaccess.hpp.
| s32 CMemoryCardAccess::idle_code |
Set to 61 whenever the class goes idle.
Definition at line 163 of file memorycardaccess.hpp.
| s32 CMemoryCardAccess::transferred |
Bytes that the current read or write has moved.
Definition at line 164 of file memorycardaccess.hpp.
| s32 CMemoryCardAccess::transfer_size |
Bytes that the current read or write is to move.
Definition at line 165 of file memorycardaccess.hpp.
| sceMcIconSys CMemoryCardAccess::icon_sys |
icon.sys image that MakeDir writes into the save directory.
Definition at line 166 of file memorycardaccess.hpp.
| MC_ICON_DATA CMemoryCardAccess::icon |
Icon files that the save directory is to carry.
Definition at line 167 of file memorycardaccess.hpp.
| MC_CARD_INFO CMemoryCardAccess::card[MC_CARD_MAX] |
What the class found out about the card in each port.
Definition at line 168 of file memorycardaccess.hpp.
| SAVEDATA_INFO CMemoryCardAccess::file_info[MC_SAVE_FILE_MAX] |
Save files of the card, as the menus show them.
Definition at line 169 of file memorycardaccess.hpp.
| u8 CMemoryCardAccess::unk_7BC[4] |
Definition at line 170 of file memorycardaccess.hpp.