1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-11-14 12:47:10 +00:00

2d3d:: textures on sidewalls

This commit is contained in:
Zeno Rogue
2019-05-09 17:54:30 +02:00
parent d89fb49e13
commit da49e6c8de
4 changed files with 67 additions and 34 deletions

View File

@@ -1179,6 +1179,31 @@ void config_camera_rotation() {
);
}
void add_edit_wall_quality(char c) {
dialog::addSelItem(XLAT("wall quality"), its(vid.texture_step), c);
dialog::add_action([] {
dialog::editNumber(vid.texture_step, 1, 16, 1, 1, XLAT("wall quality"),
XLAT(
"Controls the number of triangles used for wall surfaces. "
"Higher numbers reduce the performance. "
"This has a strong effect when the walls are curved indeed "
"(honeycombs based on horospheres, and projections other than native perspective), "
"but otherwise, usually it can be set to 1 without significant adverse effects other "
"than slightly incorrect texturing."
)
);
dialog::bound_low(1);
dialog::bound_up(128);
dialog::reaction = [] {
if(floor_textures) {
delete floor_textures;
floor_textures = NULL;
}
need_reset_geometry = true;
};
});
}
void show3D() {
cmode = sm::SIDE | sm::MAYDARK;
gamescreen(0);
@@ -1245,30 +1270,7 @@ void show3D() {
dialog::editNumber(vid.radarsize, 0, 360, 15, 90, "", "set to 0 to disable");
});
}
if(DIM == 3) {
dialog::addSelItem(XLAT("wall quality"), its(vid.texture_step), 'W');
dialog::add_action([] {
dialog::editNumber(vid.texture_step, 1, 16, 1, 1, XLAT("wall quality"),
XLAT(
"Controls the number of triangles used for wall surfaces. "
"Higher numbers reduce the performance. "
"This has a strong effect when the walls are curved indeed "
"(honeycombs based on horospheres, and projections other than native perspective), "
"but otherwise, usually it can be set to 1 without significant adverse effects other "
"than slightly incorrect texturing."
)
);
dialog::bound_low(1);
dialog::bound_up(128);
dialog::reaction = [] {
if(floor_textures) {
delete floor_textures;
floor_textures = NULL;
}
need_reset_geometry = true;
};
});
}
if(DIM == 3) add_edit_wall_quality('W');
#endif
dialog::addBreak(50);