OSDN Git Service

[Refactor] #37287 #37353 型の置換。 / Type replacement.
authorDeskull <deskull@users.sourceforge.jp>
Mon, 12 Nov 2018 12:50:45 +0000 (21:50 +0900)
committerDeskull <deskull@users.sourceforge.jp>
Mon, 12 Nov 2018 12:50:45 +0000 (21:50 +0900)
src/chuukei.c
src/cmd4.c
src/externs.h
src/spells1.c
src/variable.c
src/z-term.c

index 8fd22f7..f4a1934 100644 (file)
@@ -522,7 +522,7 @@ static bool string_is_repeat(char *str, int len)
        return (TRUE);
 }
 
-static errr send_text_to_chuukei_server(int x, int y, int len, byte col, cptr str)
+static errr send_text_to_chuukei_server(TERM_LEN x, TERM_LEN y, int len, TERM_COLOR col, cptr str)
 {
        char buf[1024];
        char buf2[1024];
index ce7e171..60e49da 100644 (file)
@@ -3330,9 +3330,9 @@ void do_cmd_visuals(void)
                                int c;
                                IDX t;
 
-                               byte da = r_ptr->d_attr;
+                               TERM_COLOR da = r_ptr->d_attr;
                                byte dc = r_ptr->d_char;
-                               byte ca = r_ptr->x_attr;
+                               TERM_COLOR ca = r_ptr->x_attr;
                                byte cc = r_ptr->x_char;
 
                                /* Label the object */
@@ -6434,7 +6434,7 @@ static void display_visual_list(int col, int row, int height, int width, byte at
 /*
  * Place the cursor at the collect position for visual mode
  */
-static void place_visual_list_cursor(TERM_LEN col, TERM_LEN row, byte a, byte c, byte attr_top, byte char_left)
+static void place_visual_list_cursor(TERM_LEN col, TERM_LEN row, TERM_COLOR a, byte c, byte attr_top, byte char_left)
 {
        int i = (a & 0x7f) - attr_top;
        int j = c - char_left;
@@ -6466,7 +6466,7 @@ static byte char_idx_feat[F_LIT_MAX];
 static bool visual_mode_command(char ch, bool *visual_list_ptr,
                                int height, int width,
                                byte *attr_top_ptr, byte *char_left_ptr,
-                               byte *cur_attr_ptr, byte *cur_char_ptr, bool *need_redraw)
+                               TERM_COLOR *cur_attr_ptr, byte *cur_char_ptr, bool *need_redraw)
 {
        static byte attr_old = 0, char_old = 0;
 
index 6cb7505..53e1398 100644 (file)
@@ -282,9 +282,9 @@ extern s16b alloc_kind_size;
 extern alloc_entry *alloc_kind_table;
 extern s16b alloc_race_size;
 extern alloc_entry *alloc_race_table;
-extern byte misc_to_attr[256];
+extern TERM_COLOR misc_to_attr[256];
 extern char misc_to_char[256];
-extern byte tval_to_attr[128];
+extern TERM_COLOR tval_to_attr[128];
 extern char tval_to_char[128];
 extern cptr keymap_act[KEYMAP_MODES][256];
 extern player_type *p_ptr;
@@ -479,7 +479,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(byte f_attr[F_LIT_MAX], byte f_char[F_LIT_MAX]);
+extern void apply_default_feat_lighting(TERM_COLOR f_attr[F_LIT_MAX], byte f_char[F_LIT_MAX]);
 extern void map_info(POSITION y, POSITION x, byte *ap, char *cp, byte *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 e8dc024..843ffb1 100644 (file)
@@ -290,7 +290,7 @@ u16b bolt_pict(POSITION y, POSITION x, POSITION ny, POSITION nx, EFFECT_ID typ)
 
        byte k;
 
-       byte a;
+       TERM_COLOR a;
        char c;
 
        /* No motion (*) */
index b2736ae..66ce32a 100644 (file)
@@ -576,7 +576,7 @@ alloc_entry *alloc_race_table;
  * Specify attr/char pairs for visual special effects
  * Be sure to use "index & 0x7F" to avoid illegal access
  */
-byte misc_to_attr[256];
+TERM_COLOR misc_to_attr[256];
 char misc_to_char[256];
 
 
@@ -584,7 +584,7 @@ char misc_to_char[256];
  * Specify attr/char pairs for inventory items (by tval)
  * Be sure to use "index & 0x7F" to avoid illegal access
  */
-byte tval_to_attr[128];
+TERM_COLOR tval_to_attr[128];
 char tval_to_char[128];
 
 
index 8f709d3..f7515a4 100644 (file)
@@ -778,10 +778,10 @@ void Term_queue_chars(TERM_LEN x, TERM_LEN y, int n, TERM_COLOR a, cptr s)
                else
                {
 #endif
-               byte oa = scr_aa[x];
+               TERM_COLOR oa = scr_aa[x];
                char oc = scr_cc[x];
 
-               byte ota = scr_taa[x];
+               TERM_COLOR ota = scr_taa[x];
                char otc = scr_tcc[x];
 
                /* Hack -- Ignore non-changes */
@@ -1199,14 +1199,14 @@ static void Term_fresh_row_both(TERM_LEN y, int x1, int x2)
  *
  * Display text using "Term_text()" and "Term_wipe()"
  */
-static void Term_fresh_row_text(TERM_LEN y, int x1, int x2)
+static void Term_fresh_row_text(TERM_LEN y, TERM_LEN x1, TERM_LEN x2)
 {
        TERM_LEN x;
 
-       byte *old_aa = Term->old->a[y];
+       TERM_COLOR *old_aa = Term->old->a[y];
        char *old_cc = Term->old->c[y];
 
-       byte *scr_aa = Term->scr->a[y];
+       TERM_COLOR *scr_aa = Term->scr->a[y];
        char *scr_cc = Term->scr->c[y];
 
        /* The "always_text" flag */
@@ -1221,10 +1221,10 @@ static void Term_fresh_row_text(TERM_LEN y, int x1, int x2)
        /* Pending attr */
        byte fa = Term->attr_blank;
 
-       byte oa;
+       TERM_COLOR oa;
        char oc;
 
-       byte na;
+       TERM_COLOR na;
        char nc;
 
 #ifdef JP
@@ -1536,10 +1536,10 @@ errr Term_fresh(void)
                /* Wipe each row */
                for (y = 0; y < h; y++)
                {
-                       byte *aa = old->a[y];
+                       TERM_COLOR *aa = old->a[y];
                        char *cc = old->c[y];
 
-                       byte *taa = old->ta[y];
+                       TERM_COLOR *taa = old->ta[y];
                        char *tcc = old->tc[y];