Skip to content

Instantly share code, notes, and snippets.

@thai-ng
Created April 22, 2017 19:52
Show Gist options
  • Save thai-ng/ca0c509c3a33d40af07442ccbdd80397 to your computer and use it in GitHub Desktop.
Save thai-ng/ca0c509c3a33d40af07442ccbdd80397 to your computer and use it in GitHub Desktop.
#include "drawable.h"
#include <SDL/SDL.h>
class SDLDrawable : public Drawable
{
public:
SDLDrawable(int w, int h);
~SDLDrawable();
void setPixel(int x, int y, unsigned int color);
unsigned int getPixel(int x, int y);
void updateScreen();
private:
SDLDrawable(const SDLDrawable&) = delete;
SDLDrawable(SDLDrawable&&) = delete;
SDLDrawable& operator=(const SDLDrawable&) = delete;
SDLDrawable& operator=(SDLDrawable&&) = delete;
SDL_Surface* screen;
int width;
int height;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment