DCDecomp
A decompilation of Dark Cloud for the PlayStation 2
Loading...
Searching...
No Matches
dataread.hpp File Reference

Go to the source code of this file.

Classes

struct  DATA_HEADER
 
struct  BG_READ_INFO
 

Functions

int ReadBGSync ()
 
void InitReadBG ()
 
int LoadFileBG (char *name, u_long128 *buffer, int *out_size)
 
BG_READ_INFO * GetReadBGFile (int index)
 
void StartReadBG ()
 
void ReadBG ()
 
void BreakReadBG ()
 
void InitCDFile ()
 
void InitMemoryFile ()
 
int LoadFile (char *path, void *buffer, int *out_size)
 
int LoadFile2 (char *path, void *buffer, int *out_size, int mode)
 
int WriteFile (char *path, void *buffer, int size)
 
int LoadPackFile (char *path, u_int *buffer, int *out_size)
 
u_int * GetPackFile (char *name, int *out_size)
 
u_int * GetPackFile (u_int *pack, char *name, int *out_size)
 
u_int * GetPackFile (u_int *pack, int index, char **out_name, int *out_size)
 
int GetPackFileExt (u_int *pack, char *extension, u_int **files, int max_files, int *sizes, char **names)
 
void LoadOverlay (int mode)
 
void init_all ()
 
void SetEnv (sceVif1Packet *packet)
 
void LoadSndTxt ()
 
void PlayTimeCountFlag (int flag)
 
int PlayTimeCount (int unused)
 
void LoadSystemMessage ()
 
void initialize_data ()
 
void SetDataBuffer (CDataAlloc2< 1 > *arena, int quads)
 
void SetPacketReadBuffer (int packet_quads, int read_quads)
 
int check_now_loading ()
 

Variables

u_int * read_buffer
 
CDataAlloc2< 1 > * WorkBuffer__2
 

Detailed Description

Declares the calls that read a file off the disc, and the ones that reach into a pack file once it has been read.

Definition in file dataread.hpp.

Function Documentation

◆ ReadBGSync()

int ReadBGSync ( )

Steps the background read, and says whether one is still going.

Mangled name:
ReadBGSync__Fv
Address:
0x13EE30
Size:
0x88

Definition at line 297 of file dataread.cpp.

◆ InitReadBG()

void InitReadBG ( )

Initializes the background-read queue.

Definition at line 146 of file dataread.cpp.

◆ LoadFileBG()

int LoadFileBG ( char *  name,
u_long128 *  buffer,
int *  out_size 
)

Queues a file for background reading.

Definition at line 159 of file dataread.cpp.

◆ GetReadBGFile()

BG_READ_INFO * GetReadBGFile ( int  index)

Returns an allocated background-read queue slot.

Mangled name:
GetReadBGFile__Fi
Address:
0x13EC60
Size:
0x58

Definition at line 230 of file dataread.cpp.

◆ StartReadBG()

void StartReadBG ( )

Starts the background-read system.

Definition at line 238 of file dataread.cpp.

◆ ReadBG()

void ReadBG ( )

Advances the active background read by one vertical sync.

Definition at line 244 of file dataread.cpp.

◆ BreakReadBG()

void BreakReadBG ( )

Cancels the active CD/DVD read and resets the background queue.

Definition at line 323 of file dataread.cpp.

◆ InitCDFile()

void InitCDFile ( )

Initializes the DATA.DAT file index from disc.

Definition at line 521 of file dataread.cpp.

◆ InitMemoryFile()

void InitMemoryFile ( )

Initializes memory-backed file access.

Definition at line 557 of file dataread.cpp.

◆ LoadFile()

int LoadFile ( char *  path,
void *  buffer,
int *  out_size 
)

Reads a whole file off the disc.

Mangled name:
LoadFile__FPcPvPi
Address:
0x13F360
Size:
0x6C

Definition at line 560 of file dataread.cpp.

◆ LoadFile2()

int LoadFile2 ( char *  path,
void *  buffer,
int *  out_size,
int  mode 
)

Reads a file using the requested loading mode.

Definition at line 575 of file dataread.cpp.

◆ WriteFile()

int WriteFile ( char *  path,
void *  buffer,
int  size 
)

Writes a buffer to a file.

Definition at line 670 of file dataread.cpp.

◆ LoadPackFile()

int LoadPackFile ( char *  path,
u_int *  buffer,
int *  out_size 
)

Loads a pack and makes it the current implicit pack.

Definition at line 684 of file dataread.cpp.

