Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef CHARACTER_BASE_H_
00028 #define CHARACTER_BASE_H_
00029
00030
00031
00032
00033
00034
00035 #define DIALOG_DIR "dialogues/"
00036
00037 #include "storage.h"
00038 #include "fileops.h"
00039
00040
00041
00042
00043
00044 enum
00045 {
00046 DWARF = 0,
00047 ELF = 1,
00048 HALFELF = 2,
00049 HUMAN = 3
00050 };
00051
00052
00053
00054
00055
00056 enum
00057 {
00058 FEMALE = 0,
00059 MALE = 1
00060 };
00061
00062
00063
00064
00065
00066 enum
00067 {
00068 NPC = 0,
00069 PLAYER = 1,
00070 PARTY = 2
00071 };
00072
00073
00074
00075
00076
00077 class character_base : public storage
00078 {
00079 public:
00080
00081
00082
00083
00084 character_base ();
00085
00086
00087
00088
00089
00090 ~character_base ();
00091
00092
00093
00094
00095
00096
00097 string get_name () const { return name; }
00098
00099
00100
00101
00102
00103
00104
00105
00106 string get_id ()
00107 {
00108 if (get_val ("type") == PLAYER) return "Player";
00109 else return name;
00110 }
00111
00112
00113
00114
00115
00116
00117 void set_name (string newname);
00118
00119
00120
00121
00122
00123
00124 u_int32 get_color() const { return color; }
00125
00126
00127
00128
00129
00130
00131 void set_color (int c) { color = c; }
00132
00133
00134
00135
00136
00137
00138 string get_portrait() const { return portrait; }
00139
00140
00141
00142
00143
00144
00145 void set_portrait (string fname) { portrait = fname; }
00146
00147
00148
00149
00150
00151
00152 string get_dialogue () const { return dialogue; }
00153
00154
00155
00156
00157
00158
00159 void set_dialogue (string dialogue);
00160
00161
00162
00163
00164
00165
00166
00167 void get_state (igzstream& in);
00168
00169
00170
00171
00172
00173
00174 void put_state (ogzstream& out);
00175
00176 private:
00177 string name;
00178 string dialogue;
00179 string portrait;
00180 u_int32 color;
00181 };
00182
00183 #endif