瀏覽代碼

Updated FileVFW

GLScene 5 年之前
父節點
當前提交
20b2b77617

+ 1 - 1
Packages/Win32/GLScene_RT.dpk

@@ -230,7 +230,7 @@ contains
   GLSMemo in '..\..\Source\GLSMemo.pas',
   GLSMemo in '..\..\Source\GLSMemo.pas',
   GLSRGBE in '..\..\Source\GLSRGBE.pas',
   GLSRGBE in '..\..\Source\GLSRGBE.pas',
   GLSRedBlackTree in '..\..\Source\GLSRedBlackTree.pas',
   GLSRedBlackTree in '..\..\Source\GLSRedBlackTree.pas',
-  GLSVfw in '..\..\Source\GLSVfw.pas',
+  FileVFW in '..\..\Source\FileVFW.pas',
   GLScene in '..\..\Source\GLScene.pas',
   GLScene in '..\..\Source\GLScene.pas',
   GLSceneForm in '..\..\Source\GLSceneForm.pas',
   GLSceneForm in '..\..\Source\GLSceneForm.pas',
   GLScreen in '..\..\Source\GLScreen.pas',
   GLScreen in '..\..\Source\GLScreen.pas',

+ 1 - 1
Packages/Win32/GLScene_RT.dproj

@@ -328,7 +328,7 @@
         <DCCReference Include="..\..\Source\GLSMemo.pas"/>
         <DCCReference Include="..\..\Source\GLSMemo.pas"/>
         <DCCReference Include="..\..\Source\GLSRGBE.pas"/>
         <DCCReference Include="..\..\Source\GLSRGBE.pas"/>
         <DCCReference Include="..\..\Source\GLSRedBlackTree.pas"/>
         <DCCReference Include="..\..\Source\GLSRedBlackTree.pas"/>
-        <DCCReference Include="..\..\Source\GLSVfw.pas"/>
+        <DCCReference Include="..\..\Source\FileVFW.pas"/>
         <DCCReference Include="..\..\Source\GLScene.pas"/>
         <DCCReference Include="..\..\Source\GLScene.pas"/>
         <DCCReference Include="..\..\Source\GLSceneForm.pas"/>
         <DCCReference Include="..\..\Source\GLSceneForm.pas"/>
         <DCCReference Include="..\..\Source\GLScreen.pas"/>
         <DCCReference Include="..\..\Source\GLScreen.pas"/>

+ 2 - 2
Packages/Win64/GLScene_RT.dpk

@@ -230,7 +230,6 @@ contains
   GLSMemo in '..\..\Source\GLSMemo.pas',
   GLSMemo in '..\..\Source\GLSMemo.pas',
   GLSRGBE in '..\..\Source\GLSRGBE.pas',
   GLSRGBE in '..\..\Source\GLSRGBE.pas',
   GLSRedBlackTree in '..\..\Source\GLSRedBlackTree.pas',
   GLSRedBlackTree in '..\..\Source\GLSRedBlackTree.pas',
-  GLSVfw in '..\..\Source\GLSVfw.pas',
   GLScene in '..\..\Source\GLScene.pas',
   GLScene in '..\..\Source\GLScene.pas',
   GLSceneForm in '..\..\Source\GLSceneForm.pas',
   GLSceneForm in '..\..\Source\GLSceneForm.pas',
   GLScreen in '..\..\Source\GLScreen.pas',
   GLScreen in '..\..\Source\GLScreen.pas',
@@ -291,7 +290,8 @@ contains
   OpenGLAdapter in '..\..\Source\OpenGLAdapter.pas',
   OpenGLAdapter in '..\..\Source\OpenGLAdapter.pas',
   OpenGLTokens in '..\..\Source\OpenGLTokens.pas',
   OpenGLTokens in '..\..\Source\OpenGLTokens.pas',
   XCollection in '..\..\Source\XCollection.pas',
   XCollection in '..\..\Source\XCollection.pas',
