added struct subsys so that we know each
[winnie] / src / sdl / gfx.cc
index 74aa94d..7e098b9 100644 (file)
@@ -26,6 +26,7 @@ Author: Eleni Maria Stea <elene.mst@gmail.com>
 
 #include "gfx.h"
 #include "shalloc.h"
+#include "winnie.h"
 
 static SDL_Surface *fbsurf;
 
@@ -49,6 +50,8 @@ bool init_gfx()
                return false;
        }
 
+       get_subsys()->graphics_offset = (int)((char*)gfx - (char*)get_pool());
+
        Rect scr_rect(0, 0, 1024, 768);
        gfx->screen_rect = scr_rect;
        gfx->color_depth = 32;