int TAP_Main(void) { int err1; InitTAPAPIFix(); transparency_orig = TAP_GetSystemVar( SYSVAR_OsdAlpha ); rgn = TAP_Osd_Create(0, 0, 720, 576, 0, 0); TAP_Osd_SetTransparency( rgn, 150 ); err1 = Load_Font(&font0, "calibri_small.rasterized"); if (err1!=0) return 0; err1 = Load_Font(&font1, "arialn_small.rasterized"); if (err1!=0) return 0; err1 = Load_Font(&font2, "tahoma_small.rasterized"); if (err1!=0) return 0; SetColors(&font0, COLOR_Red, COLOR_White); SetColors(&font1, COLOR_Red, COLOR_White); SetColors(&font2, COLOR_Red, COLOR_White); return 1; }
static void init(SDL_Surface ** sdlsScreen, TTF_Font ** ttffFont) { SDL_putenv("SDL_VIDEO_ALLOW_SCREENSAVER=1"); if (SDL_Init(SDL_INIT_VIDEO) < 0) ERROR ("Could not initialize SDL",SDL); if (TTF_Init() < 0) ERROR ("Could not initialize TTF",TTF); atexit(release_ressource); if ((*ttffFont = Load_Font(FONT_SIZE)) == NULL) ERROR ("Could not open font", TTF); if ((*sdlsScreen = SDL_SetVideoMode(0, 0, 32, SDL_SWSURFACE | SDL_FULLSCREEN )) == NULL) ERROR ("Could not initialize video mode",SDL); cursor_state = SDL_ShowCursor(SDL_QUERY); SDL_ShowCursor(SDL_DISABLE); SDL_EnableUNICODE(1); }