… | |
… | |
103 | usekeytype ACC (RW, usekeys); /* Method for finding keys for doors */ |
103 | usekeytype ACC (RW, usekeys); /* Method for finding keys for doors */ |
104 | unapplymode ACC (RW, unapply); /* Method for auto unapply */ |
104 | unapplymode ACC (RW, unapply); /* Method for auto unapply */ |
105 | uint32 ACC (RW, count); /* Any numbers typed before a command */ |
105 | uint32 ACC (RW, count); /* Any numbers typed before a command */ |
106 | uint32 ACC (RW, mode); /* Mode of player for pickup. */ |
106 | uint32 ACC (RW, mode); /* Mode of player for pickup. */ |
107 | |
107 | |
108 | int ACC (RW, digestion); /* Any bonuses/penalties to digestion */ |
108 | int ACC (RW, digestion); /* Any bonuses/penalties to digestion */ |
109 | int ACC (RW, gen_hp); /* Bonuses to regeneration speed of hp */ |
109 | int ACC (RW, gen_hp); /* Bonuses to regeneration speed of hp */ |
110 | int ACC (RW, gen_sp); /* Bonuses to regeneration speed of sp */ |
110 | int ACC (RW, gen_sp); /* Bonuses to regeneration speed of sp */ |
111 | int ACC (RW, gen_sp_armour); /* Penalty to sp regen from armour */ |
111 | int ACC (RW, gen_sp_armour); /* Penalty to sp regen from armour */ |
112 | int ACC (RW, gen_grace); /* Bonuses to regeneration speed of grace */ |
112 | int ACC (RW, gen_grace); /* Bonuses to regeneration speed of grace */ |
113 | int ACC (RW, item_power); /* Total item power of objects equipped */ |
113 | int ACC (RW, item_power); /* Total item power of objects equipped */ |
114 | uint8 ACC (RW, gender); /* 0 male, 1 female, others not yet defined */ |
114 | uint8 ACC (RW, gender); /* 0 male, 1 female, others not yet defined */ |
115 | uint8 ACC (RW, hintmode); /* 0 full, 1 hint, 2 disable */ |
115 | uint8 ACC (RW, hintmode); /* 0 full, 1 hint, 2 disable */ |
116 | |
116 | |
117 | /* Try to put all the bitfields together - saves some small amount of memory */ |
117 | /* Try to put all the bitfields together - saves some small amount of memory */ |
118 | bool ACC (RW, braced); /* Will not move if braced, only attack */ |
118 | bool ACC (RW, braced); /* Will not move if braced, only attack */ |
… | |
… | |
185 | sint8 blocked_los_uc (int dx, int dy) const |
185 | sint8 blocked_los_uc (int dx, int dy) const |
186 | { |
186 | { |
187 | return los[dx + LOS_X0][dy + LOS_Y0]; |
187 | return los[dx + LOS_X0][dy + LOS_Y0]; |
188 | } |
188 | } |
189 | |
189 | |
|
|
190 | MTH void clear_los (sint8 value = LOS_BLOCKED); |
|
|
191 | MTH void update_los (); |
|
|
192 | |
190 | shstr ACC (RW, invis_race); /* What race invisible to? */ |
193 | shstr ACC (RW, invis_race); /* What race invisible to? */ |
191 | |
194 | |
192 | MTH const char *killer_name () const; // makes a string out of ->killer |
195 | MTH const char *killer_name () const; // makes a string out of ->killer |
193 | |
196 | |
194 | MTH static player *create (); |
197 | MTH static player *create (); |
… | |
… | |
196 | |
199 | |
197 | static player *load_pl (object_thawer &thawer); |
200 | static player *load_pl (object_thawer &thawer); |
198 | MTH static player *load_pl (object_thawer *thawer) { return load_pl (*thawer); } |
201 | MTH static player *load_pl (object_thawer *thawer) { return load_pl (*thawer); } |
199 | |
202 | |
200 | MTH void link_skills (); |
203 | MTH void link_skills (); |
201 | MTH object *find_skill (const char *name) const; |
204 | MTH object *find_skill (shstr_cmp name) const; |
202 | object *find_skill (const shstr &name) const; |
|
|
203 | |
205 | |
204 | bool save_pl (object_freezer &freezer); |
206 | bool save_pl (object_freezer &freezer); |
205 | MTH bool save_pl (const char *path); |
207 | MTH bool save_pl (const char *path); |
206 | |
208 | |
207 | void do_destroy (); |
209 | void do_destroy (); |
… | |
… | |
216 | if (ns) |
218 | if (ns) |
217 | ns->play_sound (sound, dx, dy); |
219 | ns->play_sound (sound, dx, dy); |
218 | } |
220 | } |
219 | |
221 | |
220 | // wether the player can "see" this mapspace or not, decided by los |
222 | // wether the player can "see" this mapspace or not, decided by los |
221 | // 0 - nothing see, 100 - fully visible |
223 | // 0 - bright, 3 dark, 4 too dark, 100 blocked or out of range |
222 | MTH sint8 visibility_at (maptile *map, int x, int y) const; |
224 | MTH sint8 darkness_at (maptile *map, int x, int y) const; |
223 | |
225 | |
224 | MTH void connect (client *ns); |
226 | MTH void connect (client *ns); |
225 | MTH void disconnect (); |
227 | MTH void disconnect (); |
226 | |
228 | |
227 | MTH void activate (); |
229 | MTH void activate (); |
… | |
… | |
264 | |
266 | |
265 | #define for_all_players(var) \ |
267 | #define for_all_players(var) \ |
266 | for (unsigned _i = 0; _i < ::players.size (); ++_i) \ |
268 | for (unsigned _i = 0; _i < ::players.size (); ++_i) \ |
267 | statementvar (player *, var, ::players [_i]) |
269 | statementvar (player *, var, ::players [_i]) |
268 | |
270 | |
|
|
271 | #define for_all_players_on_map(var,mapp) \ |
|
|
272 | for_all_players(var) \ |
|
|
273 | if ((var)->ob->map == (mapp)) |
|
|
274 | |
269 | inline void |
275 | inline void |
270 | object::statusmsg (const char *msg, int color) |
276 | object::statusmsg (const char *msg, int color) |
271 | { |
277 | { |
272 | if (expect_true (contr)) contr->statusmsg (msg, color); |
278 | if (expect_true (contr)) contr->statusmsg (msg, color); |
273 | } |
279 | } |