Преглед на файлове

Combined units GLPerlinBase and GLPerlin

GLScene преди 5 години
родител
ревизия
4c57bcc00b
променени са 100 файла, в които са добавени 1026 реда и са изтрити 924 реда
  1. 1 1
      Demos/Delphi/bench/smoking/smoking.dproj
  2. 5 1
      Demos/Delphi/movements/SmoothNavigator/uMainForm.dfm
  3. 1 4
      Demos/Delphi/movements/pointto/Unit1.pas
  4. 1 1
      Demos/Delphi/physics/NewtonDensity/NewtonDensity.dproj
  5. 1 1
      Demos/Delphi/physics/NewtonJoints/NewtonJoints.dproj
  6. 1 1
      Demos/Delphi/physics/NewtonMaterial/NewtonMaterial.dproj
  7. 1 1
      Demos/Delphi/physics/NewtonMousePick/NewtonMousePick.dproj
  8. 1 1
      Demos/Delphi/physics/NewtonSimpleSpawn/NewtonSimpleSpawn.dproj
  9. 1 1
      Demos/Delphi/physics/NewtonWalkAndCarry/NewtonWalkAndCarry.dproj
  10. 1 1
      Demos/Delphi/physics/NewtonWalkCarryShoot/NewtonWalkCarryShoot.dproj
  11. 242 1
      Demos/Delphi/physics/OdeClothify/OdeClothify.dproj
  12. 1 1
      Demos/Delphi/physics/OdeConveyor/OdeConveyor.dproj
  13. 1 1
      Demos/Delphi/physics/OdeFurball/OdeFurBall.dproj
  14. 1 1
      Demos/Delphi/physics/OdeMachine/OdeMachine.dproj
  15. 1 1
      Demos/Delphi/physics/OdeRagdoll/OdeRagdoll.dproj
  16. 1 11
      Demos/Delphi/physics/OdeSimple/OdeSimple.dproj
  17. 2 2
      Demos/Delphi/physics/clothactor/Unit1.pas
  18. 1 1
      Demos/Delphi/physics/clothactor/clothactor.dproj
  19. 1 1
      Demos/Delphi/physics/odeterrain/OdeTerrain.dproj
  20. 0 2
      Packages/Win32/GLScene_RT.dpk
  21. 0 2
      Packages/Win32/GLScene_RT.dproj
  22. 0 2
      Packages/Win64/GLScene_RT.dpk
  23. 0 2
      Packages/Win64/GLScene_RT.dproj
  24. 3 3
      Source/FGuiSkinEditor.pas
  25. 3 3
      Source/FInfo.pas
  26. 3 3
      Source/FRFaceEditor.pas
  27. 3 3
      Source/FRMaterialPreview.pas
  28. 4 4
      Source/FRTextureEdit.pas
  29. 3 3
      Source/FRTrackBarEdit.pas
  30. 3 3
      Source/FXCollectionEditor.pas
  31. 3 2
      Source/File3DSConst.pas
  32. 5 7
      Source/File3DSTypes.pas
  33. 5 3
      Source/File3DSUtils.pas
  34. 3 3
      Source/FileB3D.pas
  35. 3 2
      Source/FileDDSImage.pas
  36. 3 2
      Source/FileDXTC.pas
  37. 195 9
      Source/FileLWObjects.pas
  38. 0 224
      Source/FileLWObjects.txt
  39. 3 3
      Source/FileQ3BSP.pas
  40. 2 3
      Source/FileTGA.pas
  41. 3 3
      Source/FileVFW.pas
  42. 3 3
      Source/FileVRMLParser.pas
  43. 3 3
      Source/FileX.pas
  44. 37 39
      Source/GLAnimatedSprite.pas
  45. 2 4
      Source/GLAnimationUtils.pas
  46. 5 3
      Source/GLAsmShader.pas
  47. 5 4
      Source/GLAsyncHDS.pas
  48. 5 3
      Source/GLAsyncTimer.pas
  49. 3 2
      Source/GLAtmosphere.pas
  50. 2 3
      Source/GLBaseMeshSilhouette.pas
  51. 9 10
      Source/GLBehaviours.pas
  52. 38 66
      Source/GLCadencer.pas
  53. 5 5
      Source/GLCameraController.pas
  54. 5 3
      Source/GLCanvas.pas
  55. 5 3
      Source/GLCelShader.pas
  56. 12 12
      Source/GLColor.pas
  57. 5 4
      Source/GLCompositeImage.pas
  58. 53 58
      Source/GLConsole.pas
  59. 5 3
      Source/GLCustomShader.pas
  60. 3 2
      Source/GLDCE.pas
  61. 5 4
      Source/GLEParticleMasksManager.pas
  62. 3 3
      Source/GLEllipseCollision.pas
  63. 2 3
      Source/GLFPSMovement.pas
  64. 3 3
      Source/GLFile3DSSceneObjects.pas
  65. 3 3
      Source/GLFileB3D.pas
  66. 0 2
      Source/GLFileBMP.pas
  67. 3 4
      Source/GLFileGL2.pas
  68. 5 5
      Source/GLFileGLB.pas
  69. 3 3
      Source/GLFileGLTF.pas
  70. 5 5
      Source/GLFileGTS.pas
  71. 3 3
      Source/GLFileLMTS.pas
  72. 3 3
      Source/GLFileLWO.pas
  73. 4 5
      Source/GLFileMD2.pas
  74. 3 4
      Source/GLFileMD3.pas
  75. 3 3
      Source/GLFileMD5.pas
  76. 5 3
      Source/GLFileMDC.pas
  77. 5 5
      Source/GLFileMP3.pas
  78. 35 31
      Source/GLFileMS3D.pas
  79. 5 3
      Source/GLFileNMF.pas
  80. 3 3
      Source/GLFileNurbs.pas
  81. 10 9
      Source/GLFileOBJ.pas
  82. 1 1
      Source/GLFileOCT.pas
  83. 7 7
      Source/GLFilePAK.pas
  84. 3 1
      Source/GLFileTGA.pas
  85. 3 3
      Source/GLFileVRML.pas
  86. 4 4
      Source/GLFileWAV.pas
  87. 2 3
      Source/GLFileX.pas
  88. 10 18
      Source/GLFileZLIB.pas
  89. 3 3
      Source/GLFireFX.pas
  90. 2 2
      Source/GLForces.pas
  91. 6 5
      Source/GLGLUTesselation.pas
  92. 3 3
      Source/GLGeomObjects.pas
  93. 51 57
      Source/GLGeometryBB.pas
  94. 78 137
      Source/GLGeometryCoordinates.pas
  95. 5 4
      Source/GLGizmo.pas
  96. 5 3
      Source/GLGizmoEx.pas
  97. 3 3
      Source/GLGraph.pas
  98. 4 4
      Source/GLHeightTileFileHDS.pas
  99. 5 4
      Source/GLHiddenLineShader.pas
  100. 3 1
      Source/GLJoints.pas

+ 1 - 1
Demos/Delphi/bench/smoking/smoking.dproj

@@ -8,7 +8,7 @@
         <AppType>Application</AppType>
         <FrameworkType>VCL</FrameworkType>
         <ProjectVersion>19.0</ProjectVersion>
-        <Platform Condition="'$(Platform)'==''">Win32</Platform>
+        <Platform Condition="'$(Platform)'==''">Win64</Platform>
     </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
         <Base>true</Base>

+ 5 - 1
Demos/Delphi/movements/SmoothNavigator/uMainForm.dfm

@@ -23,8 +23,9 @@ object Form1: TForm1
     Width = 642
     Height = 463
     Camera = GLCamera1
-    Buffer.BackgroundColor = clBackground
+    Buffer.BackgroundColor = clNavy
     FieldOfView = 155.624618530273400000
+    PenAsTouch = False
     Align = alClient
     OnMouseDown = GLSceneViewer1MouseDown
     OnMouseMove = GLSceneViewer1MouseMove
@@ -141,9 +142,12 @@ object Form1: TForm1
         Radius = 10.000000000000000000
       end
       object GLArrowLine1: TGLArrowLine
+        Material.BackProperties.Specular.Color = {0000003F0000003F0000003F0000803F}
+        Material.MaterialOptions = [moNoLighting]
         Direction.Coordinates = {000000000000803F0000000000000000}
         Position.Coordinates = {0000000000004843000000000000803F}
         Scale.Coordinates = {0000C8420000C8420000C84200000000}
+        ShowAxes = True
         Up.Coordinates = {0000000000000000000080BF00000000}
         BottomRadius = 0.100000001490116100
         Height = 1.000000000000000000

+ 1 - 4
Demos/Delphi/movements/pointto/Unit1.pas

@@ -43,9 +43,6 @@ type
     procedure GLCadencer1Progress(Sender: TObject; const deltaTime,
       newTime: Double);
   private
-     
-  public
-     
   end;
 
 var
@@ -60,7 +57,7 @@ procedure TForm1.GLCadencer1Progress(Sender: TObject; const deltaTime,
 begin
    // Make the blue sphere turn and ride a sin
    DCSphere.Turn(deltaTime*30);
-   Sphere.Position.Y:=Sin(DegToRad(newTime*50))*3;
+   Sphere.Position.Y := Sin(DegToRad(newTime*50))*3;
 
    // Make the arrow turn
    DCArrow.Turn(-deltaTime*15);

+ 1 - 1
Demos/Delphi/physics/NewtonDensity/NewtonDensity.dproj

@@ -7,7 +7,7 @@
         <TargetedPlatforms>3</TargetedPlatforms>
         <AppType>Application</AppType>
         <FrameworkType>VCL</FrameworkType>
-        <ProjectVersion>18.5</ProjectVersion>
+        <ProjectVersion>19.0</ProjectVersion>
         <Platform Condition="'$(Platform)'==''">Win32</Platform>
     </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">

+ 1 - 1
Demos/Delphi/physics/NewtonJoints/NewtonJoints.dproj

@@ -7,7 +7,7 @@
         <TargetedPlatforms>3</TargetedPlatforms>
         <AppType>Application</AppType>
         <FrameworkType>VCL</FrameworkType>
-        <ProjectVersion>18.5</ProjectVersion>
+        <ProjectVersion>19.0</ProjectVersion>
         <Platform Condition="'$(Platform)'==''">Win32</Platform>
     </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">

+ 1 - 1
Demos/Delphi/physics/NewtonMaterial/NewtonMaterial.dproj

@@ -7,7 +7,7 @@
         <TargetedPlatforms>1</TargetedPlatforms>
         <AppType>Application</AppType>
         <FrameworkType>VCL</FrameworkType>
-        <ProjectVersion>18.5</ProjectVersion>
+        <ProjectVersion>19.0</ProjectVersion>
         <Platform Condition="'$(Platform)'==''">Win32</Platform>
     </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">

+ 1 - 1
Demos/Delphi/physics/NewtonMousePick/NewtonMousePick.dproj

@@ -7,7 +7,7 @@
         <TargetedPlatforms>1</TargetedPlatforms>
         <AppType>Application</AppType>
         <FrameworkType>VCL</FrameworkType>
-        <ProjectVersion>18.5</ProjectVersion>
+        <ProjectVersion>19.0</ProjectVersion>
         <Platform Condition="'$(Platform)'==''">Win32</Platform>
     </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">

+ 1 - 1
Demos/Delphi/physics/NewtonSimpleSpawn/NewtonSimpleSpawn.dproj

@@ -7,7 +7,7 @@
         <TargetedPlatforms>1</TargetedPlatforms>
         <AppType>Application</AppType>
         <FrameworkType>VCL</FrameworkType>
-        <ProjectVersion>18.5</ProjectVersion>
+        <ProjectVersion>19.0</ProjectVersion>
         <Platform Condition="'$(Platform)'==''">Win32</Platform>
     </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">

+ 1 - 1
Demos/Delphi/physics/NewtonWalkAndCarry/NewtonWalkAndCarry.dproj

@@ -7,7 +7,7 @@
         <TargetedPlatforms>1</TargetedPlatforms>
         <AppType>Application</AppType>
         <FrameworkType>VCL</FrameworkType>
-        <ProjectVersion>18.5</ProjectVersion>
+        <ProjectVersion>19.0</ProjectVersion>
         <Platform Condition="'$(Platform)'==''">Win32</Platform>
     </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">

+ 1 - 1
Demos/Delphi/physics/NewtonWalkCarryShoot/NewtonWalkCarryShoot.dproj

@@ -7,7 +7,7 @@
         <TargetedPlatforms>1</TargetedPlatforms>
         <AppType>Application</AppType>
         <FrameworkType>VCL</FrameworkType>
-        <ProjectVersion>18.5</ProjectVersion>
+        <ProjectVersion>19.0</ProjectVersion>
         <Platform Condition="'$(Platform)'==''">Win32</Platform>
     </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">

+ 242 - 1
Demos/Delphi/physics/OdeClothify/OdeClothify.dproj

@@ -7,7 +7,7 @@
         <TargetedPlatforms>3</TargetedPlatforms>
         <AppType>Application</AppType>
         <FrameworkType>VCL</FrameworkType>
-        <ProjectVersion>18.5</ProjectVersion>
+        <ProjectVersion>19.0</ProjectVersion>
         <Platform Condition="'$(Platform)'==''">Win32</Platform>
     </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
@@ -170,12 +170,20 @@
                         <RemoteDir>classes</RemoteDir>
                         <Operation>1</Operation>
                     </Platform>
+                    <Platform Name="Android64">
+                        <RemoteDir>classes</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Name="AndroidFileProvider">
                     <Platform Name="Android">
                         <RemoteDir>res\xml</RemoteDir>
                         <Operation>1</Operation>
                     </Platform>
+                    <Platform Name="Android64">
+                        <RemoteDir>res\xml</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Name="AndroidGDBServer">
                     <Platform Name="Android">
@@ -188,12 +196,26 @@
                         <RemoteDir>library\lib\armeabi</RemoteDir>
                         <Operation>1</Operation>
                     </Platform>
+                    <Platform Name="Android64">
+                        <RemoteDir>library\lib\armeabi</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
+                <DeployClass Name="AndroidLibnativeArmeabiv7aFile">
+                    <Platform Name="Android64">
+                        <RemoteDir>library\lib\armeabi-v7a</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Name="AndroidLibnativeMipsFile">
                     <Platform Name="Android">
                         <RemoteDir>library\lib\mips</RemoteDir>
                         <Operation>1</Operation>
                     </Platform>
+                    <Platform Name="Android64">
+                        <RemoteDir>library\lib\mips</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Name="AndroidLibnativeX86File"/>
                 <DeployClass Name="AndroidServiceOutput">
@@ -201,84 +223,216 @@
                         <RemoteDir>library\lib\armeabi-v7a</RemoteDir>
                         <Operation>1</Operation>
                     </Platform>
+                    <Platform Name="Android64">
+                        <RemoteDir>library\lib\arm64-v8a</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
+                <DeployClass Name="AndroidServiceOutput_Android32">
+                    <Platform Name="Android64">
+                        <RemoteDir>library\lib\armeabi-v7a</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Name="AndroidSplashImageDef">
                     <Platform Name="Android">
                         <RemoteDir>res\drawable</RemoteDir>
                         <Operation>1</Operation>
                     </Platform>
+                    <Platform Name="Android64">
+                        <RemoteDir>res\drawable</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Name="AndroidSplashStyles">
                     <Platform Name="Android">
                         <RemoteDir>res\values</RemoteDir>
                         <Operation>1</Operation>
                     </Platform>
+                    <Platform Name="Android64">
+                        <RemoteDir>res\values</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Name="AndroidSplashStylesV21">
                     <Platform Name="Android">
                         <RemoteDir>res\values-v21</RemoteDir>
                         <Operation>1</Operation>
                     </Platform>
+                    <Platform Name="Android64">
+                        <RemoteDir>res\values-v21</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
+                <DeployClass Name="Android_Colors">
+                    <Platform Name="Android">
+                        <RemoteDir>res\values</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="Android64">
+                        <RemoteDir>res\values</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Name="Android_DefaultAppIcon">
                     <Platform Name="Android">
                         <RemoteDir>res\drawable</RemoteDir>
                         <Operation>1</Operation>
                     </Platform>
+                    <Platform Name="Android64">
+                        <RemoteDir>res\drawable</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Name="Android_LauncherIcon144">
                     <Platform Name="Android">
                         <RemoteDir>res\drawable-xxhdpi</RemoteDir>
                         <Operation>1</Operation>
                     </Platform>
+                    <Platform Name="Android64">
+                        <RemoteDir>res\drawable-xxhdpi</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Name="Android_LauncherIcon36">
                     <Platform Name="Android">
                         <RemoteDir>res\drawable-ldpi</RemoteDir>
                         <Operation>1</Operation>
                     </Platform>
+                    <Platform Name="Android64">
+                        <RemoteDir>res\drawable-ldpi</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Name="Android_LauncherIcon48">
                     <Platform Name="Android">
                         <RemoteDir>res\drawable-mdpi</RemoteDir>
                         <Operation>1</Operation>
                     </Platform>
+                    <Platform Name="Android64">
+                        <RemoteDir>res\drawable-mdpi</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Name="Android_LauncherIcon72">
                     <Platform Name="Android">
                         <RemoteDir>res\drawable-hdpi</RemoteDir>
                         <Operation>1</Operation>
                     </Platform>
+                    <Platform Name="Android64">
+                        <RemoteDir>res\drawable-hdpi</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Name="Android_LauncherIcon96">
                     <Platform Name="Android">
                         <RemoteDir>res\drawable-xhdpi</RemoteDir>
                         <Operation>1</Operation>
                     </Platform>
+                    <Platform Name="Android64">
+                        <RemoteDir>res\drawable-xhdpi</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
+                <DeployClass Name="Android_NotificationIcon24">
+                    <Platform Name="Android">
+                        <RemoteDir>res\drawable-mdpi</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="Android64">
+                        <RemoteDir>res\drawable-mdpi</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
+                <DeployClass Name="Android_NotificationIcon36">
+                    <Platform Name="Android">
+                        <RemoteDir>res\drawable-hdpi</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="Android64">
+                        <RemoteDir>res\drawable-hdpi</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
+                <DeployClass Name="Android_NotificationIcon48">
+                    <Platform Name="Android">
+                        <RemoteDir>res\drawable-xhdpi</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="Android64">
+                        <RemoteDir>res\drawable-xhdpi</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
+                <DeployClass Name="Android_NotificationIcon72">
+                    <Platform Name="Android">
+                        <RemoteDir>res\drawable-xxhdpi</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="Android64">
+                        <RemoteDir>res\drawable-xxhdpi</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
+                <DeployClass Name="Android_NotificationIcon96">
+                    <Platform Name="Android">
+                        <RemoteDir>res\drawable-xxxhdpi</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="Android64">
+                        <RemoteDir>res\drawable-xxxhdpi</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Name="Android_SplashImage426">
                     <Platform Name="Android">
                         <RemoteDir>res\drawable-small</RemoteDir>
                         <Operation>1</Operation>
                     </Platform>
+                    <Platform Name="Android64">
+                        <RemoteDir>res\drawable-small</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Name="Android_SplashImage470">
                     <Platform Name="Android">
                         <RemoteDir>res\drawable-normal</RemoteDir>
                         <Operation>1</Operation>
                     </Platform>
+                    <Platform Name="Android64">
+                        <RemoteDir>res\drawable-normal</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Name="Android_SplashImage640">
                     <Platform Name="Android">
                         <RemoteDir>res\drawable-large</RemoteDir>
                         <Operation>1</Operation>
                     </Platform>
+                    <Platform Name="Android64">
+                        <RemoteDir>res\drawable-large</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Name="Android_SplashImage960">
                     <Platform Name="Android">
                         <RemoteDir>res\drawable-xlarge</RemoteDir>
                         <Operation>1</Operation>
                     </Platform>
+                    <Platform Name="Android64">
+                        <RemoteDir>res\drawable-xlarge</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
+                <DeployClass Name="Android_Strings">
+                    <Platform Name="Android">
+                        <RemoteDir>res\values</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="Android64">
+                        <RemoteDir>res\values</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Name="DebugSymbols">
                     <Platform Name="iOSSimulator">
@@ -367,6 +521,9 @@
                     <Platform Name="Android">
                         <Operation>0</Operation>
                     </Platform>
+                    <Platform Name="Android64">
+                        <Operation>0</Operation>
+                    </Platform>
                     <Platform Name="iOSDevice32">
                         <Operation>0</Operation>
                     </Platform>
@@ -421,6 +578,16 @@
                         <Operation>1</Operation>
                     </Platform>
                 </DeployClass>
+                <DeployClass Name="iPad_Launch2x">
+                    <Platform Name="iOSDevice64">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="iOSSimulator">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
                 <DeployClass Name="iPad_Launch768">
                     <Platform Name="iOSDevice32">
                         <Operation>1</Operation>
@@ -432,6 +599,26 @@
                         <Operation>1</Operation>
                     </Platform>
                 </DeployClass>
+                <DeployClass Name="iPad_LaunchDark2x">
+                    <Platform Name="iOSDevice64">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="iOSSimulator">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
+                <DeployClass Name="iPhone_Launch2x">
+                    <Platform Name="iOSDevice64">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="iOSSimulator">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
                 <DeployClass Name="iPhone_Launch320">
                     <Platform Name="iOSDevice32">
                         <Operation>1</Operation>
@@ -443,6 +630,16 @@
                         <Operation>1</Operation>
                     </Platform>
                 </DeployClass>
+                <DeployClass Name="iPhone_Launch3x">
+                    <Platform Name="iOSDevice64">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="iOSSimulator">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
                 <DeployClass Name="iPhone_Launch640">
                     <Platform Name="iOSDevice32">
                         <Operation>1</Operation>
@@ -465,10 +662,33 @@
                         <Operation>1</Operation>
                     </Platform>
                 </DeployClass>
+                <DeployClass Name="iPhone_LaunchDark2x">
+                    <Platform Name="iOSDevice64">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="iOSSimulator">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
+                <DeployClass Name="iPhone_LaunchDark3x">
+                    <Platform Name="iOSDevice64">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="iOSSimulator">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
                 <DeployClass Name="ProjectAndroidManifest">
                     <Platform Name="Android">
                         <Operation>1</Operation>
                     </Platform>
+                    <Platform Name="Android64">
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Name="ProjectiOSDeviceDebug">
                     <Platform Name="iOSDevice32">
@@ -509,6 +729,16 @@
                         <Operation>1</Operation>
                     </Platform>
                 </DeployClass>
+                <DeployClass Name="ProjectiOSLaunchScreen">
+                    <Platform Name="iOSDevice64">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen</RemoteDir>
+                        <Operation>64</Operation>
+                    </Platform>
+                    <Platform Name="iOSSimulator">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen</RemoteDir>
+                        <Operation>64</Operation>
+                    </Platform>
+                </DeployClass>
                 <DeployClass Name="ProjectiOSResource">
                     <Platform Name="iOSDevice32">
                         <Operation>1</Operation>
@@ -561,6 +791,10 @@
                         <RemoteDir>library\lib\armeabi-v7a</RemoteDir>
                         <Operation>1</Operation>
                     </Platform>
+                    <Platform Name="Android64">
+                        <RemoteDir>library\lib\arm64-v8a</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
                     <Platform Name="iOSDevice32">
                         <Operation>1</Operation>
                     </Platform>
@@ -585,6 +819,12 @@
                         <Operation>0</Operation>
                     </Platform>
                 </DeployClass>
+                <DeployClass Name="ProjectOutput_Android32">
+                    <Platform Name="Android64">
+                        <RemoteDir>library\lib\armeabi-v7a</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
                 <DeployClass Name="ProjectUWPManifest">
                     <Platform Name="Win32">
                         <Operation>1</Operation>
@@ -622,6 +862,7 @@
                 <ProjectRoot Platform="Android" Name="$(PROJECTNAME)"/>
                 <ProjectRoot Platform="OSX64" Name="$(PROJECTNAME).app"/>
                 <ProjectRoot Platform="iOSSimulator" Name="$(PROJECTNAME).app"/>
+                <ProjectRoot Platform="Android64" Name="$(PROJECTNAME)"/>
             </Deployment>
         </BorlandProject>
         <ProjectFileVersion>12</ProjectFileVersion>

+ 1 - 1
Demos/Delphi/physics/OdeConveyor/OdeConveyor.dproj

@@ -7,7 +7,7 @@
         <TargetedPlatforms>1</TargetedPlatforms>
         <AppType>Application</AppType>
         <FrameworkType>VCL</FrameworkType>
-        <ProjectVersion>18.5</ProjectVersion>
+        <ProjectVersion>19.0</ProjectVersion>
         <Platform Condition="'$(Platform)'==''">Win32</Platform>
     </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">

+ 1 - 1
Demos/Delphi/physics/OdeFurball/OdeFurBall.dproj

@@ -7,7 +7,7 @@
         <TargetedPlatforms>1</TargetedPlatforms>
         <AppType>Application</AppType>
         <FrameworkType>VCL</FrameworkType>
-        <ProjectVersion>18.5</ProjectVersion>
+        <ProjectVersion>19.0</ProjectVersion>
         <Platform Condition="'$(Platform)'==''">Win32</Platform>
     </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">

+ 1 - 1
Demos/Delphi/physics/OdeMachine/OdeMachine.dproj

@@ -7,7 +7,7 @@
         <TargetedPlatforms>1</TargetedPlatforms>
         <AppType>Application</AppType>
         <FrameworkType>VCL</FrameworkType>
-        <ProjectVersion>18.5</ProjectVersion>
+        <ProjectVersion>19.0</ProjectVersion>
         <Platform Condition="'$(Platform)'==''">Win32</Platform>
     </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">

+ 1 - 1
Demos/Delphi/physics/OdeRagdoll/OdeRagdoll.dproj

@@ -7,7 +7,7 @@
         <TargetedPlatforms>1</TargetedPlatforms>
         <AppType>Application</AppType>
         <FrameworkType>VCL</FrameworkType>
-        <ProjectVersion>18.5</ProjectVersion>
+        <ProjectVersion>19.0</ProjectVersion>
         <Platform Condition="'$(Platform)'==''">Win32</Platform>
     </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">

+ 1 - 11
Demos/Delphi/physics/OdeSimple/OdeSimple.dproj

@@ -7,7 +7,7 @@
         <TargetedPlatforms>3</TargetedPlatforms>
         <AppType>Application</AppType>
         <FrameworkType>VCL</FrameworkType>
-        <ProjectVersion>18.5</ProjectVersion>
+        <ProjectVersion>19.0</ProjectVersion>
         <Platform Condition="'$(Platform)'==''">Win32</Platform>
     </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
@@ -45,12 +45,6 @@
         <CfgParent>Base</CfgParent>
         <Base>true</Base>
     </PropertyGroup>
-    <PropertyGroup Condition="('$(Platform)'=='iOSDevice64' and '$(Cfg_2)'=='true') or '$(Cfg_2_iOSDevice64)'!=''">
-        <Cfg_2_iOSDevice64>true</Cfg_2_iOSDevice64>
-        <CfgParent>Cfg_2</CfgParent>
-        <Cfg_2>true</Cfg_2>
-        <Base>true</Base>
-    </PropertyGroup>
     <PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Cfg_2)'=='true') or '$(Cfg_2_Win32)'!=''">
         <Cfg_2_Win32>true</Cfg_2_Win32>
         <CfgParent>Cfg_2</CfgParent>
