#include <Password.hh>
Definition at line 58 of file Password.hh.
Public Member Functions | |
Password () | |
Creates a new blank password. | |
Password (const wxString &password, bool fixChecksum=false) throw (InvalidPasswordException) | |
Creates a password from a Metroid password. | |
bool | getBit (int bit) const throw (std::out_of_range) |
Gets a bit from the raw password data. | |
void | setBit (int bit, bool value=true) throw (std::out_of_range) |
Sets a bit in the raw password data. | |
const wxString & | getEncoded () const |
Gets the encoded Metroid password encapsulated by this Password. | |
wxUint32 | getGameTime () const |
Gets the game time in ticks (1 tick = ~4 seconds). | |
void | setGameTime (wxUint32 time) |
Sets the game time. | |
unsigned char | getMissiles () const |
Gets the number of missiles held by Samus. | |
void | setMissiles (unsigned char missiles) |
Sets the number of missiles held by Samus. | |
unsigned char | getShift () const |
Gets the shift byte used by this Password. | |
void | setShift (unsigned char shift) |
Sets the shift byte used by this Password. | |
Static Public Attributes | |
static const wxString | ALPHABET |
Private Member Functions | |
unsigned char | calcChecksum () const |
Calculates the checksum value for this Password. | |
void | decode (const wxString &password, bool fixChecksum) throw (InvalidPasswordException) |
Decodes a Metroid password into our raw format. | |
void | encode () |
Encodes the raw password data into a Metroid password. | |
Private Attributes | |
wxString | encoded |
unsigned char | data [18] |
Static Private Attributes | |
static const int | MISSILE_COUNT_BYTE = 10 |
static const int | GAME_TIME_BYTE = 11 |
static const int | SHIFT_BYTE = 16 |
static const int | CHECKSUM_BYTE = 17 |
static const unsigned char | SPACE_VALUE = 0xFF |
|
Creates a new blank password.
Definition at line 38 of file Password.cc. |
|
Creates a password from a Metroid password.
Definition at line 43 of file Password.cc. |
|
Calculates the checksum value for this Password.
Definition at line 108 of file Password.cc. |
|
Decodes a Metroid password into our raw format.
Definition at line 118 of file Password.cc. |
|
Encodes the raw password data into a Metroid password.
Definition at line 187 of file Password.cc. |
|
Gets a bit from the raw password data.
Definition at line 56 of file Password.cc. |
|
Gets the encoded Metroid password encapsulated by this Password.
Definition at line 186 of file Password.hh. |
|
Gets the game time in ticks (1 tick = ~4 seconds).
Definition at line 82 of file Password.cc. |
|
Gets the number of missiles held by Samus.
Definition at line 187 of file Password.hh. |
|
Gets the shift byte used by this Password.
Definition at line 189 of file Password.hh. |
|
Sets a bit in the raw password data.
Definition at line 66 of file Password.cc. |
|
Sets the game time.
Definition at line 89 of file Password.cc. |
|
Sets the number of missiles held by Samus.
Definition at line 96 of file Password.cc. |
|
Sets the shift byte used by this Password.
Definition at line 102 of file Password.cc. |
|
|
|
Definition at line 66 of file Password.hh. |
|
Definition at line 61 of file Password.hh. |
|
Definition at line 60 of file Password.hh. |
|
Definition at line 64 of file Password.hh. |
|
Definition at line 63 of file Password.hh. |
|
Definition at line 65 of file Password.hh. |
|
Definition at line 67 of file Password.hh. |