From b1f93a4f8a5a3e84db9f00d0b41749d4fb32ed26 Mon Sep 17 00:00:00 2001 From: Clyne Sullivan Date: Sun, 30 Jul 2017 11:02:39 -0400 Subject: event feature work; ozone bgm redone --- entityx/Event.h | 10 +++++----- entityx/Makefile | 7 +++++-- entityx/libentityx.a | Bin 435972 -> 549286 bytes entityx/out/Entity.o | Bin 317167 -> 0 bytes entityx/out/Event.o | Bin 23737 -> 0 bytes entityx/out/Pool.o | Bin 12428 -> 0 bytes entityx/out/System.o | Bin 21295 -> 0 bytes entityx/out/Timer.o | Bin 12317 -> 0 bytes 8 files changed, 10 insertions(+), 7 deletions(-) delete mode 100644 entityx/out/Entity.o delete mode 100644 entityx/out/Event.o delete mode 100644 entityx/out/Pool.o delete mode 100644 entityx/out/System.o delete mode 100644 entityx/out/Timer.o (limited to 'entityx') diff --git a/entityx/Event.h b/entityx/Event.h index cb7b3ab..988c9a1 100644 --- a/entityx/Event.h +++ b/entityx/Event.h @@ -37,7 +37,7 @@ class BaseEvent { }; -typedef Simple::Signal EventSignal; +typedef Simple::Signal EventSignal; typedef std::shared_ptr EventSignalPtr; typedef std::weak_ptr EventSignalWeakPtr; @@ -123,7 +123,7 @@ class EventManager : entityx::help::NonCopyable { */ template void subscribe(Receiver &receiver) { - void (Receiver::*receive)(const E &) = &Receiver::receive; + bool (Receiver::*receive)(const E &) = &Receiver::receive; auto sig = signal_for(Event::family()); auto wrapper = EventCallbackWrapper(std::bind(receive, &receiver, std::placeholders::_1)); auto connection = sig->connect(wrapper); @@ -205,9 +205,9 @@ class EventManager : entityx::help::NonCopyable { // Functor used as an event signal callback that casts to E. template struct EventCallbackWrapper { - explicit EventCallbackWrapper(std::function callback) : callback(callback) {} - void operator()(const void *event) { callback(*(static_cast(event))); } - std::function callback; + explicit EventCallbackWrapper(std::function callback) : callback(callback) {} + bool operator()(const void *event) { return callback(*(static_cast(event))); } + std::function callback; }; std::vector handlers_; diff --git a/entityx/Makefile b/entityx/Makefile index 5deb756..58b18a7 100644 --- a/entityx/Makefile +++ b/entityx/Makefile @@ -1,3 +1,5 @@ +# gamedev CHANGE - changed output of libentityx to ../lib/ + INC = -I.. FLG = -std=gnu++11 @@ -12,5 +14,6 @@ all: g++ $(INC) $(FLG) -c Event.cc -o out/Event.o g++ $(INC) $(FLG) -c Entity.cc -o out/Entity.o g++ $(INC) $(FLG) -c System.cc -o out/System.o - ar rvs libentityx.a out/*.o -# g++ out/*.o -shared -o ../entityx.so \ No newline at end of file + ar rvs ../lib/libentityx.a out/*.o +# g++ out/*.o -shared -o ../entityx.so + rm -rf out diff --git a/entityx/libentityx.a b/entityx/libentityx.a index 643acc6..2196a18 100644 Binary files a/entityx/libentityx.a and b/entityx/libentityx.a differ diff --git a/entityx/out/Entity.o b/entityx/out/Entity.o deleted file mode 100644 index fde66e6..0000000 Binary files a/entityx/out/Entity.o and /dev/null differ diff --git a/entityx/out/Event.o b/entityx/out/Event.o deleted file mode 100644 index 8f83146..0000000 Binary files a/entityx/out/Event.o and /dev/null differ diff --git a/entityx/out/Pool.o b/entityx/out/Pool.o deleted file mode 100644 index 4d0bc5d..0000000 Binary files a/entityx/out/Pool.o and /dev/null differ diff --git a/entityx/out/System.o b/entityx/out/System.o deleted file mode 100644 index 6b38822..0000000 Binary files a/entityx/out/System.o and /dev/null differ diff --git a/entityx/out/Timer.o b/entityx/out/Timer.o deleted file mode 100644 index fc47589..0000000 Binary files a/entityx/out/Timer.o and /dev/null differ -- cgit v1.2.3