◆ GetPackFile() [1/3]

u_int * GetPackFile ( char *  name,
int *  out_size 
)

Finds a file in the current implicit pack.

Mangled name:
GetPackFile__FPcPi
Address:
0x13F6F0
Size:
0x30

Definition at line 695 of file dataread.cpp.

◆ GetPackFile() [2/3]

u_int * GetPackFile ( u_int *  pack,
char *  name,
int *  out_size 
)

Finds a file inside a pack that has already been read.

Mangled name:
GetPackFile__FPUiPcPi
Address:
0x13F720
Size:
0xD8

Definition at line 701 of file dataread.cpp.

◆ GetPackFile() [3/3]

u_int * GetPackFile ( u_int *  pack,
int  index,
char **  out_name,
int *  out_size 
)

Finds a file by ordinal position in a pack.

Definition at line 740 of file dataread.cpp.

◆ GetPackFileExt()

int GetPackFileExt ( u_int *  pack,
char *  extension,
u_int **  files,
int  max_files,
int *  sizes,
char **  names 
)

Collects files with a requested extension from a pack.

Definition at line 773 of file dataread.cpp.

◆ LoadOverlay()

void LoadOverlay ( int  mode)

Loads the overlay required by a top-level game mode.

Mangled name:
LoadOverlay__Fi
Address:
0x140AA0
Size:
0xE4

Definition at line 281 of file main.cpp.

◆ init_all()

void init_all ( )

Initializes the IOP services and core rendering and file systems.

Mangled name:
init_all__Fv
Address:
0x140B90
Size:
0x210

Definition at line 298 of file main.cpp.

◆ SetEnv()

void SetEnv ( sceVif1Packet *  packet)

Writes the persistent GS state into the current VIF packet.

Mangled name:
SetEnv__FP13sceVif1Packet
Address:
0x140DA0
Size:
0xE4

Definition at line 371 of file main.cpp.

◆ LoadSndTxt()

void LoadSndTxt ( )

Loads the sound-effect and sequence metadata tables.

Mangled name:
LoadSndTxt__Fv
Address:
0x140E90
Size:
0x90

Definition at line 384 of file main.cpp.

◆ PlayTimeCountFlag()

void PlayTimeCountFlag ( int  flag)

Enables or disables accumulation of save-file play time.

Mangled name:
PlayTimeCountFlag__Fi
Address:
0x140F20
Size:
0xC

Definition at line 398 of file main.cpp.

◆ PlayTimeCount()

int PlayTimeCount ( int  unused)

Adds one vertical-sync interval to the save-file play time when enabled.

Mangled name:
PlayTimeCount__Fi
Address:
0x140F30
Size:
0x34

Definition at line 402 of file main.cpp.

◆ LoadSystemMessage()

void LoadSystemMessage ( )

Loads and initializes the system message catalogue for the active language.

Mangled name:
LoadSystemMessage__Fv
Address:
0x140F70
Size:
0x108

Definition at line 409 of file main.cpp.

◆ initialize_data()

void initialize_data ( )

Loads the global message and sound metadata used by game modes.

Mangled name:
initialize_data__Fv
Address:
0x141080
Size:
0x30

Definition at line 430 of file main.cpp.

◆ SetDataBuffer()

void SetDataBuffer ( CDataAlloc2< 1 > *  arena,
int  quads 
)

Gives one arena to the loader as its working buffer, sized in quadwords.

Mangled name:
SetDataBuffer__FP14CDataAlloc2_1_i
Address:
0x125A90
Size:
0x4C

Definition at line 76 of file dataset.cpp.

◆ SetPacketReadBuffer()

void SetPacketReadBuffer ( int  packet_quads,
int  read_quads 
)

Sets where packet reads land, and how much room they have.

Mangled name:
SetPacketReadBuffer__Fii
Address:
0x125AE0
Size:
0xD8

Definition at line 82 of file dataset.cpp.

◆ check_now_loading()

int check_now_loading ( )

Reports whether a background read is still running.

Mangled name:
check_now_loading__Fv
Address:
0x153F40
Size:
0xC
Return type:
Not recovered.

Definition at line 46 of file nowload.cpp.

Variable Documentation

◆ read_buffer

u_int* read_buffer
extern

Shared buffer used for synchronous game-data reads.

Definition at line 30 of file dataset.cpp.

◆ WorkBuffer__2

CDataAlloc2<1>* WorkBuffer__2

Allocator that dungeon monsters take their collision polygons from.

Definition at line 250 of file dataread.hpp.