This commit is contained in:
MontyTRC89 2021-08-16 05:45:10 +02:00
commit 85b26b4238
26 changed files with 214 additions and 97 deletions

View file

@ -1352,10 +1352,12 @@ void GetCollisionInfo(COLL_INFO* coll, int xPos, int yPos, int zPos, int roomNum
{ {
tfLocation = LaraItem->location; tfLocation = LaraItem->location;
tcLocation = LaraItem->location; tcLocation = LaraItem->location;
tRoomNumber = roomNumber;
} }
tfLocation = GetRoom(tfLocation, x, yTop, z); tfLocation = GetRoom(tfLocation, x, yTop, z);
floor = GetFloor(x, yTop, z, &tRoomNumber);
DoFloorThings(floor, x, yTop, z); DoFloorThings(floor, x, yTop, z);
height = GetFloorHeight(tfLocation, x, z).value_or(NO_HEIGHT); height = GetFloorHeight(tfLocation, x, z).value_or(NO_HEIGHT);
if (height != NO_HEIGHT) if (height != NO_HEIGHT)
@ -1437,6 +1439,7 @@ void GetCollisionInfo(COLL_INFO* coll, int xPos, int yPos, int zPos, int roomNum
tfLocation = GetRoom(tfLocation, x, yTop, z); tfLocation = GetRoom(tfLocation, x, yTop, z);
floor = GetFloor(x + XFront, yTop, z + ZFront, &tRoomNumber);
DoFloorThings(floor, x, yTop, z); DoFloorThings(floor, x, yTop, z);
height = GetFloorHeight(tfLocation, x, z).value_or(NO_HEIGHT); height = GetFloorHeight(tfLocation, x, z).value_or(NO_HEIGHT);
@ -2416,7 +2419,7 @@ Vector2 GetOrthogonalIntersect(int xPos, int zPos, int radius, short yRot)
{ {
Vector2 vect; Vector2 vect;
int xGrid = xPos - ((xPos) % WALL_SIZE); int xGrid = xPos - (xPos % WALL_SIZE);
int zGrid = zPos - (zPos % WALL_SIZE); int zGrid = zPos - (zPos % WALL_SIZE);
int dir = (unsigned short)(yRot + ANGLE(45)) / ANGLE(90); int dir = (unsigned short)(yRot + ANGLE(45)) / ANGLE(90);
@ -2432,7 +2435,7 @@ Vector2 GetOrthogonalIntersect(int xPos, int zPos, int radius, short yRot)
zPos = zGrid + radius; zPos = zGrid + radius;
break; break;
case WEST: case WEST:
xPos = xGrid - (WALL_SIZE - 1) + radius; xPos = xGrid + radius;
break; break;
} }

View file

@ -17,7 +17,7 @@
#endif #endif
/*** /***
Functions to be used in GameFlow.lua Files that will be run on game startup.
@module gameflow @module gameflow
@pragma nostrip @pragma nostrip
*/ */
@ -38,11 +38,17 @@ GameFlow::GameFlow(sol::state* lua) : LuaHandler{ lua }
GameScriptAudioTrack::Register(m_lua); GameScriptAudioTrack::Register(m_lua);
GameScriptColor::Register(m_lua); GameScriptColor::Register(m_lua);
GameScriptRotation::Register(m_lua); GameScriptRotation::Register(m_lua);
/*** gameflow.lua.
These functions are called in gameflow.lua, a file loosely equivalent to winroomedit's SCRIPT.DAT.
They handle a game's 'metadata'; i.e., things such as level titles, loading screen paths, and default
ambient tracks.
@section gameflowlua
*/
/*** /***
Add a level to the gameflow. Add a level to the gameflow.
@function AddLevel @function AddLevel
@tparam @{Level} level a level object @tparam Level level a level object
*/ */
m_lua->set_function("AddLevel", &GameFlow::AddLevel, this); m_lua->set_function("AddLevel", &GameFlow::AddLevel, this);
@ -59,29 +65,45 @@ __(not yet implemented)__
*/ */
m_lua->set_function("SetTitleScreenImagePath", &GameFlow::SetTitleScreenImagePath, this); m_lua->set_function("SetTitleScreenImagePath", &GameFlow::SetTitleScreenImagePath, this);
/*** settings.lua.
These functions are called in settings.lua, a file which holds your local settings.
settings.lua shouldn't be bundled with any finished levels/games.
@section settingslua
*/
/***
@function SetSettings
@tparam Settings settings a settings object
*/
m_lua->set_function("SetSettings", &GameFlow::SetSettings, this);
/*** tracks.lua.
__TODO CONFIRM PROPER BEHAVIOUR__
@section trackslua
*/
/*** /***
@function SetAudioTracks @function SetAudioTracks
@tparam table table array-style table with @{AudioTrack} objects @tparam table table array-style table with @{AudioTrack} objects
*/ */
//TODO confirm proper behaviour
m_lua->set_function("SetAudioTracks", &GameFlow::SetAudioTracks, this); m_lua->set_function("SetAudioTracks", &GameFlow::SetAudioTracks, this);
/*** /*** strings.lua.
These functions used in strings.lua, which is generated by TombIDE.
You will not need to call them manually.
@section stringslua
*/
/*** Set string variable keys and their translations.
@function SetStrings @function SetStrings
@tparam table table array-style table with strings @tparam table 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.
@function SetLanguageNames @function SetLanguageNames
@tparam table table array-style table with TODO EXTRA INFO HERE @tparam table table array-style table with language names
*/ */
m_lua->set_function("SetLanguageNames", &GameFlow::SetLanguageNames, this); m_lua->set_function("SetLanguageNames", &GameFlow::SetLanguageNames, this);
/***
@function SetSettings
@tparam table table array-style table with TODO EXTRA INFO HERE
*/
m_lua->set_function("SetSettings", &GameFlow::SetSettings, this);
MakeReadOnlyTable("WeatherType", kWeatherTypes); MakeReadOnlyTable("WeatherType", kWeatherTypes);
MakeReadOnlyTable("LaraType", kLaraTypes); MakeReadOnlyTable("LaraType", kLaraTypes);

View file

@ -1,6 +1,16 @@
#include "framework.h" #include "framework.h"
#include "GameScriptAudioTrack.h" #include "GameScriptAudioTrack.h"
/***
Metadata about audio tracks (music and ambience).
__In progress__
@classmod AudioTrack
@pragma nostrip
*/
// TODO FIXME find out what is meant to happen and whether we need this or not
GameScriptAudioTrack::GameScriptAudioTrack(std::string const & trackName, bool looped) GameScriptAudioTrack::GameScriptAudioTrack(std::string const & trackName, bool looped)
{ {
this->trackName = trackName; this->trackName = trackName;

View file

@ -6,7 +6,6 @@ void GameScriptSettings::Register(sol::state* lua)
lua->new_usertype<GameScriptSettings>("Settings", lua->new_usertype<GameScriptSettings>("Settings",
"screenWidth", &GameScriptSettings::ScreenWidth, "screenWidth", &GameScriptSettings::ScreenWidth,
"screenHeight", &GameScriptSettings::ScreenHeight, "screenHeight", &GameScriptSettings::ScreenHeight,
"windowTitle", &GameScriptSettings::WindowTitle,
"enableDynamicShadows", &GameScriptSettings::EnableDynamicShadows, "enableDynamicShadows", &GameScriptSettings::EnableDynamicShadows,
"windowed", &GameScriptSettings::Windowed, "windowed", &GameScriptSettings::Windowed,
"enableWaterCaustics", &GameScriptSettings::EnableWaterCaustics, "enableWaterCaustics", &GameScriptSettings::EnableWaterCaustics,

View file

@ -15,7 +15,6 @@ struct GameScriptSettings
bool EnableDynamicShadows; bool EnableDynamicShadows;
bool EnableWaterCaustics; bool EnableWaterCaustics;
bool Windowed; bool Windowed;
std::string WindowTitle;
int DrawingDistance; int DrawingDistance;
bool ShowRendererSteps; bool ShowRendererSteps;
bool ShowDebugInfo; bool ShowDebugInfo;

View file

@ -1,6 +1,7 @@
#pragma once #pragma once
// Define std::string ids // Define std::string ids
#define STRING_WINDOW_TITLE "window_title"
#define STRING_PASSPORT "passport" #define STRING_PASSPORT "passport"
#define STRING_LARA_HOME "lara_home" #define STRING_LARA_HOME "lara_home"
#define STRING_CONTROLS "controls" #define STRING_CONTROLS "controls"

View file

@ -246,7 +246,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
App.WindowHandle = CreateWindowEx( App.WindowHandle = CreateWindowEx(
0, 0,
"TombEngine", "TombEngine",
g_GameFlow->GetSettings()->WindowTitle.c_str(), g_GameFlow->GetString(STRING_WINDOW_TITLE),
WS_OVERLAPPED | WS_CAPTION | WS_MINIMIZEBOX, WS_OVERLAPPED | WS_CAPTION | WS_MINIMIZEBOX,
CW_USEDEFAULT, // TODO: change this to center of screen !!! CW_USEDEFAULT, // TODO: change this to center of screen !!!
CW_USEDEFAULT, CW_USEDEFAULT,

View file

@ -39,6 +39,7 @@
<h2>Classes</h2> <h2>Classes</h2>
<ul class="nowrap"> <ul class="nowrap">
<li><strong>AIObject</strong></li> <li><strong>AIObject</strong></li>
<li><a href="../classes/AudioTrack.html">AudioTrack</a></li>
<li><a href="../classes/CameraInfo.html">CameraInfo</a></li> <li><a href="../classes/CameraInfo.html">CameraInfo</a></li>
<li><a href="../classes/Color.html">Color</a></li> <li><a href="../classes/Color.html">Color</a></li>
<li><a href="../classes/InventoryObject.html">InventoryObject</a></li> <li><a href="../classes/InventoryObject.html">InventoryObject</a></li>
@ -234,7 +235,7 @@
</div> <!-- id="main" --> </div> <!-- id="main" -->
<div id="about"> <div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i> <i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2021-08-12 20:14:56 </i> <i style="float:right;">Last updated 2021-08-15 23:07:28 </i>
</div> <!-- id="about" --> </div> <!-- id="about" -->
</div> <!-- id="container" --> </div> <!-- id="container" -->
</body> </body>

View file

@ -39,6 +39,7 @@
<h2>Classes</h2> <h2>Classes</h2>
<ul class="nowrap"> <ul class="nowrap">
<li><a href="../classes/AIObject.html">AIObject</a></li> <li><a href="../classes/AIObject.html">AIObject</a></li>
<li><a href="../classes/AudioTrack.html">AudioTrack</a></li>
<li><strong>CameraInfo</strong></li> <li><strong>CameraInfo</strong></li>
<li><a href="../classes/Color.html">Color</a></li> <li><a href="../classes/Color.html">Color</a></li>
<li><a href="../classes/InventoryObject.html">InventoryObject</a></li> <li><a href="../classes/InventoryObject.html">InventoryObject</a></li>
@ -144,7 +145,7 @@
</div> <!-- id="main" --> </div> <!-- id="main" -->
<div id="about"> <div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i> <i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2021-08-12 20:14:56 </i> <i style="float:right;">Last updated 2021-08-15 23:07:28 </i>
</div> <!-- id="about" --> </div> <!-- id="about" -->
</div> <!-- id="container" --> </div> <!-- id="container" -->
</body> </body>

View file

@ -41,6 +41,7 @@
<h2>Classes</h2> <h2>Classes</h2>
<ul class="nowrap"> <ul class="nowrap">
<li><a href="../classes/AIObject.html">AIObject</a></li> <li><a href="../classes/AIObject.html">AIObject</a></li>
<li><a href="../classes/AudioTrack.html">AudioTrack</a></li>
<li><a href="../classes/CameraInfo.html">CameraInfo</a></li> <li><a href="../classes/CameraInfo.html">CameraInfo</a></li>
<li><strong>Color</strong></li> <li><strong>Color</strong></li>
<li><a href="../classes/InventoryObject.html">InventoryObject</a></li> <li><a href="../classes/InventoryObject.html">InventoryObject</a></li>
@ -298,7 +299,7 @@
</div> <!-- id="main" --> </div> <!-- id="main" -->
<div id="about"> <div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i> <i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2021-08-12 20:14:56 </i> <i style="float:right;">Last updated 2021-08-15 23:07:28 </i>
</div> <!-- id="about" --> </div> <!-- id="about" -->
</div> <!-- id="container" --> </div> <!-- id="container" -->
</body> </body>

View file

@ -39,6 +39,7 @@
<h2>Classes</h2> <h2>Classes</h2>
<ul class="nowrap"> <ul class="nowrap">
<li><a href="../classes/AIObject.html">AIObject</a></li> <li><a href="../classes/AIObject.html">AIObject</a></li>
<li><a href="../classes/AudioTrack.html">AudioTrack</a></li>
<li><a href="../classes/CameraInfo.html">CameraInfo</a></li> <li><a href="../classes/CameraInfo.html">CameraInfo</a></li>
<li><a href="../classes/Color.html">Color</a></li> <li><a href="../classes/Color.html">Color</a></li>
<li><a href="../classes/InventoryObject.html">InventoryObject</a></li> <li><a href="../classes/InventoryObject.html">InventoryObject</a></li>
@ -336,7 +337,7 @@ EXAMINE_ITEM8_COMBO2
</div> <!-- id="main" --> </div> <!-- id="main" -->
<div id="about"> <div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i> <i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2021-08-12 20:14:56 </i> <i style="float:right;">Last updated 2021-08-15 23:07:28 </i>
</div> <!-- id="about" --> </div> <!-- id="about" -->
</div> <!-- id="container" --> </div> <!-- id="container" -->
</body> </body>

View file

@ -40,6 +40,7 @@
<h2>Classes</h2> <h2>Classes</h2>
<ul class="nowrap"> <ul class="nowrap">
<li><a href="../classes/AIObject.html">AIObject</a></li> <li><a href="../classes/AIObject.html">AIObject</a></li>
<li><a href="../classes/AudioTrack.html">AudioTrack</a></li>
<li><a href="../classes/CameraInfo.html">CameraInfo</a></li> <li><a href="../classes/CameraInfo.html">CameraInfo</a></li>
<li><a href="../classes/Color.html">Color</a></li> <li><a href="../classes/Color.html">Color</a></li>
<li><strong>InventoryObject</strong></li> <li><strong>InventoryObject</strong></li>
@ -337,7 +338,7 @@ associated getters and setters.
</div> <!-- id="main" --> </div> <!-- id="main" -->
<div id="about"> <div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i> <i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2021-08-12 20:14:56 </i> <i style="float:right;">Last updated 2021-08-15 23:07:28 </i>
</div> <!-- id="about" --> </div> <!-- id="about" -->
</div> <!-- id="container" --> </div> <!-- id="container" -->
</body> </body>

View file

@ -40,6 +40,7 @@
<h2>Classes</h2> <h2>Classes</h2>
<ul class="nowrap"> <ul class="nowrap">
<li><a href="../classes/AIObject.html">AIObject</a></li> <li><a href="../classes/AIObject.html">AIObject</a></li>
<li><a href="../classes/AudioTrack.html">AudioTrack</a></li>
<li><a href="../classes/CameraInfo.html">CameraInfo</a></li> <li><a href="../classes/CameraInfo.html">CameraInfo</a></li>
<li><a href="../classes/Color.html">Color</a></li> <li><a href="../classes/Color.html">Color</a></li>
<li><a href="../classes/InventoryObject.html">InventoryObject</a></li> <li><a href="../classes/InventoryObject.html">InventoryObject</a></li>
@ -560,7 +561,7 @@ takes no arguments.
<h3>Usage:</h3> <h3>Usage:</h3>
<ul> <ul>
<pre class="example"><span class="keyword">local</span> item = ItemInfo.newItem( <pre class="example"><span class="keyword">local</span> item = ItemInfo.newItem(
PISTOLS_ITEM, <span class="comment">-- object id ObjID.PISTOLS_ITEM, <span class="comment">-- object id
</span> <span class="string">"test"</span>, <span class="comment">-- name </span> <span class="string">"test"</span>, <span class="comment">-- name
</span> Position.new(<span class="number">18907</span>, <span class="number">0</span>, <span class="number">21201</span>), </span> Position.new(<span class="number">18907</span>, <span class="number">0</span>, <span class="number">21201</span>),
Rotation.new(<span class="number">0</span>,<span class="number">0</span>,<span class="number">0</span>), Rotation.new(<span class="number">0</span>,<span class="number">0</span>,<span class="number">0</span>),
@ -653,7 +654,7 @@ Use this if you called new with no arguments
</div> <!-- id="main" --> </div> <!-- id="main" -->
<div id="about"> <div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i> <i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2021-08-12 20:14:56 </i> <i style="float:right;">Last updated 2021-08-15 23:07:28 </i>
</div> <!-- id="about" --> </div> <!-- id="about" -->
</div> <!-- id="container" --> </div> <!-- id="container" -->
</body> </body>

View file

@ -40,6 +40,7 @@
<h2>Classes</h2> <h2>Classes</h2>
<ul class="nowrap"> <ul class="nowrap">
<li><a href="../classes/AIObject.html">AIObject</a></li> <li><a href="../classes/AIObject.html">AIObject</a></li>
<li><a href="../classes/AudioTrack.html">AudioTrack</a></li>
<li><a href="../classes/CameraInfo.html">CameraInfo</a></li> <li><a href="../classes/CameraInfo.html">CameraInfo</a></li>
<li><a href="../classes/Color.html">Color</a></li> <li><a href="../classes/Color.html">Color</a></li>
<li><a href="../classes/InventoryObject.html">InventoryObject</a></li> <li><a href="../classes/InventoryObject.html">InventoryObject</a></li>
@ -432,7 +433,7 @@ INVISIBLE
</div> <!-- id="main" --> </div> <!-- id="main" -->
<div id="about"> <div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i> <i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2021-08-12 20:14:56 </i> <i style="float:right;">Last updated 2021-08-15 23:07:28 </i>
</div> <!-- id="about" --> </div> <!-- id="about" -->
</div> <!-- id="container" --> </div> <!-- id="container" -->
</body> </body>

View file

@ -39,6 +39,7 @@
<h2>Classes</h2> <h2>Classes</h2>
<ul class="nowrap"> <ul class="nowrap">
<li><a href="../classes/AIObject.html">AIObject</a></li> <li><a href="../classes/AIObject.html">AIObject</a></li>
<li><a href="../classes/AudioTrack.html">AudioTrack</a></li>
<li><a href="../classes/CameraInfo.html">CameraInfo</a></li> <li><a href="../classes/CameraInfo.html">CameraInfo</a></li>
<li><a href="../classes/Color.html">Color</a></li> <li><a href="../classes/Color.html">Color</a></li>
<li><a href="../classes/InventoryObject.html">InventoryObject</a></li> <li><a href="../classes/InventoryObject.html">InventoryObject</a></li>
@ -198,7 +199,7 @@
</div> <!-- id="main" --> </div> <!-- id="main" -->
<div id="about"> <div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i> <i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2021-08-12 20:14:56 </i> <i style="float:right;">Last updated 2021-08-15 23:07:28 </i>
</div> <!-- id="about" --> </div> <!-- id="about" -->
</div> <!-- id="container" --> </div> <!-- id="container" -->
</body> </body>

View file

@ -35,6 +35,7 @@
<h2>Classes</h2> <h2>Classes</h2>
<ul class="nowrap"> <ul class="nowrap">
<li><a href="../classes/AIObject.html">AIObject</a></li> <li><a href="../classes/AIObject.html">AIObject</a></li>
<li><a href="../classes/AudioTrack.html">AudioTrack</a></li>
<li><a href="../classes/CameraInfo.html">CameraInfo</a></li> <li><a href="../classes/CameraInfo.html">CameraInfo</a></li>
<li><a href="../classes/Color.html">Color</a></li> <li><a href="../classes/Color.html">Color</a></li>
<li><a href="../classes/InventoryObject.html">InventoryObject</a></li> <li><a href="../classes/InventoryObject.html">InventoryObject</a></li>
@ -76,7 +77,7 @@
</div> <!-- id="main" --> </div> <!-- id="main" -->
<div id="about"> <div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i> <i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2021-08-12 20:14:56 </i> <i style="float:right;">Last updated 2021-08-15 23:07:28 </i>
</div> <!-- id="about" --> </div> <!-- id="about" -->
</div> <!-- id="container" --> </div> <!-- id="container" -->
</body> </body>

View file

@ -39,6 +39,7 @@
<h2>Classes</h2> <h2>Classes</h2>
<ul class="nowrap"> <ul class="nowrap">
<li><a href="../classes/AIObject.html">AIObject</a></li> <li><a href="../classes/AIObject.html">AIObject</a></li>
<li><a href="../classes/AudioTrack.html">AudioTrack</a></li>
<li><a href="../classes/CameraInfo.html">CameraInfo</a></li> <li><a href="../classes/CameraInfo.html">CameraInfo</a></li>
<li><a href="../classes/Color.html">Color</a></li> <li><a href="../classes/Color.html">Color</a></li>
<li><a href="../classes/InventoryObject.html">InventoryObject</a></li> <li><a href="../classes/InventoryObject.html">InventoryObject</a></li>
@ -1074,7 +1075,7 @@ PANEL_MIDDLE_CORNER
</div> <!-- id="main" --> </div> <!-- id="main" -->
<div id="about"> <div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i> <i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2021-08-12 20:14:56 </i> <i style="float:right;">Last updated 2021-08-15 23:07:28 </i>
</div> <!-- id="about" --> </div> <!-- id="about" -->
</div> <!-- id="container" --> </div> <!-- id="container" -->
</body> </body>

View file

@ -41,6 +41,7 @@
<h2>Classes</h2> <h2>Classes</h2>
<ul class="nowrap"> <ul class="nowrap">
<li><a href="../classes/AIObject.html">AIObject</a></li> <li><a href="../classes/AIObject.html">AIObject</a></li>
<li><a href="../classes/AudioTrack.html">AudioTrack</a></li>
<li><a href="../classes/CameraInfo.html">CameraInfo</a></li> <li><a href="../classes/CameraInfo.html">CameraInfo</a></li>
<li><a href="../classes/Color.html">Color</a></li> <li><a href="../classes/Color.html">Color</a></li>
<li><a href="../classes/InventoryObject.html">InventoryObject</a></li> <li><a href="../classes/InventoryObject.html">InventoryObject</a></li>
@ -236,7 +237,7 @@
</div> <!-- id="main" --> </div> <!-- id="main" -->
<div id="about"> <div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i> <i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2021-08-12 20:14:56 </i> <i style="float:right;">Last updated 2021-08-15 23:07:28 </i>
</div> <!-- id="about" --> </div> <!-- id="about" -->
</div> <!-- id="container" --> </div> <!-- id="container" -->
</body> </body>

View file

@ -41,6 +41,7 @@
<h2>Classes</h2> <h2>Classes</h2>
<ul class="nowrap"> <ul class="nowrap">
<li><a href="../classes/AIObject.html">AIObject</a></li> <li><a href="../classes/AIObject.html">AIObject</a></li>
<li><a href="../classes/AudioTrack.html">AudioTrack</a></li>
<li><a href="../classes/CameraInfo.html">CameraInfo</a></li> <li><a href="../classes/CameraInfo.html">CameraInfo</a></li>
<li><a href="../classes/Color.html">Color</a></li> <li><a href="../classes/Color.html">Color</a></li>
<li><a href="../classes/InventoryObject.html">InventoryObject</a></li> <li><a href="../classes/InventoryObject.html">InventoryObject</a></li>
@ -235,7 +236,7 @@ angles, in degrees, about each axis.</p>
</div> <!-- id="main" --> </div> <!-- id="main" -->
<div id="about"> <div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i> <i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2021-08-12 20:14:56 </i> <i style="float:right;">Last updated 2021-08-15 23:07:28 </i>
</div> <!-- id="about" --> </div> <!-- id="about" -->
</div> <!-- id="container" --> </div> <!-- id="container" -->
</body> </body>

View file

@ -39,6 +39,7 @@
<h2>Classes</h2> <h2>Classes</h2>
<ul class="nowrap"> <ul class="nowrap">
<li><a href="../classes/AIObject.html">AIObject</a></li> <li><a href="../classes/AIObject.html">AIObject</a></li>
<li><a href="../classes/AudioTrack.html">AudioTrack</a></li>
<li><a href="../classes/CameraInfo.html">CameraInfo</a></li> <li><a href="../classes/CameraInfo.html">CameraInfo</a></li>
<li><a href="../classes/Color.html">Color</a></li> <li><a href="../classes/Color.html">Color</a></li>
<li><a href="../classes/InventoryObject.html">InventoryObject</a></li> <li><a href="../classes/InventoryObject.html">InventoryObject</a></li>
@ -118,7 +119,7 @@
</dt> </dt>
<dd> <dd>
(string) unique string identifier. (string) unique string identifier.
e.g. "door<em>back</em>room" or "cracked<em>greek</em>statue" e.g. "door_back_room" or "cracked_greek_statue"
@ -164,7 +165,7 @@
</div> <!-- id="main" --> </div> <!-- id="main" -->
<div id="about"> <div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i> <i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2021-08-12 20:14:56 </i> <i style="float:right;">Last updated 2021-08-15 23:07:28 </i>
</div> <!-- id="about" --> </div> <!-- id="about" -->
</div> <!-- id="container" --> </div> <!-- id="container" -->
</body> </body>

View file

@ -40,6 +40,7 @@
<h2>Classes</h2> <h2>Classes</h2>
<ul class="nowrap"> <ul class="nowrap">
<li><a href="../classes/AIObject.html">AIObject</a></li> <li><a href="../classes/AIObject.html">AIObject</a></li>
<li><a href="../classes/AudioTrack.html">AudioTrack</a></li>
<li><a href="../classes/CameraInfo.html">CameraInfo</a></li> <li><a href="../classes/CameraInfo.html">CameraInfo</a></li>
<li><a href="../classes/Color.html">Color</a></li> <li><a href="../classes/Color.html">Color</a></li>
<li><a href="../classes/InventoryObject.html">InventoryObject</a></li> <li><a href="../classes/InventoryObject.html">InventoryObject</a></li>
@ -179,7 +180,7 @@ Less is more. City of The Dead, for example, uses a speed value of 16.
</div> <!-- id="main" --> </div> <!-- id="main" -->
<div id="about"> <div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i> <i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2021-08-12 20:14:56 </i> <i style="float:right;">Last updated 2021-08-15 23:07:28 </i>
</div> <!-- id="about" --> </div> <!-- id="about" -->
</div> <!-- id="container" --> </div> <!-- id="container" -->
</body> </body>

View file

@ -39,6 +39,7 @@
<h2>Classes</h2> <h2>Classes</h2>
<ul class="nowrap"> <ul class="nowrap">
<li><a href="../classes/AIObject.html">AIObject</a></li> <li><a href="../classes/AIObject.html">AIObject</a></li>
<li><a href="../classes/AudioTrack.html">AudioTrack</a></li>
<li><a href="../classes/CameraInfo.html">CameraInfo</a></li> <li><a href="../classes/CameraInfo.html">CameraInfo</a></li>
<li><a href="../classes/Color.html">Color</a></li> <li><a href="../classes/Color.html">Color</a></li>
<li><a href="../classes/InventoryObject.html">InventoryObject</a></li> <li><a href="../classes/InventoryObject.html">InventoryObject</a></li>
@ -162,7 +163,7 @@
</div> <!-- id="main" --> </div> <!-- id="main" -->
<div id="about"> <div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i> <i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2021-08-12 20:14:56 </i> <i style="float:right;">Last updated 2021-08-15 23:07:28 </i>
</div> <!-- id="about" --> </div> <!-- id="about" -->
</div> <!-- id="container" --> </div> <!-- id="container" -->
</body> </body>

View file

@ -37,6 +37,7 @@
<h2>Classes</h2> <h2>Classes</h2>
<ul class="nowrap"> <ul class="nowrap">
<li><a href="classes/AIObject.html">AIObject</a></li> <li><a href="classes/AIObject.html">AIObject</a></li>
<li><a href="classes/AudioTrack.html">AudioTrack</a></li>
<li><a href="classes/CameraInfo.html">CameraInfo</a></li> <li><a href="classes/CameraInfo.html">CameraInfo</a></li>
<li><a href="classes/Color.html">Color</a></li> <li><a href="classes/Color.html">Color</a></li>
<li><a href="classes/InventoryObject.html">InventoryObject</a></li> <li><a href="classes/InventoryObject.html">InventoryObject</a></li>
@ -63,7 +64,7 @@
<table class="module_list"> <table class="module_list">
<tr> <tr>
<td class="name" ><a href="modules/gameflow.html">gameflow</a></td> <td class="name" ><a href="modules/gameflow.html">gameflow</a></td>
<td class="summary">Functions to be used in GameFlow.lua</td> <td class="summary">Files that will be run on game startup.</td>
</tr> </tr>
<tr> <tr>
<td class="name" ><a href="modules/gamelogic.html">gamelogic</a></td> <td class="name" ><a href="modules/gamelogic.html">gamelogic</a></td>
@ -76,6 +77,10 @@
<td class="name" ><a href="classes/AIObject.html">AIObject</a></td> <td class="name" ><a href="classes/AIObject.html">AIObject</a></td>
<td class="summary">AI object</td> <td class="summary">AI object</td>
</tr> </tr>
<tr>
<td class="name" ><a href="classes/AudioTrack.html">AudioTrack</a></td>
<td class="summary">Metadata about audio tracks (music and ambience).</td>
</tr>
<tr> <tr>
<td class="name" ><a href="classes/CameraInfo.html">CameraInfo</a></td> <td class="name" ><a href="classes/CameraInfo.html">CameraInfo</a></td>
<td class="summary">Camera info</td> <td class="summary">Camera info</td>
@ -140,7 +145,7 @@ angles, in degrees, about each axis.</td>
</div> <!-- id="main" --> </div> <!-- id="main" -->
<div id="about"> <div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i> <i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2021-08-12 20:14:56 </i> <i style="float:right;">Last updated 2021-08-15 23:07:28 </i>
</div> <!-- id="about" --> </div> <!-- id="about" -->
</div> <!-- id="container" --> </div> <!-- id="container" -->
</body> </body>

View file

@ -32,7 +32,10 @@
<h2>Contents</h2> <h2>Contents</h2>
<ul> <ul>
<li><a href="#Functions">Functions</a></li> <li><a href="#gameflow_lua">gameflow.lua </a></li>
<li><a href="#settings_lua">settings.lua </a></li>
<li><a href="#tracks_lua">tracks.lua </a></li>
<li><a href="#strings_lua">strings.lua </a></li>
</ul> </ul>
@ -44,6 +47,7 @@
<h2>Classes</h2> <h2>Classes</h2>
<ul class="nowrap"> <ul class="nowrap">
<li><a href="../classes/AIObject.html">AIObject</a></li> <li><a href="../classes/AIObject.html">AIObject</a></li>
<li><a href="../classes/AudioTrack.html">AudioTrack</a></li>
<li><a href="../classes/CameraInfo.html">CameraInfo</a></li> <li><a href="../classes/CameraInfo.html">CameraInfo</a></li>
<li><a href="../classes/Color.html">Color</a></li> <li><a href="../classes/Color.html">Color</a></li>
<li><a href="../classes/InventoryObject.html">InventoryObject</a></li> <li><a href="../classes/InventoryObject.html">InventoryObject</a></li>
@ -65,13 +69,13 @@
<div id="content"> <div id="content">
<h1>Module <code>gameflow</code></h1> <h1>Module <code>gameflow</code></h1>
<p>Functions to be used in GameFlow.lua</p> <p>Files that will be run on game startup.</p>
<p> <p>
</p> </p>
<h2><a href="#Functions">Functions</a></h2> <h2><a href="#gameflow_lua">gameflow.lua </a></h2>
<table class="function_list"> <table class="function_list">
<tr> <tr>
<td class="name" ><a href="#AddLevel">AddLevel (level)</a></td> <td class="name" ><a href="#AddLevel">AddLevel (level)</a></td>
@ -85,29 +89,39 @@
<td class="name" ><a href="#SetTitleScreenImagePath">SetTitleScreenImagePath (path)</a></td> <td class="name" ><a href="#SetTitleScreenImagePath">SetTitleScreenImagePath (path)</a></td>
<td class="summary">The path of the .jpg or .png image to show in the background of the title screen.</td> <td class="summary">The path of the .jpg or .png image to show in the background of the title screen.</td>
</tr> </tr>
<tr>
<td class="name" ><a href="#SetWindowTitleKey">SetWindowTitleKey (string)</a></td>
<td class="summary">The string ID of the title of the game
<strong>(not yet implemented)</strong></td>
</tr>
</table>
<h2><a href="#settings_lua">settings.lua </a></h2>
<table class="function_list">
<tr>
<td class="name" ><a href="#SetSettings">SetSettings (settings)</a></td>
<td class="summary">
</td>
</tr>
</table>
<h2><a href="#tracks_lua">tracks.lua </a></h2>
<table class="function_list">
<tr> <tr>
<td class="name" ><a href="#SetAudioTracks">SetAudioTracks (table)</a></td> <td class="name" ><a href="#SetAudioTracks">SetAudioTracks (table)</a></td>
<td class="summary"> <td class="summary">
</td> </td>
</tr> </tr>
</table>
<h2><a href="#strings_lua">strings.lua </a></h2>
<table class="function_list">
<tr> <tr>
<td class="name" ><a href="#SetStrings">SetStrings (table)</a></td> <td class="name" ><a href="#SetStrings">SetStrings (table)</a></td>
<td class="summary"> <td class="summary">Set string variable keys and their translations.</td>
</td>
</tr> </tr>
<tr> <tr>
<td class="name" ><a href="#SetLanguageNames">SetLanguageNames (table)</a></td> <td class="name" ><a href="#SetLanguageNames">SetLanguageNames (table)</a></td>
<td class="summary"> <td class="summary">Specify which translations in the strings table correspond to which languages.</td>
</td>
</tr>
<tr>
<td class="name" ><a href="#SetSettings">SetSettings (table)</a></td>
<td class="summary">
</td>
</tr> </tr>
</table> </table>
@ -115,8 +129,13 @@
<br/> <br/>
<h2 class="section-header "><a name="Functions"></a>Functions</h2> <h2 class="section-header has-description"><a name="gameflow_lua"></a>gameflow.lua </h2>
Methods
<div class="section-description">
These functions are called in gameflow.lua, a file loosely equivalent to winroomedit's SCRIPT.DAT.
They handle a game's 'metadata'; i.e., things such as level titles, loading screen paths, and default
ambient tracks.
</div>
<dl class="function"> <dl class="function">
<dt> <dt>
<a name = "AddLevel"></a> <a name = "AddLevel"></a>
@ -129,6 +148,7 @@
<h3>Parameters:</h3> <h3>Parameters:</h3>
<ul> <ul>
<li><span class="parameter">level</span> <li><span class="parameter">level</span>
<span class="types"><a class="type" href="../classes/Level.html#">Level</a></span>
a level object a level object
</li> </li>
</ul> </ul>
@ -181,6 +201,66 @@
</dd> </dd>
<dt>
<a name = "SetWindowTitleKey"></a>
<strong>SetWindowTitleKey (string)</strong>
</dt>
<dd>
The string ID of the title of the game
<strong>(not yet implemented)</strong>
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">string</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.4">string</a></span>
ID of the title as set in TombIDE.
</li>
</ul>
</dd>
</dl>
<h2 class="section-header has-description"><a name="settings_lua"></a>settings.lua </h2>
<div class="section-description">
These functions are called in settings.lua, a file which holds your local settings.
settings.lua shouldn't be bundled with any finished levels/games.
</div>
<dl class="function">
<dt>
<a name = "SetSettings"></a>
<strong>SetSettings (settings)</strong>
</dt>
<dd>
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">settings</span>
<span class="types"><span class="type">Settings</span></span>
a settings object
</li>
</ul>
</dd>
</dl>
<h2 class="section-header has-description"><a name="tracks_lua"></a>tracks.lua </h2>
<div class="section-description">
<strong>TODO CONFIRM PROPER BEHAVIOUR</strong>
</div>
<dl class="function">
<dt> <dt>
<a name = "SetAudioTracks"></a> <a name = "SetAudioTracks"></a>
<strong>SetAudioTracks (table)</strong> <strong>SetAudioTracks (table)</strong>
@ -195,7 +275,7 @@
<ul> <ul>
<li><span class="parameter">table</span> <li><span class="parameter">table</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.6">table</a></span> <span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.6">table</a></span>
array-style table with ??? objects array-style table with <a href="../classes/AudioTrack.html#">AudioTrack</a> objects
</li> </li>
</ul> </ul>
@ -204,14 +284,21 @@
</dd> </dd>
</dl>
<h2 class="section-header has-description"><a name="strings_lua"></a>strings.lua </h2>
<div class="section-description">
These functions used in strings.lua, which is generated by TombIDE.
You will not need to call them manually.
</div>
<dl class="function">
<dt> <dt>
<a name = "SetStrings"></a> <a name = "SetStrings"></a>
<strong>SetStrings (table)</strong> <strong>SetStrings (table)</strong>
</dt> </dt>
<dd> <dd>
Set string variable keys and their translations.
<h3>Parameters:</h3> <h3>Parameters:</h3>
@ -232,39 +319,14 @@
<strong>SetLanguageNames (table)</strong> <strong>SetLanguageNames (table)</strong>
</dt> </dt>
<dd> <dd>
Specify which translations in the strings table correspond to which languages.
<h3>Parameters:</h3> <h3>Parameters:</h3>
<ul> <ul>
<li><span class="parameter">table</span> <li><span class="parameter">table</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.6">table</a></span> <span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.6">table</a></span>
array-style table with TODO EXTRA INFO HERE array-style table with language names
</li>
</ul>
</dd>
<dt>
<a name = "SetSettings"></a>
<strong>SetSettings (table)</strong>
</dt>
<dd>
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">table</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.6">table</a></span>
array-style table with TODO EXTRA INFO HERE
</li> </li>
</ul> </ul>
@ -280,7 +342,7 @@
</div> <!-- id="main" --> </div> <!-- id="main" -->
<div id="about"> <div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i> <i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2021-08-12 20:14:56 </i> <i style="float:right;">Last updated 2021-08-15 23:07:28 </i>
</div> <!-- id="about" --> </div> <!-- id="about" -->
</div> <!-- id="container" --> </div> <!-- id="container" -->
</body> </body>

View file

@ -48,6 +48,7 @@
<h2>Classes</h2> <h2>Classes</h2>
<ul class="nowrap"> <ul class="nowrap">
<li><a href="../classes/AIObject.html">AIObject</a></li> <li><a href="../classes/AIObject.html">AIObject</a></li>
<li><a href="../classes/AudioTrack.html">AudioTrack</a></li>
<li><a href="../classes/CameraInfo.html">CameraInfo</a></li> <li><a href="../classes/CameraInfo.html">CameraInfo</a></li>
<li><a href="../classes/Color.html">Color</a></li> <li><a href="../classes/Color.html">Color</a></li>
<li><a href="../classes/InventoryObject.html">InventoryObject</a></li> <li><a href="../classes/InventoryObject.html">InventoryObject</a></li>
@ -676,7 +677,7 @@ and provides the delta time (a float representing game time since last call) via
</div> <!-- id="main" --> </div> <!-- id="main" -->
<div id="about"> <div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i> <i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2021-08-12 20:14:56 </i> <i style="float:right;">Last updated 2021-08-15 23:07:28 </i>
</div> <!-- id="about" --> </div> <!-- id="about" -->
</div> <!-- id="container" --> </div> <!-- id="container" -->
</body> </body>