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

scale now always can be changed, but cheater flag is set in shmup

This commit is contained in:
Zeno Rogue 2024-03-24 00:39:02 +01:00
parent f32a2708b4
commit d43b19625e
3 changed files with 9 additions and 8 deletions

View File

@ -144,6 +144,7 @@ EX bool wrongMode(char flags) {
dls = land_structure;
if(land_structure != dls) return true;
if(shmup::on && vid.creature_scale != 1) return true;
if(numplayers() > 1 && !multi::friendly_fire) return true;
if(numplayers() > 1 && multi::pvp_mode) return true;
if(numplayers() > 1 && multi::split_screen) return true;
@ -804,6 +805,7 @@ EX void achievement_final(bool really_final) {
if(bow::crossbow_mode() && bow::style == bow::cbBull) specialcode += 32;
if(bow::crossbow_mode() && bow::style == bow::cbGeodesic) specialcode += 64;
if(bow::crossbow_mode() && bow::style == bow::cbGeometric) specialcode += 96;
if(shmup::on && vid.creature_scale != 1) return;
if(sphere && specialland == laHalloween) {
if(specialcode) return;

View File

@ -2955,8 +2955,7 @@ EX void show3D() {
dialog::addSelItem(XLAT("3D detailed settings"), "", 'D');
dialog::add_action_push(show3D_height_details);
if(scale_used())
add_edit(vid.creature_scale);
add_edit(vid.creature_scale);
}
else {
add_edit(vid.creature_scale);
@ -3105,7 +3104,9 @@ EX int config3 = addHook(hooks_configfile, 100, [] {
}, "context help", 'H');
param_f(vid.creature_scale, "creature_scale", "3d-creaturescale", 1)
->editable(0, 1, .1, "Creature scale", "", 'C');
->editable(0, 1, .1, "Creature scale", "", 'C')
->set_extra([] { dialog::addInfo(XLAT("changing this during shmup is counted as cheating")); })
->set_reaction([] { if(shmup::on) cheater++; });
param_f(vid.height_width, "heiwi", "3d-heightwidth", 1.5)
->editable(0, 1, .1, "Height to width", "", 'h');
param_f(vid.yshift, "yshift", "Y shift", 0)

View File

@ -576,8 +576,6 @@ EX void add_wall(int i, const vector<hyperpoint>& h) {
static constexpr ld hcrossf7 = 0.620672, hexf7 = 0.378077, tessf7 = 1.090550, hexhexdist7 = 0.566256;
#endif
EX bool scale_used() { return (shmup::on && geometry == gNormal && BITRUNCATED) ? (cheater || autocheat) : true; }
EX bool is_subcube_based(eVariation var) {
return among(var, eVariation::subcubes, eVariation::dual_subcubes, eVariation::bch, eVariation::bch_oct);
}
@ -784,13 +782,13 @@ void geometry_information::prepare_basics() {
if(msphere && geuclid) scalefactor *= (1 + vid.depth);
if(msphere && ghyperbolic) scalefactor *= sinh(1 + vid.depth);
if(scale_used()) {
if(true) {
scalefactor *= vid.creature_scale;
orbsize *= vid.creature_scale;
}
zhexf = BITRUNCATED ? hexf : crossf* .55;
if(scale_used()) zhexf *= vid.creature_scale;
zhexf *= vid.creature_scale;
if(WDIM == 2 && GDIM == 3) zhexf *= 1.5, orbsize *= 1.2;
if(cgi.emb->is_euc_in_hyp()) {
@ -1314,7 +1312,7 @@ EX string cgi_string() {
V("RS:", fts(geom3::euclid_embed_rotate));
}
if(scale_used()) V("CS", fts(vid.creature_scale));
if(vid.creature_scale != 1) V("CS", fts(vid.creature_scale));
if(WDIM == 3) V("HTW", fts(vid.height_width));