OSDN Git Service

#37287 #37353 (2.2.0.89) 型の置換を継続中。 / Ongoing type replacement.
authorDeskull <desull@users.sourceforge.jp>
Sat, 23 Sep 2017 04:27:01 +0000 (13:27 +0900)
committerDeskull <desull@users.sourceforge.jp>
Sat, 23 Sep 2017 04:27:01 +0000 (13:27 +0900)
src/externs.h
src/h-type.h
src/init.h
src/mspells2.c
src/spells3.c
src/variable.c

index ea961de..4a5890b 100644 (file)
@@ -396,9 +396,9 @@ extern bool closing_flag;
 extern s16b panel_row_min, panel_row_max;
 extern s16b panel_col_min, panel_col_max;
 extern s16b panel_col_prt, panel_row_prt;
-extern s16b target_who;
-extern s16b target_col;
-extern s16b target_row;
+extern idx target_who;
+extern position target_col;
+extern position target_row;
 extern int player_uid;
 extern int player_euid;
 extern int player_egid;
@@ -1219,7 +1219,7 @@ extern bool cave_player_teleportable_bold(int y, int x, u32b mode);
 extern bool teleport_player_aux(int dis, u32b mode);
 extern void teleport_player(int dis, u32b mode);
 extern void teleport_player_away(int m_idx, int dis);
-extern void teleport_player_to(int ny, int nx, u32b mode);
+extern void teleport_player_to(position ny, position nx, u32b mode);
 extern void teleport_away_followable(int m_idx);
 extern void teleport_level(int m_idx);
 extern int choose_dungeon(cptr note, int y, int x);
@@ -1583,7 +1583,7 @@ extern void breath(int y, int x, int m_idx, int typ, int dam_hp, int rad, bool b
 
 /* mspells2.c */
 extern void get_project_point(int sy, int sx, int *ty, int *tx, int flg);
-extern bool monst_spell_monst(int m_idx);
+extern bool monst_spell_monst(idx m_idx);
 
 /* mspells3.c */
 extern bool do_cmd_cast_learned(void);
index c6cfbea..28a1958 100644 (file)
@@ -124,7 +124,7 @@ typedef byte object_type_value;    /*!< ゲーム中のアイテム主分類の
 typedef byte object_subtype_value; /*!< ゲーム中のアイテム副分類の型定義 */
 typedef s16b parameter_value;      /*!< ゲーム中のアイテム能力値の型定義 */
 
-typedef s32b str_offset;      /*!< テキストオフセットの型定義 */
+typedef u32b str_offset;      /*!< テキストオフセットの型定義 */
 
 /*** Pointers to all the basic types defined above ***/
 
index 22c01ce..da9dfa2 100644 (file)
@@ -86,13 +86,10 @@ struct header
 
        u16b head_size;         /* Size of the "header" in bytes */
 
-       u32b info_size;         /* Size of the "info" array in bytes */
-
-       u32b name_size;         /* Size of the "name" array in bytes */
-
-       u32b text_size;         /* Size of the "text" array in bytes */
-
-       u32b tag_size;          /* Size of the "tag" array in bytes */
+       str_offset info_size;           /* Size of the "info" array in bytes */
+       str_offset name_size;           /* Size of the "name" array in bytes */
+       str_offset text_size;           /* Size of the "text" array in bytes */
+       str_offset tag_size;            /* Size of the "tag" array in bytes */
 
        void *info_ptr;
        char *name_ptr;
index aac9f08..36e39f8 100644 (file)
@@ -253,7 +253,7 @@ static bool dispel_check_monster(int m_idx, int t_idx)
  * @details
  * The player is only disturbed if able to be affected by the spell.
  */
-bool monst_spell_monst(int m_idx)
+bool monst_spell_monst(idx m_idx)
 {
        int y = 0, x = 0;
        int i, k, t_idx = 0;
index 3aa2dc5..8dc74a2 100644 (file)
@@ -556,9 +556,10 @@ void teleport_player_away(int m_idx, int dis)
  * This function allows teleporting into vaults (!)
  * </pre>
  */
-void teleport_player_to(int ny, int nx, u32b mode)
+void teleport_player_to(position ny, position nx, u32b mode)
 {
-       int y, x, dis = 0, ctr = 0;
+       position y, x;
+       int dis = 0, ctr = 0;
 
        if (p_ptr->anti_tele && !(mode & TELEPORT_NONMAGICAL))
        {
@@ -572,8 +573,8 @@ void teleport_player_to(int ny, int nx, u32b mode)
                /* Pick a nearby legal location */
                while (1)
                {
-                       y = rand_spread(ny, dis);
-                       x = rand_spread(nx, dis);
+                       y = (position)rand_spread(ny, dis);
+                       x = (position)rand_spread(nx, dis);
                        if (in_bounds(y, x)) break;
                }
 
index 544e5d4..f80152f 100644 (file)
@@ -390,9 +390,9 @@ s16b panel_col_prt, panel_row_prt;
 /*
  * Targetting variables
  */
-s16b target_who;
-s16b target_col;
-s16b target_row;
+idx target_who;
+position target_col;
+position target_row;
 
 
 /*