2 * Acess GUI (AxWin) Version 2
3 * By John Hodge (thePowersGang)
16 typedef struct sFont tFont;
19 static inline uint32_t Video_AlphaBlend(uint32_t _orig, uint32_t _new, uint8_t _alpha)
23 if( _alpha == 0 ) return _orig;
24 if( _alpha == 255 ) return _new;
26 ao = (_orig >> 24) & 0xFF;
27 ro = (_orig >> 16) & 0xFF;
28 go = (_orig >> 8) & 0xFF;
29 bo = (_orig >> 0) & 0xFF;
31 an = (_new >> 24) & 0xFF;
32 rn = (_new >> 16) & 0xFF;
33 gn = (_new >> 8) & 0xFF;
34 bn = (_new >> 0) & 0xFF;
36 if( _alpha == 0x80 ) {
43 ao = ao*(255-_alpha) + an*_alpha;
44 ro = ro*(255-_alpha) + rn*_alpha;
45 go = go*(255-_alpha) + gn*_alpha;
46 bo = bo*(255-_alpha) + bn*_alpha;
53 return (ao << 24) | (ro << 16) | (go << 8) | bo;
57 extern char *gsTerminalDevice;
58 extern char *gsMouseDevice;
60 extern int giScreenWidth;
61 extern int giScreenHeight;
62 extern uint32_t *gpScreenBuffer;
64 extern int giTerminalFD;
68 extern void memset32(void *ptr, uint32_t val, size_t count);
70 extern void Video_Update(void);
71 extern void Video_FillRect(short X, short Y, short W, short H, uint32_t Color);
72 extern void Video_DrawRect(short X, short Y, short W, short H, uint32_t Color);
73 extern int Video_DrawText(short X, short Y, short W, short H, tFont *Font, uint32_t Color, char *Text);
74 extern void Video_DrawImage(short X, short Y, short W, short H, tImage *Image);
76 extern void _SysDebug(const char *Format, ...);