void TCOD_sys_startup() { if (has_startup) return; if (SDL_Init(SDL_INIT_TIMER|SDL_INIT_VIDEO) < 0 ) TCOD_fatal_nopar("SDL : cannot initialize"); atexit(SDL_Quit); SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY,SDL_DEFAULT_REPEAT_INTERVAL); TCOD_max_font_chars=256; alloc_ascii_tables(); has_startup=true; }
void TCOD_sys_startup() { if (has_startup) return; #ifdef TCOD_MACOSX CustomSDLMain(); #endif if (SDL_Init(SDL_INIT_TIMER|SDL_INIT_VIDEO) < 0 ) TCOD_fatal_nopar("SDL : cannot initialize"); #ifndef TCOD_WINDOWS /* not needed and might crash on windows */ atexit(SDL_Quit); #endif SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY,SDL_DEFAULT_REPEAT_INTERVAL); TCOD_ctx.max_font_chars=256; alloc_ascii_tables(); SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1); SDL_GL_SetAttribute(SDL_GL_RED_SIZE, 8); SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE, 8); SDL_GL_SetAttribute(SDL_GL_GREEN_SIZE,8); SDL_GL_SetAttribute(SDL_GL_BUFFER_SIZE, 32 ); has_startup=true; }
void TCOD_sys_startup() { if (has_startup) return; max_font_chars=256; alloc_ascii_tables(); has_startup=true; }
static void check_ascii_to_tcod() { if ( fontNbCharHoriz * fontNbCharVertic != TCOD_max_font_chars ) { TCOD_max_font_chars=fontNbCharHoriz * fontNbCharVertic; alloc_ascii_tables(); } }