1 | |
|
|
2 | /* |
|
|
3 | * static char *rcsid_los_c = |
|
|
4 | * "$Id: los.C,v 1.4 2006/09/10 16:00:23 root Exp $"; |
|
|
5 | */ |
|
|
6 | |
|
|
7 | /* |
1 | /* |
8 | CrossFire, A Multiplayer game for X-windows |
2 | CrossFire, A Multiplayer game for X-windows |
9 | |
3 | |
10 | Copyright (C) 2002 Mark Wedel & Crossfire Development Team |
4 | Copyright (C) 2002 Mark Wedel & Crossfire Development Team |
11 | Copyright (C) 1992 Frank Tore Johansen |
5 | Copyright (C) 1992 Frank Tore Johansen |
… | |
… | |
22 | |
16 | |
23 | You should have received a copy of the GNU General Public License |
17 | You should have received a copy of the GNU General Public License |
24 | along with this program; if not, write to the Free Software |
18 | along with this program; if not, write to the Free Software |
25 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
19 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
26 | |
20 | |
27 | The authors can be reached via e-mail at crossfire-devel@real-time.com |
21 | The authors can be reached via e-mail at <crossfire@schmorp.de> |
28 | */ |
22 | */ |
29 | |
23 | |
30 | /* Nov 95 - inserted USE_LIGHTING code stuff in here - b.t. */ |
24 | /* Nov 95 - inserted USE_LIGHTING code stuff in here - b.t. */ |
31 | |
25 | |
32 | #include <global.h> |
26 | #include <global.h> |
… | |
… | |
333 | |
327 | |
334 | static void |
328 | static void |
335 | expand_lighted_sight (object *op) |
329 | expand_lighted_sight (object *op) |
336 | { |
330 | { |
337 | int x, y, darklevel, ax, ay, basex, basey, mflags, light, x1, y1; |
331 | int x, y, darklevel, ax, ay, basex, basey, mflags, light, x1, y1; |
338 | mapstruct *m = op->map; |
332 | maptile *m = op->map; |
339 | sint16 nx, ny; |
333 | sint16 nx, ny; |
340 | |
334 | |
341 | darklevel = MAP_DARKNESS (m); |
335 | darklevel = MAP_DARKNESS (m); |
342 | |
336 | |
343 | /* If the player can see in the dark, lower the darklevel for him */ |
337 | /* If the player can see in the dark, lower the darklevel for him */ |
… | |
… | |
523 | * players, which is should not be. |
517 | * players, which is should not be. |
524 | * Currently, this function is called from the |
518 | * Currently, this function is called from the |
525 | * change_map_light function |
519 | * change_map_light function |
526 | */ |
520 | */ |
527 | void |
521 | void |
528 | update_all_map_los (mapstruct *map) |
522 | update_all_map_los (maptile *map) |
529 | { |
523 | { |
530 | player *pl; |
524 | player *pl; |
531 | |
525 | |
532 | for (pl = first_player; pl != NULL; pl = pl->next) |
526 | for (pl = first_player; pl != NULL; pl = pl->next) |
533 | { |
527 | { |
… | |
… | |
549 | * |
543 | * |
550 | * map is the map that changed, x and y are the coordinates. |
544 | * map is the map that changed, x and y are the coordinates. |
551 | */ |
545 | */ |
552 | |
546 | |
553 | void |
547 | void |
554 | update_all_los (const mapstruct *map, int x, int y) |
548 | update_all_los (const maptile *map, int x, int y) |
555 | { |
549 | { |
556 | player *pl; |
550 | player *pl; |
557 | |
551 | |
558 | for (pl = first_player; pl != NULL; pl = pl->next) |
552 | for (pl = first_player; pl != NULL; pl = pl->next) |
559 | { |
553 | { |