Merge branch 'develop' into develop_mirrors;

Added correct lights to reflected items;
This commit is contained in:
MontyTRC89 2024-12-05 11:54:59 +01:00
commit 2218dd3179
165 changed files with 2298 additions and 3666 deletions

View file

@ -15,11 +15,13 @@ TombEngine releases are located in this repository (alongside with Tomb Editor):
* Fixed stutter during jumps between cameras in a flyby sequence.
* Fixed uzi targeting issues after using flycheat.
* Fixed snow particles not always melting on the ground.
* Fixed enemies not damaging Lara if she is staying on the sector where enemies were triggered.
* Fixed enemy pickups dropping on death sectors.
* Fixed Sarcophagus and Search Object pickup triggers.
* Fixed vehicle transfer not happening for levels which were not previously visited.
* Fixed audio tracks placed in subfolders not restoring after loading savegame.
* Fixed initial position and lack of fade-in for looped audio track on level start.
* Fixed shatter debris spawning on incorrect position for the first frame.
* Fixed scripted input events not registering on the same game frame.
* Fixed incorrect object camera position.
* Fixed incorrect camera movement near walls after leaving look mode.
@ -28,9 +30,11 @@ TombEngine releases are located in this repository (alongside with Tomb Editor):
* Fixed exploding TR3 bosses.
* Fixed original issue with deactivation of Dart Emitter.
* Fixed Lens Flare object not functioning properly.
* Fixed lens flares not being occluded by static meshes and moveables.
* Fixed spotlight shadows.
* Fixed Skeleton and Mummy not reacting to shotgun hits.
### Features/Amendments
### New Features
* Added fast savegame reloading.
* Added ricochet sounds and make the effect more prominent.
* Allow to run the engine without title level.
@ -39,14 +43,22 @@ TombEngine releases are located in this repository (alongside with Tomb Editor):
### Lua API changes
* Added Moveable:GetCollidable() and Moveable:SetCollidable() functions.
* Added Flow.GetFreezeMode() and Flow.SetFreezeMode() functions.
* Added Flow.GetNextLevel() function to get script entry for incoming level, if it's about to start.
* Added Effects.EmitSpotLight() function for directional spotlights.
* Added optional cast shadow and name parameters for Effects.EmitLight() function.
* Added Effects.GetWind() function to get current wind speed vector.
* Added Rotation:Direction() method to get directional vector.
* Added support for transparency value in DisplayString class.
* Added extra argument for SetAmbientTrack() function to specify if new ambient track should play from the beginning.
* Use load camera instead of load screen by playing fixed camera from OnEnd() event and removing loadScreenFile field from level's gameflow entry.
* Fixed DisplayString class not supporting empty lines in multiline strings.
* Fixed DisplayString class not supporting some Unicode characters and empty lines in multiline strings.
* Fixed DisplayString not being deallocated after showing.
* Fixed incorrect behaviour of Moveable:GetJointRotation() function.
* Fixed incorrect behaviour of Logic.EnableEvent() and Logic.DisableEvent() functions.
* Fixed Util.HasLineOfSight() not taking static meshes into consideration.
* Fixed collision callbacks not properly clearing after leveljump.
* Fixed SetIntroImagePath() not using the correct path
## [Version 1.5](https://github.com/TombEngine/TombEditorReleases/releases/tag/v1.7.2) - 2024-11-03
@ -88,7 +100,7 @@ TombEngine releases are located in this repository (alongside with Tomb Editor):
* Fixed display sprites and display strings rendering in the inventory background.
* Fixed young Lara hair drawing. https://tombengine.com/docs/level-settings/#young_lara
### Features/Amendments
### New Features
* Added high framerate mode (also known as 60 FPS mode).
* Added a customisable global lensflare effect. https://tombengine.com/docs/level-settings/#lensflare
* Added a customisable starry sky and meteor effect. https://tombengine.com/docs/level-settings/#stars
@ -148,7 +160,7 @@ TombEngine releases are located in this repository (alongside with Tomb Editor):
* Fixed bottom collision for solid static meshes.
* Fixed T-Rex's head rotation.
### Features/Amendments
### New Features
* Auto-switch to a crawl state if player start position is in a crawlspace.
* Allow directional flame emitter (negative OCBs) to be rotated at any angle.
* Revise wall spikes:
@ -195,7 +207,7 @@ TombEngine releases are located in this repository (alongside with Tomb Editor):
* Fixed incorrect light collection in some cases.
* Fixed normal mapping for rooms, items, and statics.'
### Features/Amendments
### New Features
* Added ambient occlusion (SSAO).
* Added new post-process workflow (monochrome, negative, exclusion) with tinting.
* Added SMAA antialiasing instead of MSAA.
@ -254,7 +266,7 @@ TombEngine releases are located in this repository (alongside with Tomb Editor):
* Fix camera snap when disengaging the look-around mode.
* Fix TR4 mapper not being visible.
### Features/Amendments
### New Features
* Improve head-on wall collision.
* Overhaul pushables:
- Separate climbable and non-climbable pushable object slots.
@ -337,7 +349,7 @@ TombEngine releases are located in this repository (alongside with Tomb Editor):
* Fix incorrect culling for scaled static meshes.
* Fix normal mapping.
### Features/Amendments
### New Features
* Add ability to save screenshot in the "Screenshots" subfolder by pressing the "Print screen" key.
* Implement separate audio track channel for playing voiceovers with subtitles in .srt format.
* Don't stop ambience when Lara dies.
@ -385,7 +397,7 @@ TombEngine releases are located in this repository (alongside with Tomb Editor):
* Fix rendering for static meshes with custom blending modes and alpha transparency.
* Fix inconsistent multiline string spacing on different display modes.
### Features/Amendments
### New Features
* Remove search object 4 hardcoded meshswap activated with a flipmap.
* Add TR1 cowboy.
* Add TR3 wall mounted blade.
@ -443,7 +455,7 @@ TombEngine releases are located in this repository (alongside with Tomb Editor):
- Please note you must use the patched version found here: https://github.com/TombEngine/Resources/blob/main/Wad2%20Objects/tr5_Imp.wad2
* Fix and improve wraith tails.
### Features/Amedments
### New Features/Amedments
* Add dedicated WRAITH_TRAP object with enhanced effects.
- OCB 0: Effect disabled.
- OCB 1: Effect enabled.
@ -492,7 +504,7 @@ TombEngine releases are located in this repository (alongside with Tomb Editor):
* Fix TR3 big gun spawning rocket with 0 life which caused an immediate explosion.
* Fix TR3 Tony and add boss effect for him.
### Features/Amendments
### New Features
* Add TR3 civvy.
* Add TR3 electric cleaner.
* Add TR3 Sophia Leigh with following OCBs:
@ -544,7 +556,7 @@ TombEngine releases are located in this repository (alongside with Tomb Editor):
* Fix grenade and rocket launcher lighting.
* Fix ceiling trapdoor and floor trapdoor that Lara couldn't open manually.
### Features/Amendments
### New Features
* Make enemies drop pickups at first available bounding box corner point, not centerpoint.
* Restore original volumetric explosion effects.
* Add TR3 lizard and Puna.
@ -596,7 +608,7 @@ TombEngine releases are located in this repository (alongside with Tomb Editor):
* Fix bone rotations of some entities.
* Fix Lara's animation for cog switch release.
### Features/Amendments
### New Features
* Added new OCB to cog switch object:
- Use OCB 0 to have the traditional behaviour.
- Use any other OCB to can use the Cog Switch without need of any door linked.
@ -610,7 +622,7 @@ TombEngine releases are located in this repository (alongside with Tomb Editor):
## [Version 1.0.4](https://github.com/TombEngine/TombEditorReleases/releases/tag/v1.6.2) - 2022-12-16
### Features/Amendments
### New Features
* Add generic assignable effects for moveables - fire, sparks, smoke and laser / electric ignite.
* Add ability to burn enemies with FLAME_EMITTER_1 and death blocks.
* Add wireframe mode and other visual debug information (switch by F10/F11 debug page scroll hotkeys).
@ -682,7 +694,7 @@ TombEngine releases are located in this repository (alongside with Tomb Editor):
## [Version 1.0.3](https://github.com/TombEngine/TombEditorReleases/releases/tag/v1.6.1) - 2022-11-18
### Features/Amendments
### New Features
* Add ledge jumps (Lara object must be updated with new animations to make it work).
* Allow any object slot to be used as a meshswap.
* Add OCB 1 for rollingball to make it silent.
@ -750,7 +762,7 @@ TombEngine releases are located in this repository (alongside with Tomb Editor):
## [Version 1.0.2](https://github.com/TombEngine/TombEditorReleases/releases/tag/v1.6) - 2022-09-16
### Features/Amendments
### New Features
* Fix removing Pistols with TakeItem and SetItemCount.
* Allow saving and loading of Vec3s in LevelVars and GameVars.
* Support volume triggers made with node editor.
@ -805,7 +817,7 @@ TombEngine releases are located in this repository (alongside with Tomb Editor):
## [Version 1.0.1](https://github.com/TombEngine/TombEditorReleases/releases/tag/v1.5.2) - 2022-08-16
### Features
### New Features
* Added antialiasing support.
* Added static mesh scaling support.
* Added free rotation for teeth spikes instead of using OCB codes.

View file

@ -370,6 +370,30 @@ Leave them as is. This is good: `auto x = std::vector<int>();`
Use `//`-styled comments where possible.
Only use `/* */` style in case you are about to temporarily comment certain block for testing purposes or when writing a comment that will serve as the source for generated documentation.
Use a `NOTE: ` prefix in your comment if you want to highlight something particularly noteworthy:
```c
// NOTE: Will not work for bones at ends of hierarchies.
float GetBoneLength(GAME_OBJECT_ID objectID, int boneIndex)
{
const auto& object = Objects[objectID];
if (object.nmeshes == boneIndex)
return 0.0f;
auto nextBoneOffset = GetJointOffset(objectID, boneIndex + 1);
return nextBoneOffset.Length();
}
```
Use a `FAILSAFE: ` prefix in your comment if you want to highlight a particularly quirky solution without an obvious and clear purpose:
```c
if (portalRoomNumber != NO_VALUE &&
rayRoomNumber != portalRoomNumber) // FAILSAFE: Prevent infinite loop if room portal leads back to itself.
{
player.Explode();
}
```
## Branches and pull requests
Make sure that epic branches (tens or hundreds of files changed due to renames, namespace wrappings, etc) **are focused on a single feature or task**. Don't jump in to others epic branches with another round of your epic changes. It masks bugs and makes review process very cumbersome.

View file

@ -1,8 +1,11 @@
@echo off
setlocal
set DOC_DIR=.\doc
set LDOC_DIR=.\compiler\ldoc
set LUA_PATH=.\compiler\?.lua
set LUA_CPATH=.\compiler\?.dll
rmdir /s /q %DOC_DIR%
mkdir %DOC_DIR%
.\compiler\lua.exe %LDOC_DIR%\\ldoc.lua %*
del output.xml
exit /b %ERRORLEVEL%

View file

@ -12,7 +12,7 @@ new_type("luautil", "5 Lua utility modules", true)
not_luadoc = true
local version = "1.6 (Developer Version)"
local version = "1.6"
project = "TombEngine"
title = "TombEngine " .. version .. " Lua API"
description = "TombEngine " .. version .. " scripting interface"

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.6 (Developer Version) Lua API</title>
<title>TombEngine 1.6 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -77,6 +77,7 @@
<ul class="nowrap">
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.FreezeMode.html">Flow.FreezeMode</a></li>
<li> <a href="../4 enums/Flow.GameStatus.html">Flow.GameStatus</a></li>
<li> <a href="../4 enums/Input.ActionID.html">Input.ActionID</a></li>
<li> <a href="../4 enums/Objects.AmmoType.html">Objects.AmmoType</a></li>
@ -124,10 +125,14 @@
<td class="summary">Emit a shockwave, similar to that seen when a harpy projectile hits something.</td>
</tr>
<tr>
<td class="name" ><a href="#EmitLight">EmitLight(pos, color, radius)</a></td>
<td class="name" ><a href="#EmitLight">EmitLight(pos[, color][, radius][, shadows][, name])</a></td>
<td class="summary">Emit dynamic light that lasts for a single frame.</td>
</tr>
<tr>
<td class="name" ><a href="#EmitSpotLight">EmitSpotLight(pos, dir[, color][, radius][, falloff][, distance][, shadows][, name])</a></td>
<td class="summary">Emit dynamic directional spotlight that lasts for a single frame.</td>
</tr>
<tr>
<td class="name" ><a href="#EmitBlood">EmitBlood(pos, count)</a></td>
<td class="summary">Emit blood.</td>
</tr>
@ -362,7 +367,7 @@
</dd>
<dt>
<a name = "EmitLight"></a>
<strong>EmitLight(pos, color, radius)</strong>
<strong>EmitLight(pos[, color][, radius][, shadows][, name])</strong>
</dt>
<dd>
Emit dynamic light that lasts for a single frame.
@ -374,17 +379,84 @@
<ul>
<li><span class="parameter">pos</span>
<span class="types"><a class="type" href="../3 primitive classes/Vec3.html#">Vec3</a></span>
position of the light
</li>
<li><span class="parameter">color</span>
<span class="types"><a class="type" href="../3 primitive classes/Color.html#">Color</a></span>
light color (default Color(255, 255, 255))
(<em>optional</em>)
</li>
<li><span class="parameter">radius</span>
<span class="types"><span class="type">int</span></span>
measured in "clicks" or 256 world units (default 20)
(<em>optional</em>)
</li>
<li><span class="parameter">shadows</span>
<span class="types"><span class="type">bool</span></span>
determines whether light should generate dynamic shadows for applicable moveables (default is false)
(<em>optional</em>)
</li>
<li><span class="parameter">name</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.4/manual.html#6.4">string</a></span>
if provided, engine will interpolate this light for high framerate mode (be careful not to use same name for different lights)
(<em>optional</em>)
</li>
</ul>
</dd>
<dt>
<a name = "EmitSpotLight"></a>
<strong>EmitSpotLight(pos, dir[, color][, radius][, falloff][, distance][, shadows][, name])</strong>
</dt>
<dd>
Emit dynamic directional spotlight that lasts for a single frame.
If you want a light that sticks around, you must call this each frame.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">pos</span>
<span class="types"><a class="type" href="../3 primitive classes/Vec3.html#">Vec3</a></span>
position of the light
</li>
<li><span class="parameter">dir</span>
<span class="types"><a class="type" href="../3 primitive classes/Vec3.html#">Vec3</a></span>
direction, or a point to which spotlight should be directed to
</li>
<li><span class="parameter">color</span>
<span class="types"><a class="type" href="../3 primitive classes/Color.html#">Color</a></span>
(default Color(255, 255, 255))
(<em>optional</em>)
</li>
<li><span class="parameter">radius</span>
<span class="types"><span class="type">int</span></span>
(default 20) corresponds loosely to both intensity and range
overall radius at the endpoint of a light cone, measured in "clicks" or 256 world units (default 10)
(<em>optional</em>)
</li>
<li><span class="parameter">falloff</span>
<span class="types"><span class="type">int</span></span>
radius, at which light starts to fade out, measured in "clicks" (default 5)
(<em>optional</em>)
</li>
<li><span class="parameter">distance</span>
<span class="types"><span class="type">int</span></span>
distance, at which light cone fades out, measured in "clicks" (default 20)
(<em>optional</em>)
</li>
<li><span class="parameter">shadows</span>
<span class="types"><span class="type">bool</span></span>
determines whether light should generate dynamic shadows for applicable moveables (default is false)
(<em>optional</em>)
</li>
<li><span class="parameter">name</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.4/manual.html#6.4">string</a></span>
if provided, engine will interpolate this light for high framerate mode (be careful not to use same name for different lights)
(<em>optional</em>)
</li>
</ul>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.6 (Developer Version) Lua API</title>
<title>TombEngine 1.6 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -77,6 +77,7 @@
<ul class="nowrap">
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.FreezeMode.html">Flow.FreezeMode</a></li>
<li> <a href="../4 enums/Flow.GameStatus.html">Flow.GameStatus</a></li>
<li> <a href="../4 enums/Input.ActionID.html">Input.ActionID</a></li>
<li> <a href="../4 enums/Objects.AmmoType.html">Objects.AmmoType</a></li>
@ -175,6 +176,14 @@ scripts too.</p>
<td class="summary">Get current game status, such as normal game loop, exiting to title, etc.</td>
</tr>
<tr>
<td class="name" ><a href="#GetFreezeMode">GetFreezeMode()</a></td>
<td class="summary">Get current freeze mode, such as none, full, spectator or player.</td>
</tr>
<tr>
<td class="name" ><a href="#SetFreezeMode">SetFreezeMode(new)</a></td>
<td class="summary">Set current freeze mode, such as none, full, spectator or player.</td>
</tr>
<tr>
<td class="name" ><a href="#SaveGame">SaveGame(slotID)</a></td>
<td class="summary">Save the game to a savegame slot.</td>
</tr>
@ -616,6 +625,51 @@ teleported to such object with OCB similar to provided second argument.
</dd>
<dt>
<a name = "GetFreezeMode"></a>
<strong>GetFreezeMode()</strong>
</dt>
<dd>
Get current freeze mode, such as none, full, spectator or player.
<h3>Returns:</h3>
<ol>
<span class="types"><a class="type" href="../4 enums/Flow.FreezeMode.html#">FreezeMode</a></span>
the current freeze mode
</ol>
</dd>
<dt>
<a name = "SetFreezeMode"></a>
<strong>SetFreezeMode(new)</strong>
</dt>
<dd>
Set current freeze mode, such as none, full, spectator or player. <br/>
Freeze mode specifies whether game is in normal mode or paused in a particular way to allow
custom menu creation, photo mode or time freeze.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">new</span>
<span class="types"><a class="type" href="../4 enums/Flow.FreezeMode.html#">FreezeMode</a></span>
freeze mode to set.
</li>
</ul>
</dd>
<dt>
<a name = "SaveGame"></a>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.6 (Developer Version) Lua API</title>
<title>TombEngine 1.6 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -77,6 +77,7 @@
<ul class="nowrap">
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.FreezeMode.html">Flow.FreezeMode</a></li>
<li> <a href="../4 enums/Flow.GameStatus.html">Flow.GameStatus</a></li>
<li> <a href="../4 enums/Input.ActionID.html">Input.ActionID</a></li>
<li> <a href="../4 enums/Objects.AmmoType.html">Objects.AmmoType</a></li>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.6 (Developer Version) Lua API</title>
<title>TombEngine 1.6 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -77,6 +77,7 @@
<ul class="nowrap">
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.FreezeMode.html">Flow.FreezeMode</a></li>
<li> <a href="../4 enums/Flow.GameStatus.html">Flow.GameStatus</a></li>
<li> <a href="../4 enums/Input.ActionID.html">Input.ActionID</a></li>
<li> <a href="../4 enums/Objects.AmmoType.html">Objects.AmmoType</a></li>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.6 (Developer Version) Lua API</title>
<title>TombEngine 1.6 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -77,6 +77,7 @@
<ul class="nowrap">
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.FreezeMode.html">Flow.FreezeMode</a></li>
<li> <a href="../4 enums/Flow.GameStatus.html">Flow.GameStatus</a></li>
<li> <a href="../4 enums/Input.ActionID.html">Input.ActionID</a></li>
<li> <a href="../4 enums/Objects.AmmoType.html">Objects.AmmoType</a></li>
@ -184,6 +185,9 @@ PRESAVE <span class="comment">-- will be called immediately before OnSave
PRELOAD <span class="comment">-- will be called immediately before OnLoad
</span>POSTLOAD <span class="comment">-- will be called immediately after OnLoad
</span>
PREFREEZE <span class="comment">-- will be called before entering freeze mode
</span>POSTFREEZE <span class="comment">-- will be called immediately after exiting freeze mode
</span>
<span class="comment">-- These take a LevelEndReason arg, like OnEnd
</span>PREEND <span class="comment">-- will be called immediately before OnEnd
</span>POSTEND <span class="comment">-- will be called immediately after OnEnd
@ -191,6 +195,10 @@ PRELOAD <span class="comment">-- will be called immediately before OnLoad
<span class="comment">-- These take functions which accepts a deltaTime argument
</span>PRELOOP <span class="comment">-- will be called in the beginning of game loop
</span>POSTLOOP <span class="comment">-- will be called at the end of game loop
</span>
<span class="comment">-- These take functions which accepts an objectNumber argument, like OnUseItem
</span>PREUSEITEM <span class="comment">-- will be called immediately before OnUseItem
</span>POSTUSEITEM <span class="comment">-- will be called immediately after OnUseItem
</span></pre>
<p>The order in which two functions with the same CallbackPoint are called is undefined.
i.e. if you register <code>MyFunc</code> and <code>MyFunc2</code> with <code>PRELOOP</code>, both will be called in the beginning of game loop, but there is no guarantee that <code>MyFunc</code> will be called before <code>MyFunc2</code>, or vice-versa.</p>
@ -267,7 +275,8 @@ SAVE
START
END
LOOP
USEITEM</pre>
USEITEM
MENU</pre>
<h3>Parameters:</h3>

