comparison urogue/main.c @ 272:1db299e868b8

UltraRogue: add the autosave feature. UltraRogue now automatically saves the game when SIGHUP or SIGTERM is received.
author John "Elwin" Edwards
date Sun, 03 Sep 2017 19:58:22 -0400
parents a413bc97d3ea
children 51ddbe7b992d
comparison
equal deleted inserted replaced
271:88bd51f231e7 272:1db299e868b8
195 scale = (float) (LINES * COLS) / (80.0F * 25.0F); /* get food right for */ 195 scale = (float) (LINES * COLS) / (80.0F * 25.0F); /* get food right for */
196 /* different screen sizes */ 196 /* different screen sizes */
197 197
198 food_left = (int) (food_left * scale); 198 food_left = (int) (food_left * scale);
199 199
200 md_onsignal_autosave();
201
200 /* Set up windows */ 202 /* Set up windows */
201 203
202 cw = newwin(LINES, COLS, 0, 0); 204 cw = newwin(LINES, COLS, 0, 0);
203 mw = newwin(LINES, COLS, 0, 0); 205 mw = newwin(LINES, COLS, 0, 0);
204 hw = newwin(LINES, COLS, 0, 0); 206 hw = newwin(LINES, COLS, 0, 0);
270 endwin(); 272 endwin();
271 printf("\n"); /* So the cursor doesn't stop at the end of the line */ 273 printf("\n"); /* So the cursor doesn't stop at the end of the line */
272 exit(100); 274 exit(100);
273 } 275 }
274 276
277 void
278 fatal_handler(int sig)
279 {
280 fatal("");
281 }
282
275 /* 283 /*
276 rnd() 284 rnd()
277 Pick a very random number. 285 Pick a very random number.
278 */ 286 */
279 287