1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-10-18 06:30:41 +00:00

Merge branch 'fix-build-linux'

This commit is contained in:
iacore 2024-10-03 20:23:01 +00:00
commit c7fcb6c1a2
No known key found for this signature in database
GPG Key ID: ED0D424AE4406330
6 changed files with 33 additions and 22 deletions

6
.gitignore vendored
View File

@ -1 +1,7 @@
.deps/ .deps/
/autohdr.h
/langen
/makeh
/language-data.cpp
/*.o
/hyperrogue

View File

@ -51,7 +51,7 @@ endif
ifeq (${OS},linux) ifeq (${OS},linux)
CXXFLAGS_EARLY += -DLINUX CXXFLAGS_EARLY += -DLINUX -I /usr/include/SDL
EXE_EXTENSION := EXE_EXTENSION :=
LDFLAGS_GL := -lGL LDFLAGS_GL := -lGL
LDFLAGS_GLEW := -lGLEW LDFLAGS_GLEW := -lGLEW
@ -141,7 +141,7 @@ endif
ifeq (${HYPERROGUE_USE_ROGUEVIZ},1) ifeq (${HYPERROGUE_USE_ROGUEVIZ},1)
# Enable RogueViz. RogueViz requires C++17. # Enable RogueViz. RogueViz requires C++17.
CXXFLAGS_STD = -std=c++17 CXXFLAGS_STD = -std=c++17
CXXFLAGS_EARLY += -DCAP_ROGUEVIZ=1 CXXFLAGS_EARLY += -DCAP_ROGUEVIZ=1 -DCAP_TEXTURE=1
endif endif

View File

@ -2770,10 +2770,10 @@ EX void edit_levellines(char c) {
}); });
} }
EX geom3::eSpatialEmbedding shown_spatial_embedding() { geom3::eSpatialEmbedding shown_spatial_embedding() {
if(GDIM == 2) return geom3::seNone; if(GDIM == 2) return geom3::seNone;
return geom3::spatial_embedding; return geom3::spatial_embedding;
} }
EX bool in_tpp() { return pmodel == mdDisk && !models::camera_straight; } EX bool in_tpp() { return pmodel == mdDisk && !models::camera_straight; }

View File

@ -2551,25 +2551,30 @@ EX namespace twist {
M[0][0] = +xx - yy - zz + ww; M[0][0] = +xx - yy - zz + ww;
M[1][1] = -xx + yy - zz + ww; M[1][1] = -xx + yy - zz + ww;
M[2][2] = -xx - yy + zz + ww;
M[0][1] = -2 * (xy + zw);
M[1][0] = -2 * (xy - zw);
M[0][2] = 2 * (xz - yw);
M[2][0] = 2 * (xz + yw);
M[1][2] = -2 * (yz + xw);
M[2][1] = -2 * (yz - xw);
if(hyperbolic) { if(hyperbolic) {
swap(M[0][2], M[1][2]);
swap(M[2][0], M[2][1]);
M[1][2] *= -1;
M[2][0] *= -1;
M[2][2] = xx + yy + zz + ww; M[2][2] = xx + yy + zz + ww;
return M;
} M[0][1] = -2 * (xy + zw);
M[1][0] = -2 * (xy - zw);
M[0][2] = -2 * (yz + xw);
M[2][0] = 2 * (yz - xw);
M[1][2] = -2 * (xz - yw);
M[2][1] = 2 * (xz + yw);
} else {
M[2][2] = -xx - yy + zz + ww;
M[0][1] = -2 * (xy + zw);
M[1][0] = -2 * (xy - zw);
M[0][2] = 2 * (xz - yw);
M[2][0] = 2 * (xz + yw);
M[1][2] = -2 * (yz + xw);
M[2][1] = -2 * (yz - xw);
}
return M; return M;

View File

@ -192,7 +192,7 @@ void preparegraph() {
current_logistic.setRT(factor * graph_R, factor * graph_T); current_logistic.setRT(factor * graph_R, factor * graph_T);
saved_logistic = current_logistic; saved_logistic = current_logistic;
// for(int u=0; u<MAXDIST; u++) iprintf("%d/%Ld\n", edgetally[u], tally[u]); // for(int u=0; u<MAXDIST; u++) iprintf("%d/%lld\n", edgetally[u], tally[u]);
fix_logistic_parameters(current_logistic, loglik_logistic, "logistic", 1e-6); fix_logistic_parameters(current_logistic, loglik_logistic, "logistic", 1e-6);
writestats(); writestats();

View File

@ -337,7 +337,7 @@ void build_disttable_approx() {
for(int k=0; k<threads; k++) for(int k=0; k<threads; k++)
v.emplace_back([&,k] () { v.emplace_back([&,k] () {
auto& dt = results[k]; auto& dt = results[k];
vector<int> tab(N, N); vector<int> tab(N, N);
auto p = k ? nullptr : new progressbar(N/threads, "build_disttable_approx"); auto p = k ? nullptr : new progressbar(N/threads, "build_disttable_approx");
for(int i=k; i<N; i+=threads) { for(int i=k; i<N; i+=threads) {
if(p) (*p)++; if(p) (*p)++;