home
·
contact
·
privacy
projects
/
plomrogue
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
38df31d
)
Removed scoring.
author
Christian Heller
<c.heller@plomlompom.de>
Mon, 10 Mar 2014 07:29:23 +0000
(08:29 +0100)
committer
Christian Heller
<c.heller@plomlompom.de>
Mon, 10 Mar 2014 07:29:23 +0000
(08:29 +0100)
confclient/interface_conf
patch
|
blob
|
history
src/client/draw_wins.c
patch
|
blob
|
history
src/client/io.c
patch
|
blob
|
history
src/client/world.h
patch
|
blob
|
history
src/server/init.c
patch
|
blob
|
history
src/server/io.c
patch
|
blob
|
history
src/server/map_object_actions.c
patch
|
blob
|
history
src/server/world.h
patch
|
blob
|
history
diff --git
a/confclient/interface_conf
b/confclient/interface_conf
index da4442dd39a59799bddec60921d8f8ee20894429..561d950de6cdde615d0f737848dfbc072fa9c3f5 100644
(file)
--- a/
confclient/interface_conf
+++ b/
confclient/interface_conf
@@
-66,7
+66,7
@@
Inventory
%
i
Info
%
i
Info
-3
+2
33
%
k
33
%
k
@@
-76,7
+76,7
@@
Available keys
%
l
Log
%
l
Log
--
10
+-
9
33
%
m
33
%
m
diff --git
a/src/client/draw_wins.c
b/src/client/draw_wins.c
index 7cdb0b5134668af19474c541fa0e39d94cb0a5e6..129148c00886916d62ab9eb8b332d295dbfb3572 100644
(file)
--- 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_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];
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);
}
add_text_with_linebreaks(win, text);
}
diff --git
a/src/client/io.c
b/src/client/io.c
index a4dc7f321b6e764714fc52410f0c32f51fc68d37..27a0e0f46d623fc2b31be94c074a2c953d61becb 100644
(file)
--- 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);
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);
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 7d1ccbe79dc8590198f9e7166a461e707518a926..5b92f2e6ba046f19b0479264825cbd27811f2da3 100644
(file)
--- 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 */
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 */
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 4e885fee3855a39293f9f764d9950e984de64117..c06619fc46cffc682480923d0bebd8140152fcbb 100644
(file)
--- 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.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;
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 1de0bd07c9b6367fadc917bde2f19f500d341fdb..177c2952faca109802c355b36eb8c22d6a1607ef 100644
(file)
--- 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);
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);
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 a30809b33336dbea3695bd3d471f796cb111df7f..c3ffaf1e287b71580ec3e55effca07ec01a78d10 100644
(file)
--- 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.");
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 c17fd60be34a652e4c2470b5c789e28e42048a9c..84235ce42d2622a3dab38577c8b0bc1a5d3d2bf5 100644
(file)
--- 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 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. */
};
uint8_t is_verbose; /* Should server send debugging info to stdout? */
uint8_t map_obj_count; /* Counts map objects generated so far. */
};