X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Fsdl%2Fg_system.pas;h=117215d8e5eff50a9f64783ed344997f2c27a040;hb=e9689e89adc11f1179ee991bffa4d2be54f6e068;hp=d61dd32687131875cb94971afe76b3e6380e3425;hpb=f8c006bbcbec547e9a3beda8372076a10ed049ae;p=d2df-sdl.git diff --git a/src/game/sdl/g_system.pas b/src/game/sdl/g_system.pas index d61dd32..117215d 100644 --- a/src/game/sdl/g_system.pas +++ b/src/game/sdl/g_system.pas @@ -20,7 +20,6 @@ interface uses Utils; (* --- Utils --- *) - function sys_GetTicks (): Int64; procedure sys_Delay (ms: Integer); (* --- Graphics --- *) @@ -45,9 +44,8 @@ implementation uses SysUtils, SDL, Math, - {$INCLUDE ../nogl/noGLuses.inc} - e_log, r_graphics, e_input, e_sound, - g_options, g_console, g_game, g_menu, g_gui, g_basic; + e_log, e_input, e_sound, + g_options, g_console, g_game, g_basic; const GameTitle = 'Doom 2D: Forever (SDL 1.2, %s)'; @@ -62,11 +60,6 @@ implementation (* --------- Utils --------- *) - function sys_GetTicks (): Int64; - begin - result := SDL_GetTicks() - end; - procedure sys_Delay (ms: Integer); begin SDL_Delay(ms) @@ -74,28 +67,6 @@ implementation (* --------- Graphics --------- *) - function LoadGL: Boolean; - begin - result := true; - {$IFDEF NOGL_INIT} - nogl_Init; - if glRenderToFBO and (not nogl_ExtensionSupported('GL_OES_framebuffer_object')) then - {$ELSE} - if glRenderToFBO and (not Load_GL_ARB_framebuffer_object) then - {$ENDIF} - begin - e_LogWriteln('GL: framebuffer objects not supported; disabling FBO rendering'); - glRenderToFBO := false; - end; - end; - - procedure FreeGL; - begin - {$IFDEF NOGL_INIT} - nogl_Quit(); - {$ENDIF} - end; - function GetTitle (): PChar; var info: AnsiString; begin @@ -125,11 +96,6 @@ implementation screen := SDL_SetVideoMode(w, h, bpp, flags); if screen <> nil then begin - if not LoadGL then - begin - e_LogWriteln('GL: unable to load OpenGL functions', TMsgType.Fatal); - exit; - end; SDL_WM_SetCaption(GetTitle(), nil); gFullScreen := fullscreen; gRC_FullScreen := fullscreen; @@ -436,7 +402,7 @@ implementation if g_dbg_input then e_LogWritefln('Input Debug: SDL_VIDEORESIZE %s %s', [ev.w, ev.h]); if (modeResize = 1) and (@sys_ScreenResize <> nil) then - sys_ScreenResize(ev.w, ev.h); + sys_ScreenResize(ev.w, ev.h) else if modeResize > 1 then InitWindow(ev.w, ev.h, gBPP, gFullscreen) end; @@ -491,10 +457,7 @@ implementation for i := 0 to e_MaxJoys - 1 do RemoveJoystick(i); if screen <> nil then - begin - FreeGL; - SDL_FreeSurface(screen) - end; + SDL_FreeSurface(screen); SDL_Quit end;