summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6d055be)
raw | patch | inline | side by side (parent: 6d055be)
author | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Sun, 19 Feb 2023 14:35:44 +0000 (17:35 +0300) | ||
committer | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Fri, 9 Jun 2023 09:18:01 +0000 (12:18 +0300) |
src/game/g_console.pas | patch | blob | history | |
src/game/g_game.pas | patch | blob | history | |
src/game/renders/opengl/r_render.pas | patch | blob | history |
diff --git a/src/game/g_console.pas b/src/game/g_console.pas
index 3b2f290f6f225808c8810b7d2e16016361dd8824..1f1ed05c4edc1427633688a69f98b7e66269a1e4 100644 (file)
--- a/src/game/g_console.pas
+++ b/src/game/g_console.pas
AddCommand('version', ConsoleCommands);
AddCommand('d_window', DebugCommands);
- AddCommand('d_sounds', DebugCommands);
AddCommand('d_winmsg', DebugCommands);
AddCommand('d_monoff', DebugCommands);
AddCommand('d_botoff', DebugCommands);
diff --git a/src/game/g_game.pas b/src/game/g_game.pas
index 8ad28c2134bae80eb7fd3821bf20aa3841b7537e..a141feb44220f54d4505d4776f4acdac1f426886 100644 (file)
--- a/src/game/g_game.pas
+++ b/src/game/g_game.pas
- (* Copyright (C) Doom 2D: Forever Developers
+(* 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
gRC_FullScreen, gRC_Maximized: Boolean;
gLanguageChange: Boolean = False;
gDebugMode: Boolean = False;
- g_debug_Sounds: Boolean = False;
g_debug_WinMsgs: Boolean = False;
g_debug_MonsterOff: Boolean = False;
g_debug_BotAIOff: Byte = 0;
procedure ClearDebugCvars();
begin
- g_debug_Sounds := False;
g_debug_WinMsgs := False;
g_debug_MonsterOff := False;
g_debug_BotAIOff := 0;
g_Console_Add(Format('gScreenWidth = %d, gScreenHeight = %d', [gScreenWidth, gScreenHeight]));
g_Console_Add(Format('gScreenWidth = %d, gScreenHeight = %d', [gScreenWidth, gScreenHeight]));
end
- else if cmd = 'd_sounds' then
- begin
- if (Length(P) > 1) and
- ((P[1] = '1') or (P[1] = '0')) then
- g_Debug_Sounds := (P[1][1] = '1');
-
- g_Console_Add(Format('d_sounds is %d', [Byte(g_Debug_Sounds)]));
- end
else if cmd = 'd_winmsg' then
begin
if (Length(P) > 1) and
index 44ee5b61da1bdf57a5eb97d9c57113eb57f733f0..0a27c456b8db4a2aff45c27d23771aaea515e24f 100644 (file)
{$ENDIF}
SysUtils, Classes, Math,
g_basic,
+ e_sound, // DebugSound
e_log, e_res, utils, wadreader, mapdef,
g_game, g_map, g_panel, g_options, g_console, g_player, g_weapons, g_language, g_triggers, g_monsters,
g_net, g_netmaster,
FPS, FPSCounter, FPSTime: LongWord;
TakeScreenShot: Boolean;
+ DebugSound: Boolean;
procedure r_Render_LoadTextures;
begin
end;
procedure r_Render_Draw;
- var p1, p2: TPlayer; time: LongWord; pw, ph: Integer;
+ var p1, p2: TPlayer; time: LongWord; pw, ph, i, j: Integer;
begin
if gExit = EXIT_QUIT then
exit;
r_Console_Draw(false);
- // TODO g_debug_Sounds
+ if DebugSound and gGameOn then
+ begin
+ for i := 0 to High(e_SoundsArray) do
+ for j := 0 to e_SoundsArray[i].nRefs do
+ r_Draw_FillRect(i + 100, j + 100, i + 100 + 1, j + 100 + 1, 255, 0, 0, 255);
+ end;
if gShowFPS then
begin
end;
{$ENDIF}
+begin
+ conRegVar('d_sounds', @DebugSound, '', '');
+ DebugSound := false;
end.