1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-10-18 06:30:41 +00:00

rogueviz:: better spillcolor

This commit is contained in:
Zeno Rogue 2024-08-01 12:25:34 +02:00
parent aaaef26bae
commit 1ea6b88f81
2 changed files with 5 additions and 3 deletions

View File

@ -510,7 +510,8 @@ bool drawVertex(const shiftmatrix &V, cell *c, shmup::monster *m) {
if(m->type != moRogueviz) return false;
int i = m->pid;
vertexdata& vd = vdata[i];
if(vd.spillcolor != DEFAULT_COLOR) c->landparam = vd.spillcolor >> 8;
// bool ghilite = false;
// if(vd.special && specialmark) ghilite = true;
@ -816,7 +817,7 @@ void readcolor(const string& cfname) {
color_t col;
int err = fscanf(f, "%08x", &col);
if(err <= 0) throw hstream_exception("reading dot-color");
action = [col] (vertexdata &vd) { vd.m->base->landparam = col >> 8; };
action = [col] (vertexdata &vd) { vd.spillcolor = col; };
}
else if(c2 == '/') {
string s = str_to_eol();

View File

@ -112,8 +112,9 @@ namespace rogueviz {
int data;
vector<string> urls;
vector<string> infos;
color_t spillcolor;
shmup::monster *m;
vertexdata() { virt = NULL; m = NULL; special = false; }
vertexdata() { virt = NULL; m = NULL; special = false; spillcolor = DEFAULT_COLOR; }
};
extern vector<vertexdata> vdata;