mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-05-08 02:04:06 +00:00
new linepattern 'wall highlight'
This commit is contained in:
parent
84666ade8c
commit
962efb3152
@ -847,13 +847,6 @@ void celldrawer::draw_grid() {
|
||||
|
||||
int prec = grid_prec();
|
||||
|
||||
if(vid.grid && c->bardir != NODIR && c->bardir != NOBARRIERS && c->land != laHauntedWall &&
|
||||
c->barleft != NOWALLSEP_USED && GDIM == 2 && geometry == gNormal && (PURE || BITRUNCATED)) {
|
||||
color_t col = darkena(0x505050, 0, 0xFF);
|
||||
gridline(V, C0, tC0(cgi.heptmove[c->bardir]), col, prec+1);
|
||||
gridline(V, C0, tC0(cgi.hexmove[c->bardir]), col, prec+1);
|
||||
}
|
||||
|
||||
if(inmirrorcount) return;
|
||||
|
||||
if(vid.grid || (c->land == laAsteroids && !(WDIM == 2 && GDIM == 3))) ; else return;
|
||||
|
35
pattern2.cpp
35
pattern2.cpp
@ -3055,6 +3055,38 @@ EX namespace linepatterns {
|
||||
gridlinef(V, C0, V, mid(C0, U*C0), col2, 2 + vid.linequality);
|
||||
)
|
||||
);
|
||||
|
||||
linepattern patWallHighlight("Great Wall highlight", 0xFFFFFF00, always_available,
|
||||
ALLCELLS(
|
||||
if(c->bardir < 0 || c->bardir >= c->type) continue;
|
||||
if(c->land == laHauntedWall && !cheater) continue;
|
||||
if(GDIM != 2) continue;
|
||||
if(c->barleft == NOWALLSEP_USED) continue;
|
||||
hyperpoint ends[2];
|
||||
for(int i=0; i<2; i++) {
|
||||
cellwalker cw(c, c->bardir);
|
||||
if(i == 1 && (c->type & 1)) {
|
||||
cw += c->type/2;
|
||||
hyperpoint a = tC0(currentmap->adj(cw.at, cw.spin));
|
||||
cw++;
|
||||
hyperpoint b = tC0(currentmap->adj(cw.at, cw.spin));
|
||||
ends[i] = mid(a, b);
|
||||
break;
|
||||
}
|
||||
if(i == 1) cw += c->type/2;
|
||||
transmatrix T = currentmap->adj(cw.at, cw.spin);
|
||||
cw += wstep;
|
||||
if(cw.at->bardir == cw.spin) ends[i] = mid(C0, tC0(T));
|
||||
else if(cw.at->type % 2 == 0) {
|
||||
cw += rev;
|
||||
transmatrix U = currentmap->adj(cw.at, cw.spin);
|
||||
ends[i] = T * mid(C0, tC0(U));
|
||||
}
|
||||
}
|
||||
gridlinef(V, ends[0], V, ends[1], col, grid_prec());
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
#if HDR
|
||||
extern linepattern patTriTree, patTriRings, patTriWalls, patDual;
|
||||
@ -3067,7 +3099,8 @@ EX namespace linepatterns {
|
||||
&patVine, &patPalacelike, &patPalace, &patPower, &patHorocycles,
|
||||
&patTriRings, &patTriTree, &patTriWalls,
|
||||
&patGoldbergTree, &patIrregularMaster, &patGoldbergSep, &patHeawood, &patArcm,
|
||||
&patCircles, &patRadii, &patMeridians, &patParallels, &patSublines, &patUltra
|
||||
&patCircles, &patRadii, &patMeridians, &patParallels, &patSublines, &patUltra,
|
||||
&patWallHighlight
|
||||
};
|
||||
|
||||
EX void clearAll() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user