OSDN Git Service

main-mac.cのrev. 1.21 の変更を移植:
authormogami <mogami@0568b783-4c39-0410-ac80-bf13821ea2a2>
Wed, 1 Oct 2003 15:18:20 +0000 (15:18 +0000)
committermogami <mogami@0568b783-4c39-0410-ac80-bf13821ea2a2>
Wed, 1 Oct 2003 15:18:20 +0000 (15:18 +0000)
Bit tileモード用のカーソル表示コードを整理。main-xxx.cの中で地形情報の配列の
内容を直接参照してしまっていた所を、書き変えて参照せずに済むようにした。
既にVanilla用のパッチで適用していたもの。

src/main-mac-carbon.c

index 07dc294..f39640f 100644 (file)
@@ -1884,14 +1884,33 @@ static errr Term_curs_mac(int x, int y)
        r.top = y * td->tile_hgt + td->size_oh1;
        r.bottom = r.top + td->tile_hgt;
 
-#ifdef JP
-       if (x + 1 < Term->wid &&
-           ((use_bigtile && Term->old->a[y][x+1] == 255)
-            || (iskanji(Term->old->c[y][x]) && !(Term->old->a[y][x] & 0x80))))
-#else
-       if (use_bigtile && x + 1 < Term->wid && Term->old->a[y][x+1] == 255)
-#endif
-               r.right += td->tile_wid;
+       FrameRect(&r);
+
+       /* Success */
+       return (0);
+}
+
+
+/*
+ * Low level graphics (Assumes valid input).
+ * Draw a "big cursor" at (x,y), using a "yellow box".
+ * We are allowed to use "Term_grab()" to determine
+ * the current screen contents (for inverting, etc).
+ */
+static errr Term_bigcurs_mac(int x, int y)
+{
+       Rect r;
+
+       term_data *td = (term_data*)(Term->data);
+
+       /* Set the color */
+       term_data_color(td, TERM_YELLOW);
+
+       /* Frame the grid */
+       r.left = x * td->tile_wid + td->size_ow1;
+       r.right = r.left + 2 * td->tile_wid;
+       r.top = y * td->tile_hgt + td->size_oh1;
+       r.bottom = r.top + td->tile_hgt;
 
        FrameRect(&r);
 
@@ -2230,6 +2249,7 @@ static void term_data_link(int i)
        td->t->xtra_hook = Term_xtra_mac;
        td->t->wipe_hook = Term_wipe_mac;
        td->t->curs_hook = Term_curs_mac;
+       td->t->bigcurs_hook = Term_bigcurs_mac;
        td->t->text_hook = Term_text_mac;
        td->t->pict_hook = Term_pict_mac;