From 65ba06b73c91c92a99f2ed88432e05a1b694531d Mon Sep 17 00:00:00 2001 From: tobigun Date: Sun, 9 Mar 2008 18:48:19 +0000 Subject: 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 --- Game/Code/Classes/UCore.pas | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'Game/Code/Classes/UCore.pas') 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; //------------- -- cgit v1.2.3