summaryrefslogtreecommitdiff
path: root/src/graphics/Graphics.h
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-07-21 17:43:46 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-07-21 17:43:46 (GMT)
commitf7d8556965832821036c210ffc1f9e73f3ff70cc (patch)
tree58e985bdc6e99a2ad8e7382ebaf33553ae93d836 /src/graphics/Graphics.h
parent5bf0a084ace0e6b673efa4552b40de8b36e0668e (diff)
downloadpowder-f7d8556965832821036c210ffc1f9e73f3ff70cc.zip
powder-f7d8556965832821036c210ffc1f9e73f3ff70cc.tar.gz
Icons for menu items
Diffstat (limited to 'src/graphics/Graphics.h')
-rw-r--r--src/graphics/Graphics.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/graphics/Graphics.h b/src/graphics/Graphics.h
index 1209b86..41c521a 100644
--- a/src/graphics/Graphics.h
+++ b/src/graphics/Graphics.h
@@ -90,14 +90,16 @@ public:
pixel * Buffer;
int Width, Height;
- VideoBuffer(int width, int height): Width(width), Height(height), Buffer((pixel*)calloc(width*height, PIXELSIZE)) { };
+ VideoBuffer(const VideoBuffer & old);
+ VideoBuffer(VideoBuffer * old);
+ VideoBuffer(int width, int height);
void BlendPixel(int x, int y, int r, int g, int b, int a);
void AddPixel(int x, int y, int r, int g, int b, int a);
void SetPixel(int x, int y, int r, int g, int b, int a);
int BlendCharacter(int x, int y, int c, int r, int g, int b, int a);
int AddCharacter(int x, int y, int c, int r, int g, int b, int a);
int SetCharacter(int x, int y, int c, int r, int g, int b, int a);
- ~VideoBuffer() { free(Buffer); };
+ ~VideoBuffer();
};
class Graphics
@@ -158,6 +160,8 @@ public:
void gradientrect(int x, int y, int width, int height, int r, int g, int b, int a, int r2, int g2, int b2, int a2);
void draw_image(pixel *img, int x, int y, int w, int h, int a);
+ void draw_image(const VideoBuffer & vidBuf, int w, int h, int a);
+ void draw_image(VideoBuffer * vidBuf, int w, int h, int a);
Graphics();
~Graphics();