# endif
#endif
- /*
- * Available graphic modes
- */
+/*
+ * Available graphic modes
+ */
#define GRAPHICS_NONE 0
#define GRAPHICS_ORIGINAL 1
#define GRAPHICS_ADAM_BOLT 2
#define GRAPHICS_HENGBAND 3
- /*
- * Hack -- allow use of "screen saver" mode
- */
-#define USE_SAVER
-
-
- /*
- * Menu constants -- see "ANGBAND.RC"
- */
-
+/*
+ * Menu constants -- see "ANGBAND.RC"
+ */
#define IDM_FILE_NEW 100
#define IDM_FILE_OPEN 101
#define IDM_FILE_SAVE 110
static int use_bg = 0; //!< 背景使用フラグ、1なら私用。
static char bg_bitmap_file[1024] = "bg.bmp"; //!< 現在の背景ビットマップファイル名。
-#ifdef USE_SAVER
-
/*
* The screen saver window
*/
static HWND hwndSaver;
-#endif /* USE_SAVER */
-
-
/*!
* 現在使用中のタイルID(0ならば未使用)
* Flag set once "graphics" has been initialized
*/
static DIBINIT infMask;
-
/*
* Flag set once "sound" has been initialized
*/
(use_bg ? MF_CHECKED : MF_UNCHECKED));
#ifdef JP
#else
-
CheckMenuItem(hm, IDM_OPTIONS_SAVER,
(hwndSaver ? MF_CHECKED : MF_UNCHECKED));
#endif
-
- /* Menu "Options", Item "Graphics" */
EnableMenuItem(hm, IDM_OPTIONS_NO_GRAPHICS, MF_ENABLED);
- /* Menu "Options", Item "Graphics" */
EnableMenuItem(hm, IDM_OPTIONS_OLD_GRAPHICS, MF_ENABLED);
- /* Menu "Options", Item "Graphics" */
EnableMenuItem(hm, IDM_OPTIONS_NEW_GRAPHICS, MF_ENABLED);
- /* Menu "Options", Item "Graphics" */
EnableMenuItem(hm, IDM_OPTIONS_BIGTILE, MF_ENABLED);
-
- /* Menu "Options", Item "Sound" */
EnableMenuItem(hm, IDM_OPTIONS_SOUND, MF_ENABLED);
-
-#ifdef USE_SAVER
- /* Menu "Options", Item "ScreenSaver" */
EnableMenuItem(hm, IDM_OPTIONS_SAVER,
MF_BYCOMMAND | MF_ENABLED);
-#endif /* USE_SAVER */
}
*/
static void process_menus(player_type *player_ptr, WORD wCmd)
{
- int i;
-
term_data *td;
-
OPENFILENAME ofn;
-
- /* Analyze */
switch (wCmd)
{
- /* New game */
case IDM_FILE_NEW:
{
if (!initialized)
}
break;
}
-
- /* Open game */
case IDM_FILE_OPEN:
{
if (!initialized)
if (GetOpenFileName(&ofn))
{
- /* Load 'savefile' */
validate_file(savefile);
game_in_progress = TRUE;
Term_flush();
}
break;
}
-
- /* Save game */
case IDM_FILE_SAVE:
{
if (game_in_progress && current_world_ptr->character_generated)
break;
}
- /* Hack -- Forget messages */
msg_flag = FALSE;
-
- /* Save the game */
do_cmd_save_game(player_ptr, FALSE);
}
else
{
plog(_("今、セーブすることは出来ません。", "You may not do that right now."));
}
+
break;
}
-
case IDM_FILE_EXIT:
{
if (game_in_progress && current_world_ptr->character_generated)
break;
}
- /* Hack -- Forget messages */
msg_flag = FALSE;
-
forget_lite(player_ptr->current_floor_ptr);
forget_view(player_ptr->current_floor_ptr);
clear_mon_lite(player_ptr->current_floor_ptr);
Term_key_push(SPECIAL_KEY_QUIT);
break;
}
+
quit(NULL);
break;
}
-
- /* Show scores */
case IDM_FILE_SCORE:
{
char buf[1024];
path_build(buf, sizeof(buf), ANGBAND_DIR_APEX, "scores.raw");
-
- /* Open the binary high score file, for reading */
highscore_fd = fd_open(buf, O_RDONLY);
-
- /* Paranoia -- No score file */
if (highscore_fd < 0)
{
msg_print("Score file unavailable.");
{
screen_save();
Term_clear();
-
- /* Display the scores */
display_scores_aux(0, MAX_HISCORES, -1, NULL);
-
- /* Shut the high score file */
(void)fd_close(highscore_fd);
-
- /* Forget the high score fd */
highscore_fd = -1;
screen_load();
-
- /* Hack - Flush it */
Term_fresh();
}
break;
}
-
- /* Open game */
case IDM_FILE_MOVIE:
{
if (!initialized)
if (GetOpenFileName(&ofn))
{
- /* Load 'savefile' */
prepare_browse_movie_aux(savefile);
play_game(player_ptr, FALSE);
quit(NULL);
}
break;
}
-
-
case IDM_WINDOW_VIS_0:
{
plog(_("メインウィンドウは非表示にできません!", "You are not allowed to do that!"));
break;
}
-
- /* Window visibility */
case IDM_WINDOW_VIS_1:
case IDM_WINDOW_VIS_2:
case IDM_WINDOW_VIS_3:
case IDM_WINDOW_VIS_6:
case IDM_WINDOW_VIS_7:
{
- i = wCmd - IDM_WINDOW_VIS_0;
-
+ int i = wCmd - IDM_WINDOW_VIS_0;
if ((i < 0) || (i >= MAX_TERM_DATA)) break;
td = &data[i];
break;
}
-
- /* Window fonts */
case IDM_WINDOW_FONT_0:
case IDM_WINDOW_FONT_1:
case IDM_WINDOW_FONT_2:
case IDM_WINDOW_FONT_6:
case IDM_WINDOW_FONT_7:
{
- i = wCmd - IDM_WINDOW_FONT_0;
-
+ int i = wCmd - IDM_WINDOW_FONT_0;
if ((i < 0) || (i >= MAX_TERM_DATA)) break;
td = &data[i];
-
term_change_font(td);
-
break;
}
-
- /* Window Z Position */
case IDM_WINDOW_POS_1:
case IDM_WINDOW_POS_2:
case IDM_WINDOW_POS_3:
case IDM_WINDOW_POS_6:
case IDM_WINDOW_POS_7:
{
- i = wCmd - IDM_WINDOW_POS_0;
-
+ int i = wCmd - IDM_WINDOW_POS_0;
if ((i < 0) || (i >= MAX_TERM_DATA)) break;
td = &data[i];
-
if (!td->posfix && td->visible)
{
td->posfix = TRUE;
break;
}
-
- /* Bizarre Display */
case IDM_WINDOW_BIZ_0:
case IDM_WINDOW_BIZ_1:
case IDM_WINDOW_BIZ_2:
case IDM_WINDOW_BIZ_6:
case IDM_WINDOW_BIZ_7:
{
- i = wCmd - IDM_WINDOW_BIZ_0;
-
+ int i = wCmd - IDM_WINDOW_BIZ_0;
if ((i < 0) || (i >= MAX_TERM_DATA)) break;
td = &data[i];
-
td->bizarre = !td->bizarre;
-
term_getsize(td);
-
term_window_resize(td);
-
break;
}
-
- /* Increase Tile Width */
case IDM_WINDOW_I_WID_0:
case IDM_WINDOW_I_WID_1:
case IDM_WINDOW_I_WID_2:
case IDM_WINDOW_I_WID_6:
case IDM_WINDOW_I_WID_7:
{
- i = wCmd - IDM_WINDOW_I_WID_0;
-
+ int i = wCmd - IDM_WINDOW_I_WID_0;
if ((i < 0) || (i >= MAX_TERM_DATA)) break;
td = &data[i];
-
td->tile_wid += 1;
-
term_getsize(td);
-
term_window_resize(td);
-
break;
}
-
- /* Decrease Tile Height */
case IDM_WINDOW_D_WID_0:
case IDM_WINDOW_D_WID_1:
case IDM_WINDOW_D_WID_2:
case IDM_WINDOW_D_WID_6:
case IDM_WINDOW_D_WID_7:
{
- i = wCmd - IDM_WINDOW_D_WID_0;
-
+ int i = wCmd - IDM_WINDOW_D_WID_0;
if ((i < 0) || (i >= MAX_TERM_DATA)) break;
td = &data[i];
-
td->tile_wid -= 1;
-
term_getsize(td);
-
term_window_resize(td);
-
break;
}
-
- /* Increase Tile Height */
case IDM_WINDOW_I_HGT_0:
case IDM_WINDOW_I_HGT_1:
case IDM_WINDOW_I_HGT_2:
case IDM_WINDOW_I_HGT_6:
case IDM_WINDOW_I_HGT_7:
{
- i = wCmd - IDM_WINDOW_I_HGT_0;
-
+ int i = wCmd - IDM_WINDOW_I_HGT_0;
if ((i < 0) || (i >= MAX_TERM_DATA)) break;
td = &data[i];
-
td->tile_hgt += 1;
-
term_getsize(td);
-
term_window_resize(td);
-
break;
}
-
- /* Decrease Tile Height */
case IDM_WINDOW_D_HGT_0:
case IDM_WINDOW_D_HGT_1:
case IDM_WINDOW_D_HGT_2:
case IDM_WINDOW_D_HGT_6:
case IDM_WINDOW_D_HGT_7:
{
- i = wCmd - IDM_WINDOW_D_HGT_0;
-
+ int i = wCmd - IDM_WINDOW_D_HGT_0;
if ((i < 0) || (i >= MAX_TERM_DATA)) break;
td = &data[i];
-
td->tile_hgt -= 1;
-
term_getsize(td);
-
term_window_resize(td);
-
break;
}
-
case IDM_OPTIONS_NO_GRAPHICS:
{
if (!inkey_flag)
break;
}
-
case IDM_OPTIONS_OLD_GRAPHICS:
{
if (!inkey_flag)
break;
}
-
case IDM_OPTIONS_NEW_GRAPHICS:
{
if (!inkey_flag)
break;
}
-
case IDM_OPTIONS_NEW2_GRAPHICS:
{
if (!inkey_flag)
break;
}
-
case IDM_OPTIONS_BIGTILE:
{
td = &data[0];
InvalidateRect(td->w, NULL, TRUE);
break;
}
-
case IDM_OPTIONS_MUSIC:
{
if (!inkey_flag)
Term_key_push(KTRL('R'));
break;
}
-
case IDM_OPTIONS_SOUND:
{
if (!inkey_flag)
Term_key_push(KTRL('R'));
break;
}
-
- /* bg */
case IDM_OPTIONS_BG:
{
if (!inkey_flag)
Term_key_push(KTRL('R'));
break;
}
-
- /* bg */
case IDM_OPTIONS_OPEN_BG:
{
if (!inkey_flag)
if (GetOpenFileName(&ofn))
{
- /* Load 'savefile' */
use_bg = 1;
init_bg();
}
- /* React to changes */
term_xtra_win_react(player_ptr);
-
- /* Hack -- Force redraw */
Term_key_push(KTRL('R'));
}
+
break;
}
-
case IDM_DUMP_SCREEN_HTML:
{
static char buf[1024] = "";
}
break;
}
-
-#ifdef USE_SAVER
-
case IDM_OPTIONS_SAVER:
{
if (hwndSaver)
}
else
{
- /* Create a screen scaver window */
hwndSaver = CreateWindowEx(WS_EX_TOPMOST, "WindowsScreenSaverClass",
"Angband Screensaver",
WS_POPUP | WS_MAXIMIZE | WS_VISIBLE,
if (hwndSaver)
{
- /* Push the window to the bottom */
SetWindowPos(hwndSaver, HWND_BOTTOM, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
}
else
plog(_("ウィンドウを作成出来ません", "Failed to create saver window"));
}
}
+
break;
}
-
-#endif
-
case IDM_OPTIONS_MAP:
{
windows_map(player_ptr);
}
-#ifdef USE_SAVER
-
#define MOUSE_SENS 40
#ifdef __MWERKS__
return DefWindowProc(hWnd, uMsg, wParam, lParam);
}
-#endif /* USE_SAVER */
-
/*
* Display warning message (see "z-util.c")
if (!RegisterClass(&wc)) exit(2);
-#ifdef USE_SAVER
-
wc.style = CS_VREDRAW | CS_HREDRAW | CS_SAVEBITS | CS_DBLCLKS;
wc.lpfnWndProc = AngbandSaverProc;
wc.hCursor = NULL;
wc.lpszClassName = "WindowsScreenSaverClass";
if (!RegisterClass(&wc)) exit(3);
-
-#endif
-
}
plog_aux = hack_plog;