#include "core_factory.h" CoreFactory::~CoreFactory() { if (title) delete[] title; } void CoreFactory::Set(const char *title) { if (title) { if (this->title) delete[] title; this->title=new char[strlen(title)+1]; strcpy(this->title,title); } } void CoreFactory::Set(const char *title,unsigned int width,unsigned int height) { Set(title); this->width=width; this->height=height; } void CoreFactory::Set(const char *title,unsigned int width,unsigned int height,int colorsize,int depthsize,int flags) { Set(title,width,height); this->colorsize=colorsize; this->depthsize=depthsize; this->flags=flags; } Core *CoreFactory::Create(int coretype) { Core *core; switch (coretype) { case RAVEN_OPENGL: core=new CoreOpenGL(title,width,height,colorsize,depthsize,flags); core->coretype=RAVEN_OPENGL; break; case RAVEN_DIRECT3D9: #if defined(WIN32)||defined(__WIN32__)||defined(_MSC_VER) core=new CoreD3D9(title,width,height,colorsize,depthsize,flags); core->coretype=RAVEN_DIRECT3D9; #else cerr<<"DirectX is not supported by this operating system."<Start()) { cerr<<"Core->Start() failed!"<