1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-24 01:00:25 +00:00

added some missing CAP_RUG flags

This commit is contained in:
? 2019-02-17 18:45:42 +01:00 committed by Zeno Rogue
parent e39777f04d
commit c24fa20334
3 changed files with 14 additions and 1 deletions

View File

@ -1358,10 +1358,12 @@ void show3D() {
dialog::addSelItem(XLAT("model used"), conformal::get_model_name(pmodel), 'M');
dialog::addBreak(50);
#if CAP_RUG
if(rug::rugged) {
dialog::addBoolItem(XLAT("3D monsters/walls on the surface"), rug::spatial_rug, 'S');
dialog::add_action([] () { rug::spatial_rug = !rug::spatial_rug; });
}
#endif
dialog::addBoolItem(XLAT("configure TPP automatically"), pmodel == mdDisk && vid.camera_angle, 'T');
dialog::add_action([] () {
if(pmodel == mdDisk && vid.camera_angle) {
@ -1383,8 +1385,11 @@ void show3D() {
}
});
if(rug::rugged && !rug::spatial_rug)
if(0);
#if CAP_RUG
else if(rug::rugged && !rug::spatial_rug)
dialog::addBreak(100);
#endif
else if(non_spatial_model())
dialog::addInfo(XLAT("no 3D effects available in this projection"), 0xC00000);
else if(!spatial_graphics)
@ -1947,7 +1952,9 @@ unordered_map<string, ld&> params = {
{"human_wall_ratio", geom3::human_wall_ratio},
{"lake_top", geom3::lake_top},
{"lake_bottom", geom3::lake_bottom},
#if CAP_RUG
{"rug_model_distance", rug::model_distance},
#endif
{"star", polygonal::STAR},
{"lvspeed", conformal::lvspeed},
{"rotation", conformal::rotation},

View File

@ -5596,7 +5596,9 @@ void drawthemap() {
mmspatial = vid.monmode == 4 || vid.monmode == 5;
spatial_graphics = wmspatial || mmspatial;
#if CAP_RUG
if(rug::rugged && !rug::spatial_rug) spatial_graphics = false;
#endif
if(non_spatial_model())
spatial_graphics = false;
if(pmodel == mdDisk && abs(vid.alpha) < 1e-6) spatial_graphics = false;

View File

@ -627,6 +627,7 @@ void apply() {
turncount += env_volcano * ticks * 64 / period;
for(auto& p: gmatrix) if(p.first->land == laVolcano) checkTide(p.first);
}
#if CAP_RUG
if(rug::rugged) {
if(rug_rotation1) {
rug::apply_rotation(rotmatrix(rug_angle * M_PI / 180, 1, 2));
@ -637,6 +638,7 @@ void apply() {
rug::apply_rotation(rug::currentrot * rotmatrix(rug_rotation2 * 2 * M_PI * t / period, 0, 1) * inverse(rug::currentrot));
}
}
#endif
vid.skiprope += skiprope_rotation * t * 2 * M_PI / period;
if(ballangle_rotation) {
@ -1056,6 +1058,7 @@ void perspective() {
gamescreen(2);
}
#if CAP_RUG
void rug() {
dynamicval<bool> b(rug::rugged, true);
rug::physics();
@ -1063,6 +1066,7 @@ void rug() {
gamescreen(2);
rug::apply_rotation(rotmatrix(-ticks / 3000., 1, 2));
}
#endif
void spin_around() {
dynamicval<ld> da(vid.alpha, 999);