Some doc revisions

This commit is contained in:
Lwmte 2025-03-16 10:47:10 +01:00
parent 6b1ca045d0
commit e521e12a02
4 changed files with 69 additions and 64 deletions

View file

@ -473,7 +473,7 @@ Invisible
<p>e.g. <code>myLevel.laraType = LaraType.Divesuit</code></p>
<p> <strong>(not yet fully implemented)</strong>
<p> <strong>Not yet fully implemented.</strong> Only types <code>Normal</code> and <code>Young</code> are guaranteed to work.

View file

@ -130,7 +130,7 @@
<td class="summary">Retrieve the object ID</td>
</tr>
<tr>
<td class="name" ><a href="#Moveable:SetObjectID">Moveable:SetObjectID(ID)</a></td>
<td class="name" ><a href="#Moveable:SetObjectID">Moveable:SetObjectID(objectID)</a></td>
<td class="summary">Change the object's ID.</td>
</tr>
<tr>
@ -221,7 +221,7 @@
<td class="summary">Set the effect for this moveable.</td>
</tr>
<tr>
<td class="name" ><a href="#Moveable:SetCustomEffect">Moveable:SetCustomEffect(Color1, Color2[, timeout])</a></td>
<td class="name" ><a href="#Moveable:SetCustomEffect">Moveable:SetCustomEffect(color1, color2[, timeout])</a></td>
<td class="summary">Set custom colored burn effect to moveable</td>
</tr>
<tr>
@ -418,7 +418,7 @@
<td class="summary">Attach camera to an object.</td>
</tr>
<tr>
<td class="name" ><a href="#Moveable:AnimFromObject">Moveable:AnimFromObject(ObjectID, animNumber, stateID)</a></td>
<td class="name" ><a href="#Moveable:AnimFromObject">Moveable:AnimFromObject(objectID, animNumber, stateID)</a></td>
<td class="summary">Borrow animation from an object</td>
</tr>
</table>
@ -518,7 +518,7 @@ most can just be ignored (see usage).
<ol>
<span class="types"><a class="type" href="../4 enums/Objects.ObjID.html#">ObjID</a></span>
a number representing the ID of the object
a number representing the ID of the object.
</ol>
@ -527,7 +527,7 @@ most can just be ignored (see usage).
</dd>
<dt>
<a name = "Moveable:SetObjectID"></a>
<strong>Moveable:SetObjectID(ID)</strong>
<strong>Moveable:SetObjectID(objectID)</strong>
</dt>
<dd>
Change the object's ID. This will literally change the object.
@ -536,7 +536,7 @@ most can just be ignored (see usage).
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">ID</span>
<li><span class="parameter">objectID</span>
<span class="types"><a class="type" href="../4 enums/Objects.ObjID.html#">ObjID</a></span>
the new ID
</li>
@ -795,7 +795,7 @@ baddy:SetOnCollidedWithRoom(LevelFuncs.roomCollided)</pre>
<ol>
<span class="types"><a class="type" href="../3 primitive classes/Vec3.html#">Vec3</a></span>
pos World position.
World position.
</ol>
@ -815,7 +815,7 @@ baddy:SetOnCollidedWithRoom(LevelFuncs.roomCollided)</pre>
<ul>
<li><span class="parameter">index</span>
<span class="types"><span class="type">int</span></span>
of a joint to get rotation
Index of a joint to get rotation.
</li>
</ul>
@ -1053,7 +1053,7 @@ baddy:SetOnCollidedWithRoom(LevelFuncs.roomCollided)</pre>
</dd>
<dt>
<a name = "Moveable:SetCustomEffect"></a>
<strong>Moveable:SetCustomEffect(Color1, Color2[, timeout])</strong>
<strong>Moveable:SetCustomEffect(color1, color2[, timeout])</strong>
</dt>
<dd>
Set custom colored burn effect to moveable
@ -1062,17 +1062,17 @@ baddy:SetOnCollidedWithRoom(LevelFuncs.roomCollided)</pre>
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">Color1</span>
<li><span class="parameter">color1</span>
<span class="types"><a class="type" href="../3 primitive classes/Color.html#">Color</a></span>
color the primary color of the effect (also used for lighting).
The primary color of the effect (also used for lighting).
</li>
<li><span class="parameter">Color2</span>
<li><span class="parameter">color2</span>
<span class="types"><a class="type" href="../3 primitive classes/Color.html#">Color</a></span>
color the secondary color of the effect.
The secondary color of the effect.
</li>
<li><span class="parameter">timeout</span>
<span class="types"><span class="type">float</span></span>
time (in seconds) after which effect turns off.
Time (in seconds) after which effect turns off.
(<em>optional</em>)
</li>
</ul>
@ -1096,7 +1096,7 @@ baddy:SetOnCollidedWithRoom(LevelFuncs.roomCollided)</pre>
<ol>
<span class="types"><a class="type" href="../4 enums/Effects.EffectID.html#">EffectID</a></span>
Sffect type currently assigned.
Effect type currently assigned.
</ol>
@ -1116,7 +1116,7 @@ baddy:SetOnCollidedWithRoom(LevelFuncs.roomCollided)</pre>
<ul>
<li><span class="parameter">index</span>
<span class="types"><span class="type">int</span></span>
of the ItemFlags, can be between 0 and 7.
Index of the ItemFlag, can be between 0 and 7.
</li>
</ul>
@ -1144,11 +1144,11 @@ baddy:SetOnCollidedWithRoom(LevelFuncs.roomCollided)</pre>
<ul>
<li><span class="parameter">value</span>
<span class="types"><span class="type">short</span></span>
to store in the moveable's ItemFlags[index]
Value to store in the moveable's ItemFlags[index].
</li>
<li><span class="parameter">index</span>
<span class="types"><span class="type">int</span></span>
of the ItemFlags where store the value.
Index of the ItemFlag where to store the value.
</li>
</ul>
@ -1191,7 +1191,7 @@ baddy:SetOnCollidedWithRoom(LevelFuncs.roomCollided)</pre>
<ul>
<li><span class="parameter">value</span>
<span class="types"><span class="type">short</span></span>
to store.
Value to store.
</li>
</ul>
@ -1248,18 +1248,22 @@ baddy:SetOnCollidedWithRoom(LevelFuncs.roomCollided)</pre>
<strong>Moveable:GetAIBits()</strong>
</dt>
<dd>
Get AIBits of object
<p>Get AIBits of object
This will return a table with six values, each corresponding to
an active behaviour. If the object is in a certain AI mode, the table will
have a <em>1</em> in the corresponding cell. Otherwise, the cell will hold
a <em>0</em>.</p>
<p> <br />1 - guard
<br />2 - ambush
<br />3 - patrol 1
<br />4 - modify
<br />5 - follow
<br />6 - patrol 2
<pre><code>1 - Guard
2 - Ambush
3 - Patrol 1
4 - Modify
5 - Follow
6 - Patrol 2
</code></pre>
@ -1681,7 +1685,7 @@ sas:SetPosition(newPos, <span class="keyword">false</span>)</pre>
<strong>Moveable:GetStatus()</strong>
</dt>
<dd>
Get the moveable's status. ()
Get the moveable's status.
@ -1702,7 +1706,7 @@ sas:SetPosition(newPos, <span class="keyword">false</span>)</pre>
<strong>Moveable:SetStatus(status)</strong>
</dt>
<dd>
Set the moveable's status. ()
Set the moveable's status.
@ -2103,15 +2107,15 @@ sas:SetPosition(newPos, <span class="keyword">false</span>)</pre>
<ul>
<li><span class="parameter">mesh</span>
<span class="types"><span class="type">int</span></span>
of a target moveable to use as a camera target
Mesh of a target moveable to use as a camera target.
</li>
<li><span class="parameter">target</span>
<span class="types"><a class="type" href="../2 classes/Objects.Moveable.html#Moveable">Moveable</a></span>
moveable to attach camera to
Target moveable to attach camera to.
</li>
<li><span class="parameter">mesh</span>
<span class="types"><span class="type">int</span></span>
of a target moveable to use as a camera target
Mesh of a target moveable to use as a camera target.
</li>
</ul>
@ -2122,7 +2126,7 @@ sas:SetPosition(newPos, <span class="keyword">false</span>)</pre>
</dd>
<dt>
<a name = "Moveable:AnimFromObject"></a>
<strong>Moveable:AnimFromObject(ObjectID, animNumber, stateID)</strong>
<strong>Moveable:AnimFromObject(objectID, animNumber, stateID)</strong>
</dt>
<dd>
Borrow animation from an object
@ -2131,17 +2135,17 @@ sas:SetPosition(newPos, <span class="keyword">false</span>)</pre>
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">ObjectID</span>
<li><span class="parameter">objectID</span>
<span class="types"><a class="type" href="../4 enums/Objects.ObjID.html#">ObjID</a></span>
to take animation and stateID from,
Object ID to take animation and stateID from.
</li>
<li><span class="parameter">animNumber</span>
<span class="types"><span class="type">int</span></span>
animation from object
Animation from object.
</li>
<li><span class="parameter">stateID</span>
<span class="types"><span class="type">int</span></span>
state from object
state State from object.
</li>
</ul>

