#include <SaveSlot.hh>
Definition at line 130 of file SaveSlot.hh.
Public Member Functions | |
SaveSlot (const unsigned char *data) | |
Constructor for a SaveSlot. | |
~SaveSlot () | |
Destructor for a SaveSlot. | |
unsigned char | checksum () const |
Generates the checksum for the current data. | |
bool | isValid () const |
Queries if this save slot is valid. | |
bool | isModified () const |
Queries if this SaveSlot has been modified. | |
int | getPhase (int moon) const |
Gets the current phase of one of the moons. | |
void | setPhase (int trammel, int felucca) |
Sets the phases of the moons. | |
wxString | getHerosName () const |
Gets the Hero's Name. | |
void | setHerosName (wxString &name) |
Sets the Hero's Name. | |
int | getVirtue (int virtue) const |
Gets the value for one of the eight virtues. | |
void | setVirtue (int virtue, unsigned char value) |
Sets the value for one of the eight virtues. | |
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 | hasStone (int stone) const |
Queries if the party has a particular stone in their inventory. | |
void | setStone (int stone, bool give=true) |
Sets whether the party has a particular stone or not. | |
bool | hasRune (int rune) const |
Queries whether the party has a particular rune or not. | |
void | setRune (int rune, bool give=true) |
Sets whether the party has a particular rune of not. | |
bool | hasMagic (int magic) const |
Queries whether the party has a particular magic or not. | |
void | setMagic (int magic, bool give=true) |
Sets whether the party has a particular magic of not. | |
int | getHerb (int herb) const |
Gets the current amount of a particular herb the party has. | |
void | setHerb (int herb, unsigned char value) |
Sets the amount of a particular herb the party has. | |
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 | getTool (int tool) const |
Gets the amount of a tool the party has. | |
void | setTool (int tool, unsigned char value=1) |
Sets the amount of a tool the party has. | |
int | getEquipment (int character, int slot) const |
Gets the item held by a particular player in a particular slot. | |
void | setEquipment (int character, int slot, unsigned char value) |
Sets the item held by a particular player in a particular slot. | |
int | getLevel (int character) const |
Gets the level of a character. | |
void | setLevel (int character, unsigned char value) |
Sets the level of a character. | |
wxInt16 | getCurrentHP (int character) const |
Gets the current HP of a character. | |
void | setCurrentHP (int character, wxInt16 value) |
Sets the current HP of a character. | |
wxInt16 | getMaxHP (int character) const |
Gets the max HP of a character. | |
void | setMaxHP (int character, wxInt16 value) |
Sets the max HP of a character. | |
int | getCurrentMP (int character) const |
Gets the current MP of a character. | |
void | setCurrentMP (int character, unsigned char value) |
Sets the current MP of a character. | |
int | getMaxMP (int character) const |
Gets the max MP of a character. | |
void | setMaxMP (int character, unsigned char value) |
Sets the max MP of a charcter. | |
int | getStrength (int character) const |
Gets the strength of a character. | |
void | setStrength (int character, unsigned char value) |
Sets the strength of a charater. | |
int | getIntelligence (int character) const |
Gets the intelligence of a character. | |
void | setIntelligence (int character, unsigned char value) |
Sets the intelligence of a character. | |
int | getDexterity (int character) const |
Gets the dexterity of a character. | |
void | setDexterity (int character, unsigned char value) |
Sets the dexterity of a character. | |
wxInt16 | getExperience (int character) const |
Gets the experience of a character. | |
void | setExperience (int character, wxInt16 value) |
Sets the experience of a character. | |
Private Member Functions | |
void | setModified (bool modified=true) |
Sets whether this slot is modified or not. | |
Static Private Member Functions | |
static unsigned char | toNES (char letter) |
Translates an ASCII character to the Ultima alphabet. | |
static char | fromNES (unsigned char letter) |
Translates an Ultima alphabet character to ASCII. | |
Private Attributes | |
unsigned char * | nvram |
bool | valid |
bool | modified |
Static Private Attributes | |
static const int | CHECKSUM_XORS [] |
Array of checksum xors used by the sanity algorithm. | |
Friends | |
class | MainFrame |
|
Constructor for a SaveSlot.
Definition at line 45 of file SaveSlot.cc. |
|
Destructor for a SaveSlot.
Definition at line 58 of file SaveSlot.cc. |
|
Generates the checksum for the current data.
Definition at line 62 of file SaveSlot.cc. |
|
Translates an Ultima alphabet character to ASCII.
Definition at line 381 of file SaveSlot.cc. |
|
Gets the current HP of a character.
Definition at line 274 of file SaveSlot.cc. |
|
Gets the current MP of a character.
Definition at line 300 of file SaveSlot.cc. |
|
Gets the dexterity of a character.
Definition at line 336 of file SaveSlot.cc. |
|
Gets the item held by a particular player in a particular slot.
Definition at line 256 of file SaveSlot.cc. |
|
Gets the experience of a character.
Definition at line 345 of file SaveSlot.cc. |
|
Gets the amount of gold held by the party.
Definition at line 234 of file SaveSlot.cc. |
|
Gets the current amount of a particular herb the party has.
Definition at line 225 of file SaveSlot.cc. |
|
Gets the Hero's Name.
Definition at line 93 of file SaveSlot.cc. |
|
Gets the intelligence of a character.
Definition at line 327 of file SaveSlot.cc. |
|
Gets the level of a character.
Definition at line 265 of file SaveSlot.cc. |
|
Gets the max HP of a character.
Definition at line 287 of file SaveSlot.cc. |
|
Gets the max MP of a character.
Definition at line 309 of file SaveSlot.cc. |
|
Gets the party member at a given position.
Definition at line 144 of file SaveSlot.cc. |
|
Gets the current phase of one of the moons. Valid values are either TRAMMEL or FELUCCA.
Definition at line 76 of file SaveSlot.cc. |
|
Gets the strength of a character.
Definition at line 318 of file SaveSlot.cc. |
|
Gets the amount of a tool the party has.
Definition at line 247 of file SaveSlot.cc. |
|
Gets the value for one of the eight virtues.
Definition at line 123 of file SaveSlot.cc. |
|
Queries whether the party has a particular magic or not.
Definition at line 193 of file SaveSlot.cc. |
|
Queries whether the party has a particular rune or not.
Definition at line 173 of file SaveSlot.cc. |
|
Queries if the party has a particular stone in their inventory.
Definition at line 153 of file SaveSlot.cc. |
|
Queries if this SaveSlot has been modified.
Definition at line 165 of file SaveSlot.hh. |
|
Queries if this save slot is valid. Initially determined by generating a checksum on the provided data and checking it against the contained checksum, just like the real game.
Definition at line 158 of file SaveSlot.hh. |
|
Sets the current HP of a character.
Definition at line 280 of file SaveSlot.cc. |
|
Sets the current MP of a character.
Definition at line 304 of file SaveSlot.cc. |
|
Sets the dexterity of a character.
Definition at line 340 of file SaveSlot.cc. |
|
Sets the item held by a particular player in a particular slot.
Definition at line 260 of file SaveSlot.cc. |
|
Sets the experience of a character.
Definition at line 351 of file SaveSlot.cc. |
|
Sets the amount of gold held by the party.
Definition at line 240 of file SaveSlot.cc. |
|
Sets the amount of a particular herb the party has.
Definition at line 229 of file SaveSlot.cc. |
|
Sets the Hero's Name.
Definition at line 108 of file SaveSlot.cc. |
|
Sets the intelligence of a character.
Definition at line 331 of file SaveSlot.cc. |
|
Sets the level of a character.
Definition at line 269 of file SaveSlot.cc. |
|
Sets whether the party has a particular magic of not.
Definition at line 204 of file SaveSlot.cc. |
|
Sets the max HP of a character.
Definition at line 293 of file SaveSlot.cc. |
|
Sets the max MP of a charcter.
Definition at line 313 of file SaveSlot.cc. |
|
Sets the party member at a given position.
Definition at line 148 of file SaveSlot.cc. |
|
Sets whether this slot is modified or not.
Definition at line 358 of file SaveSlot.cc. |
|
Sets the phases of the moons.
Definition at line 86 of file SaveSlot.cc. |
|
Sets whether the party has a particular rune of not.
Definition at line 179 of file SaveSlot.cc. |
|
Sets whether the party has a particular stone or not.
Definition at line 159 of file SaveSlot.cc. |
|
Sets the strength of a charater.
Definition at line 322 of file SaveSlot.cc. |
|
Sets the amount of a tool the party has.
Definition at line 251 of file SaveSlot.cc. |
|
Sets the value for one of the eight virtues.
Definition at line 127 of file SaveSlot.cc. |
|
Translates an ASCII character to the Ultima alphabet.
Definition at line 366 of file SaveSlot.cc. |
|
Definition at line 540 of file SaveSlot.hh. |
|
Initial value: { 0x55, 0xAA, 0x33, 0xCC, 0xA5, 0x5A, 0xBB, 0x99 }
Definition at line 572 of file SaveSlot.hh. |
|
Definition at line 569 of file SaveSlot.hh. |
|
Definition at line 567 of file SaveSlot.hh. |
|
Definition at line 568 of file SaveSlot.hh. |