haraldhv
/
aigo
Archived
1
0
Fork 0
This repository has been archived on 2024-07-04. You can view files and clone it, but cannot push or open issues or pull requests.
aigo/lib/staticcam.cpp

20 lines
388 B
C++
Raw Normal View History

2007-03-14 18:02:22 +01:00
#include "staticcam.h"
StaticCam::StaticCam(char *filename)
: Camera()
{
loaded = SDL_LoadBMP(filename);
init(loaded->w, loaded->h);
SDL_CreateRGBSurface(SDL_SWSURFACE, loaded->w, loaded->h, 8, 0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000);
}
StaticCam::~StaticCam( void )
{
SDL_FreeSurface(loaded);
}
void StaticCam::update( void )
{
SDL_BlitSurface(loaded, 0, pixels, 0);
}