File diff suppressed because it is too large Load diff

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.6 (Developer Version) Lua API</title>
<title>TombEngine 1.6 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -77,6 +77,7 @@
<ul class="nowrap">
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.FreezeMode.html">Flow.FreezeMode</a></li>
<li> <a href="../4 enums/Flow.GameStatus.html">Flow.GameStatus</a></li>
<li> <a href="../4 enums/Input.ActionID.html">Input.ActionID</a></li>
<li> <a href="../4 enums/Objects.AmmoType.html">Objects.AmmoType</a></li>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.6 (Developer Version) Lua API</title>
<title>TombEngine 1.6 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -77,6 +77,7 @@
<ul class="nowrap">
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.FreezeMode.html">Flow.FreezeMode</a></li>
<li> <a href="../4 enums/Flow.GameStatus.html">Flow.GameStatus</a></li>
<li> <a href="../4 enums/Input.ActionID.html">Input.ActionID</a></li>
<li> <a href="../4 enums/Objects.AmmoType.html">Objects.AmmoType</a></li>
@ -116,7 +117,7 @@
<td class="summary">Play an audio track</td>
</tr>
<tr>
<td class="name" ><a href="#SetAmbientTrack">SetAmbientTrack(name, specifies)</a></td>
<td class="name" ><a href="#SetAmbientTrack">SetAmbientTrack(name, fromStart)</a></td>
<td class="summary">Set and play an ambient track</td>
</tr>
<tr>
@ -188,7 +189,7 @@
</dd>
<dt>
<a name = "SetAmbientTrack"></a>
<strong>SetAmbientTrack(name, specifies)</strong>
<strong>SetAmbientTrack(name, fromStart)</strong>
</dt>
<dd>
Set and play an ambient track
@ -201,9 +202,9 @@
<span class="types"><a class="type" href="https://www.lua.org/manual/5.4/manual.html#6.4">string</a></span>
of track (without file extension) to play
</li>
<li><span class="parameter">specifies</span>
<li><span class="parameter">fromStart</span>
<span class="types"><span class="type">bool</span></span>
whether ambient track should play from the beginning, or crossfade at a random position
specifies whether ambient track should play from the start, or crossfade at a random position
</li>
</ul>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.6 (Developer Version) Lua API</title>
<title>TombEngine 1.6 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -77,6 +77,7 @@
<ul class="nowrap">
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.FreezeMode.html">Flow.FreezeMode</a></li>
<li> <a href="../4 enums/Flow.GameStatus.html">Flow.GameStatus</a></li>
<li> <a href="../4 enums/Input.ActionID.html">Input.ActionID</a></li>
<li> <a href="../4 enums/Objects.AmmoType.html">Objects.AmmoType</a></li>
@ -159,7 +160,7 @@ Default: nil (i.e. infinite)
should be string automatically deleted after timeout is reached.
If not given, the string will remain allocated even after timeout is reached, and can be
shown again without re-initialization.
Default: false
Default: true
</li>
</ul>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.6 (Developer Version) Lua API</title>
<title>TombEngine 1.6 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -77,6 +77,7 @@
<ul class="nowrap">
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.FreezeMode.html">Flow.FreezeMode</a></li>
<li> <a href="../4 enums/Flow.GameStatus.html">Flow.GameStatus</a></li>
<li> <a href="../4 enums/Input.ActionID.html">Input.ActionID</a></li>
<li> <a href="../4 enums/Objects.AmmoType.html">Objects.AmmoType</a></li>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.6 (Developer Version) Lua API</title>
<title>TombEngine 1.6 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -77,6 +77,7 @@
<ul class="nowrap">
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.FreezeMode.html">Flow.FreezeMode</a></li>
<li> <a href="../4 enums/Flow.GameStatus.html">Flow.GameStatus</a></li>
<li> <a href="../4 enums/Input.ActionID.html">Input.ActionID</a></li>
<li> <a href="../4 enums/Objects.AmmoType.html">Objects.AmmoType</a></li>

View file

