mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-05-10 12:36:45 +03:00
Give documentation comments new tag names. Part 2 of making the documentation better.
This commit is contained in:
parent
9549ce021d
commit
1cccef16b2
19 changed files with 70 additions and 60 deletions
|
@ -13,8 +13,8 @@
|
||||||
#include <Game/newinv2.h>
|
#include <Game/newinv2.h>
|
||||||
|
|
||||||
/***
|
/***
|
||||||
Files that will be run on game startup.
|
Scripts that will be run on game startup.
|
||||||
@module gameflow
|
@files Pre-game
|
||||||
@pragma nostrip
|
@pragma nostrip
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -48,20 +48,23 @@ Add a level to the gameflow.
|
||||||
*/
|
*/
|
||||||
m_lua->set_function("AddLevel", &GameFlow::AddLevel, this);
|
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
|
@function SetIntroImagePath
|
||||||
@tparam string path the path to the image, relative to the TombEngine exe
|
@tparam string path the path to the image, relative to the TombEngine exe
|
||||||
*/
|
*/
|
||||||
m_lua->set_function("SetIntroImagePath", &GameFlow::SetIntroImagePath, this);
|
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)__
|
__(not yet implemented)__
|
||||||
@function SetTitleScreenImagePath
|
@function SetTitleScreenImagePath
|
||||||
@tparam string path the path to the image, relative to the TombEngine exe
|
@tparam string path the path to the image, relative to the TombEngine exe
|
||||||
*/
|
*/
|
||||||
m_lua->set_function("SetTitleScreenImagePath", &GameFlow::SetTitleScreenImagePath, this);
|
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.
|
This is equivalent to TRNG's WorldFarView variable.
|
||||||
__(not yet implemented)__
|
__(not yet implemented)__
|
||||||
@function SetGameFarView
|
@function SetGameFarView
|
||||||
|
@ -98,13 +101,14 @@ You will not need to call them manually.
|
||||||
*/
|
*/
|
||||||
/*** Set string variable keys and their translations.
|
/*** Set string variable keys and their translations.
|
||||||
@function SetStrings
|
@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);
|
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
|
@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);
|
m_lua->set_function("SetLanguageNames", &GameFlow::SetLanguageNames, this);
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
|
|
||||||
/***
|
/***
|
||||||
Functions and callbacks for level-specific logic scripts.
|
Functions and callbacks for level-specific logic scripts.
|
||||||
@module gamelogic
|
@files Level-specific
|
||||||
@pragma nostrip
|
@pragma nostrip
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -178,15 +178,13 @@ GameScript::GameScript(sol::state* lua) : LuaHandler{ lua }
|
||||||
@section Music
|
@section Music
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/***
|
/*** Set and play an ambient track
|
||||||
Set the named track as the ambient track, and start playing it
|
|
||||||
@function SetAmbientTrack
|
@function SetAmbientTrack
|
||||||
@tparam string name of track (without file extension) to play
|
@tparam string name of track (without file extension) to play
|
||||||
*/
|
*/
|
||||||
m_lua->set_function("SetAmbientTrack", &SetAmbientTrack);
|
m_lua->set_function("SetAmbientTrack", &SetAmbientTrack);
|
||||||
|
|
||||||
/***
|
/*** Play an audio track
|
||||||
Start playing the named track.
|
|
||||||
@function PlayAudioTrack
|
@function PlayAudioTrack
|
||||||
@tparam string name of track (without file extension) to play
|
@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)
|
@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
|
@section Inventory
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/***
|
/*** Add x of an item to the inventory.
|
||||||
Add x of a certain item to the inventory.
|
|
||||||
A count of 0 will add the "default" amount of that item
|
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).
|
(i.e. the amount the player would get from a pickup of that type).
|
||||||
For example, giving "zero" crossbow ammo would give the player
|
For example, giving "zero" crossbow ammo would give the player
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
/***
|
/***
|
||||||
AI object
|
AI object
|
||||||
|
|
||||||
@classmod AIObject
|
@entityclass AIObject
|
||||||
@pragma nostrip
|
@pragma nostrip
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ Metadata about audio tracks (music and ambience).
|
||||||
|
|
||||||
__In progress__
|
__In progress__
|
||||||
|
|
||||||
@classmod AudioTrack
|
@pregameclass AudioTrack
|
||||||
@pragma nostrip
|
@pragma nostrip
|
||||||
*/
|
*/
|
||||||
// TODO FIXME find out what is meant to happen and whether we need this or not
|
// TODO FIXME find out what is meant to happen and whether we need this or not
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
/***
|
/***
|
||||||
Camera info
|
Camera info
|
||||||
|
|
||||||
@classmod CameraInfo
|
@entityclass CameraInfo
|
||||||
@pragma nostrip
|
@pragma nostrip
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
An RGBA or RGB color.
|
An RGBA or RGB color.
|
||||||
Components are specified in bytes; all values are clamped to [0, 255].
|
Components are specified in bytes; all values are clamped to [0, 255].
|
||||||
|
|
||||||
@classmod Color
|
@miscclass Color
|
||||||
@pragma nostrip
|
@pragma nostrip
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
/***
|
/***
|
||||||
Represents the properties of an object as it appears in the inventory.
|
Represents the properties of an object as it appears in the inventory.
|
||||||
|
|
||||||
@classmod InventoryObject
|
@pregameclass InventoryObject
|
||||||
@pragma nostrip
|
@pragma nostrip
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@ Represents any object inside the game world.
|
||||||
Examples include statics, enemies, doors,
|
Examples include statics, enemies, doors,
|
||||||
pickups, and Lara herself.
|
pickups, and Lara herself.
|
||||||
|
|
||||||
@classmod ItemInfo
|
@entityclass ItemInfo
|
||||||
@pragma nostrip
|
@pragma nostrip
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -3,10 +3,10 @@
|
||||||
#include "ScriptAssert.h"
|
#include "ScriptAssert.h"
|
||||||
|
|
||||||
/***
|
/***
|
||||||
A container for level metadata - things which aren't present in the compiled
|
Stores level metadata.
|
||||||
level file itself.
|
These are things things which aren't present in the compiled level file itself.
|
||||||
|
|
||||||
@classmod Level
|
@pregameclass Level
|
||||||
@pragma nostrip
|
@pragma nostrip
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -19,23 +19,28 @@ void GameScriptLevel::Register(sol::state* state)
|
||||||
state->new_usertype<GameScriptLevel>("Level",
|
state->new_usertype<GameScriptLevel>("Level",
|
||||||
sol::constructors<GameScriptLevel()>(),
|
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
|
//@mem nameKey
|
||||||
"nameKey", &GameScriptLevel::NameStringKey,
|
"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
|
//@mem scriptFile
|
||||||
"scriptFile", &GameScriptLevel::ScriptFileName,
|
"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
|
//@mem levelFile
|
||||||
"levelFile", &GameScriptLevel::FileName,
|
"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
|
//@mem loadScreenFile
|
||||||
"loadScreenFile", &GameScriptLevel::LoadScreenFileName,
|
"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
|
//@mem ambientTrack
|
||||||
"ambientTrack", &GameScriptLevel::AmbientTrack,
|
"ambientTrack", &GameScriptLevel::AmbientTrack,
|
||||||
|
|
||||||
|
@ -43,36 +48,39 @@ void GameScriptLevel::Register(sol::state* state)
|
||||||
//@mem layer1
|
//@mem layer1
|
||||||
"layer1", &GameScriptLevel::Layer1,
|
"layer1", &GameScriptLevel::Layer1,
|
||||||
|
|
||||||
/// (@{SkyLayer}) Secondary sky layer __(not yet implemented)__
|
/// (@{SkyLayer}) Secondary sky layer
|
||||||
|
// __(not yet implemented)__
|
||||||
//@mem layer2
|
//@mem layer2
|
||||||
"layer2", &GameScriptLevel::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.
|
// If not provided, distance fog will be black.
|
||||||
//
|
//
|
||||||
// __(not yet implemented)__
|
// __(not yet implemented)__
|
||||||
//@mem fog
|
//@mem fog
|
||||||
"fog", &GameScriptLevel::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
|
//@mem horizon
|
||||||
"horizon", &GameScriptLevel::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.
|
// If set to false, there will be a black band between the two.
|
||||||
//
|
//
|
||||||
// __(not yet implemented)__
|
// __(not yet implemented)__
|
||||||
//@mem colAddHorizon
|
//@mem colAddHorizon
|
||||||
"colAddHorizon", &GameScriptLevel::ColAddHorizon,
|
"colAddHorizon", &GameScriptLevel::ColAddHorizon,
|
||||||
|
|
||||||
/// (bool) equivalent to classic TRLE's LIGHTNING setting.
|
/// (bool) Enable flickering lightning in the sky.
|
||||||
// If true, there will be a flickering lightning in the skylayer, as in the TRC Ireland levels.
|
// Equivalent to classic TRLE's LIGHTNING setting. As in the TRC Ireland levels.
|
||||||
//
|
j//
|
||||||
// __(thunder sounds not yet implemented)__
|
// __(thunder sounds not yet implemented)__
|
||||||
//@mem storm
|
//@mem storm
|
||||||
"storm", &GameScriptLevel::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)__
|
// __(not yet implemented)__
|
||||||
//@mem weather
|
//@mem weather
|
||||||
|
@ -94,12 +102,12 @@ e.g. `myLevel.laraType = LaraType.DIVESUIT`
|
||||||
@mem laraType*/
|
@mem laraType*/
|
||||||
"laraType", &GameScriptLevel::LaraType,
|
"laraType", &GameScriptLevel::LaraType,
|
||||||
|
|
||||||
/// (bool) If true, an occasional screen shake effect (as seen in TRC's Sinking Submarine) will
|
/// (bool) Enable occasional screen shake effect.
|
||||||
// happen throughout the level.
|
// As seen in TRC's Sinking Submarine.
|
||||||
//@mem rumble
|
//@mem rumble
|
||||||
"rumble", &GameScriptLevel::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)__
|
// __(not yet implemented)__
|
||||||
//@mem mirror
|
//@mem mirror
|
||||||
|
@ -119,8 +127,8 @@ __(not yet implemented)__
|
||||||
@mem UVRotate*/
|
@mem UVRotate*/
|
||||||
"UVRotate", sol::property(&GameScriptLevel::SetUVRotate),
|
"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.
|
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.
|
This is equivalent to TRNG's LevelFarView variable.
|
||||||
|
@ -130,7 +138,7 @@ __(not yet implemented)__
|
||||||
*/
|
*/
|
||||||
"farView", sol::property(&GameScriptLevel::SetLevelFarView),
|
"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)__
|
__(not yet implemented)__
|
||||||
@mem unlimitedAir
|
@mem unlimitedAir
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
/***
|
/***
|
||||||
Mesh info
|
Mesh info
|
||||||
|
|
||||||
@classmod MeshInfo
|
@entityclass MeshInfo
|
||||||
@pragma nostrip
|
@pragma nostrip
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -2,11 +2,12 @@
|
||||||
#include "GameScriptMirror.h"
|
#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.__
|
__Not currently implemented.__
|
||||||
|
|
||||||
@classmod Mirror
|
@pregameclass Mirror
|
||||||
@pragma nostrip
|
@pragma nostrip
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
/***
|
/***
|
||||||
Represents a position in the game world.
|
Represents a position in the game world.
|
||||||
@classmod Position
|
@miscclass Position
|
||||||
@pragma nostrip
|
@pragma nostrip
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -2,11 +2,11 @@
|
||||||
#include "GameScriptRotation.h"
|
#include "GameScriptRotation.h"
|
||||||
#include "phd_global.h"
|
#include "phd_global.h"
|
||||||
|
|
||||||
/***
|
/*** Represents a rotation.
|
||||||
Represents a rotation as a combination of individual
|
Rotations are specifed as a combination of individual
|
||||||
angles, in degrees, about each axis.
|
angles, in degrees, about each axis.
|
||||||
All values will be clamped to [-32768, 32767].
|
All values will be clamped to [-32768, 32767].
|
||||||
@classmod Rotation
|
@miscclass Rotation
|
||||||
@pragma nostrip
|
@pragma nostrip
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
/***
|
/***
|
||||||
Settings that will be run on game startup.
|
Settings that will be run on game startup.
|
||||||
@classmod Settings
|
@pregameclass Settings
|
||||||
@pragma nostrip
|
@pragma nostrip
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
/***
|
/***
|
||||||
Sink info
|
Sink info
|
||||||
|
|
||||||
@classmod SinkInfo
|
@entityclass SinkInfo
|
||||||
@pragma nostrip
|
@pragma nostrip
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
#include "framework.h"
|
#include "framework.h"
|
||||||
#include "GameScriptSkyLayer.h"
|
#include "GameScriptSkyLayer.h"
|
||||||
/***
|
/*** Describes a layer of moving clouds.
|
||||||
Description class for moving clouds, as seen in TR4's City of the Dead.
|
As seen in TR4's City of the Dead.
|
||||||
|
|
||||||
@classmod SkyLayer
|
@pregameclass SkyLayer
|
||||||
@pragma nostrip
|
@pragma nostrip
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
/***
|
/***
|
||||||
Sound source info
|
Sound source info
|
||||||
|
|
||||||
@classmod SoundSourceInfo
|
@entityclass SoundSourceInfo
|
||||||
@pragma nostrip
|
@pragma nostrip
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
// Last generated on 8/8/2021.
|
// Last generated on 23/8/2021.
|
||||||
|
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
@ -8,7 +8,7 @@
|
||||||
|
|
||||||
/***
|
/***
|
||||||
Constants for items that can be used with GetInvItem and SetInvItem.
|
Constants for items that can be used with GetInvItem and SetInvItem.
|
||||||
@classmod InvItem
|
@enum InvItem
|
||||||
@pragma nostrip
|
@pragma nostrip
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
// Last generated on 18/7/2021.
|
// Last generated on 23/8/2021.
|
||||||
|
|
||||||
#include "objectslist.h"
|
#include "objectslist.h"
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
|
@ -8,7 +8,7 @@
|
||||||
|
|
||||||
/***
|
/***
|
||||||
Constants for object IDs.
|
Constants for object IDs.
|
||||||
@classmod ObjID
|
@enum ObjID
|
||||||
@pragma nostrip
|
@pragma nostrip
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue