rogueviz:: edge colors can be adjusted now

This commit is contained in:
Zeno Rogue 2018-07-04 14:35:45 +02:00
parent 87534ac492
commit ddf3ca83cf
2 changed files with 11 additions and 2 deletions

View File

@ -29,6 +29,10 @@ void init();
bool showlabels = false;
bool specialmark = false;
static const unsigned DEFAULT_COLOR = 0x47129371;
unsigned edgecolor = DEFAULT_COLOR;
bool rog3 = false;
int vertex_shape = 1;
@ -1086,7 +1090,7 @@ void drawVertex(const transmatrix &V, cell *c, shmup::monster *m) {
} */
int col =
((hilite ? 0xFF0000 : forecolor) << 8) + xlalpha;
((hilite ? 0xFF0000 : ei->color != DEFAULT_COLOR ? ei->color : forecolor) << 8) + xlalpha;
bool onspiral = kind == kSpiral && abs(ei->i - ei->j) == 1;
if(pmodel || onspiral) {
@ -1529,6 +1533,9 @@ int readArgs() {
else if(argis("-rog3")) {
rog3 = true;
}
else if(argis("-rvedge")) {
shift(); edgecolor = arghex();
}
else if(argis("-cshift")) {
shift(); collatz::cshift = argf();
}

View File

@ -17,6 +17,7 @@ namespace rogueviz {
void mark(cell *c);
void showMenu();
string makehelp();
extern unsigned edgecolor;
void init();
@ -27,7 +28,8 @@ namespace rogueviz {
vector<glvertex> prec;
cell *orig;
int lastdraw;
edgeinfo() { visible = true; orig = NULL; lastdraw = -1; }
unsigned color;
edgeinfo() { visible = true; orig = NULL; lastdraw = -1; color = edgecolor; }
};
struct colorpair {