summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 16e6289)
raw | patch | inline | side by side (parent: 16e6289)
author | Ketmar Dark <ketmar@ketmar.no-ip.org> | |
Fri, 18 Aug 2017 23:04:26 +0000 (02:04 +0300) | ||
committer | Ketmar Dark <ketmar@ketmar.no-ip.org> | |
Fri, 18 Aug 2017 23:07:49 +0000 (02:07 +0300) |
src/engine/e_graphics.pas | patch | blob | history | |
src/engine/e_texture.pas | [moved from src/engine/e_textures.pas with 99% similarity] | patch | blob | history |
src/game/Doom2DF.dpr | patch | blob | history | |
src/game/g_gui.pas | patch | blob | history | |
src/game/g_menu.pas | patch | blob | history | |
src/game/g_monsters.pas | patch | blob | history | |
src/game/g_options.pas | patch | blob | history | |
src/game/g_player.pas | patch | blob | history | |
src/shared/a_modes.inc | patch | blob | history | |
src/shared/xprofiler.pas | patch | blob | history |
index 51d6cc3d9a83423bffa83f1390b43e0a0584909f..3ce6890983813bc23af01d68666943658a6609ff 100644 (file)
interface
uses
- SysUtils, Classes, Math, e_log, e_textures, SDL2, GL, GLExt, MAPDEF, ImagingTypes, Imaging, ImagingUtility;
+ SysUtils, Classes, Math, e_log, e_texture, SDL2, GL, GLExt, MAPDEF, ImagingTypes, Imaging, ImagingUtility;
type
TMirrorType=(M_NONE, M_HORIZONTAL, M_VERTICAL);
similarity index 99%
rename from src/engine/e_textures.pas
rename to src/engine/e_texture.pas
index dd2a5355350a949c8844c00ae6dc102f09d89e86..6c348baeef3d8a95551225db70058bc0b8c4c6db 100644 (file)
rename from src/engine/e_textures.pas
rename to src/engine/e_texture.pas
index dd2a5355350a949c8844c00ae6dc102f09d89e86..6c348baeef3d8a95551225db70058bc0b8c4c6db 100644 (file)
+++ b/src/engine/e_texture.pas
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*)
{$INCLUDE ../shared/a_modes.inc}
-unit e_textures;
+unit e_texture;
{ This unit provides interface to load 24-bit and 32-bit uncompressed images
from Truevision Targa (TGA) graphic files, and create OpenGL textures
diff --git a/src/game/Doom2DF.dpr b/src/game/Doom2DF.dpr
index 4123df2e5e01d8d69b15e4f75040e4b8b90528c5..72e2c3b425508cb0a4f58f9a3b3b4be2fea84d8f 100644 (file)
--- a/src/game/Doom2DF.dpr
+++ b/src/game/Doom2DF.dpr
e_input in '../engine/e_input.pas',
e_log in '../engine/e_log.pas',
e_sound in '../engine/e_sound.pas',
- e_textures in '../engine/e_textures.pas',
+ e_texture in '../engine/e_texture.pas',
e_fixedbuffer in '../engine/e_fixedbuffer.pas',
utils in '../shared/utils.pas',
xstreams in '../shared/xstreams.pas',
diff --git a/src/game/g_gui.pas b/src/game/g_gui.pas
index eb068102514c2f030fad1f629875513445b1de64..5c60e10d77ec9a8ce97bea6abc446b984350034d 100644 (file)
--- a/src/game/g_gui.pas
+++ b/src/game/g_gui.pas
public
Proc: procedure;
ProcEx: procedure (sender: TGUITextButton);
- constructor Create(Proc: Pointer; FontID: DWORD; Text: string);
+ constructor Create(aProc: Pointer; FontID: DWORD; Text: string);
destructor Destroy(); override;
procedure OnMessage(var Msg: TMessage); override;
procedure Update(); override;
destructor Destroy; override;
procedure OnMessage(var Msg: TMessage); override;
function AddButton(fProc: Pointer; Caption: string; ShowWindow: string = ''): TGUITextButton;
- function GetButton(Name: string): TGUITextButton;
- procedure EnableButton(Name: string; e: Boolean);
+ function GetButton(aName: string): TGUITextButton;
+ procedure EnableButton(aName: string; e: Boolean);
procedure AddSpace();
procedure Update; override;
procedure Draw; override;
function AddFileList(fText: string; Width, Height: Word): TGUIFileListBox;
function AddMemo(fText: string; Width, Height: Word): TGUIMemo;
procedure ReAlign();
- function GetControl(Name: string): TGUIControl;
- function GetControlsText(Name: string): TGUILabel;
+ function GetControl(aName: string): TGUIControl;
+ function GetControlsText(aName: string): TGUILabel;
procedure Draw; override;
procedure Update; override;
procedure UpdateIndex();
if FShowWindow <> '' then g_GUI_ShowWindow(FShowWindow);
end;
-constructor TGUITextButton.Create(Proc: Pointer; FontID: DWORD; Text: string);
+constructor TGUITextButton.Create(aProc: Pointer; FontID: DWORD; Text: string);
begin
inherited Create();
- Self.Proc := Proc;
+ Self.Proc := aProc;
ProcEx := nil;
FFont := TFont.Create(FontID, FONT_CHAR);
end;
end;
-procedure TGUIMainMenu.EnableButton(Name: string; e: Boolean);
+procedure TGUIMainMenu.EnableButton(aName: string; e: Boolean);
var
a: Integer;
begin
if FButtons = nil then Exit;
for a := 0 to High(FButtons) do
- if (FButtons[a] <> nil) and (FButtons[a].Name = Name) then
+ if (FButtons[a] <> nil) and (FButtons[a].Name = aName) then
begin
if e then FButtons[a].FColor := MAINMENU_ITEMS_COLOR
else FButtons[a].FColor := MAINMENU_UNACTIVEITEMS_COLOR;
end;
end;
-function TGUIMainMenu.GetButton(Name: string): TGUITextButton;
+function TGUIMainMenu.GetButton(aName: string): TGUITextButton;
var
a: Integer;
begin
if FButtons = nil then Exit;
for a := 0 to High(FButtons) do
- if (FButtons[a] <> nil) and (FButtons[a].Name = Name) then
+ if (FButtons[a] <> nil) and (FButtons[a].Name = aName) then
begin
Result := FButtons[a];
Break;
procedure TGUIMenu.Draw;
var
- a, x, y: Integer;
+ a, locx, locy: Integer;
begin
inherited;
if (FIndex <> -1) and (FCounter > MENU_MARKERDELAY div 2) then
begin
- x := 0;
- y := 0;
+ locx := 0;
+ locy := 0;
if FItems[FIndex].Text <> nil then
begin
- x := FItems[FIndex].Text.FX;
- y := FItems[FIndex].Text.FY;
+ locx := FItems[FIndex].Text.FX;
+ locy := FItems[FIndex].Text.FY;
//HACK!
if FItems[FIndex].Text.RightAlign then
begin
- x := x+FItems[FIndex].Text.FMaxWidth-FItems[FIndex].Text.GetWidth;
+ locx := locx+FItems[FIndex].Text.FMaxWidth-FItems[FIndex].Text.GetWidth;
end;
end
else if FItems[FIndex].Control <> nil then
begin
- x := FItems[FIndex].Control.FX;
- y := FItems[FIndex].Control.FY;
+ locx := FItems[FIndex].Control.FX;
+ locy := FItems[FIndex].Control.FY;
end;
- x := x-e_CharFont_GetMaxWidth(FFontID);
+ locx := locx-e_CharFont_GetMaxWidth(FFontID);
- e_CharFont_PrintEx(FFontID, x, y, #16, _RGB(255, 0, 0));
+ e_CharFont_PrintEx(FFontID, locx, locy, #16, _RGB(255, 0, 0));
end;
end;
-function TGUIMenu.GetControl(Name: String): TGUIControl;
+function TGUIMenu.GetControl(aName: String): TGUIControl;
var
a: Integer;
begin
if FItems <> nil then
for a := 0 to High(FItems) do
if FItems[a].Control <> nil then
- if LowerCase(FItems[a].Control.Name) = LowerCase(Name) then
+ if LowerCase(FItems[a].Control.Name) = LowerCase(aName) then
begin
Result := FItems[a].Control;
Break;
end;
- Assert(Result <> nil, 'GUI control "'+Name+'" not found!');
+ Assert(Result <> nil, 'GUI control "'+aName+'" not found!');
end;
-function TGUIMenu.GetControlsText(Name: String): TGUILabel;
+function TGUIMenu.GetControlsText(aName: String): TGUILabel;
var
a: Integer;
begin
if FItems <> nil then
for a := 0 to High(FItems) do
if FItems[a].Control <> nil then
- if LowerCase(FItems[a].Control.Name) = LowerCase(Name) then
+ if LowerCase(FItems[a].Control.Name) = LowerCase(aName) then
begin
Result := FItems[a].Text;
Break;
end;
- Assert(Result <> nil, 'GUI control''s text "'+Name+'" not found!');
+ Assert(Result <> nil, 'GUI control''s text "'+aName+'" not found!');
end;
function TGUIMenu.NewItem: Integer;
diff --git a/src/game/g_menu.pas b/src/game/g_menu.pas
index d8619f34fe0ed793f57a66838edb56f04d193613..0905cdc6ddc78c02cc4ba1f520d23215c2331b30 100644 (file)
--- a/src/game/g_menu.pas
+++ b/src/game/g_menu.pas
g_basic, g_console, g_sound, g_gfx, g_player, g_options, g_weapons,
e_log, SysUtils, CONFIG, g_playermodel, DateUtils,
MAPSTRUCT, wadreader, Math, g_saveload,
- e_textures, GL, GLExt, g_language,
+ e_texture, GL, GLExt, g_language,
g_net, g_netmsg, g_netmaster, g_items, e_input;
index 5ad20cc3ebca983fe4ec16bb848e2943e976ef36..57e3ce96c800185c10684cacf6aac3d6ebaf0473 100644 (file)
--- a/src/game/g_monsters.pas
+++ b/src/game/g_monsters.pas
procedure BFGHit();
procedure Update();
procedure ClientUpdate();
- procedure ClientAttack(wx, wy, tx, ty: Integer);
+ procedure ClientAttack(wx, wy, atx, aty: Integer);
procedure SetDeadAnim;
procedure Draw();
procedure WakeUp();
FAnim[FCurAnim, FDirection].Update();
end;
-procedure TMonster.ClientAttack(wx, wy, tx, ty: Integer);
+procedure TMonster.ClientAttack(wx, wy, atx, aty: Integer);
begin
case FMonsterType of
MONSTER_ZOMBY:
g_Player_CreateShell(wx, wy, 0, -2, SHELL_BULLET);
end;
MONSTER_IMP:
- g_Weapon_ball1(wx, wy, tx, ty, FUID);
+ g_Weapon_ball1(wx, wy, atx, aty, FUID);
MONSTER_CYBER:
- g_Weapon_rocket(wx, wy, tx, ty, FUID);
+ g_Weapon_rocket(wx, wy, atx, aty, FUID);
MONSTER_SKEL:
- g_Weapon_revf(wx, wy, tx, ty, FUID, FTargetUID);
+ g_Weapon_revf(wx, wy, atx, aty, FUID, FTargetUID);
MONSTER_BSP:
- g_Weapon_aplasma(wx, wy, tx, ty, FUID);
+ g_Weapon_aplasma(wx, wy, atx, aty, FUID);
MONSTER_ROBO:
- g_Weapon_plasma(wx, wy, tx, ty, FUID);
+ g_Weapon_plasma(wx, wy, atx, aty, FUID);
MONSTER_MANCUB:
- g_Weapon_manfire(wx, wy, tx, ty, FUID);
+ g_Weapon_manfire(wx, wy, atx, aty, FUID);
MONSTER_BARON, MONSTER_KNIGHT:
- g_Weapon_ball7(wx, wy, tx, ty, FUID);
+ g_Weapon_ball7(wx, wy, atx, aty, FUID);
MONSTER_CACO:
- g_Weapon_ball2(wx, wy, tx, ty, FUID);
+ g_Weapon_ball2(wx, wy, atx, aty, FUID);
end;
end;
diff --git a/src/game/g_options.pas b/src/game/g_options.pas
index 9009078742262d6ccedecc5b19ca7a49cedc9af4..e4dd8875eadb7b4bc62597bf1b4690f950978a10 100644 (file)
--- a/src/game/g_options.pas
+++ b/src/game/g_options.pas
uses
e_log, e_input, g_window, g_sound, g_gfx, g_player, Math,
- g_map, g_net, g_netmaster, SysUtils, CONFIG, g_game, g_main, e_textures,
+ g_map, g_net, g_netmaster, SysUtils, CONFIG, g_game, g_main, e_texture,
g_items, GL, GLExt, wadreader, e_graphics;
procedure g_Options_SetDefault();
diff --git a/src/game/g_player.pas b/src/game/g_player.pas
index b25ef0c59112b5db47fa5258f3b799bb01615735..f4c54db99b1deaa191ea23dd9a5bb92c650ae7bc 100644 (file)
--- a/src/game/g_player.pas
+++ b/src/game/g_player.pas
procedure SetWeapon(W: Byte);
function IsKeyPressed(K: Byte): Boolean;
function GetKeys(): Byte;
- function PickItem(ItemType: Byte; respawn: Boolean; var remove: Boolean): Boolean; virtual;
+ function PickItem(ItemType: Byte; arespawn: Boolean; var remove: Boolean): Boolean; virtual;
function Collide(X, Y: Integer; Width, Height: Word): Boolean; overload;
function Collide(Panel: TPanel): Boolean; overload;
function Collide(X, Y: Integer): Boolean; overload;
function FullInStep(XInc, YInc: Integer): Boolean;
//function NeedItem(Item: Byte): Byte;
procedure SelectWeapon(Dist: Integer);
- procedure SetAIFlag(fName, fValue: String20);
- function GetAIFlag(fName: String20): String20;
- procedure RemoveAIFlag(fName: String20);
+ procedure SetAIFlag(aName, fValue: String20);
+ function GetAIFlag(aName: String20): String20;
+ procedure RemoveAIFlag(aName: String20);
function Healthy(): Byte;
procedure UpdateMove();
procedure UpdateCombat();
procedure TPlayer.ChangeModel(ModelName: string);
var
- Model: TPlayerModel;
+ locModel: TPlayerModel;
begin
- Model := g_PlayerModel_Get(ModelName);
- if Model = nil then Exit;
+ locModel := g_PlayerModel_Get(ModelName);
+ if locModel = nil then Exit;
FModel.Free();
- FModel := Model;
+ FModel := locModel;
end;
procedure TPlayer.SetModel(ModelName: string);
var
f, DidFire: Boolean;
wx, wy, xd, yd: Integer;
- obj: TObj;
+ locobj: TObj;
begin
if g_Game_IsClient then Exit;
// FBFGFireCounter - âðåìÿ ïåðåä âûñòðåëîì (äëÿ BFG)
if R_BERSERK in FRulez then
begin
//g_Weapon_punch(FObj.X+FObj.Rect.X, FObj.Y+FObj.Rect.Y, 75, FUID);
- obj.X := FObj.X+FObj.Rect.X;
- obj.Y := FObj.Y+FObj.Rect.Y;
- obj.rect.X := 0;
- obj.rect.Y := 0;
- obj.rect.Width := 39;
- obj.rect.Height := 52;
- obj.Vel.X := (xd-wx) div 2;
- obj.Vel.Y := (yd-wy) div 2;
- obj.Accel.X := xd-wx;
- obj.Accel.y := yd-wy;
-
- if g_Weapon_Hit(@obj, 50, FUID, HIT_SOME) <> 0 then
+ locobj.X := FObj.X+FObj.Rect.X;
+ locobj.Y := FObj.Y+FObj.Rect.Y;
+ locobj.rect.X := 0;
+ locobj.rect.Y := 0;
+ locobj.rect.Width := 39;
+ locobj.rect.Height := 52;
+ locobj.Vel.X := (xd-wx) div 2;
+ locobj.Vel.Y := (yd-wy) div 2;
+ locobj.Accel.X := xd-wx;
+ locobj.Accel.y := yd-wy;
+
+ if g_Weapon_Hit(@locobj, 50, FUID, HIT_SOME) <> 0 then
g_Sound_PlayExAt('SOUND_WEAPON_HITBERSERK', FObj.X, FObj.Y)
else
g_Sound_PlayExAt('SOUND_WEAPON_MISSBERSERK', FObj.X, FObj.Y);
resetWeaponQueue();
end;
-function TPlayer.PickItem(ItemType: Byte; respawn: Boolean; var remove: Boolean): Boolean;
+function TPlayer.PickItem(ItemType: Byte; arespawn: Boolean; var remove: Boolean): Boolean;
var
a: Boolean;
begin
if g_Game_IsClient then Exit;
// a = true - ìåñòî ñïàâíà ïðåäìåòà:
- a := LongBool(gGameSettings.Options and GAME_OPTION_WEAPONSTAY) and respawn;
+ a := LongBool(gGameSettings.Options and GAME_OPTION_WEAPONSTAY) and arespawn;
remove := not a;
case ItemType of
end;
ITEM_WEAPON_SAW:
- if (not FWeapon[WEAPON_SAW]) or ((not respawn) and (gGameSettings.GameMode in [GM_DM, GM_TDM, GM_CTF])) then
+ if (not FWeapon[WEAPON_SAW]) or ((not arespawn) and (gGameSettings.GameMode in [GM_DM, GM_TDM, GM_CTF])) then
begin
FWeapon[WEAPON_SAW] := True;
Result := True;
procedure TPlayer.NetFire(Wpn: Byte; X, Y, AX, AY: Integer; WID: Integer = -1);
var
- Obj: TObj;
+ locObj: TObj;
F: Boolean;
WX, WY, XD, YD: Integer;
begin
if R_BERSERK in FRulez then
begin
//g_Weapon_punch(FObj.X+FObj.Rect.X, FObj.Y+FObj.Rect.Y, 75, FUID);
- obj.X := FObj.X+FObj.Rect.X;
- obj.Y := FObj.Y+FObj.Rect.Y;
- obj.rect.X := 0;
- obj.rect.Y := 0;
- obj.rect.Width := 39;
- obj.rect.Height := 52;
- obj.Vel.X := (xd-wx) div 2;
- obj.Vel.Y := (yd-wy) div 2;
- obj.Accel.X := xd-wx;
- obj.Accel.y := yd-wy;
-
- if g_Weapon_Hit(@obj, 50, FUID, HIT_SOME) <> 0 then
+ locobj.X := FObj.X+FObj.Rect.X;
+ locobj.Y := FObj.Y+FObj.Rect.Y;
+ locobj.rect.X := 0;
+ locobj.rect.Y := 0;
+ locobj.rect.Width := 39;
+ locobj.rect.Height := 52;
+ locobj.Vel.X := (xd-wx) div 2;
+ locobj.Vel.Y := (yd-wy) div 2;
+ locobj.Accel.X := xd-wx;
+ locobj.Accel.y := yd-wy;
+
+ if g_Weapon_Hit(@locobj, 50, FUID, HIT_SOME) <> 0 then
g_Sound_PlayExAt('SOUND_WEAPON_HITBERSERK', FObj.X, FObj.Y)
else
g_Sound_PlayExAt('SOUND_WEAPON_MISSBERSERK', FObj.X, FObj.Y);
Result := FKeys[Key].Pressed;
end;
-function TBot.GetAIFlag(fName: String20): String20;
+function TBot.GetAIFlag(aName: String20): String20;
var
a: Integer;
begin
Result := '';
- fName := LowerCase(fName);
+ aName := LowerCase(aName);
if FAIFlags <> nil then
for a := 0 to High(FAIFlags) do
- if LowerCase(FAIFlags[a].Name) = fName then
+ if LowerCase(FAIFlags[a].Name) = aName then
begin
Result := FAIFlags[a].Value;
Break;
end;
end;
-procedure TBot.RemoveAIFlag(fName: String20);
+procedure TBot.RemoveAIFlag(aName: String20);
var
a, b: Integer;
begin
if FAIFlags = nil then Exit;
- fName := LowerCase(fName);
+ aName := LowerCase(aName);
for a := 0 to High(FAIFlags) do
- if LowerCase(FAIFlags[a].Name) = fName then
+ if LowerCase(FAIFlags[a].Name) = aName then
begin
if a <> High(FAIFlags) then
for b := a to High(FAIFlags)-1 do
end;
end;
-procedure TBot.SetAIFlag(fName, fValue: String20);
+procedure TBot.SetAIFlag(aName, fValue: String20);
var
a: Integer;
ok: Boolean;
a := 0;
ok := False;
- fName := LowerCase(fName);
+ aName := LowerCase(aName);
if FAIFlags <> nil then
for a := 0 to High(FAIFlags) do
- if LowerCase(FAIFlags[a].Name) = fName then
+ if LowerCase(FAIFlags[a].Name) = aName then
begin
ok := True;
Break;
SetLength(FAIFlags, Length(FAIFlags)+1);
with FAIFlags[High(FAIFlags)] do
begin
- Name := fName;
+ Name := aName;
Value := fValue;
end;
end;
diff --git a/src/shared/a_modes.inc b/src/shared/a_modes.inc
index 13c328e85a2c71cc77397cc5fb72634f27058352..277c6a737acfb75a81903cafc4dc8cc6dc10116c 100644 (file)
--- a/src/shared/a_modes.inc
+++ b/src/shared/a_modes.inc
// compiler options, common for all game modules
-{$MODE DELPHI}
+{.$MODE DELPHI}
+{$MODE OBJFPC}
{$MODESWITCH ADVANCEDRECORDS+}
-{$MODESWITCH DUPLICATELOCALS-}
+{$MODESWITCH ALLOWINLINE+}
+{$MODESWITCH ANSISTRINGS+} // Allow use of ansistrings.
+{$MODESWITCH AUTODEREF+} // Automatic (silent) dereferencing of typed pointers.
+{$MODESWITCH CLASS+}
+{$MODESWITCH CLASSICPROCVARS+} // Use classical procedural variables.
+{$MODESWITCH DEFAULTPARAMETERS+} // Allow use of default parameter values.
+{$MODESWITCH DUPLICATELOCALS-} // Allow local variables in class methods to have the same names as properties of the class.
+{$MODESWITCH EXCEPTIONS+}
+{$MODESWITCH HINTDIRECTIVE+} // Support the hint directives (deprecated, platform etc.)
+{$MODESWITCH INITFINAL+} // Allow use of Initialization and Finalization
+{.$MODESWITCH ISOUNARYMINUS-} // Unary minus as required by ISO pascal.
+{$MODESWITCH MACPROCVARS-} // Use mac-style procedural variables.
+{$MODESWITCH NESTEDCOMMENTS-}
{$MODESWITCH NESTEDPROCVARS+}
+{$MODESWITCH OBJPAS+}
+{$MODESWITCH OUT+} // Allow use of the out parameter type.
+{$MODESWITCH PCHARTOSTRING+}
+{$MODESWITCH POINTERTOPROCVAR+} // Allow silent conversion of pointers to procedural variables.
+{$MODESWITCH PROPERTIES+}
+{$MODESWITCH REPEATFORWARD+} // Implementation and Forward declaration must match completely.
+{$MODESWITCH RESULT+}
+{$MODESWITCH TYPEHELPERS-} // Allow the use of type helpers.
{$MODESWITCH UNICODESTRINGS-}
+{$MODESWITCH UNICODESTRINGS-}
+
{$ASSERTIONS ON}
{$BITPACKING OFF}
index 51d99e8b0e0e8fd155b8aa256add97d1fde688bd..e335e3fc8ee1c0abd2fd4cb361e6082f7cd61a4e 100644 (file)
--- a/src/shared/xprofiler.pas
+++ b/src/shared/xprofiler.pas
// call this on frame end
procedure mainEnd ();
- procedure sectionBegin (name: AnsiString);
+ procedure sectionBegin (aName: AnsiString);
procedure sectionEnd ();
// this will reuse the section with the given name (if there is any); use `sectionEnd()` to end it as usual
- procedure sectionBeginAccum (name: AnsiString);
+ procedure sectionBeginAccum (aName: AnsiString);
end;
{$ENDIF}
end;
-procedure TProfiler.sectionBegin (name: AnsiString);
+procedure TProfiler.sectionBegin (aName: AnsiString);
{$IF DEFINED(STOPWATCH_IS_HERE)}
var
sid: Integer;
sid := xpsused;
Inc(xpsused);
pss := @xpsecs[sid];
- pss.name := name;
+ pss.name := aName;
pss.timer.clear();
pss.prevAct := xpscur;
// calculate level
{$ENDIF}
end;
-procedure TProfiler.sectionBeginAccum (name: AnsiString);
+procedure TProfiler.sectionBeginAccum (aName: AnsiString);
{$IF DEFINED(STOPWATCH_IS_HERE)}
var
idx: Integer;
begin
for idx := 0 to xpsused-1 do
begin
- if (xpsecs[idx].name = name) then
+ if (xpsecs[idx].name = aName) then
begin
- if (idx = xpscur) then raise Exception.Create('profiler error(0): dobule resume: "'+name+'"');
- if (xpsecs[idx].prevAct <> -1) then raise Exception.Create('profiler error(1): dobule resume: "'+name+'"');
+ if (idx = xpscur) then raise Exception.Create('profiler error(0): dobule resume: "'+aName+'"');
+ if (xpsecs[idx].prevAct <> -1) then raise Exception.Create('profiler error(1): dobule resume: "'+aName+'"');
xpsecs[idx].prevAct := xpscur;
xpscur := idx;
xpsecs[idx].timer.resume();
end;
end;
end;
- sectionBegin(name);
+ sectionBegin(aName);
{$ENDIF}
end;