mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-23 21:07:17 +00:00
removed the EUCSCALE parameter for consistency
This commit is contained in:
parent
2dc2b6ed6d
commit
babb8fbde4
3
hyper.h
3
hyper.h
@ -1,9 +1,6 @@
|
||||
// This is the main header file of HyperRogue. Mostly everything is dumped here.
|
||||
// It is quite chaotic.
|
||||
|
||||
// scale the Euclidean
|
||||
#define EUCSCALE 2.3
|
||||
|
||||
#define NUMWITCH 7
|
||||
|
||||
// achievements
|
||||
|
11
hypgraph.cpp
11
hypgraph.cpp
@ -28,11 +28,11 @@ hyperpoint gethyper(ld x, ld y) {
|
||||
return ghpm;
|
||||
}
|
||||
|
||||
if(euclid)
|
||||
return hpxy(hx * (EUCSCALE + vid.alpha), hy * (EUCSCALE + vid.alpha));
|
||||
|
||||
if(vid.camera_angle) camrotate(hx, hy);
|
||||
|
||||
if(euclid)
|
||||
return hpxy(hx * (1 + vid.alpha), hy * (1 + vid.alpha));
|
||||
|
||||
ld hr = hx*hx+hy*hy;
|
||||
|
||||
if(hr > .9999 && !sphere) return Hypc;
|
||||
@ -100,7 +100,7 @@ void apply_depth(hyperpoint &f, ld z) {
|
||||
|
||||
void applymodel(hyperpoint H, hyperpoint& ret) {
|
||||
|
||||
ld tz = euclid ? (EUCSCALE+vid.alpha) : vid.alpha+H[2];
|
||||
ld tz = euclid ? (1+vid.alpha) : vid.alpha+H[2];
|
||||
if(tz < BEHIND_LIMIT && tz > -BEHIND_LIMIT) tz = BEHIND_LIMIT;
|
||||
|
||||
if(pmodel == mdUnchanged) {
|
||||
@ -457,7 +457,7 @@ void drawEuclidean() {
|
||||
|
||||
transmatrix View0 = View;
|
||||
|
||||
ld cellrad = vid.radius / (EUCSCALE + vid.alpha);
|
||||
ld cellrad = vid.radius / (1 + vid.alpha);
|
||||
|
||||
ld centerd = matrixnorm(View0);
|
||||
|
||||
@ -641,7 +641,6 @@ transmatrix atscreenpos(ld x, ld y, ld size) {
|
||||
V[0][0] = size * 2 * hcrossf / crossf;
|
||||
V[1][1] = size * 2 * hcrossf / crossf;
|
||||
V[2][2] = stereo::scrdist;
|
||||
if(euclid) V[2][2] /= EUCSCALE;
|
||||
|
||||
return V;
|
||||
}
|
||||
|
16
polygons.cpp
16
polygons.cpp
@ -157,13 +157,7 @@ void addpoint(const hyperpoint& H) {
|
||||
}
|
||||
for(int i=0; i<3; i++) Hscr[i] *= vid.radius;
|
||||
add1(Hscr);
|
||||
} /*
|
||||
else {
|
||||
add1(H);
|
||||
if(euclid) glcoords[qglcoords][2] *= EUCSCALE;
|
||||
glcoords[qglcoords][2] += vid.alpha;
|
||||
// glcoords[qglcoords][2] = 1; // EUCSCALE;
|
||||
} */
|
||||
}
|
||||
}
|
||||
|
||||
void coords_to_poly() {
|
||||
@ -240,14 +234,6 @@ void glapplymatrix(const transmatrix& V) {
|
||||
}
|
||||
{for(int x=0; x<3; x++) mat[id++] = 0;} mat[id++] = 1;
|
||||
|
||||
if(euclid) {
|
||||
/* mat[2] = 0; mat[6] = 0; mat[10] = -zz;
|
||||
mat[12] = mat[8]; mat[13] = mat[9]; mat[14] = EUCSCALE+zz; */
|
||||
// mat[8] = mat[9] = 0;
|
||||
// mat[11] = -EUCSCALE;
|
||||
for(int i=2; i<16; i+=4) mat[i] *= EUCSCALE;
|
||||
}
|
||||
|
||||
mat[14] = GLfloat(vid.alpha);
|
||||
|
||||
if(mat[10] + vid.alpha < 0 && !sphere && !euclid) {
|
||||
|
2
rug.cpp
2
rug.cpp
@ -435,12 +435,10 @@ void buildTorusRug() {
|
||||
applymodel(tC0(eumove(x, y)), onscreen);
|
||||
// take point (1,0)
|
||||
// apply eumove(1,0)
|
||||
// divide by EUCSCALE
|
||||
// multiply by vid.radius (= HTEXTURESIZE * rugzoom)
|
||||
// add 1, divide by texturesize
|
||||
r->x1 = onscreen[0];
|
||||
r->y1 = onscreen[1];
|
||||
// r->y1 = (1 + onscreen[1] * rugzoom / EUCSCALE)/2;
|
||||
hyperpoint h1 = hpxyz(x, y, 0);
|
||||
hyperpoint h2 = z2 * h1;
|
||||
double alpha = -h2[0] * 2 * M_PI;
|
||||
|
Loading…
Reference in New Issue
Block a user