The-Powder-Toy/src/graphics/RasterGraphics.cpp

36 lines
506 B
C++
Raw Normal View History

#include "Graphics.h"
#ifndef OGLI
Graphics::Graphics():
sdl_scale(1)
{
vid = (pixel *)malloc(PIXELSIZE * ((XRES+BARSIZE) * (YRES+MENUSIZE)));
}
Graphics::~Graphics()
{
free(vid);
}
void Graphics::Clear()
{
memset(vid, 0, PIXELSIZE * ((XRES+BARSIZE) * (YRES+MENUSIZE)));
}
void Graphics::Finalise()
{
}
#define VIDXRES XRES+BARSIZE
#define VIDYRES YRES+MENUSIZE
#define PIXELMETHODS_CLASS Graphics
2012-07-06 10:06:26 -05:00
#include "RasterDrawMethods.inc"
#undef VIDYRES
#undef VIDXRES
#undef PIXELMETHODS_CLASS
#endif