@ -1,529 +0,0 @@
<!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>TombEngine 1.1.0 Lua API</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>1 Modules</h2>
<ul class="nowrap">
<li> <a href="../1 modules/Effects.html">Effects</a></li>
<li> <a href="../1 modules/Flow.html">Flow</a></li>
<li> <a href="../1 modules/Input.html">Input</a></li>
<li> <a href="../1 modules/Inventory.html">Inventory</a></li>
<li> <a href="../1 modules/Logic.html">Logic</a></li>
<li> <a href="../1 modules/Objects.html">Objects</a></li>
<li> <a href="../1 modules/Sound.html">Sound</a></li>
<li> <a href="../1 modules/Strings.html">Strings</a></li>
<li> <a href="../1 modules/Util.html">Util</a></li>
<li> <a href="../1 modules/View.html">View</a></li>
</ul>
<h2>2 Classes</h2>
<ul class="nowrap">
<li> <here>DisplaySprite</here></li>
<li> <a href="../2 classes/Flow.Animations.html">Flow.Animations</a></li>
<li> <a href="../2 classes/Flow.Fog.html">Flow.Fog</a></li>
<li> <a href="../2 classes/Flow.InventoryItem.html">Flow.InventoryItem</a></li>
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
<li> <a href="../2 classes/Flow.Mirror.html">Flow.Mirror</a></li>
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
<li> <a href="../2 classes/Flow.SkyLayer.html">Flow.SkyLayer</a></li>
<li> <a href="../2 classes/Objects.AIObject.html">Objects.AIObject</a></li>
<li> <a href="../2 classes/Objects.Camera.html">Objects.Camera</a></li>
<li> <a href="../2 classes/Objects.LaraObject.html">Objects.LaraObject</a></li>
<li> <a href="../2 classes/Objects.Moveable.html">Objects.Moveable</a></li>
<li> <a href="../2 classes/Objects.Room.html">Objects.Room</a></li>
<li> <a href="../2 classes/Objects.Sink.html">Objects.Sink</a></li>
<li> <a href="../2 classes/Objects.SoundSource.html">Objects.SoundSource</a></li>
<li> <a href="../2 classes/Objects.Static.html">Objects.Static</a></li>
<li> <a href="../2 classes/Objects.Volume.html">Objects.Volume</a></li>
<li> <a href="../2 classes/Strings.DisplayString.html">Strings.DisplayString</a></li>
</ul>
<h2>3 Primitive Classes</h2>
<ul class="nowrap">
<li> <a href="../3 primitive classes/Color.html">Color</a></li>
<li> <a href="../3 primitive classes/Rotation.html">Rotation</a></li>
<li> <a href="../3 primitive classes/Vec2.html">Vec2</a></li>
<li> <a href="../3 primitive classes/Vec3.html">Vec3</a></li>
</ul>
<h2>4 Enums</h2>
<ul class="nowrap">
<li> <a href="../4 enums/DisplaySprite.AlignMode.html">DisplaySprite.AlignMode</a></li>
<li> <a href="../4 enums/DisplaySprite.ScaleMode.html">DisplaySprite.ScaleMode</a></li>
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Input.ActionID.html">Input.ActionID</a></li>
<li> <a href="../4 enums/Objects.AmmoType.html">Objects.AmmoType</a></li>
<li> <a href="../4 enums/Objects.ObjID.html">Objects.ObjID</a></li>
<li> <a href="../4 enums/Objects.RoomFlagID.html">Objects.RoomFlagID</a></li>
<li> <a href="../4 enums/Objects.RoomReverb.html">Objects.RoomReverb</a></li>
<li> <a href="../4 enums/Sound.SoundTrackType.html">Sound.SoundTrackType</a></li>
<li> <a href="../4 enums/Util.LogLevel.html">Util.LogLevel</a></li>
<li> <a href="../4 enums/View.CameraType.html">View.CameraType</a></li>
</ul>
<h2>5 Lua utility modules</h2>
<ul class="nowrap">
<li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li>
<li> <a href="../5 lua utility modules/Timer.html">Timer</a></li>
</ul>
</div>
<div id="content">
<h1>Class <code>DisplaySprite</code></h1>
<p>Represents a screen-space display sprite.</p>
<p>
</p>
<h2><a href="#Functions">Functions</a></h2>
<table class="function_list">
<tr>
<td class="name" ><a href="#DisplaySprite">DisplaySprite(ID, int, pos, rot, scale[, color])</a></td>
<td class="summary">Create a DisplaySprite object.</td>
</tr>
<tr>
<td class="name" ><a href="#DisplaySprite:GetObjectID">DisplaySprite:GetObjectID()</a></td>
<td class="summary">Get the object ID of the sprite sequence object used by the display sprite.</td>
</tr>
<tr>
<td class="name" ><a href="#DisplaySprite:GetSpriteID">DisplaySprite:GetSpriteID()</a></td>
<td class="summary">Get the sprite ID in the sprite sequence object used by the display sprite.</td>
</tr>
<tr>
<td class="name" ><a href="#DisplaySprite:GetPosition">DisplaySprite:GetPosition()</a></td>
<td class="summary">Get the display position of the display sprite in percent.</td>
</tr>
<tr>
<td class="name" ><a href="#DisplaySprite:GetRotation">DisplaySprite:GetRotation()</a></td>
<td class="summary">Get the rotation of the display sprite in degrees.</td>
</tr>
<tr>
<td class="name" ><a href="#DisplaySprite:GetScale">DisplaySprite:GetScale()</a></td>
<td class="summary">Get the horizontal and vertical scale of the display sprite in percent.</td>
</tr>
<tr>
<td class="name" ><a href="#DisplaySprite:GetColor">DisplaySprite:GetColor()</a></td>
<td class="summary">Get the color of the display sprite.</td>
</tr>
<tr>
<td class="name" ><a href="#DisplaySprite:SetObjectID">DisplaySprite:SetObjectID(New)</a></td>
<td class="summary">Set the sprite sequence object ID used by the display sprite.</td>
</tr>
<tr>
<td class="name" ><a href="#DisplaySprite:SetSpriteID">DisplaySprite:SetSpriteID(New)</a></td>
<td class="summary">Set the sprite ID in the sprite sequence object used by the display sprite.</td>
</tr>
<tr>
<td class="name" ><a href="#DisplaySprite:SetPosition">DisplaySprite:SetPosition(New)</a></td>
<td class="summary">Set the display position of the display sprite in percent.</td>
</tr>
<tr>
<td class="name" ><a href="#DisplaySprite:SetRotation">DisplaySprite:SetRotation(New)</a></td>
<td class="summary">Set the rotation of the display sprite in degrees.</td>
</tr>
<tr>
<td class="name" ><a href="#DisplaySprite:SetScale">DisplaySprite:SetScale(New)</a></td>
<td class="summary">Set the horizontal and vertical scale of the display sprite in percent.</td>
</tr>
<tr>
<td class="name" ><a href="#DisplaySprite:SetColor">DisplaySprite:SetColor(New)</a></td>
<td class="summary">Set the color of the display sprite.</td>
</tr>
<tr>
<td class="name" ><a href="#DisplaySprite:Draw">DisplaySprite:Draw([priority][, alignMode][, scaleMode][, blendMode])</a></td>
<td class="summary">Draw the display sprite in display space for the current frame.</td>
</tr>
</table>
<br/>
<br/>
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
<dl class="function">
<dt>
<a name = "DisplaySprite"></a>
<strong>DisplaySprite(ID, int, pos, rot, scale[, color])</strong>
</dt>
<dd>
Create a DisplaySprite object.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">ID</span>
<span class="types"><a class="type" href="../4 enums/Objects.ObjID.html#">ObjID</a></span>
of the sprite sequence object.
</li>
<li><span class="parameter">int</span>
<span class="types"><span class="type">int</span></span>
spriteID ID of the sprite in the sequence.
</li>
<li><span class="parameter">pos</span>
<span class="types"><a class="type" href="../3 primitive classes/Vec2.html#">Vec2</a></span>
Display position in percent.
</li>
<li><span class="parameter">rot</span>
<span class="types"><span class="type">float</span></span>
Rotation in degrees.
</li>
<li><span class="parameter">scale</span>
<span class="types"><a class="type" href="../3 primitive classes/Vec2.html#">Vec2</a></span>
Horizontal and vertical scale in percent. Scaling is interpreted by the DisplaySpriteEnum.ScaleMode passed to the Draw() function call.
</li>
<li><span class="parameter">color</span>
<span class="types"><a class="type" href="../3 primitive classes/Color.html#">Color</a></span>
Color. <strong>Default: Color(255, 255, 255, 255)</strong>
(<em>optional</em>)
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><a class="type" href="../2 classes/DisplaySprite.html#">DisplaySprite</a></span>
A new DisplaySprite object.
</ol>
</dd>
<dt>
<a name = "DisplaySprite:GetObjectID"></a>
<strong>DisplaySprite:GetObjectID()</strong>
</dt>
<dd>
Get the object ID of the sprite sequence object used by the display sprite. ()
<h3>Returns:</h3>
<ol>
<span class="types"><a class="type" href="../4 enums/Objects.ObjID.html#">ObjID</a></span>
Sprite sequence object ID.
</ol>
</dd>
<dt>
<a name = "DisplaySprite:GetSpriteID"></a>
<strong>DisplaySprite:GetSpriteID()</strong>
</dt>
<dd>
Get the sprite ID in the sprite sequence object used by the display sprite. ()
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">int</span></span>
Sprite ID in the sprite sequence object.
</ol>
</dd>
<dt>
<a name = "DisplaySprite:GetPosition"></a>
<strong>DisplaySprite:GetPosition()</strong>
</dt>
<dd>
Get the display position of the display sprite in percent. ()
<h3>Returns:</h3>
<ol>
<span class="types"><a class="type" href="../3 primitive classes/Vec2.html#">Vec2</a></span>
Display position in percent.
</ol>
</dd>
<dt>
<a name = "DisplaySprite:GetRotation"></a>
<strong>DisplaySprite:GetRotation()</strong>
</dt>
<dd>
Get the rotation of the display sprite in degrees. ()
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">float</span></span>
Rotation in degrees.
</ol>
</dd>
<dt>
<a name = "DisplaySprite:GetScale"></a>
<strong>DisplaySprite:GetScale()</strong>
</dt>
<dd>
Get the horizontal and vertical scale of the display sprite in percent. ()
<h3>Returns:</h3>
<ol>
<span class="types"><a class="type" href="../3 primitive classes/Vec2.html#">Vec2</a></span>
Horizontal and vertical scale in percent.
</ol>
</dd>
<dt>
<a name = "DisplaySprite:GetColor"></a>
<strong>DisplaySprite:GetColor()</strong>
</dt>
<dd>
Get the color of the display sprite. ()
<h3>Returns:</h3>
<ol>
<span class="types"><a class="type" href="../3 primitive classes/Color.html#">Color</a></span>
Color.
</ol>
</dd>
<dt>
<a name = "DisplaySprite:SetObjectID"></a>
<strong>DisplaySprite:SetObjectID(New)</strong>
</dt>
<dd>
Set the sprite sequence object ID used by the display sprite. (Objects.ObjID)
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">New</span>
<span class="types"><a class="type" href="../4 enums/Objects.ObjID.html#">ObjID</a></span>
sprite sequence object ID.
</li>
</ul>
</dd>
<dt>
<a name = "DisplaySprite:SetSpriteID"></a>
<strong>DisplaySprite:SetSpriteID(New)</strong>
</dt>
<dd>
Set the sprite ID in the sprite sequence object used by the display sprite. (int)
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">New</span>
<span class="types"><span class="type">int</span></span>
sprite ID in the sprite sequence object.
</li>
</ul>
</dd>
<dt>
<a name = "DisplaySprite:SetPosition"></a>
<strong>DisplaySprite:SetPosition(New)</strong>
</dt>
<dd>
Set the display position of the display sprite in percent. (Vec2)
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">New</span>
<span class="types"><a class="type" href="../3 primitive classes/Vec2.html#">Vec2</a></span>
display position in percent.
</li>
</ul>
</dd>
<dt>
<a name = "DisplaySprite:SetRotation"></a>
<strong>DisplaySprite:SetRotation(New)</strong>
</dt>
<dd>
Set the rotation of the display sprite in degrees. (float)
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">New</span>
<span class="types"><span class="type">float</span></span>
rotation in degrees.
</li>
</ul>
</dd>
<dt>
<a name = "DisplaySprite:SetScale"></a>
<strong>DisplaySprite:SetScale(New)</strong>
</dt>
<dd>
Set the horizontal and vertical scale of the display sprite in percent. (Vec2)
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">New</span>
<span class="types"><span class="type">float</span></span>
horizontal and vertical scale in percent.
</li>
</ul>
</dd>
<dt>
<a name = "DisplaySprite:SetColor"></a>
<strong>DisplaySprite:SetColor(New)</strong>
</dt>
<dd>
Set the color of the display sprite. (Color)
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">New</span>
<span class="types"><span class="type">float</span></span>
color.
</li>
</ul>
</dd>
<dt>
<a name = "DisplaySprite:Draw"></a>
<strong>DisplaySprite:Draw([priority][, alignMode][, scaleMode][, blendMode])</strong>
</dt>
<dd>
Draw the display sprite in display space for the current frame.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">priority</span>
<span class="types"><a class="type" href="../4 enums/Objects.ObjID.html#">ObjID</a></span>
Draw priority. Can be thought of as a layer, with higher values having precedence. <strong>Default: 0</strong>
(<em>optional</em>)
</li>
<li><span class="parameter">alignMode</span>
<span class="types"><a class="type" href="../4 enums/DisplaySprite.AlignMode.html#">AlignMode</a></span>
Align mode interpreting an offset from the sprite's position. <strong>Default: DisplaySprite.AlignMode.CENTER</strong>
(<em>optional</em>)
</li>
<li><span class="parameter">scaleMode</span>
<span class="types"><a class="type" href="../4 enums/DisplaySprite.ScaleMode.html#">ScaleMode</a></span>
Scale mode interpreting the display sprite's horizontal and vertical scale. <strong>Default: DisplaySprite.ScaleMode.FIT</strong>
(<em>optional</em>)
</li>
<li><span class="parameter">blendMode</span>
<span class="types"><a class="type" href="../4 enums/Effects.BlendID.html#">BlendID</a></span>
Blend mode. <strong>Default: Effects.BlendID.ALPHABLEND</strong>
(<em>optional</em>)
</li>
</ul>
</dd>
</dl>
</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="https://github.com/hispidence/TEN-LDoc">TEN-LDoc</a> (a fork of <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a>)</i>
<i style="float:right;">Last updated 2023-11-09 18:25:22 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.6 (Developer Version) Lua API</title>
<title>TombEngine 1.6 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -77,6 +77,7 @@
<ul class="nowrap">
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.FreezeMode.html">Flow.FreezeMode</a></li>
<li> <a href="../4 enums/Flow.GameStatus.html">Flow.GameStatus</a></li>
<li> <a href="../4 enums/Input.ActionID.html">Input.ActionID</a></li>
<li> <a href="../4 enums/Objects.AmmoType.html">Objects.AmmoType</a></li>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.6 (Developer Version) Lua API</title>
<title>TombEngine 1.6 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -77,6 +77,7 @@
<ul class="nowrap">
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.FreezeMode.html">Flow.FreezeMode</a></li>
<li> <a href="../4 enums/Flow.GameStatus.html">Flow.GameStatus</a></li>
<li> <a href="../4 enums/Input.ActionID.html">Input.ActionID</a></li>
<li> <a href="../4 enums/Objects.AmmoType.html">Objects.AmmoType</a></li>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.6 (Developer Version) Lua API</title>
<title>TombEngine 1.6 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -77,6 +77,7 @@
<ul class="nowrap">
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.FreezeMode.html">Flow.FreezeMode</a></li>
<li> <a href="../4 enums/Flow.GameStatus.html">Flow.GameStatus</a></li>
<li> <a href="../4 enums/Input.ActionID.html">Input.ActionID</a></li>
<li> <a href="../4 enums/Objects.AmmoType.html">Objects.AmmoType</a></li>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.6 (Developer Version) Lua API</title>
<title>TombEngine 1.6 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -77,6 +77,7 @@
<ul class="nowrap">
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.FreezeMode.html">Flow.FreezeMode</a></li>
<li> <a href="../4 enums/Flow.GameStatus.html">Flow.GameStatus</a></li>
<li> <a href="../4 enums/Input.ActionID.html">Input.ActionID</a></li>
<li> <a href="../4 enums/Objects.AmmoType.html">Objects.AmmoType</a></li>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.6 (Developer Version) Lua API</title>
<title>TombEngine 1.6 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -77,6 +77,7 @@
<ul class="nowrap">
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.FreezeMode.html">Flow.FreezeMode</a></li>
<li> <a href="../4 enums/Flow.GameStatus.html">Flow.GameStatus</a></li>
<li> <a href="../4 enums/Input.ActionID.html">Input.ActionID</a></li>
<li> <a href="../4 enums/Objects.AmmoType.html">Objects.AmmoType</a></li>
@ -109,6 +110,10 @@
<h2><a href="#Members">Members</a></h2>
<table class="function_list">
<tr>
<td class="name" ><a href="#nameKey">nameKey</a></td>
<td class="summary">(string) string key for the level's (localised) name.</td>
</tr>
<tr>
<td class="name" ><a href="#scriptFile">scriptFile</a></td>
<td class="summary">(string) Level-specific Lua script file.</td>
@ -205,6 +210,22 @@
<h2 class="section-header "><a name="Members"></a>Members</h2>
<dl class="function">
<dt>
<a name = "nameKey"></a>
<strong>nameKey</strong>
</dt>
<dd>
(string) string key for the level's (localised) name.
Corresponds to an entry in strings.lua.
</dd>
<dt>
<a name = "scriptFile"></a>
<strong>scriptFile</strong>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.6 (Developer Version) Lua API</title>
<title>TombEngine 1.6 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -77,6 +77,7 @@
<ul class="nowrap">
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.FreezeMode.html">Flow.FreezeMode</a></li>
<li> <a href="../4 enums/Flow.GameStatus.html">Flow.GameStatus</a></li>
<li> <a href="../4 enums/Input.ActionID.html">Input.ActionID</a></li>
<li> <a href="../4 enums/Objects.AmmoType.html">Objects.AmmoType</a></li>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.6 (Developer Version) Lua API</title>
<title>TombEngine 1.6 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -77,6 +77,7 @@
<ul class="nowrap">
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.FreezeMode.html">Flow.FreezeMode</a></li>
<li> <a href="../4 enums/Flow.GameStatus.html">Flow.GameStatus</a></li>
<li> <a href="../4 enums/Input.ActionID.html">Input.ActionID</a></li>
<li> <a href="../4 enums/Objects.AmmoType.html">Objects.AmmoType</a></li>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.6 (Developer Version) Lua API</title>
<title>TombEngine 1.6 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -77,6 +77,7 @@
<ul class="nowrap">
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.FreezeMode.html">Flow.FreezeMode</a></li>
<li> <a href="../4 enums/Flow.GameStatus.html">Flow.GameStatus</a></li>
<li> <a href="../4 enums/Input.ActionID.html">Input.ActionID</a></li>
<li> <a href="../4 enums/Objects.AmmoType.html">Objects.AmmoType</a></li>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.6 (Developer Version) Lua API</title>
<title>TombEngine 1.6 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -77,6 +77,7 @@
<ul class="nowrap">
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.FreezeMode.html">Flow.FreezeMode</a></li>
<li> <a href="../4 enums/Flow.GameStatus.html">Flow.GameStatus</a></li>
<li> <a href="../4 enums/Input.ActionID.html">Input.ActionID</a></li>
<li> <a href="../4 enums/Objects.AmmoType.html">Objects.AmmoType</a></li>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.6 (Developer Version) Lua API</title>
<title>TombEngine 1.6 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -77,6 +77,7 @@
<ul class="nowrap">
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.FreezeMode.html">Flow.FreezeMode</a></li>
<li> <a href="../4 enums/Flow.GameStatus.html">Flow.GameStatus</a></li>
<li> <a href="../4 enums/Input.ActionID.html">Input.ActionID</a></li>
<li> <a href="../4 enums/Objects.AmmoType.html">Objects.AmmoType</a></li>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.6 (Developer Version) Lua API</title>
<title>TombEngine 1.6 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -77,6 +77,7 @@
<ul class="nowrap">
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.FreezeMode.html">Flow.FreezeMode</a></li>
<li> <a href="../4 enums/Flow.GameStatus.html">Flow.GameStatus</a></li>
<li> <a href="../4 enums/Input.ActionID.html">Input.ActionID</a></li>
<li> <a href="../4 enums/Objects.AmmoType.html">Objects.AmmoType</a></li>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.6 (Developer Version) Lua API</title>
<title>TombEngine 1.6 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -77,6 +77,7 @@
<ul class="nowrap">
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.FreezeMode.html">Flow.FreezeMode</a></li>
<li> <a href="../4 enums/Flow.GameStatus.html">Flow.GameStatus</a></li>
<li> <a href="../4 enums/Input.ActionID.html">Input.ActionID</a></li>
<li> <a href="../4 enums/Objects.AmmoType.html">Objects.AmmoType</a></li>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.6 (Developer Version) Lua API</title>
<title>TombEngine 1.6 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -77,6 +77,7 @@
<ul class="nowrap">
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.FreezeMode.html">Flow.FreezeMode</a></li>
<li> <a href="../4 enums/Flow.GameStatus.html">Flow.GameStatus</a></li>
<li> <a href="../4 enums/Input.ActionID.html">Input.ActionID</a></li>
<li> <a href="../4 enums/Objects.AmmoType.html">Objects.AmmoType</a></li>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.6 (Developer Version) Lua API</title>
<title>TombEngine 1.6 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -77,6 +77,7 @@
<ul class="nowrap">
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.FreezeMode.html">Flow.FreezeMode</a></li>
<li> <a href="../4 enums/Flow.GameStatus.html">Flow.GameStatus</a></li>
<li> <a href="../4 enums/Input.ActionID.html">Input.ActionID</a></li>
<li> <a href="../4 enums/Objects.AmmoType.html">Objects.AmmoType</a></li>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.6 (Developer Version) Lua API</title>
<title>TombEngine 1.6 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -77,6 +77,7 @@
<ul class="nowrap">
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.FreezeMode.html">Flow.FreezeMode</a></li>
<li> <a href="../4 enums/Flow.GameStatus.html">Flow.GameStatus</a></li>
<li> <a href="../4 enums/Input.ActionID.html">Input.ActionID</a></li>
<li> <a href="../4 enums/Objects.AmmoType.html">Objects.AmmoType</a></li>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.6 (Developer Version) Lua API</title>
<title>TombEngine 1.6 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -77,6 +77,7 @@
<ul class="nowrap">
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.FreezeMode.html">Flow.FreezeMode</a></li>
<li> <a href="../4 enums/Flow.GameStatus.html">Flow.GameStatus</a></li>
<li> <a href="../4 enums/Input.ActionID.html">Input.ActionID</a></li>
<li> <a href="../4 enums/Objects.AmmoType.html">Objects.AmmoType</a></li>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.6 (Developer Version) Lua API</title>
<title>TombEngine 1.6 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -77,6 +77,7 @@
<ul class="nowrap">
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.FreezeMode.html">Flow.FreezeMode</a></li>
<li> <a href="../4 enums/Flow.GameStatus.html">Flow.GameStatus</a></li>
<li> <a href="../4 enums/Input.ActionID.html">Input.ActionID</a></li>
<li> <a href="../4 enums/Objects.AmmoType.html">Objects.AmmoType</a></li>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.6 (Developer Version) Lua API</title>
<title>TombEngine 1.6 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -77,6 +77,7 @@
<ul class="nowrap">
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.FreezeMode.html">Flow.FreezeMode</a></li>
<li> <a href="../4 enums/Flow.GameStatus.html">Flow.GameStatus</a></li>
<li> <a href="../4 enums/Input.ActionID.html">Input.ActionID</a></li>
<li> <a href="../4 enums/Objects.AmmoType.html">Objects.AmmoType</a></li>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.6 (Developer Version) Lua API</title>
<title>TombEngine 1.6 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -77,6 +77,7 @@
<ul class="nowrap">
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.FreezeMode.html">Flow.FreezeMode</a></li>
<li> <a href="../4 enums/Flow.GameStatus.html">Flow.GameStatus</a></li>
<li> <a href="../4 enums/Input.ActionID.html">Input.ActionID</a></li>
<li> <a href="../4 enums/Objects.AmmoType.html">Objects.AmmoType</a></li>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.6 (Developer Version) Lua API</title>
<title>TombEngine 1.6 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -77,6 +77,7 @@
<ul class="nowrap">
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.FreezeMode.html">Flow.FreezeMode</a></li>
<li> <a href="../4 enums/Flow.GameStatus.html">Flow.GameStatus</a></li>
<li> <a href="../4 enums/Input.ActionID.html">Input.ActionID</a></li>
<li> <a href="../4 enums/Objects.AmmoType.html">Objects.AmmoType</a></li>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.6 (Developer Version) Lua API</title>
<title>TombEngine 1.6 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -77,6 +77,7 @@
<ul class="nowrap">
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.FreezeMode.html">Flow.FreezeMode</a></li>
<li> <a href="../4 enums/Flow.GameStatus.html">Flow.GameStatus</a></li>
<li> <a href="../4 enums/Input.ActionID.html">Input.ActionID</a></li>
<li> <a href="../4 enums/Objects.AmmoType.html">Objects.AmmoType</a></li>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.6 (Developer Version) Lua API</title>
<title>TombEngine 1.6 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -77,6 +77,7 @@
<ul class="nowrap">
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.FreezeMode.html">Flow.FreezeMode</a></li>
<li> <a href="../4 enums/Flow.GameStatus.html">Flow.GameStatus</a></li>
<li> <a href="../4 enums/Input.ActionID.html">Input.ActionID</a></li>
<li> <a href="../4 enums/Objects.AmmoType.html">Objects.AmmoType</a></li>
@ -129,6 +130,10 @@
<td class="summary">
</td>
</tr>
<tr>
<td class="name" ><a href="#Direction">Direction()</a></td>
<td class="summary">Converts rotation to a direction normal.</td>
</tr>
<tr>
<td class="name" ><a href="#__tostring">__tostring(rotation)</a></td>
@ -231,6 +236,27 @@
</dd>
<dt>
<a name = "Direction"></a>
<strong>Direction()</strong>
</dt>
<dd>
Converts rotation to a direction normal.
<h3>Returns:</h3>
<ol>
<span class="types"><a class="type" href="../3 primitive classes/Vec3.html#">Vec3</a></span>
resulting normal calculated from this rotation.
</ol>
</dd>
<dt>
<a name = "__tostring"></a>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.6 (Developer Version) Lua API</title>
<title>TombEngine 1.6 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -77,6 +77,7 @@
<ul class="nowrap">
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.FreezeMode.html">Flow.FreezeMode</a></li>
<li> <a href="../4 enums/Flow.GameStatus.html">Flow.GameStatus</a></li>
<li> <a href="../4 enums/Input.ActionID.html">Input.ActionID</a></li>
<li> <a href="../4 enums/Objects.AmmoType.html">Objects.AmmoType</a></li>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.6 (Developer Version) Lua API</title>
<title>TombEngine 1.6 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -77,6 +77,7 @@
<ul class="nowrap">
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.FreezeMode.html">Flow.FreezeMode</a></li>
<li> <a href="../4 enums/Flow.GameStatus.html">Flow.GameStatus</a></li>
<li> <a href="../4 enums/Input.ActionID.html">Input.ActionID</a></li>
<li> <a href="../4 enums/Objects.AmmoType.html">Objects.AmmoType</a></li>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.6 (Developer Version) Lua API</title>
<title>TombEngine 1.6 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -77,6 +77,7 @@
<ul class="nowrap">
<li> <here>Effects.BlendID</here></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.FreezeMode.html">Flow.FreezeMode</a></li>
<li> <a href="../4 enums/Flow.GameStatus.html">Flow.GameStatus</a></li>
<li> <a href="../4 enums/Input.ActionID.html">Input.ActionID</a></li>
<li> <a href="../4 enums/Objects.AmmoType.html">Objects.AmmoType</a></li>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.6 (Developer Version) Lua API</title>
<title>TombEngine 1.6 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -77,6 +77,7 @@
<ul class="nowrap">
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <here>Effects.EffectID</here></li>
<li> <a href="../4 enums/Flow.FreezeMode.html">Flow.FreezeMode</a></li>
<li> <a href="../4 enums/Flow.GameStatus.html">Flow.GameStatus</a></li>
<li> <a href="../4 enums/Input.ActionID.html">Input.ActionID</a></li>
<li> <a href="../4 enums/Objects.AmmoType.html">Objects.AmmoType</a></li>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.1.0 Lua API</title>
<title>TombEngine 1.6 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -34,21 +34,27 @@
<ul class="nowrap">
<li> <a href="../1 modules/Effects.html">Effects</a></li>
<li> <a href="../1 modules/Flow.html">Flow</a></li>
<li> <a href="../1 modules/Input.html">Input</a></li>
<li> <a href="../1 modules/Inventory.html">Inventory</a></li>
<li> <a href="../1 modules/Logic.html">Logic</a></li>
<li> <a href="../1 modules/Misc.html">Misc</a></li>
<li> <a href="../1 modules/Objects.html">Objects</a></li>
<li> <a href="../1 modules/Sound.html">Sound</a></li>
<li> <a href="../1 modules/Strings.html">Strings</a></li>
<li> <a href="../1 modules/Util.html">Util</a></li>
<li> <a href="../1 modules/View.html">View</a></li>
</ul>
<h2>2 Classes</h2>
<ul class="nowrap">
<li> <a href="../2 classes/View.DisplaySprite.html">View.DisplaySprite</a></li>
<li> <a href="../2 classes/Flow.Animations.html">Flow.Animations</a></li>
<li> <a href="../2 classes/Flow.Fog.html">Flow.Fog</a></li>
<li> <a href="../2 classes/Flow.InventoryItem.html">Flow.InventoryItem</a></li>
<li> <a href="../2 classes/Flow.LensFlare.html">Flow.LensFlare</a></li>
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
<li> <a href="../2 classes/Flow.Mirror.html">Flow.Mirror</a></li>
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
<li> <a href="../2 classes/Flow.SkyLayer.html">Flow.SkyLayer</a></li>
<li> <a href="../2 classes/Flow.Starfield.html">Flow.Starfield</a></li>
<li> <a href="../2 classes/Objects.AIObject.html">Objects.AIObject</a></li>
<li> <a href="../2 classes/Objects.Camera.html">Objects.Camera</a></li>
<li> <a href="../2 classes/Objects.LaraObject.html">Objects.LaraObject</a></li>
@ -71,14 +77,21 @@
<ul class="nowrap">
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Misc.ActionID.html">Misc.ActionID</a></li>
<li> <a href="../4 enums/Misc.CameraType.html">Misc.CameraType</a></li>
<li> <a href="../4 enums/Misc.LogLevel.html">Misc.LogLevel</a></li>
<li> <here>Misc.SoundTrackType</here></li>
<li> <here>Flow.FreezeMode</here></li>
<li> <a href="../4 enums/Flow.GameStatus.html">Flow.GameStatus</a></li>
<li> <a href="../4 enums/Input.ActionID.html">Input.ActionID</a></li>
<li> <a href="../4 enums/Objects.AmmoType.html">Objects.AmmoType</a></li>
<li> <a href="../4 enums/Objects.MoveableStatus.html">Objects.MoveableStatus</a></li>
<li> <a href="../4 enums/Objects.ObjID.html">Objects.ObjID</a></li>
<li> <a href="../4 enums/Objects.RoomFlagID.html">Objects.RoomFlagID</a></li>
<li> <a href="../4 enums/Objects.RoomReverb.html">Objects.RoomReverb</a></li>
<li> <a href="../4 enums/Sound.SoundTrackType.html">Sound.SoundTrackType</a></li>
<li> <a href="../4 enums/Strings.DisplayStringOption.html">Strings.DisplayStringOption</a></li>
<li> <a href="../4 enums/Util.LogLevel.html">Util.LogLevel</a></li>
<li> <a href="../4 enums/View.AlignMode.html">View.AlignMode</a></li>
<li> <a href="../4 enums/View.CameraType.html">View.CameraType</a></li>
<li> <a href="../4 enums/View.PostProcessMode.html">View.PostProcessMode</a></li>
<li> <a href="../4 enums/View.ScaleMode.html">View.ScaleMode</a></li>
</ul>
<h2>5 Lua utility modules</h2>
<ul class="nowrap">
@ -90,18 +103,18 @@
<div id="content">
<h1>Enum <code>Misc.SoundTrackType</code></h1>
<p>Constants for the type of the audio tracks.</p>
<h1>Enum <code>Flow.FreezeMode</code></h1>
<p>Constants for freeze modes.</p>
<p>
</p>
<h2><a href="#Misc_SoundTrackType_constants">Misc.SoundTrackType constants </a></h2>
<h2><a href="#Flow_FreezeMode_constants">Flow.FreezeMode constants </a></h2>
<table class="function_list">
<tr>
<td class="name" ><a href="#CONSTANT_STRING_HERE">CONSTANT_STRING_HERE</a></td>
<td class="summary">Table of sound track type constants (for use with sound track functions).</td>
<td class="summary">Table of freeze modes.</td>
</tr>
</table>
@ -109,17 +122,18 @@
<br/>
<h2 class="section-header has-description"><a name="Misc_SoundTrackType_constants"></a>Misc.SoundTrackType constants </h2>
<h2 class="section-header has-description"><a name="Flow_FreezeMode_constants"></a>Flow.FreezeMode constants </h2>
<div class="section-description">
<p>The following constants are inside SoundTrackType.</p>
<p>The following constants are inside Flow.FreezeMode.</p>
<pre><code>ONESHOT
LOOPED
VOICE
<pre><code>NONE - Normal in-game operation.
FULL - Game is completely frozen, as in pause or inventory menus.
SPECTATOR - Game is completely frozen, but with ability to control camera.
PLAYER - Game is completely frozen, but with ability to control player. Experimental.
</code></pre>
@ -130,7 +144,7 @@ VOICE
<strong>CONSTANT_STRING_HERE</strong>
</dt>
<dd>
Table of sound track type constants (for use with sound track functions).
Table of freeze modes.
@ -147,7 +161,6 @@ VOICE
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="https://github.com/hispidence/TEN-LDoc">TEN-LDoc</a> (a fork of <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a>)</i>
<i style="float:right;">Last updated 2023-09-30 13:48:57 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.6 (Developer Version) Lua API</title>
<title>TombEngine 1.6 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -77,6 +77,7 @@
<ul class="nowrap">
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.FreezeMode.html">Flow.FreezeMode</a></li>
<li> <here>Flow.GameStatus</here></li>
<li> <a href="../4 enums/Input.ActionID.html">Input.ActionID</a></li>
<li> <a href="../4 enums/Objects.AmmoType.html">Objects.AmmoType</a></li>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.6 (Developer Version) Lua API</title>
<title>TombEngine 1.6 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -77,6 +77,7 @@
<ul class="nowrap">
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.FreezeMode.html">Flow.FreezeMode</a></li>
<li> <a href="../4 enums/Flow.GameStatus.html">Flow.GameStatus</a></li>
<li> <here>Input.ActionID</here></li>
<li> <a href="../4 enums/Objects.AmmoType.html">Objects.AmmoType</a></li>

