summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3255b08)
raw | patch | inline | side by side (parent: 3255b08)
author | fgsfds <pvt.fgsfds@gmail.com> | |
Sat, 26 Aug 2017 14:27:19 +0000 (17:27 +0300) | ||
committer | fgsfds <pvt.fgsfds@gmail.com> | |
Sat, 26 Aug 2017 14:27:19 +0000 (17:27 +0300) |
src/game/g_game.pas | patch | blob | history | |
src/game/g_gfx.pas | patch | blob | history |
diff --git a/src/game/g_game.pas b/src/game/g_game.pas
index 24f6324b56bc27a00db40c43d9dce0f735cfc26b..b198947e145dffab6b26a56ae1591635a59cfb39 100644 (file)
--- a/src/game/g_game.pas
+++ b/src/game/g_game.pas
gExit := 0;
end;
+procedure drawTime(X, Y: Integer); inline;
+begin
+ e_TextureFontPrint(x, y,
+ Format('%d:%.2d:%.2d', [
+ gTime div 1000 div 3600,
+ (gTime div 1000 div 60) mod 60,
+ gTime div 1000 mod 60
+ ]),
+ gStdFont);
+end;
+
procedure DrawStat();
var
pc, x, y, w, h: Integer;
e_DrawFillQuad(x, y, x+w-1, y+h-1, 64, 64, 64, 32);
e_DrawQuad(x, y, x+w-1, y+h-1, 255, 127, 0);
+ drawTime(x+w-78, y+8);
+
wad := g_ExtractWadNameNoPath(gMapInfo.Map);
map := g_ExtractFileName(gMapInfo.Map);
mapstr := wad + ':\' + map + ' - ' + gMapInfo.Name;
end;
if gGameOn and gShowTime and (gGameSettings.GameType in [GT_CUSTOM, GT_SERVER, GT_CLIENT]) then
- e_TextureFontPrint(gScreenWidth-72, 0,
- Format('%d:%.2d:%.2d', [gTime div 1000 div 3600, (gTime div 1000 div 60) mod 60, gTime div 1000 mod 60]),
- gStdFont);
+ drawTime(gScreenWidth-72, gScreenHeight-16);
if gGameOn then drawProfilers();
end;
diff --git a/src/game/g_gfx.pas b/src/game/g_gfx.pas
index e74ddcc9068093eaf900b17ff7fed59c53d083d8..b137db3ee26bc1936bcb9729329e48deb621d072 100644 (file)
--- a/src/game/g_gfx.pas
+++ b/src/game/g_gfx.pas
procedure g_GFX_Init();
begin
//CreateCollideMap();
+{$IFDEF HEADLESS}
+ gpart_dbg_enabled := False;
+{$ENDIF}
end;
DevY1, DevY2: Byte;
l: Integer;
begin
+ if not gpart_dbg_enabled then Exit;
l := Length(Particles);
if l = 0 then exit;
if Count > l then Count := l;
CRnd: Byte;
CC: SmallInt;
begin
+ if not gpart_dbg_enabled then Exit;
if Kind = BLOOD_SPARKS then
begin
g_GFX_SparkVel(fX, fY, 2 + Random(2), -VX div 2, -VY div 2, DevX, DevY);
BaseVelX, BaseVelY: Single;
l: Integer;
begin
+ if not gpart_dbg_enabled then Exit;
l := Length(Particles);
if l = 0 then
Exit;
DevY1, DevY2: Byte;
l: Integer;
begin
+ if not gpart_dbg_enabled then Exit;
l := Length(Particles);
if l = 0 then
Exit;
a: Integer;
l: Integer;
begin
+ if not gpart_dbg_enabled then Exit;
l := Length(Particles);
if l = 0 then
Exit;
DevY1, DevY2: Byte;
l, liquidx: Integer;
begin
+ if not gpart_dbg_enabled then Exit;
l := Length(Particles);
if l = 0 then
Exit;
@@ -1534,6 +1543,7 @@ procedure g_GFX_OnceAnim(X, Y: Integer; Anim: TAnimation; AnimType: Byte = 0);
var
find_id: DWORD;
begin
+ if not gpart_dbg_enabled then Exit;
if Anim = nil then
Exit;