OSDN Git Service

char に 255 を入れるなどのwarningを直した。
authormogami <mogami@0568b783-4c39-0410-ac80-bf13821ea2a2>
Thu, 23 May 2002 14:33:33 +0000 (14:33 +0000)
committermogami <mogami@0568b783-4c39-0410-ac80-bf13821ea2a2>
Thu, 23 May 2002 14:33:33 +0000 (14:33 +0000)
src/cave.c
src/cmd4.c
src/japanese.c
src/monster1.c
src/monster2.c
src/object1.c
src/spells3.c
src/store.c
src/wizard2.c
src/z-term.c

index 3d3be8e..1c33d27 100644 (file)
@@ -1774,7 +1774,7 @@ static void bigtile_attr(char *cp, byte *ap, char *cp2, byte *ap2)
        if (*ap & 0x80)
        {
                *ap2 = 255;
-               *cp2 = 255;
+               *cp2 = -1;
                return;
        }
 
@@ -2102,12 +2102,12 @@ void lite_spot(int y, int x)
                /* Hack -- Queue it */
                Term_queue_char(panel_col_of(x), y-panel_row_prt, a, c, ta, tc);
                if (use_bigtile)
-                       Term_queue_char(panel_col_of(x)+1, y-panel_row_prt, 255, 255, 0, 0);
+                       Term_queue_char(panel_col_of(x)+1, y-panel_row_prt, 255, -1, 0, 0);
 #else /* USE_TRANSPARENCY */
                /* Hack -- Queue it */
                Term_queue_char(panel_col_of(x), y-panel_row_prt, a, c);
                if (use_bigtile)
-                       Term_queue_char(panel_col_of(x)+1, y-panel_row_prt, 255, 255);
+                       Term_queue_char(panel_col_of(x)+1, y-panel_row_prt, 255, -1);
 #endif /* USE_TRANSPARENCY */
        }
 }
index 2123091..0801e59 100644 (file)
@@ -3701,7 +3701,7 @@ void do_cmd_visuals(void)
                                if (use_bigtile)
                                {
                                        if (da & 0x80)
-                                               Term_putch(44, 19, 255, 255);
+                                               Term_putch(44, 19, 255, -1);
                                        else
                                                Term_putch(44, 19, 0, ' ');
                                }
@@ -3720,7 +3720,7 @@ void do_cmd_visuals(void)
                                if (use_bigtile)
                                {
                                        if (ca & 0x80)
-                                               Term_putch(44, 20, 255, 255);
+                                               Term_putch(44, 20, 255, -1);
                                        else
                                                Term_putch(44, 20, 0, ' ');
                                }
@@ -3814,7 +3814,7 @@ void do_cmd_visuals(void)
                                if (use_bigtile)
                                {
                                        if (da & 0x80)
-                                               Term_putch(44, 19, 255, 255);
+                                               Term_putch(44, 19, 255, -1);
                                        else
                                                Term_putch(44, 19, 0, ' ');
                                }
@@ -3833,7 +3833,7 @@ void do_cmd_visuals(void)
                                if (use_bigtile)
                                {
                                        if (ca & 0x80)
-                                               Term_putch(44, 20, 255, 255);
+                                               Term_putch(44, 20, 255, -1);
                                        else
                                                Term_putch(44, 20, 0, ' ');
                                }
@@ -3927,7 +3927,7 @@ void do_cmd_visuals(void)
                                if (use_bigtile)
                                {
                                        if (da & 0x80)
-                                               Term_putch(44, 19, 255, 255);
+                                               Term_putch(44, 19, 255, -1);
                                        else
                                                Term_putch(44, 19, 0, ' ');
                                }
@@ -3946,7 +3946,7 @@ void do_cmd_visuals(void)
                                if (use_bigtile)
                                {
                                        if (ca & 0x80)
-                                               Term_putch(44, 20, 255, 255);
+                                               Term_putch(44, 20, 255, -1);
                                        else
                                                Term_putch(44, 20, 0, ' ');
                                }
index 5a92a99..7e923e2 100644 (file)
@@ -220,7 +220,7 @@ void codeconv(char *str)
                                tmp[i] = c1;
                }
                tmp[i] = '\0';
-               strcpy(str, tmp);
+               strcpy(str, (char *)tmp);
 
                C_KILL(tmp, len, byte);
        }
