#include #include #include "object_base.h" #include "library.h" using namespace std; Object::Object(void){ log("Object constructed"); } Object::Object(double x,double y):x(x),y(y){ log("Object constructed at position"); } Object::~Object(void){ log("Object destructed"); } void Object::create(void){} void Object::destroy(void){} void Object::step(void){} void Object::draw(void){ if(!sprite_index){ return; } if(!sprite_index->fl_image){ sprite_index->fl_image=new Fl_PNG_Image(nullptr,sprite_index->image,sprite_index->image_len); assert(!sprite_index->fl_image->fail()); } sprite_index->fl_image->draw((int)x,(int)y); }