View file

@ -106,7 +106,7 @@ These are:
e.g. `myLevel.laraType = LaraType.Divesuit`
__(not yet fully implemented)__
__Not yet fully implemented.__ Only types `Normal` and `Young` are guaranteed to work.
@mem laraType*/
"laraType", &Level::Type,

View file

@ -244,7 +244,7 @@ void Moveable::Initialize()
/// Retrieve the object ID
// @function Moveable:GetObjectID
// @treturn Objects.ObjID a number representing the ID of the object
// @treturn Objects.ObjID a number representing the ID of the object.
GAME_OBJECT_ID Moveable::GetObjectID() const
{
return _moveable->ObjectNumber;
@ -252,7 +252,7 @@ GAME_OBJECT_ID Moveable::GetObjectID() const
/// Change the object's ID. This will literally change the object.
// @function Moveable:SetObjectID
// @tparam Objects.ObjID ID the new ID
// @tparam Objects.ObjID objectID the new ID
// @usage
// shiva = TEN.Objects.GetMoveableByName("shiva_60")
// shiva:SetObjectID(TEN.Objects.ObjID.BIGMEDI_ITEM)
@ -432,7 +432,7 @@ void Moveable::SetPosition(const Vec3& pos, sol::optional<bool> updateRoom)
// @function Moveable:GetJointPosition
// @tparam int jointID Joint ID.
// @tparam[opt] Vec3 offset Offset relative to the joint.
// @treturn Vec3 pos World position.
// @treturn Vec3 World position.
Vec3 Moveable::GetJointPos(int jointID, sol::optional<Vec3> offset) const
{
auto convertedOffset = offset.has_value() ? offset->ToVector3i() : Vector3i::Zero;
@ -441,7 +441,7 @@ Vec3 Moveable::GetJointPos(int jointID, sol::optional<Vec3> offset) const
/// Get the object's joint rotation
// @function Moveable:GetJointRotation
// @tparam int index of a joint to get rotation
// @tparam int index Index of a joint to get rotation.
// @treturn Rotation a calculated copy of the moveable's joint rotation
Rotation Moveable::GetJointRot(int jointIndex) const
{
@ -606,9 +606,9 @@ void Moveable::SetEffect(EffectType effectType, sol::optional<float> timeout)
/// Set custom colored burn effect to moveable
// @function Moveable:SetCustomEffect
// @tparam Color Color1 color the primary color of the effect (also used for lighting).
// @tparam Color Color2 color the secondary color of the effect.
// @tparam[opt] float timeout time (in seconds) after which effect turns off.
// @tparam Color color1 The primary color of the effect (also used for lighting).
// @tparam Color color2 The secondary color of the effect.
// @tparam[opt] float timeout Time (in seconds) after which effect turns off.
void Moveable::SetCustomEffect(const ScriptColor& col1, const ScriptColor& col2, sol::optional<float> timeout)
{
int realTimeout = timeout.has_value() ? int(timeout.value() * FPS) : -1;
@ -619,7 +619,7 @@ void Moveable::SetCustomEffect(const ScriptColor& col1, const ScriptColor& col2,
/// Get current moveable effect
// @function Moveable:GetEffect
// @treturn Effects.EffectID Sffect type currently assigned.
// @treturn Effects.EffectID Effect type currently assigned.
EffectType Moveable::GetEffect() const
{
return _moveable->Effect.Type;
@ -627,7 +627,7 @@ EffectType Moveable::GetEffect() const
/// Get the value stored in ItemFlags[index]
// @function Moveable:GetItemFlags
// @tparam int index of the ItemFlags, can be between 0 and 7.
// @tparam int index Index of the ItemFlag, can be between 0 and 7.
// @treturn int the value contained in the ItemFlags[index]
short Moveable::GetItemFlags(int index) const
{
@ -636,8 +636,8 @@ short Moveable::GetItemFlags(int index) const
/// Stores a value in ItemFlags[index]
// @function Moveable:SetItemFlags
// @tparam short value to store in the moveable's ItemFlags[index]
// @tparam int index of the ItemFlags where store the value.
// @tparam short value Value to store in the moveable's ItemFlags[index].
// @tparam int index Index of the ItemFlag where to store the value.
void Moveable::SetItemFlags(short value, int index)
{
_moveable->ItemFlags[index] = value;
@ -660,7 +660,7 @@ short Moveable::GetLocationAI() const
/// Updates the location in the enemy AI with the given value.
// @function Moveable:SetLocationAI
// @tparam short value to store.
// @tparam short value Value to store.
void Moveable::SetLocationAI(short value)
{
if (_moveable->IsCreature())
@ -696,12 +696,13 @@ void Moveable::SetColor(const ScriptColor& color)
// have a *1* in the corresponding cell. Otherwise, the cell will hold
// a *0*.
//
// <br />1 - guard
// <br />2 - ambush
// <br />3 - patrol 1
// <br />4 - modify
// <br />5 - follow
// <br />6 - patrol 2
// 1 - Guard
// 2 - Ambush
// 3 - Patrol 1
// 4 - Modify
// 5 - Follow
// 6 - Patrol 2
//
// @function Moveable:GetAIBits
// @treturn table a table of AI bits
aiBitsType Moveable::GetAIBits() const
@ -934,7 +935,7 @@ void Moveable::SetRoomNumber(int roomNumber)
}
/// Get the moveable's status.
// @function Moveable:GetStatus()
// @function Moveable:GetStatus
// @treturn Objects.MoveableStatus Status.
short Moveable::GetStatus() const
{
@ -942,7 +943,7 @@ short Moveable::GetStatus() const
}
/// Set the moveable's status.
// @function Moveable:SetStatus()
// @function Moveable:SetStatus
// @tparam Objects.MoveableStatus status The new status of the moveable.
void Moveable::SetStatus(ItemStatus status)
{
@ -1234,9 +1235,9 @@ bool Moveable::MeshExists(int index) const
/// Attach camera to an object.
// @function Moveable:AttachObjCamera
// @tparam int mesh of a moveable to use as a camera position
// @tparam Moveable target moveable to attach camera to
// @tparam int mesh of a target moveable to use as a camera target
// @tparam int mesh Mesh of a moveable to use as a camera position.
// @tparam Moveable target Target moveable to attach camera to.
// @tparam int mesh Mesh of a target moveable to use as a camera target.
void Moveable::AttachObjCamera(short camMeshId, Moveable& mov, short targetMeshId)
{
if ((_moveable->Active || _moveable->IsLara()) && (mov._moveable->Active || mov._moveable->IsLara()))
@ -1245,9 +1246,9 @@ void Moveable::AttachObjCamera(short camMeshId, Moveable& mov, short targetMeshI
/// Borrow animation from an object
// @function Moveable:AnimFromObject
// @tparam Objects.ObjID ObjectID to take animation and stateID from,
// @tparam int animNumber animation from object
// @tparam int stateID state from object
// @tparam Objects.ObjID objectID Object ID to take animation and stateID from.
// @tparam int animNumber Animation from object.
// @tparam int stateID state State from object.
void Moveable::AnimFromObject(GAME_OBJECT_ID objectID, int animNumber, int stateID)
{
_moveable->Animation.AnimObjectID = objectID;