Exemplo n.º 1
0
void kernel_PrintSDLVersions(void)
{
    const SDL_version *v = NULL;
    SDL_version compiled_V;

    v = SDL_Linked_Version();
    SDL_VERSION(&compiled_V);
    file_Log(ker_Log(), 1, "(Linked) SDL Version: %u.%u.%u\n", v->major, v->minor, v->patch);
    file_Log(ker_Log(), 1, "(Compiled) SDL Version: %u.%u.%u\n", compiled_V.major, compiled_V.minor, compiled_V.patch);

    v = TTF_Linked_Version();
    SDL_TTF_VERSION(&compiled_V);
    file_Log(ker_Log(), 1, "(Linked) SDL TTF Version: %u.%u.%u\n", v->major, v->minor, v->patch);
    file_Log(ker_Log(), 1, "(Compiled) SDL TTF Version: %u.%u.%u\n", compiled_V.major, compiled_V.minor, compiled_V.patch);

    file_Log(ker_Log(), 1, "SDL_Init flags (%d) -\n", kernel_Main.SDL_Init_Flags);

    if(flag_Check(&kernel_Main.SDL_Init_Flags, SDL_INIT_VIDEO) == 1)
        file_Log(ker_Log(), 1, "\tSDL_INIT_VIDEO\n");
    if(flag_Check(&kernel_Main.SDL_Init_Flags, SDL_INIT_AUDIO) == 1)
        file_Log(ker_Log(), 1, "\tSDL_INIT_AUDIO\n");
    if(flag_Check(&kernel_Main.SDL_Init_Flags, SDL_INIT_JOYSTICK) == 1)
        file_Log(ker_Log(), 1, "\tSDL_INIT_JOYSTICK\n");

    return;
}
Exemplo n.º 2
0
int do_about(int sel) {
    char *path;
#ifdef __GNUC__
    {
	int major = __GNUC__;
	int minor = __GNUC_MINOR__;
#ifdef __GNUC_PATCHLEVEL__
	int patchlevel = __GNUC_PATCHLEVEL__;
#else
	int patchlevel = 0;
#endif
#ifdef __clang__
	major = __clang_major__;
	minor = __clang_minor__;
	patchlevel = __clang_patchlevel__;
	sprintf(gcc_version,"with llvm/clang %d.%d.%d",major,minor,patchlevel);
#else
	sprintf(gcc_version,"with gcc %d.%d.%d",major,minor,patchlevel);
#endif
    }
#else
    sprintf(gcc_version,"with an unknown gcc ???");
#endif
    about_items[2].label = gcc_version;
    path = get_shared("bitmaps/raine_logo.png");
    sprintf(about_cpu, "CPU: %s", raine_cpu_model);
    about_items[3].label = about_cpu;
    char about_sdl[80];
#if HAS_NEO
    char about_sound[80];
#endif
    const SDL_version *version = SDL_Linked_Version();
    const SDL_version *img = IMG_Linked_Version();
    const SDL_version *ttf = TTF_Linked_Version();
    sprintf(about_sdl,"Linked with SDL-%d.%d.%d, SDL_image-%d.%d.%d, SDL_ttf-%d.%d.%d",version->major,version->minor,version->patch,
	    img->major,img->minor,img->patch,
	    ttf->major,ttf->minor,ttf->patch);
    about_items[4].label = about_sdl;
#if HAS_NEO
    Sound_Version sound;
    Sound_GetLinkedVersion(&sound);
    sprintf(about_sound,"SDL_sound-%d.%d.%d",
	    sound.major,sound.minor,sound.patch);

    about_items[5].label = about_sound;
#endif
#ifdef RDTSC_PROFILE
  if (cycles_per_second) {
    sprintf(about_cpu,"CPU: %s at %d MHz",raine_cpu_model,cycles_per_second/1000000);
  }
#endif
  about_menu = new TAbout_menu(_("About..."),about_items, path);
  about_menu->execute();
  delete about_menu;
  about_menu = NULL;
  return 0;
}
Exemplo n.º 3
0
TextGenerator::TextGenerator() : ClientComponent() {
	pTextGenerator = this;
	if (TTF_Init() != 0) {
		g_Console()->Err("Unable to initialize SDL_TTF: " +
		                 std::string(TTF_GetError()));
		return; // TODO: need exceptions
	}
	SDL_version ver = *TTF_Linked_Version();
	g_Console()->Info("Initialized SDL_TTF " + std::to_string(ver.major) + "." +
	                  std::to_string(ver.minor) + "." + std::to_string(ver.patch));
}
Exemplo n.º 4
0
void MainManager::initSDLttf()
{
  log_.i("Initializing SDL_ttf");
  if ( TTF_Init() != 0)
    throw log_.exception("Failed to initialize SDL_ttf", SDL_GetError);
  atexit(TTF_Quit);

  // Write version information to log
  SDL_version compiled;
  SDL_TTF_VERSION(&compiled);
  logSDLVersion("SDL_ttf", compiled, *TTF_Linked_Version());
}
Exemplo n.º 5
0
	void Application::setup(Int32 argc, char** argv)
	{
		srand((unsigned)time(nullptr));

		if (SDL_Init(SDL_INIT_VIDEO) != 0)
		{
			D6_THROW(VideoException, Format("Unable to set graphics mode: {0}") << SDL_GetError());
		}
		if (TTF_Init() != 0)
		{
			D6_THROW(FontException, Format("Unable to initialize font subsystem: {0}") << TTF_GetError());
		}

		// Print application info
		SDL_version sdlVersion;
		console.printLine("\n===Application information===");
		console.printLine(Format("{0} version: {1}") << APP_NAME << APP_VERSION);
		SDL_GetVersion(&sdlVersion);
		console.printLine(Format("SDL version: {0}.{1}.{2}") << sdlVersion.major << sdlVersion.minor << sdlVersion.patch);
		const SDL_version* mixVersion = Mix_Linked_Version();
		console.printLine(Format("SDL_mixer version: {0}.{1}.{2}") << mixVersion->major << mixVersion->minor << mixVersion->patch);
		const SDL_version* ttfVersion = TTF_Linked_Version();
		console.printLine(Format("SDL_ttf version: {0}.{1}.{2}") << ttfVersion->major << ttfVersion->minor << ttfVersion->patch);

		Console::registerBasicCommands(console);
		ConsoleCommands::registerCommands(console, service, menu, gameSettings);

		Math::initialize();

		console.printLine("\n===Font initialization===");
		font.load(D6_FILE_TTF_FONT, console);

		video.initialize(APP_NAME, APP_FILE_ICON, console);
		menu.initialize();

		gameResources = std::make_unique<GameResources>(service);
		game = std::make_unique<Game>(service, *gameResources, gameSettings);
		menu.setGameReference(game.get());

		for (Weapon weapon : Weapon::values())
		{
			gameSettings.enableWeapon(weapon, true);
		}

		// Execute config script and command line arguments
		console.printLine("\n===Config===");
		console.exec(std::string("exec ") + D6_FILE_CONFIG);

		for (int i = 1; i < argc; i++)
		{
			console.exec(argv[i]);
		}
	}
