Changeset 538 for trunk/src/main-win.c
- Timestamp:
- 08/19/07 12:46:27 (1 year ago)
- Files:
-
- trunk/src/main-win.c (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/main-win.c
r529 r538 661 661 }; 662 662 663 #include "game-cmd.h" 664 665 static game_command cmd = { CMD_NULL, 0 }; 666 663 667 #if 0 664 668 /* … … 2946 2950 /* Next arg */ 2947 2951 p = strchr(s, ' '); 2948 2952 2949 2953 /* Tokenize */ 2950 2954 if (p) *p = '\0'; … … 2956 2960 validate_file(savefile); 2957 2961 2958 /* Game in progress */ 2959 game_in_progress = TRUE; 2960 2961 Term_fresh(); 2962 2963 /* Play game */ 2964 play_game(FALSE); 2965 2966 /* Quit */ 2967 quit(NULL); 2962 /* Set the command now so that we skip the "Open File" prompt. */ 2963 cmd.command = CMD_LOADFILE; 2968 2964 } 2969 2965 … … 3159 3155 else 3160 3156 { 3161 game_in_progress = TRUE; 3162 Term_flush(); 3163 play_game(TRUE); 3164 quit(NULL); 3157 /* We'll return NEWGAME to the game. */ 3158 cmd.command = CMD_NEWGAME; 3165 3159 } 3166 3160 break; … … 3194 3188 /* Load 'savefile' */ 3195 3189 validate_file(savefile); 3196 game_in_progress = TRUE; 3197 Term_flush(); 3198 play_game(FALSE); 3199 quit(NULL); 3190 3191 /* We'll return NEWGAME to the game. */ 3192 cmd.command = CMD_LOADFILE; 3200 3193 } 3201 3194 } … … 4554 4547 4555 4548 exit(0); 4549 } 4550 4551 4552 static game_command get_init_cmd() 4553 { 4554 MSG msg; 4555 4556 /* Prompt the user */ 4557 prt("[Choose 'New' or 'Open' from the 'File' menu]", 23, 17); 4558 Term_fresh(); 4559 4560 /* Process messages forever */ 4561 while (cmd.command == CMD_NULL && GetMessage(&msg, NULL, 0, 0)) 4562 { 4563 TranslateMessage(&msg); 4564 DispatchMessage(&msg); 4565 } 4566 4567 /* Bit of a hack, we'll do this when we leave the INIT context in future. */ 4568 game_in_progress = TRUE; 4569 4570 return cmd; 4556 4571 } 4557 4572 … … 4709 4724 WNDCLASS wc; 4710 4725 HDC hdc; 4711 MSG msg;4712 4726 4713 4727 /* Unused parameter */ … … 4843 4857 ANGBAND_SYS = "win"; 4844 4858 4845 /* Initialize */4846 init_angband();4847 4848 /* We are now initialized */4849 initialized = TRUE;4850 4851 4859 #ifdef USE_SAVER 4852 4860 if (screensaver) … … 4870 4878 check_for_save_file(lpCmdLine); 4871 4879 4872 /* Prompt the user*/4873 prt("[Choose 'New' or 'Open' from the 'File' menu]", 23, 17);4874 Term_fresh(); 4875 4876 /* Process messages forever */4877 while (GetMessage(&msg, NULL, 0, 0)) 4878 {4879 TranslateMessage(&msg); 4880 DispatchMessage(&msg);4881 }4880 /* Set command hook */ 4881 get_game_command = get_init_cmd; 4882 4883 /* Set up the display handlers and things. */ 4884 init_display(); 4885 4886 initialized = TRUE; 4887 4888 /* Play the game */ 4889 play_game(); 4882 4890 4883 4891 /* Paranoia */
