#include <SaveSlot.hh>
Definition at line 93 of file SaveSlot.hh.
Public Member Functions | |
SaveSlot (const char *nvram) | |
Constructor for a SaveSlot. | |
~SaveSlot () | |
Destructor for a SaveSlot object. | |
bool | isModified () const |
Queries if this SaveSlot has been modified;. | |
bool | isValid () const |
Queries if this SaveSlot is valid. | |
void | checkForNewGame () |
Fixes data for a new quest game. | |
wxString | getName () const |
Gets the name of the character. | |
void | setName (wxString &value) |
Sets the name of the character. | |
int | getPlayCount () const |
Gets the play count. | |
void | setPlayCount (unsigned char value) |
Sets the play count. | |
bool | hasTriforce () const |
Queries if the player has saved the Triforce before. | |
void | setTriforce (bool value) |
Sets whether this player has saved the Triforce before. | |
int | getLevel (int which) const |
Gets one of the experience level elements. | |
void | setLevel (int which, unsigned char value) |
Sets one of the experience level elements. | |
int | getContainers (int which) const |
Gets one of the container values. | |
void | setContainers (int which, unsigned char value) |
Sets one of the container values. | |
bool | hasTechnique (int technique) const |
Queries if the player has a sword technique. | |
void | setTechnique (int technique, bool value) |
Sets if the player has a sword technique or not. | |
bool | hasSpell (int spell) const |
Queries if the player has a certain spell. | |
void | setSpell (int spell, bool value) |
Sets if the player has a certain spell. | |
bool | hasItem (int item) const |
Queries if the player has a certain item. | |
void | setItem (int item, bool value) |
Sets if the player has a certain item. | |
bool | hasSeal (int palace) const |
Queries if the player has sealed a certain palace. | |
void | setSeal (int palace, bool value) |
Sets if the player has sealed a certain palace. | |
int | getKeys () const |
Gets the number of keys the player has. | |
void | setKeys (unsigned char value) |
Sets the number of keys the player has. | |
Private Member Functions | |
void | setModified (bool modified=true) |
Sets if this game has been modified or not. | |
Static Private Member Functions | |
static char | fromNES (unsigned char letter) |
Translates a character from the Zelda II alphabet to ASCII. | |
static unsigned char | toNES (char letter) |
Translates a character from ASCII to the Zelda II alphabet. | |
Private Attributes | |
unsigned char * | nvram |
bool | modified |
bool | valid |
Friends | |
class | SRAMFile |
SaveSlot::SaveSlot | ( | const char * | nvram | ) |
Constructor for a SaveSlot.
nvram | The SRAM data for this SaveSlot. |
Definition at line 39 of file SaveSlot.cc.
SaveSlot::~SaveSlot | ( | ) |
void emuWorks::SaveSlot::setModified | ( | bool | modified = true |
) | [inline, private] |
char SaveSlot::fromNES | ( | unsigned char | letter | ) | [static, private] |
Translates a character from the Zelda II alphabet to ASCII.
letter | The letter to translate. |
Definition at line 201 of file SaveSlot.cc.
unsigned char SaveSlot::toNES | ( | char | letter | ) | [static, private] |
Translates a character from ASCII to the Zelda II alphabet.
letter | The letter to translate. |
Definition at line 211 of file SaveSlot.cc.
bool emuWorks::SaveSlot::isModified | ( | ) | const [inline] |
Queries if this SaveSlot has been modified;.
Definition at line 141 of file SaveSlot.hh.
bool emuWorks::SaveSlot::isValid | ( | ) | const [inline] |
Queries if this SaveSlot is valid.
Definition at line 148 of file SaveSlot.hh.
void SaveSlot::checkForNewGame | ( | ) |
wxString SaveSlot::getName | ( | ) | const |
void SaveSlot::setName | ( | wxString & | value | ) |
Sets the name of the character.
value | The new name. |
Definition at line 91 of file SaveSlot.cc.
int SaveSlot::getPlayCount | ( | ) | const |
void SaveSlot::setPlayCount | ( | unsigned char | value | ) |
Sets the play count.
value | The new play count. |
Definition at line 113 of file SaveSlot.cc.
bool SaveSlot::hasTriforce | ( | ) | const |
Queries if the player has saved the Triforce before.
Definition at line 118 of file SaveSlot.cc.
void SaveSlot::setTriforce | ( | bool | value | ) |
Sets whether this player has saved the Triforce before.
value | true if they have; false otherwise. |
Definition at line 122 of file SaveSlot.cc.
int SaveSlot::getLevel | ( | int | which | ) | const |
Gets one of the experience level elements.
which | Which level to retrieve. Valid values are one of the Levels enumeration. |
Definition at line 127 of file SaveSlot.cc.
void SaveSlot::setLevel | ( | int | which, | |
unsigned char | value | |||
) |
Sets one of the experience level elements.
which | Which level to set. Valid values are one of the Levels enumeration. | |
value | The new experience level. |
Definition at line 131 of file SaveSlot.cc.
int SaveSlot::getContainers | ( | int | which | ) | const |
Gets one of the container values.
which | Which container value to get. Valid values are one of Containers enumeration. |
Definition at line 136 of file SaveSlot.cc.
void SaveSlot::setContainers | ( | int | which, | |
unsigned char | value | |||
) |
Sets one of the container values.
which | Which container value to set. Valid values are one of Containers enumeration. | |
value | The new container value. |
Definition at line 140 of file SaveSlot.cc.
bool SaveSlot::hasTechnique | ( | int | technique | ) | const |
Queries if the player has a sword technique.
technique | Which technique to check for. Valid values are in the Techniques enumeration. |
Definition at line 145 of file SaveSlot.cc.
void SaveSlot::setTechnique | ( | int | technique, | |
bool | value | |||
) |
Sets if the player has a sword technique or not.
technique | Which technique to set. Valid values are in the Techniques enumeration. | |
value | true to have the technique; false otherwise. |
Definition at line 149 of file SaveSlot.cc.
bool SaveSlot::hasSpell | ( | int | spell | ) | const |
Queries if the player has a certain spell.
spell | Which spell. Valid values are in the Spells enumeration. |
Definition at line 159 of file SaveSlot.cc.
void SaveSlot::setSpell | ( | int | spell, | |
bool | value | |||
) |
Sets if the player has a certain spell.
spell | Which spell. Valid values are in the Spells enumeration. | |
value | true to have the spell; false otherwise. |
Definition at line 163 of file SaveSlot.cc.
bool SaveSlot::hasItem | ( | int | item | ) | const |
Queries if the player has a certain item.
item | Which item. Valid values are in the Items enumeration. |
Definition at line 168 of file SaveSlot.cc.
void SaveSlot::setItem | ( | int | item, | |
bool | value | |||
) |
Sets if the player has a certain item.
item | Which item. Valid values are in the Items enumeration. | |
value | true to have the item; false otherwise. |
Definition at line 172 of file SaveSlot.cc.
bool SaveSlot::hasSeal | ( | int | palace | ) | const |
Queries if the player has sealed a certain palace.
palace | Which palace. Valid values are 0-5. |
Definition at line 177 of file SaveSlot.cc.
void SaveSlot::setSeal | ( | int | palace, | |
bool | value | |||
) |
Sets if the player has sealed a certain palace.
palace | Which palace. Valid values are 0-5. | |
value | true to seal; false otherwise. |
Definition at line 181 of file SaveSlot.cc.
int SaveSlot::getKeys | ( | ) | const |
Gets the number of keys the player has.
Definition at line 192 of file SaveSlot.cc.
void SaveSlot::setKeys | ( | unsigned char | value | ) |
Sets the number of keys the player has.
value | The new number of keys. |
Definition at line 196 of file SaveSlot.cc.
friend class SRAMFile [friend] |
Definition at line 94 of file SaveSlot.hh.
unsigned char* emuWorks::SaveSlot::nvram [private] |
Definition at line 97 of file SaveSlot.hh.
bool emuWorks::SaveSlot::modified [private] |
Definition at line 98 of file SaveSlot.hh.
bool emuWorks::SaveSlot::valid [private] |
Definition at line 98 of file SaveSlot.hh.