diff options
author | Nao Pross <naopross@thearcway.org> | 2019-01-22 01:41:40 +0100 |
---|---|---|
committer | Nao Pross <naopross@thearcway.org> | 2019-01-22 01:44:05 +0100 |
commit | b55860b5f45496873375ced1cff24422ae562b8a (patch) | |
tree | 9ba3de03427f6ca59342d93a131f54dc995db10f | |
parent | Fix typo to compile (diff) | |
download | flatland-b55860b5f45496873375ced1cff24422ae562b8a.tar.gz flatland-b55860b5f45496873375ced1cff24422ae562b8a.zip |
Delete flatevolvable.h and flatevolvable.cpp
-rw-r--r-- | engine/flatactor.cpp | 5 | ||||
-rw-r--r-- | engine/flatevolvable.cpp | 41 | ||||
-rw-r--r-- | engine/include/flatactor.h | 4 | ||||
-rw-r--r-- | engine/include/flatevolvable.h | 29 |
4 files changed, 1 insertions, 78 deletions
diff --git a/engine/flatactor.cpp b/engine/flatactor.cpp index e41d5cf..525939d 100644 --- a/engine/flatactor.cpp +++ b/engine/flatactor.cpp @@ -23,8 +23,3 @@ FlatBound * FlatActor::getBounds() const return bounds; } -void FlatActor::evolve(float dt) -{ - -} - diff --git a/engine/flatevolvable.cpp b/engine/flatevolvable.cpp deleted file mode 100644 index c9eccf6..0000000 --- a/engine/flatevolvable.cpp +++ /dev/null @@ -1,41 +0,0 @@ -#include "flatevolvable.h" -#include "flattask.h" -#include "flatland.h" - -FlatEvolvable::FlatEvolvable(bool evolving) - - : task(0) -{ - setEvolving(evolving); -} - -FlatEvolvable::~FlatEvolvable() -{ - if (task) - delete task; -} - -void FlatEvolvable::evolve_task(float *data) -{ - evolve(*data); -} - -void FlatEvolvable::setEvolving(bool flag) -{ - if (isEvolving() != flag) - { - if (flag) - task = new FlatTask<FlatEvolvable, float*>(this, &FlatEvolvable::evolve_task, &flatland_dt); - else { - - delete task; - task = 0; - } - } -} - -bool FlatEvolvable::isEvolving() const -{ - return task != 0; -} - diff --git a/engine/include/flatactor.h b/engine/include/flatactor.h index 8e2d3d3..306ce49 100644 --- a/engine/include/flatactor.h +++ b/engine/include/flatactor.h @@ -2,11 +2,10 @@ #define __FLATACTOR_H__ #include "flatcollector.h" -#include "flatevolvable.h" class FlatBound; -class FlatActor : public FlatCollector, public FlatEvolvable +class FlatActor : public FlatCollector { // TODO, event binding // TODO, serial binding @@ -20,7 +19,6 @@ public: ~FlatActor(); - virtual void evolve(float dt) override; void setBounds(FlatBound * bounds); FlatBound * getBounds() const; diff --git a/engine/include/flatevolvable.h b/engine/include/flatevolvable.h deleted file mode 100644 index 71aaf0f..0000000 --- a/engine/include/flatevolvable.h +++ /dev/null @@ -1,29 +0,0 @@ -#ifndef __FLATEVOLVABLE_H__ -#define __FLATEVOLVABLE_H__ - -#include "flatobject.h" - -class task_s; - -class FlatEvolvable : virtual public FlatObject -{ - task_s * task; - -public: - - FlatEvolvable(bool evolving = false); - - virtual ~FlatEvolvable(); - - /* Evolution fields */ - - void evolve_task(float*); - - virtual void evolve(float dt) = 0; - - void setEvolving(bool flag); - - bool isEvolving() const; -}; - -#endif |