Mercurial > hg > early-roguelike
comparison srogue/global.c @ 173:78fa1d0e5d25
srogue: open the score and log files when the program starts.
Super-Rogue can now use the same privilege-dropping scheme as the other
games.
| author | John "Elwin" Edwards |
|---|---|
| date | Sat, 01 Aug 2015 15:12:11 -0400 |
| parents | ee250e3646fd |
| children | d3968e9cb98d |
comparison
equal
deleted
inserted
replaced
| 172:c199a15a2c70 | 173:78fa1d0e5d25 |
|---|---|
| 52 int food_left = HUNGERTIME; /* Amount of food stomach */ | 52 int food_left = HUNGERTIME; /* Amount of food stomach */ |
| 53 int group = NEWGROUP; /* Current group number */ | 53 int group = NEWGROUP; /* Current group number */ |
| 54 int hungry_state = F_OKAY; /* How hungry is he */ | 54 int hungry_state = F_OKAY; /* How hungry is he */ |
| 55 int foodlev = 1; /* how fast he eats food */ | 55 int foodlev = 1; /* how fast he eats food */ |
| 56 int ringfood = 0; /* rings affect on food consumption */ | 56 int ringfood = 0; /* rings affect on food consumption */ |
| 57 int scorefd = -1; /* Scoreboard file descriptor */ | |
| 57 char take; /* Thing the rogue is taking */ | 58 char take; /* Thing the rogue is taking */ |
| 58 char runch; /* Direction player is running */ | 59 char runch; /* Direction player is running */ |
| 59 char curpurch[15]; /* name of item ready to buy */ | 60 char curpurch[15]; /* name of item ready to buy */ |
| 60 | 61 |
| 61 char prbuf[LINLEN]; /* Buffer for sprintfs */ | 62 char prbuf[LINLEN]; /* Buffer for sprintfs */ |
| 98 char retstr[] = { "[Press return to continue]" }; | 99 char retstr[] = { "[Press return to continue]" }; |
| 99 char wizstr[] = { "Wizards Password: " }; | 100 char wizstr[] = { "Wizards Password: " }; |
| 100 char illegal[] = { "Illegal command '%s'." }; | 101 char illegal[] = { "Illegal command '%s'." }; |
| 101 char callit[] = { "Call it: " }; | 102 char callit[] = { "Call it: " }; |
| 102 char starlist[] = { " (* for a list)" }; | 103 char starlist[] = { " (* for a list)" }; |
| 104 | |
| 105 FILE *logfile = NULL; | |
| 103 | 106 |
| 104 struct coord oldpos; /* Pos before last look() call */ | 107 struct coord oldpos; /* Pos before last look() call */ |
| 105 struct coord delta; /* Change indicated to get_dir() */ | 108 struct coord delta; /* Change indicated to get_dir() */ |
| 106 struct coord stairs; /* where the stairs are put */ | 109 struct coord stairs; /* where the stairs are put */ |
| 107 struct coord rndspot = { -1, -1 }; /* for random teleporting */ | 110 struct coord rndspot = { -1, -1 }; /* for random teleporting */ |
