Adonthell
0.4
|
Base character class containing attributes and dialog stuff. More...
#include <character_base.h>
Public Member Functions | |
character_base () | |
Default constructor. | |
~character_base () | |
Destructor. | |
string | get_name () const |
Returns the name of the character. | |
string | get_id () |
Returns an unique identifier of the character. | |
void | set_name (string newname) |
Sets the name of the character. | |
u_int32 | get_color () const |
Returns the color representing the character. | |
void | set_color (int c) |
Sets the color representing the character. | |
string | get_portrait () const |
Returns the current portrait of the character. | |
void | set_portrait (string fname) |
Sets the current portrait of the character. | |
string | get_dialogue () const |
Return the file name of the current character's dialog. | |
void | set_dialogue (string dialogue) |
Sets the dialogue of the character. | |
void | get_state (igzstream &in) |
Loads the state (attributes) of the character from an opened file. | |
void | put_state (ogzstream &out) |
Saves the state (ttributes) of the character into an opened file. |
Base character class containing attributes and dialog stuff.
Definition at line 77 of file character_base.h.
Default constructor.
Definition at line 32 of file character_base.cc.
Destructor.
Definition at line 42 of file character_base.cc.
string character_base::get_name | ( | ) | const [inline] |
Returns the name of the character.
Definition at line 97 of file character_base.h.
string character_base::get_id | ( | ) | [inline] |
Returns an unique identifier of the character.
Definition at line 106 of file character_base.h.
void character_base::set_name | ( | string | newname | ) |
Sets the name of the character.
newname | name of the character. |
Definition at line 46 of file character_base.cc.
u_int32 character_base::get_color | ( | ) | const [inline] |
Returns the color representing the character.
Definition at line 124 of file character_base.h.
void character_base::set_color | ( | int | c | ) | [inline] |
Sets the color representing the character.
c | new color representing the character. |
Definition at line 131 of file character_base.h.
string character_base::get_portrait | ( | ) | const [inline] |
Returns the current portrait of the character.
Definition at line 138 of file character_base.h.
void character_base::set_portrait | ( | string | fname | ) | [inline] |
Sets the current portrait of the character.
fname | filename of the new portrait to use. |
Definition at line 145 of file character_base.h.
string character_base::get_dialogue | ( | ) | const [inline] |
Return the file name of the current character's dialog.
Definition at line 152 of file character_base.h.
void character_base::set_dialogue | ( | string | dialogue | ) |
Sets the dialogue of the character.
dialogue | new character's dialog. |
Definition at line 51 of file character_base.cc.
void character_base::get_state | ( | igzstream & | in | ) |
Loads the state (attributes) of the character from an opened file.
in | file from which to read. |
Reimplemented in mapcharacter.
Definition at line 83 of file character_base.cc.
void character_base::put_state | ( | ogzstream & | out | ) |
Saves the state (ttributes) of the character into an opened file.
out | file where to save. |
Definition at line 56 of file character_base.cc.