View file

@ -1,195 +0,0 @@
<!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>TombEngine 1.1.0 Lua API</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>1 Modules</h2>
<ul class="nowrap">
<li> <a href="../1 modules/Effects.html">Effects</a></li>
<li> <a href="../1 modules/Flow.html">Flow</a></li>
<li> <a href="../1 modules/Inventory.html">Inventory</a></li>
<li> <a href="../1 modules/Logic.html">Logic</a></li>
<li> <a href="../1 modules/Misc.html">Misc</a></li>
<li> <a href="../1 modules/Objects.html">Objects</a></li>
<li> <a href="../1 modules/Strings.html">Strings</a></li>
</ul>
<h2>2 Classes</h2>
<ul class="nowrap">
<li> <a href="../2 classes/Flow.Animations.html">Flow.Animations</a></li>
<li> <a href="../2 classes/Flow.Fog.html">Flow.Fog</a></li>
<li> <a href="../2 classes/Flow.InventoryItem.html">Flow.InventoryItem</a></li>
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
<li> <a href="../2 classes/Flow.Mirror.html">Flow.Mirror</a></li>
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
<li> <a href="../2 classes/Flow.SkyLayer.html">Flow.SkyLayer</a></li>
<li> <a href="../2 classes/Objects.AIObject.html">Objects.AIObject</a></li>
<li> <a href="../2 classes/Objects.Camera.html">Objects.Camera</a></li>
<li> <a href="../2 classes/Objects.LaraObject.html">Objects.LaraObject</a></li>
<li> <a href="../2 classes/Objects.Moveable.html">Objects.Moveable</a></li>
<li> <a href="../2 classes/Objects.Room.html">Objects.Room</a></li>
<li> <a href="../2 classes/Objects.Sink.html">Objects.Sink</a></li>
<li> <a href="../2 classes/Objects.SoundSource.html">Objects.SoundSource</a></li>
<li> <a href="../2 classes/Objects.Static.html">Objects.Static</a></li>
<li> <a href="../2 classes/Objects.Volume.html">Objects.Volume</a></li>
<li> <a href="../2 classes/Strings.DisplayString.html">Strings.DisplayString</a></li>
</ul>
<h2>3 Primitive Classes</h2>
<ul class="nowrap">
<li> <a href="../3 primitive classes/Color.html">Color</a></li>
<li> <a href="../3 primitive classes/Rotation.html">Rotation</a></li>
<li> <a href="../3 primitive classes/Vec2.html">Vec2</a></li>
<li> <a href="../3 primitive classes/Vec3.html">Vec3</a></li>
</ul>
<h2>4 Enums</h2>
<ul class="nowrap">
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <here>Misc.ActionID</here></li>
<li> <a href="../4 enums/Misc.CameraType.html">Misc.CameraType</a></li>
<li> <a href="../4 enums/Misc.LogLevel.html">Misc.LogLevel</a></li>
<li> <a href="../4 enums/Misc.SoundTrackType.html">Misc.SoundTrackType</a></li>
<li> <a href="../4 enums/Objects.AmmoType.html">Objects.AmmoType</a></li>
<li> <a href="../4 enums/Objects.ObjID.html">Objects.ObjID</a></li>
<li> <a href="../4 enums/Objects.RoomFlagID.html">Objects.RoomFlagID</a></li>
<li> <a href="../4 enums/Objects.RoomReverb.html">Objects.RoomReverb</a></li>
</ul>
<h2>5 Lua utility modules</h2>
<ul class="nowrap">
<li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li>
<li> <a href="../5 lua utility modules/Timer.html">Timer</a></li>
</ul>
</div>
<div id="content">
<h1>Enum <code>Misc.ActionID</code></h1>
<p>Constants for action key IDs.</p>
<p>
</p>
<h2><a href="#Misc_ActionID_constants">Misc.ActionID constants </a></h2>
<table class="function_list">
<tr>
<td class="name" ><a href="#CONSTANT_STRING_HERE">CONSTANT_STRING_HERE</a></td>
<td class="summary">Table of action ID constants (for use with KeyIsHeld / KeyIsHit / etc commands).</td>
</tr>
</table>
<br/>
<br/>
<h2 class="section-header has-description"><a name="Misc_ActionID_constants"></a>Misc.ActionID constants </h2>
<div class="section-description">
<p>The following constants are inside ActionID.</p>
<pre><code>FORWARD
BACK
LEFT
RIGHT
STEP_LEFT
STEP_RIGHT
WALK
SPRINT
CROUCH
JUMP
ROLL
ACTION
DRAW
LOOK
ACCELERATE
REVERSE
SPEED
SLOW
BRAKE
FIRE
FLARE
SMALL_MEDIPACK
LARGE_MEDIPACK
PREVIOUS_WEAPON
NEXT_WEAPON
WEAPON_1
WEAPON_2
WEAPON_3
WEAPON_4
WEAPON_5
WEAPON_6
WEAPON_7
WEAPON_8
WEAPON_9
WEAPON_10
SELECT
DESELECT
PAUSE
INVENTORY
SAVE
LOAD
</code></pre>
</div>
<dl class="function">
<dt>
<a name = "CONSTANT_STRING_HERE"></a>
<strong>CONSTANT_STRING_HERE</strong>
</dt>
<dd>
Table of action ID constants (for use with KeyIsHeld / KeyIsHit / etc commands).
</dd>
</dl>
</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="https://github.com/hispidence/TEN-LDoc">TEN-LDoc</a> (a fork of <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a>)</i>
<i style="float:right;">Last updated 2023-09-30 13:48:57 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>

View file

@ -1,157 +0,0 @@
<!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>TombEngine 1.1.0 Lua API</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>1 Modules</h2>
<ul class="nowrap">
<li> <a href="../1 modules/Effects.html">Effects</a></li>
<li> <a href="../1 modules/Flow.html">Flow</a></li>
<li> <a href="../1 modules/Inventory.html">Inventory</a></li>
<li> <a href="../1 modules/Logic.html">Logic</a></li>
<li> <a href="../1 modules/Misc.html">Misc</a></li>
<li> <a href="../1 modules/Objects.html">Objects</a></li>
<li> <a href="../1 modules/Strings.html">Strings</a></li>
</ul>
<h2>2 Classes</h2>
<ul class="nowrap">
<li> <a href="../2 classes/Flow.Animations.html">Flow.Animations</a></li>
<li> <a href="../2 classes/Flow.Fog.html">Flow.Fog</a></li>
<li> <a href="../2 classes/Flow.InventoryItem.html">Flow.InventoryItem</a></li>
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
<li> <a href="../2 classes/Flow.Mirror.html">Flow.Mirror</a></li>
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
<li> <a href="../2 classes/Flow.SkyLayer.html">Flow.SkyLayer</a></li>
<li> <a href="../2 classes/Objects.AIObject.html">Objects.AIObject</a></li>
<li> <a href="../2 classes/Objects.Camera.html">Objects.Camera</a></li>
<li> <a href="../2 classes/Objects.LaraObject.html">Objects.LaraObject</a></li>
<li> <a href="../2 classes/Objects.Moveable.html">Objects.Moveable</a></li>
<li> <a href="../2 classes/Objects.Room.html">Objects.Room</a></li>
<li> <a href="../2 classes/Objects.Sink.html">Objects.Sink</a></li>
<li> <a href="../2 classes/Objects.SoundSource.html">Objects.SoundSource</a></li>
<li> <a href="../2 classes/Objects.Static.html">Objects.Static</a></li>
<li> <a href="../2 classes/Objects.Volume.html">Objects.Volume</a></li>
<li> <a href="../2 classes/Strings.DisplayString.html">Strings.DisplayString</a></li>
</ul>
<h2>3 Primitive Classes</h2>
<ul class="nowrap">
<li> <a href="../3 primitive classes/Color.html">Color</a></li>
<li> <a href="../3 primitive classes/Rotation.html">Rotation</a></li>
<li> <a href="../3 primitive classes/Vec2.html">Vec2</a></li>
<li> <a href="../3 primitive classes/Vec3.html">Vec3</a></li>
</ul>
<h2>4 Enums</h2>
<ul class="nowrap">
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Misc.ActionID.html">Misc.ActionID</a></li>
<li> <here>Misc.CameraType</here></li>
<li> <a href="../4 enums/Misc.LogLevel.html">Misc.LogLevel</a></li>
<li> <a href="../4 enums/Misc.SoundTrackType.html">Misc.SoundTrackType</a></li>
<li> <a href="../4 enums/Objects.AmmoType.html">Objects.AmmoType</a></li>
<li> <a href="../4 enums/Objects.ObjID.html">Objects.ObjID</a></li>
<li> <a href="../4 enums/Objects.RoomFlagID.html">Objects.RoomFlagID</a></li>
<li> <a href="../4 enums/Objects.RoomReverb.html">Objects.RoomReverb</a></li>
</ul>
<h2>5 Lua utility modules</h2>
<ul class="nowrap">
<li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li>
<li> <a href="../5 lua utility modules/Timer.html">Timer</a></li>
</ul>
</div>
<div id="content">
<h1>Enum <code>Misc.CameraType</code></h1>
<p>Constants for the type of the Camera.</p>
<p>
</p>
<h2><a href="#Misc_CameraType_constants">Misc.CameraType constants </a></h2>
<table class="function_list">
<tr>
<td class="name" ><a href="#CONSTANT_STRING_HERE">CONSTANT_STRING_HERE</a></td>
<td class="summary">Table of camera type constants (for use with GetCameraType() function).</td>
</tr>
</table>
<br/>
<br/>
<h2 class="section-header has-description"><a name="Misc_CameraType_constants"></a>Misc.CameraType constants </h2>
<div class="section-description">
<p>The following constants are inside CameraType.</p>
<pre><code>CHASE
FIXED
LOOK
COMBAT
HEAVY
OBJECT
</code></pre>
</div>
<dl class="function">
<dt>
<a name = "CONSTANT_STRING_HERE"></a>
<strong>CONSTANT_STRING_HERE</strong>
</dt>
<dd>
Table of camera type constants (for use with GetCameraType() function).
</dd>
</dl>
</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="https://github.com/hispidence/TEN-LDoc">TEN-LDoc</a> (a fork of <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a>)</i>
<i style="float:right;">Last updated 2023-09-30 13:48:57 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>

View file

