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
|
Permission is hereby granted, without written agreement and without
|
||||||
license or royalty fees, to use, copy, modify, and distribute this
|
license or royalty fees, to use, copy, modify, and distribute this
|
||||||
software and its documentation for any purpose, provided that the
|
software and its documentation for any purpose, provided that the
|
||||||
|
|
12
Makefile
12
Makefile
|
@ -30,20 +30,20 @@ test: build
|
||||||
|
|
||||||
run: build test
|
run: build test
|
||||||
ifeq '$(OS)' 'Windows_NT'
|
ifeq '$(OS)' 'Windows_NT'
|
||||||
powershell "cp ./builddir/calculator.exe ."
|
powershell "cp ./builddir/calc.exe ."
|
||||||
./calculator
|
./calc
|
||||||
else
|
else
|
||||||
./builddir/calculator
|
./builddir/calc
|
||||||
endif
|
endif
|
||||||
|
|
||||||
debug: build
|
debug: build
|
||||||
gdb --nx -x .gdbinit --ex run --args builddir/calculator
|
gdb --nx -x .gdbinit --ex run --args builddir/calc
|
||||||
|
|
||||||
debug_run: build
|
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
|
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:
|
clean:
|
||||||
meson compile --clean -C builddir
|
meson compile --clean -C builddir
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#include "guecs.hpp"
|
#include "guecs.hpp"
|
||||||
#include "shaders.hpp"
|
#include "sfml/shaders.hpp"
|
||||||
#include "sound.hpp"
|
#include "sfml/sound.hpp"
|
||||||
#include "textures.hpp"
|
#include "sfml/textures.hpp"
|
||||||
#include <typeinfo>
|
#include <typeinfo>
|
||||||
|
|
||||||
namespace guecs {
|
namespace guecs {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
#include "dbc.hpp"
|
#include "dbc.hpp"
|
||||||
#include "color.hpp"
|
#include "sfml/color.hpp"
|
||||||
#include "lel.hpp"
|
#include "lel.hpp"
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <memory>
|
#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',
|
'dbc.cpp',
|
||||||
'guecs.cpp',
|
'guecs.cpp',
|
||||||
'lel.cpp',
|
'lel.cpp',
|
||||||
'shaders.cpp',
|
'sfml/shaders.cpp',
|
||||||
'sound.cpp',
|
'sfml/sound.cpp',
|
||||||
'textures.cpp',
|
'sfml/textures.cpp',
|
||||||
]
|
]
|
||||||
|
|
||||||
executable('runtests', sources + [
|
executable('runtests', sources + [
|
||||||
|
@ -98,3 +98,11 @@ executable('runtests', sources + [
|
||||||
link_args: link_args,
|
link_args: link_args,
|
||||||
override_options: exe_defaults,
|
override_options: exe_defaults,
|
||||||
dependencies: dependencies + [catch2])
|
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 <fmt/core.h>
|
||||||
#include "constants.hpp"
|
#include "constants.hpp"
|
||||||
#include "guecs.hpp"
|
#include "guecs.hpp"
|
||||||
#include "textures.hpp"
|
#include "sfml/textures.hpp"
|
||||||
#include <fmt/xchar.h>
|
#include <fmt/xchar.h>
|
||||||
|
|
||||||
using namespace guecs;
|
using namespace guecs;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#include <catch2/catch_test_macros.hpp>
|
#include <catch2/catch_test_macros.hpp>
|
||||||
#include <fmt/core.h>
|
#include <fmt/core.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include "shaders.hpp"
|
#include "sfml/shaders.hpp"
|
||||||
|
|
||||||
using namespace fmt;
|
using namespace fmt;
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#include <catch2/catch_test_macros.hpp>
|
#include <catch2/catch_test_macros.hpp>
|
||||||
#include <fmt/core.h>
|
#include <fmt/core.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include "sound.hpp"
|
#include "sfml/sound.hpp"
|
||||||
|
|
||||||
using namespace fmt;
|
using namespace fmt;
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#include <catch2/catch_test_macros.hpp>
|
#include <catch2/catch_test_macros.hpp>
|
||||||
#include <fmt/core.h>
|
#include <fmt/core.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include "textures.hpp"
|
#include "sfml/textures.hpp"
|
||||||
|
|
||||||
using namespace fmt;
|
using namespace fmt;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue