From: DeaDDooMER Date: Mon, 17 Jan 2022 17:16:31 +0000 (+0300) Subject: game: remove unneded render imports X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;h=abda6900c041e39944de6a49aa088a60c170715e;p=d2df-sdl.git game: remove unneded render imports --- diff --git a/src/game/g_gfx.pas b/src/game/g_gfx.pas index 29b9c22..00630f3 100644 --- a/src/game/g_gfx.pas +++ b/src/game/g_gfx.pas @@ -125,7 +125,7 @@ function awmIsSetHolmes (x, y: Integer): Boolean; inline; implementation uses - g_map, g_panel, g_basic, Math, r_animations, + g_map, g_panel, g_basic, Math, g_options, g_console, SysUtils, g_triggers, MAPDEF, g_game, g_language, g_net, utils, xprofiler; diff --git a/src/game/g_items.pas b/src/game/g_items.pas index dcc8b0f..6bb5070 100644 --- a/src/game/g_items.pas +++ b/src/game/g_items.pas @@ -90,7 +90,7 @@ implementation uses Math, - g_basic, g_sound, g_gfx, g_map, r_animations, r_gfx, + g_basic, g_sound, g_gfx, g_map, r_gfx, g_game, g_triggers, g_console, g_player, g_net, g_netmsg, e_log, g_options, g_grid, binheap, idpool, utils, xstreams; diff --git a/src/game/g_map.pas b/src/game/g_map.pas index c5afc78..0e31b25 100644 --- a/src/game/g_map.pas +++ b/src/game/g_map.pas @@ -20,7 +20,7 @@ interface uses SysUtils, Classes, mempool, - g_base, r_graphics, g_basic, MAPDEF, g_textures, + g_base, g_basic, MAPDEF, g_textures, g_phys, utils, g_panel, g_grid, md5, binheap, xprofiler, xparser, xdynrec; type @@ -248,7 +248,7 @@ implementation uses e_input, e_log, e_res, g_items, g_gfx, g_console, g_weapons, g_game, g_sound, e_sound, CONFIG, - g_options, g_triggers, g_player, r_textures, r_animations, + g_options, g_triggers, g_player, Math, g_monsters, g_saveload, g_language, g_netmsg, sfs, xstreams, hashtable, wadreader, g_res_downloader; diff --git a/src/game/g_monsters.pas b/src/game/g_monsters.pas index e3b99d2..3b1aad7 100644 --- a/src/game/g_monsters.pas +++ b/src/game/g_monsters.pas @@ -521,7 +521,7 @@ var implementation uses - e_log, g_sound, g_gfx, g_player, g_game, r_textures, r_animations, r_gfx, + e_log, g_sound, g_gfx, g_player, g_game, r_gfx, g_weapons, g_triggers, g_items, g_options, g_console, g_map, Math, g_menu, wadreader, g_language, g_netmsg, idpool, utils, xstreams; diff --git a/src/game/g_netmsg.pas b/src/game/g_netmsg.pas index 1fdad22..d88e6af 100644 --- a/src/game/g_netmsg.pas +++ b/src/game/g_netmsg.pas @@ -276,7 +276,7 @@ function IsValidFilePath(const S: String): Boolean; implementation uses - Math, ENet, e_input, e_log, g_base, g_basic, r_animations, r_gfx, + Math, ENet, e_input, e_log, g_base, g_basic, r_gfx, g_textures, g_gfx, g_sound, g_console, g_options, 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; diff --git a/src/game/g_player.pas b/src/game/g_player.pas index 070ca33..92afc63 100644 --- a/src/game/g_player.pas +++ b/src/game/g_player.pas @@ -23,7 +23,7 @@ uses {$IFDEF USE_MEMPOOL}mempool,{$ENDIF} g_base, g_playermodel, g_basic, g_textures, g_weapons, g_phys, g_sound, g_saveload, MAPDEF, - g_panel, r_playermodel; + g_panel; const KEY_LEFT = 1; @@ -627,7 +627,7 @@ uses {$IFDEF ENABLE_HOLMES} g_holmes, {$ENDIF} - e_log, g_map, g_items, g_console, g_gfx, Math, r_textures, r_animations, r_gfx, + e_log, g_map, g_items, g_console, g_gfx, Math, r_playermodel, r_gfx, g_options, g_triggers, g_menu, g_game, g_grid, e_res, wadreader, g_monsters, CONFIG, g_language, g_net, g_netmsg, diff --git a/src/game/g_playermodel.pas b/src/game/g_playermodel.pas index e2db8d4..1424015 100644 --- a/src/game/g_playermodel.pas +++ b/src/game/g_playermodel.pas @@ -18,9 +18,7 @@ unit g_playermodel; interface -uses - MAPDEF, g_textures, g_base, g_basic, g_weapons, r_graphics, utils, g_gfx, - ImagingTypes, Imaging, ImagingUtility; + uses MAPDEF, g_textures, g_base, g_basic, g_weapons, utils, g_gfx; const A_STAND = 0; @@ -168,7 +166,7 @@ function g_PlayerModel_GetIndex (ModelName: String): Integer; implementation uses - g_sound, g_console, SysUtils, g_player, CONFIG, r_textures, r_animations, + g_sound, g_console, SysUtils, g_player, CONFIG, e_sound, g_options, g_map, Math, e_log, wadreader; const @@ -297,65 +295,6 @@ end; end; end; -function g_PlayerModel_CalcGibSize (pData: Pointer; dataSize, x, y, w, h: Integer): TRectWH; - var i, j: Integer; done: Boolean; img: TImageData; - - function IsVoid (i, j: Integer): Boolean; - begin - result := Byte((PByte(img.bits) + (y+j)*img.width*4 + (x+i)*4 + 3)^) = 0 - end; - -begin - InitImage(img); - assert(LoadImageFromMemory(pData, dataSize, img)); - - (* trace x from right to left *) - done := false; i := 0; - while not done and (i < w) do - begin - j := 0; - while (j < h) and IsVoid(i, j) do inc(j); - done := (j < h) and (IsVoid(i, j) = false); - result.x := i; - inc(i); - end; - - (* trace y from up to down *) - done := false; j := 0; - while not done and (j < h) do - begin - i := 0; - while (i < w) and IsVoid(i, j) do inc(i); - done := (i < w) and (IsVoid(i, j) = false); - result.y := j; - inc(j); - end; - - (* trace x from right to left *) - done := false; i := w - 1; - while not done and (i >= 0) do - begin - j := 0; - while (j < h) and IsVoid(i, j) do inc(j); - done := (j < h) and (IsVoid(i, j) = false); - result.width := i - result.x + 1; - dec(i); - end; - - (* trace y from down to up *) - done := false; j := h - 1; - while not done and (j >= 0) do - begin - i := 0; - while (i < w) and IsVoid(i, j) do inc(i); - done := (i < w) and (IsVoid(i, j) = false); - result.height := j - result.y + 1; - dec(j); - end; - - FreeImage(img); -end; - function g_PlayerModel_Load(FileName: string): Boolean; var ID: DWORD; diff --git a/src/game/g_textures.pas b/src/game/g_textures.pas index ae951fc..8190ea3 100644 --- a/src/game/g_textures.pas +++ b/src/game/g_textures.pas @@ -20,7 +20,7 @@ interface uses SysUtils, Classes, {$IFDEF USE_MEMPOOL}mempool,{$ENDIF} - g_base, r_graphics, MAPDEF, ImagingTypes, Imaging, ImagingUtility; + g_base, MAPDEF; type TLevelTexture = record @@ -79,7 +79,7 @@ type implementation uses - g_game, e_log, g_basic, g_console, wadreader, r_animations, + g_game, e_log, g_basic, g_console, wadreader, g_language, utils, xstreams; constructor TAnimationState.Create (aloop: Boolean; aspeed: Byte; len: Integer); diff --git a/src/game/g_triggers.pas b/src/game/g_triggers.pas index 3c21cfe..64e87c6 100644 --- a/src/game/g_triggers.pas +++ b/src/game/g_triggers.pas @@ -103,7 +103,7 @@ implementation uses Math, - g_player, g_map, g_panel, g_gfx, g_game, r_animations, r_gfx, + g_player, g_map, g_panel, g_gfx, g_game, r_gfx, g_console, g_monsters, g_items, g_phys, g_weapons, wadreader, e_log, g_language, e_res, g_options, g_net, g_netmsg, utils, xparser, xstreams; diff --git a/src/game/g_weapons.pas b/src/game/g_weapons.pas index 1ffbdf6..6e555a4 100644 --- a/src/game/g_weapons.pas +++ b/src/game/g_weapons.pas @@ -112,7 +112,7 @@ implementation uses Math, g_map, g_player, g_gfx, g_sound, g_panel, - g_console, g_options, g_game, r_textures, r_animations, r_gfx, + g_console, g_options, g_game, r_gfx, g_triggers, MAPDEF, e_log, g_monsters, g_saveload, g_language, g_netmsg, g_grid, geom, binheap, hashtable, utils, xstreams;