16 lines
416 B
C++
16 lines
416 B
C++
|
#include "camera.h"
|
||
|
#include <SDL/SDL.h>
|
||
|
|
||
|
#define DEPTH 32
|
||
|
|
||
|
Camera::Camera(int width, int height)
|
||
|
{
|
||
|
//SDL_Surface *SDL_CreateRGBSurface(Uint32 flags, int width, int height, int depth, Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask);
|
||
|
pixels = SDL_CreateRGBSurface(SDL_SWSURFACE, width, height, DEPTH, 0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000);
|
||
|
}
|
||
|
|
||
|
Camera::~Camera( void )
|
||
|
{
|
||
|
SDL_FreeSurface(pixels);
|
||
|
}
|