TombEngine/Documentation/doc/1 modules/Logic.html

562 lines
22 KiB
HTML
Raw Normal View History

2022-04-10 00:38:39 +01:00
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.2 Lua API</title>
2022-04-10 00:38:39 +01:00
<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/>
Customize global hardcoded parameters (#1495) * Initial commit * Update CHANGELOG.md * Tint flare smoke * Expose GetCustomizations * Added lensflare and flicker customization options for flare * Update LensFlare.cpp * Remove unnecessary code * Update lara_flare.cpp * Massive refactor to merge animations, settings and customizations * Add HUD customization options * Customize weapons * Fixed flare, renamed recoil to interval, fixed lensflare default * Occlude flare lensflares * Update Settings.cpp * Use alternate damage for lasersight mode * Added hair cust * Fix comment * Fix another comment * Fix link * Fix placeholder table names * Reorganize types * Add missing initializers for hair settings * Added physics cust * Clarify description * Update settings.lua * Update CHANGELOG.md * Add gun smoke, gun shells and ammo pickup counts * Fix naming ambiguity * Remove missing features from documentation * Fix comment * Fix parameter name, change default settings file * Fixed pitch black * Rollback DoDistanceFogForVertex * Add camera cust * Change binocular/lasersight toggle to color * Update lara_basic.cpp * Add time and statistics classes and script API for it * Fix comment * Use DoDamage on Lara helpers to register with statistics * Update Time.cpp * Fix documentation * Fix default flare timeout * Update Settings.lua * Add flare muzzle offset customization * Remove young Lara limitations * Fix lasersight color * Push full settings.lua * Update RendererCompatibility.cpp * Allow to customize root meshes, decopypaste hair and joint init code * Added sol Time operator overloads * Some changes to docs, add meaningful error for unknown fields * Use existing new index template, add gunflash color settings, add shotgun muzzle * Remove excessive usage of GetSettings() * Cleanups * Update Settings.lua * Clarify parameter name * Fix InitializeWeaponInfo * PR review code tidying * Fix bad merge * Update FlowHandler.cpp * Remove tabs for LDoc comments * Use different comment style to preserve formatting * Update lara_fire.cpp * Some cleanups * Fixed GetTimeUnits * Fix typo * Update Time.cpp --------- Co-authored-by: Sezz <sezzary@outlook.com>
2024-12-15 19:24:49 +03:00
<h1>&nbsp;TombEngine</h1>
2022-04-10 00:38:39 +01:00
<ul>
<li><a href="../index.html">Index</a></li>
</ul>
<h2>1 Modules</h2>
<ul class="nowrap">
2022-12-09 22:08:16 +00:00
<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>
2022-12-09 22:08:16 +00:00
<li> <a href="../1 modules/Inventory.html">Inventory</a></li>
<li> <here>Logic</here></li>
<li> <a href="../1 modules/Objects.html">Objects</a></li>
<li> <a href="../1 modules/Sound.html">Sound</a></li>
2022-12-09 22:08:16 +00:00
<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>
2022-04-10 00:38:39 +01:00
</ul>
<h2>2 Classes</h2>
<ul class="nowrap">
<li> <a href="../2 classes/Collision.Probe.html">Collision.Probe</a></li>
2022-12-09 22:08:16 +00:00
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
2024-12-15 23:59:31 +01:00
<li> <a href="../2 classes/Flow.Statistics.html">Flow.Statistics</a></li>
2022-12-09 22:08:16 +00:00
<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>
2022-12-30 16:33:26 +00:00
<li> <a href="../2 classes/Objects.Room.html">Objects.Room</a></li>
2022-12-09 22:08:16 +00:00
<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>
2022-12-16 18:36:42 +00:00
<li> <a href="../2 classes/Objects.Volume.html">Objects.Volume</a></li>
2022-12-09 22:08:16 +00:00
<li> <a href="../2 classes/Strings.DisplayString.html">Strings.DisplayString</a></li>
Customize global hardcoded parameters (#1495) * Initial commit * Update CHANGELOG.md * Tint flare smoke * Expose GetCustomizations * Added lensflare and flicker customization options for flare * Update LensFlare.cpp * Remove unnecessary code * Update lara_flare.cpp * Massive refactor to merge animations, settings and customizations * Add HUD customization options * Customize weapons * Fixed flare, renamed recoil to interval, fixed lensflare default * Occlude flare lensflares * Update Settings.cpp * Use alternate damage for lasersight mode * Added hair cust * Fix comment * Fix another comment * Fix link * Fix placeholder table names * Reorganize types * Add missing initializers for hair settings * Added physics cust * Clarify description * Update settings.lua * Update CHANGELOG.md * Add gun smoke, gun shells and ammo pickup counts * Fix naming ambiguity * Remove missing features from documentation * Fix comment * Fix parameter name, change default settings file * Fixed pitch black * Rollback DoDistanceFogForVertex * Add camera cust * Change binocular/lasersight toggle to color * Update lara_basic.cpp * Add time and statistics classes and script API for it * Fix comment * Use DoDamage on Lara helpers to register with statistics * Update Time.cpp * Fix documentation * Fix default flare timeout * Update Settings.lua * Add flare muzzle offset customization * Remove young Lara limitations * Fix lasersight color * Push full settings.lua * Update RendererCompatibility.cpp * Allow to customize root meshes, decopypaste hair and joint init code * Added sol Time operator overloads * Some changes to docs, add meaningful error for unknown fields * Use existing new index template, add gunflash color settings, add shotgun muzzle * Remove excessive usage of GetSettings() * Cleanups * Update Settings.lua * Clarify parameter name * Fix InitializeWeaponInfo * PR review code tidying * Fix bad merge * Update FlowHandler.cpp * Remove tabs for LDoc comments * Use different comment style to preserve formatting * Update lara_fire.cpp * Some cleanups * Fixed GetTimeUnits * Fix typo * Update Time.cpp --------- Co-authored-by: Sezz <sezzary@outlook.com>
2024-12-15 19:24:49 +03:00
<li> <a href="../2 classes/View.DisplaySprite.html">View.DisplaySprite</a></li>
2022-04-10 00:38:39 +01:00
</ul>
<h2>3 Primitive Classes</h2>
<ul class="nowrap">
Customize global hardcoded parameters (#1495) * Initial commit * Update CHANGELOG.md * Tint flare smoke * Expose GetCustomizations * Added lensflare and flicker customization options for flare * Update LensFlare.cpp * Remove unnecessary code * Update lara_flare.cpp * Massive refactor to merge animations, settings and customizations * Add HUD customization options * Customize weapons * Fixed flare, renamed recoil to interval, fixed lensflare default * Occlude flare lensflares * Update Settings.cpp * Use alternate damage for lasersight mode * Added hair cust * Fix comment * Fix another comment * Fix link * Fix placeholder table names * Reorganize types * Add missing initializers for hair settings * Added physics cust * Clarify description * Update settings.lua * Update CHANGELOG.md * Add gun smoke, gun shells and ammo pickup counts * Fix naming ambiguity * Remove missing features from documentation * Fix comment * Fix parameter name, change default settings file * Fixed pitch black * Rollback DoDistanceFogForVertex * Add camera cust * Change binocular/lasersight toggle to color * Update lara_basic.cpp * Add time and statistics classes and script API for it * Fix comment * Use DoDamage on Lara helpers to register with statistics * Update Time.cpp * Fix documentation * Fix default flare timeout * Update Settings.lua * Add flare muzzle offset customization * Remove young Lara limitations * Fix lasersight color * Push full settings.lua * Update RendererCompatibility.cpp * Allow to customize root meshes, decopypaste hair and joint init code * Added sol Time operator overloads * Some changes to docs, add meaningful error for unknown fields * Use existing new index template, add gunflash color settings, add shotgun muzzle * Remove excessive usage of GetSettings() * Cleanups * Update Settings.lua * Clarify parameter name * Fix InitializeWeaponInfo * PR review code tidying * Fix bad merge * Update FlowHandler.cpp * Remove tabs for LDoc comments * Use different comment style to preserve formatting * Update lara_fire.cpp * Some cleanups * Fixed GetTimeUnits * Fix typo * Update Time.cpp --------- Co-authored-by: Sezz <sezzary@outlook.com>
2024-12-15 19:24:49 +03:00
<li> <a href="../3 primitive classes/Flow.Fog.html">Flow.Fog</a></li>
<li> <a href="../3 primitive classes/Flow.Horizon.html">Flow.Horizon</a></li>
Customize global hardcoded parameters (#1495) * Initial commit * Update CHANGELOG.md * Tint flare smoke * Expose GetCustomizations * Added lensflare and flicker customization options for flare * Update LensFlare.cpp * Remove unnecessary code * Update lara_flare.cpp * Massive refactor to merge animations, settings and customizations * Add HUD customization options * Customize weapons * Fixed flare, renamed recoil to interval, fixed lensflare default * Occlude flare lensflares * Update Settings.cpp * Use alternate damage for lasersight mode * Added hair cust * Fix comment * Fix another comment * Fix link * Fix placeholder table names * Reorganize types * Add missing initializers for hair settings * Added physics cust * Clarify description * Update settings.lua * Update CHANGELOG.md * Add gun smoke, gun shells and ammo pickup counts * Fix naming ambiguity * Remove missing features from documentation * Fix comment * Fix parameter name, change default settings file * Fixed pitch black * Rollback DoDistanceFogForVertex * Add camera cust * Change binocular/lasersight toggle to color * Update lara_basic.cpp * Add time and statistics classes and script API for it * Fix comment * Use DoDamage on Lara helpers to register with statistics * Update Time.cpp * Fix documentation * Fix default flare timeout * Update Settings.lua * Add flare muzzle offset customization * Remove young Lara limitations * Fix lasersight color * Push full settings.lua * Update RendererCompatibility.cpp * Allow to customize root meshes, decopypaste hair and joint init code * Added sol Time operator overloads * Some changes to docs, add meaningful error for unknown fields * Use existing new index template, add gunflash color settings, add shotgun muzzle * Remove excessive usage of GetSettings() * Cleanups * Update Settings.lua * Clarify parameter name * Fix InitializeWeaponInfo * PR review code tidying * Fix bad merge * Update FlowHandler.cpp * Remove tabs for LDoc comments * Use different comment style to preserve formatting * Update lara_fire.cpp * Some cleanups * Fixed GetTimeUnits * Fix typo * Update Time.cpp --------- Co-authored-by: Sezz <sezzary@outlook.com>
2024-12-15 19:24:49 +03:00
<li> <a href="../3 primitive classes/Flow.InventoryItem.html">Flow.InventoryItem</a></li>
<li> <a href="../3 primitive classes/Flow.LensFlare.html">Flow.LensFlare</a></li>
<li> <a href="../3 primitive classes/Flow.SkyLayer.html">Flow.SkyLayer</a></li>
2025-03-15 01:01:05 +01:00
<li> <a href="../3 primitive classes/Flow.Starfield.html">Flow.Starfield</a></li>
2022-12-09 22:08:16 +00:00
<li> <a href="../3 primitive classes/Color.html">Color</a></li>
<li> <a href="../3 primitive classes/Rotation.html">Rotation</a></li>
Customize global hardcoded parameters (#1495) * Initial commit * Update CHANGELOG.md * Tint flare smoke * Expose GetCustomizations * Added lensflare and flicker customization options for flare * Update LensFlare.cpp * Remove unnecessary code * Update lara_flare.cpp * Massive refactor to merge animations, settings and customizations * Add HUD customization options * Customize weapons * Fixed flare, renamed recoil to interval, fixed lensflare default * Occlude flare lensflares * Update Settings.cpp * Use alternate damage for lasersight mode * Added hair cust * Fix comment * Fix another comment * Fix link * Fix placeholder table names * Reorganize types * Add missing initializers for hair settings * Added physics cust * Clarify description * Update settings.lua * Update CHANGELOG.md * Add gun smoke, gun shells and ammo pickup counts * Fix naming ambiguity * Remove missing features from documentation * Fix comment * Fix parameter name, change default settings file * Fixed pitch black * Rollback DoDistanceFogForVertex * Add camera cust * Change binocular/lasersight toggle to color * Update lara_basic.cpp * Add time and statistics classes and script API for it * Fix comment * Use DoDamage on Lara helpers to register with statistics * Update Time.cpp * Fix documentation * Fix default flare timeout * Update Settings.lua * Add flare muzzle offset customization * Remove young Lara limitations * Fix lasersight color * Push full settings.lua * Update RendererCompatibility.cpp * Allow to customize root meshes, decopypaste hair and joint init code * Added sol Time operator overloads * Some changes to docs, add meaningful error for unknown fields * Use existing new index template, add gunflash color settings, add shotgun muzzle * Remove excessive usage of GetSettings() * Cleanups * Update Settings.lua * Clarify parameter name * Fix InitializeWeaponInfo * PR review code tidying * Fix bad merge * Update FlowHandler.cpp * Remove tabs for LDoc comments * Use different comment style to preserve formatting * Update lara_fire.cpp * Some cleanups * Fixed GetTimeUnits * Fix typo * Update Time.cpp --------- Co-authored-by: Sezz <sezzary@outlook.com>
2024-12-15 19:24:49 +03:00
<li> <a href="../3 primitive classes/Time.html">Time</a></li>
2023-05-31 21:48:00 +01:00
<li> <a href="../3 primitive classes/Vec2.html">Vec2</a></li>
2022-12-09 22:08:16 +00:00
<li> <a href="../3 primitive classes/Vec3.html">Vec3</a></li>
2022-04-10 00:38:39 +01:00
</ul>
<h2>4 Enums</h2>
<ul class="nowrap">
<li> <a href="../4 enums/Collision.MaterialType.html">Collision.MaterialType</a></li>
2022-12-09 22:08:16 +00:00
<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/Effects.StreamerFeatherMode.html">Effects.StreamerFeatherMode</a></li>
<li> <a href="../4 enums/Effects.ParticleAnimationType.html">Effects.ParticleAnimationType</a></li>
Customize global hardcoded parameters (#1495) * Initial commit * Update CHANGELOG.md * Tint flare smoke * Expose GetCustomizations * Added lensflare and flicker customization options for flare * Update LensFlare.cpp * Remove unnecessary code * Update lara_flare.cpp * Massive refactor to merge animations, settings and customizations * Add HUD customization options * Customize weapons * Fixed flare, renamed recoil to interval, fixed lensflare default * Occlude flare lensflares * Update Settings.cpp * Use alternate damage for lasersight mode * Added hair cust * Fix comment * Fix another comment * Fix link * Fix placeholder table names * Reorganize types * Add missing initializers for hair settings * Added physics cust * Clarify description * Update settings.lua * Update CHANGELOG.md * Add gun smoke, gun shells and ammo pickup counts * Fix naming ambiguity * Remove missing features from documentation * Fix comment * Fix parameter name, change default settings file * Fixed pitch black * Rollback DoDistanceFogForVertex * Add camera cust * Change binocular/lasersight toggle to color * Update lara_basic.cpp * Add time and statistics classes and script API for it * Fix comment * Use DoDamage on Lara helpers to register with statistics * Update Time.cpp * Fix documentation * Fix default flare timeout * Update Settings.lua * Add flare muzzle offset customization * Remove young Lara limitations * Fix lasersight color * Push full settings.lua * Update RendererCompatibility.cpp * Allow to customize root meshes, decopypaste hair and joint init code * Added sol Time operator overloads * Some changes to docs, add meaningful error for unknown fields * Use existing new index template, add gunflash color settings, add shotgun muzzle * Remove excessive usage of GetSettings() * Cleanups * Update Settings.lua * Clarify parameter name * Fix InitializeWeaponInfo * PR review code tidying * Fix bad merge * Update FlowHandler.cpp * Remove tabs for LDoc comments * Use different comment style to preserve formatting * Update lara_fire.cpp * Some cleanups * Fixed GetTimeUnits * Fix typo * Update Time.cpp --------- Co-authored-by: Sezz <sezzary@outlook.com>
2024-12-15 19:24:49 +03:00
<li> <a href="../4 enums/Flow.ErrorMode.html">Flow.ErrorMode</a></li>
Freeze event and OnUseItem callbacks (#1463) * Add use item callbacks, add menu boilerplate code * Set up scripting API for game mode * Use word "break" instead of "menu" everywhere * Rudimentary implementation of BreakPhase * More progress * Doc update * Always active lensflare * Update CHANGELOG.md * Fix hair interpolation for spectator mode * Update target highlighter and other HUD elements while in break mode * Fix various problems * Don't try to update camera in spectator mode * Cleanup camera code * Rename break to freeze * Update FlowHandler.cpp * Update Flow.html * Update control.cpp * Rename method * Add displaystring owner to differentiate between freeze modes * Disable triggers and volumes in freeze mode * Update control.cpp * Rename enum * Update CHANGELOG.md * Implement full freeze, correct callback behaviour * Update RendererDrawMenu.cpp * Allow DumpGameScene to do partial pass * Remove hack * Introduce render mode enum to render scene without any postprocess * Tidying * Fix problems with items or renderer not updating before entering freeze mode * Fix rebase errors * Use interpolation factor getter instead of raw value everywhere * Update documentation * Fixed setting freeze mode from OnStart * Fixed freeze mode not working in OnStart event * Revert "Fixed freeze mode not working in OnStart event" This reverts commit 87f6fbdc6d776bb7813133a84c8ba9d0b1171f3b. * Bypass cinematic bars and fades for non-full render modes --------- Co-authored-by: Stranger1992 <84292688+Stranger1992@users.noreply.github.com> Co-authored-by: Sezz <sezzary@outlook.com>
2024-11-20 23:54:39 +03:00
<li> <a href="../4 enums/Flow.FreezeMode.html">Flow.FreezeMode</a></li>
2023-12-26 20:47:08 +00:00
<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.HandStatus.html">Objects.HandStatus</a></li>
<li> <a href="../4 enums/Objects.WeaponType.html">Objects.WeaponType</a></li>
2023-12-26 20:47:08 +00:00
<li> <a href="../4 enums/Objects.MoveableStatus.html">Objects.MoveableStatus</a></li>
2022-12-09 22:08:16 +00:00
<li> <a href="../4 enums/Objects.ObjID.html">Objects.ObjID</a></li>
2022-12-30 16:33:26 +00:00
<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>
2024-11-16 22:07:57 +11:00
<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>
2022-04-10 00:38:39 +01:00
</ul>
<h2>5 Lua utility modules</h2>
<ul class="nowrap">
<li> <a href="../5 lua utility modules/CustomBar.html">CustomBar</a></li>
<li> <a href="../5 lua utility modules/Diary.html">Diary</a></li>
2022-12-09 22:08:16 +00:00
<li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li>
<li> <a href="../5 lua utility modules/Timer.html">Timer</a></li>
2024-12-16 21:33:37 +01:00
<li> <a href="../5 lua utility modules/Type.html">Type</a></li>
</ul>
2022-04-10 00:38:39 +01:00
</div>
<div id="content">
<h1>Table <code>Logic</code></h1>
2022-05-13 14:31:04 +01:00
<p>Saving data, triggering functions, and callbacks for level-specific scripts.</p>
2022-04-10 00:38:39 +01:00
<p>
</p>
<h2><a href="#Functions">Functions</a></h2>
<table class="function_list">
<tr>
2023-12-26 20:47:08 +00:00
<td class="name" ><a href="#AddCallback">AddCallback(point, func)</a></td>
<td class="summary">Register a function as a callback.</td>
</tr>
<tr>
2023-12-26 20:47:08 +00:00
<td class="name" ><a href="#RemoveCallback">RemoveCallback(point, func)</a></td>
<td class="summary">Deregister a function as a callback.</td>
</tr>
<tr>
<td class="name" ><a href="#HandleEvent">HandleEvent(name, type, [activator])</a></td>
2023-12-26 20:47:08 +00:00
<td class="summary">Attempt to find an event set and execute a particular event from it.</td>
</tr>
<tr>
<td class="name" ><a href="#EnableEvent">EnableEvent(name, type)</a></td>
<td class="summary">Attempt to find an event set and enable specified event in it.</td>
</tr>
<tr>
<td class="name" ><a href="#DisableEvent">DisableEvent(name, type)</a></td>
<td class="summary">Attempt to find an event set and disable specified event in it.</td>
</tr>
</table>
2022-04-10 00:38:39 +01:00
<h2><a href="#Special_objects">Special objects </a></h2>
<table class="function_list">
<tr>
<td class="name" ><a href="#Lara">Lara</a></td>
<td class="summary">An <a href="../2 classes/Objects.Moveable.html#">Objects.Moveable</a> entry representing Lara herself.</td>
2022-04-10 00:38:39 +01:00
</tr>
</table>
<h2><a href="#Special_tables">Special tables </a></h2>
<table class="function_list">
<tr>
<td class="name" ><a href="#LevelVars">LevelVars</a></td>
<td class="summary">A table with level-specific data which will be saved and loaded.</td>
</tr>
<tr>
<td class="name" ><a href="#GameVars">GameVars</a></td>
<td class="summary">A table with game data which will be saved and loaded.</td>
</tr>
<tr>
<td class="name" ><a href="#LevelFuncs">LevelFuncs</a></td>
2022-09-07 20:57:50 +01:00
<td class="summary">A table nested table system for level-specific functions.</td>
2022-04-10 00:38:39 +01:00
</tr>
</table>
<br/>
<br/>
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
<dl class="function">
<dt>
<a name = "AddCallback"></a>
2023-12-26 20:47:08 +00:00
<strong>AddCallback(point, func)</strong>
</dt>
<dd>
Register a function as a callback.
2023-05-31 21:48:00 +01:00
<p>This is intended for module/library developers who want their modules to do
stuff during level start/load/end/save/control phase, but don't want the level
designer to add calls to <code>OnStart</code>, <code>OnLoad</code>, etc. in their level script.</p>
2023-12-26 20:47:08 +00:00
<p>Possible values for <code>point</code>:</p>
2023-05-31 21:48:00 +01:00
<pre class="example"><span class="comment">-- These take functions which accept no arguments
</span>PRE_START <span class="comment">-- will be called immediately before OnStart
</span>POST_START <span class="comment">-- will be called immediately after OnStart
2023-05-31 21:48:00 +01:00
</span>
PRE_SAVE <span class="comment">-- will be called immediately before OnSave
</span>POST_SAVE <span class="comment">-- will be called immediately after OnSave
2023-05-31 21:48:00 +01:00
</span>
PRE_LOAD <span class="comment">-- will be called immediately before OnLoad
</span>POST_LOAD <span class="comment">-- will be called immediately after OnLoad
2023-05-31 21:48:00 +01:00
</span>
PRE_FREEZE <span class="comment">-- will be called before entering freeze mode
</span>POST_FREEZE <span class="comment">-- will be called immediately after exiting freeze mode
Freeze event and OnUseItem callbacks (#1463) * Add use item callbacks, add menu boilerplate code * Set up scripting API for game mode * Use word "break" instead of "menu" everywhere * Rudimentary implementation of BreakPhase * More progress * Doc update * Always active lensflare * Update CHANGELOG.md * Fix hair interpolation for spectator mode * Update target highlighter and other HUD elements while in break mode * Fix various problems * Don't try to update camera in spectator mode * Cleanup camera code * Rename break to freeze * Update FlowHandler.cpp * Update Flow.html * Update control.cpp * Rename method * Add displaystring owner to differentiate between freeze modes * Disable triggers and volumes in freeze mode * Update control.cpp * Rename enum * Update CHANGELOG.md * Implement full freeze, correct callback behaviour * Update RendererDrawMenu.cpp * Allow DumpGameScene to do partial pass * Remove hack * Introduce render mode enum to render scene without any postprocess * Tidying * Fix problems with items or renderer not updating before entering freeze mode * Fix rebase errors * Use interpolation factor getter instead of raw value everywhere * Update documentation * Fixed setting freeze mode from OnStart * Fixed freeze mode not working in OnStart event * Revert "Fixed freeze mode not working in OnStart event" This reverts commit 87f6fbdc6d776bb7813133a84c8ba9d0b1171f3b. * Bypass cinematic bars and fades for non-full render modes --------- Co-authored-by: Stranger1992 <84292688+Stranger1992@users.noreply.github.com> Co-authored-by: Sezz <sezzary@outlook.com>
2024-11-20 23:54:39 +03:00
</span>
2023-05-31 21:48:00 +01:00
<span class="comment">-- These take a LevelEndReason arg, like OnEnd
</span>PRE_END <span class="comment">-- will be called immediately before OnEnd
</span>POST_END <span class="comment">-- will be called immediately after OnEnd
2023-05-31 21:48:00 +01:00
</span>
<span class="comment">-- These take functions which accepts a deltaTime argument
</span>PRE_LOOP <span class="comment">-- will be called in the beginning of game loop
</span>POST_LOOP <span class="comment">-- will be called at the end of game loop
Freeze event and OnUseItem callbacks (#1463) * Add use item callbacks, add menu boilerplate code * Set up scripting API for game mode * Use word "break" instead of "menu" everywhere * Rudimentary implementation of BreakPhase * More progress * Doc update * Always active lensflare * Update CHANGELOG.md * Fix hair interpolation for spectator mode * Update target highlighter and other HUD elements while in break mode * Fix various problems * Don't try to update camera in spectator mode * Cleanup camera code * Rename break to freeze * Update FlowHandler.cpp * Update Flow.html * Update control.cpp * Rename method * Add displaystring owner to differentiate between freeze modes * Disable triggers and volumes in freeze mode * Update control.cpp * Rename enum * Update CHANGELOG.md * Implement full freeze, correct callback behaviour * Update RendererDrawMenu.cpp * Allow DumpGameScene to do partial pass * Remove hack * Introduce render mode enum to render scene without any postprocess * Tidying * Fix problems with items or renderer not updating before entering freeze mode * Fix rebase errors * Use interpolation factor getter instead of raw value everywhere * Update documentation * Fixed setting freeze mode from OnStart * Fixed freeze mode not working in OnStart event * Revert "Fixed freeze mode not working in OnStart event" This reverts commit 87f6fbdc6d776bb7813133a84c8ba9d0b1171f3b. * Bypass cinematic bars and fades for non-full render modes --------- Co-authored-by: Stranger1992 <84292688+Stranger1992@users.noreply.github.com> Co-authored-by: Sezz <sezzary@outlook.com>
2024-11-20 23:54:39 +03:00
</span>
<span class="comment">-- These take functions which accepts an objectNumber argument, like OnUseItem
</span>PRE_USE_ITEM <span class="comment">-- will be called immediately before OnUseItem
</span>POST_USE_ITEM <span class="comment">-- will be called immediately after OnUseItem
2022-12-09 22:08:16 +00:00
</span></pre>
2022-12-11 18:40:31 +00:00
<p>The order in which two functions with the same CallbackPoint are called is undefined.
2023-12-26 20:47:08 +00:00
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>
2022-09-07 20:57:50 +01:00
2022-12-11 18:40:31 +00:00
<p>Any returned value will be discarded.</p>
<h3>Parameters:</h3>
<ul>
2023-12-26 20:47:08 +00:00
<li><span class="parameter">point</span>
<span class="types"><span class="type">CallbackPoint</span></span>
When should the callback be called?
</li>
2022-09-07 20:57:50 +01:00
<li><span class="parameter">func</span>
2023-12-26 20:47:08 +00:00
<span class="types"><span class="type">LevelFunc</span></span>
2023-05-31 21:48:00 +01:00
The function to be called (must be in the <a href="../1 modules/Logic.html#LevelFuncs">LevelFuncs</a> hierarchy). Will receive, as an argument, the time in seconds since the last frame.
</li>
</ul>
<h3>Usage:</h3>
<ul>
<pre class="example">LevelFuncs.MyFunc = <span class="keyword">function</span>(dt) <span class="global">print</span>(dt) <span class="keyword">end</span>
2023-12-26 20:47:08 +00:00
TEN.Logic.AddCallback(TEN.Logic.CallbackPoint.PRELOOP, LevelFuncs.MyFunc)</pre>
</ul>
</dd>
<dt>
<a name = "RemoveCallback"></a>
2023-12-26 20:47:08 +00:00
<strong>RemoveCallback(point, func)</strong>
</dt>
<dd>
Deregister a function as a callback.
Will have no effect if the function was not registered as a callback
2022-12-09 22:08:16 +00:00
<h3>Parameters:</h3>
<ul>
2023-12-26 20:47:08 +00:00
<li><span class="parameter">point</span>
<span class="types"><span class="type">CallbackPoint</span></span>
The callback point the function was registered with. See <a href="../1 modules/Logic.html#AddCallback">AddCallback</a>
</li>
2023-12-26 20:47:08 +00:00
<li><span class="parameter">func</span>
<span class="types"><span class="type">LevelFunc</span></span>
The function to remove; must be in the LevelFuncs hierarchy.
</li>
</ul>
<h3>Usage:</h3>
<ul>
2023-12-26 20:47:08 +00:00
<pre class="example">TEN.Logic.RemoveCallback(TEN.Logic.CallbackPoint.PRELOOP, LevelFuncs.MyFunc)</pre>
</ul>
</dd>
<dt>
<a name = "HandleEvent"></a>
<strong>HandleEvent(name, type, [activator])</strong>
</dt>
<dd>
2023-12-26 20:47:08 +00:00
Attempt to find an event set and execute a particular event from it.
2023-12-26 20:47:08 +00:00
<p>Possible event type values:</p>
<pre class="example">ENTER
INSIDE
LEAVE
LOAD
SAVE
START
END
LOOP
USE_ITEM
Freeze event and OnUseItem callbacks (#1463) * Add use item callbacks, add menu boilerplate code * Set up scripting API for game mode * Use word "break" instead of "menu" everywhere * Rudimentary implementation of BreakPhase * More progress * Doc update * Always active lensflare * Update CHANGELOG.md * Fix hair interpolation for spectator mode * Update target highlighter and other HUD elements while in break mode * Fix various problems * Don't try to update camera in spectator mode * Cleanup camera code * Rename break to freeze * Update FlowHandler.cpp * Update Flow.html * Update control.cpp * Rename method * Add displaystring owner to differentiate between freeze modes * Disable triggers and volumes in freeze mode * Update control.cpp * Rename enum * Update CHANGELOG.md * Implement full freeze, correct callback behaviour * Update RendererDrawMenu.cpp * Allow DumpGameScene to do partial pass * Remove hack * Introduce render mode enum to render scene without any postprocess * Tidying * Fix problems with items or renderer not updating before entering freeze mode * Fix rebase errors * Use interpolation factor getter instead of raw value everywhere * Update documentation * Fixed setting freeze mode from OnStart * Fixed freeze mode not working in OnStart event * Revert "Fixed freeze mode not working in OnStart event" This reverts commit 87f6fbdc6d776bb7813133a84c8ba9d0b1171f3b. * Bypass cinematic bars and fades for non-full render modes --------- Co-authored-by: Stranger1992 <84292688+Stranger1992@users.noreply.github.com> Co-authored-by: Sezz <sezzary@outlook.com>
2024-11-20 23:54:39 +03:00
MENU</pre>
<h3>Parameters:</h3>
<ul>
2023-12-26 20:47:08 +00:00
<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>
Name of the event set to find.
</li>
2023-12-26 20:47:08 +00:00
<li><span class="parameter">type</span>
<span class="types"><span class="type">EventType</span></span>
Event to execute.
</li>
2023-12-26 20:47:08 +00:00
<li><span class="parameter">activator</span>
<span class="types"><a class="type" href="../2 classes/Objects.Moveable.html#">Moveable</a></span>
Optional activator.
<em>Default: Lara.</em>
</li>
</ul>
2023-12-26 20:47:08 +00:00
</dd>
<dt>
<a name = "EnableEvent"></a>
<strong>EnableEvent(name, type)</strong>
</dt>
<dd>
Attempt to find an event set and enable specified event in it.
<h3>Parameters:</h3>
<ul>
<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>
Name of the event set to find.
</li>
<li><span class="parameter">type</span>
<span class="types"><span class="type">EventType</span></span>
Event to enable.
</li>
</ul>
</dd>
<dt>
<a name = "DisableEvent"></a>
<strong>DisableEvent(name, type)</strong>
</dt>
<dd>
Attempt to find an event set and disable specified event in it.
<h3>Parameters:</h3>
<ul>
<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>
Name of the event set to find.
</li>
<li><span class="parameter">type</span>
<span class="types"><span class="type">EventType</span></span>
Event to disable.
</li>
</ul>
</dd>
</dl>
2022-04-10 00:38:39 +01:00
<h2 class="section-header "><a name="Special_objects"></a>Special objects </h2>
<dl class="function">
<dt>
<a name = "Lara"></a>
<strong>Lara</strong>
</dt>
<dd>
An <a href="../2 classes/Objects.Moveable.html#">Objects.Moveable</a> entry representing Lara herself.
2022-04-10 00:38:39 +01:00
2022-12-09 22:08:16 +00:00
2022-04-10 00:38:39 +01:00
</dd>
</dl>
<h2 class="section-header has-description"><a name="Special_tables"></a>Special tables </h2>
<div class="section-description">
TombEngine uses the following tables for specific things.
</div>
<dl class="function">
<dt>
<a name = "LevelVars"></a>
<strong>LevelVars</strong>
</dt>
<dd>
A table with level-specific data which will be saved and loaded.
2022-12-09 22:08:16 +00:00
This is for level-specific information that you want to store in saved games.
2022-04-10 00:38:39 +01:00
2022-12-11 18:40:31 +00:00
<p>For example, you may have a level with a custom puzzle where Lara has
2022-04-10 00:38:39 +01:00
to kill exactly seven enemies to open a door to a secret. You could use
2022-12-11 18:40:31 +00:00
the following line each time an enemy is killed:</p>
2022-12-09 22:08:16 +00:00
<pre class="example">LevelVars.enemiesKilled = LevelVars.enemiesKilled + <span class="number">1</span></pre>
2022-12-11 18:40:31 +00:00
<p>If the player saves the level after killing three, saves, and then reloads the save
2022-04-10 00:38:39 +01:00
some time later, the values <code>3</code> will be put back into <code>LevelVars.enemiesKilled.</code></p>
<p><strong>This table is emptied when a level is finished.</strong> If the player needs to be able
to return to the level (like in the Karnak and Alexandria levels in <em>The Last Revelation</em>),
2022-09-07 20:57:50 +01:00
you will need to use the <a href="../1 modules/Logic.html#GameVars">GameVars</a> table, below.</p>
2022-12-11 18:40:31 +00:00
<p><strong>LevelVars.Engine is a reserved table used internally by TombEngine's libs. Do not modify, overwrite, or add to it.</strong></p>
2022-04-10 00:38:39 +01:00
</dd>
<dt>
<a name = "GameVars"></a>
<strong>GameVars</strong>
</dt>
<dd>
A table with game data which will be saved and loaded.
This is for information not specific to any level, but which concerns your whole
2022-12-09 22:08:16 +00:00
levelset or game, that you want to store in saved games.
2022-04-10 00:38:39 +01:00
2022-12-11 18:40:31 +00:00
<p>For example, you may wish to have a final boss say a specific voice line based on
2022-04-10 00:38:39 +01:00
a choice the player made in a previous level. In the level with the choice, you could
2022-12-11 18:40:31 +00:00
write:</p>
2022-12-09 22:08:16 +00:00
<pre class="example">GameVars.playerSnoopedInDrawers = <span class="keyword">true</span></pre>
2022-12-11 18:40:31 +00:00
<p>And in the script file for the level with the boss, you could write:</p>
2022-12-09 22:08:16 +00:00
<pre class="example"><span class="keyword">if</span> GameVars.playerSnoopedInDrawers <span class="keyword">then</span>
PlayAudioTrack(<span class="string">"how_dare_you.wav"</span>)
<span class="keyword">end</span></pre>
2022-12-11 18:40:31 +00:00
<p>Unlike <a href="../1 modules/Logic.html#LevelVars">LevelVars</a>, this table will remain intact for the entirety of the game.</p>
2022-09-07 20:57:50 +01:00
2022-12-11 18:40:31 +00:00
<p><strong>GameVars.Engine is a reserved table used internally by TombEngine's libs. Do not modify, overwrite, or add to it.</strong></p>
2022-04-10 00:38:39 +01:00
</dd>
<dt>
<a name = "LevelFuncs"></a>
<strong>LevelFuncs</strong>
</dt>
<dd>
2022-12-09 22:08:16 +00:00
A table nested table system for level-specific functions.
2022-05-23 21:27:05 +01:00
2022-12-11 18:40:31 +00:00
<p>This serves a few purposes: it holds the level callbacks (listed below) as well as
2022-04-10 00:38:39 +01:00
any trigger functions you might have specified. For example, if you give a trigger
a Lua name of "my_trigger" in Tomb Editor, you will have to implement it as a member
2022-12-11 18:40:31 +00:00
of this table:</p>
2022-12-09 22:08:16 +00:00
<pre class="example">LevelFuncs.my_trigger = <span class="keyword">function</span>()
<span class="comment">-- implementation goes here
</span><span class="keyword">end</span></pre>
2022-12-11 18:40:31 +00:00
<p>You can organise functions into tables within the hierarchy:</p>
2022-12-09 22:08:16 +00:00
<pre class="example">LevelFuncs.enemyFuncs = {}
LevelFuncs.enemyFuncs.makeBaddyRunAway = <span class="keyword">function</span>()
<span class="comment">-- implementation goes here
</span><span class="keyword">end</span>
LevelFuncs.enemyFuncs.makeBaddyUseMedkit = <span class="keyword">function</span>()
<span class="comment">-- implementation goes here
</span><span class="keyword">end</span></pre>
2022-12-11 18:40:31 +00:00
<p>There are two special subtables which you should <strong>not</strong> overwrite:</p>
2022-12-09 22:08:16 +00:00
<pre class="example">LevelFuncs.Engine <span class="comment">-- this is for 'first-party' functions, i.e. ones that come with TombEngine.
</span>LevelFuncs.External <span class="comment">-- this is for 'third-party' functions. If you write a library providing LevelFuncs functions for other builders to use in their levels, put those functions in LevelFuncs.External.YourLibraryNameHere
</span></pre>
2022-12-11 18:40:31 +00:00
<p>
2022-04-10 00:38:39 +01:00
<p>The following are the level callbacks. They are optional; if your level has no special
behaviour for a particular scenario, you do not need to implement the function. For
example, if your level does not need any special initialisation when it is loaded,
2022-05-23 21:27:05 +01:00
you can just leave out <code>LevelFuncs.OnStart</code>.</p>
<p><strong>The order of loading is as follows:</strong></p>
<ol>
<li>The level data itself is loaded.</li>
<li>The level script itself is run (i.e. any code you put outside the <a href="../1 modules/Logic.html#LevelFuncs">LevelFuncs</a> callbacks is executed).</li>
<li>Save data is loaded, if saving from a saved game (will empty <a href="../1 modules/Logic.html#LevelVars">LevelVars</a> and <a href="../1 modules/Logic.html#GameVars">GameVars</a> and repopulate them with what they contained when the game was saved).</li>
<li>If loading from a save, <code>OnLoaded</code> will be called. Otherwise, <code>OnStart</code> will be called.</li>
2023-12-26 20:47:08 +00:00
<li>The control loop, in which <code>OnLoop</code> will be called once per frame, begins.</li>
2022-05-23 21:27:05 +01:00
</ol>
2022-12-11 18:40:31 +00:00
</p>
2022-04-10 00:38:39 +01:00
<h3>Fields:</h3>
<ul>
<li><span class="parameter">OnStart</span>
<span class="types"><span class="type">function</span></span>
2022-05-23 21:27:05 +01:00
Will be called when a level is entered by completing a previous level or by selecting it in the menu. Will not be called when loaded from a saved game.
2022-04-10 00:38:39 +01:00
</li>
<li><span class="parameter">OnLoad</span>
<span class="types"><span class="type">function</span></span>
2023-01-26 21:20:50 +00:00
Will be called when a saved game is loaded, just <em>after</em> data is loaded
2022-04-10 00:38:39 +01:00
</li>
2023-12-26 20:47:08 +00:00
<li><span class="parameter">OnLoop</span>
2022-04-10 00:38:39 +01:00
<span class="types"><span class="type">function(float)</span></span>
Will be called during the game's update loop,
and provides the delta time (a float representing game time since last call) via its argument.
</li>
<li><span class="parameter">OnSave</span>
<span class="types"><span class="type">function</span></span>
2023-01-26 21:20:50 +00:00
Will be called when the player saves the game, just <em>before</em> data is saved
2022-04-10 00:38:39 +01:00
</li>
<li><span class="parameter">OnEnd</span>
<span class="types"><span class="type">function</span></span>
2023-05-31 21:48:00 +01:00
<p>(EndReason) Will be called when leaving a level. This includes finishing it, exiting to the menu, or loading a save in a different level. It can take an <code>EndReason</code> arg:</p>
<pre><code>EXIT_TO_TITLE
LEVEL_COMPLETE
LOAD_GAME
2023-05-31 21:48:00 +01:00
DEATH
OTHER
</code></pre>
<p>For example:</p>
<pre><code>LevelFuncs.OnEnd = function(reason)
if(reason == TEN.Logic.EndReason.DEATH) then
print("death")
end
end
</code></pre>
2022-04-10 00:38:39 +01:00
</li>
Shader manager (#1534) * Squashed commit of the following: commit 0543f9146aa233d05b09a86d72ccba9f890477a3 Author: Lwmte <3331699+Lwmte@users.noreply.github.com> Date: Wed Dec 25 13:49:12 2024 +0100 Fix bad merge commit 529ffb50dd8439672bae970dcdbff3e1d5ed2188 Merge: 329bb52ec a1c76af54 Author: Lwmte <3331699+Lwmte@users.noreply.github.com> Date: Wed Dec 25 13:47:26 2024 +0100 Merge branch 'develop' into realtime_shader_reloading commit 329bb52ec71fc2673928e27dcc1d33cb19ee9847 Merge: 3f749b485 ac800ff1e Author: Lwmte <3331699+Lwmte@users.noreply.github.com> Date: Wed Dec 25 13:40:38 2024 +0100 Merge branch 'develop_mirrors' into realtime_shader_reloading commit ac800ff1e10bd9d7ea1fc1548fb0605ca9d07312 Author: Sezz <sezzary@outlook.com> Date: Wed Dec 25 18:23:26 2024 +1100 Final formatting pass commit c2b275672547671242191c030f629499d1f561f3 Author: Sezz <sezzary@outlook.com> Date: Wed Dec 25 18:22:59 2024 +1100 Update RendererFrame.cpp commit d32eeac7abd6d10f4ce2757afe8e9e29040f788b Author: Sezz <sezzary@outlook.com> Date: Wed Dec 25 18:15:45 2024 +1100 Reapply "Formatting pass" This reverts commit becd24da93a2eb33bf78b9be97f6dc6b25d6e744. commit becd24da93a2eb33bf78b9be97f6dc6b25d6e744 Author: Sezz <sezzary@outlook.com> Date: Wed Dec 25 18:12:43 2024 +1100 Revert "Formatting pass" This reverts commit 88a8ba24dea9cf7006920c8d7a52b6d047f6d749. commit 88a8ba24dea9cf7006920c8d7a52b6d047f6d749 Author: Sezz <sezzary@outlook.com> Date: Wed Dec 25 17:35:39 2024 +1100 Formatting pass commit a56d487e30326a3181651cbad6f0522a7c1f1eac Author: Jakub <80340234+Jakub768@users.noreply.github.com> Date: Wed Dec 25 00:31:11 2024 +0000 Update CHANGELOG.md commit 86aad7c7b1f523702fb0f832c8b1ff3c65ee2d01 Merge: daa65d4e3 e3ecc3acd Author: Lwmte <3331699+Lwmte@users.noreply.github.com> Date: Tue Dec 24 23:22:50 2024 +0100 Merge branch 'develop' into develop_mirrors commit daa65d4e3c59364cca6aebae19a0c82b40ad2824 Author: Lwmte <3331699+Lwmte@users.noreply.github.com> Date: Tue Dec 24 20:46:01 2024 +0100 Update CHANGELOG.md commit 58fc1a8ea0ceb40f9db3217462a430429c39f690 Merge: 63ffb77bd ee867fb9d Author: Lwmte <3331699+Lwmte@users.noreply.github.com> Date: Tue Dec 24 20:15:28 2024 +0100 Merge branch 'develop' into develop_mirrors commit 63ffb77bd683948698f1eda7d0f688307e757063 Merge: b3195ae83 3ea8978c6 Author: Lwmte <3331699+Lwmte@users.noreply.github.com> Date: Tue Dec 24 20:07:53 2024 +0100 Merge branch 'develop' into develop_mirrors commit b3195ae83f3e32c3de1da717f68aa40b5f72dd0c Author: Lwmte <3331699+Lwmte@users.noreply.github.com> Date: Tue Dec 24 20:01:11 2024 +0100 Update RendererInit.cpp commit 3f749b485608c02028b696fdc1819c2a22a4cee4 Author: Lwmte <3331699+Lwmte@users.noreply.github.com> Date: Tue Dec 24 09:10:07 2024 +0100 Reload shaders on graphic settings change commit f04dcd42cc9affdc6c3d6d017ca435f414d492b0 Merge: 63539e4f9 1118b2fb2 Author: Lwmte <3331699+Lwmte@users.noreply.github.com> Date: Tue Dec 24 08:57:13 2024 +0100 Merge branch 'develop_mirrors' into realtime_shader_reloading commit 1118b2fb221669a504215e7d8366ec6139f6a47d Author: Lwmte <3331699+Lwmte@users.noreply.github.com> Date: Tue Dec 24 08:47:33 2024 +0100 Disable self-shadowing for now, as it's causing visual glitches commit 63539e4f98f2e807ce91374d7633301a426fbb62 Merge: ca25f8773 32f94c2f2 Author: Lwmte <3331699+Lwmte@users.noreply.github.com> Date: Tue Dec 24 01:49:18 2024 +0100 Merge branch 'develop_mirrors' into realtime_shader_reloading commit 32f94c2f2aea7a9feca2ec5d27ce9d146df20524 Merge: e6f4e9e24 c757422f2 Author: Lwmte <3331699+Lwmte@users.noreply.github.com> Date: Tue Dec 24 01:35:17 2024 +0100 Merge branch 'develop' into develop_mirrors commit e6f4e9e24b1cc09d1129fb7764d0ad586edd43bb Author: Lwmte <3331699+Lwmte@users.noreply.github.com> Date: Tue Dec 24 01:07:20 2024 +0100 Implement proper soft shadows commit 9fbcc7b8cfa0dc56695f755265c9134df3e190b3 Author: Lwmte <3331699+Lwmte@users.noreply.github.com> Date: Tue Dec 24 00:52:32 2024 +0100 Fixed silent crash if several Lara objects are present in level near dynamic light with shadow commit ca25f87738b09f74ad3d4f6598ab692f63d34b6b Author: Lwmte <3331699+Lwmte@users.noreply.github.com> Date: Tue Dec 24 00:51:11 2024 +0100 Work commit 12dae8df9924dc7f21d240e3fe05aa718c548c34 Author: Lwmte <3331699+Lwmte@users.noreply.github.com> Date: Sun Dec 22 22:55:50 2024 +0100 Fixed #1524 commit 9df39696a289a2dbe16347af4a8175e409eae6eb Merge: 724953329 6d38bb361 Author: Lwmte <3331699+Lwmte@users.noreply.github.com> Date: Sun Dec 22 20:45:10 2024 +0100 Merge branch 'develop' into develop_mirrors commit 724953329025349b4c1fc9e99f59e59a08f5d3ee Author: Lwmte <3331699+Lwmte@users.noreply.github.com> Date: Sun Dec 22 20:42:06 2024 +0100 Fixed postprocessing order and precompile shaders to speed-up loading commit b75d14184f25b0709eb08690bc833e91d513a0f0 Author: Lwmte <3331699+Lwmte@users.noreply.github.com> Date: Sun Dec 22 19:57:12 2024 +0100 Fix #1525 commit bcf4dc5497f5a9152a907004bd405a22c641a31b Author: Lwmte <3331699+Lwmte@users.noreply.github.com> Date: Sun Dec 22 16:11:53 2024 +0100 Interpolate Lara flare light, hide target highlighters in binos commit 9e923a36bb19b6d2e17eeddcd4b78db8e52f0955 Author: Lwmte <3331699+Lwmte@users.noreply.github.com> Date: Sun Dec 22 15:06:27 2024 +0100 Fixed #1522 commit 1de0d48d5874f01f3629aac0b73eca19932c655e Author: Lwmte <3331699+Lwmte@users.noreply.github.com> Date: Sat Dec 21 22:07:46 2024 +0100 Fixed #1521 commit 7076014c9bac586ca9d68c27d094a52024cb590e Merge: af097017f b62c8d7c4 Author: Lwmte <3331699+Lwmte@users.noreply.github.com> Date: Sat Dec 21 20:03:47 2024 +0100 Merge branch 'develop' into develop_mirrors commit af097017f580075bb95283f3d6c96e31f38f07f5 Merge: 4ed353000 04b659b41 Author: Lwmte <3331699+Lwmte@users.noreply.github.com> Date: Sat Dec 21 19:32:07 2024 +0100 Merge branch 'develop' into develop_mirrors commit 4ed353000d0f6b485ed50ef10b00a29b53c2ccdf Author: Lwmte <3331699+Lwmte@users.noreply.github.com> Date: Sat Dec 21 12:20:05 2024 +0100 Update title.bin commit 7a3aea07faf383fb85715cae795329e5b5dfe4b5 Author: Lwmte <3331699+Lwmte@users.noreply.github.com> Date: Sat Dec 21 11:26:49 2024 +0100 Rename CamOldPos and use more consistent type for it commit 1748eef34a0e0ce4c67099ddfdc74f60101a46c2 Merge: 839f05b3d 0ae388845 Author: Lwmte <3331699+Lwmte@users.noreply.github.com> Date: Sat Dec 21 10:25:23 2024 +0100 Merge branch 'develop' into develop_mirrors commit 839f05b3d1a50a4bbd33c4a525942a2c1660a0cb Merge: e4fe73ffd d75bba698 Author: Lwmte <3331699+Lwmte@users.noreply.github.com> Date: Sat Dec 21 01:05:36 2024 +0100 Merge branch 'develop' into develop_mirrors commit e4fe73ffd533cdb521c9024b06db57bc2d180151 Author: Lwmte <3331699+Lwmte@users.noreply.github.com> Date: Sat Dec 21 00:02:53 2024 +0100 Don't perform binocular animations if binocular meshswap is not present commit 3f7942eb763e3e3bf0a3153a32259bf826f50766 Author: Lwmte <3331699+Lwmte@users.noreply.github.com> Date: Fri Dec 20 23:55:15 2024 +0100 Fix meshswap, if object is not present commit 40cfaaeb0de7a2b648e38e5e16c8ac3152ba0002 Author: Lwmte <3331699+Lwmte@users.noreply.github.com> Date: Fri Dec 20 23:43:27 2024 +0100 Fixed various binocular / lasersight issues commit 1ef9a0e7e60dfc105584702da02fa78ca5032138 Merge: ca578885a 64c177702 Author: Lwmte <3331699+Lwmte@users.noreply.github.com> Date: Thu Dec 19 22:36:14 2024 +0100 Merge branch 'develop' into develop_mirrors commit ca578885a228646496a46784e6b2c51da184c623 Author: MontyTRC89 <montyhammet@hotmail.it> Date: Thu Dec 19 12:19:07 2024 +0100 Fixed 3D non-sorted sprites mirroring commit 288a413400b987e021aee20823c2ab620a9b7cb8 Author: Lwmte <3331699+Lwmte@users.noreply.github.com> Date: Thu Dec 19 08:59:37 2024 +0100 Continuation of previous fix commit 60cfe1e2f43327284b32286221a8fdc9e9902c09 Author: Lwmte <3331699+Lwmte@users.noreply.github.com> Date: Thu Dec 19 08:47:24 2024 +0100 Fix Lara not mirroring when using binoculars commit 2e17f7f8d9f32f9349c29c3c7a2b5c64632d33a0 Merge: a6687654b 625131fbb Author: Lwmte <3331699+Lwmte@users.noreply.github.com> Date: Thu Dec 19 01:40:19 2024 +0100 Merge branch 'develop' into develop_mirrors commit a6687654b00a32f7236c4cb5ccdf2ae4778bb6fa Author: Lwmte <3331699+Lwmte@users.noreply.github.com> Date: Wed Dec 18 22:44:00 2024 +0100 Fixed mirrors on savegame reloading commit 22460e0edfa9a38442689a8b2b7d310d189cef46 Author: Lwmte <3331699+Lwmte@users.noreply.github.com> Date: Wed Dec 18 17:01:19 2024 +0100 Update CHANGELOG.md commit 842d6345fec7a4514a6ff62bd683b14a847d5e70 Author: Lwmte <3331699+Lwmte@users.noreply.github.com> Date: Wed Dec 18 16:40:25 2024 +0100 Add option to reflect sprites commit ab79156bfe8b5c3b8293a61fd3f01f52e7f121be Author: Lwmte <3331699+Lwmte@users.noreply.github.com> Date: Wed Dec 18 15:37:25 2024 +0100 Update RendererDraw.cpp commit 8ba6a2c286a94ae520e7733555ca7d09cdbaac1e Author: Lwmte <3331699+Lwmte@users.noreply.github.com> Date: Wed Dec 18 14:56:24 2024 +0100 Spawn mirrored dynamic lights in Lara rooms too commit 1afa98169face34dd9dca9bbf30ddadfb86c9b76 Author: Lwmte <3331699+Lwmte@users.noreply.github.com> Date: Wed Dec 18 14:17:59 2024 +0100 Rename commit 6d195dbb63ebd5155a620cc86549b7ed6a935f52 Author: Lwmte <3331699+Lwmte@users.noreply.github.com> Date: Wed Dec 18 13:35:47 2024 +0100 Reorganize renderer code a little commit 1f002745f35b549f92674ee2146607e5e84ef6d1 Author: Lwmte <3331699+Lwmte@users.noreply.github.com> Date: Wed Dec 18 13:14:08 2024 +0100 Rename fields for consistency commit 79a8db0655928d93bb48d046f54839afe4f92841 Author: Lwmte <3331699+Lwmte@users.noreply.github.com> Date: Wed Dec 18 12:51:17 2024 +0100 Remove lambdas commit b586dce76e8a237eb14ed51f46b77d16385f204c Author: Lwmte <3331699+Lwmte@users.noreply.github.com> Date: Wed Dec 18 12:36:58 2024 +0100 Remove unrelated changes commit 8cebdae0ef59cfdd0c1e7e88129225030aff524e Author: Lwmte <3331699+Lwmte@users.noreply.github.com> Date: Wed Dec 18 12:23:23 2024 +0100 Draw reflections also when Lara is in any of mirrored rooms, not only camera commit 38b210013fb1de5b4571ebb10214bf7a3283e46b Author: Lwmte <3331699+Lwmte@users.noreply.github.com> Date: Wed Dec 18 11:55:00 2024 +0100 Fixed 3D sprites mirroring commit 2705a5ae7b2e88e67c8f730240c3db4a31f9fa36 Author: Lwmte <3331699+Lwmte@users.noreply.github.com> Date: Wed Dec 18 11:09:56 2024 +0100 Update RendererDraw.cpp commit 14f6ab36d069935fa648b0367be9ba500b64f89a Author: Lwmte <3331699+Lwmte@users.noreply.github.com> Date: Wed Dec 18 10:57:59 2024 +0100 Fixed dynamic lights commit 85469cb4d4aee5cd6a7895f758cc026711afc411 Author: Lwmte <3331699+Lwmte@users.noreply.github.com> Date: Wed Dec 18 10:18:04 2024 +0100 Fixed billboards, reintroduce ReflectVectorOptionally commit 3535eddf5db20a40af7d67fc9d075222e9e89548 Author: Lwmte <3331699+Lwmte@users.noreply.github.com> Date: Wed Dec 18 03:12:13 2024 +0100 Remove unnecessary inline, dont reflect room lights commit bf6ef08c576dce5cfe31d477c713c4543e26cde0 Author: Lwmte <3331699+Lwmte@users.noreply.github.com> Date: Wed Dec 18 02:44:49 2024 +0100 More decopypasting, rename inline function, remove unneeded arg commit 569644f1d4b41b7a5b616f1fd4576de28e6747b6 Author: Lwmte <3331699+Lwmte@users.noreply.github.com> Date: Wed Dec 18 02:28:31 2024 +0100 Decopypaste more mirror-related code commit 60a59caa53ea11d85fe3c9fb435edf6874ea20cc Author: Lwmte <3331699+Lwmte@users.noreply.github.com> Date: Wed Dec 18 01:09:47 2024 +0100 Update level.cpp commit 5dd8db198cb8f2089ceb0a7fe540fa987598246b Author: Lwmte <3331699+Lwmte@users.noreply.github.com> Date: Wed Dec 18 01:07:10 2024 +0100 Simplify renderer code, remove excessive if statements commit 31d278a780519c9b44f4cfc8e7435f24e76dffe2 Merge: f09b81fc8 88bbe4862 Author: Lwmte <3331699+Lwmte@users.noreply.github.com> Date: Tue Dec 17 19:48:18 2024 +0100 Merge branch 'develop' into develop_mirrors commit f09b81fc87b34877d58301d930a4d5aa1bf67c4c Merge: 3e6e9cb61 ab7e25aa7 Author: MontyTRC89 <montyhammet@hotmail.it> Date: Sun Dec 15 06:56:26 2024 +0100 Merge branch 'develop' into develop_mirrors commit 3e6e9cb61eeaccdaaa6b7c98f0b8c82ea5004d11 Author: MontyTRC89 <montyhammet@hotmail.it> Date: Sun Dec 15 06:56:05 2024 +0100 Added logic for hiding selectively reflecting moveables and statics; Added enabled flag for disabling mirrros in the future with LUA; commit c5f10777e7441048155395532ff777629258ce44 Author: MontyTRC89 <montyhammet@hotmail.it> Date: Fri Dec 13 05:20:23 2024 +0100 Fixed random statics positions while shooting commit 8978a51bfee9eb762b72eefb91bebbbd534a88da Author: MontyTRC89 <montyhammet@hotmail.it> Date: Fri Dec 13 04:51:07 2024 +0100 Fixed ambient occlusion in mirrored rooms commit f3afaf47cfce5a5d0e6719ef41e6d73c085c571f Merge: 4e08942d8 6198975be Author: MontyTRC89 <montyhammet@hotmail.it> Date: Thu Dec 12 06:10:39 2024 +0100 Merge branch 'develop' into develop_mirrors commit 4e08942d86f2601fd5a82964fd9975e5f8f9d631 Merge: 265283aac e674b8526 Author: MontyTRC89 <montyhammet@hotmail.it> Date: Wed Dec 11 13:43:19 2024 +0100 Merge branch 'develop' into develop_mirrors; Removed RendererMirror references in methods calls; commit 265283aacfee0412df6386d9b6c5e2fec315ee54 Author: MontyTRC89 <montyhammet@hotmail.it> Date: Wed Dec 11 04:35:20 2024 +0100 Cached reflection matrix of mirrors at load time; Fixed lighting in mirrored items; Added bad cull mode after mirrore debrises drawing; Added mirroring of dynamic lights; commit f44a04d05738539be97075d9dccf47c7856466d9 Author: MontyTRC89 <montyhammet@hotmail.it> Date: Tue Dec 10 14:57:00 2024 +0100 Fixed items culling in mirror rooms; Changed file format for having also virtual room; commit 74c74042d52084e859a59e60db6e629fccd5b962 Author: Lwmte <3331699+Lwmte@users.noreply.github.com> Date: Sun Dec 8 21:41:51 2024 +0100 Use emplace_back and camera room number commit 41b16e5696c0d6947fc5a6818d5b071747b285d4 Merge: 39f0c131c 9a241dbc8 Author: Lwmte <3331699+Lwmte@users.noreply.github.com> Date: Sun Dec 8 21:07:44 2024 +0100 Merge branch 'develop' into develop_mirrors commit 39f0c131c39e727a9451b3fec089b0d0205eab0c Author: Lwmte <3331699+Lwmte@users.noreply.github.com> Date: Sun Dec 8 21:02:00 2024 +0100 Use default argument value for ReadCount commit c4330a777cda0de4e842b204735a07f7003df4e2 Merge: 374abb27d d96bf4ba8 Author: MontyTRC89 <montyhammet@hotmail.it> Date: Sat Dec 7 05:03:24 2024 +0100 Merge branch 'develop' into develop_mirrors commit 374abb27d3adfa50c48711e5576b285336c2c2e8 Author: MontyTRC89 <montyhammet@hotmail.it> Date: Sat Dec 7 05:02:09 2024 +0100 Implemented mirrors in file format commit 3e89391776d688dc1f3865c1ba3cd44c605a3224 Merge: ec6ab6413 f9f1f59eb Author: MontyTRC89 <montyhammet@hotmail.it> Date: Fri Dec 6 15:10:05 2024 +0100 Merge branch 'develop' into develop_mirrors commit ec6ab641311551b25cf5b60798194413d7f72dbd Author: MontyTRC89 <montyhammet@hotmail.it> Date: Fri Dec 6 15:08:54 2024 +0100 Added debris and effects drawing in mirrored rooms; Some optimizations for early skip non mirrored items; commit 2218dd3179efd53a13bbd151f6e88ba07b79b3a4 Merge: 92eb4af79 2ee37ea7d Author: MontyTRC89 <montyhammet@hotmail.it> Date: Thu Dec 5 11:54:59 2024 +0100 Merge branch 'develop' into develop_mirrors; Added correct lights to reflected items; commit 92eb4af796a34ebc4add869c80581ebd5bd51320 Author: MontyTRC89 <montyhammet@hotmail.it> Date: Thu Dec 5 11:19:11 2024 +0100 Fixed broken previous commit commit bb3d0b993bb2ef66e351ae295c2cf78b36e6ed2a Author: MontyTRC89 <montyhammet@hotmail.it> Date: Thu Dec 5 10:20:32 2024 +0100 WIP TR4 style mirrors * Code etiquette * Recompile AA shaders on graphics settings change * Fixed code under ifdef --------- Co-authored-by: Sezz <sezzary@outlook.com>
2024-12-26 12:48:14 +03:00
<li><span class="parameter">OnUseItem</span>
<span class="types"><span class="type">function</span></span>
Will be called when using an item from inventory.
</li>
<li><span class="parameter">OnFreeze</span>
<span class="types"><span class="type">function</span></span>
Will be called when any of the Freeze modes are activated.
</li>
2022-04-10 00:38:39 +01:00
</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>
2022-04-10 00:38:39 +01:00
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>