wadreader in '../shared/wadreader.pas',
MAPDEF in '../shared/MAPDEF.pas',
CONFIG in '../shared/CONFIG.pas',
+ g_base in 'g_base.pas',
g_basic in 'g_basic.pas',
g_console in 'g_console.pas',
g_net in 'g_net.pas',
--- /dev/null
+(* Copyright (C) Doom 2D: Forever Developers
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, version 3 of the License ONLY.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *)
+{$INCLUDE ../shared/a_modes.inc}
+unit g_base;
+
+interface
+
+ 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;
+
+ PPoint2f = ^TPoint2f;
+ PRect = ^TRect;
+ PRectWH = ^TRectWH;
+
+ 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;
+
+implementation
+
+ 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;
+
+end.
uses
SysUtils, Classes,
MAPDEF,
- g_basic, g_player, r_graphics, g_res_downloader,
+ g_base, g_basic, g_player, r_graphics, g_res_downloader,
g_sound, g_gui, utils, md5, mempool, xprofiler,
g_touch, g_weapons;
uses
{$IFDEF USE_MEMPOOL}mempool,{$ENDIF}
- r_graphics, e_input, e_log, g_playermodel, g_basic, g_touch, MAPDEF, utils;
+ g_base, r_graphics, e_input, e_log, g_playermodel, g_basic, g_touch, MAPDEF, utils;
const
MAINMENU_HEADER_COLOR: TRGB = (R:255; G:255; B:255);
uses
SysUtils, Classes, mempool,
- r_graphics, g_basic, MAPDEF, g_textures,
+ g_base, r_graphics, g_basic, MAPDEF, g_textures,
g_phys, utils, g_panel, g_grid, md5, binheap, xprofiler, xparser, xdynrec;
type
uses
g_gui, g_textures, r_graphics, g_main, g_window, g_game, g_map,
- g_basic, g_console, g_sound, g_gfx, g_player, g_options, g_weapons,
+ g_base, g_basic, g_console, g_sound, g_gfx, g_player, g_options, g_weapons,
e_log, SysUtils, CONFIG, g_playermodel, DateUtils,
MAPDEF, Math, g_saveload,
e_texture, g_language, e_res,
SysUtils, Classes,
mempool,
MAPDEF,
- g_basic, r_graphics, g_phys, g_textures, g_grid,
+ g_base, g_basic, g_phys, g_textures, g_grid,
g_saveload, g_panel, xprofiler;
const
implementation
uses
- Math, ENet, e_input, r_graphics, e_log,
- g_textures, g_gfx, g_sound, g_console, g_basic, g_options, g_main,
+ Math, ENet, e_input, e_log, g_base, g_basic,
+ g_textures, g_gfx, g_sound, g_console, g_options, g_main,
g_game, g_player, g_map, g_panel, g_items, g_weapons, g_phys, g_gui,
g_language, g_monsters, g_netmaster, utils, wadreader, MAPDEF;
interface
-uses
- r_graphics;
+ uses g_base;
type
PObj = ^TObj;
uses
SysUtils, Classes,
{$IFDEF USE_MEMPOOL}mempool,{$ENDIF}
- r_graphics, g_playermodel, g_basic, g_textures,
+ g_base, g_playermodel, g_basic, g_textures,
g_weapons, g_phys, g_sound, g_saveload, MAPDEF,
g_panel;
interface
uses
- MAPDEF, g_textures, g_basic, g_weapons, r_graphics, utils, g_gfx,
+ MAPDEF, g_textures, g_base, g_basic, g_weapons, r_graphics, utils, g_gfx,
ImagingTypes, Imaging, ImagingUtility;
const
uses
SysUtils, Classes,
{$IFDEF USE_MEMPOOL}mempool,{$ENDIF}
- r_graphics, MAPDEF, ImagingTypes, Imaging, ImagingUtility;
+ g_base, r_graphics, MAPDEF, ImagingTypes, Imaging, ImagingUtility;
type
TLevelTexture = record
SysUtils, Classes, Math,
e_log, r_graphics,
conbuf,
- g_main, g_console, g_game, g_menu, g_textures
+ g_base, g_main, g_console, g_game, g_menu, g_textures
;
(* ====== Console ====== *)
g_holmes,
{$ENDIF}
SysUtils, Classes, Math,
- r_graphics,
+ g_base, r_graphics,
g_system, g_touch,
MAPDEF, xprofiler, utils, wadreader,
g_textures, e_input, e_sound,
{$INCLUDE ../nogl/noGLuses.inc}
SysUtils, Classes, Math,
utils,
- r_graphics,
+ g_base, r_graphics,
g_game,
g_gfx
;
{$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;
-
//------------------------------------------------------------------
// прототипы функций
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_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;
SysUtils, Classes, Math,
r_graphics,
MAPDEF,
- g_basic, g_game,
+ g_base, g_basic, g_game,
g_items
;
{$INCLUDE ../nogl/noGLuses.inc}
SysUtils, Classes, Math,
r_graphics,
- g_basic, g_game, g_options,
+ g_base, g_basic, g_game, g_options,
g_panel, g_map,
r_panel
;
SysUtils, Classes, Math,
r_graphics,
MAPDEF,
- g_basic, g_game, g_phys,
+ g_base, g_basic, g_game, g_phys,
g_monsters
;
{$INCLUDE ../nogl/noGLuses.inc}
SysUtils, Classes, Math, utils,
r_graphics,
- g_basic, g_textures, g_game
+ g_base, g_basic, g_textures, g_game
;
procedure Panel_Lerp (p: TPanel; t: Single; out tX, tY, tW, tH: Integer);
interface
- uses g_player, r_graphics; // TPlayer, TRGB
+ uses g_player, g_base; // TPlayer, TRGB
procedure r_Player_DrawAll;
procedure r_Player_DrawDebug (p: TPlayer);
{$IFDEF ENABLE_HOLMES}
g_holmes,
{$ENDIF}
- r_playermodel
+ r_playermodel, r_graphics
;
procedure r_Player_DrawAll;
SysUtils, Classes, Math,
MAPDEF,
r_graphics,
- g_basic, g_map, g_weapons, g_textures, g_main
+ g_base, g_basic, g_map, g_weapons, g_textures, g_main
;
const
SysUtils, Classes, Math,
MAPDEF,
r_graphics,
- g_basic, g_game,
+ g_base, g_basic, g_game,
g_weapons
;