Exemplo n.º 6
0
void Renderer::PrintSDL_TTFVersion()
{
	SDL_version compile_version;
	SDL_TTF_VERSION(&compile_version);

	const SDL_version *link_version = TTF_Linked_Version();

	printf("Compiled with SDL_ttf version: %d.%d.%d\n",
			compile_version.major,
			compile_version.minor,
			compile_version.patch);
	printf("Running with SDL_ttf version: %d.%d.%d\n",
			link_version->major,
			link_version->minor,
			link_version->patch);
}
Exemplo n.º 7
0
void Window::showDebugInfo()
{
	// TODO: add information about versions added in compilation proces
	printf("Compiled with GCC version: %s\n", __VERSION__);

	const SDL_version* sdlVersion = SDL_Linked_Version();
	printf("Running with SDL version: %u.%u.%u\n", sdlVersion->major, sdlVersion->minor, sdlVersion->patch);

	const SDL_version* imageVersion = IMG_Linked_Version();
	printf("Running with SDL_image version: %u.%u.%u\n", imageVersion->major, imageVersion->minor, imageVersion->patch);

	const SDL_version* ttfVersion = TTF_Linked_Version();
	printf("Running with SDL_ttf version: %u.%u.%u\n", ttfVersion->major, ttfVersion->minor, ttfVersion->patch);

	const SDL_version* mixerVersion = Mix_Linked_Version();
	printf("Running with SDL_mixer version: %u.%u.%u\n", mixerVersion->major, mixerVersion->minor, mixerVersion->patch);
}
Exemplo n.º 8
0
/*fa MTR_TtfInit yes */
MTR_DCLSPC bool MTR_CALL MTR_TtfInit(uint32_t dmSize, uint32_t reservedCount)
{
    SDL_version        compiled;
    const SDL_version *linked;

    MTR_LogWrite("Initializing TTF font manager", 0, MTR_LMT_INFO);

    MTR_LogWrite("Reporting SDL_ttf compile-time version:", 1, MTR_LMT_INFO);
    SDL_TTF_VERSION(&compiled);
    MTR_LogWrite_i("Major:", 2, MTR_LMT_INFO, compiled.major);
    MTR_LogWrite_i("Minor:", 2, MTR_LMT_INFO, compiled.minor);
    MTR_LogWrite_i("Patch:", 2, MTR_LMT_INFO, compiled.patch);
    MTR_LogWrite("Reporting SDL_ttf linked version:", 1, MTR_LMT_INFO);
    linked = TTF_Linked_Version();
    MTR_LogWrite_i("Major:", 2, MTR_LMT_INFO, linked->major);
    MTR_LogWrite_i("Minor:", 2, MTR_LMT_INFO, linked->minor);
    MTR_LogWrite_i("Patch:", 2, MTR_LMT_INFO, linked->patch);

    tempSurface = NULL;
    tempPixels = NULL;

    if(TTF_Init() != 0)
    {
        MTR_LogWrite("Unable to initialize SDL_ttf", 1, MTR_LMT_INFO);
        return false;
    }

    mtrTtfKeeper = (mtrIndexkeeper_t *)MTR_IndexkeeperCreate(dmSize,
     reservedCount, sizeof(mtrTtf_t));
    if (mtrTtfKeeper == NULL)
    {
        MTR_Notify("Unable to initialize texture manager", 1, MTR_LMT_ERROR);
        TTF_Quit();
        return false;
    }
    else
        MTR_LogWrite("TTF font manager initialized", 0, MTR_LMT_INFO);

    mtrTtfInited = true;
    return true;
}
Exemplo n.º 9
0
TTF_system::TTF_system()
{
  SDL_version compiled;

  SDL_TTF_VERSION(&compiled);
  SDL_version const* linked = TTF_Linked_Version();

  log_status(log_scope::ENGINE, log_line_seperator);
  log_status(log_scope::ENGINE, "Compiled against SDL_ttf version {}.{}.{}",
    (unsigned)compiled.major, (unsigned)compiled.minor, (unsigned)compiled.patch);
  log_status(log_scope::ENGINE, "Linked against SDL_ttf version {}.{}.{}",
    (unsigned)linked->major, (unsigned)linked->minor, (unsigned)linked->patch);
  log_status(log_scope::ENGINE, log_line_seperator);

  if(TTF_Init() != 0)
  {
    log_error(log_scope::ENGINE, "Error initializing SDL_ttf: {}", TTF_GetError());
    SDL_ClearError();
    throw fatal_construction_exception{};
  }
}
Exemplo n.º 10
0
int main(int argc, char *argv[])
{
  (void) argc;
  (void) argv;

  if (SDL_Init(SDL_INIT_EVERYTHING) == -1)
    std::cout << "Failed to initialize SDL" << SDL_GetError() << std::endl;
  std::cout << "Hello SDL!" << std::endl;

  // Display SDL version information
  SDL_version compiled;
  SDL_version linked;
  SDL_VERSION(&compiled);
  SDL_GetVersion(&linked);
  logSDLVersion(std::cout, "SDL", compiled, linked, SDL_GetRevision());


  // Initialize SDL_image and display version information
  int imgFlags = IMG_INIT_PNG | IMG_INIT_JPG;
  int imgFlagsInit = IMG_Init(imgFlags);
  if ((imgFlagsInit & imgFlags) != imgFlags)
    std::cout << "Failed to initialize SDL_image:"
              << IMG_GetError() << std::endl;
  std::cout << "Hello SDL_image!" << std::endl;
  SDL_IMAGE_VERSION(&compiled);
  logSDLVersion(std::cout, "SDL_image", compiled, *IMG_Linked_Version(), "");


  // Initialize SDL_mixer and display version information
  int mixFlags = MIX_INIT_OGG;
  int mixFlagsInit = Mix_Init(mixFlags);
  if ((mixFlagsInit & mixFlags) != mixFlags) {
    std::cout << "Failed to initialize SDL_mixer"
              << Mix_GetError() << std::endl;
  }
  if (Mix_OpenAudio(22050, MIX_DEFAULT_FORMAT, 2, 1024) == -1) {
    std::cout << "Failed to acquire sound device"
              << Mix_GetError() << std::endl;
  }
  std::cout << "Hello SDL_mixer!" << std::endl;
  SDL_MIXER_VERSION(&compiled);
  logSDLVersion(std::cout, "SDL_mixer", compiled, *Mix_Linked_Version(), "");
  logSDLMixerMediaInfo(std::cout);


  // Initialize SDL_mixer and display version information
  if (TTF_Init() != 0)
    std::cout << "Failed to initialize SDL_ttf:"
              << SDL_GetError() << std::endl;
  std::cout << "Hello SDL_ttf!" << std::endl;
  SDL_TTF_VERSION(&compiled);
  logSDLVersion(std::cout, "SDL_ttf", compiled, *TTF_Linked_Version(), "");


  // Create a window and OpenGL glContext using SDL and GLEW
  SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK,
                      SDL_GL_CONTEXT_PROFILE_CORE);
  SDL_Window* window = SDL_CreateWindow("SDL Window",
                                        SDL_WINDOWPOS_UNDEFINED,
                                        SDL_WINDOWPOS_UNDEFINED,
                                        640, 480,
                                        SDL_WINDOW_SHOWN | SDL_WINDOW_OPENGL);
  SDL_GLContext glContext = nullptr;
  const std::pair<int, int> glVersions[11]
     {{4, 4}, {4, 3}, {4, 2}, {4, 1}, {4, 0},
      {3, 3}, {3, 2}, {3, 1}, {3, 0},
      {2, 1}, {2, 0}
  };
  const std::string glName = "OpenGL";
  for (auto& glVersion : glVersions) {
    std::cout << "Trying to create " << glName << " " << glVersion.first << "."
              << glVersion.second << " glContext" << std::endl;
    SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, glVersion.first);
    SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, glVersion.second);
    glContext = SDL_GL_CreateContext(window);
    if (glContext != nullptr)
      break;
  }
  if (glContext == nullptr)
    std::cout << "Failed to create OpenGL Context " << std::endl;

  bool isOk = SDL_GL_MakeCurrent(window, glContext) <= 0;
  if (!isOk)
    std::cout << "Failed to set OpenGL context" << SDL_GetError() << std::endl;

  glewExperimental = true;
  if (glewInit() != GLEW_OK)
    std::cout << "Failed to initialize GLEW" << std::endl;

  logAcquiredGlVersion(std::cout, glName);
  logOpenGLContextInfo(std::cout);
  logGraphicsDriverInfo(std::cout);

  glClearColor(0.1f, 0.2f, 0.3f, 1.0f);
  glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
  SDL_GL_SwapWindow(window);

  // Wait for user event before closing
  bool isRunning = true;
  SDL_Event event;
  while (isRunning) {
    while (SDL_PollEvent(&event)) {
      if (event.type == SDL_KEYDOWN &&
          event.key.keysym.scancode == SDL_SCANCODE_ESCAPE)
        isRunning = false;
      else if (event.type == SDL_QUIT)
        isRunning = false;
    }

    SDL_Delay(30);
  }

  // Cleanup
  SDL_DestroyWindow(window);
  SDL_GL_DeleteContext(glContext);
  IMG_Quit();
  const int nOpenAudio = Mix_QuerySpec(nullptr, nullptr, nullptr);
  for (int i = 0 ; i < nOpenAudio ; ++i)
    Mix_CloseAudio();
  while (Mix_Init(0))
    Mix_Quit();
  TTF_Quit();
  SDL_Quit();
  return 0;
}
Exemplo n.º 11
0
bool App::Init( bool bFullScreen, unsigned int displayWidth, unsigned int displayHeight )
{
	if( SDL_Init( SDL_INIT_EVERYTHING ) != 0)
	{
		fprintf( stderr, "SDL failed to initialise: %s\n",SDL_GetError() );
		return false;
	}

	printf( "SDL initialised\n" );

	SDL_version compiledVersion;
	SDL_version linkedVersion;
	SDL_VERSION( &compiledVersion );
	SDL_GetVersion( &linkedVersion );
	print_SDL_version( "Compiled against SDL version", compiledVersion );
	print_SDL_version( "Linking against SDL version", linkedVersion );
	SDL_assert_release( (compiledVersion == linkedVersion) );

	int numDisplays = SDL_GetNumVideoDisplays();
	printf( "%d video displays\n", numDisplays );
	for( int i = 0; i < numDisplays; ++i )
	{
		SDL_DisplayMode displayMode;
		if( SDL_GetCurrentDisplayMode(i, &displayMode) != 0 )
		{
			fprintf( stderr, "Failed to get display mode for video display %d: %s", i, SDL_GetError() );
			continue;
		}

		printf( "Display %d: w=%d, h=%d refresh_rate=%d\n", i, displayMode.w, displayMode.h, displayMode.refresh_rate );
   	}

#ifdef GL_ES_VERSION_2_0
	SetGLAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 2);
	SetGLAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 0);
	SetGLAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_ES);
