diff options
author | tobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2008-03-09 18:48:19 +0000 |
---|---|---|
committer | tobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2008-03-09 18:48:19 +0000 |
commit | 65ba06b73c91c92a99f2ed88432e05a1b694531d (patch) | |
tree | 412b8cacd259e0271984c1f7306865ec0144e600 /Game/Code/Classes/UCore.pas | |
parent | aceec1dc77e57c20d73e2430c0168a6449b46210 (diff) | |
download | usdx-65ba06b73c91c92a99f2ed88432e05a1b694531d.tar.gz usdx-65ba06b73c91c92a99f2ed88432e05a1b694531d.tar.xz usdx-65ba06b73c91c92a99f2ed88432e05a1b694531d.zip |
Fixed some warnings ("missing result-values", "0 instead of nil", "comparison is always true", "range check errors")
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@946 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'Game/Code/Classes/UCore.pas')
-rw-r--r-- | Game/Code/Classes/UCore.pas | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/Game/Code/Classes/UCore.pas b/Game/Code/Classes/UCore.pas index cb176e29..7f05289b 100644 --- a/Game/Code/Classes/UCore.pas +++ b/Game/Code/Classes/UCore.pas @@ -174,15 +174,15 @@ begin If noError then
begin
//Call Translate Hook
- noError := (Hooks.CallEventChain(hTranslate, 0, 0) = 0);
+ noError := (Hooks.CallEventChain(hTranslate, 0, nil) = 0);
If noError then
begin //Calls LoadTextures Hook
- noError := (Hooks.CallEventChain(hLoadTextures, 0, 0) = 0);
+ noError := (Hooks.CallEventChain(hLoadTextures, 0, nil) = 0);
if noError then
begin //Calls Loading Finished Hook
- noError := (Hooks.CallEventChain(hLoadingFinished, 0, 0) = 0);
+ noError := (Hooks.CallEventChain(hLoadingFinished, 0, nil) = 0);
If noError then
begin
@@ -263,17 +263,18 @@ var I: Integer;
begin
Result := False;
- try
- For I := 0 to high(Modules) do
- begin
+ for I := 0 to high(Modules) do
+ begin
+ try
Modules[I].NeedsDeInit := False;
Modules[I].Module := CORE_MODULES_TO_LOAD[I].Create;
Modules[I].Module.Info(@Modules[I].Info);
+ except
+ ReportError(Integer(PChar('Can''t get module #' + InttoStr(I) + ' "' + Modules[I].Info.Name + '"')), PChar('Core'));
+ Exit;
end;
- Result := True;
- except
- ReportError(Integer(PChar('Can''t get module #' + InttoStr(I) + ' "' + Modules[I].Info.Name + '"')), PChar('Core'));
end;
+ Result := True;
end;
//-------------
@@ -350,6 +351,8 @@ begin GoTo Continue;
DeInitCore;
+
+ Result := true;
end;
//-------------
@@ -397,6 +400,7 @@ begin // to-do : write TService-/HookManager.Free and call it here
+ Result := true;
end;
//-------------
|