summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: fe8b553)
raw | patch | inline | side by side (parent: fe8b553)
author | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Mon, 4 Feb 2019 18:51:00 +0000 (21:51 +0300) | ||
committer | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Sun, 10 Feb 2019 10:05:11 +0000 (13:05 +0300) |
src/game/g_menu.pas | patch | blob | history | |
src/nogl/noGLALSW.inc | patch | blob | history | |
src/wrappers/sdl2/sdl2allegro.inc | patch | blob | history |
diff --git a/src/game/g_menu.pas b/src/game/g_menu.pas
index 5df0bf1c4e849834f638a8653252f38c0cd24cc9..d720619bed89ae2a073e34c8481e968ed1a6e871 100644 (file)
--- a/src/game/g_menu.pas
+++ b/src/game/g_menu.pas
begin
menu := TGUIMenu(g_GUI_GetWindow('OptionsVideoMenu').GetControl('mOptionsVideoMenu'));
- if TGUISwitch(menu.GetControl('swBPP')).ItemIndex = 0 then
- gBPP := 16
- else
- gBPP := 32;
+ case TGUISwitch(menu.GetControl('swBPP')).ItemIndex of
+ 0: gBPP := 8;
+ 1: gBPP := 15;
+ 2: gBPP := 16;
+ 3: gBPP := 24;
+ 4: gBPP := 32;
+ else gBPP := 32
+ end;
ovs := gVSync;
gVSync := TGUISwitch(menu.GetControl('swVSync')).ItemIndex = 0;
menu := TGUIMenu(g_GUI_GetWindow('OptionsVideoMenu').GetControl('mOptionsVideoMenu'));
with TGUISwitch(menu.GetControl('swBPP')) do
- if gBPP = 16 then
- ItemIndex := 0
- else
- ItemIndex := 1;
+ case gBPP of
+ 8: ItemIndex := 0;
+ 15: ItemIndex := 1;
+ 16: ItemIndex := 2;
+ 24: ItemIndex := 3;
+ 32: ItemIndex := 4;
+ else ItemIndex := 4
+ end;
with TGUISwitch(menu.GetControl('swTextureFilter')) do
if gTextureFilter then ItemIndex := 0 else ItemIndex := 1;
with AddSwitch(_lc[I_MENU_VIDEO_BPP]) do
begin
Name := 'swBPP';
+ AddItem('8');
+ AddItem('15');
AddItem('16');
+ AddItem('24');
AddItem('32');
end;
with AddSwitch(_lc[I_MENU_VIDEO_VSYNC]) do
diff --git a/src/nogl/noGLALSW.inc b/src/nogl/noGLALSW.inc
index bec8350941184b5f5453209c1d24a4a9cc462864..e06b9c3f2b3d6af2221424b7157dc03c59dc0da1 100644 (file)
--- a/src/nogl/noGLALSW.inc
+++ b/src/nogl/noGLALSW.inc
BLEND_DEFAULT:
begin
(* FIX texture colorize *)
- if DEFAULT_DEPTH <= 8 then
+ if sdl2allegro_bpp <= 8 then
begin
drawing_mode(DRAW_MODE_SOLID, nil, 0, 0)
end
p := pixels;
if format = GL_RGBA then
begin
- if DEFAULT_DEPTH <= 8 then
+ if sdl2allegro_bpp <= 8 then
trans := 0
else
trans := makeacol(255, 0, 255, 0);
p := pixels;
if format = GL_RGBA then
begin
- if DEFAULT_DEPTH <= 8 then
+ if sdl2allegro_bpp <= 8 then
trans := 0
else
trans := makeacol(255, 0, 255, 0);
index 9f146dd5b9a9e6c85663cb90c21ecac6a0bdd7a4..a1f73934c7c901be5ae95760a0b7ccddcc8f4bb1 100644 (file)
{$I sdlpixels.inc}
{$I sdlscancode.inc}
- const
- DEFAULT_DEPTH = 8;
-
const
SDL_HAT_CENTERED = $00;
SDL_HAT_UP = $01;
var
sdl2allegro_screen: PBITMAP;
+ sdl2allegro_bpp: Integer;
/// FUNCTIONS ///
{$IFDEF GO32V2}
go32,
{$ENDIF}
- e_Log, SysUtils, ctypes;
+ e_Log, g_options, SysUtils, ctypes;
const
maxKeyBuffer = 64;
mode := GFX_AUTODETECT_WINDOWED;
{$ENDIF}
- set_color_depth(DEFAULT_DEPTH);
+ sdl2allegro_bpp := gBPP;
+ set_color_depth(sdl2allegro_bpp);
if set_gfx_mode(mode, w, h, 0, 0) = 0 then
begin
new(window);
mode := GFX_AUTODETECT_WINDOWED;
{$ENDIF}
- set_color_depth(DEFAULT_DEPTH);
+ set_color_depth(sdl2allegro_bpp);
if set_gfx_mode(mode, window.w, window.h, 0, 0) = 0 then
begin
if sdl2allegro_screen <> nil then
begin
e_LogWritefln('SDL_SetWindowSize %s %s', [w, h]);
if window = nil then exit;
- set_color_depth(DEFAULT_DEPTH);
+
+ set_color_depth(sdl2allegro_bpp);
if set_gfx_mode(window.mode, w, h, 0, 0) = 0 then
begin
if sdl2allegro_screen <> nil then