Started moving SFML specific stuff into the sfml/ directory.
This commit is contained in:
parent
df024adccd
commit
58880c2a6a
18 changed files with 27 additions and 42 deletions
2
LICENSE
2
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
|
||||
|
|
12
Makefile
12
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
|
||||
|
|
|
@ -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>
|
||||
|
|
18
guecstra.cpp
18
guecstra.cpp
|
@ -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);
|
||||
}
|
14
meson.build
14
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)
|
||||
|
|
|
@ -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…
Add table
Add a link
Reference in a new issue