TombEngine/doc/classes/Level.html

519 lines
12 KiB
HTML
Raw Normal View History

2021-08-12 20:16:28 +01:00
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>Reference</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
<div id="container">
<div id="product">
<div id="product_logo"></div>
<div id="product_name"><big><b></b></big></div>
<div id="product_description"></div>
</div> <!-- id="product" -->
<div id="main">
<!-- Menu -->
<div id="navigation">
<br/>
<h1>TombEngine</h1>
<ul>
<li><a href="../index.html">Index</a></li>
</ul>
<h2>Contents</h2>
<ul>
<li><a href="#Members">Members</a></li>
<li><a href="#Functions">Functions</a></li>
</ul>
<h2>Classes</h2>
<ul class="nowrap">
<li><a href="../classes/AIObject.html">AIObject</a></li>
2021-08-15 23:08:05 +01:00
<li><a href="../classes/AudioTrack.html">AudioTrack</a></li>
2021-08-12 20:16:28 +01:00
<li><a href="../classes/CameraInfo.html">CameraInfo</a></li>
<li><a href="../classes/Color.html">Color</a></li>
<li><a href="../classes/InventoryObject.html">InventoryObject</a></li>
<li><a href="../classes/ItemInfo.html">ItemInfo</a></li>
<li><strong>Level</strong></li>
<li><a href="../classes/MeshInfo.html">MeshInfo</a></li>
<li><a href="../classes/Mirror.html">Mirror</a></li>
<li><a href="../classes/Position.html">Position</a></li>
<li><a href="../classes/Rotation.html">Rotation</a></li>
2021-08-16 12:55:22 +01:00
<li><a href="../classes/Settings.html">Settings</a></li>
2021-08-12 20:16:28 +01:00
<li><a href="../classes/SinkInfo.html">SinkInfo</a></li>
<li><a href="../classes/SkyLayer.html">SkyLayer</a></li>
<li><a href="../classes/SoundSourceInfo.html">SoundSourceInfo</a></li>
<li><a href="../classes/InvItem.html">InvItem</a></li>
<li><a href="../classes/ObjID.html">ObjID</a></li>
</ul>
<h2>Modules</h2>
<ul class="nowrap">
<li><a href="../modules/gameflow.html">gameflow</a></li>
<li><a href="../modules/gamelogic.html">gamelogic</a></li>
</ul>
</div>
<div id="content">
<h1>Class <code>Level</code></h1>
<p>A container for level metadata - things which aren't present in the compiled
level file itself.</p>
<p>
</p>
<h2><a href="#Members">Members</a></h2>
<table class="function_list">
<tr>
<td class="name" ><a href="#Level.nameKey">Level.nameKey</a></td>
<td class="summary">(string) string key for the level's (localised) name.</td>
</tr>
<tr>
<td class="name" ><a href="#Level.scriptFile">Level.scriptFile</a></td>
<td class="summary">(string) path of the Lua file holding the level's logic script, relative to the location of the tombengine executable</td>
</tr>
<tr>
<td class="name" ><a href="#Level.levelFile">Level.levelFile</a></td>
<td class="summary">(string) path of the compiled level file, relative to the location of the tombengine executable</td>
</tr>
<tr>
<td class="name" ><a href="#Level.loadScreenFile">Level.loadScreenFile</a></td>
<td class="summary">(string) path of the level's load screen file (.png or .jpg), relative to the location of the tombengine executable</td>
</tr>
<tr>
<td class="name" ><a href="#Level.ambientTrack">Level.ambientTrack</a></td>
<td class="summary">(string) initial ambient sound track to play - this is the filename of the track <strong>without</strong> the .wav extension</td>
</tr>
<tr>
<td class="name" ><a href="#Level.layer1">Level.layer1</a></td>
<td class="summary">(<a href="../classes/SkyLayer.html#">SkyLayer</a>) Primary sky layer</td>
</tr>
<tr>
<td class="name" ><a href="#Level.layer2">Level.layer2</a></td>
<td class="summary">(<a href="../classes/SkyLayer.html#">SkyLayer</a>) Secondary sky layer <strong>(not yet implemented)</strong></td>
</tr>
<tr>
<td class="name" ><a href="#Level.fog">Level.fog</a></td>
<td class="summary">(<a href="../classes/Color.html#">Color</a>) distance fog RGB color (as seen in TR4's Desert Railroad).</td>
</tr>
<tr>
<td class="name" ><a href="#Level.horizon">Level.horizon</a></td>
<td class="summary">(bool) if set to true, the horizon and sky layer will be drawn; if set to false; they won't.</td>
</tr>
<tr>
<td class="name" ><a href="#Level.colAddHorizon">Level.colAddHorizon</a></td>
<td class="summary">(bool) if true, the horizon graphic will transition smoothly to the sky layer.</td>
</tr>
<tr>
<td class="name" ><a href="#Level.storm">Level.storm</a></td>
<td class="summary">(bool) equivalent to classic TRLE's LIGHTNING setting.</td>
</tr>
<tr>
<td class="name" ><a href="#Level.weather">Level.weather</a></td>
<td class="summary">(WeatherType) Must be one of the values WeatherType.NORMAL, WeatherType.RAIN, or WeatherType.SNOW.</td>
</tr>
<tr>
<td class="name" ><a href="#Level.laraType">Level.laraType</a></td>
<td class="summary">(LaraType) Must be one of the LaraType values.</td>
</tr>
<tr>
<td class="name" ><a href="#Level.rumble">Level.rumble</a></td>
<td class="summary">(bool) If true, an occasional screen shake effect (as seen in TRC's Sinking Submarine) will
happen throughout the level.</td>
</tr>
<tr>
<td class="name" ><a href="#Level.mirror">Level.mirror</a></td>
<td class="summary">(<a href="../classes/Mirror.html#">Mirror</a>) object holding the location and size of the room's mirror, if present.</td>
</tr>
<tr>
<td class="name" ><a href="#Level.UVRotate">Level.UVRotate</a></td>
<td class="summary">(byte) Default speed of "UVRotate" animated textures.</td>
</tr>
<tr>
<td class="name" ><a href="#Level.farView">Level.farView</a></td>
<td class="summary">(byte) The maximum draw distance, in sectors (blocks), of this particular level.</td>
</tr>
<tr>
<td class="name" ><a href="#Level.unlimitedAir">Level.unlimitedAir</a></td>
<td class="summary">(bool) If true, the player will have an unlimited oxygen supply when in water.</td>
</tr>
<tr>
2021-08-12 20:16:28 +01:00
<td class="name" ><a href="#Level.objects">Level.objects</a></td>
<td class="summary">(table of <a href="../classes/InventoryObject.html#">InventoryObject</a>s) table of inventory object overrides</td>
</tr>
</table>
<h2><a href="#Functions">Functions</a></h2>
<table class="function_list">
<tr>
<td class="name" ><a href="#Level.new">Level.new ()</a></td>
<td class="summary">Make a new Level object.</td>
</tr>
</table>
<br/>
<br/>
<h2 class="section-header "><a name="Members"></a>Members</h2>
<dl class="function">
<dt>
<a name = "Level.nameKey"></a>
<strong>Level.nameKey</strong>
</dt>
<dd>
(string) string key for the level's (localised) name. Corresponds to an entry in strings.lua.
</dd>
<dt>
<a name = "Level.scriptFile"></a>
<strong>Level.scriptFile</strong>
</dt>
<dd>
(string) path of the Lua file holding the level's logic script, relative to the location of the tombengine executable
</dd>
<dt>
<a name = "Level.levelFile"></a>
<strong>Level.levelFile</strong>
</dt>
<dd>
(string) path of the compiled level file, relative to the location of the tombengine executable
</dd>
<dt>
<a name = "Level.loadScreenFile"></a>
<strong>Level.loadScreenFile</strong>
</dt>
<dd>
(string) path of the level's load screen file (.png or .jpg), relative to the location of the tombengine executable
</dd>
<dt>
<a name = "Level.ambientTrack"></a>
<strong>Level.ambientTrack</strong>
</dt>
<dd>
(string) initial ambient sound track to play - this is the filename of the track <strong>without</strong> the .wav extension
</dd>
<dt>
<a name = "Level.layer1"></a>
<strong>Level.layer1</strong>
</dt>
<dd>
(<a href="../classes/SkyLayer.html#">SkyLayer</a>) Primary sky layer
</dd>
<dt>
<a name = "Level.layer2"></a>
<strong>Level.layer2</strong>
</dt>
<dd>
(<a href="../classes/SkyLayer.html#">SkyLayer</a>) Secondary sky layer <strong>(not yet implemented)</strong>
</dd>
<dt>
<a name = "Level.fog"></a>
<strong>Level.fog</strong>
</dt>
<dd>
(<a href="../classes/Color.html#">Color</a>) distance fog RGB color (as seen in TR4's Desert Railroad).
If not provided, distance fog will be black.</p>
<p> <strong>(not yet implemented)</strong>
2021-08-12 20:16:28 +01:00
</dd>
<dt>
<a name = "Level.horizon"></a>
<strong>Level.horizon</strong>
</dt>
<dd>
(bool) if set to true, the horizon and sky layer will be drawn; if set to false; they won't.
</dd>
<dt>
<a name = "Level.colAddHorizon"></a>
<strong>Level.colAddHorizon</strong>
</dt>
<dd>
(bool) if true, the horizon graphic will transition smoothly to the sky layer.
If set to false, there will be a black band between the two.</p>
<p> <strong>(not yet implemented)</strong>
2021-08-12 20:16:28 +01:00
</dd>
<dt>
<a name = "Level.storm"></a>
<strong>Level.storm</strong>
</dt>
<dd>
(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.</p>
<p> <strong>(thunder sounds not yet implemented)</strong>
2021-08-12 20:16:28 +01:00
</dd>
<dt>
<a name = "Level.weather"></a>
<strong>Level.weather</strong>
</dt>
<dd>
(WeatherType) Must be one of the values WeatherType.NORMAL, WeatherType.RAIN, or WeatherType.SNOW. </p>
<p> <strong>(not yet implemented)</strong>
2021-08-12 20:16:28 +01:00
</dd>
<dt>
<a name = "Level.laraType"></a>
<strong>Level.laraType</strong>
</dt>
<dd>
(LaraType) Must be one of the LaraType values.
These are:</p>
<pre><code>NORMAL
YOUNG
BUNHEAD
CATSUIT
DIVESUIT
INVISIBLE
</code></pre>
<p>e.g. <code>myLevel.laraType = LaraType.DIVESUIT</code></p>
<p> <strong>(not yet fully implemented)</strong>
</dd>
<dt>
<a name = "Level.rumble"></a>
<strong>Level.rumble</strong>
</dt>
<dd>
(bool) If true, an occasional screen shake effect (as seen in TRC's Sinking Submarine) will
happen throughout the level.
</dd>
<dt>
<a name = "Level.mirror"></a>
<strong>Level.mirror</strong>
</dt>
<dd>
(<a href="../classes/Mirror.html#">Mirror</a>) object holding the location and size of the room's mirror, if present. </p>
<p> <strong>(not yet implemented)</strong>
</dd>
<dt>
<a name = "Level.UVRotate"></a>
<strong>Level.UVRotate</strong>
</dt>
<dd>
(byte) Default speed of "UVRotate" animated textures. </p>
<p>Must be in the range [-64, 64].</p>
<p>A level texture can be set in Tomb Editor to use "UVRotate" animation.
This gives the effect of the texture looping downwards or upwards in place.
Positive values will cause the texture to loop downwards, and negative values
will cause an upwards loop. The higher a positive number or the lower a negative
number, the faster the scroll will be.</p>
<p><strong>(not yet implemented)</strong>
</dd>
<dt>
<a name = "Level.farView"></a>
<strong>Level.farView</strong>
</dt>
<dd>
(byte) The maximum draw distance, in sectors (blocks), of this particular level. </p>
<p>Must be in the range [1, 127], and equal to or less than the value passed to SetGameFarView.</p>
<p>This is equivalent to TRNG's LevelFarView variable.</p>
<p><strong>(not yet implemented)</strong>
2021-08-12 20:16:28 +01:00
</dd>
<dt>
<a name = "Level.unlimitedAir"></a>
<strong>Level.unlimitedAir</strong>
</dt>
<dd>
(bool) If true, the player will have an unlimited oxygen supply when in water. </p>
<p> <strong>(not yet implemented)</strong>
2021-08-12 20:16:28 +01:00
</dd>
<dt>
<a name = "Level.objects"></a>
<strong>Level.objects</strong>
</dt>
<dd>
(table of <a href="../classes/InventoryObject.html#">InventoryObject</a>s) table of inventory object overrides
</dd>
</dl>
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
Methods
<dl class="function">
<dt>
<a name = "Level.new"></a>
<strong>Level.new ()</strong>
</dt>
<dd>
Make a new Level object.
<h3>Returns:</h3>
<ol>
a Level object
</ol>
</dd>
</dl>
</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2021-08-20 01:47:29 </i>
2021-08-12 20:16:28 +01:00
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>