-  XOpenGL in '..\..\Source\XOpenGL.pas';
+  XOpenGL in '..\..\Source\XOpenGL.pas',
+  FileVFW in '..\..\Source\FileVFW.pas';
 
 
 end.
 end.
 
 

+ 1 - 1
Packages/Win64/GLScene_RT.dproj

@@ -337,7 +337,6 @@
         <DCCReference Include="..\..\Source\GLSMemo.pas"/>
         <DCCReference Include="..\..\Source\GLSMemo.pas"/>
         <DCCReference Include="..\..\Source\GLSRGBE.pas"/>
         <DCCReference Include="..\..\Source\GLSRGBE.pas"/>
         <DCCReference Include="..\..\Source\GLSRedBlackTree.pas"/>
         <DCCReference Include="..\..\Source\GLSRedBlackTree.pas"/>
-        <DCCReference Include="..\..\Source\GLSVfw.pas"/>
         <DCCReference Include="..\..\Source\GLScene.pas"/>
         <DCCReference Include="..\..\Source\GLScene.pas"/>
         <DCCReference Include="..\..\Source\GLSceneForm.pas"/>
         <DCCReference Include="..\..\Source\GLSceneForm.pas"/>
         <DCCReference Include="..\..\Source\GLScreen.pas"/>
         <DCCReference Include="..\..\Source\GLScreen.pas"/>
@@ -399,6 +398,7 @@
         <DCCReference Include="..\..\Source\OpenGLTokens.pas"/>
         <DCCReference Include="..\..\Source\OpenGLTokens.pas"/>
         <DCCReference Include="..\..\Source\XCollection.pas"/>
         <DCCReference Include="..\..\Source\XCollection.pas"/>
         <DCCReference Include="..\..\Source\XOpenGL.pas"/>
         <DCCReference Include="..\..\Source\XOpenGL.pas"/>
+        <DCCReference Include="..\..\Source\FileVFW.pas"/>
         <None Include="..\..\Source\GLScene.inc"/>
         <None Include="..\..\Source\GLScene.inc"/>
         <BuildConfiguration Include="Debug">
         <BuildConfiguration Include="Debug">
             <Key>Cfg_2</Key>
             <Key>Cfg_2</Key>

+ 4 - 5
Source/GLSVfw.pas → Source/FileVFW.pas

@@ -1,10 +1,10 @@
 //
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 // This unit is part of the GLScene Engine, http://glscene.org
 //
 //
-{
+(*
    Video for windows
    Video for windows
-}
-unit GLSVfw;
+*)
+unit FileVFW;
 
 
 interface
 interface
 
 
@@ -87,8 +87,7 @@ uses
     Winapi.MMSystem,
     Winapi.MMSystem,
     Winapi.Messages,
     Winapi.Messages,
     Winapi.CommDlg,
     Winapi.CommDlg,