@ -1,153 +0,0 @@
<!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>TombEngine 1.1.0 Lua API</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>1 Modules</h2>
<ul class="nowrap">
<li> <a href="../1 modules/Effects.html">Effects</a></li>
<li> <a href="../1 modules/Flow.html">Flow</a></li>
<li> <a href="../1 modules/Inventory.html">Inventory</a></li>
<li> <a href="../1 modules/Logic.html">Logic</a></li>
<li> <a href="../1 modules/Misc.html">Misc</a></li>
<li> <a href="../1 modules/Objects.html">Objects</a></li>
<li> <a href="../1 modules/Strings.html">Strings</a></li>
</ul>
<h2>2 Classes</h2>
<ul class="nowrap">
<li> <a href="../2 classes/Flow.Animations.html">Flow.Animations</a></li>
<li> <a href="../2 classes/Flow.Fog.html">Flow.Fog</a></li>
<li> <a href="../2 classes/Flow.InventoryItem.html">Flow.InventoryItem</a></li>
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
<li> <a href="../2 classes/Flow.Mirror.html">Flow.Mirror</a></li>
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
<li> <a href="../2 classes/Flow.SkyLayer.html">Flow.SkyLayer</a></li>
<li> <a href="../2 classes/Objects.AIObject.html">Objects.AIObject</a></li>
<li> <a href="../2 classes/Objects.Camera.html">Objects.Camera</a></li>
<li> <a href="../2 classes/Objects.LaraObject.html">Objects.LaraObject</a></li>
<li> <a href="../2 classes/Objects.Moveable.html">Objects.Moveable</a></li>
<li> <a href="../2 classes/Objects.Room.html">Objects.Room</a></li>
<li> <a href="../2 classes/Objects.Sink.html">Objects.Sink</a></li>
<li> <a href="../2 classes/Objects.SoundSource.html">Objects.SoundSource</a></li>
<li> <a href="../2 classes/Objects.Static.html">Objects.Static</a></li>
<li> <a href="../2 classes/Objects.Volume.html">Objects.Volume</a></li>
<li> <a href="../2 classes/Strings.DisplayString.html">Strings.DisplayString</a></li>
</ul>
<h2>3 Primitive Classes</h2>
<ul class="nowrap">
<li> <a href="../3 primitive classes/Color.html">Color</a></li>
<li> <a href="../3 primitive classes/Rotation.html">Rotation</a></li>
<li> <a href="../3 primitive classes/Vec2.html">Vec2</a></li>
<li> <a href="../3 primitive classes/Vec3.html">Vec3</a></li>
</ul>
<h2>4 Enums</h2>
<ul class="nowrap">
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Misc.ActionID.html">Misc.ActionID</a></li>
<li> <a href="../4 enums/Misc.CameraType.html">Misc.CameraType</a></li>
<li> <here>Misc.LogLevel</here></li>
<li> <a href="../4 enums/Misc.SoundTrackType.html">Misc.SoundTrackType</a></li>
<li> <a href="../4 enums/Objects.AmmoType.html">Objects.AmmoType</a></li>
<li> <a href="../4 enums/Objects.ObjID.html">Objects.ObjID</a></li>
<li> <a href="../4 enums/Objects.RoomFlagID.html">Objects.RoomFlagID</a></li>
<li> <a href="../4 enums/Objects.RoomReverb.html">Objects.RoomReverb</a></li>
</ul>
<h2>5 Lua utility modules</h2>
<ul class="nowrap">
<li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li>
<li> <a href="../5 lua utility modules/Timer.html">Timer</a></li>
</ul>
</div>
<div id="content">
<h1>Enum <code>Misc.LogLevel</code></h1>
<p>Constants for LogLevel IDs.</p>
<p>
</p>
<h2><a href="#Misc_LogLevel_constants">Misc.LogLevel constants </a></h2>
<table class="function_list">
<tr>
<td class="name" ><a href="#CONSTANT_STRING_HERE">CONSTANT_STRING_HERE</a></td>
<td class="summary">Table of LogLevel ID constants (for use with PrintLog() command).</td>
</tr>
</table>
<br/>
<br/>
<h2 class="section-header has-description"><a name="Misc_LogLevel_constants"></a>Misc.LogLevel constants </h2>
<div class="section-description">
<p>The following constants are inside LogLevel.</p>
<pre><code>INFO
WARNING
ERROR
</code></pre>
</div>
<dl class="function">
<dt>
<a name = "CONSTANT_STRING_HERE"></a>
<strong>CONSTANT_STRING_HERE</strong>
</dt>
<dd>
Table of LogLevel ID constants (for use with PrintLog() command).
</dd>
</dl>
</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="https://github.com/hispidence/TEN-LDoc">TEN-LDoc</a> (a fork of <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a>)</i>
<i style="float:right;">Last updated 2023-09-30 13:48:57 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.6 (Developer Version) Lua API</title>
<title>TombEngine 1.6 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -77,6 +77,7 @@
<ul class="nowrap">
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.FreezeMode.html">Flow.FreezeMode</a></li>
<li> <a href="../4 enums/Flow.GameStatus.html">Flow.GameStatus</a></li>
<li> <a href="../4 enums/Input.ActionID.html">Input.ActionID</a></li>
<li> <here>Objects.AmmoType</here></li>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.6 (Developer Version) Lua API</title>
<title>TombEngine 1.6 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -77,6 +77,7 @@
<ul class="nowrap">
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.FreezeMode.html">Flow.FreezeMode</a></li>
<li> <a href="../4 enums/Flow.GameStatus.html">Flow.GameStatus</a></li>
<li> <a href="../4 enums/Input.ActionID.html">Input.ActionID</a></li>
<li> <a href="../4 enums/Objects.AmmoType.html">Objects.AmmoType</a></li>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.6 (Developer Version) Lua API</title>
<title>TombEngine 1.6 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -77,6 +77,7 @@
<ul class="nowrap">
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.FreezeMode.html">Flow.FreezeMode</a></li>
<li> <a href="../4 enums/Flow.GameStatus.html">Flow.GameStatus</a></li>
<li> <a href="../4 enums/Input.ActionID.html">Input.ActionID</a></li>
<li> <a href="../4 enums/Objects.AmmoType.html">Objects.AmmoType</a></li>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.6 (Developer Version) Lua API</title>
<title>TombEngine 1.6 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -77,6 +77,7 @@
<ul class="nowrap">
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.FreezeMode.html">Flow.FreezeMode</a></li>
<li> <a href="../4 enums/Flow.GameStatus.html">Flow.GameStatus</a></li>
<li> <a href="../4 enums/Input.ActionID.html">Input.ActionID</a></li>
<li> <a href="../4 enums/Objects.AmmoType.html">Objects.AmmoType</a></li>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.6 (Developer Version) Lua API</title>
<title>TombEngine 1.6 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -77,6 +77,7 @@
<ul class="nowrap">
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.FreezeMode.html">Flow.FreezeMode</a></li>
<li> <a href="../4 enums/Flow.GameStatus.html">Flow.GameStatus</a></li>
<li> <a href="../4 enums/Input.ActionID.html">Input.ActionID</a></li>
<li> <a href="../4 enums/Objects.AmmoType.html">Objects.AmmoType</a></li>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.6 (Developer Version) Lua API</title>
<title>TombEngine 1.6 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -77,6 +77,7 @@
<ul class="nowrap">
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.FreezeMode.html">Flow.FreezeMode</a></li>
<li> <a href="../4 enums/Flow.GameStatus.html">Flow.GameStatus</a></li>
<li> <a href="../4 enums/Input.ActionID.html">Input.ActionID</a></li>
<li> <a href="../4 enums/Objects.AmmoType.html">Objects.AmmoType</a></li>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.6 (Developer Version) Lua API</title>
<title>TombEngine 1.6 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -77,6 +77,7 @@
<ul class="nowrap">
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.FreezeMode.html">Flow.FreezeMode</a></li>
<li> <a href="../4 enums/Flow.GameStatus.html">Flow.GameStatus</a></li>
<li> <a href="../4 enums/Input.ActionID.html">Input.ActionID</a></li>
<li> <a href="../4 enums/Objects.AmmoType.html">Objects.AmmoType</a></li>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.6 (Developer Version) Lua API</title>
<title>TombEngine 1.6 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -77,6 +77,7 @@
<ul class="nowrap">
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.FreezeMode.html">Flow.FreezeMode</a></li>
<li> <a href="../4 enums/Flow.GameStatus.html">Flow.GameStatus</a></li>
<li> <a href="../4 enums/Input.ActionID.html">Input.ActionID</a></li>
<li> <a href="../4 enums/Objects.AmmoType.html">Objects.AmmoType</a></li>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.6 (Developer Version) Lua API</title>
<title>TombEngine 1.6 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -77,6 +77,7 @@
<ul class="nowrap">
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.FreezeMode.html">Flow.FreezeMode</a></li>
<li> <a href="../4 enums/Flow.GameStatus.html">Flow.GameStatus</a></li>
<li> <a href="../4 enums/Input.ActionID.html">Input.ActionID</a></li>
<li> <a href="../4 enums/Objects.AmmoType.html">Objects.AmmoType</a></li>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.6 (Developer Version) Lua API</title>
<title>TombEngine 1.6 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -77,6 +77,7 @@
<ul class="nowrap">
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.FreezeMode.html">Flow.FreezeMode</a></li>
<li> <a href="../4 enums/Flow.GameStatus.html">Flow.GameStatus</a></li>
<li> <a href="../4 enums/Input.ActionID.html">Input.ActionID</a></li>
<li> <a href="../4 enums/Objects.AmmoType.html">Objects.AmmoType</a></li>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.6 (Developer Version) Lua API</title>
<title>TombEngine 1.6 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -77,6 +77,7 @@
<ul class="nowrap">
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.FreezeMode.html">Flow.FreezeMode</a></li>
<li> <a href="../4 enums/Flow.GameStatus.html">Flow.GameStatus</a></li>
<li> <a href="../4 enums/Input.ActionID.html">Input.ActionID</a></li>
<li> <a href="../4 enums/Objects.AmmoType.html">Objects.AmmoType</a></li>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.6 (Developer Version) Lua API</title>
<title>TombEngine 1.6 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -77,6 +77,7 @@
<ul class="nowrap">
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.FreezeMode.html">Flow.FreezeMode</a></li>
<li> <a href="../4 enums/Flow.GameStatus.html">Flow.GameStatus</a></li>
<li> <a href="../4 enums/Input.ActionID.html">Input.ActionID</a></li>
<li> <a href="../4 enums/Objects.AmmoType.html">Objects.AmmoType</a></li>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.6 (Developer Version) Lua API</title>
<title>TombEngine 1.6 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -77,6 +77,7 @@
<ul class="nowrap">
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.FreezeMode.html">Flow.FreezeMode</a></li>
<li> <a href="../4 enums/Flow.GameStatus.html">Flow.GameStatus</a></li>
<li> <a href="../4 enums/Input.ActionID.html">Input.ActionID</a></li>
<li> <a href="../4 enums/Objects.AmmoType.html">Objects.AmmoType</a></li>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.6 (Developer Version) Lua API</title>
<title>TombEngine 1.6 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -77,6 +77,7 @@
<ul class="nowrap">
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.FreezeMode.html">Flow.FreezeMode</a></li>
<li> <a href="../4 enums/Flow.GameStatus.html">Flow.GameStatus</a></li>
<li> <a href="../4 enums/Input.ActionID.html">Input.ActionID</a></li>
<li> <a href="../4 enums/Objects.AmmoType.html">Objects.AmmoType</a></li>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.6 (Developer Version) Lua API</title>
<title>TombEngine 1.6 Lua API</title>
<link rel="stylesheet" href="ldoc.css" type="text/css" />
</head>
<body>
@ -77,6 +77,7 @@
<ul class="nowrap">
<li> <a href="4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="4 enums/Flow.FreezeMode.html">Flow.FreezeMode</a></li>
<li> <a href="4 enums/Flow.GameStatus.html">Flow.GameStatus</a></li>
<li> <a href="4 enums/Input.ActionID.html">Input.ActionID</a></li>
<li> <a href="4 enums/Objects.AmmoType.html">Objects.AmmoType</a></li>
@ -103,7 +104,7 @@
<div id="content">
<h2>TombEngine 1.6 (Developer Version) scripting interface</h2>
<h2>TombEngine 1.6 scripting interface</h2>
<p>Welcome to the TombEngine scripting API. This is a work in progress and some information might be wrong or outdated. Please also note that this is primarily a reference document, not a tutorial, so expect descriptions to be fairly sparse.</p>
<p>At the time of writing, there is a tutorial describing the basics of Lua, as well as a number of example scripts, on <a href="https://www.tombengine.com">the TombEngine website</a>.</p>
@ -280,6 +281,10 @@ local door = GetMoveableByName("door_type4_14")
<td class="name" ><a href="4 enums/Effects.EffectID.html">Effects.EffectID</a></td>
<td class="summary">Constants for effect IDs.</td>
</tr>
<tr>
<td class="name" ><a href="4 enums/Flow.FreezeMode.html">Flow.FreezeMode</a></td>
<td class="summary">Constants for freeze modes.</td>
</tr>
<tr>
<td class="name" ><a href="4 enums/Flow.GameStatus.html">Flow.GameStatus</a></td>
<td class="summary">Constants for game statuses.</td>

View file

