X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=src%2Fmain-win.c;h=b698e1b3b3c2bb6764731c3c160d3fbb7bac37e1;hb=4c7ac6eeee33d7d5cdaf7d2d3315e8e1d84602bb;hp=0bf6c49e729926950e80fd6f272aad9bb8fefabd;hpb=e5c5db1804aee689c03039ebc9aeca387091c854;p=hengband%2Fhengband.git diff --git a/src/main-win.c b/src/main-win.c index 0bf6c49e7..b698e1b3b 100644 --- a/src/main-win.c +++ b/src/main-win.c @@ -103,6 +103,7 @@ #define IDM_FILE_OPEN 101 #define IDM_FILE_SAVE 110 #define IDM_FILE_SCORE 120 +#define IDM_FILE_MOVIE 121 #define IDM_FILE_EXIT 130 #define IDM_WINDOW_VIS_0 200 @@ -2644,8 +2645,7 @@ static errr Term_text_win(int x, int y, int n, byte a, const char *s) rc.right += td->tile_wid; } else { /* Dump the text */ - ExtTextOut(hdc, rc.left, rc.top, ETO_CLIPPED, &rc, - s+i, 1, NULL); + ExtTextOut(hdc, rc.left, rc.top, ETO_CLIPPED, &rc, s+i, 1, NULL); /* Advance */ rc.left += td->tile_wid; @@ -3669,6 +3669,49 @@ static void process_menus(WORD wCmd) break; } + /* Open game */ + case IDM_FILE_MOVIE: + { + if (!initialized) + { +#ifdef JP + plog("¤Þ¤À½é´ü²½Ãæ¤Ç¤¹..."); +#else + plog("You cannot do that yet..."); +#endif + } + else if (game_in_progress) + { +#ifdef JP + plog("¥×¥ì¥¤Ãæ¤Ï¥à¡¼¥Ó¡¼¤ò¥í¡¼¥É¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤»¤ó¡ª"); +#else + plog("You can't open a movie while you're playing!"); +#endif + } + else + { + memset(&ofn, 0, sizeof(ofn)); + ofn.lStructSize = sizeof(ofn); + ofn.hwndOwner = data[0].w; + ofn.lpstrFilter = "Angband Movie Files (*.amv)\0*.amv\0"; + ofn.nFilterIndex = 1; + ofn.lpstrFile = savefile; + ofn.nMaxFile = 1024; + ofn.lpstrInitialDir = ANGBAND_DIR_USER; + ofn.Flags = OFN_FILEMUSTEXIST | OFN_NOCHANGEDIR; + + if (GetOpenFileName(&ofn)) + { + /* Load 'savefile' */ + prepare_browse_movie_aux(savefile); + play_game(FALSE); + quit(NULL); + return; + } + } + break; + } + case IDM_WINDOW_VIS_0: { @@ -5426,7 +5469,6 @@ int FAR PASCAL WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, /* We are now initialized */ initialized = TRUE; - #ifdef CHUUKEI if(lpCmdLine[0] == '-'){ switch(lpCmdLine[1]) @@ -5455,6 +5497,15 @@ int FAR PASCAL WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, quit(NULL); return 0; } + case 'X': + case 'x': + { + if (!lpCmdLine[2]) break; + prepare_browse_movie(&lpCmdLine[2]); + play_game(FALSE); + quit(NULL); + return 0; + } } } #endif