#include #include #include #include "object_base.h" #include "global.h" #include "build/objects.h" #include #include #include using namespace std; Global global; shared_ptr objectfromname(const char *name){ #define X(objname) if(strcmp(name,#objname)==0)return make_shared(); OBJECT_CLASSES_XLIST #undef X return NULL; //no object with that name } void stepcallback(void*){ Fl::repeat_timeout(1.0/30,stepcallback); } int main(int argc,char **argv){ Fl_Window *window=new Fl_Window(640,480,GAME_NAME); global.objects.push_back(objectfromname("obj_control")); global.objects[0]->create(); window->end(); Fl::visual(FL_RGB); window->show(argc,argv); Fl::add_timeout(1.0/30,stepcallback); return Fl::run(); }