wavelength 1.0.0
Loading...
Searching...
No Matches
memcardconfig.h
Go to the documentation of this file.
1#pragma once
2
3#include <list>
4#include <memory>
5#include <vector>
6
7#include <libmc.h>
8
9#include "os/string.h"
10#include "script/dataarray.h"
11
13constexpr int kMemcardDirFileSize = 2;
14
22
29extern std::unique_ptr<char[]> g_pMemcardBuffer;
30
37extern int g_nMemcardBufferSize;
38
39#ifdef VIDEO_STANDARD_PAL
45extern int g_nMemcardReadResult;
46
56bool MemcardReadSizeIs(int nBytes);
57#endif
58
66extern std::unique_ptr<char[]> g_pMemcardIcon;
67
74extern int g_nMemcardIconSize;
75
82extern int g_bMemcardDirExists;
83
90extern int g_nMemcardDirKilobytes;
91
98extern int g_nMaxRemixesPerDir;
99
106extern int g_nMaxRemixDirs;
107
114extern int g_nMaxRemixes;
115
122extern const char *g_pszRemixExt;
123
130extern const char *g_pszFreqExt;
131
138extern const char *g_pszMemcardBaseDir;
139
146extern String g_RemixPath;
147
148#ifdef VIDEO_STANDARD_PAL
156extern String g_MemcardOpenPath;
157#endif
158
165extern String g_MemcardPath;
166
173#ifdef VIDEO_STANDARD_PAL
174extern std::vector<String> g_RemixNames;
175#else
176extern std::list<String> g_RemixNames;
177#endif
178
185extern sceMcIconSys g_MemcardIconSys;
186
194
202
211const char *GetRemixDirName(int nIndex);
212
221int BytesToKilobytes(int nBytes);
Reference-counted array of script data nodes.
Definition dataarray.h:20
Growable text buffer that is also a PrnStream.
Definition string.h:19
const char * g_pszFreqExt
The extension of a Freq file, freq_ext.
sceMcIconSys g_MemcardIconSys
The icon.sys every save directory receives.
constexpr int kMemcardDirFileSize
The size of the file named after its directory that every save directory receives.
Definition memcardconfig.h:13
void LoadMemcardConfig()
Read the memory card configuration, the icon file, and the icon description.
String g_MemcardPath
The save directory the current work addresses.
std::unique_ptr< char[]> g_pMemcardBuffer
The buffer a save is serialised into and a load is read into, of buff_size bytes.
std::unique_ptr< char[]> g_pMemcardIcon
The icon file every save directory receives, read from the icon_file of the disc's mc directory.
void FreeMemcardConfig()
Release the buffers LoadMemcardConfig() allocated.
int g_nMemcardIconSize
The size of g_pMemcardIcon.
int g_nMemcardBufferSize
The size of g_pMemcardBuffer, the buff_size of the configuration.
int g_nMaxRemixesPerDir
The remixes one remix directory may include, max_remixes_perdir.
DataArray * g_pMemcardConfig
The mc section of the metagame system configuration.
int g_nMemcardDirKilobytes
The kilobytes a new save directory needs besides the save itself.
int g_bMemcardDirExists
Non-zero when the directory the next save goes into exists already.
int BytesToKilobytes(int nBytes)
Report the kilobytes a number of bytes occupies.
const char * g_pszRemixExt
The extension of a remix file, remix_ext.
int g_nMaxRemixes
The remixes a card may include, max_remixes.
const char * g_pszMemcardBaseDir
The prefix of every save directory, base_dir.
std::list< String > g_RemixNames
The remix files the last listing found, as paths below the card root.
int g_nMaxRemixDirs
The remix directories a card may include, max_remix_dirs.
const char * GetRemixDirName(int nIndex)
Report the name of a remix directory.
String g_RemixPath
The remix file the last search found, as a path below the card root.