mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-20 15:40:26 +00:00
10.3m
This commit is contained in:
parent
864cc38974
commit
5de5acc68c
4
cell.cpp
4
cell.cpp
@ -711,14 +711,14 @@ void cwmirrorat(cellwalker& cw, int d) {
|
|||||||
cw.mirrored = !cw.mirrored;
|
cw.mirrored = !cw.mirrored;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct rev_t { } rev;
|
static const struct rev_t { rev_t() {} } rev;
|
||||||
|
|
||||||
cellwalker& operator += (cellwalker& cw, rev_t) {
|
cellwalker& operator += (cellwalker& cw, rev_t) {
|
||||||
cw += cw.c->type/2 + ((cw.c->type&1)?hrand(2):0);
|
cw += cw.c->type/2 + ((cw.c->type&1)?hrand(2):0);
|
||||||
return cw;
|
return cw;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct revstep_t { } revstep;
|
static const struct revstep_t { revstep_t() {}} revstep;
|
||||||
|
|
||||||
cellwalker& operator += (cellwalker& cw, revstep_t) {
|
cellwalker& operator += (cellwalker& cw, revstep_t) {
|
||||||
cw += rev; cw += wstep; return cw;
|
cw += rev; cw += wstep; return cw;
|
||||||
|
@ -2276,3 +2276,28 @@ Gameplay bugfixes
|
|||||||
2018.03.02 XX:XX version 10.3l
|
2018.03.02 XX:XX version 10.3l
|
||||||
- fixed monster infighting caused by dragon dismounting changes
|
- fixed monster infighting caused by dragon dismounting changes
|
||||||
- fixed Android slowdown
|
- fixed Android slowdown
|
||||||
|
|
||||||
|
2018.03.24 17:22 version 10.3m
|
||||||
|
|
||||||
|
For hyperbolic geometry nerds:
|
||||||
|
- added smooth surfaces of constant negative curvature (in the hypersian rug menu)
|
||||||
|
- Alt makes rotation slower in the Hypersian Rug model
|
||||||
|
- added the hemisphere model
|
||||||
|
- improved the quality of 3D models from conformal menu
|
||||||
|
|
||||||
|
Gameplay bugfixes:
|
||||||
|
- fixed the Princess Quest not appearing
|
||||||
|
- worm-like creatures are no longer happy to get into bull herds
|
||||||
|
- raised Zombies no longer move on their first turn
|
||||||
|
- no more great walls in PTM Graveyard
|
||||||
|
- no more Lost Memory areas in PTM Chaos
|
||||||
|
- no more broken Red Raider pairs close to player start
|
||||||
|
- Baby Tortoise movement is now animated (when switching places with an adult)
|
||||||
|
|
||||||
|
User interface:
|
||||||
|
- shmup mode in the start menu replaced with a special mode chosen randomly from a selection
|
||||||
|
- the start menu now includes an explicit option to use the current/saved settings
|
||||||
|
|
||||||
|
MINOR:
|
||||||
|
- reptilecheat option ('-rch') disables Windy chasms
|
||||||
|
- synchronized fanframe so that the period is 1000 ticks
|
||||||
|
4
init.cpp
4
init.cpp
@ -18,8 +18,8 @@
|
|||||||
#define NOLICENSE
|
#define NOLICENSE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define VER "10.3l"
|
#define VER "10.3m"
|
||||||
#define VERNUM 10312
|
#define VERNUM 10313
|
||||||
|
|
||||||
#ifndef CAP_SHADER
|
#ifndef CAP_SHADER
|
||||||
#define CAP_SHADER CAP_GL
|
#define CAP_SHADER CAP_GL
|
||||||
|
30
surface.cpp
30
surface.cpp
@ -67,7 +67,7 @@ hyperpoint coord(hyperpoint h) {
|
|||||||
ld r = 1 / cosh(t);
|
ld r = 1 / cosh(t);
|
||||||
ld x = t - tanh(t);
|
ld x = t - tanh(t);
|
||||||
|
|
||||||
return { r * sin(v), r * cos(v), x };
|
return hpxyz( r * sin(v), r * cos(v), x );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -77,7 +77,7 @@ hyperpoint coord(hyperpoint h) {
|
|||||||
|
|
||||||
ld a = sqrt(1-dini_b*dini_b);
|
ld a = sqrt(1-dini_b*dini_b);
|
||||||
|
|
||||||
return { a * sin(v) * sin(t), a * cos(v) * sin(t), a * (cos(t) + log(tan(t/2))) + dini_b * v };
|
return hpxyz( a * sin(v) * sin(t), a * cos(v) * sin(t), a * (cos(t) + log(tan(t/2))) + dini_b * v );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -87,11 +87,11 @@ hyperpoint coord(hyperpoint h) {
|
|||||||
|
|
||||||
ld deno = 1 / (1 + u * u * sin(v) * sin(v));
|
ld deno = 1 / (1 + u * u * sin(v) * sin(v));
|
||||||
|
|
||||||
return {
|
return hpxyz(
|
||||||
2 * (cos(u) + u * sin(u)) * sin(v) * deno,
|
2 * (cos(u) + u * sin(u)) * sin(v) * deno,
|
||||||
2 * (sin(u) - u * cos(u)) * sin(v) * deno,
|
2 * (sin(u) - u * cos(u)) * sin(v) * deno,
|
||||||
log(tan(v/2)) + 2 * cos(v) * deno
|
log(tan(v/2)) + 2 * cos(v) * deno
|
||||||
};
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
case dsHyperlike: {
|
case dsHyperlike: {
|
||||||
@ -101,7 +101,7 @@ hyperpoint coord(hyperpoint h) {
|
|||||||
ld phi = hyper_b * cosh(v);
|
ld phi = hyper_b * cosh(v);
|
||||||
ld psi = integral(v);
|
ld psi = integral(v);
|
||||||
|
|
||||||
return { phi * cos(u), phi * sin(u), psi};
|
return hpxyz( phi * cos(u), phi * sin(u), psi );
|
||||||
}
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@ -122,10 +122,10 @@ hyperpoint coord_derivative(hyperpoint h, int cc) {
|
|||||||
ld v = h[1];
|
ld v = h[1];
|
||||||
if(cc == 0) {
|
if(cc == 0) {
|
||||||
ld phi = hyper_b * cosh(v);
|
ld phi = hyper_b * cosh(v);
|
||||||
return { phi * -sin(u), phi * cos(u), 0 };
|
return hpxyz( phi * -sin(u), phi * cos(u), 0 );
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return { hyper_b * sinh(v) * cos(u), hyper_b * sinh(v) * sin(u), f(v) };
|
return hpxyz( hyper_b * sinh(v) * cos(u), hyper_b * sinh(v) * sin(u), f(v) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
case dsKuen: {
|
case dsKuen: {
|
||||||
@ -134,19 +134,20 @@ hyperpoint coord_derivative(hyperpoint h, int cc) {
|
|||||||
ld denom = pow(sin(v),2)*(u*u)+1;
|
ld denom = pow(sin(v),2)*(u*u)+1;
|
||||||
ld denom2 = denom * denom;
|
ld denom2 = denom * denom;
|
||||||
if(cc == 1)
|
if(cc == 1)
|
||||||
return {
|
return hpxyz (
|
||||||
2*sin(v)/denom*u*cos(u)+-4*(sin(u)*u+cos(u))*pow(sin(v),3)/denom2*u,
|
2*sin(v)/denom*u*cos(u)+-4*(sin(u)*u+cos(u))*pow(sin(v),3)/denom2*u,
|
||||||
-4*pow(sin(v),3)*(sin(u)-u*cos(u))/denom2*u+2*sin(u)*sin(v)/denom*u,
|
-4*pow(sin(v),3)*(sin(u)-u*cos(u))/denom2*u+2*sin(u)*sin(v)/denom*u,
|
||||||
-4*pow(sin(v),2)/denom2*u*cos(v)
|
-4*pow(sin(v),2)/denom2*u*cos(v)
|
||||||
};
|
);
|
||||||
else return {
|
else return hpxyz (
|
||||||
2*(sin(u)*u+cos(u))/denom*cos(v)+-4*(sin(u)*u+cos(u))*pow(sin(v),2)/denom2*(u*u)*cos(v),
|
2*(sin(u)*u+cos(u))/denom*cos(v)+-4*(sin(u)*u+cos(u))*pow(sin(v),2)/denom2*(u*u)*cos(v),
|
||||||
2*(sin(u)-u*cos(u))/denom*cos(v)+-4*pow(sin(v),2)*(sin(u)-u*cos(u))/denom2*(u*u)*cos(v),
|
2*(sin(u)-u*cos(u))/denom*cos(v)+-4*pow(sin(v),2)*(sin(u)-u*cos(u))/denom2*(u*u)*cos(v),
|
||||||
-4*sin(v)/denom2*(u*u)*pow(cos(v),2)+1/tan(v/2)*(pow(tan(v/2),2)+1)/2+-2*sin(v)/denom
|
-4*sin(v)/denom2*(u*u)*pow(cos(v),2)+1/tan(v/2)*(pow(tan(v/2),2)+1)/2+-2*sin(v)/denom
|
||||||
};
|
);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
// too lazy do differentiate
|
||||||
return (coord(h + unit_vector[cc] * epsd) - coord(h)) / epsd;
|
return (coord(h + unit_vector[cc] * epsd) - coord(h)) / epsd;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -488,7 +489,7 @@ void run_kuen() {
|
|||||||
int pid[5] = {0, 8, 1, 2, 4};
|
int pid[5] = {0, 8, 1, 2, 4};
|
||||||
string captions[5] = {"", "the upper component", "the lower center", "the lower left", "the lower right"};
|
string captions[5] = {"", "the upper component", "the lower center", "the lower left", "the lower right"};
|
||||||
|
|
||||||
vector<rug::rugpoint*> newmesh(size(mesh), NULL);
|
vector<rug::rugpoint*> newmesh(size(mesh), nullptr);
|
||||||
for(auto p: mesh) {
|
for(auto p: mesh) {
|
||||||
auto px = map_to_surface(p->h, m);
|
auto px = map_to_surface(p->h, m);
|
||||||
p->surface_point = px;
|
p->surface_point = px;
|
||||||
@ -738,12 +739,13 @@ void show_surfaces() {
|
|||||||
p->flat = p->surface_point.params;
|
p->flat = p->surface_point.params;
|
||||||
else if(uni == '#')
|
else if(uni == '#')
|
||||||
dialog::editNumber(dini_b, -1, 1, .05, .15, XLAT("parameter"),
|
dialog::editNumber(dini_b, -1, 1, .05, .15, XLAT("parameter"),
|
||||||
XLAT("The larger the number, the less twisted it is.")
|
XLAT("The larger the number, the more twisted it is.")
|
||||||
);
|
);
|
||||||
else if(uni == 'p') {
|
else if(uni == 'p') {
|
||||||
dialog::editNumber(precision, 1, 10000, .1, 100, XLAT("precision"),
|
dialog::editNumber(precision, 1, 10000, 0, 100, XLAT("precision"),
|
||||||
XLAT("Computing these models involves integrals and differential equations, which are currently solved numerically. This controls the precision.")
|
XLAT("Computing these models involves integrals and differential equations, which are currently solved numerically. This controls the precision.")
|
||||||
);
|
);
|
||||||
|
dialog::ne.step = .1;
|
||||||
dialog::scaleLog();
|
dialog::scaleLog();
|
||||||
}
|
}
|
||||||
else if(uni == 'c') {
|
else if(uni == 'c') {
|
||||||
|
Loading…
Reference in New Issue
Block a user