From: Christian Heller Date: Tue, 27 Aug 2013 03:47:35 +0000 (+0200) Subject: Improved comments. X-Git-Tag: tce~1020 X-Git-Url: https://plomlompom.com/repos/%7B%7B%20web_path%20%7D%7D/%7B%7Bdb.prefix%7D%7D/condition_titles?a=commitdiff_plain;h=dec2d178db21e98981c87bb2e4b46fed3b2c06c8;p=plomrogue Improved comments. --- diff --git a/src/draw_wins.c b/src/draw_wins.c index 1b4f0ac..cb640f0 100644 --- a/src/draw_wins.c +++ b/src/draw_wins.c @@ -211,7 +211,7 @@ extern void draw_info_win(struct Win * win) char * dsc_hitpoints = "\nHitpoints: "; char * dsc_score = "\nScore: "; uint16_t maxl = strlen(dsc_turn) + strlen(dsc_hitpoints) + strlen(dsc_score) - + 10 + 5 + 10; /* max strlens of numbers to be used */ + + 10 + 5 + 10; /* max strlens of numbers to be used */ char * text = malloc(maxl + 1); sprintf(text, "%s%d%s%d%s%d", dsc_turn, world->turn, diff --git a/src/map_object_actions.c b/src/map_object_actions.c index bc6e473..c0d43e7 100644 --- a/src/map_object_actions.c +++ b/src/map_object_actions.c @@ -21,8 +21,9 @@ static void monster_bumps_monster(struct World * world, char * dsc_monster1, */ static void monster_hits_player(struct World * world, char * dsc_monster); -/* Decrement HP of "monster" hit by player, kill it if its HP hit zero; log the - * whole action. +/* Decrement HP of "monster" hit by player, kill it if its HP hit zero, create a + * corpse and increment player's score by the amount of hitpoints the monster + * started with; log the whole action. */ static void player_hits_monster(struct World * world, struct Monster * monster); diff --git a/src/map_object_actions.h b/src/map_object_actions.h index 2edc172..6034611 100644 --- a/src/map_object_actions.h +++ b/src/map_object_actions.h @@ -25,8 +25,10 @@ extern void move_monster(struct World * world, struct Monster * monster); /* Try to move player in direction "d". On contact with monster, fight / reduce - * monster's hitpoints, and thereby potentially trigger the monster's death. - * Update the log on whatever the player did and turn control over to the enemy. + * monster's hitpoints, and thereby potentially trigger the monster's death, + * create a corpse and increment the player's score by the amount of hitpoints + * the monster started with. Update the log on whatever the player did and turn + * control over to the enemy. */ extern void move_player (struct World * world, enum dir d);