-    Winapi.ActiveX,
-    VCL.Dialogs;
+    Winapi.ActiveX;
 
 
 (****************************************************************************
 (****************************************************************************
  *
  *

+ 4 - 3
Source/GLAVIRecorder.pas

@@ -22,9 +22,10 @@ uses
   VCL.Graphics, 
   VCL.Graphics, 
   VCL.Dialogs,
   VCL.Dialogs,
    
    
-  GLGraphics, 
-  GLSVfw, 
-  GLScene, 
+  FileVFW,
+
+  GLGraphics,
+  GLScene,
   GLWin32Viewer;
   GLWin32Viewer;
 
 
 type
 type

+ 80 - 91
Source/GLSLog.pas

@@ -1,11 +1,11 @@
 //
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 // This unit is part of the GLScene Engine, http://glscene.org
 //
 //
-{ 
-  Activate USE_LOGGING in "GLSCene.inc" to turn on inner GLScene logger. 
-  You may have only one instance of TGLSLogger 
-  To obtain it, call UserLog() function from any unit. 
-}
+(*
+  Activate USE_LOGGING in "GLSCene.inc" to turn on inner GLScene logger.
+  You may have only one instance of TGLSLogger
+  To obtain it, call UserLog() function from any unit.
+*)
 
 
 unit GLSLog;
 unit GLSLog;
 
 
@@ -25,12 +25,12 @@ uses
   VCL.Controls;
   VCL.Controls;
 
 
 type
 type
-  {  Levels of importance of log messages }
+  //  Levels of importance of log messages
   TLogLevel = (lkDebug, lkInfo, lkNotice, lkWarning, lkError, lkFatalError);
   TLogLevel = (lkDebug, lkInfo, lkNotice, lkWarning, lkError, lkFatalError);
-  {  Log level setting type }
+  //  Log level setting type
   TLogLevels = set of TLogLevel;
   TLogLevels = set of TLogLevel;
 
 
-  {What to do when number of messages exceeds message limit. }
+  //What to do when number of messages exceeds message limit.
   TLogMessageLimitAction = (mlaContinue, mlaStopLogging, mlaHalt);
   TLogMessageLimitAction = (mlaContinue, mlaStopLogging, mlaHalt);
 
 
 var
 var
@@ -46,21 +46,21 @@ const
   llMin: TLogLevels = [lkError, lkFatalError];
   llMin: TLogLevels = [lkError, lkFatalError];
 
 
 type
 type
-  {  Log date and time setting type }
+  //  Log date and time setting type
   TLogTimeFormat = (
   TLogTimeFormat = (
-    {  doesn't output any time information }
+    //  doesn't output any time information
     lfNone,
     lfNone,
-    {  include date in the log }
+    //  include date in the log
     lfDate,
     lfDate,
-    {  include time in the log }
+    //  include time in the log
     lfTime,
     lfTime,
-    {  include time in the log, including milliseconds }
+    //  include time in the log, including milliseconds
     lfTimeExact,
     lfTimeExact,
-    {  include date and time in the log }
+    //  include date and time in the log
     lfDateTime,
     lfDateTime,
-    {  include time elapsed since startup in the log }
+    //  include time elapsed since startup in the log
     lfElapsed);
     lfElapsed);
-  {How log is buffered. }
+  // How log is buffered.
   TLogBufferingMode =
   TLogBufferingMode =
   (
   (
    lbmWriteEmidiatly,
    lbmWriteEmidiatly,
@@ -68,11 +68,11 @@ type
    lbmWriteInTheEnd
    lbmWriteInTheEnd
   );
   );
 
 
-  {  Class reference to log session class }
+  // Class reference to log session class
   CLogSession = class of TGLLogSession;
   CLogSession = class of TGLLogSession;
   TGLLogSession = class;
   TGLLogSession = class;
 
 
-  {Thread that periodically flushes the buffer to disk. }
+  // Thread that periodically flushes the buffer to disk.
   TLogBufferFlushThread = class(TThread)
   TLogBufferFlushThread = class(TThread)
   private
   private
     FParent: TGLLogSession;
     FParent: TGLLogSession;
@@ -82,7 +82,7 @@ type
     constructor Create(const AParent: TGLLogSession);
     constructor Create(const AParent: TGLLogSession);
   end;
   end;
 
 
-  {Thread that checks file size and splits the file if nessesary. }
+  // Thread that checks file size and splits the file if nessesary.
   TLogCheckSizeThread = class(TThread)
   TLogCheckSizeThread = class(TThread)
   private
   private
     FParent: TGLLogSession;
     FParent: TGLLogSession;
@@ -92,7 +92,7 @@ type
     constructor Create(const AParent: TGLLogSession);
     constructor Create(const AParent: TGLLogSession);
   end;
   end;
 
 
-  {Abstract Logger class }
+  // Abstract Logger class
   TGLLogSession = class(TPersistent)
   TGLLogSession = class(TPersistent)
   private
   private
     FBuffer: TStringList;
     FBuffer: TStringList;
@@ -115,9 +115,9 @@ type
     FLogKindCount: array [TLogLevel] of Integer;
     FLogKindCount: array [TLogLevel] of Integer;
     FLogThreadId: Boolean;
     FLogThreadId: Boolean;
     FMessageLimitAction: TLogMessageLimitAction;
     FMessageLimitAction: TLogMessageLimitAction;
-    {  Determines which date or time to include in the log }
+    // Determines which date or time to include in the log
     FTimeFormat: TLogTimeFormat;
     FTimeFormat: TLogTimeFormat;
-    {  Startup timestamp in milliseconds }
+    // Startup timestamp in milliseconds
     FStartedMs: Cardinal;
     FStartedMs: Cardinal;
     FLogFileMaxSize: Integer;
     FLogFileMaxSize: Integer;
     FCheckFileSizePeriod: Integer;
     FCheckFileSizePeriod: Integer;
@@ -139,35 +139,29 @@ type
     procedure ClearLogsInTheSameDir();
     procedure ClearLogsInTheSameDir();
     procedure BackUpOldLogs(const ACurrentLogFileName: string);
     procedure BackUpOldLogs(const ACurrentLogFileName: string);
     procedure CreateNewLogFileIfNeeded();
     procedure CreateNewLogFileIfNeeded();
-
-    {  Appends a string to log. Thread-safe. }
+    // Appends a string to log. Thread-safe.
     procedure AppendLog(const AString: string; const ALevel: TLogLevel; const ALogTime: Boolean = True);
     procedure AppendLog(const AString: string; const ALevel: TLogLevel; const ALogTime: Boolean = True);
-
-    {Writes string to log. Returns True if everything went ok.}
+    // Writes string to log. Returns True if everything went ok.
     function DoWriteToLog(const AString: string): Boolean;
     function DoWriteToLog(const AString: string): Boolean;
-
-    {Writes FBuffer to log. Returns True if everything went ok.}
+    // Writes FBuffer to log. Returns True if everything went ok.
     function DoWriteBufferToLog(): Boolean;
     function DoWriteBufferToLog(): Boolean;
-
-    {Resets log. Returns True if everything went ok.}
+    // Resets log. Returns True if everything went ok.
     function DoResetLog: Boolean;
     function DoResetLog: Boolean;
   public
   public
-    { Initializes a log session with the specified log file name, time and level settings }
+    // Initializes a log session with the specified log file name, time and level settings
     constructor Init(const AFileName: string;
     constructor Init(const AFileName: string;
       const ATimeFormat: TLogTimeFormat; const ALevels: TLogLevels;
       const ATimeFormat: TLogTimeFormat; const ALevels: TLogLevels;
       const ALogThreadId: Boolean = True; const ABuffered: Boolean = False;
       const ALogThreadId: Boolean = True; const ABuffered: Boolean = False;
       const AMaxSize: Integer = 0; const ABackUpOldLogs: Boolean = False;
       const AMaxSize: Integer = 0; const ABackUpOldLogs: Boolean = False;
       const AClearOldLogs: Boolean = True; const AWriteInternalMessages: Boolean = True); virtual;
       const AClearOldLogs: Boolean = True; const AWriteInternalMessages: Boolean = True); virtual;
-
     destructor Destroy; override;
     destructor Destroy; override;
-    {  General Logging procedures }
+    // General Logging procedures
     procedure Log(const Desc: string; const Level: TLogLevel = lkInfo);
     procedure Log(const Desc: string; const Level: TLogLevel = lkInfo);
     procedure LogAdv(const args: array of const; const ALevel: TLogLevel = lkError);
     procedure LogAdv(const args: array of const; const ALevel: TLogLevel = lkError);
     procedure LogException(const E: Exception; const aFunctionName: string;
     procedure LogException(const E: Exception; const aFunctionName: string;
       const args: array of const; const ALevel: TLogLevel = lkError);
       const args: array of const; const ALevel: TLogLevel = lkError);
-
-    {  Logs a string  Desc  if  Level
-      matches current USE_LOGGING level (see @Link(LogLevels)) }
+    (*  Logs a string  Desc  if  Level
+      matches current USE_LOGGING level (see @Link(LogLevels)) *)
     procedure LogDebug(const Desc: string);
     procedure LogDebug(const Desc: string);
     procedure LogInfo(const Desc: string);
     procedure LogInfo(const Desc: string);
     procedure LogNotice(const Desc: string);
     procedure LogNotice(const Desc: string);
@@ -175,20 +169,17 @@ type
     procedure LogError(const Desc: string);
     procedure LogError(const Desc: string);
     procedure LogFatalError(const Desc: string);
     procedure LogFatalError(const Desc: string);
     procedure LogEmtryLine();
     procedure LogEmtryLine();
-
-    {  Logs a formatted string assembled from a format string and an array of arguments. }
+    // Logs a formatted string assembled from a format string and an array of arguments.
     procedure LogDebugFmt(const Desc: string; const Args: array of const );
     procedure LogDebugFmt(const Desc: string; const Args: array of const );
     procedure LogInfoFmt(const Desc: string; const Args: array of const );
     procedure LogInfoFmt(const Desc: string; const Args: array of const );
     procedure LogNoticeFmt(const Desc: string; const Args: array of const );
     procedure LogNoticeFmt(const Desc: string; const Args: array of const );
     procedure LogWarningFmt(const Desc: string; const Args: array of const );
     procedure LogWarningFmt(const Desc: string; const Args: array of const );
     procedure LogErrorFmt(const Desc: string; const Args: array of const );
     procedure LogErrorFmt(const Desc: string; const Args: array of const );
     procedure LogFatalErrorFmt(const Desc: string; const Args: array of const );
     procedure LogFatalErrorFmt(const Desc: string; const Args: array of const );
-
-    {  Mics procedures. }
+    // Mics procedures.
     procedure DisplayLog();
     procedure DisplayLog();
     procedure FlushBuffer(); // If log is buffered, calling this will flush the buffer.
     procedure FlushBuffer(); // If log is buffered, calling this will flush the buffer.
-
-    {  Set of levels which to include in the log }
+    // Set of levels which to include in the log
     property LogLevels: TLogLevels read FLogLevels write SetMode
     property LogLevels: TLogLevels read FLogLevels write SetMode
       default [lkDebug, lkInfo, lkNotice, lkWarning, lkError, lkFatalError];
       default [lkDebug, lkInfo, lkNotice, lkWarning, lkError, lkFatalError];
     property Enabled: Boolean read FEnabled write SetEnabled default True;
     property Enabled: Boolean read FEnabled write SetEnabled default True;
@@ -198,21 +189,18 @@ type
     property DisplayErrorDialogs: Boolean read FDisplayErrorDialogs write FDisplayErrorDialogs default True;
     property DisplayErrorDialogs: Boolean read FDisplayErrorDialogs write FDisplayErrorDialogs default True;
     property MessageLimitAction: TLogMessageLimitAction read FMessageLimitAction write FMessageLimitAction default mlaHalt;
     property MessageLimitAction: TLogMessageLimitAction read FMessageLimitAction write FMessageLimitAction default mlaHalt;
     property WriteInternalMessages: Boolean read FWriteInternalMessages write FWriteInternalMessages default True;
     property WriteInternalMessages: Boolean read FWriteInternalMessages write FWriteInternalMessages default True;
-
-    {To always display log, put all log types. To never display log, leave this empty. }
+    // To always display log, put all log types. To never display log, leave this empty.
     property DisplayLogOnExitIfItContains: TLogLevels read FDisplayLogOnExitIfItContains write FDisplayLogOnExitIfItContains
     property DisplayLogOnExitIfItContains: TLogLevels read FDisplayLogOnExitIfItContains write FDisplayLogOnExitIfItContains
       default [lkDebug, lkInfo, lkNotice, lkWarning, lkError, lkFatalError];
       default [lkDebug, lkInfo, lkNotice, lkWarning, lkError, lkFatalError];
-
-
-    {If LogFileMaxSize is not 0, then:
+    (* If LogFileMaxSize is not 0, then:
        1) At start, all logs with the same extention will be deleted.
        1) At start, all logs with the same extention will be deleted.
        2) All logs wil be periodically cheked for FileSize.
        2) All logs wil be periodically cheked for FileSize.
-          New log file will be created when this size exceeds limit. }
+          New log file will be created when this size exceeds limit. *)
     property LogFileMaxSize: Integer  read FLogFileMaxSize  write SetLogFileMaxSize default 0; // In bytes, limited to 2Gb.
     property LogFileMaxSize: Integer  read FLogFileMaxSize  write SetLogFileMaxSize default 0; // In bytes, limited to 2Gb.
     property CheckFileSizePeriod: Integer read FCheckFileSizePeriod write FCheckFileSizePeriod default 4000; // In ms.
     property CheckFileSizePeriod: Integer read FCheckFileSizePeriod write FCheckFileSizePeriod default 4000; // In ms.
   end;
   end;
 
 
