… | |
… | |
19 | * along with this program; if not, write to the Free Software |
19 | * along with this program; if not, write to the Free Software |
20 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
20 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
21 | * |
21 | * |
22 | * The authors can be reached via e-mail at crossfire@schmorp.de |
22 | * The authors can be reached via e-mail at crossfire@schmorp.de |
23 | */ |
23 | */ |
24 | |
|
|
25 | #define NUM_OUTPUT_BUFS 5 |
|
|
26 | struct Output_Buf |
|
|
27 | { |
|
|
28 | shstr buf; /* Actual string pointer */ |
|
|
29 | uint32 first_update; /* First time this message was stored */ |
|
|
30 | uint16 count; /* How many times we got this message */ |
|
|
31 | }; |
|
|
32 | |
24 | |
33 | /* wand/rod/horn rolled into range_misc. They all use the same body location |
25 | /* wand/rod/horn rolled into range_misc. They all use the same body location |
34 | * anyways. |
26 | * anyways. |
35 | */ |
27 | */ |
36 | enum rangetype |
28 | enum rangetype |
… | |
… | |
184 | sint8 blocked_los[MAP_CLIENT_X][MAP_CLIENT_Y]; /* array showing what spaces */ |
176 | sint8 blocked_los[MAP_CLIENT_X][MAP_CLIENT_Y]; /* array showing what spaces */ |
185 | /* the player can see. For maps smaller than */ |
177 | /* the player can see. For maps smaller than */ |
186 | /* MAP_CLIENT_.., the upper left is used */ |
178 | /* MAP_CLIENT_.., the upper left is used */ |
187 | |
179 | |
188 | shstr ACC (RW, invis_race); /* What race invisible to? */ |
180 | shstr ACC (RW, invis_race); /* What race invisible to? */ |
189 | Output_Buf outputs[NUM_OUTPUT_BUFS]; /* holds output strings to client */ |
|
|
190 | |
181 | |
191 | MTH static player *create (); |
182 | MTH static player *create (); |
192 | |
183 | |
193 | static player *load_pl (object_thawer &thawer); |
184 | static player *load_pl (object_thawer &thawer); |
194 | MTH static player *load_pl (const char *path); |
185 | MTH static player *load_pl (const char *path); |
… | |
… | |
210 | MTH void deactivate (); |
201 | MTH void deactivate (); |
211 | |
202 | |
212 | // enters the initial map, after login or creation |
203 | // enters the initial map, after login or creation |
213 | MTH void enter_map (); |
204 | MTH void enter_map (); |
214 | |
205 | |
|
|
206 | MTH void chargen_race_done (); |
|
|
207 | MTH void chargen_race_next (); |
|
|
208 | |
215 | ~player (); |
209 | ~player (); |
216 | |
210 | |
217 | private: |
211 | private: |
218 | void set_object (object *op); |
212 | void set_object (object *op); |
219 | player (); |
213 | player (); |
… | |
… | |
222 | typedef object_vector<player, &player::active> playervec; |
216 | typedef object_vector<player, &player::active> playervec; |
223 | |
217 | |
224 | extern playervec players; |
218 | extern playervec players; |
225 | |
219 | |
226 | #define for_all_players(var) \ |
220 | #define for_all_players(var) \ |
227 | for (int _i = 0; _i < players.size (); ++_i) \ |
221 | for (unsigned _i = 0; _i < players.size (); ++_i) \ |
228 | declvar (player *, var, players [_i]) |
222 | declvar (player *, var, players [_i]) |
229 | |
223 | |