From dd2d4489f2111853186f33c3b58f6f6fc00699f1 Mon Sep 17 00:00:00 2001 From: mogami Date: Sun, 9 Jun 2002 14:18:42 +0000 Subject: [PATCH] =?utf8?q?=E5=86=85=E9=83=A8=E3=81=A7=E4=BD=BF=E3=81=86?= =?utf8?q?=E7=89=B9=E6=AE=8A=E3=82=AD=E3=83=BC=E3=82=B3=E3=83=BC=E3=83=89?= =?utf8?q?=20255=20254=20253=20252=20=E3=82=92=E3=83=9E=E3=82=AF=E3=83=AD?= =?utf8?q?=E3=81=A7=E5=AE=9A=E7=BE=A9=E3=80=82=20main-mac.c=E3=81=AE?= =?utf8?q?=E7=B5=82=E4=BA=86=E3=83=A1=E3=83=8B=E3=83=A5=E3=83=BC=E3=82=82?= =?utf8?q?=E7=89=B9=E6=AE=8A=E3=82=AD=E3=83=BC=E3=82=92=E4=BD=BF=E7=94=A8?= =?utf8?q?=E3=81=99=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB=E3=81=97=E3=81=9F?= =?utf8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/cmd1.c | 6 +++--- src/cmd2.c | 4 ++-- src/defines.h | 8 ++++++++ src/dungeon.c | 8 ++++---- src/main-mac.c | 6 ++++-- src/main-win.c | 2 +- 6 files changed, 22 insertions(+), 12 deletions(-) diff --git a/src/cmd1.c b/src/cmd1.c index f8380fcba..215221620 100644 --- a/src/cmd1.c +++ b/src/cmd1.c @@ -4007,7 +4007,7 @@ msg_format("%s energy_use = 0; /* Hack -- Enter store */ - command_new = 253; + command_new = SPECIAL_KEY_STORE; } /* Handle "building doors" -KMW- */ @@ -4019,7 +4019,7 @@ msg_format("%s energy_use = 0; /* Hack -- Enter building */ - command_new = 254; + command_new = SPECIAL_KEY_BUILDING; } /* Handle quest areas -KMW- */ @@ -4030,7 +4030,7 @@ msg_format("%s energy_use = 0; /* Hack -- Enter quest level */ - command_new = 255; + command_new = SPECIAL_KEY_QUEST; } else if (cave[y][x].feat == FEAT_QUEST_EXIT) diff --git a/src/cmd2.c b/src/cmd2.c index 1aa5e0db0..d6d812bd8 100644 --- a/src/cmd2.c +++ b/src/cmd2.c @@ -3058,7 +3058,7 @@ void do_cmd_stay(int pickup) energy_use = 0; /* Hack -- enter store */ - command_new = 253; + command_new = SPECIAL_KEY_STORE; } /* Hack -- enter a building if we are on one -KMW- */ @@ -3070,7 +3070,7 @@ void do_cmd_stay(int pickup) energy_use = 0; /* Hack -- enter building */ - command_new = 254; + command_new = SPECIAL_KEY_BUILDING; } /* Exit a quest if reach the quest exit */ diff --git a/src/defines.h b/src/defines.h index 8bd55abe3..a3648cdb6 100644 --- a/src/defines.h +++ b/src/defines.h @@ -474,6 +474,14 @@ #define MAX_NLEN 160 /* + * Special internal key + */ +#define SPECIAL_KEY_QUEST 255 +#define SPECIAL_KEY_BUILDING 254 +#define SPECIAL_KEY_STORE 253 +#define SPECIAL_KEY_QUIT 252 + +/* * Store constants */ #define STORE_INVEN_MAX 24 /* Max number of discrete objs in inven */ diff --git a/src/dungeon.c b/src/dungeon.c index 53bcd6645..4c14b95e6 100644 --- a/src/dungeon.c +++ b/src/dungeon.c @@ -4203,21 +4203,21 @@ msg_print(" /*** Stairs and Doors and Chests and Traps ***/ /* Enter store */ - case 253: + case SPECIAL_KEY_STORE: { if (!p_ptr->wild_mode) do_cmd_store(); break; } /* Enter building -KMW- */ - case 254: + case SPECIAL_KEY_BUILDING: { if (!p_ptr->wild_mode) do_cmd_bldg(); break; } /* Enter quest level -KMW- */ - case 255: + case SPECIAL_KEY_QUEST: { if (!p_ptr->wild_mode) do_cmd_quest(); break; @@ -4837,7 +4837,7 @@ msg_print(" /* Save and quit */ case KTRL('X'): - case 252: + case SPECIAL_KEY_QUIT: { do_cmd_save_and_exit(); break; diff --git a/src/main-mac.c b/src/main-mac.c index 708e888b7..5d52a12f2 100644 --- a/src/main-mac.c +++ b/src/main-mac.c @@ -3929,8 +3929,10 @@ static void menu(long mc) msg_flag = FALSE; /* Save the game */ -// do_cmd_save_game(FALSE); - Term_key_push(KTRL('X')); +#if 0 + do_cmd_save_game(FALSE); +#endif + Term_key_push(SPECIAL_KEY_QUIT); break; } diff --git a/src/main-win.c b/src/main-win.c index 6fe485bde..0408ca422 100644 --- a/src/main-win.c +++ b/src/main-win.c @@ -3360,7 +3360,7 @@ static void process_menus(WORD wCmd) #else /* ZANGBAND */ /* do_cmd_save_game(); */ #endif /* ZANGBAND */ - Term_key_push(252); + Term_key_push(SPECIAL_KEY_QUIT); break; } quit(NULL); -- 2.11.0