@ -1568,7 +1568,7 @@ void HandleProjectile(ItemInfo& projectile, ItemInfo& emitter, const Vector3i& p
hasHit = hasHitNotByEmitter = doShatter = true;
doExplosion = isExplosive;
if (GetStaticObject(staticPtr->staticNumber).shatterType == ShatterType::None)
if (Statics[staticPtr->staticNumber].shatterType == ShatterType::None)
continue;
staticPtr->HitPoints -= damage;

View file

@ -1778,7 +1778,7 @@ bool TestLaraPoleCollision(ItemInfo* item, CollisionInfo* coll, bool goingUp, fl
bool atLeastOnePoleCollided = false;
auto collObjects = GetCollidedObjects(*item, true, false, BLOCK(1), ObjectCollectionMode::Items);
auto collObjects = GetCollidedObjects(*item, true, false, BLOCK(2), ObjectCollectionMode::Items);
if (!collObjects.IsEmpty())
{
auto laraBox = GameBoundingBox(item).ToBoundingOrientedBox(item->Pose);

View file

@ -32,8 +32,8 @@ using namespace TEN::Effects::Hair;
using namespace TEN::Entities;
using namespace TEN::Entities::Switches;
ObjectHandler Objects;
std::vector<StaticInfo> StaticObjects;
ObjectHandler Objects;
StaticHandler Statics;
void ObjectHandler::Initialize()
{
@ -76,6 +76,44 @@ ObjectInfo& ObjectHandler::GetFirstAvailableObject()
return _objects[0];
}
void StaticHandler::Initialize()
{
_lookupTable.resize(0);
_lookupTable.reserve(_defaultLUTSize);
_statics.resize(0);
}
int StaticHandler::GetIndex(int staticID)
{
if (staticID < 0 || staticID >= _lookupTable.size())
{
TENLog("Attempt to get nonexistent static mesh ID slot index (" + std::to_string(staticID) + ")", LogLevel::Warning);
return _lookupTable.front();
}
return _lookupTable[staticID];
}
StaticInfo& StaticHandler::operator [](int staticID)
{
if (staticID < 0)
{
TENLog("Attempt to access illegal static mesh ID slot info", LogLevel::Warning);
return _statics.front();
}
if (staticID >= _lookupTable.size())
_lookupTable.resize(staticID + 1, NO_VALUE);
if (_lookupTable[staticID] != NO_VALUE)
return _statics[_lookupTable[staticID]];
_statics.emplace_back();
_lookupTable[staticID] = (int)_statics.size() - 1;
return _statics.back();
}
// NOTE: JointRotationFlags allows bones to be rotated with CreatureJoint().
void ObjectInfo::SetBoneRotationFlags(int boneID, int flags)
{
@ -191,6 +229,7 @@ void InitializeObjects()
obj->hitEffect = HitEffect::None;
obj->explodableMeshbits = 0;
obj->intelligent = false;
obj->AlwaysActive = false;
obj->waterCreature = false;
obj->nonLot = false;
obj->usingDrawAnimatingItem = true;

View file

@ -37,11 +37,10 @@ enum class LotType
HumanPlusJump,
HumanPlusJumpAndMonkey,
Flyer,
Blockable, // For large creatures such as trex and shiva.
Spider, // Only 2 block vault allowed.
Ape, // Only 2 block vault allowed.
SnowmobileGun, // Only 1 block vault allowed and 4 block drop max.
EnemyJeep
Blockable, // For large creatures such as trex and shiva.
Spider, // Only 2 block vault allowed.
Ape, // Only 2 block vault allowed.
SnowmobileGun // Only 1 block vault allowed and 4 block drop max.
};
enum class HitEffect
@ -68,6 +67,7 @@ enum class ShatterType
Explode
};
// TODO: All fields to PascalCase.
struct ObjectInfo
{
bool loaded = false; // IsLoaded
@ -87,13 +87,14 @@ struct ObjectInfo
int pivotLength;
int radius;
int HitPoints;
bool intelligent; // IsIntelligent
bool waterCreature; // IsWaterCreature
bool nonLot; // IsNonLot
bool isPickup; // IsPickup
bool isPuzzleHole; // IsReceptacle
bool usingDrawAnimatingItem;
int HitPoints = 0;
bool AlwaysActive = false;
bool intelligent = false;
bool waterCreature = false;
bool nonLot = false;
bool isPickup = false;
bool isPuzzleHole = false;
bool usingDrawAnimatingItem = false;
DWORD explodableMeshbits;
@ -113,15 +114,13 @@ class ObjectHandler
{
private:
ObjectInfo _objects[ID_NUMBER_OBJECTS];
ObjectInfo& GetFirstAvailableObject();
public:
void Initialize();
bool CheckID(GAME_OBJECT_ID objectID, bool isSilent = false);
ObjectInfo& operator [](int objectID);
private:
ObjectInfo& GetFirstAvailableObject();
};
struct StaticInfo
@ -135,10 +134,31 @@ struct StaticInfo
int ObjectNumber;
};
extern ObjectHandler Objects;
extern std::vector<StaticInfo> StaticObjects;
class StaticHandler
{
private:
static const int _defaultLUTSize = 256;
#define GetStaticObject(x) StaticObjects[StaticObjectsLUT[x]]
std::vector<StaticInfo> _statics = {};
std::vector<int> _lookupTable = {};
public:
void Initialize();
int GetIndex(int staticID);
StaticInfo& operator [](int staticID);
// Iterators
auto begin() { return _statics.begin(); } // Non-const begin
auto end() { return _statics.end(); } // Non-const end
auto begin() const { return _statics.cbegin(); } // Const begin
auto end() const { return _statics.cend(); } // Const end
auto cbegin() const { return _statics.cbegin(); } // Explicit const begin
auto cend() const { return _statics.cend(); } // Explicit const end
};
extern ObjectHandler Objects;
extern StaticHandler Statics;
void InitializeGameFlags();
void InitializeSpecialEffects();

View file

@ -39,7 +39,7 @@ static void PerformAnimCommands(ItemInfo& item, bool isFrameBased)
return;
// Get command data pointer.
short* commandDataPtr = &g_Level.Commands[anim.CommandIndex];
int* commandDataPtr = &g_Level.Commands[anim.CommandIndex];
for (int i = anim.NumCommands; i > 0; i--)
{
@ -118,45 +118,11 @@ static void PerformAnimCommands(ItemInfo& item, bool isFrameBased)
int frameNumber = commandDataPtr[0];
if (isFrameBased && item.Animation.FrameNumber == frameNumber)
{
// Get sound ID and sound environment flag from packed data.
int soundID = commandDataPtr[1] & 0xFFF; // Exclude last 4 bits for sound ID.
int soundEnvFlag = commandDataPtr[1] & 0xF000; // Keep only last 4 bits for sound environment flag.
// Get sound ID and sound environment flag.
int soundID = commandDataPtr[1];
auto requiredSoundEnv = (SoundEnvironment)commandDataPtr[2];
// FAILSAFE.
if (item.RoomNumber == NO_VALUE)
{
SoundEffect(soundID, &item.Pose, SoundEnvironment::Always);
commandDataPtr += 2;
break;
}
// Get required sound environment from flag.
auto requiredSoundEnv = SoundEnvironment::Always;
switch (soundEnvFlag)
{
default:
case 0:
requiredSoundEnv = SoundEnvironment::Always;
break;
case (1 << 14):
requiredSoundEnv = SoundEnvironment::Land;
break;
case (1 << 15):
requiredSoundEnv = SoundEnvironment::ShallowWater;
break;
case (1 << 12):
requiredSoundEnv = SoundEnvironment::Swamp;
break;
case (1 << 13):
requiredSoundEnv = SoundEnvironment::Underwater;
break;
}
int roomNumberAtPos = GetPointCollision(item).GetRoomNumber();
int roomNumberAtPos = (item.RoomNumber == NO_VALUE) ? Camera.pos.RoomNumber : GetPointCollision(item).GetRoomNumber();
bool isWater = TestEnvironment(ENV_FLAG_WATER, roomNumberAtPos);
bool isSwamp = TestEnvironment(ENV_FLAG_SWAMP, roomNumberAtPos);
@ -201,13 +167,13 @@ static void PerformAnimCommands(ItemInfo& item, bool isFrameBased)
SoundEffect(soundID, &item.Pose, *soundEnv);
}
commandDataPtr += 2;
}
commandDataPtr += 3;
break;
}
case AnimCommandType::Flipeffect:
if (isFrameBased && item.Animation.FrameNumber == commandDataPtr[0])
DoFlipEffect((commandDataPtr[1] & 0x3FFF), &item);
DoFlipEffect(commandDataPtr[1], &item);
commandDataPtr += 2;
break;

View file

@ -49,8 +49,8 @@ struct OLD_CAMERA
Vector3i target;
};
bool ItemCameraOn;
GameVector LastTarget;
GameVector LastIdeal;
GameVector Ideals[5];
OLD_CAMERA OldCam;
@ -60,7 +60,6 @@ GameVector LookCamPosition;
GameVector LookCamTarget;
Vector3i CamOldPos;
CAMERA_INFO Camera;
ObjectCameraInfo ItemCamera;
GameVector ForcedFixedCamera;
int UseForcedFixedCamera;
@ -403,7 +402,7 @@ void ObjCamera(ItemInfo* camSlotId, int camMeshId, ItemInfo* targetItem, int tar
{
//camSlotId and targetItem stay the same object until I know how to expand targetItem to another object.
//activates code below -> void CalculateCamera().
ItemCamera.ItemCameraOn = cond;
ItemCameraOn = cond;
UpdateCameraElevation();
@ -420,7 +419,7 @@ void ObjCamera(ItemInfo* camSlotId, int camMeshId, ItemInfo* targetItem, int tar
void ClearObjCamera()
{
ItemCamera.ItemCameraOn = false;
ItemCameraOn = false;
}
void MoveObjCamera(GameVector* ideal, ItemInfo* camSlotId, int camMeshId, ItemInfo* targetItem, int targetMeshId)
@ -483,17 +482,10 @@ void MoveObjCamera(GameVector* ideal, ItemInfo* camSlotId, int camMeshId, ItemIn
speed = 2;
}
//actual movement of the target.
// Actual movement of the target.
Camera.target.x += (pos2.x - Camera.target.x) / speed;
Camera.target.y += (pos2.y - Camera.target.y) / speed;
Camera.target.z += (pos2.z - Camera.target.z) / speed;
if (ItemCamera.LastAngle != position)
{
ItemCamera.LastAngle = Vector3i(ItemCamera.LastAngle.x = angle.x,
ItemCamera.LastAngle.y = angle.y,
ItemCamera.LastAngle.z = angle.z);
}
}
void RefreshFixedCamera(short camNumber)
@ -1080,8 +1072,7 @@ static bool CalculateDeathCamera(const ItemInfo& item)
return true;
// Special death animations.
if (item.Animation.AnimNumber == LA_SPIKE_DEATH ||
item.Animation.AnimNumber == LA_BOULDER_DEATH ||
if (item.Animation.AnimNumber == LA_SPIKE_DEATH ||
item.Animation.AnimNumber == LA_TRAIN_OVERBOARD_DEATH)
{
return true;
@ -1102,10 +1093,8 @@ void CalculateCamera(const CollisionInfo& coll)
return;
}
if (ItemCamera.ItemCameraOn)
{
if (ItemCameraOn)
return;
}
if (UseForcedFixedCamera != 0)
{

View file

@ -54,12 +54,6 @@ struct CAMERA_INFO
bool DisableInterpolation = false;
};
struct ObjectCameraInfo
{
GameVector LastAngle;
bool ItemCameraOn;
};
enum CAMERA_FLAGS
{
CF_NONE = 0,

View file

@ -118,7 +118,10 @@ CollidedObjectData GetCollidedObjects(ItemInfo& collidingItem, bool onlyVisible,
// Override extents if specified.
if (customRadius > 0.0f)
{
collidingAabb = BoundingBox(collidingItem.Pose.Position.ToVector3(), Vector3(customRadius));
convertedBounds.Extents = Vector3(customRadius);
}
// Run through neighboring rooms.
const auto& room = g_Level.Rooms[collidingItem.RoomNumber];
@ -1841,10 +1844,9 @@ void DoObjectCollision(ItemInfo* item, CollisionInfo* coll)
if (linkItem.HitPoints <= 0 || linkItem.HitPoints == NOT_TARGETABLE)
continue;
if (isHarmless || abs(item->Animation.Velocity.z) < VEHICLE_COLLISION_TERMINAL_VELOCITY ||
object.damageType == DamageMode::None)
if (isHarmless || abs(item->Animation.Velocity.z) < VEHICLE_COLLISION_TERMINAL_VELOCITY)
{
// If vehicle is harmless, enemy is non-damageable, or speed is too low, push enemy.
// If vehicle is harmless or speed is too low, just push enemy.
ItemPushItem(&linkItem, item, coll, false, 0);
continue;
}
@ -1888,7 +1890,7 @@ void DoObjectCollision(ItemInfo* item, CollisionInfo* coll)
// HACK: Shatter statics only by harmful vehicles.
if (!isPlayer &&
!isHarmless && abs(item->Animation.Velocity.z) > VEHICLE_COLLISION_TERMINAL_VELOCITY &&
GetStaticObject(staticObject.staticNumber).shatterType != ShatterType::None)
Statics[staticObject.staticNumber].shatterType != ShatterType::None)
{
SoundEffect(GetShatterSound(staticObject.staticNumber), &staticObject.pos);
ShatterObject(nullptr, &staticObject, -128, item->RoomNumber, 0);

View file

@ -381,8 +381,8 @@ namespace TEN::Collision::Floordata
// Calculate and return tilt.
auto sign = isFloor ? 1 : -1;
return Vector2i(
round(scaledNormal.x * 4),
round(scaledNormal.z * 4)) * sign;
(round(scaledNormal.x) * 4),
(round(scaledNormal.z) * 4)) * sign;
}
Vector2i GetSectorPoint(int x, int z)

View file

@ -1297,15 +1297,11 @@ void GetAITarget(CreatureInfo* creature)
{
auto* enemy = creature->Enemy;
int enemyObjectID = 0;
short enemyObjectNumber;
if (enemy)
{
enemyObjectID = enemy->ObjectNumber;
}
enemyObjectNumber = enemy->ObjectNumber;
else
{
enemyObjectID = NO_VALUE;
}
enemyObjectNumber = NO_VALUE;
auto* item = &g_Level.Items[creature->ItemNumber];
@ -1333,12 +1329,12 @@ void GetAITarget(CreatureInfo* creature)
}
else if (!creature->Patrol)
{
if (enemyObjectID != ID_AI_PATROL1)
FindAITargetObject(*item, ID_AI_PATROL1);
if (enemyObjectNumber != ID_AI_PATROL1)
FindAITargetObject(creature, ID_AI_PATROL1);
}
else if (enemyObjectID != ID_AI_PATROL2)
else if (enemyObjectNumber != ID_AI_PATROL2)
{
FindAITargetObject(*item, ID_AI_PATROL2);
FindAITargetObject(creature, ID_AI_PATROL2);
}
else if (abs(enemy->Pose.Position.x - item->Pose.Position.x) < REACHED_GOAL_RADIUS &&
abs(enemy->Pose.Position.y - item->Pose.Position.y) < REACHED_GOAL_RADIUS &&
@ -1354,8 +1350,8 @@ void GetAITarget(CreatureInfo* creature)
// First if was removed probably after TR3 and was it used by monkeys?
/*if (!(item->aiBits & MODIFY) && !creature->hurtByLara)
creature->enemy = LaraItem;
else*/ if (enemyObjectID != ID_AI_AMBUSH)
FindAITargetObject(*item, ID_AI_AMBUSH);
else*/ if (enemyObjectNumber != ID_AI_AMBUSH)
FindAITargetObject(creature, ID_AI_AMBUSH);
/*else if (item->objectNumber == ID_MONKEY)
return;*/
else if (abs(enemy->Pose.Position.x - item->Pose.Position.x) < REACHED_GOAL_RADIUS &&
@ -1366,7 +1362,6 @@ void GetAITarget(CreatureInfo* creature)
creature->ReachedGoal = true;
creature->Enemy = LaraItem;
item->AIBits &= ~(AMBUSH /* | MODIFY*/);
if (item->AIBits != MODIFY)
{
item->AIBits |= GUARD;
@ -1386,9 +1381,9 @@ void GetAITarget(CreatureInfo* creature)
{
item->AIBits &= ~FOLLOW;
}
else if (enemyObjectID != ID_AI_FOLLOW)
else if (enemyObjectNumber != ID_AI_FOLLOW)
{
FindAITargetObject(*item, ID_AI_FOLLOW);
FindAITargetObject(creature, ID_AI_FOLLOW);
}
else if (abs(enemy->Pose.Position.x - item->Pose.Position.x) < REACHED_GOAL_RADIUS &&
abs(enemy->Pose.Position.y - item->Pose.Position.y) < REACHED_GOAL_RADIUS &&
@ -1398,18 +1393,17 @@ void GetAITarget(CreatureInfo* creature)
item->AIBits &= ~FOLLOW;
}
}
/*else if (item->ObjectNumber == ID_MONKEY && item->CarriedItem == NO_VALUE)
/*else if (item->objectNumber == ID_MONKEY && item->carriedItem == NO_VALUE)
{
if (item->AIBits != MODIFY)
if (item->aiBits != MODIFY)
{
if (enemyObjectID != ID_SMALLMEDI_ITEM)
FindAITargetObject(*item, ID_SMALLMEDI_ITEM);
if (enemyObjectNumber != ID_SMALLMEDI_ITEM)
FindAITargetObject(creature, ID_SMALLMEDI_ITEM);
}
else
{
if (enemyObjectID != ID_KEY_ITEM4)
FindAITargetObject(*item, ID_KEY_ITEM4);
if (enemyObjectNumber != ID_KEY_ITEM4)
FindAITargetObject(creature, ID_KEY_ITEM4);
}
}*/
}
@ -1438,101 +1432,69 @@ void FindAITarget(CreatureInfo* creature, short objectNumber)
}
}
void FindAITargetObject(ItemInfo& item, GAME_OBJECT_ID objectID, std::optional<int> ocb, std::optional<bool> checkSameZone)
void FindAITargetObject(CreatureInfo* creature, int objectNumber)
{
auto& creature = *GetCreatureInfo(&item);
const auto& item = g_Level.Items[creature->ItemNumber];
auto data = AITargetData{};
data.CheckDistance = false;
data.CheckOcb = ocb.has_value();
data.ObjectID = objectID;
data.Ocb = ocb.value_or(item.ItemFlags[3]);
data.CheckSameZone = checkSameZone.value_or(true);
if (FindAITargetObject(item, data))
{
*creature.AITarget = data.FoundItem;
creature.Enemy = creature.AITarget;
}
FindAITargetObject(creature, objectNumber, item.ItemFlags[3], true);
}
bool FindAITargetObject(ItemInfo& item, AITargetData& data)
void FindAITargetObject(CreatureInfo* creature, int objectNumber, int ocb, bool checkSameZone)
{
auto& item = g_Level.Items[creature->ItemNumber];
if (g_Level.AIObjects.empty())
return false;
return;
auto& creature = *GetCreatureInfo(&item);
AI_OBJECT* foundObject = nullptr;
const AI_OBJECT* foundAIObject = nullptr;
for (const auto& aiObject : g_Level.AIObjects)
for (auto& aiObject : g_Level.AIObjects)
{
// Check if object IDs match.
if (aiObject.objectNumber != data.ObjectID)
continue;
// Check if room is valid.
if (aiObject.roomNumber == NO_VALUE)
continue;
// Check if distance is valid.
if (data.CheckDistance)
if (aiObject.objectNumber == objectNumber &&
aiObject.triggerFlags == ocb &&
aiObject.roomNumber != NO_VALUE)
{
if (Vector3i::Distance(item.Pose.Position, aiObject.pos.Position) > data.DistanceMax)
continue;
}
// Check if OCBs match (useful for pathfinding).
if (data.CheckOcb)
{
if (aiObject.triggerFlags != data.Ocb)
continue;
}
// Check if zone IDs match.
if (data.CheckSameZone)
{
int* zone = g_Level.Zones[(int)creature.LOT.Zone][(int)FlipStatus].data();
int* zone = g_Level.Zones[(int)creature->LOT.Zone][(int)FlipStatus].data();
auto* room = &g_Level.Rooms[item.RoomNumber];
// NOTE: Avoid changing box ID of item or AI item so a local variable isn't required when searching for AI object near it.
int boxID = GetSector(room, item.Pose.Position.x - room->Position.x, item.Pose.Position.z - room->Position.z)->PathfindingBoxID;
item.BoxNumber = GetSector(room, item.Pose.Position.x - room->Position.x, item.Pose.Position.z - room->Position.z)->PathfindingBoxID;
room = &g_Level.Rooms[aiObject.roomNumber];
int aiBoxID = GetSector(room, aiObject.pos.Position.x - room->Position.x, aiObject.pos.Position.z - room->Position.z)->PathfindingBoxID;
aiObject.boxNumber = GetSector(room, aiObject.pos.Position.x - room->Position.x, aiObject.pos.Position.z - room->Position.z)->PathfindingBoxID;
// Box is invalid or zones don't match; continue.
if (boxID == NO_VALUE || aiBoxID == NO_VALUE)
continue;
if (item.BoxNumber == NO_VALUE || aiObject.boxNumber == NO_VALUE)
return;
// Zone is invalid; continue.
if (zone[boxID] != zone[aiBoxID])
continue;
if (checkSameZone && (zone[item.BoxNumber] != zone[aiObject.boxNumber]))
return;
// Don't check for same zone. Needed for Sophia Leigh.
foundObject = &aiObject;
}
// HACK: Don't check for matching zone. Needed for Sophia Leigh.
foundAIObject = &aiObject;
}
if (foundAIObject == nullptr)
return false;
if (foundObject == nullptr)
return;
auto aiItem = ItemInfo{};
aiItem.ObjectNumber = foundAIObject->objectNumber;
aiItem.RoomNumber = foundAIObject->roomNumber;
aiItem.Pose.Position = foundAIObject->pos.Position;
aiItem.Pose.Orientation.y = foundAIObject->pos.Orientation.y;
aiItem.Flags = foundAIObject->flags;
aiItem.TriggerFlags = foundAIObject->triggerFlags;
aiItem.BoxNumber = foundAIObject->boxNumber;
auto& aiItem = *creature->AITarget;
if (!(aiItem.Flags & IFLAG_TRIGGERED))
creature->Enemy = &aiItem;
aiItem.ObjectNumber = foundObject->objectNumber;
aiItem.RoomNumber = foundObject->roomNumber;
aiItem.Pose.Position = foundObject->pos.Position;
aiItem.Pose.Orientation.y = foundObject->pos.Orientation.y;
aiItem.Flags = foundObject->flags;
aiItem.TriggerFlags = foundObject->triggerFlags;
aiItem.BoxNumber = foundObject->boxNumber;
if (!(creature->AITarget->Flags & ItemFlags::IFLAG_TRIGGERED))
{
aiItem.Pose.Position.x += CLICK(1) * phd_sin(aiItem.Pose.Orientation.y);
aiItem.Pose.Position.z += CLICK(1) * phd_cos(aiItem.Pose.Orientation.y);
}
float sinY = phd_sin(creature->AITarget->Pose.Orientation.y);
float cosY = phd_cos(creature->AITarget->Pose.Orientation.y);
data.FoundItem = aiItem;
return true;
creature->AITarget->Pose.Position.x += CLICK(1) * sinY;
creature->AITarget->Pose.Position.z += CLICK(1) * cosY;
}
}
int TargetReachable(ItemInfo* item, ItemInfo* enemy)

View file

@ -83,23 +83,10 @@ constexpr auto CLIP_ALL = (CLIP_LEFT | CLIP_RIGHT | CLIP_TOP | CLIP_BOTTOM);
constexpr auto CLIP_SECONDARY = 0x10;
struct AITargetData
{
ItemInfo FoundItem = {};
GAME_OBJECT_ID ObjectID = GAME_OBJECT_ID::ID_NO_OBJECT;
float DistanceMax = 0.0f;
int Ocb = NO_VALUE;
bool CheckDistance = false;
bool CheckSameZone = true;
bool CheckOcb = false;
};
void GetCreatureMood(ItemInfo* item, AI_INFO* AI, bool isViolent);
void CreatureMood(ItemInfo* item, AI_INFO* AI, bool isViolent);
void FindAITargetObject(ItemInfo& item, GAME_OBJECT_ID objectID, std::optional<int> ocb = std::nullopt, std::optional<bool> checkSameZone = std::nullopt);
bool FindAITargetObject(ItemInfo& item, AITargetData& data);
void FindAITargetObject(CreatureInfo* creature, int objectNumber);
void FindAITargetObject(CreatureInfo* creature, int objectNumber, int ocb, bool checkSameZone = true);
void GetAITarget(CreatureInfo* creature);
int CreatureVault(short itemNumber, short angle, int vault, int shift);
bool MoveCreature3DPos(Pose* fromPose, Pose* toPose, int velocity, short angleDif, int angleAdd);

View file

@ -93,13 +93,13 @@ using namespace TEN::Entities::Effects;
constexpr auto DEATH_NO_INPUT_TIMEOUT = 10 * FPS;
constexpr auto DEATH_INPUT_TIMEOUT = 3 * FPS;
int GameTimer = 0;
int GlobalCounter = 0;
int GameTimer = 0;
int GlobalCounter = 0;
bool InitializeGame;
bool DoTheGame;
bool JustLoaded;
bool ThreadEnded;
bool InitializeGame = false;
bool DoTheGame = false;
bool JustLoaded = false;
bool ThreadEnded = false;
int RequiredStartPos;
int CurrentLevel;
@ -121,15 +121,19 @@ void DrawPhase(bool isTitle, float interpolationFactor)
{
g_Renderer.RenderTitle(interpolationFactor);
}
else
else if (g_GameFlow->CurrentFreezeMode == FreezeMode::None)
{
g_Renderer.Render(interpolationFactor);
}
else
{
g_Renderer.RenderFreezeMode(interpolationFactor, g_GameFlow->CurrentFreezeMode == FreezeMode::Full);
}
g_Renderer.Lock();
}
GameStatus ControlPhase(bool insideMenu)
GameStatus GamePhase(bool insideMenu)
{
auto time1 = std::chrono::high_resolution_clock::now();
bool isTitle = (CurrentLevel == 0);
@ -263,6 +267,84 @@ GameStatus ControlPhase(bool insideMenu)
return gameStatus;
}
GameStatus FreezePhase()
{
// If needed when first entering freeze mode, do initialization.
if (g_GameFlow->LastFreezeMode == FreezeMode::None)
{
// Capture the screen for drawing it as a background.
if (g_GameFlow->LastFreezeMode == FreezeMode::Full)
g_Renderer.DumpGameScene(SceneRenderMode::NoHud);
StopRumble();
}
// Update last freeze mode here, so that items won't update inside freeze loop.
g_GameFlow->LastFreezeMode = g_GameFlow->CurrentFreezeMode;
g_Renderer.PrepareScene();
g_Renderer.SaveOldState();
ClearLensFlares();
ClearAllDisplaySprites();
SetupInterpolation();
PrepareCamera();
g_GameStringsHandler->ProcessDisplayStrings(DELTA_TIME);
// Track previous player animation to queue hair update if needed.
int lastAnimNumber = LaraItem->Animation.AnimNumber;
// Poll controls and call scripting events.
HandleControls(false);
g_GameScript->OnFreeze();
HandleAllGlobalEvents(EventType::Freeze, (Activator)LaraItem->Index);
// Partially update scene if not using full freeze mode.
if (g_GameFlow->LastFreezeMode != FreezeMode::Full)
{
if (g_GameFlow->LastFreezeMode == FreezeMode::Player)
UpdateLara(LaraItem, false);
UpdateAllItems();
UpdateGlobalLensFlare();
UpdateCamera();
PlaySoundSources();
Sound_UpdateScene();
}
// HACK: Update player hair if animation was switched in spectator mode.
// Needed for photo mode and other similar functionality.
if (g_GameFlow->LastFreezeMode == FreezeMode::Spectator &&
lastAnimNumber != LaraItem->Animation.AnimNumber)
{
lastAnimNumber = LaraItem->Animation.AnimNumber;
for (int i = 0; i < FPS; i++)
HairEffect.Update(*LaraItem);
}
// Update last freeze mode again, as it may have been changed in a script.
g_GameFlow->LastFreezeMode = g_GameFlow->CurrentFreezeMode;
return GameStatus::Normal;
}
GameStatus ControlPhase(bool insideMenu)
{
// For safety, only allow to break game loop in non-title levels.
if (g_GameFlow->CurrentFreezeMode == FreezeMode::None || CurrentLevel == 0)
{
return GamePhase(insideMenu);
}
else
{
return FreezePhase();
}
}
unsigned CALLBACK GameMain(void *)
{
TENLog("Starting GameMain()...", LogLevel::Info);
@ -551,9 +633,9 @@ GameStatus DoGameLoop(int levelIndex)
int frameCount = LOOP_FRAME_COUNT;
auto& status = g_GameFlow->LastGameStatus;
// Before entering actual game loop, ControlPhase() must be
// called once to sort out various runtime shenanigangs (e.g. hair).
status = ControlPhase(false);
// Before entering actual game loop, GamePhase() must be called once to sort out
// various runtime shenanigangs (e.g. hair or freeze mode initialization).
status = GamePhase(false);
g_Synchronizer.Init();
bool legacy30FpsDoneDraw = false;
@ -573,6 +655,9 @@ GameStatus DoGameLoop(int levelIndex)
if (status != GameStatus::Normal)
break;
if (g_GameFlow->LastFreezeMode != g_GameFlow->CurrentFreezeMode)
continue;
if (!g_Configuration.EnableHighFramerate)
{
if (!legacy30FpsDoneDraw)
@ -671,7 +756,8 @@ GameStatus HandleMenuCalls(bool isTitle)
{
SaveGame::LoadHeaders();
g_Gui.SetInventoryMode(InventoryMode::Load);
g_Gui.CallInventory(LaraItem, false);
if (g_Gui.CallInventory(LaraItem, false))
gameStatus = GameStatus::LoadGame;
}
else if (doPause && g_Gui.GetInventoryMode() != InventoryMode::Pause)
{

View file

@ -26,6 +26,14 @@ enum class GameStatus
LevelComplete
};
enum class FreezeMode
{
None,
Full,
Spectator,
Player
};
enum class LevelLoadType
{
New,

View file

@ -40,6 +40,7 @@ namespace TEN::Control::Volumes
Start,
End,
UseItem,
Freeze,
Count
};

View file

@ -346,6 +346,6 @@ void VoidEffect(ItemInfo* item)
void DoFlipEffect(int number, ItemInfo* item)
{
if (number != -1 && number < NUM_FLIPEFFECTS && effect_routines[number] != nullptr)
if (number != NO_VALUE && number < NUM_FLIPEFFECTS && effect_routines[number] != nullptr)
effect_routines[number](item);
}

View file

@ -287,7 +287,7 @@ bool GetTargetOnLOS(GameVector* origin, GameVector* target, bool drawTarget, boo
{
if (itemNumber < 0)
{
if (GetStaticObject(mesh->staticNumber).shatterType != ShatterType::None)
if (Statics[mesh->staticNumber].shatterType != ShatterType::None)
{
const auto& weapon = Weapons[(int)Lara.Control.Weapon.GunType];
mesh->HitPoints -= weapon.Damage;

View file

@ -197,13 +197,6 @@ void InitializeSlot(short itemNumber, bool makeTarget)
creature->LOT.Drop = -BLOCK(1);
creature->LOT.Zone = ZoneType::Human;
break;
case LotType::EnemyJeep:
creature->LOT.Step = BLOCK(4);
creature->LOT.Drop = -BLOCK(4);
creature->LOT.CanJump = true;
creature->LOT.Zone = ZoneType::Human;
break;
}
ClearLOT(&creature->LOT);

View file

@ -370,7 +370,6 @@ void Trigger(short const value, short const flags)
if (item->Flags & IFLAG_KILLED)
return;
item->TouchBits = NO_JOINT_BITS;
item->Flags |= TRIGGERED;
if (flags & ONESHOT)
@ -408,12 +407,16 @@ void Trigger(short const value, short const flags)
}
item->Status = ITEM_ACTIVE;
item->TouchBits = NO_JOINT_BITS;
item->DisableInterpolation = true;
}
}
void TestTriggers(int x, int y, int z, FloorInfo* floor, Activator activator, bool heavy, int heavyFlags)
{
if (g_GameFlow->CurrentFreezeMode != FreezeMode::None)
return;
bool switchOff = false;
bool flipAvailable = false;
int flip = NO_VALUE;
@ -855,6 +858,9 @@ void TestTriggers(int x, int y, int z, short roomNumber, bool heavy, int heavyFl
void ProcessSectorFlags(ItemInfo* item)
{
if (g_GameFlow->CurrentFreezeMode != FreezeMode::None)
return;
bool isPlayer = item->IsLara();
// HACK: because of L-shaped portal configurations, we need to fetch room number from Location struct for player.

View file

@ -131,6 +131,9 @@ namespace TEN::Control::Volumes
void TestVolumes(short roomNumber, const BoundingOrientedBox& box, ActivatorFlags activatorFlag, Activator activator)
{
if (g_GameFlow->CurrentFreezeMode != FreezeMode::None)
return;
if (roomNumber == NO_VALUE)
return;

View file

@ -70,7 +70,7 @@ void ShatterObject(SHATTER_ITEM* item, MESH_INFO* mesh, int num, short roomNumbe
return;
isStatic = true;
meshIndex = GetStaticObject(mesh->staticNumber).meshNumber;
meshIndex = Statics[mesh->staticNumber].meshNumber;
yRot = mesh->pos.Orientation.y;
pos = Vector3(mesh->pos.Position.x, mesh->pos.Position.y, mesh->pos.Position.z);
scale = mesh->scale;
@ -183,6 +183,9 @@ void ShatterObject(SHATTER_ITEM* item, MESH_INFO* mesh, int num, short roomNumbe
fragment->numBounces = 0;
fragment->color = isStatic ? mesh->color : item->color;
fragment->lightMode = fragmentsMesh->lightMode;
fragment->UpdateTransform();
fragment->StoreInterpolationData();
}
}
}
@ -259,9 +262,7 @@ void UpdateDebris()
deb.numBounces++;
}
auto translation = Matrix::CreateTranslation(deb.worldPosition.x, deb.worldPosition.y, deb.worldPosition.z);
auto rotation = Matrix::CreateFromQuaternion(deb.rotation);
deb.Transform = rotation * translation;
deb.UpdateTransform();
}
}
}

View file

@ -73,6 +73,13 @@ struct DebrisFragment
Matrix PrevTransform = Matrix::Identity;
void UpdateTransform()
{
auto translation = Matrix::CreateTranslation(worldPosition.x, worldPosition.y, worldPosition.z);
auto rot = Matrix::CreateFromQuaternion(rotation);
Transform = rot * translation;
}
void StoreInterpolationData()
{
PrevTransform = Transform;

View file

@ -454,9 +454,7 @@ void TriggerRicochetSpark(const GameVector& pos, short angle, bool sound)
{
int count = Random::GenerateInt(3, 8);
TriggerRicochetSpark(pos, angle, count);
if (sound && Random::TestProbability(1 / 3.0f))
SoundEffect(SFX_TR4_WEAPON_RICOCHET, &Pose(pos.ToVector3i()));
SoundEffect(SFX_TR4_WEAPON_RICOCHET, &Pose(pos.ToVector3i()));
}
void TriggerCyborgSpark(int x, int y, int z, short xv, short yv, short zv)
@ -1249,19 +1247,20 @@ void KillAllCurrentItems(short itemNumber)
// TODO: Reimplement this functionality.
}
// TODO: Rename to SpawnDynamicLight().
void TriggerDynamicLight(const Vector3& pos, const Color& color, float falloff)
void TriggerDynamicPointLight(const Vector3& pos, const Color& color, float falloff, bool castShadows, int hash)
{
g_Renderer.AddDynamicLight(
pos.x, pos.y, pos.z,
falloff * UCHAR_MAX,
color.x * UCHAR_MAX, color.y * UCHAR_MAX, color.z * UCHAR_MAX);
g_Renderer.AddDynamicPointLight(pos, falloff , color, castShadows, hash);
}
void TriggerDynamicSpotLight(const Vector3& pos, const Vector3& dir, const Color& color, float radius, float falloff, float distance, bool castShadows, int hash)
{
g_Renderer.AddDynamicSpotLight(pos, dir, radius, falloff, distance, color, castShadows, hash);
}
// Deprecated. Use above version instead.
void TriggerDynamicLight(int x, int y, int z, short falloff, byte r, byte g, byte b)
{
g_Renderer.AddDynamicLight(x, y, z, falloff, r, g, b);
g_Renderer.AddDynamicPointLight(Vector3(x, y, z), (float)(falloff * UCHAR_MAX), Color(r / (float)UCHAR_MAX, g / (float)UCHAR_MAX, b / (float)UCHAR_MAX), false);
}
void SpawnPlayerWaterSurfaceEffects(const ItemInfo& item, int waterHeight, int waterDepth)

View file

@ -300,6 +300,8 @@ void ControlWaterfallMist(short itemNumber);
void TriggerWaterfallMist(const ItemInfo& item);
void KillAllCurrentItems(short itemNumber);
void TriggerDynamicLight(int x, int y, int z, short falloff, byte r, byte g, byte b);
void TriggerDynamicPointLight(const Vector3& pos, const Color& color, float falloff, bool castShadows = false, int hash = 0);
void TriggerDynamicSpotLight(const Vector3& pos, const Vector3& dir, const Color& color, float radius, float falloff, float distance, bool castShadows = false, int hash = 0);
void TriggerRocketFlame(int x, int y, int z, int xv, int yv, int zv, int itemNumber);
void TriggerRocketSmoke(int x, int y, int z);
void TriggerFlashSmoke(int x, int y, int z, short roomNumber);
@ -313,5 +315,3 @@ void TriggerExplosionBubbles(int x, int y, int z, short roomNumber);
void Ricochet(Pose& pos);
void ProcessEffects(ItemInfo* item);
void UpdateWibble();
void TriggerDynamicLight(const Vector3& pos, const Color& color, float falloff);

View file

@ -1383,7 +1383,7 @@ void UpdateShockwaves()
{
auto lightColor = Color(shockwave.r / (float)UCHAR_MAX, shockwave.g / (float)UCHAR_MAX, shockwave.b / (float)UCHAR_MAX);
auto pos = Vector3(shockwave.x, shockwave.y, shockwave.z);
TriggerDynamicLight(pos, lightColor, shockwave.life / (float)UCHAR_MAX);
TriggerDynamicPointLight(pos, lightColor, shockwave.life / 4.0f);
}
if (shockwave.style != (int)ShockwaveStyle::Knockback)
@ -1474,93 +1474,6 @@ void TriggerExplosionBubble(int x, int y, int z, short roomNumber)
}
}
/*void TriggerExplosionSmokeEnd(int x, int y, int z, int unk)
{
auto* spark = GetFreeParticle();
spark->on = 1;
if (unk)
{
spark->sR = 0;
spark->sG = 0;
spark->sB = 0;
spark->dR = 192;
spark->dG = 192;
spark->dB = 208;
}
else
{
spark->dR = 64;
spark->sR = 144;
spark->sG = 144;
spark->sB = 144;
spark->dG = 64;
spark->dB = 64;
}
spark->colFadeSpeed = 8;
spark->fadeToBlack = 64;
spark->life = spark->sLife = (GetRandomControl() & 0x1F) + 96;
if (unk)
spark->blendMode = BlendMode::Additive;
else
spark->blendMode = 3;
spark->x = (GetRandomControl() & 0x1F) + x - 16;
spark->y = (GetRandomControl() & 0x1F) + y - 16;
spark->z = (GetRandomControl() & 0x1F) + z - 16;
spark->xVel = ((GetRandomControl() & 0xFFF) - 2048) >> 2;
spark->yVel = (GetRandomControl() & 0xFF) - 128;
spark->zVel = ((GetRandomControl() & 0xFFF) - 2048) >> 2;
if (unk)
{
spark->friction = 20;
spark->yVel >>= 4;
spark->y += 32;
}
else
spark->friction = 6;
spark->flags = 538;
spark->rotAng = GetRandomControl() & 0xFFF;
if (GetRandomControl() & 1)
spark->rotAdd = -((GetRandomControl() & 0xF) + 16);
else
spark->rotAdd = (GetRandomControl() & 0xF) + 16;
spark->scalar = 3;
if (unk)
{
spark->maxYvel = 0;
spark->gravity = 0;
}
else
{
spark->gravity = -3 - (GetRandomControl() & 3);
spark->maxYvel = -4 - (GetRandomControl() & 3);
}
int size = (GetRandomControl() & 0x1F) + 128;
spark->dSize = size;
spark->sSize = size >> 2;
spark->size = size >> 2;
}
*/
/*void DrawLensFlares(ItemInfo* item)
{
GameVector pos;
pos.x = item->pos.Position.x;
pos.y = item->pos.Position.y;
pos.z = item->pos.Position.z;
pos.roomNumber = item->roomNumber;
SetUpLensFlare(0, 0, 0, &pos);
}*/
void TriggerFenceSparks(int x, int y, int z, int kill, int crane)
{
auto* spark = GetFreeParticle();

View file

@ -3168,9 +3168,7 @@ namespace TEN::Gui
bool GuiController::CallPause()
{
ClearAllDisplaySprites();
g_Renderer.PrepareScene();
g_Renderer.DumpGameScene();
g_Renderer.DumpGameScene(SceneRenderMode::NoHud);
PauseAllSounds(SoundPauseMode::Pause);
SoundEffect(SFX_TR4_MENU_SELECT, nullptr, SoundEnvironment::Always);
@ -3251,9 +3249,7 @@ namespace TEN::Gui
player.Inventory.OldBusy = player.Inventory.IsBusy;
ClearAllDisplaySprites();
g_Renderer.PrepareScene();
g_Renderer.DumpGameScene();
g_Renderer.DumpGameScene(SceneRenderMode::NoHud);
PauseAllSounds(SoundPauseMode::Inventory);
SoundEffect(SFX_TR4_MENU_SELECT, nullptr, SoundEnvironment::Always);
@ -3524,7 +3520,7 @@ namespace TEN::Gui
else
{
SoundEffect(SFX_TR4_MENU_CHOOSE, nullptr, SoundEnvironment::Always);
NextLevel = -(SelectedSaveSlot + 1);
g_GameFlow->SelectedSaveGame = SelectedSaveSlot;
return LoadResult::Load;
}
}

View file

@ -763,28 +763,30 @@ void UpdateAllItems()
while (itemNumber != NO_VALUE)
{
auto* item = &g_Level.Items[itemNumber];
short nextItem = item->NextActive;
itemNumber = item->NextActive;
if (!Objects.CheckID(item->ObjectNumber))
continue;
if (g_GameFlow->LastFreezeMode != FreezeMode::None && !Objects[item->ObjectNumber].AlwaysActive)
continue;
if (item->AfterDeath <= ITEM_DEATH_TIMEOUT)
{
if (Objects[item->ObjectNumber].control)
Objects[item->ObjectNumber].control(itemNumber);
Objects[item->ObjectNumber].control(item->Index);
TestVolumes(itemNumber);
TestVolumes(item->Index);
ProcessEffects(item);
if (item->AfterDeath > 0 && item->AfterDeath < ITEM_DEATH_TIMEOUT && !(Wibble & 3))
item->AfterDeath++;
if (item->AfterDeath == ITEM_DEATH_TIMEOUT)
KillItem(itemNumber);
KillItem(item->Index);
}
else
KillItem(itemNumber);
KillItem(item->Index);
itemNumber = nextItem;
}
InItemControlLoop = false;

View file

@ -903,7 +903,7 @@ void DropPickups(ItemInfo* item)
for (auto* staticPtr : collObjects.Statics)
{
auto& object = GetStaticObject(staticPtr->staticNumber);
auto& object = Statics[staticPtr->staticNumber];
auto box = object.collisionBox.ToBoundingOrientedBox(staticPtr->pos);
if (box.Intersects(sphere))

View file

@ -255,11 +255,11 @@ GameBoundingBox& GetBoundsAccurate(const MESH_INFO& mesh, bool getVisibilityBox)
if (getVisibilityBox)
{
bounds = GetStaticObject(mesh.staticNumber).visibilityBox * mesh.scale;
bounds = Statics[mesh.staticNumber].visibilityBox * mesh.scale;
}
else
{
bounds = GetStaticObject(mesh.staticNumber).collisionBox * mesh.scale;
bounds = Statics[mesh.staticNumber].collisionBox * mesh.scale;
}
return bounds;

View file

@ -21,18 +21,18 @@ extern int FlipMap[MAX_FLIPMAP];
enum RoomEnvFlags
{
ENV_FLAG_WATER = (1 << 0),
ENV_FLAG_SWAMP = (1 << 2),
ENV_FLAG_OUTSIDE = (1 << 3),
ENV_FLAG_DYNAMIC_LIT = (1 << 4),
ENV_FLAG_WIND = (1 << 5),
ENV_FLAG_NOT_NEAR_OUTSIDE = (1 << 6),
ENV_FLAG_NO_LENSFLARE = (1 << 7),
ENV_FLAG_MIST = (1 << 8),
ENV_FLAG_CAUSTICS = (1 << 9),
ENV_FLAG_UNKNOWN3 = (1 << 10),
ENV_FLAG_DAMAGE = (1 << 11),
ENV_FLAG_COLD = (1 << 12)
ENV_FLAG_WATER = (1 << 0),
ENV_FLAG_SWAMP = (1 << 2),
ENV_FLAG_SKYBOX = (1 << 3),
ENV_FLAG_DYNAMIC_LIT = (1 << 4),
ENV_FLAG_WIND = (1 << 5),
ENV_FLAG_NOT_NEAR_SKYBOX = (1 << 6),
ENV_FLAG_NO_LENSFLARE = (1 << 7),
ENV_FLAG_MIST = (1 << 8),
ENV_FLAG_CAUSTICS = (1 << 9),
ENV_FLAG_UNKNOWN3 = (1 << 10),
ENV_FLAG_DAMAGE = (1 << 11),
ENV_FLAG_COLD = (1 << 12)
};
enum StaticMeshFlags : short

View file

@ -1408,6 +1408,12 @@ const std::vector<byte> SaveGame::Build()
std::vector<std::string> callbackVecPreLoop;
std::vector<std::string> callbackVecPostLoop;
std::vector<std::string> callbackVecPreUseItem;
std::vector<std::string> callbackVecPostUseItem;
std::vector<std::string> callbackVecPreFreeze;
std::vector<std::string> callbackVecPostFreeze;
g_GameScript->GetCallbackStrings(
callbackVecPreStart,
callbackVecPostStart,
@ -1418,7 +1424,11 @@ const std::vector<byte> SaveGame::Build()
callbackVecPreLoad,
callbackVecPostLoad,
callbackVecPreLoop,
callbackVecPostLoop);
callbackVecPostLoop,
callbackVecPreUseItem,
callbackVecPostUseItem,
callbackVecPreFreeze,
callbackVecPostFreeze);
auto stringsCallbackPreStart = fbb.CreateVectorOfStrings(callbackVecPreStart);
auto stringsCallbackPostStart = fbb.CreateVectorOfStrings(callbackVecPostStart);
@ -1430,6 +1440,10 @@ const std::vector<byte> SaveGame::Build()
auto stringsCallbackPostLoad = fbb.CreateVectorOfStrings(callbackVecPostLoad);
auto stringsCallbackPreLoop = fbb.CreateVectorOfStrings(callbackVecPreLoop);
auto stringsCallbackPostLoop = fbb.CreateVectorOfStrings(callbackVecPostLoop);
auto stringsCallbackPreUseItem = fbb.CreateVectorOfStrings(callbackVecPreUseItem);
auto stringsCallbackPostUseItem = fbb.CreateVectorOfStrings(callbackVecPostUseItem);
auto stringsCallbackPreFreeze = fbb.CreateVectorOfStrings(callbackVecPreFreeze);
auto stringsCallbackPostFreeze = fbb.CreateVectorOfStrings(callbackVecPostFreeze);
Save::SaveGameBuilder sgb{ fbb };
@ -1496,6 +1510,12 @@ const std::vector<byte> SaveGame::Build()
sgb.add_callbacks_pre_loop(stringsCallbackPreLoop);
sgb.add_callbacks_post_loop(stringsCallbackPostLoop);
sgb.add_callbacks_pre_useitem(stringsCallbackPreUseItem);
sgb.add_callbacks_post_useitem(stringsCallbackPostUseItem);
sgb.add_callbacks_pre_freeze(stringsCallbackPreFreeze);
sgb.add_callbacks_post_freeze(stringsCallbackPostFreeze);
auto sg = sgb.Finish();
fbb.Finish(sg);
@ -1816,6 +1836,12 @@ static void ParseLua(const Save::SaveGame* s)
auto callbacksPreLoopVec = populateCallbackVecs(&Save::SaveGame::callbacks_pre_loop);
auto callbacksPostLoopVec = populateCallbackVecs(&Save::SaveGame::callbacks_post_loop);
auto callbacksPreUseItemVec = populateCallbackVecs(&Save::SaveGame::callbacks_pre_useitem);
auto callbacksPostUseItemVec = populateCallbackVecs(&Save::SaveGame::callbacks_post_useitem);
auto callbacksPreFreezeVec = populateCallbackVecs(&Save::SaveGame::callbacks_pre_freeze);
auto callbacksPostFreezeVec = populateCallbackVecs(&Save::SaveGame::callbacks_post_freeze);
g_GameScript->SetCallbackStrings(
callbacksPreStartVec,
callbacksPostStartVec,
@ -1826,7 +1852,11 @@ static void ParseLua(const Save::SaveGame* s)
callbacksPreLoadVec,
callbacksPostLoadVec,
callbacksPreLoopVec,
callbacksPostLoopVec);
callbacksPostLoopVec,
callbacksPreUseItemVec,
callbacksPostUseItemVec,
callbacksPreFreezeVec,
callbacksPostFreezeVec);
}
static void ParsePlayer(const Save::SaveGame* s)

