#pragma once #include #include "font.h" #include "global.h" #include "object_base.h" using namespace std; extern Global global; template shared_ptr instance_create(int x,int y){ shared_ptr 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 draw_textf(int x,int y,const char *format,...) __attribute__((format (printf, 3, 4))); void draw_set_font(const Font *font); void log(const char *s); void logf(const char *format,...) __attribute__((format (printf, 1, 2)));