diff --git a/TR5Main/Scripting/GameFlowScript.cpp b/TR5Main/Scripting/GameFlowScript.cpp index e6a98d232..1c0a90fdd 100644 --- a/TR5Main/Scripting/GameFlowScript.cpp +++ b/TR5Main/Scripting/GameFlowScript.cpp @@ -13,8 +13,8 @@ #include /*** -Files that will be run on game startup. -@module gameflow +Scripts that will be run on game startup. +@files Pre-game @pragma nostrip */ @@ -48,20 +48,23 @@ Add a level to the gameflow. */ m_lua->set_function("AddLevel", &GameFlow::AddLevel, this); -/*** The path of the .jpg or .png image to show when loading the game. +/*** Image to show when loading the game. +Must be a .jpg or .png image. @function SetIntroImagePath @tparam string path the path to the image, relative to the TombEngine exe */ m_lua->set_function("SetIntroImagePath", &GameFlow::SetIntroImagePath, this); -/*** The path of the .jpg or .png image to show in the background of the title screen. +/*** Image to show in the background of the title screen. +Must be a .jpg or .png image. __(not yet implemented)__ @function SetTitleScreenImagePath @tparam string path the path to the image, relative to the TombEngine exe */ m_lua->set_function("SetTitleScreenImagePath", &GameFlow::SetTitleScreenImagePath, this); -/*** The maximum draw distance, in sectors (blocks), of any level in the game. +/*** Maximum draw distance. +The maximum draw distance, in sectors (blocks), of any level in the game. This is equivalent to TRNG's WorldFarView variable. __(not yet implemented)__ @function SetGameFarView @@ -98,13 +101,14 @@ You will not need to call them manually. */ /*** Set string variable keys and their translations. @function SetStrings -@tparam table table array-style table with strings +@tparam tab table array-style table with strings */ m_lua->set_function("SetStrings", &GameFlow::SetStrings, this); -/*** Specify which translations in the strings table correspond to which languages. +/*** Set language names for translations. +Specify which translations in the strings table correspond to which languages. @function SetLanguageNames -@tparam table table array-style table with language names +@tparam tab table array-style table with language names */ m_lua->set_function("SetLanguageNames", &GameFlow::SetLanguageNames, this); diff --git a/TR5Main/Scripting/GameLogicScript.cpp b/TR5Main/Scripting/GameLogicScript.cpp index e08231e95..80d90101b 100644 --- a/TR5Main/Scripting/GameLogicScript.cpp +++ b/TR5Main/Scripting/GameLogicScript.cpp @@ -17,7 +17,7 @@ /*** Functions and callbacks for level-specific logic scripts. -@module gamelogic +@files Level-specific @pragma nostrip */ @@ -178,15 +178,13 @@ GameScript::GameScript(sol::state* lua) : LuaHandler{ lua } @section Music */ -/*** -Set the named track as the ambient track, and start playing it +/*** Set and play an ambient track @function SetAmbientTrack @tparam string name of track (without file extension) to play */ m_lua->set_function("SetAmbientTrack", &SetAmbientTrack); -/*** -Start playing the named track. +/*** Play an audio track @function PlayAudioTrack @tparam string name of track (without file extension) to play @tparam bool loop if true, the track will loop; if false, it won't (default: false) @@ -197,8 +195,7 @@ Start playing the named track. @section Inventory */ -/*** -Add x of a certain item to the inventory. +/*** Add x of an item to the inventory. A count of 0 will add the "default" amount of that item (i.e. the amount the player would get from a pickup of that type). For example, giving "zero" crossbow ammo would give the player diff --git a/TR5Main/Scripting/GameScriptAIObject.cpp b/TR5Main/Scripting/GameScriptAIObject.cpp index bc8aed2a0..dae585b75 100644 --- a/TR5Main/Scripting/GameScriptAIObject.cpp +++ b/TR5Main/Scripting/GameScriptAIObject.cpp @@ -8,7 +8,7 @@ /*** AI object -@classmod AIObject +@entityclass AIObject @pragma nostrip */ diff --git a/TR5Main/Scripting/GameScriptAudioTrack.cpp b/TR5Main/Scripting/GameScriptAudioTrack.cpp index 51f1164fe..767482f89 100644 --- a/TR5Main/Scripting/GameScriptAudioTrack.cpp +++ b/TR5Main/Scripting/GameScriptAudioTrack.cpp @@ -6,7 +6,7 @@ Metadata about audio tracks (music and ambience). __In progress__ -@classmod AudioTrack +@pregameclass AudioTrack @pragma nostrip */ // TODO FIXME find out what is meant to happen and whether we need this or not diff --git a/TR5Main/Scripting/GameScriptCameraInfo.cpp b/TR5Main/Scripting/GameScriptCameraInfo.cpp index 2d1af133b..c33fc68c6 100644 --- a/TR5Main/Scripting/GameScriptCameraInfo.cpp +++ b/TR5Main/Scripting/GameScriptCameraInfo.cpp @@ -6,7 +6,7 @@ /*** Camera info -@classmod CameraInfo +@entityclass CameraInfo @pragma nostrip */ diff --git a/TR5Main/Scripting/GameScriptColor.cpp b/TR5Main/Scripting/GameScriptColor.cpp index 39bb0bf82..928f5c05c 100644 --- a/TR5Main/Scripting/GameScriptColor.cpp +++ b/TR5Main/Scripting/GameScriptColor.cpp @@ -5,7 +5,7 @@ An RGBA or RGB color. Components are specified in bytes; all values are clamped to [0, 255]. -@classmod Color +@miscclass Color @pragma nostrip */ diff --git a/TR5Main/Scripting/GameScriptInventoryObject.cpp b/TR5Main/Scripting/GameScriptInventoryObject.cpp index 3769153da..24a616fda 100644 --- a/TR5Main/Scripting/GameScriptInventoryObject.cpp +++ b/TR5Main/Scripting/GameScriptInventoryObject.cpp @@ -6,7 +6,7 @@ /*** Represents the properties of an object as it appears in the inventory. -@classmod InventoryObject +@pregameclass InventoryObject @pragma nostrip */ diff --git a/TR5Main/Scripting/GameScriptItemInfo.cpp b/TR5Main/Scripting/GameScriptItemInfo.cpp index 36f531b73..b673081cb 100644 --- a/TR5Main/Scripting/GameScriptItemInfo.cpp +++ b/TR5Main/Scripting/GameScriptItemInfo.cpp @@ -17,7 +17,7 @@ Represents any object inside the game world. Examples include statics, enemies, doors, pickups, and Lara herself. -@classmod ItemInfo +@entityclass ItemInfo @pragma nostrip */ diff --git a/TR5Main/Scripting/GameScriptLevel.cpp b/TR5Main/Scripting/GameScriptLevel.cpp index f68fdffd9..582b30f17 100644 --- a/TR5Main/Scripting/GameScriptLevel.cpp +++ b/TR5Main/Scripting/GameScriptLevel.cpp @@ -3,10 +3,10 @@ #include "ScriptAssert.h" /*** -A container for level metadata - things which aren't present in the compiled -level file itself. +Stores level metadata. +These are things things which aren't present in the compiled level file itself. -@classmod Level +@pregameclass Level @pragma nostrip */ @@ -19,23 +19,28 @@ void GameScriptLevel::Register(sol::state* state) state->new_usertype("Level", sol::constructors(), -/// (string) string key for the level's (localised) name. Corresponds to an entry in strings.lua. +/// (string) string key for the level's (localised) name. +// Corresponds to an entry in strings.lua. //@mem nameKey "nameKey", &GameScriptLevel::NameStringKey, -/// (string) path of the Lua file holding the level's logic script, relative to the location of the tombengine executable +/// (string) Level-specific Lua script file. +// Path of the Lua file holding the level's logic script, relative to the location of the tombengine executable //@mem scriptFile "scriptFile", &GameScriptLevel::ScriptFileName, -/// (string) path of the compiled level file, relative to the location of the tombengine executable +/// (string) Compiled file path. +// This path is relative to the location of the TombEngine executable. //@mem levelFile "levelFile", &GameScriptLevel::FileName, -/// (string) path of the level's load screen file (.png or .jpg), relative to the location of the tombengine executable +/// (string) Load screen image. +// Path of the level's load screen file (.png or .jpg), relative to the location of the tombengine executable //@mem loadScreenFile "loadScreenFile", &GameScriptLevel::LoadScreenFileName, -/// (string) initial ambient sound track to play - this is the filename of the track __without__ the .wav extension +/// (string) initial ambient sound track to play. +// This is the filename of the track __without__ the .wav extension. //@mem ambientTrack "ambientTrack", &GameScriptLevel::AmbientTrack, @@ -43,36 +48,39 @@ void GameScriptLevel::Register(sol::state* state) //@mem layer1 "layer1", &GameScriptLevel::Layer1, -/// (@{SkyLayer}) Secondary sky layer __(not yet implemented)__ +/// (@{SkyLayer}) Secondary sky layer +// __(not yet implemented)__ //@mem layer2 "layer2", &GameScriptLevel::Layer2, -/// (@{Color}) distance fog RGB color (as seen in TR4's Desert Railroad). +/// (@{Color}) distance fog RGB color. +// As seen in TR4's Desert Railroad. // If not provided, distance fog will be black. // // __(not yet implemented)__ //@mem fog "fog", &GameScriptLevel::Fog, -/// (bool) if set to true, the horizon and sky layer will be drawn; if set to false; they won't. +/// (bool) Draw sky layer? (default: false) //@mem horizon "horizon", &GameScriptLevel::Horizon, -/// (bool) if true, the horizon graphic will transition smoothly to the sky layer. +/// (bool) Enable smooth transition from horizon graphic to sky layer. // If set to false, there will be a black band between the two. // // __(not yet implemented)__ //@mem colAddHorizon "colAddHorizon", &GameScriptLevel::ColAddHorizon, -/// (bool) equivalent to classic TRLE's LIGHTNING setting. -// If true, there will be a flickering lightning in the skylayer, as in the TRC Ireland levels. -// +/// (bool) Enable flickering lightning in the sky. +// Equivalent to classic TRLE's LIGHTNING setting. As in the TRC Ireland levels. +j// // __(thunder sounds not yet implemented)__ //@mem storm "storm", &GameScriptLevel::Storm, -/// (WeatherType) Must be one of the values WeatherType.NORMAL, WeatherType.RAIN, or WeatherType.SNOW. +/// (WeatherType) Choose weather effect. +// Must be one of the values `WeatherType.NORMAL`, `WeatherType.RAIN`, or `WeatherType.SNOW`. // // __(not yet implemented)__ //@mem weather @@ -94,12 +102,12 @@ e.g. `myLevel.laraType = LaraType.DIVESUIT` @mem laraType*/ "laraType", &GameScriptLevel::LaraType, -/// (bool) If true, an occasional screen shake effect (as seen in TRC's Sinking Submarine) will -// happen throughout the level. +/// (bool) Enable occasional screen shake effect. +// As seen in TRC's Sinking Submarine. //@mem rumble "rumble", &GameScriptLevel::Rumble, -/// (@{Mirror}) object holding the location and size of the room's mirror, if present. +/// (@{Mirror}) Location and size of the level's mirror, if present. // // __(not yet implemented)__ //@mem mirror @@ -119,8 +127,8 @@ __(not yet implemented)__ @mem UVRotate*/ "UVRotate", sol::property(&GameScriptLevel::SetUVRotate), -/*** (byte) The maximum draw distance, in sectors (blocks), of this particular level. - +/*** (byte) The maximum draw distance for level. +Given in sectors (blocks). Must be in the range [1, 127], and equal to or less than the value passed to SetGameFarView. This is equivalent to TRNG's LevelFarView variable. @@ -130,7 +138,7 @@ __(not yet implemented)__ */ "farView", sol::property(&GameScriptLevel::SetLevelFarView), -/*** (bool) If true, the player will have an unlimited oxygen supply when in water. +/*** (bool) Enable unlimited oxygen supply when in water. __(not yet implemented)__ @mem unlimitedAir diff --git a/TR5Main/Scripting/GameScriptMeshInfo.cpp b/TR5Main/Scripting/GameScriptMeshInfo.cpp index 01a300b74..e632a87eb 100644 --- a/TR5Main/Scripting/GameScriptMeshInfo.cpp +++ b/TR5Main/Scripting/GameScriptMeshInfo.cpp @@ -9,7 +9,7 @@ /*** Mesh info -@classmod MeshInfo +@entityclass MeshInfo @pragma nostrip */ diff --git a/TR5Main/Scripting/GameScriptMirror.cpp b/TR5Main/Scripting/GameScriptMirror.cpp index e784584b4..25a015c10 100644 --- a/TR5Main/Scripting/GameScriptMirror.cpp +++ b/TR5Main/Scripting/GameScriptMirror.cpp @@ -2,11 +2,12 @@ #include "GameScriptMirror.h" /*** -A mirror effect, as seen in TR4's Coastal Ruins and Sacred Lake levels. +A mirror effect. +As seen in TR4's Coastal Ruins and Sacred Lake levels. __Not currently implemented.__ -@classmod Mirror +@pregameclass Mirror @pragma nostrip */ diff --git a/TR5Main/Scripting/GameScriptPosition.cpp b/TR5Main/Scripting/GameScriptPosition.cpp index 8e88897e1..ee7d95adb 100644 --- a/TR5Main/Scripting/GameScriptPosition.cpp +++ b/TR5Main/Scripting/GameScriptPosition.cpp @@ -5,7 +5,7 @@ /*** Represents a position in the game world. -@classmod Position +@miscclass Position @pragma nostrip */ diff --git a/TR5Main/Scripting/GameScriptRotation.cpp b/TR5Main/Scripting/GameScriptRotation.cpp index cd14a65ca..f87953759 100644 --- a/TR5Main/Scripting/GameScriptRotation.cpp +++ b/TR5Main/Scripting/GameScriptRotation.cpp @@ -2,11 +2,11 @@ #include "GameScriptRotation.h" #include "phd_global.h" -/*** -Represents a rotation as a combination of individual +/*** Represents a rotation. +Rotations are specifed as a combination of individual angles, in degrees, about each axis. All values will be clamped to [-32768, 32767]. -@classmod Rotation +@miscclass Rotation @pragma nostrip */ diff --git a/TR5Main/Scripting/GameScriptSettings.cpp b/TR5Main/Scripting/GameScriptSettings.cpp index bf5767e4f..e0e888212 100644 --- a/TR5Main/Scripting/GameScriptSettings.cpp +++ b/TR5Main/Scripting/GameScriptSettings.cpp @@ -3,7 +3,7 @@ /*** Settings that will be run on game startup. -@classmod Settings +@pregameclass Settings @pragma nostrip */ diff --git a/TR5Main/Scripting/GameScriptSinkInfo.cpp b/TR5Main/Scripting/GameScriptSinkInfo.cpp index f63305057..cfd8a58a0 100644 --- a/TR5Main/Scripting/GameScriptSinkInfo.cpp +++ b/TR5Main/Scripting/GameScriptSinkInfo.cpp @@ -8,7 +8,7 @@ /*** Sink info -@classmod SinkInfo +@entityclass SinkInfo @pragma nostrip */ diff --git a/TR5Main/Scripting/GameScriptSkyLayer.cpp b/TR5Main/Scripting/GameScriptSkyLayer.cpp index e458241f9..54096e226 100644 --- a/TR5Main/Scripting/GameScriptSkyLayer.cpp +++ b/TR5Main/Scripting/GameScriptSkyLayer.cpp @@ -1,9 +1,9 @@ #include "framework.h" #include "GameScriptSkyLayer.h" -/*** -Description class for moving clouds, as seen in TR4's City of the Dead. +/*** Describes a layer of moving clouds. +As seen in TR4's City of the Dead. -@classmod SkyLayer +@pregameclass SkyLayer @pragma nostrip */ diff --git a/TR5Main/Scripting/GameScriptSoundSourceInfo.cpp b/TR5Main/Scripting/GameScriptSoundSourceInfo.cpp index b6bab0622..d151da7c5 100644 --- a/TR5Main/Scripting/GameScriptSoundSourceInfo.cpp +++ b/TR5Main/Scripting/GameScriptSoundSourceInfo.cpp @@ -6,7 +6,7 @@ /*** Sound source info -@classmod SoundSourceInfo +@entityclass SoundSourceInfo @pragma nostrip */ diff --git a/TR5Main/Scripting/InventorySlots.h b/TR5Main/Scripting/InventorySlots.h index 142289748..d5d3eb6e1 100644 --- a/TR5Main/Scripting/InventorySlots.h +++ b/TR5Main/Scripting/InventorySlots.h @@ -1,6 +1,6 @@ #pragma once -// Last generated on 8/8/2021. +// Last generated on 23/8/2021. #include #include @@ -8,7 +8,7 @@ /*** Constants for items that can be used with GetInvItem and SetInvItem. -@classmod InvItem +@enum InvItem @pragma nostrip */ diff --git a/TR5Main/Scripting/ObjectIDs.h b/TR5Main/Scripting/ObjectIDs.h index 961c78316..86b96e4c4 100644 --- a/TR5Main/Scripting/ObjectIDs.h +++ b/TR5Main/Scripting/ObjectIDs.h @@ -1,6 +1,6 @@ #pragma once -// Last generated on 18/7/2021. +// Last generated on 23/8/2021. #include "objectslist.h" #include @@ -8,7 +8,7 @@ /*** Constants for object IDs. -@classmod ObjID +@enum ObjID @pragma nostrip */