The-Powder-Toy/src/RasterGraphics.cpp

36 lines
501 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
#include "PixelMethods.inc"
#undef VIDYRES
#undef VIDXRES
#undef PIXELMETHODS_CLASS
#endif