-  {  Abstract class for control loging.  }
+  // Abstract class for control loging.
   TGLSLogger = class(TComponent)
   TGLSLogger = class(TComponent)
   private
   private
     FReplaceAssertion: Boolean;
     FReplaceAssertion: Boolean;
@@ -239,21 +227,20 @@ type
 
 
   TIDELogProc = procedure(const AMsg: string);
   TIDELogProc = procedure(const AMsg: string);
 
 
-{  Return logger wich created by TGLSLogger component }
+// Return logger wich created by TGLSLogger component
 function UserLog: TGLLogSession;
 function UserLog: TGLLogSession;
 function SkipBeforeSTR(var TextFile: Text; const SkipSTR: string): Boolean;
 function SkipBeforeSTR(var TextFile: Text; const SkipSTR: string): Boolean;
 function ReadLine(var TextFile: Text): string;
 function ReadLine(var TextFile: Text): string;
 
 
-{  GLScene inner logger.
-    DaStr: Converted to a function, because in case of a DLL and main app using this module,
+(*  Inner logger.
+    Converted to a function, because in case of a DLL and main app using this module,
     log is written to the same file on initialization and finalization,
     log is written to the same file on initialization and finalization,
     which is not what one might want. This also allows to create a GLSLogger with
     which is not what one might want. This also allows to create a GLSLogger with
     custom parameters for user's application, for example a different log path
     custom parameters for user's application, for example a different log path
     (Often the EXE application directory is read-only).
     (Often the EXE application directory is read-only).
- }
+*)
 function GLSLogger(): TGLLogSession;
 function GLSLogger(): TGLLogSession;
 procedure UseCustomGLSLogger(const ALogger: TGLLogSession);
 procedure UseCustomGLSLogger(const ALogger: TGLLogSession);
