This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| GODOT_HEADERS=path to godot_headers | |
| CPP_BINDINGS=path to cpp-godot |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| scons godotbinpath="/Applications/Godot.app/Contents/MacOs/Godot" platform=osx use_llvm=yes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| git clone https://github.com/GodotNativeTools/godot_headers | |
| git clone https://github.com/GodotNativeTools/godot-cpp |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| brew install scons |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #ifndef HELPERS_H | |
| #define HELPERS_H | |
| #include <core/Godot.hpp> | |
| #include <core/Dictionary.hpp> | |
| #include <core/String.hpp> | |
| #include <Node.hpp> | |
| namespace helpers { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (def rui-components | |
| {'list rui/list | |
| 'list-item rui/list-item}) | |
| (def component-registry | |
| (merge | |
| rui-components | |
| {})) | |
| (def my-template |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| template <typename T> constexpr T bitfield (T bit) { return 1 << bit; } | |
| namespace Telemetry { | |
| enum TelemetryType { | |
| Guage = bitfield(0), | |
| Counter = bitfield(1), | |
| Debug = bitfield(2), | |
| Info = bitfield(3), | |
| Warn = bitfield(4), | |
| Error = bitfield(5) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (defn infect [{inputs :pathogen/infected | |
| immune :pathogen/immune | |
| traits :pathogen/diseases | |
| :as c}] | |
| ;'([protocol [output-key output-fn]] [protocol [output-key output-fn]]) | |
| (->> | |
| (for [infected (->> (or (seq inputs) (keys c)) | |
| (filter (complement (or immune #{}))) | |
| (map (partial get c))) | |
| [protocol [output-key output-fn]] traits] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ; ok | |
| (println foo | |
| bar | |
| baz | |
| quux) | |
| ; ok | |
| (println | |
| foo | |
| bar |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| postwalk comes from clojure.walk/postwalk (namespace might be cljs.walk in cljs, you'll have to check) | |
| may need to look at prewalk, i didn't test so dunno. also didn't pay attention to which (pre or post) is more efficient in this case (if they both work) | |
| (postwalk | |
| (fn [item] | |
| (let [t (:type item)] | |
| (if (or (not (map? item)) | |
| (nil? t) | |
| (= t filter-type)) | |
| item |