Started moving SFML specific stuff into the sfml/ directory.

main
Zed A. Shaw 5 days ago
parent df024adccd
commit 58880c2a6a
  1. 2
      LICENSE
  2. 12
      Makefile
  3. 6
      guecs.cpp
  4. 2
      guecs.hpp
  5. 18
      guecstra.cpp
  6. 7
      guecstra.hpp
  7. 14
      meson.build
  8. 0
      sfml/color.hpp
  9. 0
      sfml/shaders.cpp
  10. 0
      sfml/shaders.hpp
  11. 0
      sfml/sound.cpp
  12. 0
      sfml/sound.hpp
  13. 0
      sfml/textures.cpp
  14. 0
      sfml/textures.hpp
  15. 2
      tests/guecs.cpp
  16. 2
      tests/shaders.cpp
  17. 2
      tests/sound.cpp
  18. 2
      tests/textures.cpp

@ -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

@ -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

@ -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 <typeinfo>
namespace guecs {

@ -1,6 +1,6 @@
#pragma once
#include "dbc.hpp"
#include "color.hpp"
#include "sfml/color.hpp"
#include "lel.hpp"
#include <string>
#include <memory>

@ -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<Events::GUI>(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<Events::GUI>(event, ent, data);
}};
}
}

@ -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);
}

@ -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)

@ -2,7 +2,7 @@
#include <fmt/core.h>
#include "constants.hpp"
#include "guecs.hpp"
#include "textures.hpp"
#include "sfml/textures.hpp"
#include <fmt/xchar.h>
using namespace guecs;

@ -1,7 +1,7 @@
#include <catch2/catch_test_macros.hpp>
#include <fmt/core.h>
#include <string>
#include "shaders.hpp"
#include "sfml/shaders.hpp"
using namespace fmt;

@ -1,7 +1,7 @@
#include <catch2/catch_test_macros.hpp>
#include <fmt/core.h>
#include <string>
#include "sound.hpp"
#include "sfml/sound.hpp"
using namespace fmt;

@ -1,7 +1,7 @@
#include <catch2/catch_test_macros.hpp>
#include <fmt/core.h>
#include <string>
#include "textures.hpp"
#include "sfml/textures.hpp"
using namespace fmt;

Loading…
Cancel
Save