OSDN Git Service

練気術師で練気術を選択する際のダミーのアイテムスロット1111を記号定数INVEN_FORCEに変更.
authornothere <nothere@0568b783-4c39-0410-ac80-bf13821ea2a2>
Sat, 3 May 2003 08:35:02 +0000 (08:35 +0000)
committernothere <nothere@0568b783-4c39-0410-ac80-bf13821ea2a2>
Sat, 3 May 2003 08:35:02 +0000 (08:35 +0000)
src/cmd5.c
src/defines.h
src/object1.c

index bcbb7dc..d2d3186 100644 (file)
@@ -435,7 +435,7 @@ s = "
        }
        select_the_force = FALSE;
 
-       if (item == 1111) { /* the_force */
+       if (item == INVEN_FORCE) { /* the_force */
            do_cmd_mind_browse();
            return;
        } else
@@ -4780,7 +4780,7 @@ s = "
        }
        select_the_force = FALSE;
 
-       if (item == 1111) { /* the_force */
+       if (item == INVEN_FORCE) { /* the_force */
            do_cmd_mind();
            return;
        } else
index 06e9726..bc5c576 100644 (file)
  */
 #define INVEN_TOTAL     36
 
+/*
+ * Fake inventory slot for selecting force (hard-coded).
+ */
+#define INVEN_FORCE     1111
+
 
 /*
  * Indexes of the various "stats" (hard-coded by savefiles, etc).
index 858f0f8..775e219 100644 (file)
@@ -5366,7 +5366,7 @@ bool get_item(int *cp, cptr pmt, cptr str, int mode)
        /* Get the item index */
        if (repeat_pull(cp))
        {
-               if (*cp == 1111) { /* the_force */
+               if (*cp == INVEN_FORCE) { /* the_force */
                    item_tester_tval = 0;
                    item_tester_hook = NULL;
                    return (TRUE);
@@ -5497,7 +5497,7 @@ bool get_item(int *cp, cptr pmt, cptr str, int mode)
                done = TRUE;
 
                if (select_the_force) {
-                   *cp = 1111;
+                   *cp = INVEN_FORCE;
                    item = TRUE;
                }
        }
@@ -5822,7 +5822,7 @@ if (allow_floor) strcat(out_val, " '-'
                        case 'w':
                        {
                                if (select_the_force) {
-                                       *cp = 1111;
+                                       *cp = INVEN_FORCE;
                                        item = TRUE;
                                        done = TRUE;
                                        break;
@@ -6024,7 +6024,7 @@ if (other_query_flag && !verify("
                        case 'w':
                        {
                                if (select_the_force) {
-                                       *cp = 1111;
+                                       *cp = INVEN_FORCE;
                                        item = TRUE;
                                        done = TRUE;
                                        break;
@@ -6388,7 +6388,7 @@ bool get_item_floor(int *cp, cptr pmt, cptr str, int mode)
        /* Get the item index */
        if (repeat_pull(cp))
        {
-               if (*cp == 1111) { /* the_force */
+               if (*cp == INVEN_FORCE) { /* the_force */
                    item_tester_tval = 0;
                    item_tester_hook = NULL;
                    return (TRUE);
@@ -6518,7 +6518,7 @@ bool get_item_floor(int *cp, cptr pmt, cptr str, int mode)
                done = TRUE;
 
                if (select_the_force) {
-                   *cp = 1111;
+                   *cp = INVEN_FORCE;
                    item = TRUE;
                }
        }
@@ -7098,7 +7098,7 @@ if (!command_see && !use_menu) strcat(out_val, " '*'
                        case 'w':
                        {
                                if (select_the_force) {
-                                       *cp = 1111;
+                                       *cp = INVEN_FORCE;
                                        item = TRUE;
                                        done = TRUE;
                                        break;
@@ -7394,7 +7394,7 @@ if (!command_see && !use_menu) strcat(out_val, " '*'
                        case 'w':
                        {
                                if (select_the_force) {
-                                       *cp = 1111;
+                                       *cp = INVEN_FORCE;
                                        item = TRUE;
                                        done = TRUE;
                                        break;