![]() |
gcu on linux with colors?
Hey all,
does anyone know whether any version (sil, q, mpa) can be compiled with ncurses so that the gcu version runs with correct colors and also the background thing for unwary monsters? Thanks a lot! |
Sil-Q works correctly (I know because I fixed it). If you simply copy the main-gcu.c file from Sil-Q over the one in regular Sil, regular Sil will work correctly as well.
|
Quote:
I compiled a freshly pulled sil-q with these pre-defined settings: Code:
DEFINES= -D"USE_GCU" Code:
./sil: Unable to prepare any 'display module' (such as 'x11' or 'gcu')! Code:
CFLAGS = -std=c99 -O1 -pipe -g -D"USE_GCU" -I/usr/include/ncurses Any help/idea would be really be appreciated :) |
I'm afraid Sil-Q doesn't have the background colour highlighting for GCU either. I had a quick glance over it, but it looks to me like it requires the GCU colour handling to be overhauled to permit altering background colour. It's currently set using ncurses init_pair to initialise background and foreground colour together, and has a table of just 16 colours; it masks colours it encounters with 0xF to only use the last nibble. I'd need to extend the colour table, which might be easy or might not, I haven't really dug into this very much.
Something that will definitely be in the next release is [ and ] to show you a list of monsters and objects, Angband style, and that will also tell you which monsters are wary or unwary. Apologies for the makefile issue; I merged someone else's changes and didn't copy Makefile.std over my Makefile so hadn't tested. I'll fix accordingly. |
That's how it did work before I copied the colour handling from V over it. The 16 color pairs is more or less dead code now.
|
Quote:
|
I will confess I didn't bother to understand how it all worked, I just copied from poschengband which in turn had copied from V. But we definitely have more than 16 colors now, and angband itself iirc defines 27 colors. The main-gcu file to my understanding maps angband's internal colors to the 16 color pairs, and the patch maps them to xterm colors (all 27 of them).
Again though it was mostly just copy/paste work that I did and it's entirely possible I'm wrong. MPA-Sil has its own 256 color support, but those colors look 'wrong' to me which is why I went with the vanilla patch instead. |
From the comment in your patch:
Code:
/* If we have more than 16 colors, find the best matches. These numbers For the most part it isn't really an issue - you don't want to have colours so similar that you're trying to determine whether that's a mauve 'd' or a lilac 'd' you're facing off against - but since in the GCU implementation the background colour is linked to the foreground colour, more work would need to be done to be able to change the background colour to highlight unwary monsters. |
I just came across this post on reddit which seems relevant here - there was a mention of having to edit main-gcu.c a bit, but it does look very pretty.
|
All times are GMT +1. The time now is 19:25. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.