#include <SaveSlot.hh>
Definition at line 38 of file SaveSlot.hh.
Public Member Functions | |
SaveSlot (const char *data) | |
Constructor for a SaveSlot. | |
~SaveSlot () | |
Destructor for a SaveSlot. | |
std::pair< int, int > | getBalloonLocation () const |
Gets the location of the Balloon. | |
void | setBalloonLocation (std::pair< int, int > location) |
Sets the baloon's location. | |
wxInt16 | getCurrentHP (enum Character character) const |
Gets the current HP of a character. | |
void | setCurrentHP (enum Character character, wxInt16 value) |
Sets the current HP of a character. | |
int | getCurrentMP (enum Character character) const |
Gets the current MP of a character. | |
void | setCurrentMP (enum Character character, unsigned char value) |
Sets the current MP of a character. | |
int | getDexterity (enum Character character) const |
Gets the dexterity of a character. | |
void | setDexterity (enum Character character, unsigned char value) |
Sets the dexterity of a character. | |
int | getEquipment (enum Character character, int slot) const |
Gets the item held by a particular player in a particular slot. | |
void | setEquipment (enum Character character, int slot, unsigned char value) |
Sets the item held by a particular player in a particular slot. | |
wxInt16 | getExperience (enum Character character) const |
Gets the experience of a character. | |
void | setExperience (enum Character character, wxInt16 value) |
Sets the experience of a character. | |
wxInt16 | getGold () const |
Gets the amount of gold held by the party. | |
void | setGold (wxInt16 gold) |
Sets the amount of gold held by the party. | |
int | getHerb (enum Herb herb) const |
Gets the current amount of a particular herb the party has. | |
void | setHerb (enum Herb herb, unsigned char value) |
Sets the amount of a particular herb the party has. | |
wxString | getHerosName () const |
Gets the Hero's Name. | |
void | setHerosName (const wxString &name) |
Sets the Hero's Name. | |
int | getIntelligence (enum Character character) const |
Gets the intelligence of a character. | |
void | setIntelligence (enum Character character, unsigned char value) |
Sets the intelligence of a character. | |
bool | hasJoined (enum Character character) const |
Checks if a character has joined the party or not. | |
void | setJoined (enum Character character, bool value) |
Sets whether a character has joined the party or not. | |
int | getLevel (enum Character character) const |
Gets the level of a character. | |
void | setLevel (enum Character character, unsigned char value) |
Sets the level of a character. | |
bool | hasMagic (enum Magic magic) const |
Queries whether the party has a particular magic or not. | |
void | setMagic (enum Magic magic, bool give=true) |
Sets whether the party has a particular magic of not. | |
wxInt16 | getMaxHP (enum Character character) const |
Gets the max HP of a character. | |
void | setMaxHP (enum Character character, wxInt16 value) |
Sets the max HP of a character. | |
int | getMaxMP (enum Character character) const |
Gets the max MP of a character. | |
void | setMaxMP (enum Character character, unsigned char value) |
Sets the max MP of a charcter. | |
int | getMember (int position) const |
Gets the party member at a given position. | |
void | setMember (int position, int character) |
Sets the party member at a given position. | |
bool | isModified () const |
Queries if this SaveSlot has been modified. | |
int | getPhase (enum Moon moon) const |
Gets the current phase of one of the moons. | |
void | setPhase (enum City trammel, int felucca) |
Sets the phases of the moons. | |
bool | hasPirateShip (enum PirateShip ship) const |
Checks if the party has captured a particular ship. | |
void | setPirateShip (enum PirateShip ship, bool give) |
Sets whether the party has a particular pirate ship or not. | |
std::pair< int, int > | getPirateShipLocation (enum PirateShip ship) const |
Gets the location of one of the captured pirate ships. | |
void | setPirateShipLocation (enum PirateShip ship, std::pair< int, int > location) |
Sets the location of a captured pirate ship. | |
bool | hasRune (enum Virtue rune) const |
Queries whether the party has a particular rune or not. | |
void | setRune (enum Virtue rune, bool give=true) |
Sets whether the party has a particular rune of not. | |
enum StartLocation | getStartLocation () const |
Gets the start location. | |
void | setStartLocation (enum StartLocation location) |
Sets the start location. | |
bool | hasStone (enum Virtue stone) const |
Queries if the party has a particular stone in their inventory. | |
void | setStone (enum Virtue stone, bool give=true) |
Sets whether the party has a particular stone or not. | |
int | getStrength (enum Character character) const |
Gets the strength of a character. | |
void | setStrength (enum Character character, unsigned char value) |
Sets the strength of a charater. | |
int | getTool (enum Tool tool) const |
Gets the amount of a tool the party has. | |
void | setTool (enum Tool tool, unsigned char value=1) |
Sets the amount of a tool the party has. | |
int | getVirtue (enum Virtue virtue) const |
Gets the value for one of the eight virtues. | |
void | setVirtue (enum Virtue virtue, unsigned char value) |
Sets the value for one of the eight virtues. | |
std::pair< int, int > | getWhirlpoolLocation () const |
Gets the location of the whirlpool. | |
void | setWhirlpoolLocation (std::pair< int, int > location) |
Sets the location of the whirlpool. | |
unsigned char | checksum () const |
Generates the checksum for the current data. | |
Private Member Functions | |
void | setModified (bool modified=true) |
Sets whether this slot is modified or not. | |
Static Private Member Functions | |
static char | fromNES (unsigned char letter) |
Translates an Ultima alphabet character to ASCII. | |
static unsigned char | toNES (char letter) |
Translates an ASCII character to the Ultima alphabet. | |
Private Attributes | |
unsigned char * | nvram |
bool | modified |
Static Private Attributes | |
static const int | CHECKSUM_XORS [] |
Array of checksum xors used by the sanity algorithm. | |
Friends | |
void | SRAMFile::save (const wxString &) |
|
Constructor for a SaveSlot.
Definition at line 63 of file SaveSlot.cc. |
|
Destructor for a SaveSlot.
Definition at line 70 of file SaveSlot.cc. |
|
Generates the checksum for the current data.
Definition at line 503 of file SaveSlot.cc. |
|
Translates an Ultima alphabet character to ASCII.
Definition at line 461 of file SaveSlot.cc. |
|
Gets the location of the Balloon.
Definition at line 74 of file SaveSlot.cc. |
|
Gets the current HP of a character.
Definition at line 86 of file SaveSlot.cc. |
|
Gets the current MP of a character.
Definition at line 101 of file SaveSlot.cc. |
|
Gets the dexterity of a character.
Definition at line 110 of file SaveSlot.cc. |
|
Gets the item held by a particular player in a particular slot.
Definition at line 119 of file SaveSlot.cc. |
|
Gets the experience of a character.
Definition at line 129 of file SaveSlot.cc. |
|
Gets the amount of gold held by the party.
Definition at line 144 of file SaveSlot.cc. |
|
Gets the current amount of a particular herb the party has.
Definition at line 157 of file SaveSlot.cc. |
|
Gets the Hero's Name.
Definition at line 166 of file SaveSlot.cc. |
|
Gets the intelligence of a character.
Definition at line 196 of file SaveSlot.cc. |
|
Gets the level of a character.
Definition at line 221 of file SaveSlot.cc. |
|
Gets the max HP of a character.
Definition at line 265 of file SaveSlot.cc. |
|
Gets the max MP of a character.
Definition at line 280 of file SaveSlot.cc. |
|
Gets the party member at a given position.
Definition at line 289 of file SaveSlot.cc. |
|
Gets the current phase of one of the moons. Valid values are either TRAMMEL or FELUCCA.
Definition at line 306 of file SaveSlot.cc. |
|
Gets the location of one of the captured pirate ships.
Definition at line 340 of file SaveSlot.cc. |
|
Gets the start location.
Definition at line 372 of file SaveSlot.cc. |
|
Gets the strength of a character.
Definition at line 399 of file SaveSlot.cc. |
|
Gets the amount of a tool the party has.
Definition at line 408 of file SaveSlot.cc. |
|
Gets the value for one of the eight virtues.
Definition at line 444 of file SaveSlot.cc. |
|
Gets the location of the whirlpool.
Definition at line 491 of file SaveSlot.cc. |
|
Checks if a character has joined the party or not.
Definition at line 205 of file SaveSlot.cc. |
|
Queries whether the party has a particular magic or not.
Definition at line 230 of file SaveSlot.cc. |
|
Checks if the party has captured a particular ship.
Definition at line 323 of file SaveSlot.cc. |
|
Queries whether the party has a particular rune or not.
Definition at line 354 of file SaveSlot.cc. |
|
Queries if the party has a particular stone in their inventory.
Definition at line 381 of file SaveSlot.cc. |
|
Queries if this SaveSlot has been modified.
Definition at line 543 of file SaveSlot.hh. |
|
Sets the baloon's location.
Definition at line 79 of file SaveSlot.cc. |
|
Sets the current HP of a character.
Definition at line 93 of file SaveSlot.cc. |
|
Sets the current MP of a character.
Definition at line 105 of file SaveSlot.cc. |
|
Sets the dexterity of a character.
Definition at line 114 of file SaveSlot.cc. |
|
Sets the item held by a particular player in a particular slot.
Definition at line 123 of file SaveSlot.cc. |
|
Sets the experience of a character.
Definition at line 136 of file SaveSlot.cc. |
|
Sets the amount of gold held by the party.
Definition at line 150 of file SaveSlot.cc. |
|
Sets the amount of a particular herb the party has.
Definition at line 161 of file SaveSlot.cc. |
|
Sets the Hero's Name.
Definition at line 181 of file SaveSlot.cc. |
|
Sets the intelligence of a character.
Definition at line 200 of file SaveSlot.cc. |
|
Sets whether a character has joined the party or not.
Definition at line 209 of file SaveSlot.cc. |
|
Sets the level of a character.
Definition at line 225 of file SaveSlot.cc. |
|
Sets whether the party has a particular magic of not.
Definition at line 242 of file SaveSlot.cc. |
|
Sets the max HP of a character.
Definition at line 272 of file SaveSlot.cc. |
|
Sets the max MP of a charcter.
Definition at line 284 of file SaveSlot.cc. |
|
Sets the party member at a given position.
Definition at line 293 of file SaveSlot.cc. |
|
Sets whether this slot is modified or not.
Definition at line 298 of file SaveSlot.cc. |
|
Sets the phases of the moons.
Definition at line 316 of file SaveSlot.cc. |
|
Sets whether the party has a particular pirate ship or not.
Definition at line 327 of file SaveSlot.cc. |
|
Sets the location of a captured pirate ship.
Definition at line 346 of file SaveSlot.cc. |
|
Sets whether the party has a particular rune of not.
Definition at line 358 of file SaveSlot.cc. |
|
Sets the start location.
Definition at line 376 of file SaveSlot.cc. |
|
Sets whether the party has a particular stone or not.
Definition at line 385 of file SaveSlot.cc. |
|
Sets the strength of a charater.
Definition at line 403 of file SaveSlot.cc. |
|
Sets the amount of a tool the party has.
Definition at line 412 of file SaveSlot.cc. |
|
Sets the value for one of the eight virtues.
Definition at line 448 of file SaveSlot.cc. |
|
Sets the location of the whirlpool.
Definition at line 496 of file SaveSlot.cc. |
|
Translates an ASCII character to the Ultima alphabet.
Definition at line 476 of file SaveSlot.cc. |
|
|
|
Initial value: { 0x55, 0xAA, 0x33, 0xCC, 0xA5, 0x5A, 0xBB, 0x99 }
Definition at line 46 of file SaveSlot.hh. |
|
Definition at line 43 of file SaveSlot.hh. |
|
Definition at line 42 of file SaveSlot.hh. |