From: Christian Heller Date: Sat, 16 Aug 2014 18:17:49 +0000 (+0200) Subject: Server: Minor code-stylistic corrections. X-Git-Tag: tce~658 X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/static/%7B%7B%20web_path%20%7D%7D/%7B%7Bdb.prefix%7D%7D/%27%29;%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20chunks.push%28escapeHTML%28span%5B2%5D%29%29;%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20chunks.push%28%27?a=commitdiff_plain;h=49ffd1e026de8e5175dbe52a24584fb00d9340aa;p=plomrogue Server: Minor code-stylistic corrections. --- diff --git a/src/server/ai.c b/src/server/ai.c index d05f584..b6c8cbc 100644 --- a/src/server/ai.c +++ b/src/server/ai.c @@ -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]; diff --git a/src/server/io.c b/src/server/io.c index 14b5e48..0f65cea 100644 --- a/src/server/io.c +++ b/src/server/io.c @@ -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__); }