summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaudius "keldu" Holeksa <mail@keldu.de>2026-11-02 21:22:23 +0100
committerClaudius "keldu" Holeksa <mail@keldu.de>2026-11-02 21:22:23 +0100
commit5ca778dba2fa6fa89fbea0fe76a3d1fbba6bc143 (patch)
tree2324178fbb9cc6c562d1953cc1135aa9373b588a
parent5c8c822546039e7422a0dcb0841adbcbc9fb4d60 (diff)
downloadsims-icosahedrical_destruction-5ca778dba2fa6fa89fbea0fe76a3d1fbba6bc143.tar.gz
Restructure
-rw-r--r--app/.nix/derivation.nix (renamed from .nix/derivation.nix)3
-rw-r--r--app/SConstruct (renamed from SConstruct)0
-rw-r--r--app/c++/SConscript (renamed from c++/SConscript)0
-rw-r--r--app/c++/ico.hpp (renamed from c++/ico.hpp)2
-rw-r--r--app/c++/ico_bar.hpp37
-rw-r--r--app/c++/ico_ct.hpp19
-rw-r--r--default.nix9
7 files changed, 65 insertions, 5 deletions
diff --git a/.nix/derivation.nix b/app/.nix/derivation.nix
index fd41fc1..b90200e 100644
--- a/.nix/derivation.nix
+++ b/app/.nix/derivation.nix
@@ -13,6 +13,9 @@ stdenv.mkDerivation {
forstio.core
];
+ buildInputs = [
+ ];
+
doCheck = true;
checkPhase = ''
scons test
diff --git a/SConstruct b/app/SConstruct
index 26151d4..26151d4 100644
--- a/SConstruct
+++ b/app/SConstruct
diff --git a/c++/SConscript b/app/c++/SConscript
index beb41e5..beb41e5 100644
--- a/c++/SConscript
+++ b/app/c++/SConscript
diff --git a/c++/ico.hpp b/app/c++/ico.hpp
index 257f12d..5dc00a0 100644
--- a/c++/ico.hpp
+++ b/app/c++/ico.hpp
@@ -35,7 +35,6 @@ struct ico_surface_helper {
{18,15,14} //19
}};
};
-}
template<uint64_t SubD>
class ico_addr {
@@ -168,3 +167,4 @@ public:
}
};
}
+}
diff --git a/app/c++/ico_bar.hpp b/app/c++/ico_bar.hpp
new file mode 100644
index 0000000..780e28e
--- /dev/null
+++ b/app/c++/ico_bar.hpp
@@ -0,0 +1,37 @@
+#pragma once
+
+#include "ico.hpp"
+
+namespace kel {
+
+template<uint64_t SubD = 0u>
+class ico_coordinate {
+private:
+ static constexpr uint64_t sub_divs_ = impl::power_two<SubD>::value;
+
+ uint64_t t_;
+ uint64_t x_;
+ uint64_t y_;
+public:
+ ico_coordinate(uint64_t t__, uint64_t x__, uint64_t y__):
+ t_{t__},
+ x_{x__},
+ y_{y__}
+ {}
+
+ bool is_on_border() const {
+ auto comb = x_+y_;
+
+ bool farside_b = (comb == sub_divs_);
+ bool right_b = (y_ == 0u);
+ bool left_b = (x_ == 0u);
+
+ return farside_b or right_b or left_b;
+ }
+
+ ico_coordinate<SubD> move_x_pos() const {
+ uint64_t x_mov = x_ + 1u;
+
+ }
+};
+}
diff --git a/app/c++/ico_ct.hpp b/app/c++/ico_ct.hpp
new file mode 100644
index 0000000..2209f66
--- /dev/null
+++ b/app/c++/ico_ct.hpp
@@ -0,0 +1,19 @@
+#pragma once
+
+namespace kel {
+namespace ct {
+template<typename Orig, typename... Dirs>
+struct Point {};
+
+template<typename P0, typename P1, uint64_t FracU, uint64_t FracD>
+struct Direction {
+ static_assert(FracU <= FracD, "Can't exceed 1");
+ static_assert(FracD > 0u, "Can't divide by 0");
+};
+
+namespace impl {
+
+}
+
+}
+}
diff --git a/default.nix b/default.nix
index f7c4be7..356cc51 100644
--- a/default.nix
+++ b/default.nix
@@ -1,6 +1,7 @@
{ pkgs ? import <nixpkgs> {}
-, stdenv ? pkgs.llvmPackages_16.stdenv
-, clang-tools ? pkgs.clang-tools_16
+, llvmPackages ? pkgs.llvmPackages_22
+, stdenv ? llvmPackages.stdenv
+, clang-tools ? llvmPackages.clang-tools
, forstio ? (import ((builtins.fetchGit {
url = "git@git.keldu.de:forstio/forstio";
ref = "dev";
@@ -10,6 +11,6 @@
}).forstio
}:
-pkgs.callPackage ./.nix/derivation.nix {
- inherit forstio;
+pkgs.callPackage ./app/.nix/derivation.nix {
+ inherit stdenv forstio;
}