X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Fopengl%2Fr_graphics.pas;h=f7b7fd3e299e25af9357defbb18fe5e13da57abd;hb=c89c14b5389074760ba6044f504591047eac64d9;hp=b16bd6fc010d074b8c89cb60be6b5bb5851e5297;hpb=5c816a8e702fd39c65d0928a3315d81e979f30fb;p=d2df-sdl.git diff --git a/src/game/opengl/r_graphics.pas b/src/game/opengl/r_graphics.pas index b16bd6f..f7b7fd3 100644 --- a/src/game/opengl/r_graphics.pas +++ b/src/game/opengl/r_graphics.pas @@ -22,39 +22,11 @@ uses {$IFDEF USE_SDL2} SDL2, {$ENDIF} - SysUtils, Classes, Math, e_log, e_texture, + SysUtils, Classes, Math, e_log, e_texture, g_base, MAPDEF, ImagingTypes, Imaging, ImagingUtility; type - TMirrorType=(None, Horizontal, Vertical); - TBlending=(None, Blend, Filter, Invert); - - TPoint2i = record - X, Y: Integer; - end; - - TPoint2f = record - X, Y: Double; - end; - - TRect = record - Left, Top, Right, Bottom: Integer; - end; - - TRectWH = record - X, Y: Integer; - Width, Height: Word; - end; - - TRGB = packed record - R, G, B: Byte; - end; - PDFPoint = ^TDFPoint; - PPoint2f = ^TPoint2f; - PRect = ^TRect; - PRectWH = ^TRectWH; - //------------------------------------------------------------------ // прототипы функций @@ -143,26 +115,15 @@ procedure e_SetGamma(win: PSDL_Window;Gamma: Byte); procedure e_MakeScreenshot(st: TStream; Width, Height: Word); -function _RGB(Red, Green, Blue: Byte): TRGB; -function _Point(X, Y: Integer): TPoint2i; -function _Rect(X, Y: Integer; Width, Height: Word): TRectWH; -function _TRect(L, T, R, B: LongInt): TRect; - //function e_getTextGLId (ID: DWORD): GLuint; var e_Colors: TRGB; - e_NoGraphics: Boolean = False; - e_FastScreenshots: Boolean = true; // it's REALLY SLOW with `false` - g_dbg_scale: Single = 1.0; - r_pixel_scale: Single = 1.0; - implementation uses - paszlib, crc, utils; - + paszlib, crc, utils, g_options; type TTexture = record @@ -1943,36 +1904,6 @@ begin e_TextureFonts := nil; end; -function _RGB(Red, Green, Blue: Byte): TRGB; -begin - Result.R := Red; - Result.G := Green; - Result.B := Blue; -end; - -function _Point(X, Y: Integer): TPoint2i; -begin - Result.X := X; - Result.Y := Y; -end; - -function _Rect(X, Y: Integer; Width, Height: Word): TRectWH; -begin - Result.X := X; - Result.Y := Y; - Result.Width := Width; - Result.Height := Height; -end; - -function _TRect(L, T, R, B: LongInt): TRect; -begin - Result.Top := T; - Result.Left := L; - Result.Right := R; - Result.Bottom := B; -end; - - procedure e_MakeScreenshot (st: TStream; Width, Height: Word); var pixels, obuf, scln, ps, pd: PByte;