1 | |
|
|
2 | /* |
|
|
3 | * static char *rcsid_sock_info_c = |
|
|
4 | * "$Id: info.C,v 1.5 2006/09/10 13:43:33 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 | /** |
24 | /** |
31 | * \file |
25 | * \file |
32 | * Basic client output functions. |
26 | * Basic client output functions. |
… | |
… | |
355 | /** |
349 | /** |
356 | * Writes to everyone on the map *except* op. This is useful for emotions. |
350 | * Writes to everyone on the map *except* op. This is useful for emotions. |
357 | */ |
351 | */ |
358 | |
352 | |
359 | void |
353 | void |
360 | new_info_map_except (int color, mapstruct *map, object *op, const char *str) |
354 | new_info_map_except (int color, maptile *map, object *op, const char *str) |
361 | { |
355 | { |
362 | player *pl; |
356 | player *pl; |
363 | |
357 | |
364 | for (pl = first_player; pl != NULL; pl = pl->next) |
358 | for (pl = first_player; pl != NULL; pl = pl->next) |
365 | if (pl->ob != NULL && pl->ob->map == map && pl->ob != op) |
359 | if (pl->ob != NULL && pl->ob->map == map && pl->ob != op) |
… | |
… | |
371 | /** |
365 | /** |
372 | * Writes to everyone on the map except op1 and op2 |
366 | * Writes to everyone on the map except op1 and op2 |
373 | */ |
367 | */ |
374 | |
368 | |
375 | void |
369 | void |
376 | new_info_map_except2 (int color, mapstruct *map, object *op1, object *op2, const char *str) |
370 | new_info_map_except2 (int color, maptile *map, object *op1, object *op2, const char *str) |
377 | { |
371 | { |
378 | player *pl; |
372 | player *pl; |
379 | |
373 | |
380 | for (pl = first_player; pl != NULL; pl = pl->next) |
374 | for (pl = first_player; pl != NULL; pl = pl->next) |
381 | if (pl->ob != NULL && pl->ob->map == map && pl->ob != op1 && pl->ob != op2) |
375 | if (pl->ob != NULL && pl->ob->map == map && pl->ob != op1 && pl->ob != op2) |
… | |
… | |
387 | /** |
381 | /** |
388 | * Writes to everyone on the specified map |
382 | * Writes to everyone on the specified map |
389 | */ |
383 | */ |
390 | |
384 | |
391 | void |
385 | void |
392 | new_info_map (int color, mapstruct *map, const char *str) |
386 | new_info_map (int color, maptile *map, const char *str) |
393 | { |
387 | { |
394 | player *pl; |
388 | player *pl; |
395 | |
389 | |
396 | for (pl = first_player; pl != NULL; pl = pl->next) |
390 | for (pl = first_player; pl != NULL; pl = pl->next) |
397 | if (pl->ob != NULL && pl->ob->map == map) |
391 | if (pl->ob != NULL && pl->ob->map == map) |
… | |
… | |
512 | static void |
506 | static void |
513 | magic_mapping_mark_recursive (object *pl, char *map_mark, int px, int py) |
507 | magic_mapping_mark_recursive (object *pl, char *map_mark, int px, int py) |
514 | { |
508 | { |
515 | int x, y, dx, dy, mflags; |
509 | int x, y, dx, dy, mflags; |
516 | sint16 nx, ny; |
510 | sint16 nx, ny; |
517 | mapstruct *mp; |
511 | maptile *mp; |
518 | New_Face *f; |
512 | New_Face *f; |
519 | |
513 | |
520 | for (dx = -1; dx <= 1; dx++) |
514 | for (dx = -1; dx <= 1; dx++) |
521 | { |
515 | { |
522 | for (dy = -1; dy <= 1; dy++) |
516 | for (dy = -1; dy <= 1; dy++) |
… | |
… | |
578 | void |
572 | void |
579 | magic_mapping_mark (object *pl, char *map_mark, int strength) |
573 | magic_mapping_mark (object *pl, char *map_mark, int strength) |
580 | { |
574 | { |
581 | int x, y, mflags; |
575 | int x, y, mflags; |
582 | sint16 nx, ny; |
576 | sint16 nx, ny; |
583 | mapstruct *mp; |
577 | maptile *mp; |
584 | New_Face *f; |
578 | New_Face *f; |
585 | |
579 | |
586 | for (x = -strength; x < strength; x++) |
580 | for (x = -strength; x < strength; x++) |
587 | { |
581 | { |
588 | for (y = -strength; y < strength; y++) |
582 | for (y = -strength; y < strength; y++) |