X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fgui%2Fguimisc.h;h=30f30238f46a243e7486dd8035c8bbee7de6a94b;hb=c0001155bc0909da61f6c849c0be9b16e9b7f4b6;hp=6382cc9c49186a292a91dcb8364412d0f2166efa;hpb=b90c77b56b023d274fc028e449227bd0f6f37e8e;p=apple2 diff --git a/src/gui/guimisc.h b/src/gui/guimisc.h index 6382cc9..30f3023 100755 --- a/src/gui/guimisc.h +++ b/src/gui/guimisc.h @@ -9,16 +9,16 @@ #include #include -#include "types.h" +#include // Useful structs struct Font { - Font(uint8 * d = NULL, uint32 w = 0, uint32 h = 0): data(d), width(w), height(h) {} + Font(uint8_t * d = NULL, uint32_t w = 0, uint32_t h = 0): data(d), width(w), height(h) {} - uint8 * data; - uint32 width, height; + uint8_t * data; + uint32_t width, height; }; // Okay, this is ugly but works and I can't think of any better way to handle this. So what @@ -40,21 +40,23 @@ struct Font // Global functions -//void SetFont(uint8 *, uint32, uint32); +//void SetFont(uint8_t *, uint32_t, uint32_t); void SetNewFont(Font); void RestoreOldFont(void); -uint32 GetFontWidth(void); -uint32 GetFontHeight(void); -void DrawStringTrans(SDL_Surface * screen, uint32 x, uint32 y, uint32 color, const char * text, ...); -void DrawStringOpaque(SDL_Surface * screen, uint32 x, uint32 y, uint32 fg, uint32 bg, const char * text, ...); +uint32_t GetFontWidth(void); +uint32_t GetFontHeight(void); +void DrawStringTrans(SDL_Surface * screen, uint32_t x, uint32_t y, uint32_t color, const char * text, ...); +void DrawStringOpaque(SDL_Surface * screen, uint32_t x, uint32_t y, uint32_t fg, uint32_t bg, const char * text, ...); -void DrawStringOpaqueSmall(SDL_Surface * screen, uint32 x, uint32 y, uint32 fg, uint32 bg, const char * text, ...); +//Not sure these belong here, but there you go... +bool RectanglesIntersect(SDL_Rect r1, SDL_Rect r2); +bool RectangleFirstInsideSecond(SDL_Rect r1, SDL_Rect r2); // GUI bitmaps (exported) -extern uint8 closeBox[]; -extern uint8 closeBoxDown[]; -extern uint8 closeBoxHover[]; -extern uint8 floppyDiskImg[]; +extern uint8_t closeBox[]; +extern uint8_t closeBoxDown[]; +extern uint8_t closeBoxHover[]; +extern uint8_t floppyDiskImg[]; #endif // __GUIMISC_H__