mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-07-05 03:02:49 +00:00
texture:: texture ghosts are now shown correctly
This commit is contained in:
parent
34d4223bed
commit
7a589090d3
@ -3583,6 +3583,9 @@ void drawcell(cell *c, transmatrix V, int spinv, bool mirrored) {
|
|||||||
draw_qfi(c, V, 0xFFFFFFFF);
|
draw_qfi(c, V, 0xFFFFFFFF);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if((cmode & sm::DRAW) && texture::config.tstate == texture::tsActive && !mouseout() && c)
|
||||||
|
mapeditor::draw_texture_ghosts(c, V);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool orig = false;
|
bool orig = false;
|
||||||
|
2
hyper.h
2
hyper.h
@ -1204,7 +1204,7 @@ namespace mapeditor {
|
|||||||
static const int USERSHAPEGROUPS = 4;
|
static const int USERSHAPEGROUPS = 4;
|
||||||
|
|
||||||
bool haveUserShape(eShapegroup group, int id);
|
bool haveUserShape(eShapegroup group, int id);
|
||||||
|
void draw_texture_ghosts(cell *c, const transmatrix& V);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct renderbuffer;
|
struct renderbuffer;
|
||||||
|
@ -1681,32 +1681,12 @@ namespace mapeditor {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
bool drawUserShape(const transmatrix& V, eShapegroup group, int id, color_t color, cell *c, PPR prio) {
|
void draw_texture_ghosts(cell *c, const transmatrix& V) {
|
||||||
#if !CAP_EDIT
|
if(!c) return;
|
||||||
return false;
|
if(holdmouse && !lstartcell) return;
|
||||||
#else
|
|
||||||
|
|
||||||
// floors handled separately
|
|
||||||
if(c && c == drawcell && editingShape(group, id) && group != sgFloor)
|
|
||||||
drawtrans = V;
|
|
||||||
|
|
||||||
usershape *us = usershapes[group][id];
|
|
||||||
if(us) {
|
|
||||||
for(int i=0; i<USERLAYERS; i++) {
|
|
||||||
if(i != dslayer && onelayeronly) continue;
|
|
||||||
usershapelayer& ds(us->d[i]);
|
|
||||||
hpcshape& sh(ds.sh);
|
|
||||||
|
|
||||||
if(sh.s != sh.e)
|
|
||||||
queuepolyat(V, sh, ds.color ? ds.color : color, prio);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if(cmode & sm::DRAW) {
|
|
||||||
|
|
||||||
#if CAP_TEXTURE
|
|
||||||
if(texture::config.tstate == texture::tsActive && lmouseover && !mouseout() && (lstartcell || !holdmouse) && c) {
|
|
||||||
cell *ls = lstartcell ? lstartcell : lmouseover;
|
cell *ls = lstartcell ? lstartcell : lmouseover;
|
||||||
|
if(!ls) return;
|
||||||
|
|
||||||
auto sio = patterns::getpatterninfo0(ls);
|
auto sio = patterns::getpatterninfo0(ls);
|
||||||
auto sih = patterns::getpatterninfo0(c);
|
auto sih = patterns::getpatterninfo0(c);
|
||||||
|
|
||||||
@ -1734,7 +1714,29 @@ namespace mapeditor {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
bool drawUserShape(const transmatrix& V, eShapegroup group, int id, color_t color, cell *c, PPR prio) {
|
||||||
|
#if !CAP_EDIT
|
||||||
|
return false;
|
||||||
|
#else
|
||||||
|
|
||||||
|
// floors handled separately
|
||||||
|
if(c && c == drawcell && editingShape(group, id) && group != sgFloor)
|
||||||
|
drawtrans = V;
|
||||||
|
|
||||||
|
usershape *us = usershapes[group][id];
|
||||||
|
if(us) {
|
||||||
|
for(int i=0; i<USERLAYERS; i++) {
|
||||||
|
if(i != dslayer && onelayeronly) continue;
|
||||||
|
usershapelayer& ds(us->d[i]);
|
||||||
|
hpcshape& sh(ds.sh);
|
||||||
|
|
||||||
|
if(sh.s != sh.e)
|
||||||
|
queuepolyat(V, sh, ds.color ? ds.color : color, prio);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(cmode & sm::DRAW) {
|
||||||
|
|
||||||
if(mapeditor::editingShape(group, id)) {
|
if(mapeditor::editingShape(group, id)) {
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user