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:
3663e51
)
Don't abort replay on last turn.
author
Christian Heller
<c.heller@plomlompom.de>
Mon, 3 Jun 2013 17:10:47 +0000
(19:10 +0200)
committer
Christian Heller
<c.heller@plomlompom.de>
Mon, 3 Jun 2013 17:10:47 +0000
(19:10 +0200)
roguelike.c
patch
|
blob
|
history
diff --git
a/roguelike.c
b/roguelike.c
index d7347261125487598cef36082a5f2c4d2c09c060..5d4207175f9031e568bb05d0bf90ac862d1fa62a 100644
(file)
--- a/
roguelike.c
+++ b/
roguelike.c
@@
-347,14
+347,15
@@
int main (int argc, char *argv[]) {
int key;
unsigned char quit_called;
if (0 == world.interactive) {
int key;
unsigned char quit_called;
if (0 == world.interactive) {
+ unsigned char still_reading_file = 1;
int action;
while (1) {
draw_all_windows (&win_meta);
key = getch();
int action;
while (1) {
draw_all_windows (&win_meta);
key = getch();
- if (key == get_action_key(world.keybindings, "wait / next turn") ) {
+ if (
1 == still_reading_file &&
key == get_action_key(world.keybindings, "wait / next turn") ) {
action = getc(file);
if (EOF == action)
action = getc(file);
if (EOF == action)
-
break
;
+
still_reading_file = 0
;
else if (0 == action)
player_wait (&world);
else if ('s' == action)
else if (0 == action)
player_wait (&world);
else if ('s' == action)