Let each screen get width and height in as a parameter on draw() instead of hardcodin...
[ccbs] / bigscreen / splitscreen.h
index 3b0616c..28a659e 100644 (file)
@@ -6,18 +6,18 @@
 /* A 4x4 split class */
 class SplitScreen : public GenericScreen {
 private:
-       unsigned char subbufs[4][800 * 600 * 4];
+       unsigned char *subbufs[4];
        GenericScreen *subscreens[4];
        bool valid;
 
-       void downscale_2x2(unsigned char *dst, unsigned char *src);
+       void copy_subscreen(unsigned char *dst, unsigned char *src, unsigned width, unsigned height);
        
 public:
        SplitScreen(GenericScreen *s1, GenericScreen *s2, GenericScreen *s3, GenericScreen *s4);
        virtual ~SplitScreen();
 
        bool check_invalidated();
-       void draw(unsigned char *buf);
+       void draw(unsigned char *buf, unsigned width, unsigned height);
 };
 
 #endif /* !defined(_SPLITSCREEN_H) */