#endif

	const char* title = "SDL Window";
	if( bFullScreen )
	{
	  HP_FATAL_ERROR("Just checking");
		m_pWindow = SDL_CreateWindow( title, SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, 0, 0, SDL_WINDOW_FULLSCREEN_DESKTOP );
	}
	else
	{
	  m_pWindow = SDL_CreateWindow( title, SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, displayWidth, displayHeight, SDL_WINDOW_SHOWN /*| SDL_WINDOW_OPENGL*/ );
	}

	if( !m_pWindow )
	{
		printf( "Failed to create SDL window: %s\n", SDL_GetError() );
		return false;
	}

#ifdef GL_ES_VERSION_2_0
	// Let's see if we can use OpenGL ES 2 on Raspberry Pi
	SDL_GLContext gl_context = SDL_GL_CreateContext(m_pWindow);
	printf("GL_VERSION: "); 
	PrintGLString(GL_VERSION);
	printf("GL_RENDERER: ");
	PrintGLString(GL_RENDERER);
	printf("GL_SHADING_LANGUAGE_VERSION: ");
	PrintGLString(GL_SHADING_LANGUAGE_VERSION);
	printf("GL_EXTENSIONS: ");
	PrintGLString(GL_EXTENSIONS);
	SDL_GL_DeleteContext(gl_context);
