V-Gears 0
Free Final Fantasy VII engine.
Savemap.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2022 The V-Gears Team
3 *
4 * This file is part of V-Gears
5 *
6 * V-Gears is free software: you can redistribute it and/or modify it under
7 * terms of the GNU General Public License as published by the Free Software
8 * Foundation, version 3.0 (GPLv3) of the License.
9 *
10 * V-Gears is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 */
15
16#pragma once
17
18#include <string>
19#include "common/TypeDefine.h"
20
24class Savemap{
25
26 public:
27
31 Savemap();
32
36 ~Savemap();
37
45 void operator = (const Savemap &to_copy);
46
52 void Read(std::string file_name);
53
60 void Write(int slot, std::string file_name);
61
68 std::string GetControlKey() const;
69
75 void SetControlKey(const std::string control);
76
94 const unsigned int t_l_r, const unsigned int t_l_g, const unsigned int t_l_b,
95 const unsigned int t_r_r, const unsigned int t_r_g, const unsigned int t_r_b,
96 const unsigned int b_r_r, const unsigned int b_r_g, const unsigned int b_r_b,
97 const unsigned int b_l_r, const unsigned int b_l_g, const unsigned int b_l_b
98 );
99
105 void SetMoney(const unsigned int money);
106
112 void SetGameTime(const unsigned int seconds);
113
119 void SetCountdownTime(const unsigned int seconds);
120
127 void SetKeyItem(const unsigned int item, const bool owned);
128
136 void SetParty(const int member_1, const int member_2, const int member_3);
137
145 void SetItem(const unsigned int slot, const unsigned int id, const unsigned int quantity);
146
156 void SetMateria(const unsigned int slot, const int id, const unsigned int ap);
157
168 void SetESkillMateria(const unsigned slot, const unsigned int skill, const bool learned);
169
179 void SetMateriaStash(const unsigned int slot, const int id, const unsigned int ap);
180
192 const unsigned slot, const unsigned int skill, const bool learned
193 );
194
206 void SetLocation(
207 const float x, const float y, const float z,
208 const unsigned int triangle, const int angle, std::string field, std::string name
209 );
210
218 void SetSetting(const unsigned int key, const unsigned int value);
219
239 void SetCharacterInfo(
240 const unsigned int id, const int char_id, const std::string name,
241 const bool enabled, const bool locked,
242 const unsigned int level, const unsigned int kills,
243 const bool back_row, const unsigned int exp, const unsigned int exp_to_next,
244 const unsigned int limit_level, const unsigned int limit_bar,
245 const unsigned int weapon, const unsigned int armor, const int accessory
246 );
247
257 void SetCharacterStat(
258 const unsigned int id, const unsigned int stat,
259 const unsigned int base, const unsigned int extra
260 );
261
272 const unsigned int id, const unsigned int level,
273 const unsigned int technique, const bool learned, const unsigned int uses
274 );
275
288 const unsigned int id, const bool weapon, const unsigned int slot,
289 const int materia, const unsigned int ap
290 );
291
306 const unsigned int id, const bool weapon, const unsigned int slot,
307 const unsigned int skill, const bool learned
308 );
309
318 const unsigned int id, const unsigned int status, const bool inflicted
319 );
320
328 void SetData(const unsigned int bank, const unsigned int address, const int value);
329
335 bool IsEmpty();
336
342 std::string GetControlKey();
343
353 const unsigned int corner, const unsigned int comp
354 );
355
361 unsigned int GetMoney();
362
369 unsigned int GetGameTime();
370
376 unsigned int GetCountdownTime();
377
385 int GetPartyMember(const unsigned int pos);
386
394 unsigned int GetItemAtPosId(const unsigned int pos);
395
403 unsigned int GetItemAtPosQty(const unsigned int pos);
404
411 bool GetKeyItem(const unsigned int id);
412
420 int GetMateriaAtPosId(const unsigned int pos);
421
429 unsigned int GetMateriaAtPosAp(const unsigned int pos);
430
439 bool IsMateriaAtPosESkill(const unsigned int pos);
440
449 bool IsMateriaAtPosESkillLearned(const unsigned int pos, const unsigned int skill);
450
458 int GetStashAtPosId(const unsigned int pos);
459
467 unsigned int GetStashAtPosAp(const unsigned int pos);
468
477 bool IsStashAtPosESkill(const unsigned int pos);
478
487 bool IsStashAtPosESkillLearned(const unsigned int pos, const unsigned int skill);
488
494 float GetLocationX();
495
501 float GetLocationY();
502
508 float GetLocationZ();
509
515 unsigned int GetLocationTriangle();
516
523 int GetLocationAngle();
524
530 std::string GetLocationField();
531
538 std::string GetLocationName();
539
547 int GetSetting(const unsigned int key);
548
556 int GetCharacterCharId(const unsigned int id);
557
564 std::string GetCharacterName(const unsigned int id);
565
572 unsigned int GetCharacterLevel(const unsigned int id);
573
580 unsigned int GetCharacterKills(const unsigned int id);
581
589 bool IsCharacterEnabled(const unsigned int id);
590
598 bool IsCharacterLocked(const unsigned int id);
599
607 bool IsCharacterBackRow(const unsigned int id);
608
615 unsigned int GetCharacterExp(const unsigned int id);
616
623 unsigned int GetCharacterExpToNext(const unsigned int id);
624
631 unsigned int GetCharacterLimitLevel(const unsigned int id);
632
639 unsigned int GetCharacterLimitBar(const unsigned int id);
640
647 unsigned int GetCharacterWeaponId(const unsigned int id);
648
655 unsigned int GetCharacterArmorId(const unsigned int id);
656
664 int GetCharacterAccessoryId(const unsigned int id);
665
673 unsigned int GetCharacterStatBase(const unsigned int id, const unsigned int stat);
674
685 unsigned int GetCharacterStatExtra(const unsigned int id, const unsigned int stat);
686
695 unsigned int GetCharacterLimitUses(const unsigned int id, const unsigned int level);
696
707 const unsigned int id, const unsigned int level, const unsigned int tech
708 );
709
720 int GetCharacterMateriaId(const unsigned int id, const bool weapon, const unsigned int pos);
721
732 unsigned int GetCharacterMateriaAp(
733 const unsigned int id, const bool weapon, const unsigned int pos
734 );
735
747 bool IsCharacterMateriaESkill(const unsigned int id, const bool weapon, const unsigned int pos);
748
761 const unsigned int id, const bool weapon, const unsigned int pos, const unsigned int skill
762 );
763
771 int GetData(const unsigned int bank, const unsigned int address);
772
776 class STAT{
777
778 public:
779
783 static const unsigned int STR = 0;
784
788 static const unsigned int VIT = 1;
789
793 static const unsigned int MAG = 2;
794
798 static const unsigned int SPR = 3;
799
803 static const unsigned int DEX = 4;
804
808 static const unsigned int LCK = 5;
809
813 static const unsigned int HP = 6;
814
818 static const unsigned int MP = 7;
819 };
820
824 class CORNER{
825
826 public:
827
831 static const unsigned int T_L = 0;
832
836 static const unsigned int T_R = 1;
837
841 static const unsigned int B_R = 2;
842
846 static const unsigned int B_L = 3;
847 };
848
852 class COLOUR{
853
854 public:
855
859 static const unsigned int R = 0;
860
864 static const unsigned int G = 1;
865
869 static const unsigned int B = 2;
870 };
871
872 private:
873
877 static const unsigned int MAX_CHARACTERS = 11;
878
882 static const unsigned int MAX_ITEM_SLOTS = 500;
883
887 static const unsigned int MAX_KEY_ITEM_SLOTS = 100;
888
892 static const unsigned int MAX_MATERIA_SLOTS = 500;
893
897 static const unsigned int MAX_STASH_SLOTS = 500;
898
902 static const unsigned int MAX_EQUIP_SLOTS = 10;
903
907 static const unsigned int MAX_ENEMY_SKILLS = 32;
908
912 static const unsigned int MAX_LIMIT_LEVELS = 4;
913
917 static const unsigned int MAX_LIMIT_TECHNIQUES = 4;
918
922 static const unsigned int MAX_LIMIT_BAR = 254;
923
927 static const unsigned int MAX_PARTY_MEMBERS = 3;
928
932 static const unsigned int BANK_COUNT = 16;
933
937 static const unsigned int BANK_ADDRESS_COUNT = 256;
938
942 static const unsigned int MAX_COLOUR = 254;
943
944
948 struct Settings{
949
953 enum class MagicOrder{
954
958 RAI,
959
963 RIA,
964
968 AIR,
969
973 ARI,
974
978 IRA,
979
983 IAR,
984 };
985
989 enum class AtbMode{
990
994 ACTIVE,
995
999 RECOMMENDED,
1000
1004 WAIT
1005 };
1006
1010 unsigned int battle_speed;
1011
1015 unsigned int battle_msg_speed;
1016
1020 unsigned int msg_speed;
1021
1026
1031
1036
1037 // TODO: Key mappings, when implemented.
1038 };
1039
1045 struct Location{
1046
1050 float x;
1051
1055 float y;
1056
1062 float z;
1063
1067 unsigned int triangle;
1068
1072 unsigned int angle;
1073
1079 std::string field;
1080
1084 std::string name;
1085 };
1086
1090 struct Materia{
1091
1095 int id;
1096
1100 unsigned int ap;
1101
1106
1111 };
1112
1116 struct Item{
1117
1121 int id;
1122
1126 unsigned int quantity;
1127 };
1128
1133
1137 struct Stat{
1138
1142 unsigned int base;
1143
1148 unsigned int extra;
1149 };
1150
1155
1160
1165 };
1166
1170 unsigned int id;
1171
1176
1181
1186
1190 std::string name;
1191
1195 unsigned int level;
1196
1200 unsigned int kills;
1201
1206
1210 unsigned int exp;
1211
1215 unsigned int exp_to_next;
1216
1221
1226
1231
1236
1241
1246
1251
1256
1260 unsigned int limit_level;
1261
1265 unsigned int limit_bar;
1266
1273
1278
1283
1288
1293
1297 std::vector<u8> status;
1298 };
1299
1304
1309
1316 std::string control_;
1317
1322
1327
1332
1337
1342
1347
1354
1358 unsigned int money_;
1359
1363 unsigned int seconds_;
1364
1368 unsigned int countdown_;
1369
1374
1379
1384};
1385
1386
1387
1388
@ WAIT
Definition: FieldDisassembler.h:57
Ogre::uint16 u16
Definition: TypeDefine.h:22
Ogre::uint8 u8
Definition: TypeDefine.h:21
Colour codes.
Definition: Savemap.h:852
static const unsigned int G
Green colour.
Definition: Savemap.h:864
static const unsigned int R
Red colour.
Definition: Savemap.h:859
static const unsigned int B
Blue colour.
Definition: Savemap.h:869
Window corners.
Definition: Savemap.h:824
static const unsigned int B_L
Bottom left window corner.
Definition: Savemap.h:846
static const unsigned int T_R
Top right window corner.
Definition: Savemap.h:836
static const unsigned int T_L
Top left window corner.
Definition: Savemap.h:831
static const unsigned int B_R
Bottom right window corner.
Definition: Savemap.h:841
Character basic stats.
Definition: Savemap.h:776
static const unsigned int MAG
Magic stat.
Definition: Savemap.h:793
static const unsigned int MP
MP stat.
Definition: Savemap.h:818
static const unsigned int LCK
Luck stat.
Definition: Savemap.h:808
static const unsigned int DEX
Dexterity stat.
Definition: Savemap.h:803
static const unsigned int STR
Strength stat.
Definition: Savemap.h:783
static const unsigned int HP
HP stat.
Definition: Savemap.h:813
static const unsigned int VIT
Vtatlity stat.
Definition: Savemap.h:788
static const unsigned int SPR
Spirit stat.
Definition: Savemap.h:798
A savemap.
Definition: Savemap.h:24
std::string GetLocationName()
Retrieves the location name.
Definition: Savemap.cpp:471
unsigned int GetCharacterKills(const unsigned int id)
Retrieves the total kills of a character.
Definition: Savemap.cpp:493
Settings settings_
Game settings.
Definition: Savemap.h:1378
unsigned int GetCharacterExpToNext(const unsigned int id)
Retrieves the experience for next level of a character.
Definition: Savemap.cpp:518
void SetGameTime(const unsigned int seconds)
Sets the total playtime of the savemap.
Definition: Savemap.cpp:167
Materia materia_stash_[MAX_STASH_SLOTS]
Alternative materia stash.
Definition: Savemap.h:1353
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.
Definition: Savemap.cpp:143
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.
Definition: Savemap.cpp:635
int GetCharacterMateriaId(const unsigned int id, const bool weapon, const unsigned int pos)
Retrieves the ID of an equipped materia.
Definition: Savemap.cpp:594
bool IsEmpty()
Checks if the savemap is empty.
Definition: Savemap.cpp:369
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.
Definition: Savemap.cpp:245
static const unsigned int MAX_LIMIT_TECHNIQUES
Maximum limit techniques per level.
Definition: Savemap.h:917
int GetSetting(const unsigned int key)
Retrieves a setting.
Definition: Savemap.cpp:473
int data_[BANK_COUNT][BANK_ADDRESS_COUNT]
Memory banks.
Definition: Savemap.h:1383
unsigned int GetCharacterExp(const unsigned int id)
Retrieves the total experience of a character.
Definition: Savemap.cpp:513
std::string GetControlKey() const
Retrieves a control string for a savemap.
Definition: Savemap.cpp:163
unsigned int GetCountdownTime()
Retrieves the time in the timer.
Definition: Savemap.cpp:384
Item items_[MAX_ITEM_SLOTS]
Owned items.
Definition: Savemap.h:1336
bool IsStashAtPosESkill(const unsigned int pos)
Checks if there is an Enemy Skill materia at a stash position.
Definition: Savemap.cpp:445
void SetMateriaStash(const unsigned int slot, const int id, const unsigned int ap)
Sets a materia in a materia inventory slot in the savemap.
Definition: Savemap.cpp:206
bool IsStashAtPosESkillLearned(const unsigned int pos, const unsigned int skill)
Checks if a a enemy skill is learned by a materia in the stash.
Definition: Savemap.cpp:451
void Write(int slot, std::string file_name)
Writes the savemap to a file.
Definition: Savemap.cpp:659
std::string GetLocationField()
Retrieves the field ID.
Definition: Savemap.cpp:469
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.
Definition: Savemap.cpp:197
unsigned int GetItemAtPosId(const unsigned int pos)
Retrieves the ID of an item in the inventory.
Definition: Savemap.cpp:391
unsigned int money_
Current party money.
Definition: Savemap.h:1358
unsigned int GetCharacterLimitLevel(const unsigned int id)
Retrieves the current limit level of a character from a saved savemap.
Definition: Savemap.cpp:523
Location location_
Current location.
Definition: Savemap.h:1373
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.
Definition: Savemap.cpp:272
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.
Definition: Savemap.cpp:216
void operator=(const Savemap &to_copy)
Assignment operator.
Definition: Savemap.cpp:122
unsigned int GetCharacterArmorId(const unsigned int id)
Retrieves the ID of the armor of a character.
Definition: Savemap.cpp:538
int slot_
The slot the savemap is saved at, or -1 if not saved.
Definition: Savemap.h:1308
bool IsCharacterEnabled(const unsigned int id)
Checks if a character is enabled.
Definition: Savemap.cpp:498
unsigned int GetWindowCornerColourComponent(const unsigned int corner, const unsigned int comp)
Retrieves a colour component from a window corner.
Definition: Savemap.cpp:373
void SetMateria(const unsigned int slot, const int id, const unsigned int ap)
Sets a materia in a materia inventory slot in the savemap.
Definition: Savemap.cpp:188
void SetCharacterStatus(const unsigned int id, const unsigned int status, const bool inflicted)
Adds or removes a status to a character in the savemap.
Definition: Savemap.cpp:363
u8 window_colours_[4][3]
Window colours.
Definition: Savemap.h:1321
static const unsigned int BANK_COUNT
Number of data banks.
Definition: Savemap.h:932
static const unsigned int MAX_KEY_ITEM_SLOTS
Maximum number of inventory slots for key items.
Definition: Savemap.h:887
int GetMateriaAtPosId(const unsigned int pos)
Retrieves the ID of a materia in the inventory.
Definition: Savemap.cpp:407
static const unsigned int MAX_MATERIA_SLOTS
Maximum number of materia slots.
Definition: Savemap.h:892
unsigned int GetStashAtPosAp(const unsigned int pos)
Retrieves the AP of a materia in the stash.
Definition: Savemap.cpp:438
float GetLocationY()
Retrieves the Y coordinate of the player.
Definition: Savemap.cpp:461
bool empty_
Indicates if the savemap is empty or contains actual data.
Definition: Savemap.h:1303
unsigned int GetCharacterMateriaAp(const unsigned int id, const bool weapon, const unsigned int pos)
Retrieves the AP of an equipped materia.
Definition: Savemap.cpp:603
static const unsigned int MAX_LIMIT_BAR
Level at which the limit level is full.
Definition: Savemap.h:922
float GetLocationZ()
Retrieves the Z coordinate of the player.
Definition: Savemap.cpp:463
void SetCountdownTime(const unsigned int seconds)
Sets the time of the curent timer.
Definition: Savemap.cpp:169
int GetStashAtPosId(const unsigned int pos)
Retrieves the ID of a materia in the stash.
Definition: Savemap.cpp:433
static const unsigned int MAX_LIMIT_LEVELS
Maximum limit level.
Definition: Savemap.h:912
static const unsigned int BANK_ADDRESS_COUNT
Number of addresses in each data bank.
Definition: Savemap.h:937
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.
Definition: Savemap.cpp:311
static const unsigned int MAX_STASH_SLOTS
Maximum number of materia slots in the stash.
Definition: Savemap.h:897
Materia materia_[MAX_MATERIA_SLOTS]
Owned materia.
Definition: Savemap.h:1346
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.
Definition: Savemap.cpp:321
unsigned int GetCharacterStatExtra(const unsigned int id, const unsigned int stat)
Retrieves the extra value of a stat of a character.
Definition: Savemap.cpp:563
int GetLocationAngle()
Retrieves the facing angle of the player.
Definition: Savemap.cpp:467
unsigned int GetLocationTriangle()
Retrieves the walkmesh triangle of the player.
Definition: Savemap.cpp:465
void Read(std::string file_name)
Reads the savemap data from a file.
Definition: Savemap.cpp:1000
bool IsMateriaAtPosESkill(const unsigned int pos)
Checks if there is an Enemy Skill materia at a inventory position.
Definition: Savemap.cpp:419
std::string control_
Control string.
Definition: Savemap.h:1316
static const unsigned int MAX_ENEMY_SKILLS
Maximum number of skills in an Enemy Skill materia.
Definition: Savemap.h:907
void SetItem(const unsigned int slot, const unsigned int id, const unsigned int quantity)
Sets an item in a inventory slot in the savemap.
Definition: Savemap.cpp:181
void SetData(const unsigned int bank, const unsigned int address, const int value)
Sets data in a data bank.
Definition: Savemap.cpp:134
bool IsCharacterLimitLearned(const unsigned int id, const unsigned int level, const unsigned int tech)
Checks if a limit technique is learned by a character.
Definition: Savemap.cpp:584
int GetCharacterCharId(const unsigned int id)
Retrieves the char ID of a character.
Definition: Savemap.cpp:478
void SetControlKey(const std::string control)
Sets the control string of the savemap.
Definition: Savemap.cpp:138
void SetMoney(const unsigned int money)
Sets the money of the savemap.
Definition: Savemap.cpp:165
static const unsigned int MAX_CHARACTERS
Maximum number of characters.
Definition: Savemap.h:877
unsigned int GetCharacterLevel(const unsigned int id)
Retrieves the level of a character.
Definition: Savemap.cpp:488
bool GetKeyItem(const unsigned int id)
Checks if a key item is owned.
Definition: Savemap.cpp:402
unsigned int GetItemAtPosQty(const unsigned int pos)
Retrieves the quantity of an item in the inventory.
Definition: Savemap.cpp:397
bool key_items_[MAX_KEY_ITEM_SLOTS]
Owned key items.
Definition: Savemap.h:1341
unsigned int GetCharacterLimitUses(const unsigned int id, const unsigned int level)
Retrieves the uses of a character's limit level.
Definition: Savemap.cpp:578
Character characters_[MAX_CHARACTERS]
List of characters.
Definition: Savemap.h:1326
static const unsigned int MAX_PARTY_MEMBERS
Maximum number of party member.
Definition: Savemap.h:927
std::string GetCharacterName(const unsigned int id)
Retrieves the name of a character.
Definition: Savemap.cpp:483
static const unsigned int MAX_ITEM_SLOTS
Maximum number of inventory slots.
Definition: Savemap.h:882
static const unsigned int MAX_EQUIP_SLOTS
Maximum number of materia slots in a weapon or armor.
Definition: Savemap.h:902
float GetLocationX()
Retrieves the X coordinate of the player.
Definition: Savemap.cpp:459
unsigned int GetMateriaAtPosAp(const unsigned int pos)
Retrieves the AP of a materia in the inventory.
Definition: Savemap.cpp:412
bool IsMateriaAtPosESkillLearned(const unsigned int pos, const unsigned int skill)
Checks if a a enemy skill is learned by a materia in the inventory.
Definition: Savemap.cpp:425
unsigned int seconds_
Seconds played.
Definition: Savemap.h:1363
Savemap()
Constructor.
Definition: Savemap.cpp:25
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.
Definition: Savemap.cpp:343
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.
Definition: Savemap.cpp:227
unsigned int GetCharacterStatBase(const unsigned int id, const unsigned int stat)
Retrieves the base value of a stat of a character.
Definition: Savemap.cpp:548
int GetData(const unsigned int bank, const unsigned int address)
Retrieves the value of a bank address.
Definition: Savemap.cpp:653
unsigned int GetMoney()
Retrieves the money.
Definition: Savemap.cpp:380
bool IsCharacterMateriaESkill(const unsigned int id, const bool weapon, const unsigned int pos)
Checks if an equipped materia is Enemy Skill.
Definition: Savemap.cpp:620
int GetCharacterAccessoryId(const unsigned int id)
Retrieves the ID of the weapon of a character.
Definition: Savemap.cpp:543
int GetPartyMember(const unsigned int pos)
Retrieves the ID of a party member.
Definition: Savemap.cpp:386
bool IsCharacterBackRow(const unsigned int id)
Checks the row of a character.
Definition: Savemap.cpp:508
void SetParty(const int member_1, const int member_2, const int member_3)
Sets the current party in the savemap.
Definition: Savemap.cpp:175
void SetSetting(const unsigned int key, const unsigned int value)
Sets a setting value in the savemap.
Definition: Savemap.cpp:241
unsigned int GetGameTime()
Retrieves the total playtime.
Definition: Savemap.cpp:382
unsigned int countdown_
Current countdown remaining seconds.
Definition: Savemap.h:1368
unsigned int GetCharacterLimitBar(const unsigned int id)
Retrieves the current limit bar status level of a character.
Definition: Savemap.cpp:528
void SetKeyItem(const unsigned int item, const bool owned)
Marks a key item as owned or non-owned in the savemap.
Definition: Savemap.cpp:171
int party_[MAX_PARTY_MEMBERS]
IDs of characters in the party.
Definition: Savemap.h:1331
bool IsCharacterLocked(const unsigned int id)
Checks if a character is locked in or out of the party.
Definition: Savemap.cpp:503
~Savemap()
Destructor.
Definition: Savemap.cpp:120
static const unsigned int MAX_COLOUR
MAx colour component value.
Definition: Savemap.h:942
unsigned int GetCharacterWeaponId(const unsigned int id)
Retrieves the ID of the weapon of a character.
Definition: Savemap.cpp:533
A weapon or armor.
Definition: Savemap.h:1154
u16 id
Item ID of the weapon or armor.
Definition: Savemap.h:1159
Materia materia[MAX_EQUIP_SLOTS]
Materia in the weapon/armor.
Definition: Savemap.h:1164
A character stat.
Definition: Savemap.h:1137
unsigned int extra
For STR, VIT, DEX and LCK, it means the source bonus.
Definition: Savemap.h:1148
unsigned int base
Stat base value.
Definition: Savemap.h:1142
A character entri in the savemap.
Definition: Savemap.h:1132
Stat mag
MAG stat.
Definition: Savemap.h:1230
unsigned int limit_uses[MAX_LIMIT_LEVELS]
Uses of techniques in each limit level.
Definition: Savemap.h:1277
Stat lck
LCK stat.
Definition: Savemap.h:1245
std::vector< u8 > status
Current status list.
Definition: Savemap.h:1297
int accessory
Equipped accessory ID.
Definition: Savemap.h:1292
unsigned int id
Character ID, sequential.
Definition: Savemap.h:1170
unsigned int limit_level
Current limit level.
Definition: Savemap.h:1260
std::string name
Character name.
Definition: Savemap.h:1190
Stat str
STR stat.
Definition: Savemap.h:1220
Equipment weapon
Equipped weapon;.
Definition: Savemap.h:1282
Stat spr
SPR stat.
Definition: Savemap.h:1235
unsigned int limit_bar
Current limit bar.
Definition: Savemap.h:1265
unsigned int exp_to_next
Experience required to reach next level.
Definition: Savemap.h:1215
Stat mp
MP stat.
Definition: Savemap.h:1255
bool back_row
Indicates if the character is in the back_row;.
Definition: Savemap.h:1205
bool enabled
Indicates if the character has been unlocked for the PHS.
Definition: Savemap.h:1180
unsigned int level
Character level.
Definition: Savemap.h:1195
Stat hp
HP stat.
Definition: Savemap.h:1250
Equipment armor
Equipped weapon;.
Definition: Savemap.h:1287
bool limits_learned[MAX_LIMIT_LEVELS][MAX_LIMIT_TECHNIQUES]
Learned limits.
Definition: Savemap.h:1272
unsigned int exp
Total experience.
Definition: Savemap.h:1210
int char_id
Character ID, can change with the history.
Definition: Savemap.h:1175
bool locked
Indicates if the character is locked in or out of the PHS.
Definition: Savemap.h:1185
unsigned int kills
Enemies killed by the character.
Definition: Savemap.h:1200
Stat dex
DEX stat.
Definition: Savemap.h:1240
Stat vit
VIT stat.
Definition: Savemap.h:1225
Item structure.
Definition: Savemap.h:1116
unsigned int quantity
Item stock.
Definition: Savemap.h:1126
int id
Item ID.
Definition: Savemap.h:1121
Location information.
Definition: Savemap.h:1045
float z
Z coordinate.
Definition: Savemap.h:1062
std::string field
Current field map.
Definition: Savemap.h:1079
std::string name
Location name.
Definition: Savemap.h:1084
float x
X coordinate.
Definition: Savemap.h:1050
float y
Y coordinate.
Definition: Savemap.h:1055
unsigned int angle
Facing direction.
Definition: Savemap.h:1072
unsigned int triangle
Triangle in the walkmesh;.
Definition: Savemap.h:1067
A materia structure.
Definition: Savemap.h:1090
int id
Materia ID.
Definition: Savemap.h:1095
bool enemy_skill_learned[MAX_ENEMY_SKILLS]
Learned enemy skills (only for Enemy Skill materia).
Definition: Savemap.h:1110
unsigned int ap
Total AP in the materia.
Definition: Savemap.h:1100
bool enemy_skill
Indicates if the materia is an enemy skill materia.
Definition: Savemap.h:1105
Game settings.
Definition: Savemap.h:948
AtbMode
ATB modes.
Definition: Savemap.h:989
unsigned int battle_msg_speed
Battle message speed.
Definition: Savemap.h:1015
unsigned int battle_speed
Battle speed.
Definition: Savemap.h:1010
unsigned int msg_speed
Field message speed.
Definition: Savemap.h:1020
MagicOrder
Magic sorting methods.
Definition: Savemap.h:953
bool batle_help
Indicates if the battle help window is to be shown.
Definition: Savemap.h:1035
AtbMode atb_mode
ATB mode.
Definition: Savemap.h:1030
MagicOrder order
Magic order.
Definition: Savemap.h:1025