comparison arogue5/rogue.c @ 145:aac28331e71d

Advanced Rogue family: fix the "score" option. Changing the score file (when permitted) now works again, closing the old score file and opening the new one.
author John "Elwin" Edwards
date Wed, 20 May 2015 08:42:17 -0400
parents ee250e3646fd
children d3968e9cb98d
comparison
equal deleted inserted replaced
144:708bb2dea17c 145:aac28331e71d
62 int trap_tries = 0; 62 int trap_tries = 0;
63 int pray_time = 0; 63 int pray_time = 0;
64 int spell_power = 0; 64 int spell_power = 0;
65 int turns = 0; /* Number of turns player has taken */ 65 int turns = 0; /* Number of turns player has taken */
66 int quest_item = 0; /* Item player is looking for */ 66 int quest_item = 0; /* Item player is looking for */
67 int scorefd = -1; /* File descriptor for the scorefile */
67 char nfloors = -1; /* Number of floors in this dungeon */ 68 char nfloors = -1; /* Number of floors in this dungeon */
68 char curpurch[LINELEN*2]; /* name of item ready to buy */ 69 char curpurch[LINELEN*2]; /* name of item ready to buy */
69 char PLAYER = VPLAYER; /* what the player looks like */ 70 char PLAYER = VPLAYER; /* what the player looks like */
70 char take; /* Thing the rogue is taking */ 71 char take; /* Thing the rogue is taking */
71 char prbuf[LINELEN*2]; /* Buffer for sprintfs */ 72 char prbuf[LINELEN*2]; /* Buffer for sprintfs */
121 char *nothing = "Nothing seems to happen."; 122 char *nothing = "Nothing seems to happen.";
122 char *spacemsg = "--Press space to continue--"; 123 char *spacemsg = "--Press space to continue--";
123 char *morestr = "-- More --"; 124 char *morestr = "-- More --";
124 char *retstr = "[Press return to continue]"; 125 char *retstr = "[Press return to continue]";
125 126
127 FILE *logfile = NULL;
126 128
127 /* 129 /*
128 * NOTE: the ordering of the points in this array is critical. They MUST 130 * NOTE: the ordering of the points in this array is critical. They MUST
129 * be listed in the following sequence: 131 * be listed in the following sequence:
130 * 132 *