View file

@ -7,32 +7,75 @@
#include "Scripting/Include/ScriptInterfaceLevel.h"
#include "Scripting/Include/Flow/ScriptInterfaceFlowHandler.h"
#include "Specific/level.h"
#include "Game/Lara/lara_helpers.h"
using namespace TEN::Math;
namespace TEN::Entities::Effects
{
std::vector<LensFlare> LensFlares;
constexpr float MAX_INTENSITY = 1.0f; // Maximum intensity
constexpr float FADE_SPEED = 0.10f; // Speed of fade-in/out per frame
constexpr float SHIMMER_STRENGTH = 0.15f; // Max shimmer amplitude
constexpr float DEFAULT_FALLOFF_RADIUS = BLOCK(64);
static void SetupLensFlare(const Vector3& pos, int roomNumber, const Color& color, bool isGlobal, int spriteID)
float GlobalLensFlareIntensity = 0;
std::vector<LensFlare> LensFlares;
static void UpdateLensFlareIntensity(bool isVisible, float& intensity)
{
auto lensFlarePos = Vector3::Zero;
// Target intensity based on visibility.
float targetIntensity = isVisible ? MAX_INTENSITY : 0.0f;
// Fade-in or fade-out.
if (intensity < targetIntensity)
intensity = std::min(intensity + FADE_SPEED, targetIntensity);
else if (intensity > targetIntensity)
intensity = std::max(intensity - FADE_SPEED, targetIntensity);
}
static void AdjustLensflarePosition(Vector3& lensFlarePos, const Vector3& targetPos, float divisor, float threshold)
{
// Gradually narrow lensflare vector down to target vector, until threshold is met.
auto delta = Vector3(FLT_MAX);
while (delta.Length() > threshold)
{
delta = lensFlarePos - targetPos;
lensFlarePos -= delta / divisor;
}
}
static void SetupLensFlare(const Vector3& pos, int roomNumber, const Color& color, float& intensity, int spriteID)
{
auto cameraPos = Camera.pos.ToVector3();
auto cameraTarget = Camera.target.ToVector3();
auto forward = (cameraTarget - cameraPos);
forward.Normalize();
// Discard lensflares behind camera.
if (forward.Dot(pos - cameraPos) < 0.0f)
return;
bool isGlobal = roomNumber == NO_VALUE;
bool isVisible = true;
// Don't draw global lensflare if camera is in a room with no lensflare flag set.
if (isGlobal && TestEnvironment(ENV_FLAG_NO_LENSFLARE, Camera.pos.RoomNumber))
isVisible = false;
auto lensFlarePos = pos;
if (isGlobal)
{
if (TestEnvironment(ENV_FLAG_NO_LENSFLARE, Camera.pos.RoomNumber))
return;
// Gradually move lensflare position to a nearest point within closest room.
AdjustLensflarePosition(lensFlarePos, cameraPos, 8.0f, BLOCK(256));
AdjustLensflarePosition(lensFlarePos, cameraPos, 4.0f, BLOCK(32));
lensFlarePos = pos;
auto delta = (lensFlarePos - Camera.pos.ToVector3()) / 16.0f;
while (abs(delta.x) > BLOCK(200) || abs(delta.y) > BLOCK(200) || abs(delta.z) > BLOCK(200))
lensFlarePos -= delta;
// FAILSAFE: Break while loop if room can't be found (e.g. camera is in the void).
int narrowingCycleCount = 0;
delta = (lensFlarePos - Camera.pos.ToVector3()) / 16.0f;
while (abs(delta.x) > BLOCK(32) || abs(delta.y) > BLOCK(32) || abs(delta.z) > BLOCK(32))
lensFlarePos -= delta;
delta = (lensFlarePos - Camera.pos.ToVector3()) / 16.0f;
for (int i = 0; i < 16; i++)
while (roomNumber == NO_VALUE && narrowingCycleCount < 16)
{
int foundRoomNumber = IsRoomOutside(lensFlarePos.x, lensFlarePos.y, lensFlarePos.z);
if (foundRoomNumber != NO_VALUE)
@ -41,37 +84,56 @@ namespace TEN::Entities::Effects
break;
}
lensFlarePos -= delta;
AdjustLensflarePosition(lensFlarePos, cameraPos, 2.0f, BLOCK(32));
narrowingCycleCount++;
}
// Don't draw global lensflare, if not in room or in rooms where skybox is not visible.
if (roomNumber == NO_VALUE || TestEnvironment(ENV_FLAG_NOT_NEAR_SKYBOX, roomNumber))
isVisible = false;
}
else
// Do occlusion tests only if lensflare passed the previous checks.
if (isVisible)
{
float dist = Vector3::Distance(pos, Camera.pos.ToVector3());
if (dist > BLOCK(32))
return;
auto origin = GameVector(lensFlarePos, roomNumber);
auto target = Camera.pos;
auto distance = Vector3::Distance(origin.ToVector3(), target.ToVector3());
lensFlarePos = pos;
// Check room occlusion.
isVisible = LOS(&origin, &target);
MESH_INFO* mesh = nullptr;
auto pointOfContact = Vector3i();
// Check occlusion for all static meshes and moveables but player.
bool collided = isVisible && ObjectOnLOS2(&origin, &target, &pointOfContact, &mesh) != NO_LOS_ITEM;
if (collided && Vector3::Distance(pointOfContact.ToVector3(), origin.ToVector3()) < distance)
isVisible = false;
// Check occlusion only for player.
int playerItemNumber = isVisible ? ObjectOnLOS2(&origin, &target, &pointOfContact, nullptr, ID_LARA) : NO_LOS_ITEM;
collided = isVisible && playerItemNumber != NO_LOS_ITEM && !GetLaraInfo(g_Level.Items[playerItemNumber]).Control.Look.IsUsingBinoculars;
if (collided && Vector3::Distance(pointOfContact.ToVector3(), origin.ToVector3()) < distance)
isVisible = false;
}
bool isVisible = false;
if (roomNumber != NO_VALUE)
{
if (TestEnvironment(ENV_FLAG_NOT_NEAR_OUTSIDE, roomNumber) || !isGlobal)
{
auto origin = Camera.pos;
auto target = GameVector(lensFlarePos, roomNumber);
isVisible = LOS(&origin, &target);
}
}
// Fade in/out lensflares depending on their visibility.
UpdateLensFlareIntensity(isVisible, intensity);
if (!isVisible && !isGlobal)
// Lensflare is completely invisible.
if (!isVisible && intensity == 0.0f)
return;
// Generate slight shimmer.
float shimmer = Random::GenerateFloat(-SHIMMER_STRENGTH, SHIMMER_STRENGTH);
float finalIntensity = std::clamp(Smoothstep(intensity) + shimmer * intensity, 0.0f, MAX_INTENSITY);
auto lensFlare = LensFlare{};
lensFlare.Position = pos;
lensFlare.RoomNumber = roomNumber;
lensFlare.IsGlobal = isGlobal;
lensFlare.Color = color;
lensFlare.Color = color * Smoothstep(finalIntensity);
lensFlare.SpriteID = spriteID;
LensFlares.push_back(lensFlare);
@ -92,15 +154,37 @@ namespace TEN::Entities::Effects
auto rotMatrix = orient.ToRotationMatrix();
pos += Vector3::Transform(BASE_POS, rotMatrix);
SetupLensFlare(pos, NO_VALUE, color, true, spriteID);
SetupLensFlare(pos, NO_VALUE, color, GlobalLensFlareIntensity, spriteID);
}
void ControlLensFlare(int itemNumber)
{
auto& item = g_Level.Items[itemNumber];
if (TriggerActive(&item))
SetupLensFlare(item.Pose.Position.ToVector3(), item.RoomNumber, item.Model.Color, false, SPRITE_TYPES::SPR_LENS_FLARE_3);
if (!TriggerActive(&item))
return;
auto color = item.Model.Color;
// If OCB is set, it specifies radius in blocks, after which flare starts to fadeout.
float radius = (item.TriggerFlags > 0) ? (float)(item.TriggerFlags * BLOCK(1)) : DEFAULT_FALLOFF_RADIUS;
float distance = Vector3i::Distance(item.Pose.Position, Camera.pos.ToVector3i());
if (distance > radius)
{
float fadeMultiplier = std::max((1.0f - ((distance - radius) / radius)), 0.0f);
// Discard flare, if it is out of falloff sphere radius.
if (fadeMultiplier <= 0.0f)
return;
color *= fadeMultiplier;
}
// Intensity value can be modified inside lensflare setup function.
float currentIntensity = (float)item.ItemFlags[0] / 100.0f;
SetupLensFlare(item.Pose.Position.ToVector3(), item.RoomNumber, color, currentIntensity, SPRITE_TYPES::SPR_LENS_FLARE_3);
item.ItemFlags[0] = (short)(currentIntensity * 100.0f);
}
void ClearLensFlares()

