Started moving SFML specific stuff into the sfml/ directory.

This commit is contained in:
Zed A. Shaw 2025-05-05 12:42:26 -04:00
parent df024adccd
commit 58880c2a6a
18 changed files with 27 additions and 42 deletions

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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