Actually add documentation.

This commit is contained in:
hispidence 2021-08-12 19:58:22 +01:00
parent 3efa8f16b7
commit cd16268e19

View file

@ -264,7 +264,29 @@ Get a SinkInfo by its name.
*/
m_lua->set_function("GetSinkByName", &GameScript::GetSinkByName, this);
/***
Get a SoundSourceInfo by its name.
@function GetSoundSourceByName
@tparam string name the unique name of the sink as set in, or generated by, Tomb Editor
@treturn SoundSourceInfo a non-owning SoundSourceInfo referencing the sink.
*/
m_lua->set_function("GetSoundSourceByName", &GameScript::GetSoundSourceByName, this);
/***
Calculate the distance between two positions.
@function CalculateDistance
@tparam Position posA first position
@tparam Position posB second position
@treturn int the direct distance from one position to the other
*/
m_lua->set_function("CalculateDistance", &CalculateDistance);
/***
Calculate the horizontal distance between two positions.
@function CalculateHorizontalDistance
@tparam Position posA first position
@tparam Position posB second position
@treturn int the direct distance on the XZ plane from one position to the other
*/
m_lua->set_function("CalculateHorizontalDistance", &CalculateHorizontalDistance);
MakeReadOnlyTable("ObjID", kObjIDs);