home · contact · privacy
Server: Minor code-stylistic corrections.
authorChristian Heller <c.heller@plomlompom.de>
Sat, 16 Aug 2014 18:17:49 +0000 (20:17 +0200)
committerChristian Heller <c.heller@plomlompom.de>
Sat, 16 Aug 2014 18:17:49 +0000 (20:17 +0200)
src/server/ai.c
src/server/io.c

index d05f58408db8ab113b07c48f4b4885bbcdfaff37..b6c8cbc4f77316f03b84ceb530f7447ff44ada92 100644 (file)
@@ -189,7 +189,7 @@ static uint8_t get_dir_to_nearest_thing(struct Thing * t_eye, char filter)
     if (seeing_thing(t_eye, filter))
     {
         uint32_t map_size = world.map.length * world.map.length;
-        uint16_t * score_map = try_malloc(map_size * sizeof(uint16_t), __func__);
+        uint16_t * score_map = try_malloc(map_size * sizeof(uint16_t),__func__);
         init_score_map(filter, score_map, map_size, t_eye);
         dijkstra_map(score_map, UINT16_MAX-1);
         uint16_t neighbors[N_DIRS];
index 14b5e48efaa79016d21269336c765eef7707b051..0f65cea8c5e36060fa094af9eccd2f03629412b8 100644 (file)
@@ -322,7 +322,7 @@ static char * build_visible_map(struct Thing * player)
         {
             for (t = world.things; t != 0; t = t->next)
             {
-                if ('v'==player->fov_map[t->pos.y*world.map.length+t->pos.x])
+                if ('v' == player->fov_map[t->pos.y*world.map.length+t->pos.x])
                 {
                     struct ThingType * tt = get_thing_type(t->type);
                     if (   (0 == i && !t->lifepoints && !tt->consumable)
@@ -358,7 +358,7 @@ static void write_map(struct Thing * player, FILE * file)
     {
         for (x = 0; x < world.map.length; x++)
         {
-            try_fputc(player->mem_map[y * world.map.length + x], file, __func__);
+            try_fputc(player->mem_map[y*world.map.length+x], file, __func__);
         }
         try_fputc('\n', file, __func__);
     }