mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-16 18:24:48 +00:00
rogueviz:: label placement now takes scalefactor into account correctly
This commit is contained in:
parent
eca47115c9
commit
3c882ec6c0
@ -578,6 +578,8 @@ void queue_prec(const shiftmatrix& V, edgeinfo*& ei, color_t col) {
|
|||||||
|
|
||||||
int brm_limit = 1000;
|
int brm_limit = 1000;
|
||||||
|
|
||||||
|
ld labelshift = .2;
|
||||||
|
|
||||||
bool drawVertex(const shiftmatrix &V, cell *c, shmup::monster *m) {
|
bool drawVertex(const shiftmatrix &V, cell *c, shmup::monster *m) {
|
||||||
if(m->dead) return true;
|
if(m->dead) return true;
|
||||||
if(m->type != moRogueviz) return false;
|
if(m->type != moRogueviz) return false;
|
||||||
@ -745,7 +747,7 @@ bool drawVertex(const shiftmatrix &V, cell *c, shmup::monster *m) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
shiftpoint h = tC0(V * m->at);
|
shiftpoint h = tC0(V * m->at);
|
||||||
shiftmatrix V2 = GDIM == 3 ? V * m->at : rgpushxto0(h) * ypush(PURE ? .3 : .2); // todo-variation
|
shiftmatrix V2 = GDIM == 3 ? V * m->at : rgpushxto0(h) * ypush(cgi.scalefactor * labelshift); // todo-variation
|
||||||
if(doshow && !behindsphere(V2)) {
|
if(doshow && !behindsphere(V2)) {
|
||||||
auto info = vd.info;
|
auto info = vd.info;
|
||||||
if(info) queueaction(PPR::MONSTER_HEAD, [info] () { SVG_LINK(*info); });
|
if(info) queueaction(PPR::MONSTER_HEAD, [info] () { SVG_LINK(*info); });
|
||||||
@ -994,6 +996,9 @@ int readArgs() {
|
|||||||
else if(argis("-rvspaces")) {
|
else if(argis("-rvspaces")) {
|
||||||
rv_ignore_spaces = false;
|
rv_ignore_spaces = false;
|
||||||
}
|
}
|
||||||
|
else if(argis("-rvlabelshift")) {
|
||||||
|
shift_arg_formula(labelshift);
|
||||||
|
}
|
||||||
else if(argis("-rog3")) {
|
else if(argis("-rog3")) {
|
||||||
rog3 = true;
|
rog3 = true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user