Skip to content

Commit 55a551b

Browse files
committed
Merge branch 'iacore-fix-build-linux'
2 parents e710588 + 6b04f29 commit 55a551b

File tree

9 files changed

+73
-22
lines changed

9 files changed

+73
-22
lines changed

.devcontainer/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
FROM debian
2+
RUN apt-get update && apt-get install -y make g++ libsdl1.2-dev libsdl-ttf2.0-dev libsdl-gfx1.2-dev libsdl-mixer1.2-dev libglew-dev

.devcontainer/devcontainer.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2+
// README at: https://github.com/devcontainers/templates/tree/main/src/docker-existing-dockerfile
3+
{
4+
"name": "Development Container",
5+
"build": {
6+
// Sets the run context to one level up instead of the .devcontainer folder.
7+
"context": "..",
8+
// Update the 'dockerFile' property if you aren't using the standard 'Dockerfile' filename.
9+
"dockerfile": "Dockerfile"
10+
},
11+
12+
// Features to add to the dev container. More info: https://containers.dev/features.
13+
// "features": {},
14+
15+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
16+
// "forwardPorts": [],
17+
18+
// Uncomment the next line to run commands after the container is created.
19+
// "postCreateCommand": "cat /etc/os-release",
20+
21+
// Configure tool-specific properties.
22+
// "customizations": {}
23+
24+
// Uncomment to connect as an existing user other than the container default. More info: https://aka.ms/dev-containers-non-root.
25+
// "remoteUser": "devcontainer"
26+
}

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,7 @@
11
.deps/
2+
/autohdr.h
3+
/langen
4+
/makeh
5+
/language-data.cpp
6+
/*.o
7+
/hyperrogue

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ endif
5151

5252

5353
ifeq (${OS},linux)
54-
CXXFLAGS_EARLY += -DLINUX
54+
CXXFLAGS_EARLY += -DLINUX -I /usr/include/SDL
5555
EXE_EXTENSION :=
5656
LDFLAGS_GL := -lGL
5757
LDFLAGS_GLEW := -lGLEW
@@ -141,7 +141,7 @@ endif
141141
ifeq (${HYPERROGUE_USE_ROGUEVIZ},1)
142142
# Enable RogueViz. RogueViz requires C++17.
143143
CXXFLAGS_STD = -std=c++17
144-
CXXFLAGS_EARLY += -DCAP_ROGUEVIZ=1
144+
CXXFLAGS_EARLY += -DCAP_ROGUEVIZ=1 -DCAP_TEXTURE=1
145145
endif
146146

147147

config.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2816,10 +2816,10 @@ EX void edit_levellines(char c) {
28162816
});
28172817
}
28182818

2819-
EX geom3::eSpatialEmbedding shown_spatial_embedding() {
2819+
geom3::eSpatialEmbedding shown_spatial_embedding() {
28202820
if(GDIM == 2) return geom3::seNone;
28212821
return geom3::spatial_embedding;
2822-
}
2822+
}
28232823

28242824
EX bool in_tpp() { return pmodel == mdDisk && !models::camera_straight; }
28252825

nonisotropic.cpp

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2555,25 +2555,30 @@ EX namespace twist {
25552555

25562556
M[0][0] = +xx - yy - zz + ww;
25572557
M[1][1] = -xx + yy - zz + ww;
2558-
M[2][2] = -xx - yy + zz + ww;
2559-
2560-
M[0][1] = -2 * (xy + zw);
2561-
M[1][0] = -2 * (xy - zw);
2562-
2563-
M[0][2] = 2 * (xz - yw);
2564-
M[2][0] = 2 * (xz + yw);
2565-
2566-
M[1][2] = -2 * (yz + xw);
2567-
M[2][1] = -2 * (yz - xw);
25682558

25692559
if(hyperbolic) {
2570-
swap(M[0][2], M[1][2]);
2571-
swap(M[2][0], M[2][1]);
2572-
M[1][2] *= -1;
2573-
M[2][0] *= -1;
25742560
M[2][2] = xx + yy + zz + ww;
2575-
return M;
2576-
}
2561+
2562+
M[0][1] = -2 * (xy + zw);
2563+
M[1][0] = -2 * (xy - zw);
2564+
2565+
M[0][2] = -2 * (yz + xw);
2566+
M[2][0] = 2 * (yz - xw);
2567+
2568+
M[1][2] = -2 * (xz - yw);
2569+
M[2][1] = 2 * (xz + yw);
2570+
} else {
2571+
M[2][2] = -xx - yy + zz + ww;
2572+
2573+
M[0][1] = -2 * (xy + zw);
2574+
M[1][0] = -2 * (xy - zw);
2575+
2576+
M[0][2] = 2 * (xz - yw);
2577+
M[2][0] = 2 * (xz + yw);
2578+
2579+
M[1][2] = -2 * (yz + xw);
2580+
M[2][1] = -2 * (yz - xw);
2581+
}
25772582

25782583

25792584
return M;

rogueviz/dhrg/embedder.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ void preparegraph() {
192192
current_logistic.setRT(factor * graph_R, factor * graph_T);
193193
saved_logistic = current_logistic;
194194

195-
// for(int u=0; u<MAXDIST; u++) iprintf("%d/%Ld\n", edgetally[u], tally[u]);
195+
// for(int u=0; u<MAXDIST; u++) iprintf("%d/%lld\n", edgetally[u], tally[u]);
196196

197197
fix_logistic_parameters(current_logistic, loglik_logistic, "logistic", 1e-6);
198198
writestats();

rogueviz/dhrg/loglik.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ void build_disttable_approx() {
337337
for(int k=0; k<threads; k++)
338338
v.emplace_back([&,k] () {
339339
auto& dt = results[k];
340-
vector<int> tab(N, N);
340+
vector<int> tab(N, N);
341341
auto p = k ? nullptr : new progressbar(N/threads, "build_disttable_approx");
342342
for(int i=k; i<N; i+=threads) {
343343
if(p) (*p)++;

shell.nix

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{ pkgs ? import <nixpkgs> {} }:
2+
pkgs.mkShell {
3+
nativeBuildInputs = with pkgs.buildPackages; [
4+
gnumake
5+
libgcc
6+
haskellPackages.SDL
7+
haskellPackages.SDL-ttf
8+
haskellPackages.SDL-gfx
9+
haskellPackages.SDL-mixer
10+
glew
11+
];
12+
}

0 commit comments

Comments
 (0)