-
 function ConstArrayToString(const Elements: array of const): String;
 function ConstArrayToString(const Elements: array of const): String;
 
 
 var
 var
@@ -268,7 +255,7 @@ var
   vAssertErrorHandler: TAssertErrorProc;
   vAssertErrorHandler: TAssertErrorProc;
   vCurrentLogger: TGLSLogger;
   vCurrentLogger: TGLSLogger;
 
 
-{  GLScene inner logger. Create on first use, not in unit initialization. }
+// Inner logger. Create on first use, not in unit initialization. }
 function GLSLogger(): TGLLogSession;
 function GLSLogger(): TGLLogSession;
 begin
 begin
   if v_GLSLogger = nil then
   if v_GLSLogger = nil then
@@ -304,20 +291,20 @@ const
                   'WideString  : ', 'Int64       : ', '#HLType     : ');
                   'WideString  : ', 'Int64       : ', '#HLType     : ');
 
 
 {Function from HotLog by Olivier Touzot "QnnO".}
 {Function from HotLog by Olivier Touzot "QnnO".}
-Function GetOriginalValue(const s:String):String;
+function GetOriginalValue(const s:String):String;
 //  Called to remove the false 'AnsiString :' assertion, for pointers and objects
 //  Called to remove the false 'AnsiString :' assertion, for pointers and objects
