1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-27 14:37:16 +00:00

neon_nofill option; added XLAT to vector options; neon now also disables textured triangles

This commit is contained in:
Zeno Rogue 2020-04-06 10:44:27 +02:00
parent c1ed54763b
commit 805c153c9f
2 changed files with 12 additions and 4 deletions

View File

@ -650,6 +650,7 @@ EX void initConfig() {
addsaver(nilv::nilperiod[2], "nilperiod_z"); addsaver(nilv::nilperiod[2], "nilperiod_z");
addsaverenum(neon_mode, "neon_mode"); addsaverenum(neon_mode, "neon_mode");
addsaverenum(neon_nofill, "neon_nofill");
addsaver(noshadow, "noshadow"); addsaver(noshadow, "noshadow");
addsaver(bright, "bright"); addsaver(bright, "bright");
addsaver(cblind, "cblind"); addsaver(cblind, "cblind");
@ -1162,9 +1163,11 @@ EX void showGraphConfig() {
dialog::addBreak(100); dialog::addBreak(100);
dialog::addInfo(XLAT("hint: press Alt while testing modes")); dialog::addInfo(XLAT("hint: press Alt while testing modes"));
dialog::addBreak(100); dialog::addBreak(100);
dialog::addBoolItem_action("disable shadows", noshadow, 'F'); dialog::addBoolItem_action(XLAT("disable shadows"), noshadow, 'F');
dialog::addBoolItem_action("bright mode", bright, 'G'); dialog::addBoolItem_action(XLAT("bright mode"), bright, 'G');
dialog::addBoolItem_action("colorblind simulation", cblind, 'H'); dialog::addBoolItem_action(XLAT("colorblind simulation"), cblind, 'H');
dialog::addBoolItem_action(XLAT("no fill in neon mode"), neon_nofill, 'N');
}; };
} }

View File

@ -2135,6 +2135,7 @@ enum class eNeon { none, neon, no_boundary, neon2, illustration};
#endif #endif
EX eNeon neon_mode; EX eNeon neon_mode;
EX bool neon_nofill;
EX void apply_neon(color_t& col, int& r) { EX void apply_neon(color_t& col, int& r) {
switch(neon_mode) { switch(neon_mode) {
@ -2199,7 +2200,9 @@ EX dqi_poly& queuepolyat(const transmatrix& V, const hpcshape& h, color_t col, P
part(col,1) = b; */ part(col,1) = b; */
part(col,2) = part(col,3) = (part(col,2) * 2 + part(col,3) + 1)/3; part(col,2) = part(col,3) = (part(col,2) * 2 + part(col,3) + 1)/3;
} }
if(neon_mode == eNeon::none || (h.flags & POLY_TRIANGLES)) { if(neon_mode != eNeon::none && (h.flags & POLY_TRIANGLES))
ptd.tinf = nullptr;
if(neon_mode == eNeon::none) {
ptd.color = (darkened(col >> 8) << 8) + (col & 0xFF); ptd.color = (darkened(col >> 8) << 8) + (col & 0xFF);
ptd.outline = poly_outline; ptd.outline = poly_outline;
} }
@ -2208,6 +2211,7 @@ EX dqi_poly& queuepolyat(const transmatrix& V, const hpcshape& h, color_t col, P
ptd.color = (poly_outline & 0xFFFFFF00) | (col & 0xFF); ptd.color = (poly_outline & 0xFFFFFF00) | (col & 0xFF);
ptd.outline = (darkened(col >> 8) << 8) | (col & 0xFF); ptd.outline = (darkened(col >> 8) << 8) | (col & 0xFF);
if(col == 0xFF) ptd.outline = 0xFFFFFFFF; if(col == 0xFF) ptd.outline = 0xFFFFFFFF;
if(neon_nofill && ptd.color == 0xFF) ptd.color = 0;
break; break;
case eNeon::no_boundary: case eNeon::no_boundary:
ptd.color = (darkened(col >> 8) << 8) + (col & 0xFF); ptd.color = (darkened(col >> 8) << 8) + (col & 0xFF);
@ -2218,6 +2222,7 @@ EX dqi_poly& queuepolyat(const transmatrix& V, const hpcshape& h, color_t col, P
ptd.outline = (darkened(col >> 8) << 8) + (col & 0xFF); ptd.outline = (darkened(col >> 8) << 8) + (col & 0xFF);
if(col == 0xFF) ptd.outline = 0xFFFFFFFF; if(col == 0xFF) ptd.outline = 0xFFFFFFFF;
if(poly_outline != 0xFF) ptd.outline = poly_outline; if(poly_outline != 0xFF) ptd.outline = poly_outline;
if(neon_nofill && ptd.color == 0xFF) ptd.color = 0;
break; break;
case eNeon::illustration: { case eNeon::illustration: {
if(poly_outline && (poly_outline>>8) != bordcolor) { if(poly_outline && (poly_outline>>8) != bordcolor) {