diff --git a/LICENSE b/LICENSE index d5075a3..6b5e79c 100644 --- a/LICENSE +++ b/LICENSE @@ -1,3 +1,5 @@ +Copyright (C) Zed A. Shaw. All Rights Reserved. + Permission is hereby granted, without written agreement and without license or royalty fees, to use, copy, modify, and distribute this software and its documentation for any purpose, provided that the diff --git a/Makefile b/Makefile index fa86918..ca71ab6 100644 --- a/Makefile +++ b/Makefile @@ -30,20 +30,20 @@ test: build run: build test ifeq '$(OS)' 'Windows_NT' - powershell "cp ./builddir/calculator.exe ." - ./calculator + powershell "cp ./builddir/calc.exe ." + ./calc else - ./builddir/calculator + ./builddir/calc endif debug: build - gdb --nx -x .gdbinit --ex run --args builddir/calculator + gdb --nx -x .gdbinit --ex run --args builddir/calc debug_run: build - gdb --nx -x .gdbinit --batch --ex run --ex bt --ex q --args builddir/calculator + gdb --nx -x .gdbinit --batch --ex run --ex bt --ex q --args builddir/calc debug_walk: build test - gdb --nx -x .gdbinit --batch --ex run --ex bt --ex q --args builddir/calculator t + gdb --nx -x .gdbinit --batch --ex run --ex bt --ex q --args builddir/calc t clean: meson compile --clean -C builddir diff --git a/guecs.cpp b/guecs.cpp index 22dba4b..dc53757 100644 --- a/guecs.cpp +++ b/guecs.cpp @@ -1,7 +1,7 @@ #include "guecs.hpp" -#include "shaders.hpp" -#include "sound.hpp" -#include "textures.hpp" +#include "sfml/shaders.hpp" +#include "sfml/sound.hpp" +#include "sfml/textures.hpp" #include namespace guecs { diff --git a/guecs.hpp b/guecs.hpp index 38966d8..e1b708f 100644 --- a/guecs.hpp +++ b/guecs.hpp @@ -1,6 +1,6 @@ #pragma once #include "dbc.hpp" -#include "color.hpp" +#include "sfml/color.hpp" #include "lel.hpp" #include #include diff --git a/guecstra.cpp b/guecstra.cpp deleted file mode 100644 index 915b8a1..0000000 --- a/guecstra.cpp +++ /dev/null @@ -1,18 +0,0 @@ -#include "guecstra.hpp" - -namespace guecs { - - Clickable make_action(DinkyECS::World& target, Events::GUI event) { - return {[&, event](auto ent, auto data){ - // remember that ent is passed in from the UI::mouse handler - target.send(event, ent, data); - }}; - } - - Clickable make_action(DinkyECS::World& target, Events::GUI event, std::any data) { - return {[&, event, data](auto ent, auto){ - // remember that ent is passed in from the UI::mouse handler - target.send(event, ent, data); - }}; - } -} diff --git a/guecstra.hpp b/guecstra.hpp deleted file mode 100644 index b9d62b3..0000000 --- a/guecstra.hpp +++ /dev/null @@ -1,7 +0,0 @@ -#include "components.hpp" -#include "guecs.hpp" - -namespace guecs { - Clickable make_action(DinkyECS::World& target, Events::GUI event); - Clickable make_action(DinkyECS::World& target, Events::GUI event, std::any data); -} diff --git a/meson.build b/meson.build index 902d2a4..dcedec4 100644 --- a/meson.build +++ b/meson.build @@ -82,9 +82,9 @@ sources = [ 'dbc.cpp', 'guecs.cpp', 'lel.cpp', - 'shaders.cpp', - 'sound.cpp', - 'textures.cpp', + 'sfml/shaders.cpp', + 'sfml/sound.cpp', + 'sfml/textures.cpp', ] executable('runtests', sources + [ @@ -98,3 +98,11 @@ executable('runtests', sources + [ link_args: link_args, override_options: exe_defaults, dependencies: dependencies + [catch2]) + +executable('calc', sources + [ + 'demos/calc.cpp', + ], + cpp_args: cpp_args, + link_args: link_args, + override_options: exe_defaults, + dependencies: dependencies) diff --git a/color.hpp b/sfml/color.hpp similarity index 100% rename from color.hpp rename to sfml/color.hpp diff --git a/shaders.cpp b/sfml/shaders.cpp similarity index 100% rename from shaders.cpp rename to sfml/shaders.cpp diff --git a/shaders.hpp b/sfml/shaders.hpp similarity index 100% rename from shaders.hpp rename to sfml/shaders.hpp diff --git a/sound.cpp b/sfml/sound.cpp similarity index 100% rename from sound.cpp rename to sfml/sound.cpp diff --git a/sound.hpp b/sfml/sound.hpp similarity index 100% rename from sound.hpp rename to sfml/sound.hpp diff --git a/textures.cpp b/sfml/textures.cpp similarity index 100% rename from textures.cpp rename to sfml/textures.cpp diff --git a/textures.hpp b/sfml/textures.hpp similarity index 100% rename from textures.hpp rename to sfml/textures.hpp diff --git a/tests/guecs.cpp b/tests/guecs.cpp index 3b41065..016971a 100644 --- a/tests/guecs.cpp +++ b/tests/guecs.cpp @@ -2,7 +2,7 @@ #include #include "constants.hpp" #include "guecs.hpp" -#include "textures.hpp" +#include "sfml/textures.hpp" #include using namespace guecs; diff --git a/tests/shaders.cpp b/tests/shaders.cpp index 2b210ff..79b9e71 100644 --- a/tests/shaders.cpp +++ b/tests/shaders.cpp @@ -1,7 +1,7 @@ #include #include #include -#include "shaders.hpp" +#include "sfml/shaders.hpp" using namespace fmt; diff --git a/tests/sound.cpp b/tests/sound.cpp index 968e650..09d7329 100644 --- a/tests/sound.cpp +++ b/tests/sound.cpp @@ -1,7 +1,7 @@ #include #include #include -#include "sound.hpp" +#include "sfml/sound.hpp" using namespace fmt; diff --git a/tests/textures.cpp b/tests/textures.cpp index 910bda8..4ead2c0 100644 --- a/tests/textures.cpp +++ b/tests/textures.cpp @@ -1,7 +1,7 @@ #include #include #include -#include "textures.hpp" +#include "sfml/textures.hpp" using namespace fmt;