summaryrefslogtreecommitdiff
path: root/main.cpp
diff options
context:
space:
mode:
authortomsmeding <tom.smeding@gmail.com>2016-12-29 10:57:15 +0100
committertomsmeding <tom.smeding@gmail.com>2016-12-29 10:57:30 +0100
commit6286f890c132b9cd6a36d585735e5d7310dc0abf (patch)
tree32b2e697fa0030fdd410eba0d2626e8fd511c7ed /main.cpp
parentac18b3132059b5e7d5f00ccf2b56e543cf0da84b (diff)
Sprites, object destruction
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/main.cpp b/main.cpp
index f9312bd..9f62068 100644
--- a/main.cpp
+++ b/main.cpp
@@ -8,10 +8,7 @@
#include "global.h"
#include "library.h"
#include "build/objects.h"
-
-#include <FL/Fl.H>
-#include <FL/Fl_Window.H>
-#include <FL/Fl_draw.H>
+#include "build/sprites.h"
using namespace std;
@@ -64,5 +61,9 @@ int main(int argc,char **argv){
Fl::visual(FL_RGB);
window->show(argc,argv);
Fl::add_timeout(1.0/30,stepcallback);
- return Fl::run();
+ int ret=Fl::run();
+ for(shared_ptr<Object> p : global.objects){
+ p->destroy();
+ }
+ return ret;
}