summaryrefslogtreecommitdiff
path: root/library.h
diff options
context:
space:
mode:
Diffstat (limited to 'library.h')
-rw-r--r--library.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/library.h b/library.h
index b00acdb..66cbde0 100644
--- a/library.h
+++ b/library.h
@@ -1,5 +1,22 @@
#pragma once
+#include <memory>
+#include "global.h"
+#include "object_base.h"
+
+using namespace std;
+
+
+extern Global global;
+
+
+template <typename ObjT>
+shared_ptr<Object> instance_create(int x,int y){
+ shared_ptr<Object> ptr(new ObjT(x,y));
+ global.objects.push_back(ptr);
+ ptr->create();
+ return ptr;
+}
void draw_text(int x,int y,const char *s);
void log(const char *s);