mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-01-26 17:06:59 +00:00
fixed the monster color in the minimap for Dragons etc
This commit is contained in:
parent
8c21e450b0
commit
dd212d756b
@ -1598,7 +1598,7 @@ void showCustomizeChar() {
|
|||||||
|
|
||||||
double alpha = atan2(mousex - vid.xres/2, mousey - firsty) - M_PI/2;
|
double alpha = atan2(mousex - vid.xres/2, mousey - firsty) - M_PI/2;
|
||||||
V = V * spin(alpha);
|
V = V * spin(alpha);
|
||||||
drawMonsterType(moPlayer, NULL, V, 0, cc_footphase / scale);
|
drawMonsterType(moPlayer, NULL, V, 0, cc_footphase / scale, NOCOLOR);
|
||||||
quickqueue();
|
quickqueue();
|
||||||
|
|
||||||
keyhandler = [] (int sym, int uni) {
|
keyhandler = [] (int sym, int uni) {
|
||||||
|
36
graph.cpp
36
graph.cpp
@ -869,7 +869,7 @@ bool drawItemType(eItem it, cell *c, const transmatrix& V, color_t icol, int pti
|
|||||||
if(!mmitem && it) return true;
|
if(!mmitem && it) return true;
|
||||||
|
|
||||||
else if(it == itSavedPrincess) {
|
else if(it == itSavedPrincess) {
|
||||||
drawMonsterType(moPrincess, c, V, icol, 0);
|
drawMonsterType(moPrincess, c, V, icol, 0, icol);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1316,11 +1316,11 @@ void drawMimic(eMonster m, cell *where, const transmatrix& V, color_t col, doubl
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool drawMonsterType(eMonster m, cell *where, const transmatrix& V1, color_t col, double footphase) {
|
bool drawMonsterType(eMonster m, cell *where, const transmatrix& V1, color_t col, double footphase, color_t asciicol) {
|
||||||
|
|
||||||
#if MAXMDIM >= 4
|
#if MAXMDIM >= 4
|
||||||
if(DIM == 3 && m != moPlayer)
|
if(DIM == 3 && m != moPlayer && asciicol != NOCOLOR)
|
||||||
addradar(V1, minf[m].glyph, col, isFriendly(m) ? 0x00FF00FF : 0xFF0000FF);
|
addradar(V1, minf[m].glyph, asciicol, isFriendly(m) ? 0x00FF00FF : 0xFF0000FF);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if CAP_SHAPES
|
#if CAP_SHAPES
|
||||||
@ -2254,13 +2254,13 @@ bool drawMonsterType(eMonster m, cell *where, const transmatrix& V1, color_t col
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
bool drawMonsterTypeDH(eMonster m, cell *where, const transmatrix& V, color_t col, bool dh, ld footphase) {
|
bool drawMonsterTypeDH(eMonster m, cell *where, const transmatrix& V, color_t col, bool dh, ld footphase, color_t asciicol) {
|
||||||
dynamicval<color_t> p(poly_outline, poly_outline);
|
dynamicval<color_t> p(poly_outline, poly_outline);
|
||||||
if(dh) {
|
if(dh) {
|
||||||
poly_outline = OUTLINE_DEAD;
|
poly_outline = OUTLINE_DEAD;
|
||||||
darken++;
|
darken++;
|
||||||
}
|
}
|
||||||
bool b = drawMonsterType(m,where,V,col, footphase);
|
bool b = drawMonsterType(m,where,V,col, footphase, asciicol);
|
||||||
if(dh) {
|
if(dh) {
|
||||||
darken--;
|
darken--;
|
||||||
}
|
}
|
||||||
@ -2381,7 +2381,7 @@ void drawWormSegments() {
|
|||||||
|
|
||||||
bool dont_face_pc = false;
|
bool dont_face_pc = false;
|
||||||
|
|
||||||
bool drawMonster(const transmatrix& Vparam, int ct, cell *c, color_t col, bool mirrored) {
|
bool drawMonster(const transmatrix& Vparam, int ct, cell *c, color_t col, bool mirrored, color_t asciicol) {
|
||||||
#if CAP_SHAPES
|
#if CAP_SHAPES
|
||||||
|
|
||||||
bool darkhistory = conformal::includeHistory && conformal::inkillhistory.count(c);
|
bool darkhistory = conformal::includeHistory && conformal::inkillhistory.count(c);
|
||||||
@ -2424,7 +2424,7 @@ bool drawMonster(const transmatrix& Vparam, int ct, cell *c, color_t col, bool m
|
|||||||
if(isDragon(c->monst) && c->stuntime == 0) col = 0xFF6000;
|
if(isDragon(c->monst) && c->stuntime == 0) col = 0xFF6000;
|
||||||
|
|
||||||
if(DIM == 3)
|
if(DIM == 3)
|
||||||
addradar(Vparam, minf[m].glyph, col, isFriendly(m) ? 0x00FF00FF : 0xFF0000FF);
|
addradar(Vparam, minf[m].glyph, asciicol, isFriendly(m) ? 0x00FF00FF : 0xFF0000FF);
|
||||||
|
|
||||||
transmatrix Vb0 = Vb;
|
transmatrix Vb0 = Vb;
|
||||||
if(c->mondir != NODIR && DIM == 3 && isAnyIvy(c)) {
|
if(c->mondir != NODIR && DIM == 3 && isAnyIvy(c)) {
|
||||||
@ -2659,7 +2659,7 @@ bool drawMonster(const transmatrix& Vparam, int ct, cell *c, color_t col, bool m
|
|||||||
}
|
}
|
||||||
if(!nospins && flipplayer) Vs = Vs * pispin;
|
if(!nospins && flipplayer) Vs = Vs * pispin;
|
||||||
if(mmmon) {
|
if(mmmon) {
|
||||||
drawMonsterType(moMimic, c, Vs, col, footphase);
|
drawMonsterType(moMimic, c, Vs, col, footphase, asciicol);
|
||||||
drawPlayerEffects(Vs, c, false);
|
drawPlayerEffects(Vs, c, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2673,7 +2673,7 @@ bool drawMonster(const transmatrix& Vparam, int ct, cell *c, color_t col, bool m
|
|||||||
else if(c->monst == moIllusion) {
|
else if(c->monst == moIllusion) {
|
||||||
multi::cpid = 0;
|
multi::cpid = 0;
|
||||||
if(c->monmirror) Vs = Vs * Mirror;
|
if(c->monmirror) Vs = Vs * Mirror;
|
||||||
drawMonsterType(c->monst, c, Vs, col, footphase);
|
drawMonsterType(c->monst, c, Vs, col, footphase, asciicol);
|
||||||
drawPlayerEffects(Vs, c, false);
|
drawPlayerEffects(Vs, c, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2690,7 +2690,7 @@ bool drawMonster(const transmatrix& Vparam, int ct, cell *c, color_t col, bool m
|
|||||||
Vs = Vs * ddspin(c, d, 0);
|
Vs = Vs * ddspin(c, d, 0);
|
||||||
}
|
}
|
||||||
if(c->monmirror) Vs = Vs * Mirror;
|
if(c->monmirror) Vs = Vs * Mirror;
|
||||||
return drawMonsterTypeDH(m, c, Vs, col, darkhistory, footphase);
|
return drawMonsterTypeDH(m, c, Vs, col, darkhistory, footphase, asciicol);
|
||||||
}
|
}
|
||||||
|
|
||||||
else if(c->monst == moKrakenT) {
|
else if(c->monst == moKrakenT) {
|
||||||
@ -2713,7 +2713,7 @@ bool drawMonster(const transmatrix& Vparam, int ct, cell *c, color_t col, bool m
|
|||||||
|
|
||||||
// if(ctof(c) && !masterless) Vb = Vb * xpush(hexhexdist - hcrossf);
|
// if(ctof(c) && !masterless) Vb = Vb * xpush(hexhexdist - hcrossf);
|
||||||
// return (!BITRUNCATED) ? tessf * gp::scale : (c->type == 6 && (i&1)) ? hexhexdist : cgi.crossf;
|
// return (!BITRUNCATED) ? tessf * gp::scale : (c->type == 6 && (i&1)) ? hexhexdist : cgi.crossf;
|
||||||
return drawMonsterTypeDH(m, c, Vb, col, darkhistory, footphase);
|
return drawMonsterTypeDH(m, c, Vb, col, darkhistory, footphase, asciicol);
|
||||||
}
|
}
|
||||||
|
|
||||||
// golems, knights, and hyperbugs don't face the player (mondir-controlled)
|
// golems, knights, and hyperbugs don't face the player (mondir-controlled)
|
||||||
@ -2725,7 +2725,7 @@ bool drawMonster(const transmatrix& Vparam, int ct, cell *c, color_t col, bool m
|
|||||||
if(c->monst == moPair) Vs = Vs * xpush(-.12);
|
if(c->monst == moPair) Vs = Vs * xpush(-.12);
|
||||||
if(c->monmirror) Vs = Vs * Mirror;
|
if(c->monmirror) Vs = Vs * Mirror;
|
||||||
if(isFriendly(c)) drawPlayerEffects(Vs, c, false);
|
if(isFriendly(c)) drawPlayerEffects(Vs, c, false);
|
||||||
return drawMonsterTypeDH(m, c, Vs, col, darkhistory, footphase);
|
return drawMonsterTypeDH(m, c, Vs, col, darkhistory, footphase, asciicol);
|
||||||
}
|
}
|
||||||
|
|
||||||
else {
|
else {
|
||||||
@ -2751,7 +2751,7 @@ bool drawMonster(const transmatrix& Vparam, int ct, cell *c, color_t col, bool m
|
|||||||
if(c->monst == moShadow)
|
if(c->monst == moShadow)
|
||||||
multi::cpid = c->hitpoints;
|
multi::cpid = c->hitpoints;
|
||||||
|
|
||||||
return drawMonsterTypeDH(m, c, Vs, col, darkhistory, footphase);
|
return drawMonsterTypeDH(m, c, Vs, col, darkhistory, footphase, asciicol);
|
||||||
}
|
}
|
||||||
|
|
||||||
for(int i=0; i<numplayers(); i++) if(c == playerpos(i) && !shmup::on && mapeditor::drawplayer &&
|
for(int i=0; i<numplayers(); i++) if(c == playerpos(i) && !shmup::on && mapeditor::drawplayer &&
|
||||||
@ -2778,12 +2778,12 @@ bool drawMonster(const transmatrix& Vparam, int ct, cell *c, color_t col, bool m
|
|||||||
ld depth = geom3::factor_to_lev(wormhead(c) == c ? cgi.AHEAD : cgi.ABODY);
|
ld depth = geom3::factor_to_lev(wormhead(c) == c ? cgi.AHEAD : cgi.ABODY);
|
||||||
footphase = 0;
|
footphase = 0;
|
||||||
int q = ptds.size();
|
int q = ptds.size();
|
||||||
drawMonsterType(moPlayer, c, Vs, col, footphase);
|
drawMonsterType(moPlayer, c, Vs, col, footphase, asciicol);
|
||||||
pushdown(c, q, Vs, -depth, true, false);
|
pushdown(c, q, Vs, -depth, true, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
else if(mmmon)
|
else if(mmmon)
|
||||||
drawMonsterType(moPlayer, c, Vs, col, footphase);
|
drawMonsterType(moPlayer, c, Vs, col, footphase, asciicol);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@ -6385,7 +6385,7 @@ void drawcell(cell *c, transmatrix V, int spinv, bool mirrored) {
|
|||||||
transmatrix V2 = V;
|
transmatrix V2 = V;
|
||||||
double footphase = t / 200.0;
|
double footphase = t / 200.0;
|
||||||
applyAnimation(c, V2, footphase, LAYER_SMALL);
|
applyAnimation(c, V2, footphase, LAYER_SMALL);
|
||||||
drawMonsterType(fa.m, c, V2, minf[fa.m].color, footphase);
|
drawMonsterType(fa.m, c, V2, minf[fa.m].color, footphase, NOCOLOR);
|
||||||
pushdown(c, q, V2, t*t / 1000000. + t / 1000., true, true);
|
pushdown(c, q, V2, t*t / 1000000. + t / 1000., true, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -6416,7 +6416,7 @@ void drawcell(cell *c, transmatrix V, int spinv, bool mirrored) {
|
|||||||
#if CAP_SHAPES
|
#if CAP_SHAPES
|
||||||
int q = ptds.size();
|
int q = ptds.size();
|
||||||
#endif
|
#endif
|
||||||
bool m = drawMonster(V, ctype, c, moncol, mirrored);
|
bool m = drawMonster(V, ctype, c, moncol, mirrored, asciicol);
|
||||||
if(m) error = true;
|
if(m) error = true;
|
||||||
if(m || c->monst) onradar = false;
|
if(m || c->monst) onradar = false;
|
||||||
#if CAP_SHAPES
|
#if CAP_SHAPES
|
||||||
|
2
hud.cpp
2
hud.cpp
@ -193,7 +193,7 @@ bool displayglyph(int cx, int cy, int buttonsize, char glyph, color_t color, int
|
|||||||
V[i][i] /= cgi.wormscale;
|
V[i][i] /= cgi.wormscale;
|
||||||
int mcol = color;
|
int mcol = color;
|
||||||
mcol -= (color & 0xFCFCFC) >> 2;
|
mcol -= (color & 0xFCFCFC) >> 2;
|
||||||
drawMonsterType(m, NULL, V, mcol, glyphphase[id]/500.0);
|
drawMonsterType(m, NULL, V, mcol, glyphphase[id]/500.0, NOCOLOR);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
eItem it = eItem(id);
|
eItem it = eItem(id);
|
||||||
|
4
hyper.h
4
hyper.h
@ -2095,7 +2095,7 @@ extern bool ivoryz;
|
|||||||
transmatrix face_the_player(const transmatrix V);
|
transmatrix face_the_player(const transmatrix V);
|
||||||
void addradar(const transmatrix& V, char ch, color_t col, color_t outline);
|
void addradar(const transmatrix& V, char ch, color_t col, color_t outline);
|
||||||
|
|
||||||
bool drawMonsterType(eMonster m, cell *where, const transmatrix& V, color_t col, double footphase);
|
bool drawMonsterType(eMonster m, cell *where, const transmatrix& V, color_t col, double footphase, color_t asciicol);
|
||||||
|
|
||||||
void drawPlayerEffects(const transmatrix& V, cell *c, bool onPlayer);
|
void drawPlayerEffects(const transmatrix& V, cell *c, bool onPlayer);
|
||||||
|
|
||||||
@ -5547,4 +5547,6 @@ void apply_memory_reserve();
|
|||||||
void show_memory_menu();
|
void show_memory_menu();
|
||||||
static const int PSEUDOKEY_MEMORY = 16397;
|
static const int PSEUDOKEY_MEMORY = 16397;
|
||||||
|
|
||||||
|
static const color_t NOCOLOR = 0;
|
||||||
|
|
||||||
}
|
}
|
@ -1436,10 +1436,10 @@ namespace mapeditor {
|
|||||||
dynamicval<bool> ws(mmspatial, false);
|
dynamicval<bool> ws(mmspatial, false);
|
||||||
|
|
||||||
if(sg == 0) {
|
if(sg == 0) {
|
||||||
multi::cpid = id, drawMonsterType(moPlayer, drawcell, Id, 0xC0C0C0, 0);
|
multi::cpid = id, drawMonsterType(moPlayer, drawcell, Id, 0xC0C0C0, 0, 0xC0C0C0);
|
||||||
}
|
}
|
||||||
else if(sg == 1) {
|
else if(sg == 1) {
|
||||||
drawMonsterType(eMonster(id), drawcell, Id, minf[id].color, 0);
|
drawMonsterType(eMonster(id), drawcell, Id, minf[id].color, 0, minf[id].color);
|
||||||
}
|
}
|
||||||
else if(sg == 2) {
|
else if(sg == 2) {
|
||||||
drawItemType(eItem(id), drawcell, Id, iinf[id].color, 0, false);
|
drawItemType(eItem(id), drawcell, Id, iinf[id].color, 0, false);
|
||||||
|
@ -1207,11 +1207,11 @@ void draw_ghost_at(ghost& ghost, cell *w, const transmatrix& V, ghostmoment& p)
|
|||||||
dynamicval<charstyle> x(getcs(), ghost.cs);
|
dynamicval<charstyle> x(getcs(), ghost.cs);
|
||||||
if(ghost.cs.charid == -1) {
|
if(ghost.cs.charid == -1) {
|
||||||
dynamicval<bool> pc(peace::on, true);
|
dynamicval<bool> pc(peace::on, true);
|
||||||
drawMonsterType(eMonster(ghost.cs.uicolor), w, V, ghost.cs.dresscolor, uchar_to_frac(p.footphase));
|
drawMonsterType(eMonster(ghost.cs.uicolor), w, V, ghost.cs.dresscolor, uchar_to_frac(p.footphase), NOCOLOR);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
drawMonsterType(moPlayer, w, V, 0, uchar_to_frac(p.footphase));
|
drawMonsterType(moPlayer, w, V, 0, uchar_to_frac(p.footphase), NOCOLOR);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ghost_finished(ghost& ghost) {
|
bool ghost_finished(ghost& ghost) {
|
||||||
@ -1273,7 +1273,7 @@ void drawStats() {
|
|||||||
|
|
||||||
for(int i=0; i<multi::players; i++) {
|
for(int i=0; i<multi::players; i++) {
|
||||||
dynamicval<int> d(multi::cpid, i);
|
dynamicval<int> d(multi::cpid, i);
|
||||||
drawMonsterType(moPlayer, shmup::pc[i]->base, racerel(race_finish_tick[i] ? 100 : get_percentage(i)), 0xFFFFFFC0, shmup::pc[i]->footphase);
|
drawMonsterType(moPlayer, shmup::pc[i]->base, racerel(race_finish_tick[i] ? 100 : get_percentage(i)), 0xFFFFFFC0, shmup::pc[i]->footphase, NOCOLOR);
|
||||||
}
|
}
|
||||||
|
|
||||||
quickqueue();
|
quickqueue();
|
||||||
|
@ -3649,7 +3649,7 @@ bool drawMonster(const transmatrix& V, cell *c, const transmatrix*& Vboat, trans
|
|||||||
drawPlayerEffects(view, c, true);
|
drawPlayerEffects(view, c, true);
|
||||||
if(WDIM == 3) view = view * spin(-M_PI/2) * cspin(0, 2, -M_PI/2);
|
if(WDIM == 3) view = view * spin(-M_PI/2) * cspin(0, 2, -M_PI/2);
|
||||||
if(m->inBoat) m->footphase = 0;
|
if(m->inBoat) m->footphase = 0;
|
||||||
if(mapeditor::drawplayer) drawMonsterType(moPlayer, c, view, 0xFFFFFFC0, m->footphase);
|
if(mapeditor::drawplayer) drawMonsterType(moPlayer, c, view, 0xFFFFFFC0, m->footphase, 0xFFFFFFC0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ths && h) first_cell_to_draw = false;
|
if(ths && h) first_cell_to_draw = false;
|
||||||
@ -3751,7 +3751,7 @@ bool drawMonster(const transmatrix& V, cell *c, const transmatrix*& Vboat, trans
|
|||||||
/* else if(DIM == 3)
|
/* else if(DIM == 3)
|
||||||
drawMonsterType(m->type, c, view * cspin(0, 2, M_PI/2), col, m->footphase); */
|
drawMonsterType(m->type, c, view * cspin(0, 2, M_PI/2), col, m->footphase); */
|
||||||
/* else */
|
/* else */
|
||||||
drawMonsterType(m->type, c, view, col, m->footphase);
|
drawMonsterType(m->type, c, view, col, m->footphase, col);
|
||||||
if(m->type == moTortoise) tortoise::emap.erase(c);
|
if(m->type == moTortoise) tortoise::emap.erase(c);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user