View file

@ -61,5 +61,6 @@ void InitializeEffectsObjects()
{
obj->drawRoutine = nullptr;
obj->control = ControlLensFlare;
obj->AlwaysActive = true;
}
}

View file

@ -74,28 +74,26 @@ namespace TEN::Entities::Creatures::TR2
// Spawn light.
auto lightPos = item.Pose.Position.ToVector3() + Vector3(0.0f, -CLICK(1), 0.0f);
auto lightColor = Color(0.0f,Random::GenerateFloat(0.7f, 1.0f), Random::GenerateFloat(0.2f, 0.3f));
float lightFalloff = Random::GenerateFloat(0.1f, 0.2f);
float transformationLightFalloff = (0.5, 1.0);
TriggerDynamicLight(lightPos, lightColor, lightFalloff);
TriggerDynamicPointLight(lightPos, lightColor, Random::GenerateFloat(BLOCK(6), BLOCK(12)));
// Handle transformation.
if (effectTimer == timeExplosion1)
{
TriggerDynamicLight(lightPos, lightColor, transformationLightFalloff);
TriggerDynamicPointLight(lightPos, lightColor, Random::GenerateFloat(BLOCK(12), BLOCK(24)));
SpawnBartoliTransformEffect(item, ID_SPHERE_OF_DOOM);
SoundEffect(SFX_TR2_MARCO_BARTOLLI_TRANSFORM, &item.Pose);
}
if (effectTimer == timeExplosion2)
{
TriggerDynamicLight(lightPos, lightColor, transformationLightFalloff);
TriggerDynamicPointLight(lightPos, lightColor, Random::GenerateFloat(BLOCK(12), BLOCK(24)));
SpawnBartoliTransformEffect(item, ID_SPHERE_OF_DOOM2);
SoundEffect(SFX_TR2_MARCO_BARTOLLI_TRANSFORM, &item.Pose);
}
if (effectTimer == timeExplosion3)
{
TriggerDynamicLight(lightPos, lightColor, transformationLightFalloff);
TriggerDynamicPointLight(lightPos, lightColor, Random::GenerateFloat(BLOCK(12), BLOCK(24)));
SpawnBartoliTransformEffect(item, ID_SPHERE_OF_DOOM3);
SoundEffect(SFX_TR2_MARCO_BARTOLLI_TRANSFORM, &item.Pose);
item.Animation.FrameNumber = animationFrameEnd;

View file

@ -193,9 +193,9 @@ namespace TEN::Entities::Creatures::TR2
Random::GenerateFloat(0.8f, 0.9f),
Random::GenerateFloat(0.4f, 0.5f),
Random::GenerateFloat(0.2f, 0.3f));
float falloff = Random::GenerateFloat(0.1f, 0.4f);
float falloff = Random::GenerateFloat(BLOCK(6), BLOCK(20));
TriggerDynamicLight(pos, color, falloff);
TriggerDynamicPointLight(pos, color, falloff);
}
break;
@ -205,9 +205,9 @@ namespace TEN::Entities::Creatures::TR2
Random::GenerateFloat(0.8f, 0.9f),
Random::GenerateFloat(0.2f, 0.3f),
Random::GenerateFloat(0.0f, 0.1f));
float falloff = Random::GenerateFloat(0.1f, 0.2f);
float falloff = Random::GenerateFloat(BLOCK(6), BLOCK(12));
TriggerDynamicLight(pos, color, falloff);
TriggerDynamicPointLight(pos, color, falloff);
}
break;
}

View file

@ -184,7 +184,7 @@ namespace TEN::Entities::Creatures::TR3
// Follow path.
if (item.AIBits && !item.ItemFlags[4])
{
FindAITargetObject(item, ID_AI_FOLLOW, item.ItemFlags[3] + item.ItemFlags[2], false);
FindAITargetObject(&creature, ID_AI_FOLLOW, item.ItemFlags[3] + item.ItemFlags[2], false);
if (creature.AITarget->TriggerFlags == (item.ItemFlags[3] + item.ItemFlags[2]) &&
creature.AITarget->ObjectNumber == ID_AI_FOLLOW)

View file

@ -178,8 +178,8 @@ namespace TEN::Entities::Creatures::TR3
{
auto pos = GetJointPosition(item, SealMutantGasBite.BoneID, Vector3(0.0f, -SEAL_MUTANT_FLAME_LIGHT_Y_OFFSET, 0.0f));
auto color = Color(Random::GenerateFloat(0.75f, 1.0f), Random::GenerateFloat(0.4f, 0.5f), Random::GenerateFloat(0.0f, 0.25f));
float falloff = Random::GenerateFloat(0.03f, 0.04f);
TriggerDynamicLight(pos.ToVector3(), color, falloff);
float falloff = Random::GenerateFloat(BLOCK(1.5f), BLOCK(2.5f));
TriggerDynamicPointLight(pos.ToVector3(), color, falloff);
}
}
else if (TestAnimFrameRange(item, 1, 124))

View file

@ -289,7 +289,7 @@ namespace TEN::Entities::Creatures::TR3
// Check the previous and next position of AI object to
// allow Sophia to go up or down based on enemy's vertical position.
FindAITargetObject(item, ID_AI_X1, creature->LocationAI, false);
FindAITargetObject(creature, ID_AI_X1, creature->LocationAI, false);
if (Vector3i::Distance(item.Pose.Position, creature->Enemy->Pose.Position) < SOPHIALEIGH_REACHED_GOAL_RANGE)
{

Some files were not shown because too many files have changed in this diff Show more