@@ -113,9 +107,6 @@
         <DCC_Define>DEBUG;$(DCC_Define)</DCC_Define>
         <DCC_Optimize>false</DCC_Optimize>
     </PropertyGroup>
-    <PropertyGroup Condition="'$(Cfg_2_iOSDevice64)'!=''">
-        <BT_BuildType>Debug</BT_BuildType>
-    </PropertyGroup>
     <PropertyGroup Condition="'$(Cfg_2_Win32)'!=''">
         <DCC_ExeOutput>.\$(Platform)\$(Config)</DCC_ExeOutput>
         <VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
@@ -174,7 +165,6 @@
                 </Excluded_Packages>
             </Delphi.Personality>
             <Platforms>
-                <Platform value="iOSDevice64">False</Platform>
                 <Platform value="Win32">True</Platform>
                 <Platform value="Win64">True</Platform>
             </Platforms>

+ 2 - 2
Demos/Delphi/physics/clothactor/Unit1.pas

@@ -210,11 +210,11 @@ begin
   // Add the collider's verlet constraints to the verlet world
   AddSCVerletConstriantsToVerletWorld(GLActor1.Skeleton.Colliders, VerletWorld);
 
-  { AirResistance := TVFAirResistance.Create(VerletWorld);
+  (* AirResistance := TVFAirResistance.Create(VerletWorld);
     AirResistance.DragCoeff := 0.001;
     AirResistance.WindDirection := AffineVectorMake(0,0,1);
     AirResistance.WindMagnitude := 15;
-    AirResistance.WindChaos := 2;// }
+    AirResistance.WindChaos := 2;// *)
 end;
 
 procedure TForm1.FormDestroy(Sender: TObject);

+ 1 - 1
Demos/Delphi/physics/clothactor/clothactor.dproj

@@ -7,7 +7,7 @@
         <TargetedPlatforms>3</TargetedPlatforms>
         <AppType>Application</AppType>
         <FrameworkType>VCL</FrameworkType>
-        <ProjectVersion>18.5</ProjectVersion>
+        <ProjectVersion>19.0</ProjectVersion>
         <Platform Condition="'$(Platform)'==''">Win32</Platform>
     </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">

+ 1 - 1
Demos/Delphi/physics/odeterrain/OdeTerrain.dproj

@@ -7,7 +7,7 @@
         <TargetedPlatforms>1</TargetedPlatforms>
         <AppType>Application</AppType>
         <FrameworkType>VCL</FrameworkType>
-        <ProjectVersion>18.5</ProjectVersion>
+        <ProjectVersion>19.0</ProjectVersion>
         <Platform Condition="'$(Platform)'==''">Win32</Platform>
     </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">

+ 0 - 2
Packages/Win32/GLScene_RT.dpk

@@ -188,8 +188,6 @@ contains
   GLParticleFX in '..\..\Source\GLParticleFX.pas',
   GLParticles in '..\..\Source\GLParticles.pas',
   GLPerlin in '..\..\Source\GLPerlin.pas',
-  GLPerlinBase in '..\..\Source\GLPerlinBase.pas',
-  GLPerlinNoise3D in '..\..\Source\GLPerlinNoise3D.pas',
   GLPerlinPFX in '..\..\Source\GLPerlinPFX.pas',
   GLPersistentClasses in '..\..\Source\GLPersistentClasses.pas',
   GLPhongShader in '..\..\Source\GLPhongShader.pas',

+ 0 - 2
Packages/Win32/GLScene_RT.dproj

@@ -282,8 +282,6 @@
         <DCCReference Include="..\..\Source\GLParticleFX.pas"/>
         <DCCReference Include="..\..\Source\GLParticles.pas"/>
         <DCCReference Include="..\..\Source\GLPerlin.pas"/>
-        <DCCReference Include="..\..\Source\GLPerlinBase.pas"/>
-        <DCCReference Include="..\..\Source\GLPerlinNoise3D.pas"/>
         <DCCReference Include="..\..\Source\GLPerlinPFX.pas"/>
         <DCCReference Include="..\..\Source\GLPersistentClasses.pas"/>
         <DCCReference Include="..\..\Source\GLPhongShader.pas"/>

+ 0 - 2
Packages/Win64/GLScene_RT.dpk

@@ -190,8 +190,6 @@ contains
   GLParticleFX in '..\..\Source\GLParticleFX.pas',
   GLParticles in '..\..\Source\GLParticles.pas',
   GLPerlin in '..\..\Source\GLPerlin.pas',
-  GLPerlinBase in '..\..\Source\GLPerlinBase.pas',
-  GLPerlinNoise3D in '..\..\Source\GLPerlinNoise3D.pas',
   GLPerlinPFX in '..\..\Source\GLPerlinPFX.pas',
   GLPersistentClasses in '..\..\Source\GLPersistentClasses.pas',
   GLPhongShader in '..\..\Source\GLPhongShader.pas',

+ 0 - 2
Packages/Win64/GLScene_RT.dproj

@@ -292,8 +292,6 @@
         <DCCReference Include="..\..\Source\GLParticleFX.pas"/>
         <DCCReference Include="..\..\Source\GLParticles.pas"/>
         <DCCReference Include="..\..\Source\GLPerlin.pas"/>
-        <DCCReference Include="..\..\Source\GLPerlinBase.pas"/>
-        <DCCReference Include="..\..\Source\GLPerlinNoise3D.pas"/>
         <DCCReference Include="..\..\Source\GLPerlinPFX.pas"/>
         <DCCReference Include="..\..\Source\GLPersistentClasses.pas"/>
         <DCCReference Include="..\..\Source\GLPhongShader.pas"/>

+ 3 - 3
Source/FGuiSkinEditor.pas

@@ -1,11 +1,11 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
-{
-   Editor for Gui skin. 
-}
+
 unit FGuiSkinEditor;
 
+(*  Editor for Gui skin. *)
+
 interface
 
 {$I GLScene.inc}

+ 3 - 3
Source/FInfo.pas

@@ -1,11 +1,11 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
-{
-  Informations on OpenGL driver and contributions
-}
+
 unit FInfo;
 
+(* Informations on OpenGL driver and contributions *)
+
 interface
 
 {$I GLScene.inc}

+ 3 - 3
Source/FRFaceEditor.pas

@@ -1,11 +1,11 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
-{
-  Editor frame for a TGLFaceProperties. 
-}
+
 unit FRFaceEditor;
 
+(* Editor frame for a TGLFaceProperties. *)
+
 interface
 
 {$I GLScene.inc}

+ 3 - 3
Source/FRMaterialPreview.pas

@@ -1,11 +1,11 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
-{
-   Material Preview frame. 
-}
+
 unit FRMaterialPreview;
 
+(* Material Preview frame. *)
+
 interface
 
 {$I GLScene.inc}

+ 4 - 4
Source/FRTextureEdit.pas

@@ -1,12 +1,12 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
-{
-  Basic editing frame for TGLTexture 
-}
-{ TODO : Replace STImageClass with a dropdown (polymorphism) }
+
 unit FRTextureEdit;
 
+(* Basic editing frame for TGLTexture *)
+// TODO : Replace STImageClass with a dropdown (polymorphism) 
+
 interface
 
 {$I GLScene.inc}

+ 3 - 3
Source/FRTrackBarEdit.pas

@@ -1,11 +1,11 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
-{
-   Frame combining a TrackBar and an Edit. 
-}
+
 unit FRTrackBarEdit;
 
+(* Frame combining a TrackBar and an Edit. *)
+
 interface
 
 {$I GLScene.inc}

+ 3 - 3
Source/FXCollectionEditor.pas

@@ -1,11 +1,11 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
-(*
-  Edits a TXCollection
-*)
+
 unit FXCollectionEditor;
 
+(* Edits a TXCollection *)
+
 interface
 
 {$I GLScene.inc}

+ 3 - 2
Source/File3DSConst.pas

@@ -1,6 +1,9 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
+
+unit File3DSConst;
+
 (*
  All 3DS constant definitions used by the various routines (mainly in Utils3DS.pas). About one thousand
  defined constants herein. The guys at Autodesk must be crazy...
@@ -8,8 +11,6 @@
  (c) Copyright 1999, Dipl. Ing. Mike Lischke ([email protected])
 *)
 
-unit File3DSConst;
-
 interface
 
 uses

+ 5 - 7
Source/File3DSTypes.pas

@@ -1,18 +1,16 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
-{
-   Implements the standard Teapot, build from evaluators. 
-}
+
+unit File3DSTypes;
+
+(* Implements the standard Teapot, build from evaluators. *)
 
 // This unit contains all of the data types used by the core routines. Most of these are only used
 // with the internal database, created when a file is loaded.
-//
-// Last change - 03. October 1999
-//
+// Initial developer
 // (c) Copyright 1999, Dipl. Ing. Mike Lischke ([email protected])
 
-unit File3DSTypes;
 
 {$ALIGN ON}
 {$MINENUMSIZE 4}

+ 5 - 3
Source/File3DSUtils.pas

@@ -1,12 +1,14 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
-{
+
+unit File3DSUtils;
+
+(*
    Utility functions for the universal 3DS file reader and writer (TFile3DS).
    Essentially, the functions here are the heart of the import library as
    they deal actually with the database and chunks.
-}
-unit File3DSUtils;
+*)
 
 interface
 

+ 3 - 3
Source/FileB3D.pas

@@ -1,11 +1,11 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
-{
-    File streaming class for the B3D loader
-}
+
 unit FileB3D;
 
+(* File streaming class for the B3D loader *)
+
 interface
 
 {$I GLScene.inc}

+ 3 - 2
Source/FileDDSImage.pas

@@ -1,6 +1,9 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
+
+unit FileDDSImage;
+
 (*
     Alternative for DDS unit with more supported formats of flat image:
     Alpha8, Luminance8, R3G3B2, RGB5A1, RGBA4, Alpha8Luminance8, Luminance16, R5G6B5,
@@ -12,8 +15,6 @@
     so you may include both DDSImage (preview) and GLFileDDS (loading)
 *)
 
-unit FileDDSImage;
-
 interface
 
 {$I GLScene.inc}

+ 3 - 2
Source/FileDXTC.pas

@@ -1,13 +1,14 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
+
+unit FileDXTC;
+
 (*
    DXTC (also S3TC) decoding.
    Adapted from DevIL image library (http://openil.sourceforge.net)
 *)
 
-unit FileDXTC;
-
 interface
 
   {$I GLScene.inc}

+ 195 - 9
Source/FileLWObjects.pas

@@ -4,19 +4,205 @@
 
 unit FileLWObjects;
 
-(* -------------------------------------------------------------------------------
-  Unit Name:  Lightwave
+(* =============================================================
+
+This unit provides functions, constants and now classes for use in
+working with Lightwave3D Object files.
+
+Chunk ID constants are defined for all of the Chunk IDs listed
+in the Lightwave 7.5 sdk.
+It is important to note that this is a constant work-in-progress
+and as such there are omissions and may be errors. Feedback and
+suggestions would be appreciated.
+There are two ways of using this unit. The first uses user-defines
+callbacks to handle parsing lwo chunk data. The second way uses
+object orientation.
+
+Loading LWO chunk data via callbacks
+A function is provided for loading a Lightwave object from a file.
+The Loader itself uses a callback mechanism for the loading of
+Lightwave object chunks. The callback is called for every chunk
+(with the exception of the FORM and LWOB or LWO2 chunks).
+
+The Chunk struct passed in the callback contains members for the
+chunk ID, chunk size and pointer to chunk data. This data is
+untouched internally so any parsing and numeric formatting
+is up to you. This provides maximum flexibility and allows you to
+handle the data that you need without loading the entire object
+into ram first.
+
+The chunk data memory is freed upon the return of the callback
+so do not keep a reference to the chunk data. Copy it to your own
+storage.
+
+function LoadLW0(const Filename: string; ReadProc: TLWOReadProc;
+ UserData: Pointer): LongWord; cdecl;
+
+ Filename:      The fully qualified filename of the file to be
+                loaded.
+
+ ReadCallback:  The address of a TLWOReadCallback procedure
+                defined as:
+                TLWOReadCallback = procedure(Chunk: TLWChunk;
+                  UserData: Pointer); cdecl;
+                This procedure will be called for every chunk
+                encountered in the Lightwave object file. The
+                Chunk parameter is the chunk struct of the chunk
+                being loaded. UserData is the pointer supplied
+                in the original call to LoadLWO (see below).
+
+ UserData:      A pointer to user supplied data to be passed
+                in the ReadCallback.
+
+A non-zero results indicates that the object file was parsed
+successfully.
+
+Loading LWO chunks via objects
+============================
+To load data from a lightwave object file, create an instance of
+TLWObjectFile and call its LoadFromFile method.
+
+The data can then be accessed with the Chunks array property and
+iterated in combination with the ChunkCount property.
+
+Chunk data is parsed and interfaced by descendents of the TLWChunk
+class. I have made handlers for the following chunk types:
+
+TLWLayr  Modeler Layer chunk
+TLWPnts  Points chunk
+TLWPols  Polygons chunk
+TLWPTag  Polygon tag mapping
+TLWSurf  Surface subchunk container
+TLWTags  Tags (Name tag strings for named items)
+TLWVMap  Vertex Mapping
+
+The data for chunks without handlers can be gotten at with the
+Data and Size properties of the TLWChunk. Data is a pointer to
+the start of the chunk data. This data is unparsed.
+Data is nil for descendents.
+
+
+This should provide enough to move geometry into your favourite
+delphi-based 3d engine.
+
+
+Making chunk handler objects
+============================
+
+All chunk types are derived from TLWChunk in the following manner:
+
+TLWChunk
+
+ex:
+
+TLWPTag        <- PTAG chunk type. polygon tag map.
+
+TLWParentChunk <- A base class for chunks that can contain other chunks.
+                 This is not necessarily how the data is stored in
+                 the file but more for ease of access to data.
+ ex:
+ TLWPnts <- PNTS chunk type (points)
+ TLWLayr <- LAYR chunk type (modeler layer)
+ TLWSurf <- SURF chunk type (constains surface attributes as sub chunks)
+ TLWSubChunk <- A base class for chunks whose max data len is 65536 bytes.
+ TLWDiff   <- DIFF subchunk type (diffuse surface parameter)
+ TLWSpec   <- SPEC subchunk type (specularity surface parameter)...
+ etc.
+
+Each descendent of TLWChunk or TLWSubChunk is required to override
+the GetID class function, the LoadData method and the Clear method
+to provide custom handling for chunktype data.
+
+ex:
+...
+type
+  TLWPnts = class (TLWParentChunk)
+  private
+    FPoints: TVEC12DynArray;
+    function GetCount: LongWord;
+    protected
+    procedure Clear; override;
+    procedure LoadData(AStream: TStream; DataStart, DataSize: LongWord); override;
+  public
+    class function GetID: TID4; override;
+    function GetVMap(VMapID: TID4; out VMap: TLWVMap): boolean;
+    property Count: LongWord read GetCount;
+    property Points: TVEC12DynArray read FPoints;
+  end;
+...
+
+// Return the the chunk id that is the target of this handler
+
+class function TLWPnts.GetID: TID4;
+begin
+  result := ID_PNTS;
+end;
+
+// Load the point data - the stream is already positioned at the start of the chunk data
+
+procedure TLWPnts.LoadData(AStream: TStream; DataStart, DataSize: LongWord);
+begin
+  SetLength(FPoints,DataSize div 12); // allocate storage for DataSize div 12 points
+  ReadMotorolaNumber(AStream,@FPoints[0],4,DataSize div 4); // read the point data
+end;
+
+
+// Cleanup - Free any memory that you've allocated
+
+procedure TLWPnts.Clear;
+begin
+  SetLength(FPoints,0);
+end;
+
+
+Utility Functions
+=================
+A function is provided for converting an array of numbers between
+Motorola and Intel format (big endian <-> little endian). Converting
+only needs to be done for numeric types that are of 2 or 4 byte
+lengths.
+
+procedure ReverseByteOrder(ValueIn: Pointer; Size: integer; Count: integer = 1);
+
+ ValueIn: The address of a number or array of numbers to have their
+          bytes swapped.
+ Size:    The size in bytes of each numeric type.
+ Count:   The count of numbers in the numbers array. The default
+          value is 1.
+
+Two routines are provided for reading and writing big endian
+(Motorola and misc other processor vendors ) numbers to and from a
+stream. These routines handle 2 and 4 byte numeric types and can
+also handle arrays.
+
+procedure ReadMotorolaNumber(Stream: TStream; Data: Pointer;
+ ElementSize: integer; Count: integer = 1);
+
+function WriteMotorolaNumber(Stream: TStream; Data: Pointer;
+ ElementSize: integer; Count: integer = 1): Integer;
+
+Each take a valid TStream descendent, a pointer to the numeric data,
+the element size of the data elements (either 2 or 4) and the array
+element count if sending an array. The default count is 1.
+
+Notes for improvement of this unit:
+
+- A version ID tag should be visible to all chunks in order to
+ provide handling for Lightwave pre 6.0 object files.
+
+- Chunk type handlers should leave memory allocation to
+ the base class (TLWChunk) and act more as an interface
+ to the data pointed to by Data in TLWChunk. This would
+ keep memory allocation very efficient and make implementing
+ chunk handlers even easier.
+
   Author:     Brian Johns [email protected]
   Purpose:    Lightwave object support unit for Delphi.
-
   Notes:      For the Lightwave Object File Format documentation please refer to
   http://www.lightwave3d.com/developer.
-
-  License:    This unit is distributed under the Mozilla Public License.
-  For license details, refer to http://www.mozilla.org
   Lightwave3D is a registered trademark of Newtek Incorporated.
 
-  ------------------------------------------------------------------------------- *)
+===================================================================== *)
 
 interface
 
@@ -255,7 +441,7 @@ type
   TColr4 = array [0 .. 3] of TU1;
   PColr4 = ^TColr4;
 
-  { Lightwave Chunk Struct - Used in TLWOReadCallback }
+  // Lightwave Chunk Struct - Used in TLWOReadCallback
   PLWChunkRec = ^TLWChunkRec;
 
   TLWChunkRec = record
@@ -264,7 +450,7 @@ type
     data: Pointer;
   end;
 
-  { Lightwave SubChunk Struct - Used in TLWOReadCallback }
+  // Lightwave SubChunk Struct - Used in TLWOReadCallback
   PLWSubChunkRec = ^TLWSubChunkRec;
 
   TLWSubChunkRec = record

+ 0 - 224
Source/FileLWObjects.txt

@@ -1,224 +0,0 @@
-FileLWObjects.pas
-=============
-
-This unit provides functions, constants and now classes for use in
-working with Lightwave3D Object files.
-
-Chunk ID constants are defined for all of the Chunk IDs listed
-in the Lightwave 7.5 sdk.
-
-It is important to note that this is a constant work-in-progress
-and as such there are omissions and may be errors. Feedback and
-suggestions would be appreciated.
-
-There are two ways of using this unit. The first uses user-defines
-callbacks to handle parsing lwo chunk data. The second way uses
-object orientation.
-
-Loading LWO chunk data via callbacks
-====================================
-
-A function is provided for loading a Lightwave object from a file.
-The Loader itself uses a callback mechanism for the loading of
-Lightwave object chunks. The callback is called for every chunk
-(with the exception of the FORM and LWOB or LWO2 chunks).
-
-The Chunk struct passed in the callback contains members for the
-chunk ID, chunk size and pointer to chunk data. This data is
-untouched internally so any parsing and numeric formatting
-is up to you. This provides maximum flexibility and allows you to
-handle the data that you need without loading the entire object
-into ram first.
-
-The chunk data memory is freed upon the return of the callback
-so do not keep a reference to the chunk data. Copy it to your own
-storage.
-
-function LoadLW0(const Filename: string; ReadProc: TLWOReadProc;
- UserData: Pointer): LongWord; cdecl;
-
- Filename:      The fully qualified filename of the file to be
-                loaded.
-
- ReadCallback:  The address of a TLWOReadCallback procedure
-                defined as:
-
-                TLWOReadCallback = procedure(Chunk: TLWChunk;
-                  UserData: Pointer); cdecl;
-
-                This procedure will be called for every chunk
-                encountered in the Lightwave object file. The
-                Chunk parameter is the chunk struct of the chunk
-                being loaded. UserData is the pointer supplied
-                in the original call to LoadLWO (see below).
-
-
- UserData:      A pointer to user supplied data to be passed
-                in the ReadCallback.
-
-
-A non-zero results indicates that the object file was parsed
-successfully.
-
-Loading LWO chunks via objects
-==============================
-
-To load data from a lightwave object file, create an instance of
-TLWObjectFile and call its LoadFromFile method.
-
-The data can then be accessed with the Chunks array property and
-iterated in combination with the ChunkCount property.
-
-Chunk data is parsed and interfaced by descendents of the TLWChunk
-class. I have made handlers for the following chunk types:
-
-TLWLayr  Modeler Layer chunk
-TLWPnts  Points chunk
-TLWPols  Polygons chunk
-TLWPTag  Polygon tag mapping
-TLWSurf  Surface subchunk container
-TLWTags  Tags (Name tag strings for named items)
-TLWVMap  Vertex Mapping
-
-The data for chunks without handlers can be gotten at with the
-Data and Size properties of the TLWChunk. Data is a pointer to
-the start of the chunk data. This data is unparsed.
-Data is nil for descendents.
-
-
-This should provide enough to move geometry into your favourite
-delphi-based 3d engine.
-
-
-Making chunk handler objects
-============================
-
-All chunk types are derived from TLWChunk in the following manner:
-
-TLWChunk
-
-ex:
-
-TLWPTag        <- PTAG chunk type. polygon tag map.
-
-
-
-TLWParentChunk <- A base class for chunks that can contain other chunks.
-                 This is not necessarily how the data is stored in
-                 the file but more for ease of access to data.
-
- ex:
-
- TLWPnts <- PNTS chunk type (points)
- TLWLayr <- LAYR chunk type (modeler layer)
-
- TLWSurf <- SURF chunk type (constains surface attributes as sub chunks)
-
-TLWSubChunk <- A base class for chunks whose max data len is 65536 bytes.
- TLWDiff   <- DIFF subchunk type (diffuse surface parameter)
- TLWSpec   <- SPEC subchunk type (specularity surface parameter)...
- etc.
-
-Each descendent of TLWChunk or TLWSubChunk is required to override
-the GetID class function, the LoadData method and the Clear method
-to provide custom handling for chunktype data.
-
-
-ex:
-
-...
-
-type
-
-  TLWPnts = class (TLWParentChunk)
-  private
-    FPoints: TVEC12DynArray;
-    function GetCount: LongWord;
-    protected
-    procedure Clear; override;
-    procedure LoadData(AStream: TStream; DataStart, DataSize: LongWord); override;
-  public
-    class function GetID: TID4; override;
-    function GetVMap(VMapID: TID4; out VMap: TLWVMap): boolean;
-    property Count: LongWord read GetCount;
-    property Points: TVEC12DynArray read FPoints;
-  end;
-
-...
-
-
-(* Return the the chunk id that is the target of this handler *)
-
-class function TLWPnts.GetID: TID4;
-begin
-  result := ID_PNTS;
-end;
-
-(* Load the point data -
-   the stream is already positioned at the start of the chunk data *)
-
-procedure TLWPnts.LoadData(AStream: TStream; DataStart, DataSize: LongWord);
-begin
-  SetLength(FPoints,DataSize div 12); // allocate storage for DataSize div 12 points
-  ReadMotorolaNumber(AStream,@FPoints[0],4,DataSize div 4); // read the point data
-end;
-
-
-(* Cleanup - Free any memory that you've allocated *)
-
-procedure TLWPnts.Clear;
-begin
-  SetLength(FPoints,0);
-end;
-
-
-Utility Functions
-=================
-A function is provided for converting an array of numbers between
-Motorola and Intel format (big endian <-> little endian). Converting
-only needs to be done for numeric types that are of 2 or 4 byte
-lengths.
-
-procedure ReverseByteOrder(ValueIn: Pointer; Size: integer;
-
- Count: integer = 1);
-
- ValueIn: The address of a number or array of numbers to have their
-          bytes swapped.
-
- Size:    The size in bytes of each numeric type.
-
- Count:   The count of numbers in the numbers array. The default
-          value is 1.
-
-
-Two routines are provided for reading and writing big endian
-(Motorola and misc other processor vendors ) numbers to and from a
-stream. These routines handle 2 and 4 byte numeric types and can
-also handle arrays.
-
-procedure ReadMotorolaNumber(Stream: TStream; Data: Pointer;
- ElementSize: integer; Count: integer = 1);
-
-function WriteMotorolaNumber(Stream: TStream; Data: Pointer;
- ElementSize: integer; Count: integer = 1): Integer;
-
-Each take a valid TStream descendent, a pointer to the numeric data,
-the element size of the data elements (either 2 or 4) and the array
-element count if sending an array. The default count is 1.
-
-
-
-Notes for improvement of this unit:
-
-- A version ID tag should be visible to all chunks in order to
- provide handling for Lightwave pre 6.0 object files.
-
-- Chunk type handlers should leave memory allocation to
- the base class (TLWChunk) and act more as an interface
- to the data pointed to by Data in TLWChunk. This would
- keep memory allocation very efficient and make implementing
- chunk handlers even easier.
-
-- A future Lightwave support unit could possibly benefit from the
- use of delphi's interface type.

+ 3 - 3
Source/FileQ3BSP.pas

@@ -1,11 +1,11 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
-(*
-  Simple Quake III BSP file loader.
-*)
+
 unit FileQ3BSP;
 
+(* Simple Quake III BSP file loader. *)
+
 interface
 
 uses 

+ 2 - 3
Source/FileTGA.pas

@@ -1,12 +1,11 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
-{
-   Graphic engine friendly loading of TGA image.
-}
 
 unit FileTGA;
 
+(* Graphic engine friendly loading of TGA image. *)
+
 interface
 
 {.$I GLScene.inc}

+ 3 - 3
Source/FileVFW.pas

@@ -1,11 +1,11 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
-(*
-   Video for windows
-*)
+
 unit FileVFW;
 
+(*  Video for windows *)
+
 interface
 
 {.$UNDEF UNICODE}

+ 3 - 3
Source/FileVRMLParser.pas

@@ -1,11 +1,11 @@
 //
 // The unit is part of the GLScene Engine, http://glscene.org
 //
-(*
-  VRML file format parser.
-*)
+
 unit FileVRMLParser;
 
+(*  VRML file format parser. *)
+
 interface
 
 {$I GLScene.inc}

+ 3 - 3
Source/FileX.pas

@@ -1,11 +1,11 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
-(*
-    Simple X format support for Delphi (Microsoft's favorite format)
-*)
+
 unit FileX;
 
+(* Simple X format support for Delphi (Microsoft's favorite format) *)
+
 interface
 
 {$I GLScene.inc}

+ 37 - 39
Source/GLAnimatedSprite.pas

@@ -1,11 +1,11 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
-{
-  A sprite that uses a scrolling texture for animation. 
-}
+
 unit GLAnimatedSprite;
 
+(* A sprite that uses a scrolling texture for animation. *)
+
 interface
 
 {$I GLScene.inc}
@@ -34,8 +34,8 @@ type
   TGLSpriteAnimationList = class;
   TGLAnimatedSprite = class;
 
-  { Used by the SpriteAnimation when Dimensions are set manual. The animation
-    will use the offsets, width and height to determine the texture coodinates for this frame. }
+  (* Used by the SpriteAnimation when Dimensions are set manual. The animation
+    will use the offsets, width and height to determine the texture coodinates for this frame. *)
   TGLSpriteAnimFrame = class(TXCollectionItem)
   private
     FOffsetX,
@@ -66,14 +66,14 @@ type
     class function ItemsClass: TXCollectionItemClass; override;
   end;
 
-  {Determines if the texture coordinates are Automatically generated
+  (* Determines if the texture coordinates are Automatically generated
      from the Animations properties or if they are Manually set through
-     the Frames collection. }
+     the Frames collection. *)
   TGLSpriteFrameDimensions = (sfdAuto, sfdManual);
 
-  { Used to mask the auto generated frames. The Left, Top, Right and
+  (* Used to mask the auto generated frames. The Left, Top, Right and
     Bottom properties determines the number of pixels to be cropped
-    from each corresponding side of the frame. Only applicable to auto dimensions. }
+    from each corresponding side of the frame. Only applicable to auto dimensions. *)
   TGLSpriteAnimMargins = class(TPersistent)
   private
     FOwner: TGLSpriteAnimation;
@@ -94,7 +94,7 @@ type
     property Bottom: Integer read FBottom write SetBottom;
   end;
 
-  {Animations define how the texture coordinates for each offset are to be determined. }
+  // Animations define how the texture coordinates for each offset are to be determined. 
   TGLSpriteAnimation = class(TXCollectionItem, IGLMaterialLibrarySupported)
   private
     FCurrentFrame,
@@ -140,48 +140,48 @@ type
     property FrameWidth: Integer read FFrameWidth write SetFrameWidth;
     // Height of each frame in an auto dimension animation.
     property FrameHeight: Integer read FFrameHeight write SetFrameHeight;
-    {The name of the lib material the sprites associated material library
-       for this animation. }
+    (* The name of the lib material the sprites associated material library
+       for this animation. *)
     property LibMaterialName: TGLLibMaterialName read FLibMaterialName write
       SetLibMaterialName;
-    {Manual dimension animation frames. Stores the offsets and dimensions
-       for each frame in the animation. }
+    (* Manual dimension animation frames. Stores the offsets and dimensions
+       for each frame in the animation. *)
     property Frames: TGLSpriteAnimFrameList read FFrames;
     // Automatic or manual texture coordinate generation.
     property Dimensions: TGLSpriteFrameDimensions read FDimensions write
       SetDimensions;
-    {The number of milliseconds between each frame in the animation.
+    (* The number of milliseconds between each frame in the animation.
        Will automatically calculate the FrameRate value when set.
-       Will override the TGLAnimatedSprite Interval is greater than zero. }
+       Will override the TGLAnimatedSprite Interval is greater than zero. *)
     property Interval: Integer read FInterval write SetInterval;
-    {The number of frames per second for the animation.
+    (* The number of frames per second for the animation.
        Will automatically calculate the Interval value when set.
-       Precision will depend on Interval since Interval has priority. }
+       Precision will depend on Interval since Interval has priority. *)
     property FrameRate: Single read GetFrameRate write SetFrameRate;
     // Sets cropping margins for auto dimension animations.
     property Margins: TGLSpriteAnimMargins read FMargins;
   end;
 
-  {A collection for storing SpriteAnimation objects. }
+  // A collection for storing SpriteAnimation objects. 
   TGLSpriteAnimationList = class(TXCollection)
   public
     constructor Create(aOwner: TPersistent); override;
     class function ItemsClass: TXCollectionItemClass; override;
   end;
 
-  {Sets the current animation playback mode:
-      samNone - No playback, the animation does not progress.
-      samPlayOnce - Plays the animation once then switches to samNone.
-      samLoop - Play the animation forward in a continuous loop.
-      samLoopBackward - Same as samLoop but reversed direction.
-      samBounceForward - Plays forward and switches to samBounceBackward
-        when EndFrame is reached.
-      samBounceBackward - Plays backward and switches to samBounceForward
-        when StartFrame is reached. }
+  (* Sets the current animation playback mode:
+     samNone - No playback, the animation does not progress.
+     samPlayOnce - Plays the animation once then switches to samNone.
+     samLoop - Play the animation forward in a continuous loop.
+     samLoopBackward - Same as samLoop but reversed direction.
+     samBounceForward - Plays forward and switches to samBounceBackward
+       when EndFrame is reached.
+     samBounceBackward - Plays backward and switches to samBounceForward
+       when StartFrame is reached. *)
   TGLSpriteAnimationMode = (samNone, samPlayOnce, samLoop, samBounceForward,
     samBounceBackward, samLoopBackward);
 
-  {An animated version for using offset texture coordinate animation. }
+  // An animated version for using offset texture coordinate animation. 
   TGLAnimatedSprite = class(TGLBaseSceneObject)
   private
     FAnimations: TGLSpriteAnimationList;
@@ -201,8 +201,7 @@ type
     procedure DefineProperties(Filer: TFiler); override;
     procedure WriteAnimations(Stream: TStream);
     procedure ReadAnimations(Stream: TStream);
-    procedure Notification(AComponent: TComponent; Operation: TOperation);
-      override;
+    procedure Notification(AComponent: TComponent; Operation: TOperation); override;
     procedure SetInterval(const val: Integer);
     procedure SetAnimationIndex(const val: Integer);
     procedure SetAnimationMode(const val: TGLSpriteAnimationMode);
@@ -221,15 +220,14 @@ type
     // Steps the current animation to the next frame
     procedure NextFrame;
   published
-    { A collection of animations. Stores the settings for animating
-       then sprite. }
+    // A collection of animations. Stores the settings for animating then sprite. 
     property Animations: TGLSpriteAnimationList read FAnimations;
     // The material library that stores the lib materials for the animations.
     property MaterialLibrary: TGLMaterialLibrary read FMaterialLibrary write
       SetMaterialLibrary;
-    {Sets the number of milliseconds between each frame. Will recalculate
+    (* Sets the number of milliseconds between each frame. Will recalculate
        the Framerate when set. Will be overridden by the TGLSpriteAnimation
-       Interval if it is greater than zero. }
+       Interval if it is greater than zero. *)
     property Interval: Integer read FInterval write SetInterval;
     // Index of the sprite animation to be used.
     property AnimationIndex: Integer read FAnimationIndex write
@@ -237,11 +235,11 @@ type
     // Playback mode for the current animation.
     property AnimationMode: TGLSpriteAnimationMode read FAnimationMode write
       SetAnimationMode;
-    { Used to automatically calculate the width and height of a sprite based
+    (* Used to automatically calculate the width and height of a sprite based
        on the size of the frame it is showing. For example, if PixelRatio is
        set to 100 and the current animation frame is 100 pixels wide it will
        set the width of the sprite to 1. If the frame is 50 pixels width the
-       sprite will be 0.5 wide. }
+       sprite will be 0.5 wide. *)
     property PixelRatio: Integer read FPixelRatio write SetPixelRatio;
     // Rotates the sprite (in degrees).
     property Rotation: Integer read FRotation write SetRotation;
@@ -249,9 +247,9 @@ type
     property MirrorU: Boolean read FMirrorU write SetMirrorU;
     // Mirror the generated texture coords in the V axis.
     property MirrorV: Boolean read FMirrorV write SetMirrorV;
-    { Sets the frames per second for the current animation. Automatically
+    (* Sets the frames per second for the current animation. Automatically
        calculates the Interval. Precision will be restricted to the values
-       of Interval since Interval takes priority. }
+       of Interval since Interval takes priority. *)
     property FrameRate: Single read GetFrameRate write SetFrameRate;
     property Position;
     property Scale;

+ 2 - 4
Source/GLAnimationUtils.pas

@@ -1,13 +1,11 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
-{
-  Main purpose is to give an easy way to create an interpolation. 
-}
 
 unit GLAnimationUtils;
 
-
+(* Main purpose is to give an easy way to create an interpolation. *)
+
 interface
 
 {$I GLScene.inc}

+ 5 - 3
Source/GLAsmShader.pas

@@ -1,12 +1,14 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
-{
+
+unit GLAsmShader;
+
+(*
     TGLAsmShader is a wrapper for all ARB shaders 
     This component is only a template and has to be replaced with a
     proper version by someone who uses ARB shaders more then me.
-}
-unit GLAsmShader;
+*)
 
 interface
 

+ 5 - 4
Source/GLAsyncHDS.pas

@@ -1,7 +1,10 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
-{
+
+unit GLAsyncHDS;
+
+(*
    Implements a HDS Filter that generates HeightData tiles in a seperate thread.
 
    This component is a TGLHeightDataSourceFilter, which uses a TGLHeightDataSourceThread,
@@ -12,9 +15,7 @@
    being prepared.  Although this keeps the framerate up, it may cause holes in the
    terrain to show, if the HeightDataThreads cant keep up with the TerrainRenderer's
    requests for new tiles.
-}
-
-unit GLAsyncHDS;
+*)
 
 interface
 

+ 5 - 3
Source/GLAsyncTimer.pas

@@ -1,11 +1,13 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
-{  
+
+unit GLAsyncTimer;
+
+(*  
    Asynchronous timer component (actual 1 ms resolution). 
    This component is based on ThreadedTimer by Carlos Barbosa. 
-}
-unit GLAsyncTimer;
+*)
 
 interface
 

+ 3 - 2
Source/GLAtmosphere.pas

@@ -1,14 +1,15 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
+
+unit GLAtmosphere;
+
 (*
    This unit contains classes that imitate an atmosphere around a planet.
       1) Eats a lot of CPU (reduces FPS from 1240 to 520 on my PC with cSlices=100)
       2) Alpha in LowAtmColor, HighAtmColor is ignored.
 *)
 
-unit GLAtmosphere;
-
 interface
 
 {$I GLScene.inc}

+ 2 - 3
Source/GLBaseMeshSilhouette.pas

@@ -1,12 +1,11 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
-{
-  Silhouette classes for GLBaseMesh and FaceGroups.
-}
 
 unit GLBaseMeshSilhouette;
 
+(* Silhouette classes for GLBaseMesh and FaceGroups. *)
+
 interface
 
 {$I GLScene.inc}

+ 9 - 10
Source/GLBehaviours.pas

@@ -1,11 +1,11 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
-(*
-   Standard TGLBehaviour subclasses
-*)
+
 unit GLBehaviours;
 
+(* Standard TGLBehaviour subclasses *)
+
 interface
 
 {$I GLScene.inc}
@@ -22,13 +22,13 @@ uses
   GLCoordinates;
 
 type
-  (*Holds parameters for TGLScene basic damping model.
-    Damping is modelled by calculating a force from the speed, this force
-    can then be transformed to an acceleration is you know the object's mass.
-    Formulas:
+  (* Holds parameters for TGLScene basic damping model.
+     Damping is modelled by calculating a force from the speed, this force
+     can then be transformed to an acceleration is you know the object's mass.
+     Formulas:
      damping = constant + linear * Speed + quadratic * Speed^2
      accel = damping / Mass
-    That's just basic physics. A note on the components:
+     That's just basic physics. A note on the components:
      constant: use it for solid friction (will stop abruptly an object after decreasing its speed.
      linear: linear friction damping.
      quadratic: expresses viscosity *)
@@ -152,8 +152,7 @@ function GetOrCreateInertia(obj: TGLBaseSceneObject): TGLBInertia; overload;
 
 (* Returns or creates the TGLBAcceleration within the given behaviours. 
    This helper function is convenient way to access a TGLBAcceleration. *)
-function GetOrCreateAcceleration(behaviours: TGLBehaviours): TGLBAcceleration;
-  overload;
+function GetOrCreateAcceleration(behaviours: TGLBehaviours): TGLBAcceleration; overload;
 function GetOrCreateAcceleration(obj: TGLBaseSceneObject): TGLBAcceleration; overload;
 
 // ------------------------------------------------------------------

+ 38 - 66
Source/GLCadencer.pas

@@ -1,11 +1,11 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
-{
-  Cadencing composant for GLScene (ease Progress processing)
-}
+
 unit GLCadencer;
 
+(* Cadencing composant for GLScene (ease Progress processing) *)
+
 interface
 
 {$I GLScene.inc}
@@ -23,32 +23,32 @@ uses
 
 type
 
-  {Determines how the TGLCadencer operates.
+  (* Determines how the TGLCadencer operates.
    - cmManual : you must trigger progress manually (in your code)
    - cmASAP : progress is triggered As Soon As Possible after a previous
      progress (uses windows messages).
    - cmApplicationIdle : will hook Application.OnIdle, this will overwrite
-     any previous event handle, and only one cadencer may be in this mode. }
+     any previous event handle, and only one cadencer may be in this mode. *)
   TGLCadencerMode = (cmManual, cmASAP, cmApplicationIdle);
 
-  {Determines which time reference the TGLCadencer should use. 
+  (* Determines which time reference the TGLCadencer should use. 
    - cmRTC : the Real Time Clock is used (precise over long periods, but
     not accurate to the millisecond, may limit your effective framerate
           to less than 50 FPS on some systems)
    - cmPerformanceCounter : the windows performance counter is used (nice
     precision, may derive over long periods, this is the default option
     as it allows the smoothest animation on fast systems)
-   - cmExternal : the CurrentTime property is used }
+   - cmExternal : the CurrentTime property is used *)
   TGLCadencerTimeReference = (cmRTC, cmPerformanceCounter, cmExternal);
 
-  {This component allows auto-progression of animation. 
+  (* This component allows auto-progression of animation. 
    Basicly dropping this component and linking it to your TGLScene will send
    it real-time progression events (time will be measured in seconds) while
    keeping the CPU 100% busy if possible (ie. if things change in your scene). 
    The progression time (the one you'll see in you progression events)
    is calculated using  (CurrentTime-OriginTime)*TimeMultiplier,
    CurrentTime being either manually or automatically updated using
-   TimeReference (setting CurrentTime does NOT trigger progression). }
+   TimeReference (setting CurrentTime does NOT trigger progression). *)
   TGLCadencer = class(TComponent)
   private
     FSubscribedCadenceableComponents: TList;
@@ -83,56 +83,56 @@ type
     destructor Destroy; override;
     procedure Subscribe(aComponent: TGLCadenceAbleComponent);
     procedure UnSubscribe(aComponent: TGLCadenceAbleComponent);
-    {Allows to manually trigger a progression. 
+    (* Allows to manually trigger a progression. 
      Time stuff is handled automatically.
-     If cadencer is disabled, this functions does nothing. }
+     If cadencer is disabled, this functions does nothing. *)
     procedure Progress;
-    {Adjusts CurrentTime if necessary, then returns its value. }
+    // Adjusts CurrentTime if necessary, then returns its value. 
     function GetCurrenttime: Double; inline;
-    {Returns True if a "Progress" is underway.
+    (* Returns True if a "Progress" is underway.
      Be aware that as long as IsBusy is True, the Cadencer may be
      sending messages and progression calls to cadenceable components
-     and scenes. }
+     and scenes. *)
     function IsBusy: Boolean;
-    {Reset the time parameters and returns to zero. }
+    // Reset the time parameters and returns to zero. 
     procedure Reset;
-    {Value soustracted to current time to obtain progression time. }
+    // Value soustracted to current time to obtain progression time. 
     property OriginTime: Double read FOriginTime write FOriginTime;
-    {Current time (manually or automatically set, see TimeReference). }
+    // Current time (manually or automatically set, see TimeReference). 
     property CurrentTime: Double read FCurrentTime write SetCurrentTime;
   published
-    {The TGLScene that will be cadenced (progressed). }
+    // The TGLScene that will be cadenced (progressed). 
     property Scene: TGLScene read FScene write SetScene;
-    {Enables/Disables cadencing.
+    (* Enables/Disables cadencing.
      Disabling won't cause a jump when restarting, it is working like
-     a play/pause (ie. may modify OriginTime to keep things smooth). }
+     a play/pause (ie. may modify OriginTime to keep things smooth). *)
     property Enabled: Boolean read FEnabled write SetEnabled default True;
-    {Defines how CurrentTime is updated.
+    (* Defines how CurrentTime is updated.
      See TGLCadencerTimeReference.
-     Dynamically changeing the TimeReference may cause a "jump".  }
+     Dynamically changeing the TimeReference may cause a "jump".  *)
     property TimeReference: TGLCadencerTimeReference read FTimeReference write
       SetTimeReference default cmPerformanceCounter;
-    {Multiplier applied to the time reference. 
+    (* Multiplier applied to the time reference. 
       Zero isn't an allowed value, and be aware that if negative values
       are accepted, they may not be supported by other GLScene objects.
-     Changing the TimeMultiplier will alter OriginTime. }
+     Changing the TimeMultiplier will alter OriginTime. *)
     property TimeMultiplier: Double read FTimeMultiplier write SetTimeMultiplier
       stored StoreTimeMultiplier;
-    {Maximum value for deltaTime in progression events. 
+    (* Maximum value for deltaTime in progression events. 
        If null or negative, no max deltaTime is defined, otherwise, whenever
        an event whose actual deltaTime would be superior to MaxDeltaTime
        occurs, deltaTime is clamped to this max, and the extra time is hidden
        by the cadencer (it isn't visible in CurrentTime either).
        This option allows to limit progression rate in simulations where
-       high values would result in errors/random behaviour. }
+       high values would result in errors/random behaviour. *)
     property MaxDeltaTime: Double read FMaxDeltaTime write FMaxDeltaTime;
-    {Minimum value for deltaTime in progression events. 
+    (* Minimum value for deltaTime in progression events. 
        If superior to zero, this value specifies the minimum time step
        between two progression events.
        This option allows to limit progression rate in simulations where
-       low values would result in errors/random behaviour. }
+       low values would result in errors/random behaviour. *)
     property MinDeltaTime: Double read FMinDeltaTime write FMinDeltaTime;
-    {Fixed time-step value for progression events. 
+    (* Fixed time-step value for progression events. 
        If superior to zero, progression steps will happen with that fixed
        delta time. The progression remains time based, so zero to N events
        may be fired depending on the actual deltaTime (if deltaTime is
@@ -140,23 +140,21 @@ type
        to two times FixedDeltaTime, two events will be fired, etc.).
        This option allows to use fixed time steps in simulations (while the
        animation and rendering itself may happen at a lower or higher
-       framerate). }
+       framerate). *)
     property FixedDeltaTime: Double read FFixedDeltaTime write FFixedDeltaTime;
-    {Adjusts how progression events are triggered. 
-     See TGLCadencerMode. }
+    // Adjusts how progression events are triggered. See TGLCadencerMode. 
     property Mode: TGLCadencerMode read FMode write SetMode default cmASAP;
-    {Allows relinquishing time to other threads/processes. 
+    (* Allows relinquishing time to other threads/processes. 
      A "sleep" is issued BEFORE each progress if SleepLength>=0 (see
-     help for the "sleep" procedure in delphi for details). }
-    property SleepLength: Integer read FSleepLength write FSleepLength default
-      -1;
-    {Happens AFTER scene was progressed. }
+     help for the "sleep" procedure in delphi for details). *)
+    property SleepLength: Integer read FSleepLength write FSleepLength default -1;
+    // Happens AFTER scene was progressed. 
     property OnProgress: TGLProgressEvent read FOnProgress write FOnProgress;
-    {Happens AFTER all iterations with fixed delta time. }
+    // Happens AFTER all iterations with fixed delta time. 
     property OnTotalProgress : TGLProgressEvent read FOnTotalProgress write FOnTotalProgress;
   end;
 
-  {Adds a property to connect/subscribe to a cadencer.  }
+  // Adds a property to connect/subscribe to a cadencer.  
   TGLCustomCadencedComponent = class(TGLUpdateAbleComponent)
   private
     FCadencer: TGLCadencer;
@@ -182,7 +180,6 @@ const
   cTickGLCadencer = 'TickGLCadencer';
 
 type
-  { TASAPHandler }
   TASAPHandler = class
   private
     FTooFastCounter: Integer;
@@ -240,7 +237,6 @@ end;
 // ------------------ TASAPHandler ------------------
 // ------------------
 
-
 constructor TASAPHandler.Create;
 begin
   inherited Create;
@@ -248,7 +244,6 @@ begin
   PostMessage(FWindowHandle, vWMTickCadencer, 0, 0);
 end;
 
-
 destructor TASAPHandler.Destroy;
 begin
   if FTimer <> 0 then
@@ -261,7 +256,6 @@ end;
 var
   vWndProcInLoop: Boolean;
 
-
 procedure TASAPHandler.WndProc(var Msg: TMessage);
 var
   i: Integer;
@@ -351,7 +345,6 @@ end;
 // ------------------ TGLCadencer ------------------
 // ------------------
 
-
 constructor TGLCadencer.Create(AOwner: TComponent);
 begin
   inherited Create(AOwner);
@@ -364,7 +357,6 @@ begin
   Enabled := True;
 end;
 
-
 destructor TGLCadencer.Destroy;
 begin
   Assert(FProgressing = 0);
@@ -374,7 +366,6 @@ begin
   inherited Destroy;
 end;
 
-
 procedure TGLCadencer.Subscribe(aComponent: TGLCadenceAbleComponent);
 begin
   if not Assigned(FSubscribedCadenceableComponents) then
@@ -386,7 +377,6 @@ begin
   end;
 end;
 
-
 procedure TGLCadencer.UnSubscribe(aComponent: TGLCadenceAbleComponent);
 var
   i: Integer;
@@ -402,7 +392,6 @@ begin
   end;
 end;
 
-
 procedure TGLCadencer.Notification(AComponent: TComponent; Operation:
   TOperation);
 begin
@@ -416,21 +405,18 @@ begin
   inherited;
 end;
 
-
 procedure TGLCadencer.Loaded;
 begin
   inherited Loaded;
   RestartASAP;
 end;
 
-
 procedure TGLCadencer.OnIdleEvent(Sender: TObject; var Done: Boolean);
 begin
   Progress;
   Done := False;
 end;
 
-
 procedure TGLCadencer.RestartASAP;
 begin
   if not (csLoading in ComponentState) then
@@ -444,7 +430,6 @@ begin
   end;
 end;
 
-
 procedure TGLCadencer.SetEnabled(const val: Boolean);
 begin
   if FEnabled <> val then
@@ -461,7 +446,6 @@ begin
   end;
 end;
 
-
 procedure TGLCadencer.SetScene(const val: TGLScene);
 begin
   if FScene <> val then
@@ -475,7 +459,6 @@ begin
   end;
 end;
 
-
 procedure TGLCadencer.SetTimeMultiplier(const val: Double);
 var
   rawRef: Double;
@@ -508,13 +491,11 @@ begin
   end;
 end;
 
-
 function TGLCadencer.StoreTimeMultiplier: Boolean;
 begin
   Result := (FTimeMultiplier <> 1);
 end;
 
-
 procedure TGLCadencer.SetMode(const val: TGLCadencerMode);
 begin
   if FMode <> val then
@@ -526,14 +507,12 @@ begin
   end;
 end;
 
-
 procedure TGLCadencer.SetTimeReference(const val: TGLCadencerTimeReference);
 begin
   // nothing more, yet
   FTimeReference := val;
 end;
 
-
 procedure TGLCadencer.Progress;
 var
   deltaTime, newTime, totalDelta: Double;
@@ -626,7 +605,6 @@ begin
   end;
 end;
 
-
 function TGLCadencer.GetRawReferenceTime: Double;
 var
   counter: Int64;
@@ -647,20 +625,17 @@ begin
   end;
 end;
 
-
 function TGLCadencer.GetCurrenttime: Double;
 begin
   Result := (GetRawReferenceTime - FOriginTime) * FTimeMultiplier;
   FCurrentTime := Result;
 end;
 
-
 function TGLCadencer.IsBusy: Boolean;
 begin
   Result := (FProgressing <> 0);
 end;
 
-
 procedure TGLCadencer.Reset;
 begin
   lasttime := 0;
@@ -668,7 +643,6 @@ begin
   FOriginTime := downTime;
 end;
 
-
 procedure TGLCadencer.SetCurrentTime(const Value: Double);
 begin
   LastTime := Value - (FCurrentTime - LastTime);
@@ -680,14 +654,12 @@ end;
 // ------------------ TGLCustomCadencedComponent ------------------
 // ------------------
 
-
 destructor TGLCustomCadencedComponent.Destroy;
 begin
   Cadencer := nil;
   inherited Destroy;
 end;
 
-
 procedure TGLCustomCadencedComponent.Notification(AComponent: TComponent;
   Operation: TOperation);
 begin
@@ -696,7 +668,6 @@ begin
   inherited;
 end;
 
-
 procedure TGLCustomCadencedComponent.SetCadencer(const val: TGLCadencer);
 begin
   if FCadencer <> val then
@@ -723,6 +694,7 @@ initialization
     vCounterFrequency := 0;
 
 finalization
+
   FreeAndNil(vHandler);
   FreeAndNil(vASAPCadencerList);
 end.

+ 5 - 5
Source/GLCameraController.pas

@@ -1,14 +1,14 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
-{
+
+unit GLCameraController;
+
+(*
   Component for animating camera movement.
   Can be used to zoom in/out, for linear movement, orbiting and Google Earth - like "fly-to"
   Main purpose was the SafeOrbitAndZoomToPos method, the others are usable as well
-}
-
-
-unit GLCameraController;
+*)
 
 interface
 

+ 5 - 3
Source/GLCanvas.pas

@@ -1,12 +1,14 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
-{
+
+unit GLCanvas;
+
+(*
    Implements a basic Canvas-like interface over for OpenGL.
    This class can be used for generic OpenGL applications and has no dependencies
    to the GLScene core units (only to base units).
-}
-unit GLCanvas;
+*)
 
 interface
 

+ 5 - 3
Source/GLCelShader.pas

@@ -1,11 +1,13 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
-{
+
+unit GLCelShader;
+
+(*
    A shader that applies cel shading through a vertex program
    and shade definition texture. 
-}
-unit GLCelShader;
+*)
 
 interface
 

+ 12 - 12
Source/GLColor.pas

@@ -1,11 +1,11 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
-{
-  All color types, constants and utilities should go here
-}
+
 unit GLColor;
 
+(* All color types, constants and utilities should go here *)
+
 interface
 
 {$I GLScene.inc}
@@ -30,7 +30,7 @@ type
   PRGBColor = ^TRGBColor;
   TRGBColor = TVector3b;
 
-  { Wraps an OpenGL color. }
+  // Wraps an OpenGL color. 
   TGLColor = class(TGLUpdateAbleObject)
   private
     FColor: TColorVector;
@@ -95,7 +95,7 @@ type
     procedure RemoveColor(const aName: String);
   end;
 
-{Builds a TColor from Red Green Blue components. }
+// Builds a TColor from Red Green Blue components. 
 function RGB2Color(const r, g, b: Byte): TColor; inline;
 function ColorManager: TGLColorManager;
 procedure RegisterColor(const aName: String; const aColor: TColorVector);
@@ -104,12 +104,12 @@ function GetRValue(rgb: DWORD): Byte; {$NODEFINE GetRValue}
 function GetGValue(rgb: DWORD): Byte; {$NODEFINE GetGValue}
 function GetBValue(rgb: DWORD): Byte; {$NODEFINE GetBValue}
 procedure InitGLSceneColors;
-{ Converts a delphi color into its RGB fragments and correct range. }
+// Converts a delphi color into its RGB fragments and correct range. 
 function ConvertWinColor(aColor: TColor; Alpha: Single = 1): TColorVector;
 // Converts a color vector (containing float values)
 function ConvertColorVector(const aColor: TColorVector): TColor; overload;
-{ Converts a color vector (containing float values) and alter intensity.
-  intensity is in [0..1] }
+(* Converts a color vector (containing float values) and alter intensity.
+  intensity is in [0..1] *)
 function ConvertColorVector(const aColor: TColorVector; intensity: Single): TColor; overload;
 // Converts RGB components into a color vector with correct range
 function ConvertRGBColor(const aColor: array of Byte): TColorVector;
@@ -132,12 +132,12 @@ const
   clHighlight = TColor(-13);
   clHighlightedText = TColor(-14);
 
-  { Mapped role offsets }
+  // Mapped role offsets 
   cloNormal = 32;
   cloDisabled = 64;
   cloActive = 96;
 
-  { Normal, mapped, pseudo, rgb values }
+  // Normal, mapped, pseudo, rgb values 
   clNormalForeground = TColor(clForeground - cloNormal);
   clNormalButton = TColor(clButton - cloNormal);
   clNormalLight = TColor(clLight - cloNormal);
@@ -153,7 +153,7 @@ const
   clNormalHighlight = TColor(clHighlight - cloNormal);
   clNormalHighlightedText = TColor(clHighlightedText - cloNormal);
 
-  { Disabled, mapped, pseudo, rgb values }
+  // Disabled, mapped, pseudo, rgb values 
   clDisabledForeground = TColor(clForeground - cloDisabled);
   clDisabledButton = TColor(clButton - cloDisabled);
   clDisabledLight = TColor(clLight - cloDisabled);
@@ -169,7 +169,7 @@ const
   clDisabledHighlight = TColor(clHighlight - cloDisabled);
   clDisabledHighlightedText = TColor(clHighlightedText - cloDisabled);
 
-  { Active, mapped, pseudo, rgb values }
+  // Active, mapped, pseudo, rgb values 
   clActiveForeground = TColor(clForeground - cloActive);
   clActiveButton = TColor(clButton - cloActive);
   clActiveLight = TColor(clLight - cloActive);

+ 5 - 4
Source/GLCompositeImage.pas

@@ -1,13 +1,14 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
-{
-  This class is required for loading images such classes as TGLDDSImage,
-  TGLO3TCImage, TGLHDRImage etc.
-}
 
 unit GLCompositeImage;
 
+(*
+  This class is required for loading images such classes as TGLDDSImage,
+  TGLO3TCImage, TGLHDRImage etc.
+*)
+
 interface
 
 uses

+ 53 - 58
Source/GLConsole.pas

@@ -82,8 +82,8 @@ type
   TGLConsoleCommandList = class;
   TGLConsoleCommand = class;
 
-  {Stores info on a command. A command is a parsed input line.
-    Should be transformed into a class, I think...}
+  (* Stores info on a command. A command is a parsed input line.
+    Should be transformed into a class, I think...*)
   TGLUserInputCommand = record
     CommandCount: Integer;
     Strings: array of string;
@@ -91,14 +91,14 @@ type
       //if user identifies a command, he must set this to  "True"
   end;
 
-  {Event called when used presses the "Enter"}
+  // Event called when used presses the "Enter"
   TGLlConsoleEvent = procedure(const ConsoleCommand: TGLConsoleCommand;
     const Console: TGLCustomConsole;
     var Command: TGLUserInputCommand) of object;
 
   TGLConsoleMatchList = set of 0..CONSOLE_MAX_COMMANDS {Byte};
 
-  { A class that checks for duplicates. }
+  // A class that checks for duplicates. 
   TGLConsoleStringList = class(TStringList)
   private
     FConsole: TGLCustomConsole;
@@ -110,7 +110,7 @@ type
     constructor Create(const Owner: TGLCustomConsole);
   end;
 
-  { A wrapper for a console command. }
+  // A wrapper for a console command. 
   TGLConsoleCommand = class(TCollectionItem)
   private
     FVisible: Boolean;
@@ -130,14 +130,12 @@ type
     procedure DoOnCommand(var UserInputCommand: TGLUserInputCommand); virtual;
     function GetDisplayName: string; override;
   public
-    //procedures
     procedure ShowHelp; virtual;
     procedure ShowShortHelp; virtual;
     procedure Assign(Source: TPersistent); override;
     constructor Create(Collection: TCollection); override;
     destructor Destroy; override;
   published
-    //properties
     property CommandName: string read FCommandName write SetCommandName;
     property ShortHelp: string read FShortHelp write FShortHelp;
     property LongHelp: TStringList read FLongHelp;
@@ -145,12 +143,12 @@ type
     property OnHelp: TNotifyEvent read FOnHelp write FOnHelp;
     // Disabled commands won't execute
     property Enabled: Boolean read FEnabled write FEnabled default True;
-    {If command is disabled and user calls it, no error report will be
-       generated if SilentDisabled is enabled }
+    (* If command is disabled and user calls it, no error report will be
+       generated if SilentDisabled is enabled *)
     property SilentDisabled: Boolean read FSilentDisabled write FSilentDisabled
       default False;
-    {Hidden commands won't show when user requests command list
-      or uses auto-complete }
+    (* Hidden commands won't show when user requests command list
+      or uses auto-complete *)
     property Visible: Boolean read FVisible write FVisible default True;
   end;
 
@@ -191,25 +189,16 @@ type
     constructor Create(AOwner: TPersistent);
     procedure Assign(Source: TPersistent); override;
   published
-    property NavigateUp: Byte read FNavigateUp write FNavigateUp default
-      VK_HOME;
-    property NavigateDown: Byte read FNavigateDown write FNavigateDown default
-      VK_END;
-    property NavigatePageUp: Byte read FNavigatePageUp write FNavigatePageUp
-      default VK_PRIOR;
-    property NavigatePageDown: Byte read FNavigatePageDown write
-      FNavigatePageDown default VK_NEXT;
-    property NextCommand: Byte read FNextCommand write FNextCommand default
-      VK_DOWN;
-    property PreviousCommand: Byte read FPreviousCommand write FPreviousCommand
-      default VK_UP;
-    property AutoCompleteCommand: Byte read FAutoCompleteCommand write
-      FAutoCompleteCommand default VK_CONTROL;
-    property DblClickDelay: Integer read FDblClickDelay write FDblClickDelay
-      default 300;
+    property NavigateUp: Byte read FNavigateUp write FNavigateUp default VK_HOME;
+    property NavigateDown: Byte read FNavigateDown write FNavigateDown default VK_END;
+    property NavigatePageUp: Byte read FNavigatePageUp write FNavigatePageUp default VK_PRIOR;
+    property NavigatePageDown: Byte read FNavigatePageDown write FNavigatePageDown default VK_NEXT;
+    property NextCommand: Byte read FNextCommand write FNextCommand default VK_DOWN;
+    property PreviousCommand: Byte read FPreviousCommand write FPreviousCommand default VK_UP;
+    property AutoCompleteCommand: Byte read FAutoCompleteCommand write FAutoCompleteCommand default VK_CONTROL;
+    property DblClickDelay: Integer read FDblClickDelay write FDblClickDelay default 300;
   end;
 
-  {TGLCustomConsole }
   TGLCustomConsole = class(TGLBaseSceneObject)
   private
     FHudSprite: TGLHudSprite;
@@ -233,9 +222,8 @@ type
     function GetFont: TGLCustomBitmapFont;
     procedure SetFont(const Value: TGLCustomBitmapFont);
   protected
-    {Misc }
-    procedure DoOnCommandIssued(var UserInputCommand: TGLUserInputCommand);
-      virtual;
+    // Misc 
+    procedure DoOnCommandIssued(var UserInputCommand: TGLUserInputCommand); virtual;
     procedure SetFontColor(const Color: TColor); virtual;
     function GetFontColor: TColor;
     procedure SetHUDSpriteColor(const Color: TColor); virtual;
@@ -243,17 +231,17 @@ type
     function NumLines: Integer;
     procedure ShowConsoleHelp; virtual;
     procedure HandleUnknownCommand(const Command: string); virtual;
-    {Auto Complete Command }
+    // Auto Complete Command 
     procedure AutoCompleteCommand; overload; virtual;
     procedure AutoCompleteCommand(var MatchCount: Integer; var
       AdditionalCommandsMatchList: TGLConsoleMatchList; var CommandsMatchList:
       TGLConsoleMatchList); overload;
-    {Command interpreters }
+    // Command interpreters 
     procedure CommandIssued(var UserInputCommand: TGLUserInputCommand); virtual;
     procedure FixCommand(var UserInputCommand: TGLUserInputCommand); virtual;
     function ParseString(str, caract: string): TGLUserInputCommand;
     procedure ProcessInput; virtual;
-    {Refreshes the Hud (clip lines outside the visible console). }
+    // Refreshes the Hud (clip lines outside the visible console). 
     procedure RefreshHud; virtual;
     // Register built-in commands (onCreate)
     procedure RegisterBuiltInCommands; virtual;
@@ -310,50 +298,48 @@ type
     procedure NavigateDown;
     procedure NavigatePageUp;
     procedure NavigatePageDown;
-    {Refreshes the size of the hud to reflect changes on the viewer.
-       Should be called whenever the viewer's size changes. }
+    (* Refreshes the size of the hud to reflect changes on the viewer.
+       Should be called whenever the viewer's size changes. *)
     procedure RefreshHudSize; virtual;
-    {Adds a line (which is not treated as a command). }
+    // Adds a line (which is not treated as a command). 
     procedure AddLine(const str: string);
-    {TypedCommands are cleared and current command index is reset. }
+    // TypedCommands are cleared and current command index is reset. 
     procedure ClearTypedCommands;
     procedure ExecuteCommand(const Command: string);
     procedure ExecuteCommands(const Commands: TStrings);
     constructor Create(AOwner: TComponent); override;
     destructor Destroy; override;
-    {Changes the console font color. }
-    property FontColor: TColor read GetFontColor write SetFontColor stored
-      False;
-    property HUDSpriteColor: TColor read GetHUDSpriteColor write
-      SetHUDSpriteColor stored False;
+    // Changes the console font color. 
+    property FontColor: TColor read GetFontColor write SetFontColor stored False;
+    property HUDSpriteColor: TColor read GetHUDSpriteColor write SetHUDSpriteColor stored False;
     // Where user enters his commands.
     property InputLine: string read FInputLine write FInputLine;
     // List of commands that user typed.
     property TypedCommands: TStringList read FTypedCommands;
     // Commands have events that are called when user types a sertauin command
     property Commands: TGLConsoleCommandList read FCommands;
-    {Aditional commands can be registered to participate in command auto-completion.
-     They can be interpreted in the global OnCommandIssued event handler. }
+    (* Aditional commands can be registered to participate in command auto-completion.
+     They can be interpreted in the global OnCommandIssued event handler. *)
     property AdditionalCommands: TGLConsoleStringList read FAdditionalCommands;
-    {User controls. }
+    // User controls. 
     property Controls: TGLConsoleControls read FControls;
-    {list of commands that user typed and console's responces. }
+    // List of commands that user typed and console's responces. 
     property ColsoleLog: TStringList read FColsoleLog;
-    {Allows to change consol's height from 0 to 1. }
+    // Allows to change consol's height from 0 to 1. 
     property Size: Single read FSize write SetSize;
-    {Visual stuff. }
+    // Visual stuff. 
     property SceneViewer: TGLSceneViewer read FSceneViewer write SetSceneViewer;
     property HudSprite: TGLHudSprite read FHudSprite;
     property HudText: TGLHudText read FHudText;
     property Font: TGLCustomBitmapFont read GetFont write SetFont stored False;
     property Options: TGLConsoleOptions read FOptions write FOptions;
-    { Main event of the console. Happens whenever the enter key is pressed.
+    (* Main event of the console. Happens whenever the enter key is pressed.
       First the input line is compared to all registered commands, then everything
       is parsed into a TGLUserInputCommand record and  sent to the event.
-      Empty lines are  not  ignored (i.e. they also trigger events)}
+      Empty lines are  not  ignored (i.e. they also trigger events) *)
     property OnCommandIssued: TGLlConsoleEvent read FOnCommandIssued write
       FOnCommandIssued;
-    {Standard stuff }
+    // Standard stuff 
     property Hint: string read FHint write FHint;
     property Visible default False;
   end;
@@ -393,7 +379,9 @@ const
   conDefaultConsoleWidth = 400;
   conDefaultConsoleHeight = 100;
 
-  { TGLCustomConsole }
+//------------------------------
+//  TGLCustomConsole 
+//------------------------------
 
 procedure TGLCustomConsole.ProcessInternalCommandClearScreen(const
   ConsoleCommand: TGLConsoleCommand; const Console: TGLCustomConsole; var Command:
@@ -1236,7 +1224,7 @@ begin
     FOnCommand := ProcessInternalCommandClearScreen;
   end;
 
-  { Console commands }
+  // Console commands 
   with FCommands.Add do
   begin
     FCommandName := 'Console.Hide';
@@ -1270,7 +1258,7 @@ begin
     FOnCommand := ProcessInternalCommandConsoleClearTypedCommands;
   end;
 
-  { System commands }
+  // System commands 
   with FCommands.Add do
   begin
     FCommandName := 'System.Time';
@@ -1287,7 +1275,7 @@ begin
     FOnCommand := ProcessInternalCommandSystemDate;
   end;
 
-  { Viewer commands }
+  // Viewer commands 
   with FCommands.Add do
   begin
     FCommandName := 'Viewer.FPS';
@@ -1457,7 +1445,9 @@ begin
   FHudText.Name := Value + 'HudText';
 end;
 
-{ TGLConsoleControls }
+//--------------------------------
+// TGLConsoleControls 
+//--------------------------------
 
 procedure TGLConsoleControls.Assign(Source: TPersistent);
 begin
@@ -1494,7 +1484,9 @@ begin
   Result := FOwner;
 end;
 
-{ TGLConsoleCommand }
+//---------------------------
+// TGLConsoleCommand 
+//---------------------------
 
 procedure TGLConsoleCommand.Assign(Source: TPersistent);
 begin
@@ -1688,7 +1680,10 @@ begin
   Result := FConsole;
 end;
 
+//---------------------------
 initialization
+//---------------------------
+
   RegisterClasses([TGLCustomConsole, TGLConsole, TGLConsoleStringList,
     TGLConsoleCommand, TGLConsoleCommandList, TGLConsoleControls]);
 

+ 5 - 3
Source/GLCustomShader.pas

@@ -1,15 +1,17 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
-{
+
+unit GLCustomShader;
+
+(*
     A collection of pure abstract classes - descendants of TGLShader, which are
     used for purpose of not having to write the same stuff all over and over
     again in your own shader classes.
     It also contains a procedures and function that can be used in all shaders.
     The whole history is logged in a former GLS version of the unit.
 
-}
-unit GLCustomShader;
+*)
 
 interface
 

+ 3 - 2
Source/GLDCE.pas

@@ -1,6 +1,9 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
+
+unit GLDCE;
+
 (*
   Dynamic Collision Engine
   How to use:
@@ -21,8 +24,6 @@
   - BounceFactor: Restituition factor, 1 means that it will bounce forever
 *)
 
-unit GLDCE;
-
 interface
 
 {$I GLScene.inc}

+ 5 - 4
Source/GLEParticleMasksManager.pas

@@ -1,7 +1,10 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
-{
+
+unit GLEParticleMasksManager;
+
+(*
    A pretty particle mask effect manager.
    This unit is part of GLE - GLScene Game Utilities Engine set by Kenneth Poulter [email protected]
    Module Number: 37
@@ -18,9 +21,7 @@
 
    Licenses: Removed. Donated to GLScene's Code Base as long as the author (Kenneth Poulter) is not altered in this file.
              Theft of code also is not allowed, although alterations are allowed.
-}
-
-unit GLEParticleMasksManager;
+*)
 
 interface
 

+ 3 - 3
Source/GLEllipseCollision.pas

@@ -1,11 +1,11 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
-{
-  Ellipsoid collision functions (mainly used by DCE).
-}
+
 unit GLEllipseCollision;
 
+(* Ellipsoid collision functions (mainly used by DCE). *)
+
 interface
 
 {$I GLScene.inc}

+ 2 - 3
Source/GLFPSMovement.pas

@@ -1,12 +1,11 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
-(*
-  FPS-like movement behaviour and manager.
-*)
 
 unit GLFPSMovement;
 
+(* FPS-like movement behaviour and manager. *)
+
 interface
 
 {$I GLScene.inc}

+ 3 - 3
Source/GLFile3DSSceneObjects.pas

@@ -1,11 +1,11 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
-{
-  3ds-specific scene objects. 
-}
+
 unit GLFile3DSSceneObjects;
 
+(* 3ds-specific scene objects. *)
+
 interface
 
 {$I GLScene.inc}

+ 3 - 3
Source/GLFileB3D.pas

@@ -1,11 +1,11 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
-{
-  B3D VectorFile class to load Blitz 3D model files 
-}
+
 unit GLFileB3D;
 
+(* B3D VectorFile class to load Blitz 3D model files *)
+
 interface
 
 uses

+ 0 - 2
Source/GLFileBMP.pas

@@ -40,13 +40,11 @@ type
     function Quadrochrome(N: Integer): Integer;
     function Octochrome(N: Integer): Integer;
   public
-    
     procedure LoadFromFile(const filename: string); override;
     procedure SaveToFile(const filename: string); override;
     procedure LoadFromStream(stream: TStream); override;
     procedure SaveToStream(stream: TStream); override;
     class function Capabilities: TGLDataFileCapabilities; override;
-
     procedure AssignFromTexture(textureContext: TGLContext;
       const textureHandle: Cardinal;
       textureTarget: TGLTextureTarget;

+ 3 - 4
Source/GLFileGL2.pas

@@ -1,12 +1,11 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
-{
-   Vector file object loading of Ghoul2 model and animation 
-   files into GLScene. 
-}
+
 unit GLFileGL2;
 
+(* Vector file object loading of Ghoul2 model and animation files *)
+
 interface
 
 uses

+ 5 - 5
Source/GLFileGLB.pas

@@ -1,11 +1,11 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
-{
-   GLB binary file for glTF format implementation. 
-}
+
 unit GLFileGLB;
 
+(* GLB binary file for glTF format implementation. *)
+
 interface
 
 uses
@@ -23,8 +23,8 @@ uses
   GLPersistentClasses;
 
 type
-   {The GLB binary glTF format is a runtime asset delivery format 
-      for GL APIs: WebGL, OpenGL ES OpenGL and Vulkan. }
+   (* The GLB binary glTF format is a runtime asset delivery format 
+      for GL APIs: WebGL, OpenGL ES OpenGL and Vulkan. *)
    TGLBVectorFile = class(TGLVectorFile)
       public
          class function Capabilities : TGLDataFileCapabilities; override;

+ 3 - 3
Source/GLFileGLTF.pas

@@ -1,11 +1,11 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
-{
-   GLTF file embedded glTF format implementation. 
-}
+
 unit GLFileGLTF;
 
+(* GLB binary file for glTF format implementation. *)
+
 interface
 
 uses

+ 5 - 5
Source/GLFileGTS.pas

@@ -1,11 +1,11 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
-{
-    GTS (GNU Triangulated Surface) vector file format implementation. 
-}
+
 unit GLFileGTS;
 
+(* GTS (GNU Triangulated Surface) vector file format implementation. *)
+
 interface
 
 {$I GLScene.inc}
@@ -19,13 +19,13 @@ uses
   GLApplicationFileIO;
 
 type
-   {The GTS vector file (GNU Triangulated Surface library).
+   (* The GTS vector file (GNU Triangulated Surface library).
       It is a simple text format, with indexed vertices. The first line contains
       the number of vertices, the number of edges and the number of faces separated
       by spaces.
       Following lines contain the x/y/z coordinates of vertices, then the edges
       (two indices) and the faces (three indices).
-      http://gts.sourceforge.net/ }
+      http://gts.sourceforge.net/ *)
    TGLGTSVectorFile = class(TGLVectorFile)
       public
          

+ 3 - 3
Source/GLFileLMTS.pas

@@ -1,11 +1,11 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
-{
-   File loader for MTS
-}
+
 unit GLFileLMTS;
 
+(* File loader for MTS *)
+
 interface
 
 {$I GLScene.inc}

+ 3 - 3
Source/GLFileLWO.pas

@@ -1,11 +1,11 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
-(*
-    Support-code to load Lightwave LWO Files (v6.0+, partial support).
-*)
+
 unit GLFileLWO;
 
+(*  Support-code to load Lightwave LWO Files (v6.0+, partial support).*)
+
 interface
 
 {$I GLScene.inc}

+ 4 - 5
Source/GLFileMD2.pas

@@ -1,12 +1,11 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
-{
-   Quake2 MD2 vector file format implementation.
-}
 
 unit GLFileMD2;
 
+(* Quake2 MD2 vector file format implementation. *)
+
 interface
 
 {$I GLScene.inc}
@@ -19,11 +18,11 @@ uses
   FileMD2;
 
 type
-   {The MD2 vector file (Quake2 actor file).
+   (* The MD2 vector file (Quake2 actor file).
       Stores a set of "frames" describing the different postures of the actor,
       it may be animated by TGLActor. The "Skin" must be loaded indepentendly
       (the whole mesh uses a single texture bitmap).
-      Based on code by Roger Cao. }
+      Based on code by Roger Cao. *)
    TGLMD2VectorFile = class(TGLVectorFile)
       public
         class function Capabilities : TGLDataFileCapabilities; override;

+ 3 - 4
Source/GLFileMD3.pas

@@ -1,12 +1,11 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
-{
-  Code for loading animated MD3 files into GLScene
-              FreeForms and Actors.
-}
+
 unit GLFileMD3;
 
+(* Code for loading animated MD3 files into FreeForms and Actors. *)
+
 interface
 
 uses

+ 3 - 3
Source/GLFileMD5.pas

@@ -1,11 +1,11 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
-{
-   Doom3 MD5 mesh and animation vector file format implementation. 
-}
+
 unit GLFileMD5;
 
+(* Doom3 MD5 mesh and animation vector file format implementation. *)
+
 interface
 
 {$I GLScene.inc}

+ 5 - 3
Source/GLFileMDC.pas

@@ -1,7 +1,10 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
-{
+
+unit GLFileMDC;
+
+(*
   Code for loading animated MDC files into GLScene FreeForms
   and Actors.
   This file format uses in Return To Castle Wolfenstein instead
@@ -9,8 +12,7 @@
   plus very small data!
 
   Original code by Osman Turan ([email protected])
-}
-unit GLFileMDC;
+*)
 
 interface
 

+ 5 - 5
Source/GLFileMP3.pas

@@ -1,11 +1,11 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
-{
-   Support for MP3 format. 
-}
+
 unit GLFileMP3;
 
+(* Support for MP3 format. *)
+
 interface
 
 {$I GLScene.inc}
@@ -17,8 +17,8 @@ uses
 
 type
 
-   {Support for MP3 format. 
-      *Partial* support only, access to PCMData is NOT supported. }
+   (* Support for MP3 format. 
+      *Partial* support only, access to PCMData is NOT supported. *)
    TGLMP3File = class (TGLSoundFile)
       private
          data : array of Byte; // used to store MP3 bitstream

+ 35 - 31
Source/GLFileMS3D.pas

@@ -1,11 +1,11 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
-{
-   Support for MS3D file format.
-}
+
 unit GLFileMS3D;
 
+(* Support for MS3D file format. *)
+
 interface
 
 {$I GLScene.inc}
@@ -35,13 +35,13 @@ const
 
 type
   // typedef struct
-  // {
+  // (*
   //     byte            flags;                              // SELECTED | HIDDEN
   //     char            name[32];                           //
   //     word            numtriangles;                       //
   //     word            triangleIndices[numtriangles];      // the groups group the triangles
   //     char            materialIndex;                      // -1 = no material
-  // } ms3d_group_t;
+  // *) ms3d_group_t;
   TMS3DGroup = class
   public
     Flags: byte;
@@ -54,10 +54,10 @@ type
   end;
 
   // typdef struct
-  // {
+  // (*
   //    char    id[10];                                     // always "MS3D000000"
   //    int     version;                                    // 4
-  // } ms3d_header_t;
+  // *) ms3d_header_t;
   {$A-}
 
   TMS3DHeader = record
@@ -67,12 +67,12 @@ type
 
 
   // typedef struct
-  // {
+  // (*
   //     byte    flags;                                      // SELECTED | SELECTED2 | HIDDEN
   //     float   vertex[3];                                  //
   //     char    boneId;                                     // -1 = no bone
   //     byte    referenceCount;
-  // } ms3d_vertex_t;
+  // *) ms3d_vertex_t;
 
   TMS3DVertex = record
     Flags: byte;
@@ -85,7 +85,7 @@ type
   TMS3DVertexArray = array[0..MAX_MS3D_VERTICES - 1] of TMS3DVertex;
 
   // typedef struct
-  // {
+  // (*
   //     word    flags;                                      // SELECTED | SELECTED2 | HIDDEN
   //     word    vertexIndices[3];                           //
   //     float   vertexNormals[3][3];                        //
@@ -93,7 +93,7 @@ type
   //     float   t[3];                                       //
   //     byte    smoothingGroup;                             // 1 - 32
   //     byte    groupIndex;                                 //
-  // } ms3d_triangle_t;
+  // *) ms3d_triangle_t;
 
   TMS3DTriangle = record
     Flags: word;
@@ -108,8 +108,8 @@ type
   PMS3DTriangleArray = ^TMS3DTriangleArray;
   TMS3DTriangleArray = array[0..MAX_MS3D_TRIANGLES - 1] of TMS3DTriangle;
 
-   // typedef struct
-  // {
+  // typedef struct
+  // (*
   //     char            name[32];                           //
   //     float           ambient[4];                         //
   //     float           diffuse[4];                         //
@@ -120,7 +120,7 @@ type
   //     char            mode;                               // 0, 1, 2 is unused now
   //     char            texture[128];                        // texture.bmp
   //     char            alphamap[128];                       // alpha.bmp
-  // } ms3d_material_t;
+  // *) ms3d_material_t;
   TMS3DMaterial = record
     Name: array[0..31] of AnsiChar;
     Ambient: TColorVector;
@@ -136,10 +136,10 @@ type
 
 
   // typedef struct
-  // {
+  // (*
   //     float           time;                               // time in seconds
   //     float           rotation[3];                        // x, y, z angles
-  // } ms3d_keyframe_rot_t;
+  // *) ms3d_keyframe_rot_t;
   TMS3DKeyframeRotation = record
     Time: single;
     Rotation: TD3DVector;
@@ -149,10 +149,10 @@ type
   TMS3DKeyframeRotationArray = array[0..MAX_MS3D_KEYFRAMES - 1] of TMS3DKeyframeRotation;
 
   // typedef struct
-  // {
+  // (*
   //     float           time;                               // time in seconds
   //     float           position[3];                        // local position
-  // } ms3d_keyframe_pos_t;
+  // *) ms3d_keyframe_pos_t;
   TMS3DKeyframePosition = record
     Time: single;
     Position: TD3DVector;
@@ -162,7 +162,7 @@ type
   TMS3DKeyframePositionArray = array[0..MAX_MS3D_KEYFRAMES - 1] of TMS3DKeyframePosition;
 
   // typedef struct
-  // {
+  // (*
   //     byte            flags;                              // SELECTED | DIRTY
   //     char            name[32];                           //
   //     char            parentName[32];                     //
@@ -174,7 +174,7 @@ type
   //
   //     ms3d_keyframe_rot_t keyFramesRot[numKeyFramesRot];      // local animation matrices
   //     ms3d_keyframe_pos_t keyFramesTrans[numKeyFramesTrans];  // local animation matrices
-  // } ms3d_joint_t;
+  // *) ms3d_joint_t;
 
   TMS3DJointBase = record
     Flags: byte;
@@ -195,8 +195,6 @@ type
   PMS3DJointArray = ^TMS3DJointArray;
   TMS3DJointArray = array[0..MAX_MS3D_JOINTS - 1] of TMS3DJoint;
 
-
-
   TMS3DComment=record
       index: Integer;
       commentLength: integer;
@@ -233,14 +231,11 @@ type
     destructor Destroy; override;
     property Weight[idx: Integer]: pMS3D_vertex_ex_t read GetWeight;
     property subVersion: Integer read FsubVersion write SetsubVersion;
-
   end;
 
-
-
 type
-  { The MilkShape vector file.
-     By Mattias Fagerlund, [email protected]. Yada yada. Eric rules! }
+  (* The MilkShape vector file.
+     By Mattias Fagerlund, [email protected]. Yada yada. Eric rules! *)
   TGLMS3DVectorFile = class(TGLVectorFile)
   public
     class function Capabilities: TGLDataFileCapabilities; override;
@@ -252,8 +247,12 @@ type
 
 // ------------------------------------------------------------------
 implementation
+// ------------------------------------------------------------------
+
 
-{ TMS3DGroup }
+// -------------------------
+//  TMS3DGroup 
+// -------------------------
 
 constructor TMS3DGroup.Create;
 begin
@@ -266,7 +265,9 @@ begin
   inherited;
 end;
 
-{ TMS3DCommentList }
+// -------------------------
+//  TMS3DCommentList 
+// -------------------------
 
 destructor TMS3DCommentList.destroy;
 var
@@ -287,7 +288,9 @@ begin
     add(result);
 end;
 
-{ TVertexWeightList }
+// -------------------------
+// TVertexWeightList 
+// -------------------------
 
 procedure TVertexWeightList.clear;
 var
@@ -623,7 +626,8 @@ begin
       end
       else
       begin
-        Exception.Create(ResourceName + ' has materials but there is no material library assigned to the object loading this MS3D file.' + #10#13 + 'If this is what you want,  then you can safely ignore this exception.');
+        Exception.Create(ResourceName + ' has materials but there is no material library assigned to the object loading this MS3D file.' + #10#13 + 
+          'If this is what you want,  then you can safely ignore this exception.');
       end;
     end;
 

+ 5 - 3
Source/GLFileNMF.pas

@@ -1,13 +1,15 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
-{
+
+unit GLFileNMF;
+
+(*
   NormalMapper loading into GLScene FreeForms/Actors
 
   Notes:
   NormalMapper can be found at http://www.ati.com/developer/tools.html
-}
-unit GLFileNMF;
+*)
 
 interface
 

+ 3 - 3
Source/GLFileNurbs.pas

@@ -1,11 +1,11 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
-{
-   Nurbs surfaces vector file loading. 
-}
+
 unit GLFileNurbs;
 
+(* Nurbs surfaces vector file loading. *)
+
 interface
 
 uses

+ 10 - 9
Source/GLFileOBJ.pas

@@ -33,20 +33,21 @@ uses
   GLMaterial;
 
 const
-  BufSize = 10240; { Load input data in chunks of BufSize Bytes. }
-  LineLen = 100; { Allocate memory for the current line in chunks
-  of LineLen Bytes. }
+  // Load input data in chunks of BufSize Bytes. 
+  BufSize = 10240;
+  // Allocate memory for the current line in chunks of LineLen Bytes.  
+  LineLen = 100; 
 
 type
 
   TGLOBJVectorFile = class(TGLVectorFile)
   private
-    FSourceStream: TStream; { Load from this stream }
-    FBuffer: AnsiString; { Buffer }
-    FLine: string; { current line }
-    FLineNo: Integer; { current Line number - for error messages }
-    FEof: Boolean; { Stream done? }
-    FBufPos: Integer; { Position in the buffer }
+    FSourceStream: TStream; // Load from this stream 
+    FBuffer: AnsiString; // Buffer 
+    FLine: string; // current line 
+    FLineNo: Integer; // current Line number - for error messages 
+    FEof: Boolean; // Stream done? 
+    FBufPos: Integer; // Position in the buffer 
   protected
     // Read a single line of text from the source stream, set FEof to true when done.
     procedure ReadLine;

+ 1 - 1
Source/GLFileOCT.pas

@@ -32,7 +32,7 @@ uses
 
 type
 
-  {The OCT vector file (FSRad output).  }
+  // The OCT vector file (FSRad output).  
   TGLOCTGLVectorFile = class(TGLVectorFile)
   public
     class function Capabilities: TGLDataFileCapabilities; override;

+ 7 - 7
Source/GLFilePAK.pas

@@ -1,16 +1,15 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
-{
-   Methods for PAK Archiving
-}
 
 unit GLFilePAK;
 
-{$I GLScene.inc}
+(* Methods for PAK Archiving *)
 
 interface
 
+{$I GLScene.inc}
+
 uses
   System.Classes,
   System.SysUtils,
@@ -19,7 +18,7 @@ uses
 const
    SIGN = 'PACK';
 
-Type
+type
 
    TPakHeader = record
       Signature: array[0..3] of AnsiChar;
@@ -73,7 +72,9 @@ implementation
 var
    Dir: TFileSection;
 
-{ TPAKArchive }
+//-------------------------------
+// TPAKArchive 
+//-------------------------------
 
 function TPAKArchive.GetContentCount: integer;
 begin
@@ -99,7 +100,6 @@ begin
   inherited SetCompressionLevel(aValue);
 end;
 
-
 procedure TPAKArchive.LoadFromFile(const FileName: string);
 begin
    FFileName := FileName;

+ 3 - 1
Source/GLFileTGA.pas

@@ -1,13 +1,15 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
+
+unit GLFileTGA;
+
 (*
   Simple TGA formats supports.
   Currently supports only 24 and 32 bits RGB formats
   (uncompressed and RLE compressed).
   Based on David McDuffee's document from www.wotsit.org
 *)
-unit GLFileTGA;
 
 interface
 

+ 3 - 3
Source/GLFileVRML.pas

@@ -1,11 +1,11 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
-{
-  Preliminary VRML vector file support.
-}
+
 unit GLFileVRML;
 
+(* Preliminary VRML vector file support. *)
+
 interface
 
 {$I GLScene.inc}

+ 4 - 4
Source/GLFileWAV.pas

@@ -1,11 +1,11 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
-{
-   Support for Windows WAV format. 
-}
+
 unit GLFileWAV;
 
+(* Support for Windows WAV format. *)
+
 interface
 
 {$I GLScene.inc}
@@ -18,7 +18,7 @@ uses
 
 type
 
-   {Support for Windows WAV format. }
+   // Support for Windows WAV format. 
    TGLWAVFile = class (TGLSoundFile)
       private
          {$IFDEF MSWINDOWS}

+ 2 - 3
Source/GLFileX.pas

@@ -1,12 +1,11 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
-{
-  Simple X format support for Delphi (Microsoft's favorite format)
-}
 
 unit GLFileX;
 
+(* Simple X format support for Delphi (Microsoft's favorite format) *)
+
 interface
 
 {$I GLScene.inc}

+ 10 - 18
Source/GLFileZLIB.pas

@@ -1,17 +1,15 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
-{
-   Methods for archiving using ZLib 
-   .
-}
 
 unit GLFileZLIB;
 
-{$I GLScene.inc}
+(* Methods for archiving using ZLib *)
 
 interface
 
+{$I GLScene.inc}
+
 uses
   System.Classes, 
   System.SysUtils, 
@@ -36,37 +34,27 @@ Type
       CbrMode: TCompressionLevel;
    end;
 
-  { TZLibArchive }
-
-  TZLibArchive=class(TGLBaseArchive)
+  TZLibArchive = class(TGLBaseArchive)
     private
       FHeader: TZLibHeader;
       FStream: TFileStream;
-
       function GetContentCount: integer;
       procedure MakeContentList;
     public
       property ContentCount: integer Read GetContentCount;
       destructor Destroy; override;
-
       procedure LoadFromFile(const FileName: string); override;
-
       procedure Clear; override;
       function ContentExists(ContentName: string): boolean;override;
-
       function GetContent(aStream: TStream; index: integer): TStream; override;
       function GetContent(index: integer): TStream; override;
       function GetContent(ContentName: string): TStream; override;
-
       function GetContentSize(index: integer): integer; override;
       function GetContentSize(ContentName: string): integer; override;
-
       procedure AddFromStream(ContentName, Path: string; FS: TStream);override;
       procedure AddFromFile(FileName, Path: string); override;
-
       procedure RemoveContent(index: integer); overload; override;
       procedure RemoveContent(ContentName: string); overload;override;
-
       procedure Extract(index: integer; NewName: string); override;
       procedure Extract(ContentName, NewName: string); override;
   end;
@@ -78,8 +66,9 @@ implementation
 var
    Dir: TFileSection;
 
-{ TZLibArchive }
-
+//-----------------------------
+//  TZLibArchive 
+//-----------------------------
 
 function TZLibArchive.GetContentCount: integer;
 begin
@@ -340,7 +329,10 @@ begin
       Extract(FContentList.IndexOf(ContentName), NewName);
 end;
 
+//-----------------------------
 initialization
+//-----------------------------
+
   RegisterArchiveFormat('zlib', 'GLScene file uses the zlib compression algorithm', TZLibArchive);
 
 end.

+ 3 - 3
Source/GLFireFX.pas

@@ -1,11 +1,11 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
-(*
-   Fire special effect
-*)
+
 unit GLFireFX;
 
+(*  Fire special effect *)
+
 interface
 
 {$I GLScene.inc}

+ 2 - 2
Source/GLForces.pas

@@ -14,8 +14,8 @@ uses
   GLScene,
   GLVectorGeometry,
   GLBehaviours,
-  GLCoordinates
-  {, GLSceneRegister};
+  // GLSceneRegister,
+  GLCoordinates;
 
 type
   TGLForce = class;

+ 6 - 5
Source/GLGLUTesselation.pas

@@ -1,11 +1,11 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
-{
-  Code to generate triangle strips and fans for polygons.
-}
+
 unit GLGLUTesselation;
 
+(* Code to generate triangle strips and fans for polygons. *)
+
 interface
 
 {$I GLScene.inc}
@@ -21,8 +21,9 @@ uses
   GLVectorLists,
   GLVectorGeometry;
 
-{Tesselates the polygon outlined by the Vertexes. And addeds them to the first facegroup of the Mesh. }
-procedure DoTesselate(Vertexes: TAffineVectorList; Mesh: TGLBaseMesh; normal: PAffineVector = nil; invertNormals: Boolean = False);
+(* Tesselates the polygon outlined by the Vertexes. And addeds them to the first facegroup of the Mesh. *)
+procedure DoTesselate(Vertexes: TAffineVectorList; Mesh: TGLBaseMesh; 
+  normal: PAffineVector = nil; invertNormals: Boolean = False);
 
 //---------------------------------------------------------------------------
 implementation

+ 3 - 3
Source/GLGeomObjects.pas

@@ -1,11 +1,11 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
-(*
-  Geometric objects.
-*)
+
 unit GLGeomObjects;
 
+(* Geometric objects. *)
+
 interface
 
 {$I GLScene.inc}

+ 51 - 57
Source/GLGeometryBB.pas

@@ -1,12 +1,11 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
-{
-  Calculations and manipulations on Bounding Boxes. 
-}
 
 unit GLGeometryBB;
 
+(* Calculations and manipulations on Bounding Boxes *)
+
 interface
 
 {$I GLScene.inc}
@@ -19,21 +18,21 @@ uses
   GLVectorTypes;
 
 type
-  {  Structure for storing Bounding Boxes }
+  //  Structure for storing Bounding Boxes 
   PHmgBoundingBox = ^THmgBoundingBox;
 
   THmgBoundingBox = record
     BBox: array [0 .. 7] of TVector;
   end;
 
-  {  Structure for storing Axis Aligned Bounding Boxes }
+  //  Structure for storing Axis Aligned Bounding Boxes 
   TAABB = record
     Min, Max: TAffineVector;
   end;
 
   PAABB = ^TAABB;
 
-  { Structure for storing BoundingSpheres. Similar to TAABB }
+  // Structure for storing BoundingSpheres. Similar to TAABB 
   TBSphere = record
     { Center of Bounding Sphere }
     Center: TAffineVector;
@@ -46,10 +45,10 @@ type
     Right, Bottom: Single;
   end;
 
-  { Result type for space intersection tests, like AABBContainsAABB or
-    BSphereContainsAABB }
+  (* Result type for space intersection tests, like AABBContainsAABB or
+    BSphereContainsAABB *)
   TSpaceContains = (ScNoOverlap, ScContainsFully, ScContainsPartially);
-  { Structure for storing the corners of an AABB, used with ExtractAABBCorners }
+  // Structure for storing the corners of an AABB, used with ExtractAABBCorners 
   TAABBCorners = array [0 .. 7] of TAffineVector;
 
   const
@@ -67,15 +66,12 @@ type
 // Bounding Box functions
 // ------------------------------------------------------------------------------
 
-function BoundingBoxesAreEqual(const ABoundingBox1, ABoundingBox2
-  : THmgBoundingBox): Boolean; overload;
-function BoundingBoxesAreEqual(const ABoundingBox1, ABoundingBox2
-  : PHmgBoundingBox): Boolean; overload;
+function BoundingBoxesAreEqual(const ABoundingBox1, ABoundingBox2: THmgBoundingBox): Boolean; overload;
+function BoundingBoxesAreEqual(const ABoundingBox1, ABoundingBox2: PHmgBoundingBox): Boolean; overload;
 
-{  Adds a BB into another BB. 
-  The original BB (c1) is extended if necessary to contain c2. }
-function AddBB(var C1: THmgBoundingBox; const C2: THmgBoundingBox)
-  : THmgBoundingBox;
+(*  Adds a BB into another BB. 
+  The original BB (c1) is extended if necessary to contain c2. *)
+function AddBB(var C1: THmgBoundingBox; const C2: THmgBoundingBox): THmgBoundingBox;
 procedure AddAABB(var Aabb: TAABB; const Aabb1: TAABB);
 
 procedure SetBB(var C: THmgBoundingBox; const V: TVector);
@@ -92,91 +88,89 @@ function BBMaxY(const C: THmgBoundingBox): Single;
 function BBMinZ(const C: THmgBoundingBox): Single;
 function BBMaxZ(const C: THmgBoundingBox): Single;
 
-{ Resize the AABB if necessary to include p. }
+// Resize the AABB if necessary to include p. 
 procedure AABBInclude(var Bb: TAABB; const P: TAffineVector);
-{ Make an AABB that is formed by sweeping a sphere (or AABB) from Start to Dest }
+// Make an AABB that is formed by sweeping a sphere (or AABB) from Start to Dest 
 procedure AABBFromSweep(var SweepAABB: TAABB; const Start, Dest: TVector; const Radius: Single);
-{ Returns the intersection AABB of two AABBs. 
-  If the AABBs don't intersect, will return a degenerated AABB (plane, line or point). }
+(* Returns the intersection AABB of two AABBs. 
+  If the AABBs don't intersect, will return a degenerated AABB (plane, line or point). *)
 function AABBIntersection(const Aabb1, Aabb2: TAABB): TAABB;
-{  Extract AABB information from a BB. }
+//  Extract AABB information from a BB. 
 function BBToAABB(const ABB: THmgBoundingBox): TAABB;
-{ Converts an AABB to its canonical BB. }
+// Converts an AABB to its canonical BB. 
 function AABBToBB(const AnAABB: TAABB): THmgBoundingBox; overload;
-{ Transforms an AABB to a BB. }
+// Transforms an AABB to a BB. 
 function AABBToBB(const AnAABB: TAABB; const M: TMatrix): THmgBoundingBox; overload;
-{  Adds delta to min and max of the AABB. }
+//  Adds delta to min and max of the AABB. 
 procedure OffsetAABB(var Aabb: TAABB; const Delta: TAffineVector); overload;
 procedure OffsetAABB(var Aabb: TAABB; const Delta: TVector); overload;
-{  Adds delta to min and max of the BB. }
+//  Adds delta to min and max of the BB. 
 procedure OffsetBB(var Bb: THmgBoundingBox; const Delta: TAffineVector); overload;
 procedure OffsetBB(var Bb: THmgBoundingBox; const Delta: TVector); overload;
-{ The same as above but uses AddPoint() instead of AddVector(). }
+// The same as above but uses AddPoint() instead of AddVector(). 
 procedure OffsetBBPoint(var Bb: THmgBoundingBox; const Delta: TVector); overload;
-{ Determines if two AxisAlignedBoundingBoxes intersect. 
-  The matrices are the ones that convert one point to the other's AABB system }
-function IntersectAABBs(const Aabb1, Aabb2: TAABB; const M1To2, M2To1: TMatrix)
-  : Boolean; overload;
-{ Checks whether two Bounding boxes aligned with the world axes collide in the XY plane.  }
+(* Determines if two AxisAlignedBoundingBoxes intersect. 
+  The matrices are the ones that convert one point to the other's AABB system *)
+function IntersectAABBs(const Aabb1, Aabb2: TAABB; const M1To2, M2To1: TMatrix): Boolean; overload;
+// Checks whether two Bounding boxes aligned with the world axes collide in the XY plane.  
 function IntersectAABBsAbsoluteXY(const Aabb1, Aabb2: TAABB): Boolean;
-{ Checks whether two Bounding boxes aligned with the world axes collide in the XZ plane.  }
+// Checks whether two Bounding boxes aligned with the world axes collide in the XZ plane.  
 function IntersectAABBsAbsoluteXZ(const Aabb1, Aabb2: TAABB): Boolean;
-{ Checks whether two Bounding boxes aligned with the world axes collide.  }
+// Checks whether two Bounding boxes aligned with the world axes collide.  
 function IntersectAABBsAbsolute(const Aabb1, Aabb2: TAABB): Boolean;
-{ Checks whether one Bounding box aligned with the world axes fits within
-  another Bounding box.  }
+(* Checks whether one Bounding box aligned with the world axes fits within
+  another Bounding box *)
 function AABBFitsInAABBAbsolute(const Aabb1, Aabb2: TAABB): Boolean;
 
-{ Checks if a point "p" is inside an AABB }
+// Checks if a point "p" is inside an AABB 
 function PointInAABB(const P: TAffineVector; const Aabb: TAABB): Boolean; overload;
 function PointInAABB(const P: TVector; const Aabb: TAABB): Boolean; overload;
 
-{ Checks if a plane (given by the normal+d) intersects the AABB }
+// Checks if a plane (given by the normal+d) intersects the AABB 
 function PlaneIntersectAABB(const Normal: TAffineVector; D: Single; const Aabb: TAABB): Boolean;
-{ Compute the intersection between a plane and the AABB}
+// Compute the intersection between a plane and the AABB
 function PlaneAABBIntersection(const plane : THmgPlane; const AABB : TAABB) : TAffineVectorList;
-{ Checks if a triangle (given by vertices v1, v2 and v3) intersects an AABB }
+// Checks if a triangle (given by vertices v1, v2 and v3) intersects an AABB 
 function TriangleIntersectAABB(const Aabb: TAABB; const V1, V2, V3: TAffineVector): Boolean;
 
-{ Extract the corners from an AABB }
+// Extract the corners from an AABB 
 procedure ExtractAABBCorners(const AABB: TAABB; var AABBCorners: TAABBCorners);
 
-{ Convert an AABB to a BSphere }
+// Convert an AABB to a BSphere 
 procedure AABBToBSphere(const AABB: TAABB; var BSphere: TBSphere);
-{ Convert a BSphere to an AABB }
+// Convert a BSphere to an AABB 
 procedure BSphereToAABB(const BSphere: TBSphere; var AABB: TAABB); overload;
 function BSphereToAABB(const Center: TAffineVector; Radius: Single): TAABB; overload;
 function BSphereToAABB(const Center: TVector; Radius: Single): TAABB; overload;
 
-{ Determines to which extent one AABB contains another AABB }
+// Determines to which extent one AABB contains another AABB 
 function AABBContainsAABB(const MainAABB, TestAABB: TAABB): TSpaceContains;
-{ Determines to which extent a BSphere contains an AABB }
+// Determines to which extent a BSphere contains an AABB 
 function BSphereContainsAABB(const MainBSphere: TBSphere; const TestAABB: TAABB): TSpaceContains;
-{ Determines to which extent one BSphere contains another BSphere }
+// Determines to which extent one BSphere contains another BSphere 
 function BSphereContainsBSphere(const MainBSphere, TestBSphere: TBSphere): TSpaceContains;
-{ Determines to which extent an AABB contains a BSpher }
-function AABBContainsBSphere(const MainAABB: TAABB; const TestBSphere: TBSphere)
-  : TSpaceContains;
-{ Determines to which extent a plane contains a BSphere }
+// Determines to which extent an AABB contains a BSpher 
+function AABBContainsBSphere(const MainAABB: TAABB; const TestBSphere: TBSphere): TSpaceContains;
+// Determines to which extent a plane contains a BSphere 
 function PlaneContainsBSphere(const Location, Normal: TAffineVector;
   const TestBSphere: TBSphere): TSpaceContains;
-{ Determines to which extent a frustum contains a BSphere }
+// Determines to which extent a frustum contains a BSphere 
 function FrustumContainsBSphere(const Frustum: TFrustum;
   const TestBSphere: TBSphere): TSpaceContains;
-{ Determines to which extent a frustum contains an AABB }
+// Determines to which extent a frustum contains an AABB 
 function FrustumContainsAABB(const Frustum: TFrustum; const TestAABB: TAABB): TSpaceContains;
-{ Clips a position to an AABB }
+// Clips a position to an AABB 
 function ClipToAABB(const V: TAffineVector; const AABB: TAABB): TAffineVector;
-{ Determines if one BSphere intersects another BSphere }
+// Determines if one BSphere intersects another BSphere 
 function BSphereIntersectsBSphere(const MainBSphere, TestBSphere: TBSphere): Boolean;
 
-{ Extend the clip rect to include given coordinate. }
+// Extend the clip rect to include given coordinate. 
 procedure IncludeInClipRect(var ClipRect: TClipRect; X, Y: Single);
-{ Projects an AABB and determines the extent of its projection as a clip rect. }
+// Projects an AABB and determines the extent of its projection as a clip rect. 
 function AABBToClipRect(const Aabb: TAABB; const ModelViewProjection: TMatrix;
   ViewportSizeX, ViewportSizeY: Integer): TClipRect;
 
-{ Finds the intersection between a ray and an axis aligned bounding box. }
+// Finds the intersection between a ray and an axis aligned bounding box. 
 function RayCastAABBIntersect(const RayOrigin, RayDirection: TVector;
   const Aabb: TAABB; out TNear, TFar: Single): Boolean; overload;
 function RayCastAABBIntersect(const RayOrigin, RayDirection: TVector;

+ 78 - 137
Source/GLGeometryCoordinates.pas

@@ -1,11 +1,13 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
-{
+
+unit GLGeometryCoordinates;
+
+(*
   Helper functions to convert between different three dimensional coordinate
   systems. Room for optimisations.
-}
-unit GLGeometryCoordinates;
+*)
 
 interface
 
@@ -16,73 +18,73 @@ uses
 
   GLVectorGeometry;
 
-{ Convert cylindrical to cartesian [single]. theta in rad }
+// Convert cylindrical to cartesian [single]. theta in rad 
 procedure Cylindrical_Cartesian(const r, theta, z1: single; var x, y, z: single); overload;
-{ Convert cylindrical to cartesian [double]. theta in rads }
+// Convert cylindrical to cartesian [double]. theta in rads 
 procedure Cylindrical_Cartesian(const r, theta, z1: double; var x, y, z: double); overload;
-{ Convert cylindrical to cartesian [single] (with error check). theta in rad }
+// Convert cylindrical to cartesian [single] (with error check). theta in rad 
 procedure Cylindrical_Cartesian(const r, theta, z1: single; var x, y, z: single;
   var ierr: integer); overload;
-{ Convert cylindrical to cartesian [double] (with error check). theta in rad }
+// Convert cylindrical to cartesian [double] (with error check). theta in rad 
 procedure Cylindrical_Cartesian(const r, theta, z1: double; var x, y, z: double;
   var ierr: integer); overload;
 
-{ Convert cartesian to cylindrical [single] }
+// Convert cartesian to cylindrical [single] 
 procedure Cartesian_Cylindrical(const x, y, z1: single; var r, theta, z: single); overload;
-{ Convert cartesion to cylindrical [double] }
+// Convert cartesion to cylindrical [double] 
 procedure Cartesian_Cylindrical(const x, y, z1: double; var r, theta, z: double); overload;
 
-{ Convert spherical to cartesion. [single] theta,phi in rads }
+// Convert spherical to cartesion. [single] theta,phi in rads 
 procedure Spherical_Cartesian(const r, theta, phi: single; var x, y, z: single); overload;
-{ Convert spherical to cartesion. [double] theta,phi in rads }
+// Convert spherical to cartesion. [double] theta,phi in rads 
 procedure Spherical_Cartesian(const r, theta, phi: double; var x, y, z: double); overload;
-{ Convert spherical to cartesian [single] (with error check).theta,phi in rad }
+// Convert spherical to cartesian [single] (with error check).theta,phi in rad 
 procedure Spherical_Cartesian(const r, theta, phi: single; var x, y, z: single;
   var ierr: integer); overload;
-{ Convert spherical to cartesian [double] (with error check).theta,phi in rad }
+// Convert spherical to cartesian [double] (with error check).theta,phi in rad 
 procedure Spherical_Cartesian(const r, theta, phi: double; var x, y, z: double;
   var ierr: integer); overload;
 
-{ Convert cartesian to spherical [single] }
+// Convert cartesian to spherical [single] 
 procedure Cartesian_Spherical(const x, y, z: single; var r, theta, phi: single); overload;
 procedure Cartesian_Spherical(const v: TAffineVector; var r, theta, phi: single); overload;
-{ Convert cartesion to spherical [double] }
+// Convert cartesion to spherical [double] 
 procedure Cartesian_Spherical(const x, y, z: double; var r, theta, phi: double); overload;
 
-{ Convert Prolate-Spheroidal to Cartesian. [single] eta, phi in rad }
+// Convert Prolate-Spheroidal to Cartesian. [single] eta, phi in rad 
 procedure ProlateSpheroidal_Cartesian(const xi, eta, phi, a: single;
   var x, y, z: single); overload;
-{ Convert Prolate-Spheroidal to Cantesian. [double] eta,phi in rad }
+// Convert Prolate-Spheroidal to Cantesian. [double] eta,phi in rad 
 procedure ProlateSpheroidal_Cartesian(const xi, eta, phi, a: double;
   var x, y, z: double); overload;
-{ Convert Prolate-Spheroidal to Cartesian [single](with error check). eta,phi in rad }
+// Convert Prolate-Spheroidal to Cartesian [single](with error check). eta,phi in rad 
 procedure ProlateSpheroidal_Cartesian(const xi, eta, phi, a: single; 
   var x, y, z: single; var ierr: integer); overload;
-{ Convert Prolate-Spheroidal to Cartesian [single](with error check). eta,phi in rad }
+// Convert Prolate-Spheroidal to Cartesian [single](with error check). eta,phi in rad 
 procedure ProlateSpheroidal_Cartesian(const xi, eta, phi, a: double; 
   var x, y, z: double;  var ierr: integer); overload;
-{ Convert Oblate-Spheroidal to Cartesian. [Single] eta, phi in rad }
+// Convert Oblate-Spheroidal to Cartesian. [Single] eta, phi in rad 
 procedure OblateSpheroidal_Cartesian(const xi, eta, phi, a: single;
   var x, y, z: single); overload;
-{ Convert Oblate-Spheroidal to Cartesian. [Double] eta, phi in rad }
+// Convert Oblate-Spheroidal to Cartesian. [Double] eta, phi in rad 
 procedure OblateSpheroidal_Cartesian(const xi, eta, phi, a: double;
   var x, y, z: double); overload;
-{ Convert Oblate-Spheroidal to Cartesian (with error check). eta,phi in rad }
+// Convert Oblate-Spheroidal to Cartesian (with error check). eta,phi in rad 
 procedure OblateSpheroidal_Cartesian(const xi, eta, phi, a: single;
   var x, y, z: single; var ierr: integer); overload;
-{ Convert Oblate-Spheroidal to Cartesian (with error check).[Double] eta,phi in rad }
+// Convert Oblate-Spheroidal to Cartesian (with error check).[Double] eta,phi in rad 
 procedure OblateSpheroidal_Cartesian(const xi, eta, phi, a: double;
   var x, y, z: double; var ierr: integer); overload;
-{ Convert Bipolar to Cartesian. u in rad }
+// Convert Bipolar to Cartesian. u in rad 
 procedure BipolarCylindrical_Cartesian(const u, v, z1, a: single;
   var x, y, z: single); overload;
-{ Convert Bipolar to Cartesian. [Double] u in rad }
+// Convert Bipolar to Cartesian. [Double] u in rad 
 procedure BipolarCylindrical_Cartesian(const u, v, z1, a: double;
   var x, y, z: double); overload;
-{ Convert Bipolar to Cartesian (with error check). u in rad }
+// Convert Bipolar to Cartesian (with error check). u in rad 
 procedure BipolarCylindrical_Cartesian(const u, v, z1, a: single;
   var x, y, z: single; var ierr: integer); overload;
-{ Convert Bipolar to Cartesian (with error check). [Double] u in rad }
+// Convert Bipolar to Cartesian (with error check). [Double] u in rad 
 procedure BipolarCylindrical_Cartesian(const u, v, z1, a: double;
   var x, y, z: double; var ierr: integer); overload;
 
@@ -91,8 +93,8 @@ implementation
 // --------------------------------------------------------------------------
 
 // ----- Cylindrical_Cartesian ---------------------------------------------
-{ ** Convert Cylindrical to Cartesian with no checks.
-  Ref: http://mathworld.wolfram.com/CylindricalCoordinates.html }
+(* Convert Cylindrical to Cartesian with no checks.
+  Ref: http://mathworld.wolfram.com/CylindricalCoordinates.html *)
 procedure Cylindrical_Cartesian(const r, theta, z1: single; var x, y, z: single);
 
 begin
@@ -101,8 +103,8 @@ begin
 end;
 
 // ----- Cylindrical_Cartesian -------------------------------------------------
-{ ** Convert Cylindrical to Cartesian with no checks. Double version
-  Ref: http://mathworld.wolfram.com/CylindricalCoordinates.html }
+(* Convert Cylindrical to Cartesian with no checks. Double version
+  Ref: http://mathworld.wolfram.com/CylindricalCoordinates.html *)
 procedure Cylindrical_Cartesian(const r, theta, z1: double; var x, y, z: double);
 
 begin
@@ -111,17 +113,17 @@ begin
 end;
 
 // ----- Cylindrical_Cartesian -------------------------------------------------
-{ ** Convert Cylindrical to Cartesian with checks.
+(* Convert Cylindrical to Cartesian with checks.
   ierr: [0] = ok,
   [1] = r out of bounds. Acceptable r: [0,inf)
   [2] = theta out of bounds. Acceptable theta: [0,2pi)
   [3] = z1 out of bounds. Acceptable z1 : (-inf,inf)
-  Ref: http://mathworld.wolfram.com/CylindricalCoordinates.html }
+  Ref: http://mathworld.wolfram.com/CylindricalCoordinates.html *)
 procedure Cylindrical_Cartesian(const r, theta, z1: single; var x, y, z: single;
   var ierr: integer);
 
 begin
-  { ** check input parameters }
+  // check input parameters 
   if (r < 0.0) then
     ierr := 1
   else if ((theta < 0.0) or (theta >= 2 * pi)) then
@@ -137,17 +139,17 @@ begin
 end;
 
 // ----- Cylindrical_Cartesian -------------------------------------------------
-{ ** Convert Cylindrical to Cartesian with checks.
+(* Convert Cylindrical to Cartesian with checks.
   ierr: [0] = ok,
   [1] = r out of bounds. Acceptable r: [0,inf)
   [2] = theta out of bounds. Acceptable theta: [0,2pi)
   [3] = z1 out of bounds. Acceptable z1 : (-inf,inf)
-  Ref: http://mathworld.wolfram.com/CylindricalCoordinates.html }
+  Ref: http://mathworld.wolfram.com/CylindricalCoordinates.html *)
 procedure Cylindrical_Cartesian(const r, theta, z1: double; var x, y, z: double;
   var ierr: integer);
 
 begin
-  { ** check input parameters }
+  // check input parameters 
   if (r < 0.0) then
     ierr := 1
   else if ((theta < 0.0) or (theta >= 2 * pi)) then
@@ -163,9 +165,8 @@ begin
 end;
 
 // ----- Cartesian_Cylindrical -------------------------------------------------
-{ ** Convert Cartesian to Cylindrical no checks. Single }
+(* Convert Cartesian to Cylindrical no checks. Single *)
 procedure Cartesian_Cylindrical(const x, y, z1: single; var r, theta, z: single);
-
 begin
   r := sqrt(x * x + y * y);
   theta := ArcTan2(y, x);
@@ -173,9 +174,8 @@ begin
 end;
 
 // ----- Cartesian_Cylindrical -------------------------------------------------
-{ ** Convert Cartesian to Cylindrical no checks. Duoble }
+(* Convert Cartesian to Cylindrical no checks. Duoble *)
 procedure Cartesian_Cylindrical(const x, y, z1: double; var r, theta, z: double);
-
 begin
   r := sqrt(x * x + y * y);
   theta := ArcTan2(y, x);
@@ -183,44 +183,38 @@ begin
 end;
 
 // ----- Spherical_Cartesian ---------------------------------------------------
-{ ** Convert Spherical to Cartesian with no checks.
-  Ref: http://mathworld.wolfram.com/SphericalCoordinates.html }
+(* Convert Spherical to Cartesian with no checks.
+  Ref: http://mathworld.wolfram.com/SphericalCoordinates.html *)
 procedure Spherical_Cartesian(const r, theta, phi: single; var x, y, z: single);
-
 var
   a: single;
-
 begin
   SinCosine(phi, r, a, z); // z = r*cos(phi), a=r*sin(phi)
   SinCosine(theta, a, y, x); // x = a*cos(theta), y = a*sin(theta)}
 end;
 
 // ----- Spherical_Cartesian ---------------------------------------------------
-{ ** Convert Spherical to Cartesian with no checks. Double version.
-  Ref: http://mathworld.wolfram.com/SphericalCoordinates.html }
+(* Convert Spherical to Cartesian with no checks. Double version.
+  Ref: http://mathworld.wolfram.com/SphericalCoordinates.html *)
 procedure Spherical_Cartesian(const r, theta, phi: double; var x, y, z: double);
-
 var
   a: double;
-
 begin
   SinCosine(phi, r, a, z); // z = r*cos(phi), a=r*sin(phi)
   SinCosine(theta, a, y, x); // x = a*cos(theta), y = a*sin(theta)}
 end;
 
 // ----- Spherical_Cartesian ---------------------------------------------------
-{ ** Convert Spherical to Cartesian with checks.
+(* Convert Spherical to Cartesian with checks.
   ierr: [0] = ok,
   [1] = r out of bounds
   [2] = theta out of bounds
   [3] = phi out of bounds
-  Ref: http://mathworld.wolfram.com/SphericalCoordinates.html }
+  Ref: http://mathworld.wolfram.com/SphericalCoordinates.html *)
 procedure Spherical_Cartesian(const r, theta, phi: single; var x, y, z: single;
   var ierr: integer);
-
 var
   a: single;
-
 begin
   if (r < 0.0) then
     ierr := 1
@@ -230,7 +224,6 @@ begin
     ierr := 3
   else
     ierr := 0;
-
   if (ierr = 0) then
   begin
     SinCosine(phi, r, a, z); // z = r*cos(phi), a=r*sin(phi)
@@ -239,18 +232,16 @@ begin
 end;
 
 // ----- Spherical_Cartesian ---------------------------------------------------
-{ ** Convert Spherical to Cartesian with checks.
+(* Convert Spherical to Cartesian with checks.
   ierr: [0] = ok,
   [1] = r out of bounds
   [2] = theta out of bounds
   [3] = phi out of bounds
-  Ref: http://mathworld.wolfram.com/SphericalCoordinates.html }
+  Ref: http://mathworld.wolfram.com/SphericalCoordinates.html *)
 procedure Spherical_Cartesian(const r, theta, phi: double; var x, y, z: double;
   var ierr: integer);
-
 var
   a: double;
-
 begin
   if (r < 0.0) then
     ierr := 1
@@ -269,12 +260,10 @@ begin
 end;
 
 // ----- Cartesian_Spherical ---------------------------------------------------
-{ ** convert Cartesian to Spherical, no checks, single
+(* convert Cartesian to Spherical, no checks, single
   Ref: http://mathworld.wolfram.com/SphericalCoordinates.html
-  NB: Could be optimised by using jclmath.pas unit?
-}
+  NB: Could be optimised by using jclmath.pas unit? *)
 procedure Cartesian_Spherical(const x, y, z: single; var r, theta, phi: single);
-
 begin
   r := sqrt((x * x) + (y * y) + (z * z));
   theta := ArcTan2(y, x);
@@ -289,12 +278,10 @@ begin
 end;
 
 // ----- Cartesian_Spherical ---------------------------------------------------
-{ ** convert Cartesian to Spherical, no checks, double
+(* convert Cartesian to Spherical, no checks, double
   Ref: http://mathworld.wolfram.com/SphericalCoordinates.html
-  NB: Could be optimised by using jclmath.pas unit?
-}
+  NB: Could be optimised by using jclmath.pas unit? *)
 procedure Cartesian_Spherical(const x, y, z: double; var r, theta, phi: double);
-
 begin
   r := sqrt((x * x) + (y * y) + (z * z));
   theta := ArcTan2(y, x);
@@ -302,7 +289,7 @@ begin
 end;
 
 // ----- ProlateSpheroidal_Cartesian -------------------------------------------
-{ ** Convert Prolate-Spheroidal to Cartesian with no checks.
+(* Convert Prolate-Spheroidal to Cartesian with no checks.
   A system of curvilinear coordinates in which two sets of coordinate surfaces are
   obtained by revolving the curves of the elliptic cylindrical coordinates about
   the x-axis, which is relabeled the z-axis. The third set of coordinates
@@ -310,12 +297,10 @@ end;
   The coordinate system is parameterised by parameter a. A default value of a=1 is
   suggesed:
   http://documents.wolfram.com/v4/AddOns/StandardPackages/Calculus/VectorAnalysis.html
-  Ref: http://mathworld.wolfram.com/ProlateSpheroidalCoordinates.html }
+  Ref: http://mathworld.wolfram.com/ProlateSpheroidalCoordinates.html *)
 procedure ProlateSpheroidal_Cartesian(const xi, eta, phi, a: single; var x, y, z: single);
-
 var
   sn, cs, snphi, csphi, shx, chx: single;
-
 begin
   SinCosine(eta, a, sn, cs);
   SinCosine(phi, snphi, csphi);
@@ -327,7 +312,7 @@ begin
 end;
 
 // ----- ProlateSpheroidal_Cartesian -------------------------------------------
-{ ** Convert Prolate-Spheroidal to Cartesian with no checks. Double version.
+(* Convert Prolate-Spheroidal to Cartesian with no checks. Double version.
   A system of curvilinear coordinates in which two sets of coordinate surfaces are
   obtained by revolving the curves of the elliptic cylindrical coordinates about
   the x-axis, which is relabeled the z-axis. The third set of coordinates
@@ -335,12 +320,10 @@ end;
   The coordinate system is parameterised by parameter a. A default value of a=1 is
   suggesed:
   http://documents.wolfram.com/v4/AddOns/StandardPackages/Calculus/VectorAnalysis.html
-  Ref: http://mathworld.wolfram.com/ProlateSpheroidalCoordinates.html }
+  Ref: http://mathworld.wolfram.com/ProlateSpheroidalCoordinates.html *)
 procedure ProlateSpheroidal_Cartesian(const xi, eta, phi, a: double; var x, y, z: double);
-
 var
   sn, cs, snphi, csphi, shx, chx: double;
-
 begin
   SinCosine(eta, a, sn, cs);
   SinCosine(phi, snphi, csphi);
@@ -352,18 +335,16 @@ begin
 end;
 
 // ----- ProlateSpheroidal_Cartesian -------------------------------------------
-{ ** Convert Prolate-Spheroidal to Cartesian with checks.
+(* Convert Prolate-Spheroidal to Cartesian with checks.
   ierr: [0] = ok,
   [1] = xi out of bounds. Acceptable xi: [0,inf)
   [2] = eta out of bounds. Acceptable eta: [0,pi]
   [3] = phi out of bounds. Acceptable phi: [0,2pi)
-  Ref: http://mathworld.wolfram.com/ProlateSpheroidalCoordinates.html }
+  Ref: http://mathworld.wolfram.com/ProlateSpheroidalCoordinates.html *)
 procedure ProlateSpheroidal_Cartesian(const xi, eta, phi, a: single;
   var x, y, z: single; var ierr: integer); overload;
-
 var
   sn, cs, snphi, csphi, shx, chx: single;
-
 begin
   if (xi < 0.0) then
     ierr := 1
@@ -373,15 +354,12 @@ begin
     ierr := 3
   else
     ierr := 0;
-
   if (ierr = 0) then
   begin
     SinCosine(eta, a, sn, cs);
     SinCosine(phi, snphi, csphi);
-
     shx := sinh(xi);
     chx := cosh(xi);
-
     x := sn * shx * csphi; // x = a*sin(eta)*sinh(xi)*cos(phi)
     y := sn * shx * snphi; // y = a*sin(eta)*sinh(xi)*sin(phi)
     z := cs * chx; // z = a*cos(eta)*cosh(xi)
@@ -389,18 +367,16 @@ begin
 end;
 
 // ----- ProlateSpheroidal_Cartesian -------------------------------------------
-{ ** Convert Prolate-Spheroidal to Cartesian with checks. Double Version.
+(* Convert Prolate-Spheroidal to Cartesian with checks. Double Version.
   ierr: [0] = ok,
   [1] = xi out of bounds. Acceptable xi: [0,inf)
   [2] = eta out of bounds. Acceptable eta: [0,pi]
   [3] = phi out of bounds. Acceptable phi: [0,2pi)
-  Ref: http://mathworld.wolfram.com/ProlateSpheroidalCoordinates.html }
+  Ref: http://mathworld.wolfram.com/ProlateSpheroidalCoordinates.html *)
 procedure ProlateSpheroidal_Cartesian(const xi, eta, phi, a: double;
   var x, y, z: double; var ierr: integer); overload;
-
 var
   sn, cs, snphi, csphi, shx, chx: double;
-
 begin
   if (xi < 0.0) then
     ierr := 1
@@ -410,15 +386,12 @@ begin
     ierr := 3
   else
     ierr := 0;
-
   if (ierr = 0) then
   begin
     SinCosine(eta, a, sn, cs);
     SinCosine(phi, snphi, csphi);
-
     shx := sinh(xi);
     chx := cosh(xi);
-
     x := sn * shx * csphi; // x = a*sin(eta)*sinh(xi)*cos(phi)
     y := sn * shx * snphi; // y = a*sin(eta)*sinh(xi)*sin(phi)
     z := cs * chx; // z = a*cos(eta)*cosh(xi)
@@ -426,7 +399,7 @@ begin
 end;
 
 // ----- OblateSpheroidal_Cartesian -------------------------------------------
-{ ** Convert Oblate-Spheroidal to Cartesian with no checks.
+(* Convert Oblate-Spheroidal to Cartesian with no checks.
   A system of curvilinear coordinates in which two sets of coordinate surfaces are
   obtained by revolving the curves of the elliptic cylindrical coordinates about
   the y-axis which is relabeled the z-axis. The third set of coordinates consists
@@ -434,26 +407,22 @@ end;
   The coordinate system is parameterised by parameter a. A default value of a=1 is
   suggesed:
   http://documents.wolfram.com/v4/AddOns/StandardPackages/Calculus/VectorAnalysis.html
-  Ref: http://mathworld.wolfram.com/OblateSpheroidalCoordinates.html }
+  Ref: http://mathworld.wolfram.com/OblateSpheroidalCoordinates.html *)
 procedure OblateSpheroidal_Cartesian(const xi, eta, phi, a: single; var x, y, z: single);
-
 var
   sn, cs, snphi, csphi, shx, chx: single;
-
 begin
   SinCosine(eta, a, sn, cs);
   SinCosine(phi, snphi, csphi);
-
   shx := sinh(xi);
   chx := cosh(xi);
-
   x := cs * chx * csphi; // x = a*cos(eta)*cosh(xi)*cos(phi)
   y := cs * chx * snphi; // y = a*cos(eta)*cosh(xi)*sin(phi)
   z := sn * shx; // z = a*sin(eta)*sinh(xi)
 end;
 
 // ----- OblateSpheroidal_Cartesian -------------------------------------------
-{ ** Convert Oblate-Spheroidal to Cartesian with no checks. Double Version.
+(* Convert Oblate-Spheroidal to Cartesian with no checks. Double Version.
   A system of curvilinear coordinates in which two sets of coordinate surfaces are
   obtained by revolving the curves of the elliptic cylindrical coordinates about
   the y-axis which is relabeled the z-axis. The third set of coordinates consists
@@ -461,37 +430,31 @@ end;
   The coordinate system is parameterised by parameter a. A default value of a=1 is
   suggesed:
   http://documents.wolfram.com/v4/AddOns/StandardPackages/Calculus/VectorAnalysis.html
-  Ref: http://mathworld.wolfram.com/OblateSpheroidalCoordinates.html }
+  Ref: http://mathworld.wolfram.com/OblateSpheroidalCoordinates.html *)
 procedure OblateSpheroidal_Cartesian(const xi, eta, phi, a: double; var x, y, z: double);
-
 var
   sn, cs, snphi, csphi, shx, chx: double;
-
 begin
   SinCosine(eta, a, sn, cs);
   SinCosine(phi, snphi, csphi);
-
   shx := sinh(xi);
   chx := cosh(xi);
-
   x := cs * chx * csphi; // x = a*cos(eta)*cosh(xi)*cos(phi)
   y := cs * chx * snphi; // y = a*cos(eta)*cosh(xi)*sin(phi)
   z := sn * shx; // z = a*sin(eta)*sinh(xi)
 end;
 
 // ----- OblateSpheroidal_Cartesian -------------------------------------------
-{ ** Convert Oblate-Spheroidal to Cartesian with checks.
+(* Convert Oblate-Spheroidal to Cartesian with checks.
   ierr: [0] = ok,
   [1] = xi out of bounds. Acceptable xi: [0,inf)
   [2] = eta out of bounds. Acceptable eta: [-0.5*pi,0.5*pi]
   [3] = phi out of bounds. Acceptable phi: [0,2*pi)
-  Ref: http://mathworld.wolfram.com/ProlateSpheroidalCoordinates.html }
+  Ref: http://mathworld.wolfram.com/ProlateSpheroidalCoordinates.html *)
 procedure OblateSpheroidal_Cartesian(const xi, eta, phi, a: single;
   var x, y, z: single; var ierr: integer); overload;
-
 var
   sn, cs, snphi, csphi, shx, chx: single;
-
 begin
   if (xi < 0.0) then
     ierr := 1
@@ -501,15 +464,12 @@ begin
     ierr := 3
   else
     ierr := 0;
-
   if (ierr = 0) then
   begin
     SinCosine(eta, a, sn, cs);
     SinCosine(phi, snphi, csphi);
-
     shx := sinh(xi);
     chx := cosh(xi);
-
     x := cs * chx * csphi; // x = a*cos(eta)*cosh(xi)*cos(phi)
     y := cs * chx * snphi; // y = a*cos(eta)*cosh(xi)*sin(phi)
     z := sn * shx; // z = a*sin(eta)*sinh(xi)
@@ -517,18 +477,16 @@ begin
 end;
 
 // ----- OblateSpheroidal_Cartesian -------------------------------------------
-{ ** Convert Oblate-Spheroidal to Cartesian with checks. Double Version.
+(* Convert Oblate-Spheroidal to Cartesian with checks. Double Version.
   ierr: [0] = ok,
   [1] = xi out of bounds. Acceptable xi: [0,inf)
   [2] = eta out of bounds. Acceptable eta: [-0.5*pi,0.5*pi]
   [3] = phi out of bounds. Acceptable phi: [0,2*pi)
-  Ref: http://mathworld.wolfram.com/ProlateSpheroidalCoordinates.html }
+  Ref: http://mathworld.wolfram.com/ProlateSpheroidalCoordinates.html *)
 procedure OblateSpheroidal_Cartesian(const xi, eta, phi, a: double;
   var x, y, z: double; var ierr: integer); overload;
-
 var
   sn, cs, snphi, csphi, shx, chx: double;
-
 begin
   if (xi < 0.0) then
     ierr := 1
@@ -538,15 +496,12 @@ begin
     ierr := 3
   else
     ierr := 0;
-
   if (ierr = 0) then
   begin
     SinCosine(eta, a, sn, cs);
     SinCosine(phi, snphi, csphi);
-
     shx := sinh(xi);
     chx := cosh(xi);
-
     x := cs * chx * csphi; // x = a*cos(eta)*cosh(xi)*cos(phi)
     y := cs * chx * snphi; // y = a*cos(eta)*cosh(xi)*sin(phi)
     z := sn * shx; // z = a*sin(eta)*sinh(xi)
@@ -554,67 +509,56 @@ begin
 end;
 
 // ----- BipolarCylindrical_Cartesian ------------------------------------------
-{ ** Convert BiPolarCylindrical to Cartesian with no checks.
-  http://mathworld.wolfram.com/BipolarCylindricalCoordinates.html }
+(* Convert BiPolarCylindrical to Cartesian with no checks.
+  http://mathworld.wolfram.com/BipolarCylindricalCoordinates.html *)
 procedure BipolarCylindrical_Cartesian(const u, v, z1, a: single; var x, y, z: single);
-
 var
   cs, sn, shx, chx: single;
-
 begin
   SinCosine(u, sn, cs);
   shx := sinh(v);
   chx := cosh(v);
-
   x := a * shx / (chx - cs);
   y := a * sn / (chx - cs);
   z := z1;
 end;
 
 // ----- BipolarCylindrical_Cartesian ------------------------------------------
-{ ** Convert BiPolarCylindrical to Cartesian with no checks. Double Version
-  http://mathworld.wolfram.com/BipolarCylindricalCoordinates.html }
+(* Convert BiPolarCylindrical to Cartesian with no checks. Double Version
+  http://mathworld.wolfram.com/BipolarCylindricalCoordinates.html *)
 procedure BipolarCylindrical_Cartesian(const u, v, z1, a: double; var x, y, z: double);
-
 var
   cs, sn, shx, chx: double;
-
 begin
   SinCosine(u, sn, cs);
   shx := sinh(v);
   chx := cosh(v);
-
   x := a * shx / (chx - cs);
   y := a * sn / (chx - cs);
   z := z1;
 end;
 
 // ----- BipolarCylindrical_Cartesian ------------------------------------------
-{ ** Convert Oblate-Spheroidal to Cartesian with checks.
+(* Convert Oblate-Spheroidal to Cartesian with checks.
   ierr: [0] = ok,
   [1] = u out of bounds. Acceptable u: [0,2*pi)
   [2] = v out of bounds. Acceptable v: (-inf,inf)
   [3] = z1 out of bounds. Acceptable z1: (-inf,inf)
-  Ref: http://mathworld.wolfram.com/BiPolarCylindricalCoordinates.html }
+  Ref: http://mathworld.wolfram.com/BiPolarCylindricalCoordinates.html *)
 procedure BipolarCylindrical_Cartesian(const u, v, z1, a: single;
   var x, y, z: single; var ierr: integer); overload;
-
 var
   cs, sn, shx, chx: single;
-
 begin
   if ((u < 0.0) or (u >= 2 * pi)) then
     ierr := 1
   else
     ierr := 0;
-
   if (ierr = 0) then
   begin
     SinCosine(u, sn, cs);
-
     shx := sinh(v);
     chx := cosh(v);
-
     x := a * shx / (chx - cs);
     y := a * sn / (chx - cs);
     z := z1;
@@ -622,30 +566,26 @@ begin
 end;
 
 // ----- BipolarCylindrical_Cartesian ------------------------------------------
-{ ** Convert Oblate-Spheroidal to Cartesian with checks. Double Version
+(* Convert Oblate-Spheroidal to Cartesian with checks. Double Version
   ierr: [0] = ok,
   [1] = u out of bounds. Acceptable u: [0,2*pi)
   [2] = v out of bounds. Acceptable v: (-inf,inf)
   [3] = z1 out of bounds. Acceptable z1: (-inf,inf)
-  Ref: http://mathworld.wolfram.com/BiPolarCylindricalCoordinates.html }
+  Ref: http://mathworld.wolfram.com/BiPolarCylindricalCoordinates.html *)
 procedure BipolarCylindrical_Cartesian(const u, v, z1, a: double;
   var x, y, z: double; var ierr: integer); overload;
-
 var
   cs, sn, shx, chx: double;
-
 begin
   if ((u < 0.0) or (u >= 2 * pi)) then
     ierr := 1
   else
     ierr := 0;
-
   if (ierr = 0) then
   begin
     SinCosine(u, sn, cs);
     shx := sinh(v);
     chx := cosh(v);
-
     x := a * shx / (chx - cs);
     y := a * sn / (chx - cs);
     z := z1;
@@ -653,4 +593,5 @@ begin
 end;
 
 // =============================================================================
+
 end.

+ 5 - 4
Source/GLGizmo.pas

@@ -1,10 +1,13 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
-{
+
+unit GLGizmo;
+
+(*
   Invisible component for helping to Move, Rotate and Scale an Object
   under GLScene (usefull for an Editor). 
-}
+*)
 //
 // Original Header:
 //
@@ -48,8 +51,6 @@
 // use objects' BarryCenter. For Example, if you select Space Text.
 // ------------------------------------------------------------------------------
 
-unit GLGizmo;
-
 interface
 
 {$I GLScene.inc}

+ 5 - 3
Source/GLGizmoEx.pas

@@ -1,12 +1,14 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
-{
+
+unit GLGizmoEx;
+
+(*
    Invisible component for helping to Move, Rotate and Scale an Object
    under GLScene (usefull for an Editor).
    This is an enhanced version of TGLGizmo
-}
-unit GLGizmoEx;
+*)
 
 interface
 

+ 3 - 3
Source/GLGraph.pas

@@ -1,11 +1,11 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
-{  
-  Graph plotting objects for GLScene 
-}
+
 unit GLGraph;
 
+(* Graph plotting objects for GLScene *)
+
 interface
 
 {$I GLScene.inc}

+ 4 - 4
Source/GLHeightTileFileHDS.pas

@@ -1,11 +1,11 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
-{
-   HeightDataSource for the HTF (HeightTileFile) format. 
-}
+
 unit GLHeightTileFileHDS;
 
+(* HeightDataSource for the HTF (HeightTileFile) format *)
+
 interface
 
 {$I GLScene.inc}
@@ -19,7 +19,7 @@ uses
 
 type
 
-   {An Height Data Source for the HTF format.  }
+   // An Height Data Source for the HTF format.  
 	TGLHeightTileFileHDS = class (TGLHeightDataSource)
 	   private
          FInfiniteWrap : Boolean;

+ 5 - 4
Source/GLHiddenLineShader.pas

@@ -1,13 +1,14 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
-{
+
+unit GLHiddenLineShader;
+
+(*
    A shader that renders hidden (back-faced) lines differently from visible
    (front) lines. Polygon offset is used to displace fragments depths a little
    so that there is no z-fighting in rendering the same geometry multiple times. 
-
-}
-unit GLHiddenLineShader;
+*)
 
 interface
 

+ 3 - 1
Source/GLJoints.pas

@@ -1,11 +1,13 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
+
+unit GLJoints;
+
 (*
   This unit isn't used at all at the moment, just putting down some ideas
   for serial-link manipulators
 *)
-unit GLJoints;
 
 interface
 

Някои файлове не бяха показани, защото твърде много файлове са промени