diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 00000000..26d1c974 --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,2 @@ +FROM debian +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 diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 00000000..60603378 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,26 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/docker-existing-dockerfile +{ + "name": "Development Container", + "build": { + // Sets the run context to one level up instead of the .devcontainer folder. + "context": "..", + // Update the 'dockerFile' property if you aren't using the standard 'Dockerfile' filename. + "dockerfile": "Dockerfile" + }, + + // Features to add to the dev container. More info: https://containers.dev/features. + // "features": {}, + + // Use 'forwardPorts' to make a list of ports inside the container available locally. + // "forwardPorts": [], + + // Uncomment the next line to run commands after the container is created. + // "postCreateCommand": "cat /etc/os-release", + + // Configure tool-specific properties. + // "customizations": {} + + // Uncomment to connect as an existing user other than the container default. More info: https://aka.ms/dev-containers-non-root. + // "remoteUser": "devcontainer" +} diff --git a/.gitignore b/.gitignore index 321b2a2a..05a6d4a2 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,7 @@ .deps/ +/autohdr.h +/langen +/makeh +/language-data.cpp +/*.o +/hyperrogue \ No newline at end of file diff --git a/Makefile b/Makefile index 334bba9e..37b03c36 100644 --- a/Makefile +++ b/Makefile @@ -51,7 +51,7 @@ endif ifeq (${OS},linux) - CXXFLAGS_EARLY += -DLINUX + CXXFLAGS_EARLY += -DLINUX -I /usr/include/SDL EXE_EXTENSION := LDFLAGS_GL := -lGL LDFLAGS_GLEW := -lGLEW @@ -141,7 +141,7 @@ endif ifeq (${HYPERROGUE_USE_ROGUEVIZ},1) # Enable RogueViz. RogueViz requires C++17. CXXFLAGS_STD = -std=c++17 - CXXFLAGS_EARLY += -DCAP_ROGUEVIZ=1 + CXXFLAGS_EARLY += -DCAP_ROGUEVIZ=1 -DCAP_TEXTURE=1 endif diff --git a/config.cpp b/config.cpp index 727b78b5..c0cef09d 100644 --- a/config.cpp +++ b/config.cpp @@ -2816,10 +2816,10 @@ EX void edit_levellines(char c) { }); } -EX geom3::eSpatialEmbedding shown_spatial_embedding() { +geom3::eSpatialEmbedding shown_spatial_embedding() { if(GDIM == 2) return geom3::seNone; return geom3::spatial_embedding; - } +} EX bool in_tpp() { return pmodel == mdDisk && !models::camera_straight; } diff --git a/nonisotropic.cpp b/nonisotropic.cpp index d39349cb..17de88f8 100644 --- a/nonisotropic.cpp +++ b/nonisotropic.cpp @@ -2555,25 +2555,30 @@ EX namespace twist { M[0][0] = +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) { - 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; - 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; diff --git a/rogueviz/dhrg/embedder.cpp b/rogueviz/dhrg/embedder.cpp index f549aab8..b7c53ebe 100644 --- a/rogueviz/dhrg/embedder.cpp +++ b/rogueviz/dhrg/embedder.cpp @@ -192,7 +192,7 @@ void preparegraph() { current_logistic.setRT(factor * graph_R, factor * graph_T); saved_logistic = current_logistic; - // for(int u=0; u tab(N, N); + vector tab(N, N); auto p = k ? nullptr : new progressbar(N/threads, "build_disttable_approx"); for(int i=k; i {} }: + pkgs.mkShell { + nativeBuildInputs = with pkgs.buildPackages; [ + gnumake + libgcc + haskellPackages.SDL + haskellPackages.SDL-ttf + haskellPackages.SDL-gfx + haskellPackages.SDL-mixer + glew + ]; +}