-Begin
+begin
   result := RightStr(s,Length(s)-19);
   result := RightStr(s,Length(s)-19);
-End;
+end;
 
 
 {Function from HotLog by Olivier Touzot "QnnO".}
 {Function from HotLog by Olivier Touzot "QnnO".}
-Function VarRecToStr(const vr:TVarRec):String;
+function VarRecToStr(const vr:TVarRec):String;
 // See D6PE help topic "TVarRec"
 // See D6PE help topic "TVarRec"
-Begin
+begin
   Result := vTypeAsSring[vr.VType] + ' ';
   Result := vTypeAsSring[vr.VType] + ' ';
-  TRY
-    With vr Do
-    Case VType of
+  try
+    with vr do
+    case VType of
        vtInteger:    result := result + IntToStr(VInteger);
        vtInteger:    result := result + IntToStr(VInteger);
        vtBoolean:    result := result + BoolToStr(VBoolean, True);
        vtBoolean:    result := result + BoolToStr(VBoolean, True);
        vtChar:       Result := Result + string(VChar);
        vtChar:       Result := Result + string(VChar);
@@ -327,10 +314,10 @@ Begin
        vtPointer:    result := result + '^(' +  Format('%P', [(addr(VPointer)) ]) +')';
        vtPointer:    result := result + '^(' +  Format('%P', [(addr(VPointer)) ]) +')';
        vtPChar:      result := Result + string(VPChar);
        vtPChar:      result := Result + string(VPChar);
 // ...
 // ...
