*scr_tcc = tc;
/* Check for new min/max row info */
- if (y < Term->y1) Term->y1 = y;
- if (y > Term->y2) Term->y2 = y;
+ if (y < Term->y1) Term->y1 = (byte_hack)y;
+ if (y > Term->y2) Term->y2 = (byte_hack)y;
/* Check for new min/max col info for this row */
- if (x < Term->x1[y]) Term->x1[y] = x;
- if (x > Term->x2[y]) Term->x2[y] = x;
+ if (x < Term->x1[y]) Term->x1[y] = (byte_hack)x;
+ if (x > Term->x2[y]) Term->x2[y] = (byte_hack)x;
#ifdef JP
if (((scrn->a[y][x] & AF_BIGTILE2) == AF_BIGTILE2) ||
* 「■」は二倍幅豆腐の内部コードに使用。
*/
static char ascii_to_zenkaku[] =
- " !”#$%&’()*+,─./"
+ " !”#$%&’()*+,-./"
"0123456789:;<=>?"
"@ABCDEFGHIJKLMNO"
"PQRSTUVWXYZ[\]^_"
if (x1 >= 0)
{
/* Check for new min/max row info */
- if (y < Term->y1) Term->y1 = y;
- if (y > Term->y2) Term->y2 = y;
+ if (y < Term->y1) Term->y1 = (byte_hack)y;
+ if (y > Term->y2) Term->y2 = (byte_hack)y;
/* Check for new min/max col info in this row */
- if (x1 < Term->x1[y]) Term->x1[y] = x1;
- if (x2 > Term->x2[y]) Term->x2[y] = x2;
+ if (x1 < Term->x1[y]) Term->x1[y] = (byte_hack)x1;
+ if (x2 > Term->x2[y]) Term->x2[y] = (byte_hack)x2;
}
}
if (x1 >= 0)
{
/* Check for new min/max row info */
- if (y < Term->y1) Term->y1 = y;
- if (y > Term->y2) Term->y2 = y;
+ if (y < Term->y1) Term->y1 = (byte_hack)y;
+ if (y > Term->y2) Term->y2 = (byte_hack)y;
/* Check for new min/max col info in this row */
- if (x1 < Term->x1[y]) Term->x1[y] = x1;
- if (x2 > Term->x2[y]) Term->x2[y] = x2;
+ if (x1 < Term->x1[y]) Term->x1[y] = (byte_hack)x1;
+ if (x2 > Term->x2[y]) Term->x2[y] = (byte_hack)x2;
}
}
term_win *old = Term->old;
term_win *scr = Term->scr;
-
+
+ /* Before initialize (Advice from Mr.shimitei)*/
+ if (!old || !scr) return (1);
/* Do nothing unless "mapped" */
if (!Term->mapped_flag) return (1);
}
/* This row is all done */
- Term->x1[y] = w;
+ Term->x1[y] = (byte_hack)w;
Term->x2[y] = 0;
/* Hack -- Flush that row (if allowed) */
}
/* No rows are invalid */
- Term->y1 = h;
+ Term->y1 = (byte_hack)h;
Term->y2 = 0;
}
if (Term->scr->cv == v) return (1);
/* Change */
- Term->scr->cv = v;
+ Term->scr->cv = (bool_hack)v;
/* Success */
return (0);
if ((y < 0) || (y >= h)) return (-1);
/* Remember the cursor */
- Term->scr->cx = x;
- Term->scr->cy = y;
+ Term->scr->cx = (byte_hack)x;
+ Term->scr->cy = (byte_hack)y;
/* The cursor is not useless */
Term->scr->cu = 0;
Term_queue_chars(Term->scr->cx, Term->scr->cy, n, a, s);
/* Advance the cursor */
- Term->scr->cx += n;
+ Term->scr->cx += (byte_hack)n;
/* Hack -- Notice "Useless" cursor */
if (res) Term->scr->cu = 1;
n++;
#endif
/* Save the "literal" information */
- scr_aa[x] = na;
- scr_cc[x] = nc;
+ scr_aa[x] = (byte_hack)na;
+ scr_cc[x] = (char)nc;
scr_taa[x] = 0;
scr_tcc[x] = 0;
if (x1 >= 0)
{
/* Check for new min/max row info */
- if (y < Term->y1) Term->y1 = y;
- if (y > Term->y2) Term->y2 = y;
+ if (y < Term->y1) Term->y1 = (byte_hack)y;
+ if (y > Term->y2) Term->y2 = (byte_hack)y;
/* Check for new min/max col info in this row */
- if (x1 < Term->x1[y]) Term->x1[y] = x1;
- if (x2 > Term->x2[y]) Term->x2[y] = x2;
+ if (x1 < Term->x1[y]) Term->x1[y] = (byte_hack)x1;
+ if (x2 > Term->x2[y]) Term->x2[y] = (byte_hack)x2;
}
/* Success */
if (x1 < 0) x1 = 0;
/* Set y limits */
- Term->y1 = y1;
- Term->y2 = y2;
+ Term->y1 = (byte_hack)y1;
+ Term->y2 = (byte_hack)y2;
/* Set the x limits */
for (i = Term->y1; i <= Term->y2; i++)
if (Term->scr->a[i][x2j] & AF_KANJI1) x2j++;
}
- Term->x1[i] = x1j;
- Term->x2[i] = x2j;
+ Term->x1[i] = (byte_hack)x1j;
+ Term->x2[i] = (byte_hack)x2j;
c_ptr = Term->old->c[i];
/*
* Extract the current window size
*/
-errr Term_get_size(int *w, int *h)
+errr Term_get_size(TERM_POSITION *w, TERM_POSITION *h)
{
/* Access the cursor */
(*w) = Term->wid;
if (!k) return (-1);
/* Store the char, advance the queue */
- Term->key_queue[Term->key_head++] = k;
+ Term->key_queue[Term->key_head++] = (char)k;
/* Circular queue, handle wrap */
if (Term->key_head == Term->key_size) Term->key_head = 0;
if (Term->key_tail == 0) Term->key_tail = Term->key_size;
/* Back up, Store the char */
- Term->key_queue[--Term->key_tail] = k;
+ Term->key_queue[--Term->key_tail] = (char)k;
/* Success (unless overflow) */
if (Term->key_head != Term->key_tail) return (0);
}
/* Save new size */
- Term->wid = w;
- Term->hgt = h;
+ Term->wid = (byte_hack)w;
+ Term->hgt = (byte_hack)h;
/* Force "total erase" */
Term->total_erase = TRUE;
t->key_head = t->key_tail = 0;
/* Determine the input queue size */
- t->key_size = k;
+ t->key_size = (u16b)k;
/* Allocate the input queue */
C_MAKE(t->key_queue, t->key_size, char);
/* Save the size */
- t->wid = w;
- t->hgt = h;
+ t->wid = (byte_hack)w;
+ t->hgt = (byte_hack)h;
/* Allocate change arrays */
C_MAKE(t->x1, h, byte);