Give documentation comments new tag names. Part 2 of making the documentation better.

This commit is contained in:
hispidence 2021-08-23 19:16:24 +01:00
parent 9549ce021d
commit 1cccef16b2
19 changed files with 70 additions and 60 deletions

View file

@ -13,8 +13,8 @@
#include <Game/newinv2.h>
/***
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);

View file

@ -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

View file

@ -8,7 +8,7 @@
/***
AI object
@classmod AIObject
@entityclass AIObject
@pragma nostrip
*/

View file

@ -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

View file

@ -6,7 +6,7 @@
/***
Camera info
@classmod CameraInfo
@entityclass CameraInfo
@pragma nostrip
*/

View file

@ -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
*/

View file

@ -6,7 +6,7 @@
/***
Represents the properties of an object as it appears in the inventory.
@classmod InventoryObject
@pregameclass InventoryObject
@pragma nostrip
*/

View file

@ -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
*/

View file

@ -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<GameScriptLevel>("Level",
sol::constructors<GameScriptLevel()>(),
/// (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

View file

@ -9,7 +9,7 @@
/***
Mesh info
@classmod MeshInfo
@entityclass MeshInfo
@pragma nostrip
*/

View file

@ -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
*/

View file

@ -5,7 +5,7 @@
/***
Represents a position in the game world.
@classmod Position
@miscclass Position
@pragma nostrip
*/

View file

@ -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
*/

View file

@ -3,7 +3,7 @@
/***
Settings that will be run on game startup.
@classmod Settings
@pregameclass Settings
@pragma nostrip
*/

View file

@ -8,7 +8,7 @@
/***
Sink info
@classmod SinkInfo
@entityclass SinkInfo
@pragma nostrip
*/

View file

@ -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
*/

View file

@ -6,7 +6,7 @@
/***
Sound source info
@classmod SoundSourceInfo
@entityclass SoundSourceInfo
@pragma nostrip
*/

View file

@ -1,6 +1,6 @@
#pragma once
// Last generated on 8/8/2021.
// Last generated on 23/8/2021.
#include <unordered_map>
#include <string>
@ -8,7 +8,7 @@
/***
Constants for items that can be used with GetInvItem and SetInvItem.
@classmod InvItem
@enum InvItem
@pragma nostrip
*/

View file

@ -1,6 +1,6 @@
#pragma once
// Last generated on 18/7/2021.
// Last generated on 23/8/2021.
#include "objectslist.h"
#include <unordered_map>
@ -8,7 +8,7 @@
/***
Constants for object IDs.
@classmod ObjID
@enum ObjID
@pragma nostrip
*/