From: Christian Heller Date: Mon, 10 Mar 2014 07:29:23 +0000 (+0100) Subject: Removed scoring. X-Git-Tag: tce~835 X-Git-Url: https://plomlompom.com/repos/%7B%7Bitem_name%7D%7D?a=commitdiff_plain;h=eb96a1dfe83cef7f3d1c0c73e03b915caca09db8;p=plomrogue Removed scoring. --- diff --git a/confclient/interface_conf b/confclient/interface_conf index da4442d..561d950 100644 --- a/confclient/interface_conf +++ b/confclient/interface_conf @@ -66,7 +66,7 @@ Inventory % i Info -3 +2 33 % k @@ -76,7 +76,7 @@ Available keys % l Log --10 +-9 33 % m diff --git a/src/client/draw_wins.c b/src/client/draw_wins.c index 7cdb0b5..129148c 100644 --- a/src/client/draw_wins.c +++ b/src/client/draw_wins.c @@ -340,14 +340,10 @@ extern void draw_win_info(struct Win * win) { char * dsc_turn = "Turn: "; char * dsc_hitpoints = "\nHitpoints: "; - char * dsc_score = "\nScore: "; - uint16_t maxl = strlen(dsc_turn) + strlen(dsc_hitpoints) + strlen(dsc_score) - + 5 + 3 + 5; /* Max strlens of strings of numbers to use. */ + uint16_t maxl = strlen(dsc_turn) + 5 + strlen(dsc_hitpoints) + 3; char text[maxl + 1]; - sprintf(text, "%s%d%s%d%s%d", - dsc_turn, world.turn, - dsc_hitpoints, world.player_lifepoints, - dsc_score, world.player_score); + sprintf(text, "%s%d%s%d", + dsc_turn, world.turn, dsc_hitpoints, world.player_lifepoints); add_text_with_linebreaks(win, text); } diff --git a/src/client/io.c b/src/client/io.c index a4dc7f3..27a0e0f 100644 --- a/src/client/io.c +++ b/src/client/io.c @@ -196,7 +196,6 @@ static uint8_t read_world() uint32_t linemax = textfile_width(file); char * read_buf = try_malloc(linemax + 1, f_name); world.turn = read_value_from_line(read_buf, linemax, file); - world.player_score = read_value_from_line(read_buf, linemax, file); world.player_lifepoints = read_value_from_line(read_buf, linemax, file); read_inventory(read_buf, linemax, file); world.player_pos.y = read_value_from_line(read_buf, linemax, file); diff --git a/src/client/world.h b/src/client/world.h index 7d1ccbe..5b92f2e 100644 --- a/src/client/world.h +++ b/src/client/world.h @@ -33,7 +33,6 @@ struct World char * delim; /* delimiter for multi-line blocks in config files */ struct yx_uint8 player_pos; /* coordinates of player on map */ uint16_t turn; /* world/game turn */ - uint16_t player_score; /* player's score*/ uint8_t halfdelay; /* how long to wait for getch() input in io_loop() */ uint8_t player_inventory_select; /* index of selected item in inventory */ uint8_t player_lifepoints; /* how alive the player is */ diff --git a/src/server/init.c b/src/server/init.c index 4e885fe..c06619f 100644 --- a/src/server/init.c +++ b/src/server/init.c @@ -53,7 +53,6 @@ extern void remake_world(uint32_t seed) world.log = NULL; /* map_object_action.c's update_log() checks for this. */ world.seed = seed; world.map_obj_count = 0; - world.score = 0; free(world.map.cells); free_map_objects(world.map_objs); world.last_update_turn = 0; diff --git a/src/server/io.c b/src/server/io.c index 1de0bd0..177c295 100644 --- a/src/server/io.c +++ b/src/server/io.c @@ -126,7 +126,6 @@ static void update_out_file() FILE * file = try_fopen(path_tmp, "w", f_name); struct MapObj * player = get_player(); write_value_as_line(world.turn, file); - write_value_as_line(world.score, file); write_value_as_line(player->lifepoints, file); write_inventory(player, file); write_value_as_line(player->pos.y, file); diff --git a/src/server/map_object_actions.c b/src/server/map_object_actions.c index a30809b..c3ffaf1 100644 --- a/src/server/map_object_actions.c +++ b/src/server/map_object_actions.c @@ -137,10 +137,6 @@ static void actor_hits_actor(struct MapObj * hitter, struct MapObj * hitted) return; } update_log(" It dies."); - if (player == hitter) - { - world.score = world.score + mod_hitted->lifepoints; - } } } diff --git a/src/server/world.h b/src/server/world.h index c17fd60..84235ce 100644 --- a/src/server/world.h +++ b/src/server/world.h @@ -33,7 +33,6 @@ struct World uint16_t replay; /* Turn up to which to replay game. No replay if zero. */ uint16_t turn; /* Current game turn. */ uint16_t last_update_turn; /* Last turn the .path_out file was updated. */ - uint16_t score; /* Player's score. */ uint8_t is_verbose; /* Should server send debugging info to stdout? */ uint8_t map_obj_count; /* Counts map objects generated so far. */ };