From 80aca7572dc0f76aa6f48d701d8bb9e202007ecc Mon Sep 17 00:00:00 2001 From: hispidence Date: Sun, 11 Dec 2022 18:37:06 +0000 Subject: [PATCH] Doc fixes --- .../Scripting/Internal/TEN/Effects/EffectsFunctions.cpp | 2 +- .../Internal/TEN/Flow/InventoryItem/InventoryItem.cpp | 7 +++++-- .../Scripting/Internal/TEN/Inventory/InventoryHandler.cpp | 8 ++++---- .../Scripting/Internal/TEN/Objects/AIObject/AIObject.cpp | 2 +- .../Internal/TEN/Objects/Moveable/MoveableObject.cpp | 8 ++++---- .../Scripting/Internal/TEN/Objects/ObjectsHandler.cpp | 2 +- 6 files changed, 16 insertions(+), 13 deletions(-) diff --git a/TombEngine/Scripting/Internal/TEN/Effects/EffectsFunctions.cpp b/TombEngine/Scripting/Internal/TEN/Effects/EffectsFunctions.cpp index dfce37bc0..f415e4b75 100644 --- a/TombEngine/Scripting/Internal/TEN/Effects/EffectsFunctions.cpp +++ b/TombEngine/Scripting/Internal/TEN/Effects/EffectsFunctions.cpp @@ -107,7 +107,7 @@ namespace Effects @tparam float rot (default 0) specifies a speed with which it will rotate (0 = no rotation, negative = anticlockwise rotation, positive = clockwise rotation). @tparam Color startColor (default Color(255, 255, 255)) color at start of life @tparam Color endColor (default Color(255, 255, 255)) color to fade to - at the time of writing this fade will finish long before the end of the particle's life due to internal maths - @tparam BlendID blendMode (default TEN.Effects.BlendID.ALPHABLEND) How will we blend this with its surroundings? + @tparam Effects.BlendID blendMode (default TEN.Effects.BlendID.ALPHABLEND) How will we blend this with its surroundings? @tparam int startSize (default 10) Size on spawn. A value of 15 is approximately the size of Lara's head. @tparam int endSize (default 0) Size on death - the particle will linearly shrink or grow to this size during its lifespan @tparam float lifetime (default 2) Lifespan in seconds diff --git a/TombEngine/Scripting/Internal/TEN/Flow/InventoryItem/InventoryItem.cpp b/TombEngine/Scripting/Internal/TEN/Flow/InventoryItem/InventoryItem.cpp index f60b258f8..250ad7040 100644 --- a/TombEngine/Scripting/Internal/TEN/Flow/InventoryItem/InventoryItem.cpp +++ b/TombEngine/Scripting/Internal/TEN/Flow/InventoryItem/InventoryItem.cpp @@ -15,7 +15,7 @@ Represents the properties of an object as it appears in the inventory. @function InventoryItem @tparam string nameKey key for the item's (localised) name.
Corresponds to an entry in strings.lua. - @tparam ObjID slot slot of inventory object to change + @tparam Objects.ObjID slot slot of inventory object to change @tparam int yOffset y-axis offset (positive values move the item down).
A value of about 100 will cause the item to display directly below its usual position. @tparam float scale item size (1 being standard size).
@@ -24,7 +24,10 @@ and a value of 2 will cause the item to render at twice the size. @tparam Rotation rot rotation about x, y, and z axes @tparam RotationAxis axis Axis to rotate about when the item is being looked at in the inventory.
Note that this is entirely separate from the `rot` field described above. -Must be RotationAxis.X, RotationAxis.Y or RotationAxis.Z. +Must one of the following: + X + Y + Z e.g. `myItem.rotAxisWhenCurrent = RotationAxis.X` @tparam int meshBits __Not currently implemented__ (will have no effect regardless of what you set it to) @tparam ItemAction action is this usable, equippable, or examinable?
diff --git a/TombEngine/Scripting/Internal/TEN/Inventory/InventoryHandler.cpp b/TombEngine/Scripting/Internal/TEN/Inventory/InventoryHandler.cpp index 6cde4ecec..5f8d0266b 100644 --- a/TombEngine/Scripting/Internal/TEN/Inventory/InventoryHandler.cpp +++ b/TombEngine/Scripting/Internal/TEN/Inventory/InventoryHandler.cpp @@ -19,7 +19,7 @@ namespace InventoryHandler //10 instead. //Has no effect if the player has an infinite number of that item. //@function GiveItem - //@tparam ObjID item the item to be added + //@tparam Objects.ObjID item the item to be added //@int[opt] count the number of items to add (default: the amount you would get from a pickup) static void InventoryAdd(GAME_OBJECT_ID slot, sol::optional count) { @@ -38,7 +38,7 @@ namespace InventoryHandler //As in @{GiveItem}, omitting the count will remove the "default" amount of that item. //Has no effect if the player has an infinite number of the item. //@function TakeItem - //@tparam ObjID item the item to be removed + //@tparam Objects.ObjID item the item to be removed //@int[opt] count the number of items to remove (default: the amount you would get from a pickup) static void InventoryRemove(GAME_OBJECT_ID slot, sol::optional count) { @@ -51,7 +51,7 @@ namespace InventoryHandler ///Get the amount the player holds of an item. //@function GetItemCount - //@tparam InvID item the ID item to check + //@tparam Objects.ObjID item the ID item to check //@treturn int the amount of the item the player has in the inventory. -1 indicates an infinite amount of that item. static int InventoryGetCount(GAME_OBJECT_ID slot) { @@ -61,7 +61,7 @@ namespace InventoryHandler ///Set the amount of a certain item the player has in the inventory. //Similar to @{GiveItem} but replaces with the new amount instead of adding it. //@function SetItemCount - //@tparam InvID item the ID of the item to be set. + //@tparam Objects.ObjID item the ID of the item to be set. //@tparam int count the number of items the player will have. A value of -1 will give an infinite amount of that item. static void InventorySetCount(GAME_OBJECT_ID slot, int count) { diff --git a/TombEngine/Scripting/Internal/TEN/Objects/AIObject/AIObject.cpp b/TombEngine/Scripting/Internal/TEN/Objects/AIObject/AIObject.cpp index eb8f9dbee..33a9e612d 100644 --- a/TombEngine/Scripting/Internal/TEN/Objects/AIObject/AIObject.cpp +++ b/TombEngine/Scripting/Internal/TEN/Objects/AIObject/AIObject.cpp @@ -81,7 +81,7 @@ void AIObject::Register(sol::table & parent) // For example, you could have a pair of AI_GUARD objects, and change one or the other two // AI_PATROL_1 based on whether the player has a certain item or not. // @function AIObject:SetObjectID - // @tparam ObjID ID the new ID + // @tparam Objects.ObjID ID the new ID // @usage // aiObj = TEN.Objects.GetMoveableByName("ai_guard_sphinx_room") // aiObj:SetObjectID(TEN.Objects.ObjID.AI_PATROL1) diff --git a/TombEngine/Scripting/Internal/TEN/Objects/Moveable/MoveableObject.cpp b/TombEngine/Scripting/Internal/TEN/Objects/Moveable/MoveableObject.cpp index f030b4c9a..656233b69 100644 --- a/TombEngine/Scripting/Internal/TEN/Objects/Moveable/MoveableObject.cpp +++ b/TombEngine/Scripting/Internal/TEN/Objects/Moveable/MoveableObject.cpp @@ -74,7 +74,7 @@ bool operator==(Moveable const& first, Moveable const& second) associated getters and setters. If you do not know what to set for these, most can just be ignored (see usage). @function Moveable - @tparam ObjID object ID + @tparam Objects.ObjID object ID @tparam string name Lua name of the item @tparam Vec3 position position in level @tparam[opt] Rotation rotation rotation about x, y, and z axes (default Rotation(0, 0, 0)) @@ -168,7 +168,7 @@ void Moveable::Register(sol::table & parent) /// Set effect to moveable // @function Moveable:SetEffect -// @tparam EffectID effect Type of effect to assign. +// @tparam Effects.EffectID effect Type of effect to assign. // @tparam float timeout time (in seconds) after which effect turns off (optional). ScriptReserved_SetEffect, &Moveable::SetEffect, @@ -181,7 +181,7 @@ void Moveable::Register(sol::table & parent) /// Get current moveable effect // @function Moveable:GetEffect -// @treturn EffectID effect type currently assigned to moveable. +// @treturn Effects.EffectID effect type currently assigned to moveable. ScriptReserved_GetEffect, & Moveable::GetEffect, /// Get the status of object. @@ -464,7 +464,7 @@ ScriptReserved_GetSlotHP, & Moveable::GetSlotHP, /// Borrow animation from an object // @function Moveable:AnimFromObject -// @tparam ObjID ObjectID to take animation and stateID from, +// @tparam Objects.ObjID ObjectID to take animation and stateID from, // @tparam int animNumber animation from object // @tparam int stateID state from object ScriptReserved_AnimFromObject, &Moveable::AnimFromObject); diff --git a/TombEngine/Scripting/Internal/TEN/Objects/ObjectsHandler.cpp b/TombEngine/Scripting/Internal/TEN/Objects/ObjectsHandler.cpp index 92536b0b5..22428cd84 100644 --- a/TombEngine/Scripting/Internal/TEN/Objects/ObjectsHandler.cpp +++ b/TombEngine/Scripting/Internal/TEN/Objects/ObjectsHandler.cpp @@ -43,7 +43,7 @@ ObjectsHandler::ObjectsHandler(sol::state* lua, sol::table & parent) : /*** Get moveables by its slot. @function GetMoveablesBySlot - @tparam ObjID slot the unique slot of the Moveable, e.g. `Objects.ObjID.ANIMATING1` + @tparam Objects.ObjID slot the unique slot of the Moveable, e.g. `Objects.ObjID.ANIMATING1` @treturn table table of Moveables referencing the given slot. */ m_table_objects.set_function(ScriptReserved_GetMoveablesBySlot, &ObjectsHandler::GetMoveablesBySlot, this);