mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-01-22 23:17:04 +00:00
mapeditor:: correct and efficient ghosts when using a larger range or quotient spaces
This commit is contained in:
parent
1539d85a45
commit
59e58693f4
@ -732,6 +732,9 @@ namespace mapeditor {
|
|||||||
displayButton(8, vid.yres-8-fs*3, XLAT("SPACE = map/graphics"), ' ', 0);
|
displayButton(8, vid.yres-8-fs*3, XLAT("SPACE = map/graphics"), ' ', 0);
|
||||||
displayButton(8, vid.yres-8-fs*2, XLAT("ESC = return to the game"), SDLK_ESCAPE, 0);
|
displayButton(8, vid.yres-8-fs*2, XLAT("ESC = return to the game"), SDLK_ESCAPE, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EX unordered_set<cell*> affected;
|
||||||
|
EX unordered_set<int> affected_id;
|
||||||
|
|
||||||
EX void showMapEditor() {
|
EX void showMapEditor() {
|
||||||
cmode = sm::MAP;
|
cmode = sm::MAP;
|
||||||
@ -739,6 +742,13 @@ namespace mapeditor {
|
|||||||
|
|
||||||
int fs = editor_fsize();
|
int fs = editor_fsize();
|
||||||
|
|
||||||
|
affected.clear();
|
||||||
|
affected_id.clear();
|
||||||
|
if(lmouseover) {
|
||||||
|
celllister cl(lmouseover, radius, 10000, nullptr);
|
||||||
|
for(cell *c: cl.lst) affected.insert(c), affected_id.insert(patterns::getpatterninfo0(c).id);
|
||||||
|
}
|
||||||
|
|
||||||
getcstat = '-';
|
getcstat = '-';
|
||||||
|
|
||||||
displayfr(8, 8 + fs, 2, vid.fsize, paintwhat_str, forecolor, 0);
|
displayfr(8, 8 + fs, 2, vid.fsize, paintwhat_str, forecolor, 0);
|
||||||
@ -1154,11 +1164,16 @@ namespace mapeditor {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
EX void drawGhosts(cell *c, const transmatrix& V, int ct) {
|
EX void drawGhosts(cell *c, const transmatrix& V, int ct) {
|
||||||
if((cmode & sm::MAP) && lmouseover && darken == 0 &&
|
if(!(cmode & sm::MAP)) return;
|
||||||
(GDIM == 3 || !mouseout()) &&
|
if(darken != 0) return;
|
||||||
(patterns::whichPattern ? patterns::getpatterninfo0(c).id == patterns::getpatterninfo0(lmouseover).id : c == lmouseover)) {
|
if(GDIM == 2 && mouseout()) return;
|
||||||
queuecircleat(c, .78, 0x00FFFFFF);
|
if(patterns::whichPattern) {
|
||||||
|
if(!affected_id.count(patterns::getpatterninfo0(c).id)) return;
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
if(!affected.count(c)) return;
|
||||||
|
}
|
||||||
|
queuecircleat1(c, V, .78, 0x00FFFFFF);
|
||||||
}
|
}
|
||||||
|
|
||||||
hyperpoint ccenter = C0;
|
hyperpoint ccenter = C0;
|
||||||
|
Loading…
Reference in New Issue
Block a user