OSDN Git Service

まだ、bigtile_attr()を使ったコード整理すらしていない部分があったので、
authormogami <mogami@0568b783-4c39-0410-ac80-bf13821ea2a2>
Fri, 24 Oct 2003 21:28:15 +0000 (21:28 +0000)
committermogami <mogami@0568b783-4c39-0410-ac80-bf13821ea2a2>
Fri, 24 Oct 2003 21:28:15 +0000 (21:28 +0000)
これを Term_queue_bigchar()とTerm_add_bigch()を使って書いた。

src/cave.c
src/monster1.c
src/object1.c
src/store.c
src/z-term.h

index c1581d9..f4c9013 100644 (file)
@@ -2329,7 +2329,8 @@ void display_map(int *cy, int *cx)
        /* Display each map line in order */
        for (y = 0; y < hgt + 2; ++y)
        {
-               int cx = COL_MAP;
+               /* Start a new line */
+               Term_gotoxy(COL_MAP, y);
 
                /* Display the line */
                for (x = 0; x < wid + 2; ++x)
@@ -2346,10 +2347,7 @@ void display_map(int *cy, int *cx)
                        }
 
                        /* Add the character */
-                       Term_queue_bigchar(cx, y, ta, tc, 0, 0);
-
-                       if (use_bigtile) cx += 2;
-                       else cx++;
+                       Term_add_bigch(ta, tc);
                }
        }
 
index df1f13f..e81d57f 100644 (file)
@@ -3050,14 +3050,12 @@ 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, -1);
+       Term_add_bigch(a1, c1);
        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, -1);
+       Term_add_bigch(a2, c2);
        Term_addstr(-1, TERM_WHITE, "'):");
 
        /* Wizards get extra info */
index 4b9ea21..2aebce0 100644 (file)
@@ -5015,13 +5015,9 @@ int show_inven(int target_item)
                        if (a & 0x80) a |= 0x40;
 #endif
 
-                       Term_draw(cur_col, j + 1, a, c);
-                       if (use_bigtile)
-                       {
-                               cur_col++;
-                               if (a & 0x80)
-                                       Term_draw(cur_col, j + 1, 255, -1);
-                       }
+                       Term_queue_bigchar(cur_col, j + 1, a, c, 0, 0);
+                       if (use_bigtile) cur_col++;
+
                        cur_col += 2;
                }
 
@@ -5202,13 +5198,9 @@ int show_equip(int target_item)
                        if (a & 0x80) a |= 0x40;
 #endif
 
-                       Term_draw(cur_col, j + 1, a, c);
-                       if (use_bigtile)
-                       {
-                               cur_col++;
-                               if (a & 0x80)
-                                       Term_draw(cur_col, j + 1, 255, -1);
-                       }
+                       Term_queue_bigchar(cur_col, j + 1, a, c, 0, 0);
+                       if (use_bigtile) cur_col++;
+
                        cur_col += 2;
                }
 
index c1b1601..3ad5a24 100644 (file)
@@ -2075,13 +2075,7 @@ static void display_entry(int pos)
                        a |= 0x40;
 #endif
 
-               Term_draw(cur_col, i + 6, a, c);
-               if (use_bigtile)
-               {
-                       cur_col++;
-                       if (a & 0x80)
-                               Term_draw(cur_col, i + 6, 255, -1);
-               }
+               Term_queue_bigchar(cur_col, i + 6, a, c, 0, 0);
                cur_col += 2;
        }
 
index 333af55..a0571e1 100644 (file)
@@ -285,6 +285,7 @@ extern errr Term_set_cursor(int v);
 extern errr Term_gotoxy(int x, int y);
 extern errr Term_draw(int x, int y, byte a, char c);
 extern errr Term_addch(byte a, char c);
+extern errr Term_add_bigch(byte a, char c);
 extern errr Term_addstr(int n, byte a, cptr s);
 extern errr Term_putch(int x, int y, byte a, char c);
 extern errr Term_putstr(int x, int y, int n, byte a, cptr s);