Mercurial > hg > early-roguelike
comparison arogue7/rogue.c @ 279:d3968e9cb98d
Use C stdio functions for score files and save files.
Switching from Unix file descriptor operations to C standard FILE*
functions will reduce portability problems.
| author | John "Elwin" Edwards |
|---|---|
| date | Fri, 15 Sep 2017 19:57:54 -0400 |
| parents | ca876944b196 |
| children | 0250220d8cdd |
comparison
equal
deleted
inserted
replaced
| 278:c222f9d56776 | 279:d3968e9cb98d |
|---|---|
| 78 int chant_time = 0; | 78 int chant_time = 0; |
| 79 int pray_time = 0; | 79 int pray_time = 0; |
| 80 int spell_power = 0; | 80 int spell_power = 0; |
| 81 int turns = 0; /* Number of turns player has taken */ | 81 int turns = 0; /* Number of turns player has taken */ |
| 82 int quest_item = 0; /* Item player is looking for */ | 82 int quest_item = 0; /* Item player is looking for */ |
| 83 int scorefd = -1; /* File descriptor for score file */ | |
| 84 int cols = 0; /* number of columns in terminal */ | 83 int cols = 0; /* number of columns in terminal */ |
| 85 int lines = 0; /* number of lines on the terminal */ | 84 int lines = 0; /* number of lines on the terminal */ |
| 86 char nfloors = -1; /* Number of floors in this dungeon */ | 85 char nfloors = -1; /* Number of floors in this dungeon */ |
| 87 char curpurch[LINELEN]; /* name of item ready to buy */ | 86 char curpurch[LINELEN]; /* name of item ready to buy */ |
| 88 char PLAYER = VPLAYER; /* what the player looks like */ | 87 char PLAYER = VPLAYER; /* what the player looks like */ |
| 132 bool firstmove = FALSE; | 131 bool firstmove = FALSE; |
| 133 bool askme = TRUE; | 132 bool askme = TRUE; |
| 134 bool in_shell = FALSE; | 133 bool in_shell = FALSE; |
| 135 bool daytime = TRUE; | 134 bool daytime = TRUE; |
| 136 bool use_savedir = FALSE; | 135 bool use_savedir = FALSE; |
| 136 FILE *scoreboard = NULL; /* Score file */ | |
| 137 FILE *logfile = NULL; | 137 FILE *logfile = NULL; |
| 138 LEVTYPE levtype; /* type of level i'm on */ | 138 LEVTYPE levtype; /* type of level i'm on */ |
| 139 | 139 |
| 140 char *nothing = "Nothing seems to happen."; | 140 char *nothing = "Nothing seems to happen."; |
| 141 char *spacemsg = "--Press space to continue--"; | 141 char *spacemsg = "--Press space to continue--"; |
