program_state moved to g.

This commit is contained in:
Bart House
2018-12-25 10:09:04 -08:00
parent ab73df996f
commit b1ab64db43
45 changed files with 130 additions and 132 deletions
+4 -4
View File
@@ -452,16 +452,16 @@ MainWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
case WM_CLOSE: {
/* exit gracefully */
if (program_state.gameover) {
if (g.program_state.gameover) {
/* assume the user really meant this, as the game is already
* over... */
/* to make sure we still save bones, just set stop printing flag
*/
program_state.stopprint++;
g.program_state.stopprint++;
NHEVENT_KBD(
'\033'); /* and send keyboard input as if user pressed ESC */
/* additional code for this is done in menu and rip windows */
} else if (!program_state.something_worth_saving) {
} else if (!g.program_state.something_worth_saving) {
/* User exited before the game started, e.g. during splash display
*/
/* Just get out. */
@@ -837,7 +837,7 @@ onWMCommand(HWND hWnd, WPARAM wParam, LPARAM lParam)
case IDM_SAVE:
if (iflags.debug_fuzzer)
break;
if (!program_state.gameover && !program_state.done_hup)
if (!g.program_state.gameover && !g.program_state.done_hup)
dosave();
else
MessageBeep(0);