OSDN Git Service

#37287 #37353 (2.2.0.89) 型の置換を継続中。 / Ongoing type replacement.
authorDeskull <desull@users.sourceforge.jp>
Mon, 2 Oct 2017 03:55:59 +0000 (12:55 +0900)
committerDeskull <desull@users.sourceforge.jp>
Mon, 2 Oct 2017 03:55:59 +0000 (12:55 +0900)
src/cave.c
src/externs.h
src/files.c
src/types.h

index 68b5596..0f9bf6e 100644 (file)
@@ -154,10 +154,10 @@ bool is_hidden_door(cave_type *c_ptr)
  *\n
  * Use the "update_view()" function to determine player line-of-sight.\n
  */
-bool los(int y1, int x1, int y2, int x2)
+bool los(POSITION y1, POSITION x1, POSITION y2, POSITION x2)
 {
        /* Delta */
-       int dx, dy;
+       POSITION dx, dy;
 
        /* Absolute */
        int ax, ay;
@@ -4898,9 +4898,9 @@ void mmove2(int *y, int *x, int y1, int x1, int y2, int x2)
  *
  * This is slightly (but significantly) different from "los(y1,x1,y2,x2)".
  */
-bool projectable(int y1, int x1, int y2, int x2)
+bool projectable(POSITION y1, POSITION x1, POSITION y2, POSITION x2)
 {
-       int y, x;
+       POSITION y, x;
 
        int grid_n = 0;
        u16b grid_g[512];
index 5a5eb66..05a0167 100644 (file)
@@ -649,7 +649,7 @@ extern bool is_trap(IDX feat);
 extern bool is_known_trap(cave_type *c_ptr);
 extern bool is_closed_door(IDX feat);
 extern bool is_hidden_door(cave_type *c_ptr);
-extern bool los(int y1, int x1, int y2, int x2);
+extern bool los(POSITION y1, POSITION x1, POSITION y2, POSITION x2);
 extern void update_local_illumination(int y, int x);
 extern bool player_can_see_bold(int y, int x);
 extern bool cave_valid_bold(int y, int x);
@@ -687,7 +687,7 @@ extern bool is_mirror_grid(cave_type *c_ptr);
 extern bool is_glyph_grid(cave_type *c_ptr);
 extern bool is_explosive_rune_grid(cave_type *c_ptr);
 extern void mmove2(int *y, int *x, int y1, int x1, int y2, int x2);
-extern bool projectable(int y1, int x1, int y2, int x2);
+extern bool projectable(POSITION y1, POSITION x1, POSITION y2, POSITION x2);
 extern void scatter(POSITION *yp, POSITION *xp, POSITION y, POSITION x, POSITION d, int mode);
 extern void health_track(IDX m_idx);
 extern void monster_race_track(IDX r_idx);
index c7d2923..4c81b8d 100644 (file)
@@ -381,8 +381,8 @@ errr process_pref_file_command(char *buf)
                        {
                                monster_race *r_ptr;
                                i = (huge)strtol(zz[0], NULL, 0);
-                               n1 = strtol(zz[1], NULL, 0);
-                               n2 = strtol(zz[2], NULL, 0);
+                               n1 = (SYMBOL_COLOR)strtol(zz[1], NULL, 0);
+                               n2 = (SYMBOL_CODE)strtol(zz[2], NULL, 0);
                                if (i >= max_r_idx) return 1;
                                r_ptr = &r_info[i];
                                if (n1 || (!(n2 & 0x80) && n2)) r_ptr->x_attr = n1; /* Allow TERM_DARK text */
@@ -397,8 +397,8 @@ errr process_pref_file_command(char *buf)
                        {
                                object_kind *k_ptr;
                                i = (huge)strtol(zz[0], NULL, 0);
-                               n1 = strtol(zz[1], NULL, 0);
-                               n2 = strtol(zz[2], NULL, 0);
+                               n1 = (SYMBOL_COLOR)strtol(zz[1], NULL, 0);
+                               n2 = (SYMBOL_CODE)strtol(zz[2], NULL, 0);
                                if (i >= max_k_idx) return 1;
                                k_ptr = &k_info[i];
                                if (n1 || (!(n2 & 0x80) && n2)) k_ptr->x_attr = n1; /* Allow TERM_DARK text */
@@ -423,8 +423,8 @@ errr process_pref_file_command(char *buf)
                                if (i >= max_f_idx) return 1;
                                f_ptr = &f_info[i];
 
-                               n1 = strtol(zz[1], NULL, 0);
-                               n2 = strtol(zz[2], NULL, 0);
+                               n1 = (SYMBOL_COLOR)strtol(zz[1], NULL, 0);
+                               n2 = (SYMBOL_CODE)strtol(zz[2], NULL, 0);
                                if (n1 || (!(n2 & 0x80) && n2)) f_ptr->x_attr[F_LIT_STANDARD] = n1; /* Allow TERM_DARK text */
                                if (n2) f_ptr->x_char[F_LIT_STANDARD] = n2;
 
@@ -451,8 +451,8 @@ errr process_pref_file_command(char *buf)
                                case F_LIT_MAX * 2 + 1:
                                        for (j = F_LIT_NS_BEGIN; j < F_LIT_MAX; j++)
                                        {
-                                               n1 = strtol(zz[j * 2 + 1], NULL, 0);
-                                               n2 = strtol(zz[j * 2 + 2], NULL, 0);
+                                               n1 = (SYMBOL_COLOR)strtol(zz[j * 2 + 1], NULL, 0);
+                                               n2 = (SYMBOL_CODE)strtol(zz[j * 2 + 2], NULL, 0);
                                                if (n1 || (!(n2 & 0x80) && n2)) f_ptr->x_attr[j] = n1; /* Allow TERM_DARK text */
                                                if (n2) f_ptr->x_char[j] = n2;
                                        }
@@ -466,8 +466,8 @@ errr process_pref_file_command(char *buf)
                        if (tokenize(buf+2, 3, zz, TOKENIZE_CHECKQUOTE) == 3)
                        {
                                j = (byte)strtol(zz[0], NULL, 0);
-                               n1 = strtol(zz[1], NULL, 0);
-                               n2 = strtol(zz[2], NULL, 0);
+                               n1 = (SYMBOL_COLOR)strtol(zz[1], NULL, 0);
+                               n2 = (SYMBOL_CODE)strtol(zz[2], NULL, 0);
                                misc_to_attr[j] = n1;
                                misc_to_char[j] = n2;
                                return 0;
@@ -499,7 +499,7 @@ errr process_pref_file_command(char *buf)
                        if (tokenize(buf+2, 2, zz, TOKENIZE_CHECKQUOTE) == 2)
                        {
                                j = (byte)strtol(zz[0], NULL, 0) % 128;
-                               n1 = strtol(zz[1], NULL, 0);
+                               n1 = (SYMBOL_COLOR)strtol(zz[1], NULL, 0);
                                if (n1) tval_to_attr[j] = n1;
                                return 0;
                        }
index e45e6f3..afadd74 100644 (file)
@@ -984,7 +984,7 @@ struct player_type
        EXP max_max_exp;        /* Max max experience (only to calculate score) */
        EXP max_exp;            /* Max experience */
        EXP exp;                        /* Cur experience */
-       EXP exp_frac;           /* Cur exp frac (times 2^16) */
+       u32b exp_frac;          /* Cur exp frac (times 2^16) */
 
        PLAYER_LEVEL lev;                       /* Level */