#endif

	// SDL2_ttf

	if( TTF_Init() == -1 )
	{
		fprintf( stderr, "Failed to initialise SDL2_ttf: %s\n", TTF_GetError() );
		return false;
	}

	printf( "SDL_ttf initialised\n" );

	SDL_TTF_VERSION( &compiledVersion );
	const SDL_version *pLinkedVersion = TTF_Linked_Version();
	print_SDL_version( "Compiled against SDL_ttf version", compiledVersion );
	print_SDL_version( "Linking against SDL_ttf version", *pLinkedVersion );

	unsigned int logicalWidth = 1280;
	unsigned int logicalHeight = 720;
	m_pRenderer = new Renderer( *m_pWindow, logicalWidth, logicalHeight );

	m_pGame = new Game();

	if( !m_pGame->Init() )
	{
		fprintf( stderr, "ERROR - Game failed to initialise\n" );
		return false;
	}

	return true;
}
Exemplo n.º 12
0
int main(int argc, const char *argv[])
{
    if(argc != 2) {
        printf("%s takes .ttf file as argument.\n", argv[0]);
        return 1;
    }

    SDL_version compile_version;
    const SDL_version *link_version=TTF_Linked_Version();
    SDL_TTF_VERSION(&compile_version);
    printf("compiled with SDL_ttf version: %d.%d.%d\n",
            compile_version.major,
            compile_version.minor,
            compile_version.patch);
    printf("running with SDL_ttf version: %d.%d.%d\n",
            link_version->major,
            link_version->minor,
            link_version->patch);

    if(SDL_Init(SDL_INIT_EVERYTHING) != 0) {
        printf("Error with import!\n");
        return 1;
    }

    SDL_Window *win = SDL_CreateWindow( "TTF Test",
                                        SDL_WINDOWPOS_CENTERED,
                                        SDL_WINDOWPOS_CENTERED,
                                        800,
                                        600,
                                        SDL_WINDOW_SHOWN);

    SDL_Renderer *renderer = SDL_CreateRenderer(win,
                                                -1,
                                                SDL_RENDERER_ACCELERATED |
                                                SDL_RENDERER_PRESENTVSYNC);

    if(TTF_Init() == -1) {
        printf("Error loading TTF_Init()!\n%s\n", TTF_GetError());
        SDL_Quit();
        exit(2);
    }

    TTF_Font *font;
    /* MS Himalaya (himalaya.ttf): http://fontzone.net/font-details/microsoft-himalaya */
    font = TTF_OpenFont(argv[1], 600);

    if(!font) {
        printf("%s\n", TTF_GetError());
        return 1;
    }

    const char tibstring[] = {  0xe0, 0xbd, 0x96,
                                0xe0, 0xbd, 0xa6,
                                0xe0, 0xbe, 0x90,
                                0xe0, 0xbe, 0xb1,
                                0xe0, 0xbd, 0xbc,
                                0xe0, 0xbd, 0x84,
                                0xe0, 0xbd, 0xa6 };

    SDL_Color colour = { 255, 255, 255, 255 };
    SDL_Surface *surface = TTF_RenderUTF8_Solid(font, tibstring, colour);

    if(surface == NULL) {
        TTF_CloseFont(font);
        printf("Surface error!\n");
        return 0;
    }

    SDL_Texture *texture = SDL_CreateTextureFromSurface(renderer, surface);

    SDL_Event event;
    int quit = 0;

    while (!quit) {

        while (SDL_PollEvent(&event)) {
            if (event.type == SDL_QUIT)
                quit = 1;
        }

        SDL_RenderClear(renderer);
        SDL_RenderCopy(renderer, texture, NULL, NULL);
        SDL_RenderPresent(renderer);
    }

    TTF_CloseFont(font);
    SDL_Quit();

    return 0;
}
Exemplo n.º 13
0
// Initialise SDL_ttf.
void I_StartupTTF(UINT32 fontpointsize, Uint32 initflags, Uint32 vidmodeflags)
{
	char *fontpath = NULL;
	INT32 fontstatus = -1;
	res.width = 320;
	res.height = 200;
	bitsperpixel = 8;

	// what's the point of trying to display an error?
	// SDL_ttf is not started, can't display anything to screen (presumably)...
	if (SDL_InitSubSystem(initflags) < 0)
		I_Error("Couldn't initialize SDL: %s\n", SDL_GetError());

	TTFSurface = SDL_SetVideoMode(res.width, res.height, bitsperpixel, vidmodeflags);
	if (!TTFSurface)
		I_Error("Couldn't set SDL Video resolution: %s\n", SDL_GetError());

	if (TTF_Init() < 0)
		I_Error("Couldn't start SDL_ttf: %s\n", TTF_GetError());

	// look for default font in many directories
#ifdef FONTSEARCHPATH1
	fontpath = searchFont(FONTSEARCHPATH1);
	if (fontpath) fontstatus = I_TTFLoadFont(fontpath, fontpointsize);
#endif
#ifdef FONTSEARCHPATH2
	if (fontstatus < 0)
	{
		fontpath = searchFont(FONTSEARCHPATH2);
		if (fontpath) fontstatus = I_TTFLoadFont(fontpath, fontpointsize);
	}
#endif
#ifdef FONTSEARCHPATH3
	if (fontstatus < 0)
	{
		fontpath = searchFont(FONTSEARCHPATH3);
		if (fontpath) fontstatus = I_TTFLoadFont(fontpath, fontpointsize);
	}
#endif
#ifdef FONTSEARCHPATH4
	if (fontstatus < 0)
	{
		fontpath = searchFont(FONTSEARCHPATH4);
		if (fontpath) fontstatus = I_TTFLoadFont(fontpath, fontpointsize);
	}
#endif
#ifdef FONTSEARCHPATH5
	if (fontstatus < 0)
	{
		fontpath = searchFont(FONTSEARCHPATH5);
		if (fontpath) fontstatus = I_TTFLoadFont(fontpath, fontpointsize);
	}
#endif
#ifdef FONTSEARCHPATH6
	if (fontstatus < 0)
	{
		fontpath = searchFont(FONTSEARCHPATH6);
		if (fontpath) fontstatus = I_TTFLoadFont(fontpath, fontpointsize);
	}
#endif
#ifdef FONTSEARCHPATH7
	if (fontstatus < 0)
	{
		fontpath = searchFont(FONTSEARCHPATH7);
		if (fontpath) fontstatus = I_TTFLoadFont(fontpath, fontpointsize);
	}
#endif
	// argh! no font file found! disable SDL_ttf code
	if (fontstatus < 0)
	{
		I_ShutdownTTF();
		CONS_Printf("Unable to find default font files! Not loading SDL_ttf\n");
	}
	else
	{
		// Get SDL_ttf compiled and linked version
		SDL_version TTFcompiled;
		const SDL_version *TTFlinked;

		SDL_TTF_VERSION(&TTFcompiled);
		TTFlinked = TTF_Linked_Version();

		// Display it on screen
		CONS_Printf("Compiled for SDL_ttf version: %d.%d.%d\n",
			    TTFcompiled.major, TTFcompiled.minor, TTFcompiled.patch);
		CONS_Printf("Linked with SDL_ttf version: %d.%d.%d\n",
			    TTFlinked->major, TTFlinked->minor, TTFlinked->patch);
	}
}