Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37730086
en ru br
Репозитории ALT

Группа :: Игры/Прочее
Пакет: scorchwentbonkers

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: scorchwentbonkers-support-16bpp.patch
Скачать


--- scorchwentbonkers-1.1/src/Main.cpp.16bpp	2005-07-24 23:32:12.000000000 +0200
+++ scorchwentbonkers-1.1/src/Main.cpp	2007-02-05 19:56:59.000000000 +0100
@@ -56,14 +56,26 @@
 	
 	set_color_depth(32);
 	request_refresh_rate(100);
+	/* don't convert bitmap's as we don't use the allegro bitmap accept
+	   for loading bitmaps for textures in which case we want to keep
+	   the bitmaps in their native format */
+	set_color_conversion(COLORCONV_NONE);
 	
 	if (set_gfx_mode(GFX_OPENGL, 800, 600, 0, 0) != 0)
 	{
-		allegro_gl_set(AGL_SUGGEST, suggested);
+		/* try again with a 16 bpp colordepth */
+		allegro_gl_set(AGL_COLOR_DEPTH, 16);
+		set_color_depth(16);
 		if (set_gfx_mode(GFX_OPENGL, 800, 600, 0, 0) != 0)
 		{
-			allegro_message("Error setting up display: %s\nPlease adjust settings.ini and set a workable resolution.", allegro_error);
-			exit(-1);
+			/* try again with "any" settings */
+			allegro_gl_set(AGL_SUGGEST, suggested);
+			if (set_gfx_mode(GFX_OPENGL, 800, 600, 0, 0) != 0)
+			{
+				allegro_message("Error setting up display: %s\nPlease adjust settings.ini and set a workable resolution.", allegro_error);
+				exit(-1);
+			}
+			set_color_depth(allegro_gl_get(AGL_COLOR_DEPTH));
 		}
 	};
 	
--- scorchwentbonkers-1.1/src/engine/TextRenderer.cpp.16bpp	2007-02-05 19:55:53.000000000 +0100
+++ scorchwentbonkers-1.1/src/engine/TextRenderer.cpp	2007-02-05 19:57:01.000000000 +0100
@@ -35,9 +35,7 @@
 {
 	TextRenderer *ret = NULL;
 	
-	set_color_conversion(COLORCONV_NONE);
 	BITMAP *fontBMP = load_bitmap(bitmapName, NULL);
-	set_color_conversion(COLORCONV_TOTAL);
 	
 	if (!fontBMP)
 	{
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin