/* src/server/io.c */
-#define _POSIX_C_SOURCE 199309L
+#define _POSIX_C_SOURCE 200112L /* snrpintf() */
#include "io.h"
#include <errno.h> /* global errno */
#include <limits.h> /* PIPE_BUF */
#include "../common/rexit.h" /* exit_trouble() */
#include "../common/try_malloc.h" /* try_malloc() */
#include "cleanup.h" /* set_cleanup_flag() */
-#include "field_of_view.h" /* VISIBLE */
#include "hardcoded_strings.h" /* s */
#include "things.h" /* Thing, ThingType, ThingAction, get_thing_type(),
* get_player()
uint32_t pos_i;
for (pos_i = 0; pos_i < map_size; pos_i++)
{
- if (player->fov_map[pos_i] & VISIBLE)
+ if (player->fov_map[pos_i] == 'v')
{
visible_map[pos_i] = world.map.cells[pos_i];
}
{
for (t = world.things; t != 0; t = t->next)
{
- if ( ( player->fov_map[t->pos.y * world.map.length +t->pos.x]
- & VISIBLE)
+ if ( 'v'==player->fov_map[t->pos.y*world.map.length+t->pos.x]
&& ( (0 == i && 0 == t->lifepoints)
|| (1 == i && 0 < t->lifepoints)))
{