#include <SaveSlot.hh>
Definition at line 127 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 | |
unsigned char | toNES (char letter) |
Translates an ASCII character to the Ultima alphabet. | |
char | fromNES (unsigned char letter) |
Translates an Ultima alphabet character to ASCII. | |
Private Attributes | |
unsigned char * | nvram |
bool | valid |
bool | modified |
Static Private Attributes | |
const int | CHECKSUM_XORS [] |
Array of checksum xors used by the sanity algorithm. | |
Friends | |
class | MainFrame |
|
Constructor for a SaveSlot.
Definition at line 42 of file SaveSlot.cc. |
|
Destructor for a SaveSlot.
Definition at line 55 of file SaveSlot.cc. |
|
Generates the checksum for the current data.
Definition at line 59 of file SaveSlot.cc. |
|
Translates an Ultima alphabet character to ASCII.
Definition at line 378 of file SaveSlot.cc. |
|
Gets the current HP of a character.
Definition at line 271 of file SaveSlot.cc. |
|
Gets the current MP of a character.
Definition at line 297 of file SaveSlot.cc. |
|
Gets the dexterity of a character.
Definition at line 333 of file SaveSlot.cc. |
|
Gets the item held by a particular player in a particular slot.
Definition at line 253 of file SaveSlot.cc. |
|
Gets the experience of a character.
Definition at line 342 of file SaveSlot.cc. |
|
Gets the amount of gold held by the party.
Definition at line 231 of file SaveSlot.cc. |
|
Gets the current amount of a particular herb the party has.
Definition at line 222 of file SaveSlot.cc. |
|
Gets the Hero's Name.
Definition at line 90 of file SaveSlot.cc. |
|
Gets the intelligence of a character.
Definition at line 324 of file SaveSlot.cc. |
|
Gets the level of a character.
Definition at line 262 of file SaveSlot.cc. |
|
Gets the max HP of a character.
Definition at line 284 of file SaveSlot.cc. |
|
Gets the max MP of a character.
Definition at line 306 of file SaveSlot.cc. |
|
Gets the party member at a given position.
Definition at line 141 of file SaveSlot.cc. |
|
Gets the current phase of one of the moons. Valid values are either TRAMMEL or FELUCCA.
Definition at line 73 of file SaveSlot.cc. |
|
Gets the strength of a character.
Definition at line 315 of file SaveSlot.cc. |
|
Gets the amount of a tool the party has.
Definition at line 244 of file SaveSlot.cc. |
|
Gets the value for one of the eight virtues.
Definition at line 120 of file SaveSlot.cc. |
|
Queries whether the party has a particular magic or not.
Definition at line 190 of file SaveSlot.cc. |
|
Queries whether the party has a particular rune or not.
Definition at line 170 of file SaveSlot.cc. |
|
Queries if the party has a particular stone in their inventory.
Definition at line 150 of file SaveSlot.cc. |
|
Queries if this SaveSlot has been modified.
Definition at line 162 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 155 of file SaveSlot.hh. |
|
Sets the current HP of a character.
Definition at line 277 of file SaveSlot.cc. |
|
Sets the current MP of a character.
Definition at line 301 of file SaveSlot.cc. |
|
Sets the dexterity of a character.
Definition at line 337 of file SaveSlot.cc. |
|
Sets the item held by a particular player in a particular slot.
Definition at line 257 of file SaveSlot.cc. |
|
Sets the experience of a character.
Definition at line 348 of file SaveSlot.cc. |
|
Sets the amount of gold held by the party.
Definition at line 237 of file SaveSlot.cc. |
|
Sets the amount of a particular herb the party has.
Definition at line 226 of file SaveSlot.cc. |
|
Sets the Hero's Name.
Definition at line 105 of file SaveSlot.cc. |
|
Sets the intelligence of a character.
Definition at line 328 of file SaveSlot.cc. |
|
Sets the level of a character.
Definition at line 266 of file SaveSlot.cc. |
|
Sets whether the party has a particular magic of not.
Definition at line 201 of file SaveSlot.cc. |
|
Sets the max HP of a character.
Definition at line 290 of file SaveSlot.cc. |
|
Sets the max MP of a charcter.
Definition at line 310 of file SaveSlot.cc. |
|
Sets the party member at a given position.
Definition at line 145 of file SaveSlot.cc. |
|
Sets whether this slot is modified or not.
Definition at line 355 of file SaveSlot.cc. |
|
Sets the phases of the moons.
Definition at line 83 of file SaveSlot.cc. |
|
Sets whether the party has a particular rune of not.
Definition at line 176 of file SaveSlot.cc. |
|
Sets whether the party has a particular stone or not.
Definition at line 156 of file SaveSlot.cc. |
|
Sets the strength of a charater.
Definition at line 319 of file SaveSlot.cc. |
|
Sets the amount of a tool the party has.
Definition at line 248 of file SaveSlot.cc. |
|
Sets the value for one of the eight virtues.
Definition at line 124 of file SaveSlot.cc. |
|
Translates an ASCII character to the Ultima alphabet.
Definition at line 363 of file SaveSlot.cc. |
|
Definition at line 537 of file SaveSlot.hh. |
|
Initial value: { 0x55, 0xAA, 0x33, 0xCC, 0xA5, 0x5A, 0xBB, 0x99 }
Definition at line 37 of file SaveSlot.cc. |
|
Definition at line 566 of file SaveSlot.hh. |
|
Definition at line 564 of file SaveSlot.hh. |
|
Definition at line 565 of file SaveSlot.hh. |