OSDN Git Service

[Refactor] #37353 型の置換。 / Type replacement.
authorDeskull <deskull@users.sourceforge.jp>
Tue, 18 Dec 2018 12:55:36 +0000 (21:55 +0900)
committerDeskull <deskull@users.sourceforge.jp>
Tue, 18 Dec 2018 12:55:36 +0000 (21:55 +0900)
src/cave.c
src/cmd4.c
src/externs.h
src/h-type.h
src/spells1.c

index 688948a..cb2d0f9 100644 (file)
@@ -793,10 +793,10 @@ static byte lighting_colours[16][2] =
  * @brief 調査中
  * @todo コメントを付加すること
  */
-void apply_default_feat_lighting(TERM_COLOR f_attr[F_LIT_MAX], byte f_char[F_LIT_MAX])
+void apply_default_feat_lighting(TERM_COLOR f_attr[F_LIT_MAX], SYMBOL_CODE f_char[F_LIT_MAX])
 {
        TERM_COLOR s_attr = f_attr[F_LIT_STANDARD];
-       byte s_char = f_char[F_LIT_STANDARD];
+       SYMBOL_CODE s_char = f_char[F_LIT_STANDARD];
        int i;
 
        if (is_ascii_graphics(s_attr)) /* For ASCII */
index c698567..dcac9dd 100644 (file)
@@ -6410,10 +6410,10 @@ static byte char_idx_feat[F_LIT_MAX];
 static bool visual_mode_command(char ch, bool *visual_list_ptr,
                                int height, int width,
                                TERM_COLOR *attr_top_ptr, byte *char_left_ptr,
-                               TERM_COLOR *cur_attr_ptr, byte *cur_char_ptr, bool *need_redraw)
+                               TERM_COLOR *cur_attr_ptr, SYMBOL_CODE *cur_char_ptr, bool *need_redraw)
 {
        static TERM_COLOR attr_old = 0;
-       static byte char_old = 0;
+       static SYMBOL_CODE char_old = 0;
 
        switch (ch)
        {
@@ -7355,9 +7355,9 @@ static void do_cmd_knowledge_features(bool *need_redraw, bool visual_only, IDX d
        int wid, hgt;
 
        TERM_COLOR attr_old[F_LIT_MAX];
-       byte char_old[F_LIT_MAX];
+       SYMBOL_CODE char_old[F_LIT_MAX];
        TERM_COLOR *cur_attr_ptr;
-       byte *cur_char_ptr;
+       SYMBOL_CODE *cur_char_ptr;
 
        (void)C_WIPE(attr_old, F_LIT_MAX, byte);
        (void)C_WIPE(char_old, F_LIT_MAX, byte);
index 1756d8b..008a988 100644 (file)
@@ -478,7 +478,7 @@ extern void update_local_illumination(POSITION y, POSITION x);
 extern bool player_can_see_bold(POSITION y, POSITION x);
 extern bool cave_valid_bold(POSITION y, POSITION x);
 extern bool no_lite(void);
-extern void apply_default_feat_lighting(TERM_COLOR f_attr[F_LIT_MAX], byte f_char[F_LIT_MAX]);
+extern void apply_default_feat_lighting(TERM_COLOR f_attr[F_LIT_MAX], SYMBOL_CODE f_char[F_LIT_MAX]);
 extern void map_info(POSITION y, POSITION x, TERM_COLOR *ap, char *cp, TERM_COLOR *tap, char *tcp);
 extern void move_cursor_relative(int row, int col);
 extern void print_rel(char c, byte a, TERM_LEN y, TERM_LEN x);
index fdaec0f..1c38759 100644 (file)
@@ -222,7 +222,7 @@ typedef s16b COMMAND_NUM;    /*!< コマンド数の型定義 */
 
 typedef int TERM_LEN;     /*!< コンソール表示座標の型定義 */
 typedef byte TERM_COLOR;  /*!< テキスト表示色の型定義 */
-typedef byte SYMBOL_CODE; /*!< キャラの文字の型定義 */
+typedef char SYMBOL_CODE; /*!< キャラの文字の型定義 */
 
 typedef s32b MAGIC_NUM1;   /*!< プレイヤーの汎用魔法情報配列1の型定義*/
 typedef byte MAGIC_NUM2;   /*!< プレイヤーの汎用魔法情報配列2の型定義*/
index 166dcd1..7951195 100644 (file)
@@ -6900,37 +6900,37 @@ bool project(MONSTER_IDX who, POSITION rad, POSITION y, POSITION x, HIT_POINT da
                                        Term_xtra(TERM_XTRA_DELAY, msec);
                                }
                        }
-                       if(project_o(0,0,y,x,dam,GF_SEEKER))notice=TRUE;
-                       ifis_mirror_grid(&cave[y][x]))
+                       if (project_o(0, 0, y, x, dam, GF_SEEKER))notice = TRUE;
+                       if (is_mirror_grid(&cave[y][x]))
                        {
-                         /* The target of monsterspell becomes tha mirror(broken) */
-                               monster_target_y=(s16b)y;
-                               monster_target_x=(s16b)x;
+                               /* The target of monsterspell becomes tha mirror(broken) */
+                               monster_target_y = y;
+                               monster_target_x = x;
 
                                remove_mirror(y, x);
                                next_mirror(&oy, &ox, y, x);
 
-                               path_n = i+project_path(&(path_g[i+1]), (project_length ? project_length : MAX_RANGE), y, x, oy, ox, flg);
-                               for(j = last_i; j <= i; j++)
+                               path_n = i + project_path(&(path_g[i + 1]), (project_length ? project_length : MAX_RANGE), y, x, oy, ox, flg);
+                               for (j = last_i; j <= i; j++)
                                {
                                        y = GRID_Y(path_g[j]);
                                        x = GRID_X(path_g[j]);
-                                       if(project_m(0, 0, y, x, dam, GF_SEEKER, flg, TRUE)) notice=TRUE;
-                                       if(!who && (project_m_n==1) && !jump ){
-                                         if(cave[project_m_y][project_m_x].m_idx >0 ){
-                                               monster_type *m_ptr = &m_list[cave[project_m_y][project_m_x].m_idx];
+                                       if (project_m(0, 0, y, x, dam, GF_SEEKER, flg, TRUE)) notice = TRUE;
+                                       if (!who && (project_m_n == 1) && !jump) {
+                                               if (cave[project_m_y][project_m_x].m_idx > 0) {
+                                                       monster_type *m_ptr = &m_list[cave[project_m_y][project_m_x].m_idx];
 
-                                               if (m_ptr->ml)
-                                               {
-                                                 /* Hack -- auto-recall */
-                                                 if (!p_ptr->image) monster_race_track(m_ptr->ap_r_idx);
+                                                       if (m_ptr->ml)
+                                                       {
+                                                               /* Hack -- auto-recall */
+                                                               if (!p_ptr->image) monster_race_track(m_ptr->ap_r_idx);
 
-                                                 /* Hack - auto-track */
-                                                 health_track(cave[project_m_y][project_m_x].m_idx);
+                                                               /* Hack - auto-track */
+                                                               health_track(cave[project_m_y][project_m_x].m_idx);
+                                                       }
                                                }
-                                         }
                                        }
-                                       (void)project_f(0,0,y,x,dam,GF_SEEKER);
+                                       (void)project_f(0, 0, y, x, dam, GF_SEEKER);
                                }
                                last_i = i;
                        }
@@ -6940,10 +6940,10 @@ bool project(MONSTER_IDX who, POSITION rad, POSITION y, POSITION x, HIT_POINT da
                        POSITION py, px;
                        py = GRID_Y(path_g[i]);
                        px = GRID_X(path_g[i]);
-                       if(project_m(0, 0, py, px, dam, GF_SEEKER, flg, TRUE))
+                       if (project_m(0, 0, py, px, dam, GF_SEEKER, flg, TRUE))
                                notice = TRUE;
-                       if(!who && (project_m_n==1) && !jump ){
-                               if(cave[project_m_y][project_m_x].m_idx > 0)
+                       if (!who && (project_m_n == 1) && !jump) {
+                               if (cave[project_m_y][project_m_x].m_idx > 0)
                                {
                                        monster_type *m_ptr = &m_list[cave[project_m_y][project_m_x].m_idx];