index 604f24d..1b48c24 100644 (file)
@@ -3103,13 +3103,13 @@ void roff_top(int r_idx)
        /* Append the "standard" attr/char info */
        Term_addstr(-1, TERM_WHITE, " ('");
        Term_addch(a1, c1);
-       if (use_bigtile && (a1 & 0x80)) Term_addch(255, 255);
+       if (use_bigtile && (a1 & 0x80)) Term_addch(255, -1);
        Term_addstr(-1, TERM_WHITE, "')");
 
        /* Append the "optional" attr/char info */
        Term_addstr(-1, TERM_WHITE, "/('");
        Term_addch(a2, c2);
-       if (use_bigtile && (a2 & 0x80)) Term_addch(255, 255);
+       if (use_bigtile && (a2 & 0x80)) Term_addch(255, -1);
        Term_addstr(-1, TERM_WHITE, "'):");
 
        /* Wizards get extra info */
index b549d0d..a7b130a 100644 (file)
@@ -2690,7 +2690,6 @@ static int initial_r_appearance(int r_idx)
  * This is the only function which may place a monster in the dungeon,
  * except for the savefile loading code.
  */
-//bool place_monster_one(int who, int y, int x, int r_idx, bool slp, bool friendly, bool pet, bool no_pet)
 bool place_monster_one(int who, int y, int x, int r_idx, u32b mode)
 {
        int                     i;
@@ -3246,7 +3245,6 @@ static bool mon_scatter(int *yp, int *xp, int y, int x, int max_dist)
 /*
  * Attempt to place a "group" of monsters around the given location
  */
-//static bool place_monster_group(int who, int y, int x, int r_idx, bool slp, bool friendly, bool pet, bool no_pet)
 static bool place_monster_group(int who, int y, int x, int r_idx, u32b mode)
 {
        monster_race *r_ptr = &r_info[r_idx];
@@ -3404,7 +3402,6 @@ static bool place_monster_okay(int r_idx)
  * Note the use of the new "monster allocation table" code to restrict
  * the "get_mon_num()" function to "legal" escort types.
  */
-//bool place_monster_aux(int who, int y, int x, int r_idx, bool slp, bool grp, bool friendly, bool pet, bool no_kage, bool no_pet)
 bool place_monster_aux(int who, int y, int x, int r_idx, u32b mode)
 {
        int             i;
@@ -3481,7 +3478,6 @@ bool place_monster_aux(int who, int y, int x, int r_idx, u32b mode)
  *
  * Attempt to find a monster appropriate to the "monster_level"
  */
-//bool place_monster(int y, int x, bool slp, bool grp)
 bool place_monster(int y, int x, u32b mode)
 {
        int r_idx;
@@ -3579,7 +3575,6 @@ bool alloc_horde(int y, int x)
  *
  * Use "monster_level" for the monster level
  */
-//bool alloc_monster(int dis, bool slp)
 bool alloc_monster(int dis, u32b mode)
 {
        int                     y = 0, x = 0;
@@ -3771,7 +3766,6 @@ static bool summon_specific_okay(int r_idx)
  *
  * Note that this function may not succeed, though this is very rare.
  */
-//bool summon_specific(int who, int y1, int x1, int lev, int type, bool group, bool friendly, bool pet, bool unique_okay, bool no_pet)
 bool summon_specific(int who, int y1, int x1, int lev, int type, u32b mode)
 {
        int x, y, r_idx;
@@ -3819,7 +3813,6 @@ bool summon_specific(int who, int y1, int x1, int lev, int type, u32b mode)
 }
 
 /* A "dangerous" function, creates a pet of the specified type */
-//bool summon_named_creature (int who, int oy, int ox, int r_idx, bool slp, bool group_ok, bool friendly, bool pet)
 bool summon_named_creature (int who, int oy, int ox, int r_idx, u32b mode)
 {
        int x, y;
@@ -3844,7 +3837,6 @@ bool summon_named_creature (int who, int oy, int ox, int r_idx, u32b mode)
  *
  * Note that "reproduction" REQUIRES empty space.
  */
-//bool multiply_monster(int m_idx, bool clone, bool friendly, bool pet)
 bool multiply_monster(int m_idx, bool clone, u32b mode)
 {
        monster_type    *m_ptr = &m_list[m_idx];
index b8281a9..b4afd05 100644 (file)
@@ -4509,7 +4509,7 @@ int show_inven(int target_item)
                        {
                                cur_col++;
                                if (a & 0x80)
-                                       Term_draw(cur_col, j + 1, 255, 255);
+                                       Term_draw(cur_col, j + 1, 255, -1);
                        }
                        cur_col += 2;
                }
@@ -4711,7 +4711,7 @@ int show_equip(int target_item)
                        {
                                cur_col++;
                                if (a & 0x80)
-                                       Term_draw(cur_col, j + 1, 255, 255);
+                                       Term_draw(cur_col, j + 1, 255, -1);
                        }
                        cur_col += 2;
                }
index 1085c27..37f9b19 100644 (file)
@@ -5931,7 +5931,6 @@ msg_format("
 }
 
 
-//bool summon_kin_player(bool pet, int level, int y, int x, bool group)
 bool summon_kin_player(int level, int y, int x, u32b mode)
 {
        bool pet = (bool)(mode & PM_FORCE_PET);
index a948b4f..018e230 100644 (file)
@@ -2065,7 +2065,7 @@ static void display_entry(int pos)
                {
                        cur_col++;
                        if (a & 0x80)
-                               Term_draw(cur_col, i + 6, 255, 255);
+                               Term_draw(cur_col, i + 6, 255, -1);
                }
                cur_col += 2;
        }
index 84bb2db..887f5b6 100644 (file)
@@ -1382,9 +1382,6 @@ static void wiz_create_item(void)
  */
 static void do_cmd_wiz_cure_all(void)
 {
-       /* Remove curses */
-//     (void)remove_all_curse();
-
        /* Restore stats */
        (void)res_stat(A_STR);
        (void)res_stat(A_INT);
index e301704..efbea47 100644 (file)
@@ -686,11 +686,11 @@ void Term_queue_chars(int x, int y, int n, byte a, cptr s)
 
        byte *scr_aa = Term->scr->a[y];
 #ifdef JP
-        unsigned char *scr_cc = (unsigned char *)Term->scr->c[y];
+        char *scr_cc = Term->scr->c[y];
 
 #ifdef USE_TRANSPARENCY
        byte *scr_taa = Term->scr->ta[y];
-       unsigned char *scr_tcc = Term->scr->tc[y];
+       char *scr_tcc = Term->scr->tc[y];
 #endif /* USE_TRANSPARENCY */
 
 #else
@@ -727,13 +727,13 @@ void Term_queue_chars(int x, int y, int n, byte a, cptr s)
                /* Æüìʸ»ú¤È¤·¤ÆMSB¤¬Î©¤Ã¤Æ¤¤¤ë²ÄǽÀ­¤¬¤¢¤ë */
                /* ¤½¤Î¾ì¹çattr¤ÎMSB¤âΩ¤Ã¤Æ¤¤¤ë¤Î¤Ç¤³¤ì¤Ç¼±Ê̤¹¤ë */
 /* check */
-               if (iskanji(*s) && !(a & 0x80))
+               if (!(a & 0x80) && iskanji(*s))
                {
-                       int nc1 = *s++;
-                       int nc2 = *s;
+                       char nc1 = *s++;
+                       char nc2 = *s;
 
-                       int na1 = (a | KANJI1);
-                       int na2 = (a | KANJI2);
+                       byte na1 = (a | KANJI1);
+                       byte na2 = (a | KANJI2);
 
                        if((--n == 0) || !nc2) break;
 #ifdef USE_TRANSPARENCY
@@ -757,13 +757,13 @@ void Term_queue_chars(int x, int y, int n, byte a, cptr s)
                else
                {
 #endif
-               int oa = scr_aa[x];
-               int oc = scr_cc[x];
+               byte oa = scr_aa[x];
+               char oc = scr_cc[x];
 
 #ifdef USE_TRANSPARENCY
 
-               int ota = scr_taa[x];
-               int otc = scr_tcc[x];
+               byte ota = scr_taa[x];
+               char otc = scr_tcc[x];
 
                /* Hack -- Ignore non-changes */
                if ((oa == a) && (oc == *s) && (ota == 0) && (otc == 0)) continue;