-       vtObject:     Begin
-                       If VObject = Nil Then result := result + '^(NIL)'
-                       Else result := result + VObject.classname;
-                     End;
+       vtObject:     begin
+                       if VObject = Nil Then result := result + '^(NIL)'
+                       else result := result + VObject.classname;
+                     end;
 // ...
 // ...
        vtClass:      result := result + VClass.classname;
        vtClass:      result := result + VClass.classname;
        vtWideChar:   Result := Result + string(VWideChar);
        vtWideChar:   Result := Result + string(VWideChar);
@@ -343,33 +330,35 @@ Begin
        vtInt64:      Result := Result + IntToStr(VInt64^);
        vtInt64:      Result := Result + IntToStr(VInt64^);
        else          result := result + Format('[#HLvrType(%d)]',       // "Else" not possible...
        else          result := result + Format('[#HLvrType(%d)]',       // "Else" not possible...
                                [ integer(vr.VType) ]);                  // ...with D6, but laters ?
                                [ integer(vr.VType) ]);                  // ...with D6, but laters ?
-    End;{case}
+    end;{case}
   EXCEPT
   EXCEPT
       result := result + Format('[#HLvrValue(%s)]', [vTypeDesc[vr.VType]]);
       result := result + Format('[#HLvrValue(%s)]', [vTypeDesc[vr.VType]]);
-  END;
+  end;
 end;
 end;
 
 
-{Function from HotLog by Olivier Touzot "QnnO".}
-Function GetBasicValue(const s:String; vKind:Byte):String;
+// Function from HotLog by Olivier Touzot "QnnO".
+function GetBasicValue(const s:String; vKind:Byte):String;
 var iTmp : Integer;
 var iTmp : Integer;
     wasTObject: Boolean;
     wasTObject: Boolean;
-Begin
+begin
   Result := s;
   Result := s;
