summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ba2a21a)
raw | patch | inline | side by side (parent: ba2a21a)
author | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Mon, 18 Jul 2022 00:20:16 +0000 (03:20 +0300) | ||
committer | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Mon, 18 Jul 2022 00:20:16 +0000 (03:20 +0300) |
src/game/g_basic.pas | patch | blob | history | |
src/game/g_main.pas | patch | blob | history |
diff --git a/src/game/g_basic.pas b/src/game/g_basic.pas
index 7df493fe4f248a8fe57ac8fb11da55c9713227b4..1899a12e00fdc245dfcb2094e854c84793a72acf 100644 (file)
--- a/src/game/g_basic.pas
+++ b/src/game/g_basic.pas
function g_GetBuilderName (): AnsiString;
function g_GetBuildHash (full: Boolean = True): AnsiString;
+function g_GetBuildArch (): AnsiString;
function g_CreateUID(UIDType: Byte): Word;
function g_GetUIDType(UID: Word): Byte;
end;
{$POP}
+function g_GetBuildArch (): AnsiString;
+ var cpu, mode, fpu: AnsiString;
+begin
+ {$IF DEFINED(CPUX86_64) OR DEFINED(CPUAMD64) OR DEFINED(CPUX64)}
+ cpu := 'x86_64';
+ {$ELSEIF DEFINED(CPUI386) OR DEFINED(CPU386)}
+ cpu := 'x86';
+ {$ELSEIF DEFINED(CPUI8086)}
+ cpu := 'i8086';
+ {$ELSEIF DEFINED(CPUI64)}
+ cpu := 'Itanium64';
+ {$ELSEIF DEFINED(CPUARM)}
+ cpu := 'ARM';
+ {$ELSEIF DEFINED(CPUAVR)}
+ cpu := 'AVR';
+ {$ELSEIF DEFINED(CPUPOWERPC32)}
+ cpu := 'PowerPC_32';
+ {$ELSEIF DEFINED(CPUPOWERPC64)}
+ cpu := 'PowerPC_64';
+ {$ELSEIF DEFINED(CPUALPHA)}}
+ cpu := 'Alpha';
+ {$ELSEIF DEFINED(CPUSPARC32)}
+ cpu := 'Sparc32';
+ {$ELSEIF DEFINED(CPUM68020)}
+ cpu := 'M68020"
+ {$ELSEIF DEFINED(CPU68K) OR DEFINED(CPUM68K)}
+ cpu := 'm68k"
+ {$ELSEIF DEFINED(CPUSPARC)}
+ cpu := 'unknown-sparc';
+ {$ELSEIF DEFINED(CPUPOWERPC)}
+ cpu := 'unknown-ppc';
+ {$ELSEIF DEFINED(CPU86) OR DEFINED(CPU87)}
+ cpu := 'unknown-intel';
+ {$ELSE}
+ cpu := 'unknown-arch"
+ {$ENDIF}
+
+ {$IF DEFINED(CPU64)}
+ mode := '64-bit';
+ {$ELSEIF DEFINED(CPU32)}
+ mode := '32-bit';
+ {$ELSEIF DEFINED(CPU16)}
+ mode := '16-bit';
+ {$ELSE}
+ mode := 'unknown-mode';
+ {$ENDIF}
+
+ {$IF DEFINED(FPUSOFT)}
+ fpu := 'soft';
+ {$ELSEIF DEFINED(FPUSSE3)}
+ fpu := 'sse3';
+ {$ELSEIF DEFINED(FPUSSE2)}
+ fpu := 'sse2';
+ {$ELSEIF DEFINED(FPUSSE)}
+ fpu := 'sse';
+ {$ELSEIF DEFINED(FPUSSE64)}
+ fpu := 'sse64';
+ {$ELSEIF DEFINED(FPULIBGCC)}
+ fpu := 'libgcc';
+ {$ELSEIF DEFINED(FPU68881)}
+ fpu := '68881';
+ {$ELSEIF DEFINED(FPUVFP)}
+ fpu := 'vfp';
+ {$ELSEIF DEFINED(FPUFPA11)}
+ fpu := 'fpa11';
+ {$ELSEIF DEFINED(FPUFPA10)}
+ fpu := 'fpa10';
+ {$ELSEIF DEFINED(FPUFPA)}
+ fpu := 'fpa';
+ {$ELSEIF DEFINED(FPUX87)}
+ fpu := 'x87';
+ {$ELSEIF DEFINED(FPUITANIUM)}
+ fpu := 'itanium';
+ {$ELSEIF DEFINED(FPUSTANDARD)}
+ fpu := 'standard';
+ {$ELSEIF DEFINED(FPUHARD)}
+ fpu := 'hard';
+ {$ELSE}
+ fpu := 'unknown-fpu';
+ {$ENDIF}
+
+ result := cpu + ' ' + mode + ' ' + fpu;
+end;
+
function g_PatchLength(X1, Y1, X2, Y2: Integer): Word;
begin
Result := Min(Round(Hypot(Abs(X2-X1), Abs(Y2-Y1))), 65535);
diff --git a/src/game/g_main.pas b/src/game/g_main.pas
index 5c458d5159025a8f4b376bb425802b8986f1a877..ad97a79bb5c9182ebe9132632f113f606acb0cd1 100644 (file)
--- a/src/game/g_main.pas
+++ b/src/game/g_main.pas
e_InitLog(LogFileName, TWriteMode.WM_NEWFILE);
e_InitWritelnDriver();
e_WriteLog('Doom 2D: Forever version ' + GAME_VERSION + ' proto ' + IntToStr(NET_PROTOCOL_VER), TMsgType.Notify);
+ e_WriteLog('Build arch: ' + g_GetBuildArch(), TMsgType.Notify);
e_WriteLog('Build date: ' + GAME_BUILDDATE + ' ' + GAME_BUILDTIME, TMsgType.Notify);
e_WriteLog('Build hash: ' + g_GetBuildHash(), TMsgType.Notify);
e_WriteLog('Build by: ' + g_GetBuilderName(), TMsgType.Notify);