![]() |
V-Gears 0
Free Final Fantasy VII engine.
|
A handler for savemaps. More...
#include <SavemapHandler.h>
Public Member Functions | |
SavemapHandler () | |
Constructor. More... | |
virtual | ~SavemapHandler () |
Destructor. More... | |
Savemap | GetCurrentSavemap () |
Retrieves the current savemap. More... | |
Savemap * | GetSavemap (unsigned int slot) |
Retrieves a savemap saved in a slot. More... | |
std::vector< Savemap * > | GetSavemaps () |
Retrieves a list of the saved maps. More... | |
bool | Save (unsigned int slot, bool force) |
Copies the current savemap to a slot and writes the file. More... | |
bool | Save (Savemap savemap, unsigned int slot, bool force) |
Saves a savemap to a slot and writes the file. More... | |
void | Release () |
Releases savemaps from memory. More... | |
void | SetData (const unsigned int bank, const unsigned int address, const int value) |
Pushes data to the current savemap memory banks. More... | |
void | SetControlKey (const char *control) |
Sets the control string of the current savemap. More... | |
void | SetWindowColours (const unsigned int t_l_r, const unsigned int t_l_g, const unsigned int t_l_b, const unsigned int t_r_r, const unsigned int t_r_g, const unsigned int t_r_b, const unsigned int b_r_r, const unsigned int b_r_g, const unsigned int b_r_b, const unsigned int b_l_r, const unsigned int b_l_g, const unsigned int b_l_b) |
Sets the window colours in the current savemap. More... | |
void | SetMoney (const unsigned int money) |
Sets the money of the current savemap. More... | |
void | SetGameTime (const unsigned int seconds) |
Sets the total playtime of the current savemap. More... | |
void | SetCountdownTime (const unsigned int seconds) |
Sets the time of the curent timer in the default savemap. More... | |
void | SetKeyItem (const unsigned int item, const bool owned) |
Marks a key item as owned or non-owned in the current savemap. More... | |
void | SetParty (const int member_1, const int member_2, const int member_3) |
Sets the current party in the current savemap. More... | |
void | SetItem (const unsigned int slot, const unsigned int id, const unsigned int quantity) |
Sets an item in a inventory slot in the current savemap. More... | |
void | SetMateria (const unsigned int slot, const int id, const unsigned int ap) |
Sets a materia in a materia inventory slot in the current savemap. More... | |
void | SetESkillMateria (const unsigned slot, const unsigned int skill, const bool learned) |
Sets a skill as learned in an Enemy Skill materia inventory slot in the current savemap. More... | |
void | SetMateriaStash (const unsigned int slot, const int id, const unsigned int ap) |
Sets a materia in a materia inventory slot in the current savemap. More... | |
void | SetESkillMateriaStash (const unsigned slot, const unsigned int skill, const bool learned) |
Sets a skill as learned in an Enemy Skill materia stash slot in the current savemap. More... | |
void | SetLocation (const float x, const float y, const float z, const unsigned int triangle, const int angle, const char *field, const char *name) |
Sets the current location in the current savemap. More... | |
void | SetSetting (const unsigned int key, const unsigned int value) |
Sets a setting value in the current savemap. More... | |
void | SetCharacterInfo (const unsigned int id, const int char_id, const char *name, const bool enabled, const bool locked, const unsigned int level, const unsigned int kills, const bool back_row, const unsigned int exp, const unsigned int exp_to_next, const unsigned int limit_level, const unsigned int limit_bar, const unsigned int weapon, const unsigned int armor, const int accessory) |
Sets a character basic information in the current savemap. More... | |
void | SetCharacterStat (const unsigned int id, const unsigned int stat, const unsigned int base, const unsigned int extra) |
Sets a character stat values in the current savemap. More... | |
void | SetCharacterLimitLearned (const unsigned int id, const unsigned int level, const unsigned int technique, const bool learned, const unsigned int uses) |
Sets a character limit learned status in the current savemap. More... | |
void | SetCharacterMateria (const unsigned int id, const bool weapon, const unsigned int slot, const int materia, const unsigned int ap) |
Sets a materia in a character weapon or armor slot in the current savemap. More... | |
void | SetCharacterESkillMateria (const unsigned int id, const bool weapon, const unsigned int slot, const unsigned int skill, const bool learned) |
Sets a skill as learned in a character's Enemy Skill materia in the current savemap. More... | |
void | SetCharacterStatus (const unsigned int id, const unsigned int status, const bool inflicted) |
Adds or removes a status to a character in the current savemap. More... | |
bool | IsSlotEmpty (const unsigned int slot) |
Checks if a slot is empty. More... | |
std::string | GetSlotControlKey (const unsigned int slot) |
Retrieves the control key from a saved savemap. More... | |
unsigned int | GetSlotWindowCornerColourComponent (const unsigned int slot, const unsigned int corner, const unsigned int comp) |
Retrieves a colour component from a window corner from a saved savemap. More... | |
unsigned int | GetSlotMoney (const unsigned int slot) |
Retrieves the money from a saved savemap. More... | |
unsigned int | GetSlotGameTime (const unsigned int slot) |
Retrieves the total playtime from a saved savemap. More... | |
unsigned int | GetSlotCountdownTime (const unsigned int slot) |
Retrieves the time in the timer from a saved savemap. More... | |
int | GetSlotPartyMember (const unsigned int slot, const unsigned int pos) |
Retrieves the ID of a party member from a saved savemap. More... | |
unsigned int | GetSlotItemAtPosId (const unsigned int slot, const unsigned int pos) |
Retrieves the ID of an item in the inventory from a saved savemap. More... | |
unsigned int | GetSlotItemAtPosQty (const unsigned int slot, const unsigned int pos) |
Retrieves the quantity of an item in the inventory from a saved savemap. More... | |
bool | GetSlotKeyItem (const unsigned int slot, const unsigned int id) |
Checks the status of a key item from a saved savemap. More... | |
int | GetSlotMateriaAtPosId (const unsigned int slot, const unsigned int pos) |
Retrieves the ID of a materia in the inventory from a saved savemap. More... | |
unsigned int | GetSlotMateriaAtPosAp (const unsigned int slot, const unsigned int pos) |
Retrieves the AP of a materia in the inventory from a saved savemap. More... | |
bool | IsSlotMateriaAtPosESkill (const unsigned int slot, const unsigned int pos) |
Checks if there is an Enemy Skill materia at a inventory position from a saved savemap. More... | |
bool | IsSlotMateriaAtPosESkillLearned (const unsigned int slot, const unsigned int pos, const unsigned int skill) |
Checks if a a enemy skill is learned by a materia at a position from a saved savemap. More... | |
int | GetSlotStashAtPosId (const unsigned int slot, const unsigned int pos) |
Retrieves the ID of a materia in the stash from a saved savemap. More... | |
unsigned int | GetSlotStashAtPosAp (const unsigned int slot, const unsigned int pos) |
Retrieves the AP of a materia in the stash from a saved savemap. More... | |
bool | IsSlotStashAtPosESkill (const unsigned int slot, const unsigned int pos) |
Checks if there is an Enemy Skill materia at a stash position from a saved savemap. More... | |
bool | IsSlotStashAtPosESkillLearned (const unsigned int slot, const unsigned int pos, const unsigned int skill) |
Checks if a a enemy skill is learned by a mat. More... | |
float | GetSlotLocationX (const unsigned int slot) |
Retrieves the X coordinate of the player from a saved savemap. More... | |
float | GetSlotLocationY (const unsigned int slot) |
Retrieves the Y coordinate of the player from a saved savemap. More... | |
float | GetSlotLocationZ (const unsigned int slot) |
Retrieves the Z coordinate of the player from a saved savemap. More... | |
unsigned int | GetSlotLocationTriangle (const unsigned int slot) |
Retrieves the walkmesh triangle of the player from a saved savemap. More... | |
int | GetSlotLocationAngle (const unsigned int slot) |
Retrieves the facing angle of the player from a saved savemap. More... | |
std::string | GetSlotLocationField (const unsigned int slot) |
Retrieves the field ID from a saved savemap. More... | |
std::string | GetSlotLocationName (const unsigned int slot) |
Retrieves the location name from a saved savemap. More... | |
int | GetSlotSetting (const unsigned int slot, const unsigned int key) |
Retrieves a setting from a saved savemap. More... | |
int | GetSlotCharacterCharId (const unsigned int slot, const unsigned int id) |
Retrieves the char ID of a character from a saved savemap. More... | |
std::string | GetSlotCharacterName (const unsigned int slot, const unsigned int id) |
Retrieves the name of a character from a saved savemap. More... | |
unsigned int | GetSlotCharacterLevel (const unsigned int slot, const unsigned int id) |
Retrieves the level of a character from a saved savemap. More... | |
unsigned int | GetSlotCharacterKills (const unsigned int slot, const unsigned int id) |
Retrieves the total kills of a character from a saved savemap. More... | |
bool | IsSlotCharacterEnabled (const unsigned int slot, const unsigned int id) |
Checks the enabled status of a character from a saved savemap. More... | |
bool | IsSlotCharacterLocked (const unsigned int slot, const unsigned int id) |
Checks the lock status of a character from a saved savemap. More... | |
bool | IsSlotCharacterBackRow (const unsigned int slot, const unsigned int id) |
Checks the row of a character from a saved savemap. More... | |
unsigned int | GetSlotCharacterExp (const unsigned int slot, const unsigned int id) |
Retrieves the total experience of a character from a saved savemap. More... | |
unsigned int | GetSlotCharacterExpToNext (const unsigned int slot, const unsigned int id) |
Retrieves the experience for next level of a character from a saved savemap. More... | |
unsigned int | GetSlotCharacterLimitLevel (const unsigned int slot, const unsigned int id) |
Retrieves the current limit level of a character from a saved savemap. More... | |
unsigned int | GetSlotCharacterLimitBar (const unsigned int slot, const unsigned int id) |
Retrieves the current limit bar status level of a character from a saved savemap. More... | |
unsigned int | GetSlotCharacterWeaponId (const unsigned int slot, const unsigned int id) |
Retrieves the ID of the weapon of a character from a saved savemap. More... | |
unsigned int | GetSlotCharacterArmorId (const unsigned int slot, const unsigned int id) |
Retrieves the ID of the armor of a character from a saved savemap. More... | |
int | GetSlotCharacterAccessoryId (const unsigned int slot, const unsigned int id) |
Retrieves the ID of the accessory of a character from a saved savemap. More... | |
unsigned int | GetSlotCharacterStatBase (const unsigned int slot, const unsigned int id, const unsigned int stat) |
Retrieves the base value of a stat of a character from a saved savemap. More... | |
unsigned int | GetSlotCharacterStatExtra (const unsigned int slot, const unsigned int id, const unsigned int stat) |
Retrieves the extra value of a stat of a character from a saved savemap. More... | |
unsigned int | GetSlotCharacterLimitUses (const unsigned int slot, const unsigned int id, const unsigned int level) |
Retrieves the uses of a character's limit level from a saved savemap. More... | |
bool | IsSlotCharacterLimitLearned (const unsigned int slot, const unsigned int id, const unsigned int level, const unsigned int tech) |
Checks if a limit technique is learned by a character from a savemap. More... | |
int | GetSlotCharacterMateriaId (const unsigned int slot, const unsigned int id, const bool weapon, const unsigned int pos) |
Retrieves the ID of an equipped materia from a saved savemap. More... | |
unsigned int | GetSlotCharacterMateriaAp (const unsigned int slot, const unsigned int id, const bool weapon, const unsigned int pos) |
Retrieves the AP of an equipped materia from a saved savemap. More... | |
bool | IsSlotCharacterMateriaESkill (const unsigned int slot, const unsigned int id, const bool weapon, const unsigned int pos) |
Checks if an equipped materia is Enemy Skill from a saved savemap. More... | |
bool | IsSlotCharacterMateriaESkillLearned (const unsigned int slot, const unsigned int id, const bool weapon, const unsigned int pos, const unsigned int skill) |
Checks if a a enemy skill is learned by a equipped materia from a saved savemap. More... | |
int | GetSlotData (const unsigned int slot, const unsigned int bank, const unsigned int address) |
Retrieves the value of a bank address from a saved savemap. More... | |
Static Public Attributes | |
static int | MAX_SAVE_SLOTS |
The maximum number of save slots. More... | |
Private Member Functions | |
void | ReadSavemaps () |
Reads every saved savemap from it's file. More... | |
Private Attributes | |
Savemap * | current_savemap_ |
The current savemap. More... | |
std::vector< Savemap * > | saved_savemaps_ |
List of saved savemaps. More... | |
bool | savemaps_read_ |
Indicates if the saved savemaps have been read from files. More... | |
Static Private Attributes | |
static std::string | SAVE_PATH |
Path for the save files. More... | |
A handler for savemaps.
SavemapHandler::SavemapHandler | ( | ) |
Constructor.
|
virtual |
Destructor.
Savemap SavemapHandler::GetCurrentSavemap | ( | ) |
Retrieves the current savemap.
Savemap * SavemapHandler::GetSavemap | ( | unsigned int | slot | ) |
Retrieves a savemap saved in a slot.
[in] | slot | Slot of the savemap to retrieve. |
std::vector< Savemap * > SavemapHandler::GetSavemaps | ( | ) |
Retrieves a list of the saved maps.
int SavemapHandler::GetSlotCharacterAccessoryId | ( | const unsigned int | slot, |
const unsigned int | id | ||
) |
Retrieves the ID of the accessory of a character from a saved savemap.
[in] | slot | The slot to read from. |
[in] | id | The character ID. |
unsigned int SavemapHandler::GetSlotCharacterArmorId | ( | const unsigned int | slot, |
const unsigned int | id | ||
) |
Retrieves the ID of the armor of a character from a saved savemap.
[in] | slot | The slot to read from. |
[in] | id | The character ID. |
int SavemapHandler::GetSlotCharacterCharId | ( | const unsigned int | slot, |
const unsigned int | id | ||
) |
Retrieves the char ID of a character from a saved savemap.
[in] | slot | The slot to read from. |
[in] | id | The character ID. |
unsigned int SavemapHandler::GetSlotCharacterExp | ( | const unsigned int | slot, |
const unsigned int | id | ||
) |
Retrieves the total experience of a character from a saved savemap.
[in] | slot | The slot to read from. |
[in] | id | The character ID. |
unsigned int SavemapHandler::GetSlotCharacterExpToNext | ( | const unsigned int | slot, |
const unsigned int | id | ||
) |
Retrieves the experience for next level of a character from a saved savemap.
[in] | slot | The slot to read from. |
[in] | id | The character ID. |
unsigned int SavemapHandler::GetSlotCharacterKills | ( | const unsigned int | slot, |
const unsigned int | id | ||
) |
Retrieves the total kills of a character from a saved savemap.
[in] | slot | The slot to read from. |
[in] | id | The character ID. |
unsigned int SavemapHandler::GetSlotCharacterLevel | ( | const unsigned int | slot, |
const unsigned int | id | ||
) |
Retrieves the level of a character from a saved savemap.
[in] | slot | The slot to read from. |
[in] | id | The character ID. |
unsigned int SavemapHandler::GetSlotCharacterLimitBar | ( | const unsigned int | slot, |
const unsigned int | id | ||
) |
Retrieves the current limit bar status level of a character from a saved savemap.
[in] | slot | The slot to read from. |
[in] | id | The character ID. |
unsigned int SavemapHandler::GetSlotCharacterLimitLevel | ( | const unsigned int | slot, |
const unsigned int | id | ||
) |
Retrieves the current limit level of a character from a saved savemap.
[in] | slot | The slot to read from. |
[in] | id | The character ID. |
unsigned int SavemapHandler::GetSlotCharacterLimitUses | ( | const unsigned int | slot, |
const unsigned int | id, | ||
const unsigned int | level | ||
) |
Retrieves the uses of a character's limit level from a saved savemap.
[in] | slot | The slot to read from. |
[in] | id | The character ID. |
[in] | level | The limit level. |
unsigned int SavemapHandler::GetSlotCharacterMateriaAp | ( | const unsigned int | slot, |
const unsigned int | id, | ||
const bool | weapon, | ||
const unsigned int | pos | ||
) |
Retrieves the AP of an equipped materia from a saved savemap.
[in] | slot | The slot to read from. |
[in] | id | The character ID. |
[in] | weapon | If false, check materia equipped in the weapon. If false, check materia equiped in the armor. |
[in] | pos | Position in the equipment slots. |
int SavemapHandler::GetSlotCharacterMateriaId | ( | const unsigned int | slot, |
const unsigned int | id, | ||
const bool | weapon, | ||
const unsigned int | pos | ||
) |
Retrieves the ID of an equipped materia from a saved savemap.
[in] | slot | The slot to read from. |
[in] | id | The character ID. |
[in] | weapon | If false, check materia equipped in the weapon. If false, check materia equiped in the armor. |
[in] | pos | Position in the equipment slots. |
std::string SavemapHandler::GetSlotCharacterName | ( | const unsigned int | slot, |
const unsigned int | id | ||
) |
Retrieves the name of a character from a saved savemap.
[in] | slot | The slot to read from. |
[in] | id | The character ID. |
unsigned int SavemapHandler::GetSlotCharacterStatBase | ( | const unsigned int | slot, |
const unsigned int | id, | ||
const unsigned int | stat | ||
) |
Retrieves the base value of a stat of a character from a saved savemap.
[in] | slot | The slot to read from. |
[in] | id | The character ID. |
[in] | stat | The stat ID (see { |
unsigned int SavemapHandler::GetSlotCharacterStatExtra | ( | const unsigned int | slot, |
const unsigned int | id, | ||
const unsigned int | stat | ||
) |
Retrieves the extra value of a stat of a character from a saved savemap.
For HP and MP, the extra value means the current value. For any other stat, the bonus gained by using sources.
[in] | slot | The slot to read from. |
[in] | id | The character ID. |
[in] | stat | The stat ID (see { |
unsigned int SavemapHandler::GetSlotCharacterWeaponId | ( | const unsigned int | slot, |
const unsigned int | id | ||
) |
Retrieves the ID of the weapon of a character from a saved savemap.
[in] | slot | The slot to read from. |
[in] | id | The character ID. |
std::string SavemapHandler::GetSlotControlKey | ( | const unsigned int | slot | ) |
Retrieves the control key from a saved savemap.
[in] | slot | The slot to read from. |
unsigned int SavemapHandler::GetSlotCountdownTime | ( | const unsigned int | slot | ) |
Retrieves the time in the timer from a saved savemap.
[in] | slot | The slot to read from. |
int SavemapHandler::GetSlotData | ( | const unsigned int | slot, |
const unsigned int | bank, | ||
const unsigned int | address | ||
) |
Retrieves the value of a bank address from a saved savemap.
[in] | slot | The slot to read from. |
[in] | bank | The bank ID. |
[in] | address | The address in the bank. |
unsigned int SavemapHandler::GetSlotGameTime | ( | const unsigned int | slot | ) |
Retrieves the total playtime from a saved savemap.
[in] | slot | The slot to read from. |
unsigned int SavemapHandler::GetSlotItemAtPosId | ( | const unsigned int | slot, |
const unsigned int | pos | ||
) |
Retrieves the ID of an item in the inventory from a saved savemap.
[in] | slot | The slot to read from. |
[in] | pos | Position in the inventory. |
unsigned int SavemapHandler::GetSlotItemAtPosQty | ( | const unsigned int | slot, |
const unsigned int | pos | ||
) |
Retrieves the quantity of an item in the inventory from a saved savemap.
[in] | slot | The slot to read from. |
[in] | pos | Position in the inventory. |
bool SavemapHandler::GetSlotKeyItem | ( | const unsigned int | slot, |
const unsigned int | id | ||
) |
Checks the status of a key item from a saved savemap.
[in] | slot | The slot to read from. |
[in] | id | Key item ID. |
int SavemapHandler::GetSlotLocationAngle | ( | const unsigned int | slot | ) |
Retrieves the facing angle of the player from a saved savemap.
[in] | slot | The slot to read from. |
std::string SavemapHandler::GetSlotLocationField | ( | const unsigned int | slot | ) |
Retrieves the field ID from a saved savemap.
[in] | slot | The slot to read from. |
std::string SavemapHandler::GetSlotLocationName | ( | const unsigned int | slot | ) |
Retrieves the location name from a saved savemap.
[in] | slot | The slot to read from. |
unsigned int SavemapHandler::GetSlotLocationTriangle | ( | const unsigned int | slot | ) |
Retrieves the walkmesh triangle of the player from a saved savemap.
[in] | slot | The slot to read from. |
float SavemapHandler::GetSlotLocationX | ( | const unsigned int | slot | ) |
Retrieves the X coordinate of the player from a saved savemap.
[in] | slot | The slot to read from. |
float SavemapHandler::GetSlotLocationY | ( | const unsigned int | slot | ) |
Retrieves the Y coordinate of the player from a saved savemap.
[in] | slot | The slot to read from. |
float SavemapHandler::GetSlotLocationZ | ( | const unsigned int | slot | ) |
Retrieves the Z coordinate of the player from a saved savemap.
[in] | slot | The slot to read from. |
unsigned int SavemapHandler::GetSlotMateriaAtPosAp | ( | const unsigned int | slot, |
const unsigned int | pos | ||
) |
Retrieves the AP of a materia in the inventory from a saved savemap.
[in] | slot | The slot to read from. |
[in] | pos | Position in the materia inventory. |
int SavemapHandler::GetSlotMateriaAtPosId | ( | const unsigned int | slot, |
const unsigned int | pos | ||
) |
Retrieves the ID of a materia in the inventory from a saved savemap.
[in] | slot | The slot to read from. |
[in] | pos | Position in the materia inventory. |
unsigned int SavemapHandler::GetSlotMoney | ( | const unsigned int | slot | ) |
Retrieves the money from a saved savemap.
[in] | slot | The slot to read from. |
int SavemapHandler::GetSlotPartyMember | ( | const unsigned int | slot, |
const unsigned int | pos | ||
) |
Retrieves the ID of a party member from a saved savemap.
[in] | slot | The slot to read from. |
[in] | pos | Position in the party. |
int SavemapHandler::GetSlotSetting | ( | const unsigned int | slot, |
const unsigned int | key | ||
) |
Retrieves a setting from a saved savemap.
[in] | slot | The slot to read from. |
[in] | key | Setting key. |
unsigned int SavemapHandler::GetSlotStashAtPosAp | ( | const unsigned int | slot, |
const unsigned int | pos | ||
) |
Retrieves the AP of a materia in the stash from a saved savemap.
[in] | slot | The slot to read from. |
[in] | pos | Position in the materia stash. |
int SavemapHandler::GetSlotStashAtPosId | ( | const unsigned int | slot, |
const unsigned int | pos | ||
) |
Retrieves the ID of a materia in the stash from a saved savemap.
[in] | slot | The slot to read from. |
[in] | pos | Position in the materia stash. |
unsigned int SavemapHandler::GetSlotWindowCornerColourComponent | ( | const unsigned int | slot, |
const unsigned int | corner, | ||
const unsigned int | comp | ||
) |
Retrieves a colour component from a window corner from a saved savemap.
[in] | slot | The slot to read from. |
[in] | corner | The window corner. See { |
[in] | comp | The color component to get. See { |
bool SavemapHandler::IsSlotCharacterBackRow | ( | const unsigned int | slot, |
const unsigned int | id | ||
) |
Checks the row of a character from a saved savemap.
[in] | slot | The slot to read from. |
[in] | id | The character ID. |
bool SavemapHandler::IsSlotCharacterEnabled | ( | const unsigned int | slot, |
const unsigned int | id | ||
) |
Checks the enabled status of a character from a saved savemap.
[in] | slot | The slot to read from. |
[in] | id | The character ID. |
bool SavemapHandler::IsSlotCharacterLimitLearned | ( | const unsigned int | slot, |
const unsigned int | id, | ||
const unsigned int | level, | ||
const unsigned int | tech | ||
) |
Checks if a limit technique is learned by a character from a savemap.
[in] | slot | The slot to read from. |
[in] | id | The character ID. |
[in] | level | The limit level. |
[in] | tech | The technique position in the level. |
bool SavemapHandler::IsSlotCharacterLocked | ( | const unsigned int | slot, |
const unsigned int | id | ||
) |
Checks the lock status of a character from a saved savemap.
[in] | slot | The slot to read from. |
[in] | id | The character ID. |
bool SavemapHandler::IsSlotCharacterMateriaESkill | ( | const unsigned int | slot, |
const unsigned int | id, | ||
const bool | weapon, | ||
const unsigned int | pos | ||
) |
Checks if an equipped materia is Enemy Skill from a saved savemap.
[in] | slot | The slot to read from. |
[in] | id | The character ID. |
[in] | weapon | If false, check materia equipped in the weapon. If false, check materia equiped in the armor. |
[in] | pos | Position in the equipment slots. |
bool SavemapHandler::IsSlotCharacterMateriaESkillLearned | ( | const unsigned int | slot, |
const unsigned int | id, | ||
const bool | weapon, | ||
const unsigned int | pos, | ||
const unsigned int | skill | ||
) |
Checks if a a enemy skill is learned by a equipped materia from a saved savemap.
[in] | slot | The slot to read from. |
[in] | id | The character ID. |
[in] | weapon | If false, check materia equipped in the weapon. If false, check materia equiped in the armor. |
[in] | pos | Position in the equipment slots. |
[in] | skill | Skill ID, starting from 0. |
bool SavemapHandler::IsSlotEmpty | ( | const unsigned int | slot | ) |
Checks if a slot is empty.
bool SavemapHandler::IsSlotMateriaAtPosESkill | ( | const unsigned int | slot, |
const unsigned int | pos | ||
) |
Checks if there is an Enemy Skill materia at a inventory position from a saved savemap.
[in] | slot | The slot to read from. |
[in] | pos | Position in the materia inventory. |
bool SavemapHandler::IsSlotMateriaAtPosESkillLearned | ( | const unsigned int | slot, |
const unsigned int | pos, | ||
const unsigned int | skill | ||
) |
Checks if a a enemy skill is learned by a materia at a position from a saved savemap.
[in] | slot | The slot to read from. |
[in] | pos | Position in the materia inventory. |
[in] | skill | Skill ID, starting from 0. |
bool SavemapHandler::IsSlotStashAtPosESkill | ( | const unsigned int | slot, |
const unsigned int | pos | ||
) |
Checks if there is an Enemy Skill materia at a stash position from a saved savemap.
[in] | slot | The slot to read from. |
[in] | pos | Position in the materia stash. |
bool SavemapHandler::IsSlotStashAtPosESkillLearned | ( | const unsigned int | slot, |
const unsigned int | pos, | ||
const unsigned int | skill | ||
) |
Checks if a a enemy skill is learned by a mat.
at a stash position from a saved savemap.
[in] | slot | The slot to read from. |
[in] | pos | Position in the materia stash. |
[in] | skill | Skill ID, starting from 0. |
|
private |
Reads every saved savemap from it's file.
void SavemapHandler::Release | ( | ) |
Releases savemaps from memory.
The content of the current savemap which are not yet saved to a slot will be lost.
bool SavemapHandler::Save | ( | Savemap | savemap, |
unsigned int | slot, | ||
bool | force | ||
) |
Saves a savemap to a slot and writes the file.
[in] | savemap | The savemap to save. |
[in] | slot | Slot at which to save. |
[in] | force | If false, it will check if the control data is the save (i.e. if its trying to overwrite a savemap of the same playthrought), and if they do not match, it will do nothing and return false. If true, it will not be checked. |
bool SavemapHandler::Save | ( | unsigned int | slot, |
bool | force | ||
) |
Copies the current savemap to a slot and writes the file.
[in] | slot | Slot at which to save. |
[in] | force | If false, it will check if the control data is the save (i.e. if its trying to overwrite a savemap of the same playthrought), and if they do not match, it will do nothing and return false. If true, it will not be checked. |
void SavemapHandler::SetCharacterESkillMateria | ( | const unsigned int | id, |
const bool | weapon, | ||
const unsigned int | slot, | ||
const unsigned int | skill, | ||
const bool | learned | ||
) |
Sets a skill as learned in a character's Enemy Skill materia in the current savemap.
Calling this will make the materia to be an Enemy Skill materia and set the AP to 0. To delete it, call {
void SavemapHandler::SetCharacterInfo | ( | const unsigned int | id, |
const int | char_id, | ||
const char * | name, | ||
const bool | enabled, | ||
const bool | locked, | ||
const unsigned int | level, | ||
const unsigned int | kills, | ||
const bool | back_row, | ||
const unsigned int | exp, | ||
const unsigned int | exp_to_next, | ||
const unsigned int | limit_level, | ||
const unsigned int | limit_bar, | ||
const unsigned int | weapon, | ||
const unsigned int | armor, | ||
const int | accessory | ||
) |
Sets a character basic information in the current savemap.
[in] | id | Character ID. |
[in] | char_id | Character identifier. |
[in] | name | Character name. |
[in] | enabled | If enabled in the PHS. |
[in] | locked | If locked in or out the current party. |
[in] | level | Character level. |
[in] | kills | Total kills. |
[in] | back_row | If the character is in the back row. |
[in] | exp | Total experience. |
[in] | exp_to_next | Experience to reach next level. |
[in] | limit_level | Currently selected limit level. |
[in] | limit_bar | Current limit bar fill status |
[in] | weapon | Equipped weapon ID. |
[in] | armor | Equipped armor ID. |
[in] | accessory | Equipped accessory ID. -1 if none equipped. |
void SavemapHandler::SetCharacterLimitLearned | ( | const unsigned int | id, |
const unsigned int | level, | ||
const unsigned int | technique, | ||
const bool | learned, | ||
const unsigned int | uses | ||
) |
Sets a character limit learned status in the current savemap.
[in] | id | Character ID. |
[in] | level | Limit level. |
[in] | technique | Limit level technique ID. |
[in] | learned | TRue to mark as learned, false to mark as non-learned. |
[in] | uses | Times the technique has been used. |
void SavemapHandler::SetCharacterMateria | ( | const unsigned int | id, |
const bool | weapon, | ||
const unsigned int | slot, | ||
const int | materia, | ||
const unsigned int | ap | ||
) |
Sets a materia in a character weapon or armor slot in the current savemap.
For Enemy Skill materia, don't use this, use {
[in] | id | Character ID. |
[in] | weapon | True to set the materia in the weapon, false to set it in the armor. |
[in] | slot | Weapon or armor slot. |
[in] | materia | Materia ID. Set to -1 to mark it as an empty slot. |
[in] | ap | Total AP of the materia. |
void SavemapHandler::SetCharacterStat | ( | const unsigned int | id, |
const unsigned int | stat, | ||
const unsigned int | base, | ||
const unsigned int | extra | ||
) |
Sets a character stat values in the current savemap.
[in] | id | Character ID. |
[in] | stat | Stat ID. See { |
[in] | base | Base value of the stat. |
[in] | extra | Extra value of the stat. For STR, VIT, MAG, SPR, DEX and LCK, it means the increment by means of sources. For HP and MP, the current value. |
void SavemapHandler::SetCharacterStatus | ( | const unsigned int | id, |
const unsigned int | status, | ||
const bool | inflicted | ||
) |
Adds or removes a status to a character in the current savemap.
[in] | id | Character ID. |
[in] | status | ID of the status. |
[in] | inflicted | True to add the status, false to remove it. |
void SavemapHandler::SetControlKey | ( | const char * | control | ) |
Sets the control string of the current savemap.
[in] | control | The control string. |
void SavemapHandler::SetCountdownTime | ( | const unsigned int | seconds | ) |
Sets the time of the curent timer in the default savemap.
[in] | seconds | The current countdown timer time, in seconds. |
void SavemapHandler::SetData | ( | const unsigned int | bank, |
const unsigned int | address, | ||
const int | value | ||
) |
Pushes data to the current savemap memory banks.
[in] | bank | The memory bank. |
[in] | address | The address in the bank. |
[in] | value | The value to save. |
void SavemapHandler::SetESkillMateria | ( | const unsigned | slot, |
const unsigned int | skill, | ||
const bool | learned | ||
) |
Sets a skill as learned in an Enemy Skill materia inventory slot in the current savemap.
Calling this will make the materia in the slot to be an Enemy Skill materia and set the AP to 0. To delete it, call {
[in] | slot | Materia inventory slot. |
[in] | skill | Enemy Skill ID (sequential, from 0). |
[in] | learned | TRue to mark as learned, false to mark as not learned. |
void SavemapHandler::SetESkillMateriaStash | ( | const unsigned | slot, |
const unsigned int | skill, | ||
const bool | learned | ||
) |
Sets a skill as learned in an Enemy Skill materia stash slot in the current savemap.
Calling this will make the materia in the slot to be an Enemy Skill materia and set the AP to 0. To delete it, call {
[in] | slot | Materia inventory slot. |
[in] | skill | Enemy Skill ID (sequential, from 0) |
[in] | learned | TRue to mark as learned, false to mark as not learned. |
void SavemapHandler::SetGameTime | ( | const unsigned int | seconds | ) |
Sets the total playtime of the current savemap.
[in] | seconds | The total playtime, in seconds. |
void SavemapHandler::SetItem | ( | const unsigned int | slot, |
const unsigned int | id, | ||
const unsigned int | quantity | ||
) |
Sets an item in a inventory slot in the current savemap.
[in] | slot | Inventory slot. |
[in] | id | Item ID. |
[in] | quantity | Item quantity. Set to 0 to mark as no item in the specified slot. |
void SavemapHandler::SetKeyItem | ( | const unsigned int | item, |
const bool | owned | ||
) |
Marks a key item as owned or non-owned in the current savemap.
[in] | item | Key item id. |
[in] | owned | True to mark it as owned, false to mark is as non-owned. |
void SavemapHandler::SetLocation | ( | const float | x, |
const float | y, | ||
const float | z, | ||
const unsigned int | triangle, | ||
const int | angle, | ||
const char * | field, | ||
const char * | name | ||
) |
Sets the current location in the current savemap.
[in] | x | X coordinate. |
[in] | y | Y coordinate. |
[in] | z | Z coordinate. It's optional, set it to lower than 0 to ignore it. |
[in] | triangle | Walkmesh triangle ID. |
[in] | angle | Facing direction. |
[in] | field | Field map ID, or empty for the world map. |
[in] | name | Name of the location to show in the save slot. |
void SavemapHandler::SetMateria | ( | const unsigned int | slot, |
const int | id, | ||
const unsigned int | ap | ||
) |
Sets a materia in a materia inventory slot in the current savemap.
For Enemy Skill materia, don't use this, use {
[in] | slot | Materia inventory slot. |
[in] | id | Materia ID. Set to -1 to mark it as an empty slot. |
[in] | ap | Total AP of the materia. |
void SavemapHandler::SetMateriaStash | ( | const unsigned int | slot, |
const int | id, | ||
const unsigned int | ap | ||
) |
Sets a materia in a materia inventory slot in the current savemap.
For Enemy Skill materia, don't use this, use {
[in] | slot | Materia inventory slot. |
[in] | id | Materia ID. Set to -1 to mark it as an empty slot. |
[in] | ap | Total AP of the materia. |
void SavemapHandler::SetMoney | ( | const unsigned int | money | ) |
Sets the money of the current savemap.
[in] | money | The current money. |
void SavemapHandler::SetParty | ( | const int | member_1, |
const int | member_2, | ||
const int | member_3 | ||
) |
Sets the current party in the current savemap.
[in] | member_1 | The first party member ID. -1 to leave empty. |
[in] | member_2 | The second party member ID. -1 to leave empty. |
[in] | member_3 | The third party member ID. -1 to leave empty. |
void SavemapHandler::SetSetting | ( | const unsigned int | key, |
const unsigned int | value | ||
) |
Sets a setting value in the current savemap.
[in] | key | Setting key. |
[in] | value | Setting value. |
void SavemapHandler::SetWindowColours | ( | const unsigned int | t_l_r, |
const unsigned int | t_l_g, | ||
const unsigned int | t_l_b, | ||
const unsigned int | t_r_r, | ||
const unsigned int | t_r_g, | ||
const unsigned int | t_r_b, | ||
const unsigned int | b_r_r, | ||
const unsigned int | b_r_g, | ||
const unsigned int | b_r_b, | ||
const unsigned int | b_l_r, | ||
const unsigned int | b_l_g, | ||
const unsigned int | b_l_b | ||
) |
Sets the window colours in the current savemap.
[in] | t_l_r | Top-left corner, red component. |
[in] | t_l_g | Top-left corner, green component. |
[in] | t_l_b | Top-left corner, blue component. |
[in] | t_r_r | Top-right corner, red component. |
[in] | t_r_g | Top-right corner, green component. |
[in] | t_r_b | Top-right corner, blue component. |
[in] | b_r_r | Bottom-right corner, red component. |
[in] | b_r_g | Bottom-right corner, green component. |
[in] | b_r_b | Bottom-right corner, blue component. |
[in] | b_l_r | Bottom-left corner, red component. |
[in] | b_l_g | Bottom-left corner, green component. |
[in] | b_l_b | Bottom-left corner, blue component. |
|
private |
The current savemap.
|
static |
The maximum number of save slots.
|
staticprivate |
Path for the save files.
|
private |
List of saved savemaps.
|
private |
Indicates if the saved savemaps have been read from files.