#include <time.h>
-gFBDC *gFBDC::instance;
-
gFBDC::gFBDC()
{
- instance=this;
fb=new fbClass;
if (!fb->Available())
{
delete fb;
delete[] surface.clut.data;
- instance=0;
}
void gFBDC::calcRamp()
fb->PutCMAP();
}
-void gFBDC::exec(gOpcode *o)
+void gFBDC::exec(const gOpcode *o)
{
switch (o->opcode)
{
++t;
+ fb->blit();
fb->waitVSync();
break;
}
+ case gOpcode::flush:
+ fb->blit();
+ break;
default:
gDC::exec(o);
break;
surface.data = fb->lfb;
surface.offset = 0;
- surface.data_phys = 50*1024*1024; // FIXME
+ surface.data_phys = fb->getPhysAddr();
int fb_size = surface.stride * surface.y;
setPalette();
}
-// eAutoInitPtr<gFBDC> init_gFBDC(eAutoInitNumbers::graphic-1, "GFBDC");
-#ifndef SDLDC
eAutoInitPtr<gFBDC> init_gFBDC(eAutoInitNumbers::graphic-1, "GFBDC");
-#endif