![]() |
V-Gears 0
Free Final Fantasy VII engine.
|
A savemap. More...
#include <Savemap.h>
Classes | |
struct | Character |
A character entri in the savemap. More... | |
class | COLOUR |
Colour codes. More... | |
class | CORNER |
Window corners. More... | |
struct | Item |
Item structure. More... | |
struct | Location |
Location information. More... | |
struct | Materia |
A materia structure. More... | |
struct | Settings |
Game settings. More... | |
class | STAT |
Character basic stats. More... | |
Public Member Functions | |
Savemap () | |
Constructor. More... | |
~Savemap () | |
Destructor. More... | |
void | operator= (const Savemap &to_copy) |
Assignment operator. More... | |
void | Read (std::string file_name) |
Reads the savemap data from a file. More... | |
void | Write (int slot, std::string file_name) |
Writes the savemap to a file. More... | |
std::string | GetControlKey () const |
Retrieves a control string for a savemap. More... | |
void | SetControlKey (const std::string control) |
Sets the control string of the 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 savemap. More... | |
void | SetGameTime (const unsigned int seconds) |
Sets the total playtime of the savemap. More... | |
void | SetCountdownTime (const unsigned int seconds) |
Sets the time of the curent timer. More... | |
void | SetKeyItem (const unsigned int item, const bool owned) |
Marks a key item as owned or non-owned in the savemap. More... | |
void | SetParty (const int member_1, const int member_2, const int member_3) |
Sets the current party in the 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 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 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 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 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 savemap. More... | |
void | SetLocation (const float x, const float y, const float z, const unsigned int triangle, const int angle, std::string field, std::string name) |
Sets the current location in the savemap. More... | |
void | SetSetting (const unsigned int key, const unsigned int value) |
Sets a setting value in the savemap. More... | |
void | SetCharacterInfo (const unsigned int id, const int char_id, const std::string 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 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 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 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 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 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 savemap. More... | |
void | SetData (const unsigned int bank, const unsigned int address, const int value) |
Sets data in a data bank. More... | |
bool | IsEmpty () |
Checks if the savemap is empty. More... | |
std::string | GetControlKey () |
Retrieves the control key . More... | |
unsigned int | GetWindowCornerColourComponent (const unsigned int corner, const unsigned int comp) |
Retrieves a colour component from a window corner. More... | |
unsigned int | GetMoney () |
Retrieves the money. More... | |
unsigned int | GetGameTime () |
Retrieves the total playtime. More... | |
unsigned int | GetCountdownTime () |
Retrieves the time in the timer. More... | |
int | GetPartyMember (const unsigned int pos) |
Retrieves the ID of a party member. More... | |
unsigned int | GetItemAtPosId (const unsigned int pos) |
Retrieves the ID of an item in the inventory. More... | |
unsigned int | GetItemAtPosQty (const unsigned int pos) |
Retrieves the quantity of an item in the inventory. More... | |
bool | GetKeyItem (const unsigned int id) |
Checks if a key item is owned. More... | |
int | GetMateriaAtPosId (const unsigned int pos) |
Retrieves the ID of a materia in the inventory. More... | |
unsigned int | GetMateriaAtPosAp (const unsigned int pos) |
Retrieves the AP of a materia in the inventory. More... | |
bool | IsMateriaAtPosESkill (const unsigned int pos) |
Checks if there is an Enemy Skill materia at a inventory position. More... | |
bool | IsMateriaAtPosESkillLearned (const unsigned int pos, const unsigned int skill) |
Checks if a a enemy skill is learned by a materia in the inventory. More... | |
int | GetStashAtPosId (const unsigned int pos) |
Retrieves the ID of a materia in the stash. More... | |
unsigned int | GetStashAtPosAp (const unsigned int pos) |
Retrieves the AP of a materia in the stash. More... | |
bool | IsStashAtPosESkill (const unsigned int pos) |
Checks if there is an Enemy Skill materia at a stash position. More... | |
bool | IsStashAtPosESkillLearned (const unsigned int pos, const unsigned int skill) |
Checks if a a enemy skill is learned by a materia in the stash. More... | |
float | GetLocationX () |
Retrieves the X coordinate of the player. More... | |
float | GetLocationY () |
Retrieves the Y coordinate of the player. More... | |
float | GetLocationZ () |
Retrieves the Z coordinate of the player. More... | |
unsigned int | GetLocationTriangle () |
Retrieves the walkmesh triangle of the player. More... | |
int | GetLocationAngle () |
Retrieves the facing angle of the player. More... | |
std::string | GetLocationField () |
Retrieves the field ID. More... | |
std::string | GetLocationName () |
Retrieves the location name. More... | |
int | GetSetting (const unsigned int key) |
Retrieves a setting. More... | |
int | GetCharacterCharId (const unsigned int id) |
Retrieves the char ID of a character. More... | |
std::string | GetCharacterName (const unsigned int id) |
Retrieves the name of a character. More... | |
unsigned int | GetCharacterLevel (const unsigned int id) |
Retrieves the level of a character. More... | |
unsigned int | GetCharacterKills (const unsigned int id) |
Retrieves the total kills of a character. More... | |
bool | IsCharacterEnabled (const unsigned int id) |
Checks if a character is enabled. More... | |
bool | IsCharacterLocked (const unsigned int id) |
Checks if a character is locked in or out of the party. More... | |
bool | IsCharacterBackRow (const unsigned int id) |
Checks the row of a character. More... | |
unsigned int | GetCharacterExp (const unsigned int id) |
Retrieves the total experience of a character. More... | |
unsigned int | GetCharacterExpToNext (const unsigned int id) |
Retrieves the experience for next level of a character. More... | |
unsigned int | GetCharacterLimitLevel (const unsigned int id) |
Retrieves the current limit level of a character from a saved savemap. More... | |
unsigned int | GetCharacterLimitBar (const unsigned int id) |
Retrieves the current limit bar status level of a character. More... | |
unsigned int | GetCharacterWeaponId (const unsigned int id) |
Retrieves the ID of the weapon of a character. More... | |
unsigned int | GetCharacterArmorId (const unsigned int id) |
Retrieves the ID of the armor of a character. More... | |
int | GetCharacterAccessoryId (const unsigned int id) |
Retrieves the ID of the weapon of a character. More... | |
unsigned int | GetCharacterStatBase (const unsigned int id, const unsigned int stat) |
Retrieves the base value of a stat of a character. More... | |
unsigned int | GetCharacterStatExtra (const unsigned int id, const unsigned int stat) |
Retrieves the extra value of a stat of a character. More... | |
unsigned int | GetCharacterLimitUses (const unsigned int id, const unsigned int level) |
Retrieves the uses of a character's limit level. More... | |
bool | IsCharacterLimitLearned (const unsigned int id, const unsigned int level, const unsigned int tech) |
Checks if a limit technique is learned by a character. More... | |
int | GetCharacterMateriaId (const unsigned int id, const bool weapon, const unsigned int pos) |
Retrieves the ID of an equipped materia. More... | |
unsigned int | GetCharacterMateriaAp (const unsigned int id, const bool weapon, const unsigned int pos) |
Retrieves the AP of an equipped materia. More... | |
bool | IsCharacterMateriaESkill (const unsigned int id, const bool weapon, const unsigned int pos) |
Checks if an equipped materia is Enemy Skill. More... | |
bool | IsCharacterMateriaESkillLearned (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. More... | |
int | GetData (const unsigned int bank, const unsigned int address) |
Retrieves the value of a bank address. More... | |
Private Attributes | |
bool | empty_ |
Indicates if the savemap is empty or contains actual data. More... | |
int | slot_ |
The slot the savemap is saved at, or -1 if not saved. More... | |
std::string | control_ |
Control string. More... | |
u8 | window_colours_ [4][3] |
Window colours. More... | |
Character | characters_ [MAX_CHARACTERS] |
List of characters. More... | |
int | party_ [MAX_PARTY_MEMBERS] |
IDs of characters in the party. More... | |
Item | items_ [MAX_ITEM_SLOTS] |
Owned items. More... | |
bool | key_items_ [MAX_KEY_ITEM_SLOTS] |
Owned key items. More... | |
Materia | materia_ [MAX_MATERIA_SLOTS] |
Owned materia. More... | |
Materia | materia_stash_ [MAX_STASH_SLOTS] |
Alternative materia stash. More... | |
unsigned int | money_ |
Current party money. More... | |
unsigned int | seconds_ |
Seconds played. More... | |
unsigned int | countdown_ |
Current countdown remaining seconds. More... | |
Location | location_ |
Current location. More... | |
Settings | settings_ |
Game settings. More... | |
int | data_ [BANK_COUNT][BANK_ADDRESS_COUNT] |
Memory banks. More... | |
Static Private Attributes | |
static const unsigned int | MAX_CHARACTERS = 11 |
Maximum number of characters. More... | |
static const unsigned int | MAX_ITEM_SLOTS = 500 |
Maximum number of inventory slots. More... | |
static const unsigned int | MAX_KEY_ITEM_SLOTS = 100 |
Maximum number of inventory slots for key items. More... | |
static const unsigned int | MAX_MATERIA_SLOTS = 500 |
Maximum number of materia slots. More... | |
static const unsigned int | MAX_STASH_SLOTS = 500 |
Maximum number of materia slots in the stash. More... | |
static const unsigned int | MAX_EQUIP_SLOTS = 10 |
Maximum number of materia slots in a weapon or armor. More... | |
static const unsigned int | MAX_ENEMY_SKILLS = 32 |
Maximum number of skills in an Enemy Skill materia. More... | |
static const unsigned int | MAX_LIMIT_LEVELS = 4 |
Maximum limit level. More... | |
static const unsigned int | MAX_LIMIT_TECHNIQUES = 4 |
Maximum limit techniques per level. More... | |
static const unsigned int | MAX_LIMIT_BAR = 254 |
Level at which the limit level is full. More... | |
static const unsigned int | MAX_PARTY_MEMBERS = 3 |
Maximum number of party member. More... | |
static const unsigned int | BANK_COUNT = 16 |
Number of data banks. More... | |
static const unsigned int | BANK_ADDRESS_COUNT = 256 |
Number of addresses in each data bank. More... | |
static const unsigned int | MAX_COLOUR = 254 |
MAx colour component value. More... | |
A savemap.
Savemap::Savemap | ( | ) |
Constructor.
Initializes an empty savemap.
Savemap::~Savemap | ( | ) |
Destructor.
int Savemap::GetCharacterAccessoryId | ( | const unsigned int | id | ) |
Retrieves the ID of the weapon of a character.
[in] | id | The character ID. |
unsigned int Savemap::GetCharacterArmorId | ( | const unsigned int | id | ) |
Retrieves the ID of the armor of a character.
[in] | id | The character ID. |
int Savemap::GetCharacterCharId | ( | const unsigned int | id | ) |
Retrieves the char ID of a character.
[in] | id | The character ID. |
unsigned int Savemap::GetCharacterExp | ( | const unsigned int | id | ) |
Retrieves the total experience of a character.
[in] | id | The character ID. |
unsigned int Savemap::GetCharacterExpToNext | ( | const unsigned int | id | ) |
Retrieves the experience for next level of a character.
[in] | id | The character ID. |
unsigned int Savemap::GetCharacterKills | ( | const unsigned int | id | ) |
Retrieves the total kills of a character.
[in] | id | The character ID. |
unsigned int Savemap::GetCharacterLevel | ( | const unsigned int | id | ) |
Retrieves the level of a character.
[in] | id | The character ID. |
unsigned int Savemap::GetCharacterLimitBar | ( | const unsigned int | id | ) |
Retrieves the current limit bar status level of a character.
[in] | id | The character ID. |
unsigned int Savemap::GetCharacterLimitLevel | ( | const unsigned int | id | ) |
Retrieves the current limit level of a character from a saved savemap.
[in] | id | The character ID. |
unsigned int Savemap::GetCharacterLimitUses | ( | const unsigned int | id, |
const unsigned int | level | ||
) |
Retrieves the uses of a character's limit level.
[in] | id | The character ID. |
[in] | level | The limit level. |
unsigned int Savemap::GetCharacterMateriaAp | ( | const unsigned int | id, |
const bool | weapon, | ||
const unsigned int | pos | ||
) |
Retrieves the AP of an equipped materia.
[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 Savemap::GetCharacterMateriaId | ( | const unsigned int | id, |
const bool | weapon, | ||
const unsigned int | pos | ||
) |
Retrieves the ID of an equipped materia.
[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 Savemap::GetCharacterName | ( | const unsigned int | id | ) |
Retrieves the name of a character.
[in] | id | The character ID. |
unsigned int Savemap::GetCharacterStatBase | ( | const unsigned int | id, |
const unsigned int | stat | ||
) |
Retrieves the base value of a stat of a character.
[in] | id | The character ID. |
[in] | stat | The stat ID (see { |
unsigned int Savemap::GetCharacterStatExtra | ( | const unsigned int | id, |
const unsigned int | stat | ||
) |
Retrieves the extra value of a stat of a character.
For HP and MP, the extra value means the current value. For any other stat, the bonus gained by using sources.
[in] | id | The character ID. |
[in] | stat | The stat ID (see { |
unsigned int Savemap::GetCharacterWeaponId | ( | const unsigned int | id | ) |
Retrieves the ID of the weapon of a character.
[in] | id | The character ID. |
std::string Savemap::GetControlKey | ( | ) |
Retrieves the control key .
std::string Savemap::GetControlKey | ( | ) | const |
Retrieves a control string for a savemap.
Not a checksum, it does not depend on the actual data. It never mutates, is used to differenciate savemaps when asking to override.
unsigned int Savemap::GetCountdownTime | ( | ) |
Retrieves the time in the timer.
int Savemap::GetData | ( | const unsigned int | bank, |
const unsigned int | address | ||
) |
Retrieves the value of a bank address.
[in] | bank | The bank ID. |
[in] | address | The address in the bank. |
unsigned int Savemap::GetGameTime | ( | ) |
Retrieves the total playtime.
[in] | slot | The slot to read from. |
unsigned int Savemap::GetItemAtPosId | ( | const unsigned int | pos | ) |
Retrieves the ID of an item in the inventory.
[in] | pos | Position in the inventory. |
unsigned int Savemap::GetItemAtPosQty | ( | const unsigned int | pos | ) |
Retrieves the quantity of an item in the inventory.
[in] | pos | Position in the inventory. |
bool Savemap::GetKeyItem | ( | const unsigned int | id | ) |
Checks if a key item is owned.
[in] | id | Key item ID. |
int Savemap::GetLocationAngle | ( | ) |
Retrieves the facing angle of the player.
[in] | slot | The slot to read from. |
std::string Savemap::GetLocationField | ( | ) |
Retrieves the field ID.
std::string Savemap::GetLocationName | ( | ) |
Retrieves the location name.
unsigned int Savemap::GetLocationTriangle | ( | ) |
Retrieves the walkmesh triangle of the player.
float Savemap::GetLocationX | ( | ) |
Retrieves the X coordinate of the player.
float Savemap::GetLocationY | ( | ) |
Retrieves the Y coordinate of the player.
float Savemap::GetLocationZ | ( | ) |
Retrieves the Z coordinate of the player.
unsigned int Savemap::GetMateriaAtPosAp | ( | const unsigned int | pos | ) |
Retrieves the AP of a materia in the inventory.
[in] | pos | Position in the materia inventory. |
int Savemap::GetMateriaAtPosId | ( | const unsigned int | pos | ) |
Retrieves the ID of a materia in the inventory.
[in] | pos | Position in the materia inventory. |
unsigned int Savemap::GetMoney | ( | ) |
Retrieves the money.
int Savemap::GetPartyMember | ( | const unsigned int | pos | ) |
Retrieves the ID of a party member.
[in] | pos | Position in the party. |
int Savemap::GetSetting | ( | const unsigned int | key | ) |
Retrieves a setting.
[in] | key | Setting key. |
unsigned int Savemap::GetStashAtPosAp | ( | const unsigned int | pos | ) |
Retrieves the AP of a materia in the stash.
[in] | pos | Position in the materia stash. |
int Savemap::GetStashAtPosId | ( | const unsigned int | pos | ) |
Retrieves the ID of a materia in the stash.
[in] | pos | Position in the materia stash. |
unsigned int Savemap::GetWindowCornerColourComponent | ( | const unsigned int | corner, |
const unsigned int | comp | ||
) |
Retrieves a colour component from a window corner.
[in] | corner | The window corner. See { |
[in] | comp | The color component to get. See { |
bool Savemap::IsCharacterBackRow | ( | const unsigned int | id | ) |
Checks the row of a character.
[in] | id | The character ID. |
bool Savemap::IsCharacterEnabled | ( | const unsigned int | id | ) |
Checks if a character is enabled.
[in] | id | The character ID. |
bool Savemap::IsCharacterLimitLearned | ( | const unsigned int | id, |
const unsigned int | level, | ||
const unsigned int | tech | ||
) |
Checks if a limit technique is learned by a character.
[in] | id | The character ID. |
[in] | level | The limit level. |
[in] | tech | The technique position in the level. |
bool Savemap::IsCharacterLocked | ( | const unsigned int | id | ) |
Checks if a character is locked in or out of the party.
[in] | id | The character ID. |
bool Savemap::IsCharacterMateriaESkill | ( | const unsigned int | id, |
const bool | weapon, | ||
const unsigned int | pos | ||
) |
Checks if an equipped materia is Enemy Skill.
[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 Savemap::IsCharacterMateriaESkillLearned | ( | 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.
[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 Savemap::IsEmpty | ( | ) |
Checks if the savemap is empty.
bool Savemap::IsMateriaAtPosESkill | ( | const unsigned int | pos | ) |
bool Savemap::IsMateriaAtPosESkillLearned | ( | const unsigned int | pos, |
const unsigned int | skill | ||
) |
Checks if a a enemy skill is learned by a materia in the inventory.
[in] | pos | Position in the materia inventory. |
[in] | skill | Skill ID, starting from 0. |
bool Savemap::IsStashAtPosESkill | ( | const unsigned int | pos | ) |
bool Savemap::IsStashAtPosESkillLearned | ( | const unsigned int | pos, |
const unsigned int | skill | ||
) |
Checks if a a enemy skill is learned by a materia in the stash.
[in] | pos | Position in the materia stash. |
[in] | skill | Skill ID, starting from 0. |
void Savemap::operator= | ( | const Savemap & | to_copy | ) |
Assignment operator.
Copies a savemap into another, including control data.
[in] | to_copy | The savemap to copy from. |
void Savemap::Read | ( | std::string | file_name | ) |
Reads the savemap data from a file.
[in] | file_name | The name of the file to read. |
void Savemap::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 savemap.
Calling this will make the materia to be an Enemy Skill materia and set the AP to 0. To delete it, call {
void Savemap::SetCharacterInfo | ( | const unsigned int | id, |
const int | char_id, | ||
const std::string | 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 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 Savemap::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 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 Savemap::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 savemap.
For Enemy Skill materia, don't use this, use {
void Savemap::SetCharacterStat | ( | const unsigned int | id, |
const unsigned int | stat, | ||
const unsigned int | base, | ||
const unsigned int | extra | ||
) |
Sets a character stat values in the 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 Savemap::SetCharacterStatus | ( | const unsigned int | id, |
const unsigned int | status, | ||
const bool | inflicted | ||
) |
Adds or removes a status to a character in the savemap.
[in] | id | Character ID. |
[in] | status | ID of the status. |
[in] | inflicted | True to add the status, false to remove it. |
void Savemap::SetControlKey | ( | const std::string | control | ) |
Sets the control string of the savemap.
[in] | control | The control string. |
void Savemap::SetCountdownTime | ( | const unsigned int | seconds | ) |
Sets the time of the curent timer.
[in] | seconds | The current countdown timer time, in seconds. |
void Savemap::SetData | ( | const unsigned int | bank, |
const unsigned int | address, | ||
const int | value | ||
) |
Sets data in a data bank.
[in] | bank | Data bank index. |
[in] | address | Address in the data bank. |
[in] | value | The value to store. |
void Savemap::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 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 {
void Savemap::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 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 {
void Savemap::SetGameTime | ( | const unsigned int | seconds | ) |
Sets the total playtime of the savemap.
[in] | seconds | The total playtime, in seconds. |
void Savemap::SetItem | ( | const unsigned int | slot, |
const unsigned int | id, | ||
const unsigned int | quantity | ||
) |
void Savemap::SetKeyItem | ( | const unsigned int | item, |
const bool | owned | ||
) |
Marks a key item as owned or non-owned in the savemap.
[in] | item | Key item id. |
[in] | owned | True to mark it as owned, false to mark is as non-owned. |
void Savemap::SetLocation | ( | const float | x, |
const float | y, | ||
const float | z, | ||
const unsigned int | triangle, | ||
const int | angle, | ||
std::string | field, | ||
std::string | name | ||
) |
Sets the current location in the savemap.
[in] | x | X coordinate. |
[in] | y | Y coordinate. |
[in] | z | Z coordinate. It's optional, set it to -1 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 Savemap::SetMateria | ( | const unsigned int | slot, |
const int | id, | ||
const unsigned int | ap | ||
) |
Sets a materia in a materia inventory slot in the savemap.
For Enemy Skill materia, don't use this, use {
void Savemap::SetMateriaStash | ( | const unsigned int | slot, |
const int | id, | ||
const unsigned int | ap | ||
) |
void Savemap::SetMoney | ( | const unsigned int | money | ) |
Sets the money of the savemap.
[in] | money | The current money. |
void Savemap::SetParty | ( | const int | member_1, |
const int | member_2, | ||
const int | member_3 | ||
) |
Sets the current party in the 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 Savemap::SetSetting | ( | const unsigned int | key, |
const unsigned int | value | ||
) |
Sets a setting value in the savemap.
[in] | key | Setting key. |
[in] | value | Setting value. |
void Savemap::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. |
void Savemap::Write | ( | int | slot, |
std::string | file_name | ||
) |
Writes the savemap to a file.
[in] | slot | The slot the savemap is to be written to. |
[in] | file_name | Name of the file the savemap is to be written to. |
|
staticprivate |
Number of addresses in each data bank.
|
staticprivate |
Number of data banks.
|
private |
List of characters.
|
private |
Control string.
Not a checksum, it does not depend on the actual data. It never mutates, is used to differenciate savemaps when asking to override.
|
private |
Current countdown remaining seconds.
|
private |
Memory banks.
|
private |
Indicates if the savemap is empty or contains actual data.
|
private |
Owned items.
|
private |
Owned key items.
|
private |
Current location.
|
private |
Owned materia.
|
private |
Alternative materia stash.
Used for the Yuffie materia event.
|
staticprivate |
Maximum number of characters.
|
staticprivate |
MAx colour component value.
|
staticprivate |
Maximum number of skills in an Enemy Skill materia.
|
staticprivate |
Maximum number of materia slots in a weapon or armor.
|
staticprivate |
Maximum number of inventory slots.
|
staticprivate |
Maximum number of inventory slots for key items.
|
staticprivate |
Level at which the limit level is full.
|
staticprivate |
Maximum limit level.
|
staticprivate |
Maximum limit techniques per level.
|
staticprivate |
Maximum number of materia slots.
|
staticprivate |
Maximum number of party member.
|
staticprivate |
Maximum number of materia slots in the stash.
|
private |
Current party money.
|
private |
IDs of characters in the party.
|
private |
Seconds played.
|
private |
Game settings.
|
private |
The slot the savemap is saved at, or -1 if not saved.
|
private |
Window colours.