-  If s = '' Then exit;
-  TRY
+  If s = '' then exit;
+  try
     iTmp := Pos('$_H_',s);
     iTmp := Pos('$_H_',s);
     wasTObject := (Pos('$_H_TObject',s) > 0);
     wasTObject := (Pos('$_H_TObject',s) > 0);
-    If (iTmp > 0 ) Then Result := GetOriginalValue(s);           // converts fake strings back to original
+    if (iTmp > 0 ) then Result := GetOriginalValue(s);           // converts fake strings back to original
     Result := RightStr(Result, length(result)-15);               // From now on, works on "result"
     Result := RightStr(Result, length(result)-15);               // From now on, works on "result"
-    If (vKind In [vtString,vtAnsiString,vtWideString,vtPChar,vtWideChar,vtPWideChar])
-    And Not(wasTObject) Then Exit
-    Else Begin
+    if (vKind In [vtString,vtAnsiString,vtWideString,vtPChar,vtWideChar,vtPWideChar])
+    And Not(wasTObject) then Exit
+    else
+    begin
            iTmp   := Pos(' ',Result);
            iTmp   := Pos(' ',Result);
-           If ( iTmp > 0 ) And (iTmp < Length(result))
-              Then result := LeftStr(result, iTmp);
-         End;
-  EXCEPT; END;
-End;
+           If ( iTmp > 0 ) and (iTmp < Length(result))
+              then result := LeftStr(result, iTmp);
+    end;
+  EXCEPT;
+  end;
+end;
 
 
 {Function from HotLog by Olivier Touzot "QnnO".}
 {Function from HotLog by Olivier Touzot "QnnO".}
 function ConstArrayToString(const Elements: array of const): String;
 function ConstArrayToString(const Elements: array of const): String;
@@ -387,16 +376,16 @@ Begin
 
 
     Result := '(';
     Result := '(';
     sep := '; ';
     sep := '; ';
-    For i:= Low(Elements) to High(Elements) do
-    Begin
+    for i:= Low(Elements) to High(Elements) do
+    begin
       s := VarRecToStr(Elements[I]);
       s := VarRecToStr(Elements[I]);
       Result := Result + GetBasicValue(s,Elements[i].VType) + sep;
       Result := Result + GetBasicValue(s,Elements[i].VType) + sep;
-    End;
+    end;
     Result := LeftStr(Result, length(result)-2) + ');' ;      // replaces last ", " by final ");".
     Result := LeftStr(Result, length(result)-2) + ');' ;      // replaces last ", " by final ");".
 
 
-  EXCEPT result := '[#HLvrConvert]';
-  END;
-End;
+  except result := '[#HLvrConvert]';
+  eND;
+end;
 
 
 
 
 function UserLog: TGLLogSession;
 function UserLog: TGLLogSession;
@@ -1187,7 +1176,7 @@ begin
     end;
     end;
 end;
 end;
 
 
-{ TLogBufferFlushThread }
+// TLogBufferFlushThread
 
 
 constructor TLogBufferFlushThread.Create(const AParent: TGLLogSession);
 constructor TLogBufferFlushThread.Create(const AParent: TGLLogSession);
 begin
 begin
@@ -1204,7 +1193,7 @@ begin
   end;
   end;
 end;
 end;
 
 
-{ TLogCheckSizeThread }
+// TLogCheckSizeThread
 
 
 constructor TLogCheckSizeThread.Create(const AParent: TGLLogSession);
 constructor TLogCheckSizeThread.Create(const AParent: TGLLogSession);
 begin
 begin

+ 2 - 2
Source/GLSRGBE.pas

@@ -1,9 +1,9 @@
 //
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 // This unit is part of the GLScene Engine, http://glscene.org
 //
 //
-{
+(*
    GLScene RGBE
    GLScene RGBE
-}
+*)
 unit GLSRGBE;
 unit GLSRGBE;
 
 
 interface
 interface