I am not sure exactly what Sil's system for background colour changes is, but if it's like the Angband one (and it probably is because I'm not sure where else I would have stolen it from), I just implemented this for the Angband 4.0.5 port. The commit is here:
You want Term_text_and() in plugin/common/angdroid.c to look like:
And then the rest of the patch I linked to should apply cleanly and get you background colours.
You want Term_text_and() in plugin/common/angdroid.c to look like:
Code:
static errr Term_text_and(int x, int y, int n, int a, const wchar_t *cp)
{
int fg = a % MAX_COLORS;
int bg;
/* Handle background */
switch (a / MAX_COLORS) {
case BG_BLACK: bg = COLOUR_DARK; break;
case BG_SAME: bg = fg; break;
case BG_DARK: bg = COLOUR_SHADE; break;
}
move(y, x);
attrset(fg);
bgattrset(bg);
addnwstr(n, cp);
return 0;
}
Comment