Skip to content
Snippets Groups Projects
Commit 17c62b16 authored by Abou Al Montacir's avatar Abou Al Montacir
Browse files

Added upstream patch to fix warning when building API docs.

Thanks: Michalis Kamburelis <michalis.kambi@gmail.com>
parent c87afae3
No related branches found
No related tags found
No related merge requests found
Description: Fix API docs for PasDoc
Author: Michalis Kamburelis <michalis.kambi@gmail.com>
Forwarded: not-needed
diff --git a/doc/pasdoc/mk_docs.sh b/doc/pasdoc/mk_docs.sh
index 43e50abc83..6d9496c9ec 100755
--- a/doc/pasdoc/mk_docs.sh
+++ b/doc/pasdoc/mk_docs.sh
@@ -101,6 +101,10 @@ if (( $# == 0 )); then
# mixed with CGE rendering).
# In any case, their docs are not ready for PasDoc (and never will be
# --- this is OpenGL and OpenGL ES API).
+ #
+ # Exception: we still generate docs for castlevectorsinternal*.pas.
+ # Although these units are not supposed to be used directly,
+ # but they document API of TVector3 and TVector3Double.
find . \
'(' -type f -iname '*.pas' \
@@ -111,7 +115,6 @@ if (( $# == 0 )); then
'(' -iname 'x3dloadinternal*.pas' ')' -or \
'(' -iname 'castleinternal*.pas' ')' -or \
'(' -iname 'castleshapeinternal*.pas' ')' -or \
- '(' -iname 'castlevectorsinternal*.pas' ')' -or \
'(' -iname 'kraft.pas' ')' -or \
'(' -iwholename '*/compatibility/*' ')' -or \
'(' -iwholename '*/deprecated_units/*' ')' -or \
@@ -162,7 +165,7 @@ pasdoc \
$PASDOC_INCLUDE_DIRS \
--output "$OUTPUT_PATH" \
--define "$TARGET_OS" \
- --define FPC --define VER3 --define VER3_0 --define VER3_0_4 --define PASDOC \
+ --define FPC --define VER3 --define VER3_0 --define VER3_2_0 --define PASDOC \
--write-uses-list \
--title "Castle Game Engine" \
--source "$TMP_PAS_LIST" \
diff --git a/src/3d/castleboxes.pas b/src/3d/castleboxes.pas
index 92138afb5c..02914740b4 100644
--- a/src/3d/castleboxes.pas
+++ b/src/3d/castleboxes.pas
@@ -493,7 +493,7 @@ TBox3D = record
{ Compare two bounding boxes based
on their distance to the SortPosition point,
suitable for depth sorting in 3D.
- Follows the algorithm documented at @link(TBlendingSort.bs3D).
+ Follows the algorithm documented at @link(bs3D).
Returns -1 if A < B, 1 if A > B, 0 if A = B.
Using this with a typical sorting function will result
@@ -504,7 +504,7 @@ TBox3D = record
{ Compare two bounding boxes based
on their Z coordinates, suitable for depth sorting in 2D.
- Follows the algorithm documented at @link(TBlendingSort.bs2D).
+ Follows the algorithm documented at @link(bs2D).
Returns -1 if A < B, 1 if A > B, 0 if A = B.
Using this with a typical sorting function will result
diff --git a/src/audio/castlesoundengine_castlesound.inc b/src/audio/castlesoundengine_castlesound.inc
index dedf51bd4d..757bb720ff 100644
--- a/src/audio/castlesoundengine_castlesound.inc
+++ b/src/audio/castlesoundengine_castlesound.inc
@@ -21,13 +21,12 @@ type
possibly using streaming) and played.
Aside from sound file (also called "sound buffer" or "audio clip" in various APIs)
- this class allows to configue also playback values, like @like(Volume) and @link(Pitch).
+ this class allows to configue also playback values, like @link(Volume) and @link(Pitch).
This class does not handle actual playing of the sound,
as it doesn't manage the 3D position of sound in case of spatial sounds,
looping etc. To play it, use @link(TCastleSoundSource).
- Attach @link(TCastleSoundSource) to a @link(TCastleTransform) within some @link(TCastleViewport)
- and play using @link(TCastleSoundSource.Play).
+ Attach @link(TCastleSoundSource) to a @link(TCastleTransform) within some @link(TCastleViewport).
This class can be nicely serialized (so you can use this as a SubComponent
e.g. in TCastleBehavior descendants that want to expose some sound,
diff --git a/src/base/castletimeutils_frameprofiler.inc b/src/base/castletimeutils_frameprofiler.inc
index 5357e46c76..3cd18b817a 100644
--- a/src/base/castletimeutils_frameprofiler.inc
+++ b/src/base/castletimeutils_frameprofiler.inc
@@ -68,9 +68,13 @@ type
const
MaxRecordFrames = 1000;
MaxUserMetrics = 16;
- MetricsPerFrame = 1 //< frame total time
- + Ord(High(TFrameMetric)) + 1 //< time, for each TFrameMetric
- + 3 * MaxUserMetrics; //< user metrics, MaxUserMetrics for render, update, other
+ MetricsPerFrame =
+ // frame total time
+ 1
+ // time, for each TFrameMetric
+ + Ord(High(TFrameMetric)) + 1
+ // user metrics, MaxUserMetrics for render, update, other
+ + 3 * MaxUserMetrics;
IndexTotalMetric = 0;
type
TMetricIndex = 0..MetricsPerFrame - 1;
diff --git a/src/base/castlevectors_float.inc b/src/base/castlevectors_float.inc
index ec0fc73cbf..614657ba0f 100644
--- a/src/base/castlevectors_float.inc
+++ b/src/base/castlevectors_float.inc
@@ -91,9 +91,9 @@ function Matrix4Double(const V: TMatrix4): TMatrix4Double;
{ Convert string to vector. Each component is simply parsed by StrToFloatDot,
and components must be separated by whitespace (see @link(WhiteSpaces) constant).
This is a reverse of
- @link(TGenericVector2.ToString TVector2.ToString),
- @link(TGenericVector3.ToString TVector3.ToString),
- @link(TGenericVector4.ToString TVector4.ToString) methods.
+ @link(CastleVectorsInternalSingle.TGenericVector2.ToString TVector2.ToString),
+ @link(CastleVectorsInternalSingle.TGenericVector3.ToString TVector3.ToString),
+ @link(CastleVectorsInternalSingle.TGenericVector4.ToString TVector4.ToString) methods.
@raises(EConvertError In case of problems during conversion (invalid float
or unexpected string end or expected but missed string end).)
diff --git a/src/game/castlebehaviors_alive.inc b/src/game/castlebehaviors_alive.inc
index d77d163bb9..9e74ed9280 100644
--- a/src/game/castlebehaviors_alive.inc
+++ b/src/game/castlebehaviors_alive.inc
@@ -67,7 +67,7 @@ type
What this "strengh" exactly means is not defined in this class.
It may cause a "knockback" effect, in which case it may be a knockback
distance, or a physical force strength, and is meaningful only when
- @link(AHurtDirection) is non-zero.
+ @code(AHurtDirection) parameter is non-zero.
In this class, it does nothing, merely sets @link(HurtStrength) property.
Which may be used by other effects.)
@@ -95,7 +95,7 @@ type
What this "strengh" exactly means is not defined in this class.
It may cause a "knockback" effect, in which case it may be a knockback
distance, or a physical force strength, and is meaningful only when
- @link(AHurtDirection) is non-zero. }
+ @link(HurtDirection) is non-zero. }
property HurtStrength: Single read FHurtStrength;
{ Last attacker. Set by the last @link(Hurt) call,
diff --git a/src/lcl/castlecontrol.pas b/src/lcl/castlecontrol.pas
index 0099447932..d9691b51e3 100644
--- a/src/lcl/castlecontrol.pas
+++ b/src/lcl/castlecontrol.pas
@@ -32,8 +32,12 @@ interface
{ Define this for new Lazarus that has Options (with ocoRenderAtDesignTime)
(see issue https://bugs.freepascal.org/view.php?id=32026 ). }
-{$if LCL_FULLVERSION >= 1090000}
+{$ifdef PASDOC}
{$define HAS_RENDER_AT_DESIGN_TIME}
+{$else}
+ {$if LCL_FULLVERSION >= 1090000}
+ {$define HAS_RENDER_AT_DESIGN_TIME}
+ {$endif}
{$endif}
const
diff --git a/src/x3d/castleshapes.pas b/src/x3d/castleshapes.pas
index 89dde4f5bd..2f6848f387 100644
--- a/src/x3d/castleshapes.pas
+++ b/src/x3d/castleshapes.pas
@@ -587,7 +587,7 @@ TShape = class(TShapeTree)
{ Is the shape collidable.
Most shapes are collidable.
- One exception is when @link(TShapeNode.Collision) is set to scNone,
+ One exception is when @link(TAbstractShapeNode.Collision) is set to scNone,
which disables collisions.
Another exception is when the shape is placed inside @link(TCollisionNode) children,
and then you use @link(TCollisionNode.Enabled) to turn off collisions,
diff --git a/src/x3d/x3dnodes_documentation.txt b/src/x3d/x3dnodes_documentation.txt
index 7bd9268e75..550725457b 100644
--- a/src/x3d/x3dnodes_documentation.txt
+++ b/src/x3d/x3dnodes_documentation.txt
@@ -106,7 +106,7 @@ enumerate @link(TCastleSceneCore.Shapes) to find the correct shape
(using any criteria you want -- note that the same TShapeNode may be reused multiple times),
and then read @link(TShape.BoundingBox), @link(TShape.LocalBoundingBox).
-# TAbstractComposedGeometryNode.SetTangent
+# TAbstractComposedGeometryNode.Tangent
Tangent vectors describe the tangent coordinate-space, used by the bump mapping algorithm.
If specified, the ordering of tangents should be the same as normals,
i.e. they should follow the NormalPerVertex and such properties.
@@ -128,7 +128,7 @@ emissive texture for the unlit lighting model).
It is usually simpler to set the relevant texture inside material node,
like @link(TMaterialNode.DiffuseTexture),
@link(TPhysicalMaterialNode.BaseTexture),
-@link(TUnlitMaterialNode.EmissiveTexture).
+@link(TAbstractOneSidedMaterialNode.EmissiveTexture TUnlitMaterialNode.EmissiveTexture).
# TAppearanceNode.NormalMap
diff --git a/src/x3d/x3dnodes_encoding_classic.inc b/src/x3d/x3dnodes_encoding_classic.inc
index 112d5b5..9ae2643 100644
--- a/src/x3d/x3dnodes_encoding_classic.inc
+++ b/src/x3d/x3dnodes_encoding_classic.inc
@@ -26,8 +26,7 @@ const
'*VRML (*.wrl, *.wrl.gz, *.wrz)|*.wrl;*.wrl.gz;*.wrz';
type
- { Raised by @link(LoadX3DClassicFromString) or @link(LoadX3DClassicInternal)
- when the stream is compressed with gzip. }
+ { Raised by classic X3D loading routines when the stream is compressed with gzip. }
EX3DGzipCompressed = CastleInternalX3DLexer.EX3DGzipCompressed;
{ Load VRML/X3D file in classic encoding from stream. Return it's root node.
diff --git a/src/x3d/x3dnodes_standard_rendering.inc b/src/x3d/x3dnodes_standard_rendering.inc
index c2498bb362..a788ebd3ba 100644
--- a/src/x3d/x3dnodes_standard_rendering.inc
+++ b/src/x3d/x3dnodes_standard_rendering.inc
@@ -246,7 +246,7 @@
returns @nil. }
function InternalNormal: TVector3List;
- { Returns tangent vectors that are specified explicitly, see @link(SetTangents).
+ { Returns tangent vectors that are specified explicitly, see @link(TAbstractComposedGeometryNode.Tangent).
Returns @nil if not specified. }
function InternalTangent: TVector3List;
diff --git a/src/x3d/x3dnodes_standard_shape.inc b/src/x3d/x3dnodes_standard_shape.inc
index 97f10f00c6..aca015cae7 100644
--- a/src/x3d/x3dnodes_standard_shape.inc
+++ b/src/x3d/x3dnodes_standard_shape.inc
@@ -209,7 +209,7 @@
Note: Whether the shape is visible from both sides depends on the
geometry @link(TAbstractGeometryNode.Solid) field,
- and is independent of whether you use this node or @link(TwoSidedMaterial). }
+ and is independent of whether you use this node or @link(TTwoSidedMaterialNode). }
TMaterialNode = class(TAbstractOneSidedMaterialNode)
strict private
type
......@@ -5,3 +5,4 @@ dont-add-website-header-and-footer-to-doc.patch
inkscape-dropped--export-png.patch
b9faa3bc380367eb72de1164f6cc366353a7c1ba.patch
51b053087af6ebc9904adf8bab64177ef5cadd1c.patch
Fix_API_docs_for_PasDoc.patch
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment