Merge branch 'develop' into skinned_meshes

This commit is contained in:
Lwmte 2025-04-25 10:28:32 +02:00
commit c73e21a0d0
183 changed files with 10610 additions and 2052 deletions

View file

@ -1,5 +1,5 @@
name: Bug report
description: Create a report to help us understand and diagnose your issue. Your contribution is welcomed and valued!
description: Create a report to help us understand and diagnose your issue. Your contribution is welcomed and valued! It is highly recommended that you are using the latest version before submitting a bug report.
title: "[ bug Report ]"
labels: Awaiting Triage
@ -8,17 +8,19 @@ body:
- type: markdown
attributes:
value: |
Please follow this document in order to report a bug
Please follow this document in order to report a bug. It is highly recommended that you are using the latest version before submitting a bug report.
- type: dropdown
attributes:
label: TombEngine version
description: |
Please select the TombEngine Version from the dropdown list.
Please select the TombEngine Version from the dropdown list.
options:
- Development Build
- v1.5.0.2 (Latest Release)
- v1.4
- v1.8.0 (latest version)
- v1.7.1
- v1.7.0
- v1.5
validations:
required: true
@ -29,6 +31,7 @@ body:
Please select the Tomb Editor version used from the dropdown list.
options:
- Development Build
- v1.8.0 (latest version)
- v1.7.2
- v1.7.1
- v1.7.0

View file

@ -17,6 +17,7 @@ This is the credit list of **all** the people who contributed to TombEngine in a
- Sezz (player state refactoring, general coding, code cleanups, bug fixing, assets)
- Squidshire (Hispidence) (Lua implementation, bug fixing)
- Stranger1992 (sound asset refactoring and organisation, assets)
- TrainWreck (asset coding and Lua enhancements)
- TokyoSU (entity and vehicle decompilation)
- Tomo (general coding, special FX coding, bug fixing)
- Troye (general coding, refactoring)
@ -49,4 +50,4 @@ This is the credit list of **all** the people who contributed to TombEngine in a
- JoeyQuint (Standing 180° turn, monkey swing 180° turn)
### TombEngine Marketing
- Stranger1992 (This website, Facebook, Instagram, Youtube, Twitter, and Twitch.
- Stranger1992 (Tomb Engine website, Discord, Facebook, Instagram, Youtube, X, and Twitch)

View file

@ -5,22 +5,32 @@ TombEngine releases are located in this repository (alongside with Tomb Editor):
## [Version 1.8.2]
## New features
* Added video playback support.
* Added muzzle glow effect for firearms.
### Bug fixes
* Fixed crashes when shooting, if gunflash or gunshell objects are not present in a level.
* Fixed Teleporter object.
* Fixed Wraith objects not working correctly in flipped rooms.
* Fixed lensflare enabled status not saved in a savegame.
* Fixed HK sound effects.
* Fixed HK shots not being registered in statistics.
* Fixed distorted knee and elbow joint vertices.
* Fixed splash effects remaining in the level after reloading from the savegame.
* Fixed caustics not rendered correctly if texture compression was enabled.
* Fixed exclusion blend mode not working correctly.
* Fixed SSAO incorrectly applied through alpha blended textures.
* Fixed distorted knee and elbow joint vertices.
* Fixed HK sound effects.
### New features
* Added muzzle glow effect for firearms.
* Fixed static meshes not interpolating when dynamically changing their positional data.
* Fixed crashes when shooting, if gunflash or gunshell objects are not present in a level.
* Fixed crashes when Lara is on a vehicle unreachable by friendly NPCs.
* Removed legacy TR5 search object code which caused issues with meshswaps.
### Lua API changes
* Added `View.PlayVideo`, `View.StopVideo`, and other helper functions for the video playback.
* Added `Flow.SetIntroVideoPath` function to specify intro video.
* Added `Lara:Interact` function to allow alignment with moveables.
* Added `muzzleGlow` and `muzzleOffset` parameters to weapon settings.
* Added ability to use gunflash parameters for all weapons in weapon settings.
* Fixed `Moveable.GetJointPosition` not returning correct results if moveable is invisible or not rendered.
## [Version 1.8.1](https://github.com/TombEngine/TombEditorReleases/releases/tag/v1.8.1) - 2025-03-29

View file

@ -12,7 +12,7 @@ new_type("luautil", "5 Lua utility modules", true)
not_luadoc = true
local version = "1.8.1"
local version = "1.8.2"
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.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -124,19 +124,19 @@
<h2><a href="#Functions">Functions</a></h2>
<table class="function_list">
<tr>
<td class="name" ><a href="#EmitLightningArc">EmitLightningArc(origin, target, color, life, amplitude, beamWidth, detail, smooth, endDrift)</a></td>
<td class="name" ><a href="#EmitLightningArc">EmitLightningArc(origin, target, [color.], [life], [amplitude], [beamWidth], [detail], [smooth], [endDrift])</a></td>
<td class="summary">Emit a lightning arc.</td>
</tr>
<tr>
<td class="name" ><a href="#EmitParticle">EmitParticle(pos, vel, spriteID, gravity, rotVel, startColor, endColor, blendMode, startSize, endSize, life, damage, poison, spriteSeqID, startRot)</a></td>
<td class="name" ><a href="#EmitParticle">EmitParticle(pos, vel, spriteID, [gravity], [rotVel], [startColor], [endColor], [blendMode], [startSize], [endSize], [life], [damage], [poison], [spriteSeqID], [startRot])</a></td>
<td class="summary">Emit a particle.</td>
</tr>
<tr>
<td class="name" ><a href="#EmitAdvancedParticle">EmitAdvancedParticle(ParticleData)</a></td>
<td class="name" ><a href="#EmitAdvancedParticle">EmitAdvancedParticle(particleData)</a></td>
<td class="summary">Emit a particle with extensive configuration options, including sprite sequence animation, lights, sounds, and damage effects.</td>
</tr>
<tr>
<td class="name" ><a href="#EmitShockwave">EmitShockwave(pos, innerRadius, outerRadius, color, lifetime, speed, angle, hurtsLara)</a></td>
<td class="name" ><a href="#EmitShockwave">EmitShockwave(pos, [innerRadius], [outerRadius], [color], [lifetime], [speed], [angle], [hurtsLara])</a></td>
<td class="summary">Emit a shockwave, similar to that seen when a harpy projectile hits something.</td>
</tr>
<tr>
@ -148,7 +148,7 @@
<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="name" ><a href="#EmitBlood">EmitBlood(pos, [count])</a></td>
<td class="summary">Emit blood.</td>
</tr>
<tr>
@ -156,15 +156,15 @@
<td class="summary">Emit an air bubble in a water room.</td>
</tr>
<tr>
<td class="name" ><a href="#EmitFire">EmitFire(pos, size)</a></td>
<td class="name" ><a href="#EmitFire">EmitFire(pos, [size])</a></td>
<td class="summary">Emit fire for one frame.</td>
</tr>
<tr>
<td class="name" ><a href="#MakeExplosion">MakeExplosion(pos, size, shockwave)</a></td>
<td class="name" ><a href="#MakeExplosion">MakeExplosion(pos, [size], [shockwave])</a></td>
<td class="summary">Make an explosion.</td>
</tr>
<tr>
<td class="name" ><a href="#MakeEarthquake">MakeEarthquake(strength)</a></td>
<td class="name" ><a href="#MakeEarthquake">MakeEarthquake([strength])</a></td>
<td class="summary">Make an earthquake</td>
</tr>
<tr>
@ -193,7 +193,7 @@
<dl class="function">
<dt>
<a name = "EmitLightningArc"></a>
<strong>EmitLightningArc(origin, target, color, life, amplitude, beamWidth, detail, smooth, endDrift)</strong>
<strong>EmitLightningArc(origin, target, [color.], [life], [amplitude], [beamWidth], [detail], [smooth], [endDrift])</strong>
</dt>
<dd>
Emit a lightning arc.
@ -214,33 +214,42 @@
</li>
<li><span class="parameter">color</span>
<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>Default: Color(255&#44; 255&#44; 255).</em>
</li>
<li><span class="parameter">life</span>
<span class="types"><span class="type">float</span></span>
Lifetime in seconds. Clamped to [0, 4.233] for now because of strange internal maths. <strong>default: 1</strong>
Lifetime in seconds. Clamped to [0, 4.233] for now because of strange internal maths.
<em>Default: 1.</em>
</li>
<li><span class="parameter">amplitude</span>
<span class="types"><span class="type">int</span></span>
"strength" of the lightning - the higher the value, the "taller" the arcs. Clamped to [1, 255]. <strong>default: 20</strong>
Strength of the lightning - the higher the value, the "taller" the arcs. Clamped to [1, 255].
<em>Default: 20.</em>
</li>
<li><span class="parameter">beamWidth</span>
<span class="types"><span class="type">int</span></span>
Clamped to [1, 127]. <strong>default 2</strong>
Beam width. Clamped to [1, 127].
<em>Default: 2.</em>
</li>
<li><span class="parameter">detail</span>
<span class="types"><span class="type">int</span></span>
Higher numbers equal more segments, but it's not a 1:1 correlation. Clamped to [1, 127]. <strong>default: 10</strong>
Higher numbers equal more segments, but it's not a 1:1 correlation. Clamped to [1, 127].
<em>Default: 10.</em>
</li>
<li><span class="parameter">smooth</span>
<span class="types"><span class="type">bool</span></span>
If true, the arc will have large, smooth curves; if false, it will have small, jagged spikes. <strong>default: false</strong>
If true, the arc will have large, smooth curves; if false, it will have small, jagged spikes.
<em>Default: false.</em>
</li>
<li><span class="parameter">endDrift</span>
<span class="types"><span class="type">bool</span></span>
If true, the end of the arc will be able to gradually drift away from its destination in a random direction <strong>default: false</strong>
If true, the end of the arc will be able to gradually drift away from its destination in a random direction.
<em>Default: false.</em>
</li>
</ul>
@ -251,7 +260,7 @@
</dd>
<dt>
<a name = "EmitParticle"></a>
<strong>EmitParticle(pos, vel, spriteID, gravity, rotVel, startColor, endColor, blendMode, startSize, endSize, life, damage, poison, spriteSeqID, startRot)</strong>
<strong>EmitParticle(pos, vel, spriteID, [gravity], [rotVel], [startColor], [endColor], [blendMode], [startSize], [endSize], [life], [damage], [poison], [spriteSeqID], [startRot])</strong>
</dt>
<dd>
Emit a particle.
@ -274,51 +283,63 @@
</li>
<li><span class="parameter">gravity</span>
<span class="types"><span class="type">float</span></span>
Effect of gravity. Positive value ascends, negative value descends. <strong>default: 0</strong>
Effect of gravity. Positive value ascends, negative value descends.
<em>Default: 0.</em>
</li>
<li><span class="parameter">rotVel</span>
<span class="types"><span class="type">float</span></span>
Rotational velocity in degrees. <strong>default: 0</strong>
Rotational velocity in degrees.
<em>Default: 0.</em>
</li>
<li><span class="parameter">startColor</span>
<span class="types"><a class="type" href="../3 primitive classes/Color.html#">Color</a></span>
Color at start of life. <strong>default: Color(255, 255, 255)</strong>
Color at start of life.
<em>Default: Color(255&#44; 255&#44; 255).</em>
</li>
<li><span class="parameter">endColor</span>
<span class="types"><a class="type" href="../3 primitive classes/Color.html#">Color</a></span>
Color at end of life. This will finish long before the end of the particle's life due to internal math. <strong>default: Color(255, 255, 255)</strong>
Color at end of life. This will finish long before the end of the particle's life due to internal math.
<em>Default: Color(255&#44; 255&#44; 255).</em>
</li>
<li><span class="parameter">blendMode</span>
<span class="types"><a class="type" href="../4 enums/Effects.BlendID.html#">BlendID</a></span>
Render blend mode. <strong>TEN.Effects.BlendID.ALPHA_BLEND</strong>
Render blend mode.
<em>Default: TEN.Effects.BlendID.ALPHA_BLEND.</em>
</li>
<li><span class="parameter">startSize</span>
<span class="types"><span class="type">float</span></span>
Size at start of life. <strong>default: 10</strong>
Size at start of life.
<em>Default: 10.</em>
</li>
<li><span class="parameter">endSize</span>
<span class="types"><span class="type">float</span></span>
Size at end of life. <strong>default: 0</strong>
Size at end of life.
<em>Default: 0.</em>
</li>
<li><span class="parameter">life</span>
<span class="types"><span class="type">float</span></span>
Lifespan in seconds. <strong>default: 2</strong>
Lifespan in seconds.
<em>Default: 2.</em>
</li>
<li><span class="parameter">damage</span>
<span class="types"><span class="type">bool</span></span>
Harm the player on collision. <strong>default: false</strong>
Harm the player on collision.
<em>Default: false.</em>
</li>
<li><span class="parameter">poison</span>
<span class="types"><span class="type">bool</span></span>
Poison the player on collision. <strong>default: false</strong>
Poison the player on collision.
<em>Default: false.</em>
</li>
<li><span class="parameter">spriteSeqID</span>
<span class="types"><a class="type" href="../4 enums/Objects.ObjID.html#SpriteConstants">SpriteConstants</a></span>
Sprite sequence slot ID. <strong>default: Objects.ObjID.DEFAULT_SPRITES</strong>
Sprite sequence slot ID.
<em>Default: Objects.ObjID.DEFAULT_SPRITES.</em>
</li>
<li><span class="parameter">startRot</span>
<span class="types"><span class="type">float</span></span>
Rotation at start of life. <strong>default: random</strong>
Rotation at start of life.
<em>Default: random.</em>
</li>
</ul>
@ -348,7 +369,7 @@
</dd>
<dt>
<a name = "EmitAdvancedParticle"></a>
<strong>EmitAdvancedParticle(ParticleData)</strong>
<strong>EmitAdvancedParticle(particleData)</strong>
</dt>
<dd>
Emit a particle with extensive configuration options, including sprite sequence animation, lights, sounds, and damage effects.
@ -357,7 +378,7 @@
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">ParticleData</span>
<li><span class="parameter">particleData</span>
<span class="types"><a class="type" href="../1 modules/Effects.html#ParticleData">ParticleData</a></span>
Table containing particle data.
</li>
@ -404,7 +425,7 @@ EmitAdvancedParticle(particle)</pre>
</dd>
<dt>
<a name = "EmitShockwave"></a>
<strong>EmitShockwave(pos, innerRadius, outerRadius, color, lifetime, speed, angle, hurtsLara)</strong>
<strong>EmitShockwave(pos, [innerRadius], [outerRadius], [color], [lifetime], [speed], [angle], [hurtsLara])</strong>
</dt>
<dd>
Emit a shockwave, similar to that seen when a harpy projectile hits something.
@ -415,35 +436,42 @@ EmitAdvancedParticle(particle)</pre>
<ul>
<li><span class="parameter">pos</span>
<span class="types"><a class="type" href="../3 primitive classes/Vec3.html#">Vec3</a></span>
Origin position
Origin Position.
</li>
<li><span class="parameter">innerRadius</span>
<span class="types"><span class="type">int</span></span>
(default 0) Initial inner radius of the shockwave circle - 128 will be approx a click, 512 approx a block
Initial inner radius of the shockwave circle - 128 will be approx a click, 512 approx a block.
<em>Default: 0.</em>
</li>
<li><span class="parameter">outerRadius</span>
<span class="types"><span class="type">int</span></span>
(default 128) Initial outer radius of the shockwave circle
Initial outer radius of the shockwave circle.
<em>Default: 128.</em>
</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))
Color.
<em>Default: Color(255&#44; 255&#44; 255).</em>
</li>
<li><span class="parameter">lifetime</span>
<span class="types"><span class="type">float</span></span>
(default 1.0) Lifetime in seconds (max 8.5 because of inner maths weirdness)
Lifetime in seconds (max 8.5 because of inner maths weirdness).
<em>Default: 1.0.</em>
</li>
<li><span class="parameter">speed</span>
<span class="types"><span class="type">int</span></span>
(default 50) Initial speed of the shockwave's expansion (the shockwave will always slow as it goes)
Initial speed of the shockwave's expansion (the shockwave will always slow as it goes).
<em>Default: 50.</em>
</li>
<li><span class="parameter">angle</span>
<span class="types"><span class="type">int</span></span>
(default 0) Angle about the X axis - a value of 90 will cause the shockwave to be entirely vertical
Angle about the X axis - a value of 90 will cause the shockwave to be entirely vertical.
<em>Default: 0.</em>
</li>
<li><span class="parameter">hurtsLara</span>
<span class="types"><span class="type">bool</span></span>
(default false) If true, the shockwave will hurt Lara, with the damage being relative to the shockwave's current speed
If true, the shockwave will hurt Lara, with the damage being relative to the shockwave's current speed.
<em>Default: false.</em>
</li>
</ul>
@ -470,22 +498,22 @@ EmitAdvancedParticle(particle)</pre>
</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>
light color.
<em>Default: Color(255&#44; 255&#44; 255).</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>
Measured in "clicks" or 256 world units.
<em>Default: 20.</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>
Determines whether light should generate dynamic shadows for applicable moveables.
<em>Default: false.</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)
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>
@ -517,32 +545,32 @@ EmitAdvancedParticle(particle)</pre>
</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>
Color.
<em>Default: Color(255&#44; 255&#44; 255).</em>
</li>
<li><span class="parameter">radius</span>
<span class="types"><span class="type">int</span></span>
overall radius at the endpoint of a light cone, measured in "clicks" or 256 world units (default 10)
<em>Optional.</em>
Overall radius at the endpoint of a light cone, measured in "clicks" or 256 world units.
<em>Default: 10.</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>
Radius, at which light starts to fade out, measured in "clicks".
<em>Default: 5.</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>
Distance, at which light cone fades out, measured in "clicks".
<em>Default: 20.</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>
Determines whether light should generate dynamic shadows for applicable moveables.
<em>Default: false.</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)
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>
@ -554,7 +582,7 @@ EmitAdvancedParticle(particle)</pre>
</dd>
<dt>
<a name = "EmitBlood"></a>
<strong>EmitBlood(pos, count)</strong>
<strong>EmitBlood(pos, [count])</strong>
</dt>
<dd>
Emit blood.
@ -571,7 +599,8 @@ EmitAdvancedParticle(particle)</pre>
</li>
<li><span class="parameter">count</span>
<span class="types"><span class="type">int</span></span>
Sprite count. <strong>default: 1</strong>
Sprite count.
<em>Default: 1.</em>
</li>
</ul>
@ -597,13 +626,13 @@ EmitAdvancedParticle(particle)</pre>
</li>
<li><span class="parameter">size</span>
<span class="types"><span class="type">float</span></span>
Sprite size. <strong>Default: 32</strong>
<em>Optional.</em>
Sprite size.
<em>Default: 32.</em>
</li>
<li><span class="parameter">amp</span>
<span class="types"><span class="type">float</span></span>
Oscillation amplitude. <strong>Default: 32</strong>
<em>Optional.</em>
Oscillation amplitude.
<em>Default: 32.</em>
</li>
</ul>
@ -614,7 +643,7 @@ EmitAdvancedParticle(particle)</pre>
</dd>
<dt>
<a name = "EmitFire"></a>
<strong>EmitFire(pos, size)</strong>
<strong>EmitFire(pos, [size])</strong>
</dt>
<dd>
Emit fire for one frame. Will not hurt player. Call this each frame if you want a continuous fire.
@ -625,13 +654,12 @@ EmitAdvancedParticle(particle)</pre>
<ul>
<li><span class="parameter">pos</span>
<span class="types"><a class="type" href="../3 primitive classes/Vec3.html#">Vec3</a></span>
Position.
</li>
<li><span class="parameter">size</span>
<span class="types"><span class="type">float</span></span>
Fire size. <strong>default: 1</strong>
Fire size.
<em>Default: 1.</em>
</li>
</ul>
@ -642,7 +670,7 @@ EmitAdvancedParticle(particle)</pre>
</dd>
<dt>
<a name = "MakeExplosion"></a>
<strong>MakeExplosion(pos, size, shockwave)</strong>
<strong>MakeExplosion(pos, [size], [shockwave])</strong>
</dt>
<dd>
Make an explosion. Does not hurt Lara
@ -659,11 +687,13 @@ EmitAdvancedParticle(particle)</pre>
</li>
<li><span class="parameter">size</span>
<span class="types"><span class="type">float</span></span>
(default 512.0) this will not be the size of the sprites, but rather the distance between the origin and any additional sprites
This will not be the size of the sprites, but rather the distance between the origin and any additional sprites.
<em>Default: 512.</em>
</li>
<li><span class="parameter">shockwave</span>
<span class="types"><span class="type">bool</span></span>
(default false) if true, create a very faint white shockwave which will not hurt Lara
If true, create a very faint white shockwave which will not hurt Lara.
<em>Default: false.</em>
</li>
</ul>
@ -674,7 +704,7 @@ EmitAdvancedParticle(particle)</pre>
</dd>
<dt>
<a name = "MakeEarthquake"></a>
<strong>MakeEarthquake(strength)</strong>
<strong>MakeEarthquake([strength])</strong>
</dt>
<dd>
Make an earthquake
@ -685,7 +715,8 @@ EmitAdvancedParticle(particle)</pre>
<ul>
<li><span class="parameter">strength</span>
<span class="types"><span class="type">int</span></span>
(default 100) How strong should the earthquake be? Increasing this value also increases the lifespan of the earthquake.
How strong should the earthquake be? Increasing this value also increases the lifespan of the earthquake.
<em>Default: 100.</em>
</li>
</ul>
@ -732,8 +763,8 @@ EmitAdvancedParticle(particle)</pre>
Moveable object with which to associate the effect.
</li>
<li><span class="parameter">tag</span>
<span class="types"><span class="type">int[opt]</span></span>
Numeric tag with which to associate the effect on the moveable. <strong>Default: 0</strong>
<span class="types"><span class="type">int</span></span>
Numeric tag with which to associate the effect on the moveable.
</li>
<li><span class="parameter">pos</span>
<span class="types"><a class="type" href="../3 primitive classes/Vec3.html#">Vec3</a></span>
@ -745,58 +776,58 @@ EmitAdvancedParticle(particle)</pre>
</li>
<li><span class="parameter">rot</span>
<span class="types"><span class="type">float</span></span>
Start rotation in degrees. <strong>Default: 0</strong>
<em>Optional.</em>
Start rotation in degrees.
<em>Default: 0.</em>
</li>
<li><span class="parameter">startColor</span>
<span class="types"><a class="type" href="../3 primitive classes/Color.html#">Color</a></span>
Color at the start of life. <strong>Default: Color(255, 255, 255, 255))</strong>
<em>Optional.</em>
Color at the start of life.
<em>Default: Color(255&#44; 255&#44; 255).</em>
</li>
<li><span class="parameter">endColor</span>
<span class="types"><a class="type" href="../3 primitive classes/Color.html#">Color</a></span>
Color at the end of life. <strong>Default: Color(0, 0, 0, 0))</strong>
<em>Optional.</em>
Color at the end of life.
<em>Default: Color(0&#44; 0&#44; 0).</em>
</li>
<li><span class="parameter">width</span>
<span class="types"><span class="type">float</span></span>
Width in world units. <strong>Default: 0</strong>
<em>Optional.</em>
Width in world units.
<em>Default: 0.</em>
</li>
<li><span class="parameter">life</span>
<span class="types"><span class="type">float</span></span>
Lifetime in seconds. <strong>Default: 1</strong>
<em>Optional.</em>
Lifetime in seconds.
<em>Default: 1.</em>
</li>
<li><span class="parameter">vel</span>
<span class="types"><span class="type">float</span></span>
Movement velocity in world units per second. <strong>Default: 0</strong>
<em>Optional.</em>
Movement velocity in world units per second.
<em>Default: 0.</em>
</li>
<li><span class="parameter">expRate</span>
<span class="types"><span class="type">float</span></span>
Width expansion rate in world units per second. <strong>Default: 0</strong>
<em>Optional.</em>
Width expansion rate in world units per second.
<em>Default: 0.</em>
</li>
<li><span class="parameter">rotRate</span>
<span class="types"><span class="type">float</span></span>
Rotation rate in degrees per second. <strong>Default: 0</strong>
<em>Optional.</em>
Rotation rate in degrees per second.
<em>Default: 0.</em>
</li>
<li><span class="parameter">edgeFeatherMode</span>
<span class="types"><a class="type" href="../4 enums/Effects.StreamerFeatherMode.html#">StreamerFeatherMode</a></span>
Edge feather mode. <strong>Default: Effects.StreamerFeatherMode.NONE</strong>
<em>Optional.</em>
Edge feather mode.
<em>Default: Effects.StreamerFeatherMode.NONE.</em>
</li>
<li><span class="parameter">lengthFeatherMode</span>
<span class="types"><a class="type" href="../4 enums/Effects.StreamerFeatherMode.html#">StreamerFeatherMode</a></span>
Length feather mode. <strong>UNIMPLEMENTED, currently will always leave a fading tail</strong>
<em>Optional.</em>
Length feather mode. <em>Not yet implemented.</em>
<em>Default: Effects.StreamerFeatherMode.LEFT.</em>
</li>
<li><span class="parameter">blendID</span>
<span class="types"><a class="type" href="../4 enums/Effects.BlendID.html#">BlendID</a></span>
Renderer blend ID. <strong>Default: Effects.BlendID.ALPHA_BLEND</strong>
<em>Optional.</em>
Renderer blend ID.
<em>Default: Effects.BlendID.ALPHA_BLEND.</em>
</li>
</ul>
@ -830,128 +861,128 @@ EmitAdvancedParticle(particle)</pre>
</li>
<li><span class="parameter">spriteSeqID</span>
<span class="types"><a class="type" href="../4 enums/Objects.ObjID.html#SpriteConstants">SpriteConstants</a></span>
Sprite sequence slot ID. <strong>default: Objects.ObjID.DEFAULT_SPRITES</strong>
<em>Optional.</em>
Sprite sequence slot ID.
<em>Default: Objects.ObjID.DEFAULT_SPRITES.</em>
</li>
<li><span class="parameter">spriteID</span>
<span class="types"><span class="type">int</span></span>
Sprite ID in the sprite sequence slot. <strong>default: 0</strong>
<em>Optional.</em>
Sprite ID in the sprite sequence slot.
<em>Default: 0.</em>
</li>
<li><span class="parameter">life</span>
<span class="types"><span class="type">float</span></span>
Lifespan in seconds. <strong>default: 2</strong>
<em>Optional.</em>
Lifespan in seconds.
<em>Default: 2.</em>
</li>
<li><span class="parameter">maxYVel</span>
<span class="types"><span class="type">float</span></span>
Maximum vertical velocity in world units per second. <strong>default: 0</strong>
<em>Optional.</em>
Maximum vertical velocity in world units per second.
<em>Default: 0.</em>
</li>
<li><span class="parameter">gravity</span>
<span class="types"><span class="type">float</span></span>
Effect of gravity in world units per second. Positive value ascend, negative value descend. <strong>default: 0</strong>
<em>Optional.</em>
Effect of gravity in world units per second. Positive value ascend, negative value descend.
<em>Default: 0.</em>
</li>
<li><span class="parameter">friction</span>
<span class="types"><span class="type">float</span></span>
Friction affecting velocity over time in world units per second. <strong>default: 0</strong>
<em>Optional.</em>
Friction affecting velocity over time in world units per second.
<em>Default: 0.</em>
</li>
<li><span class="parameter">startRot</span>
<span class="types"><span class="type">float</span></span>
Rotation at start of life. <strong>default: random</strong>
<em>Optional.</em>
Rotation at start of life.
<em>Default: random.</em>
</li>
<li><span class="parameter">rotVel</span>
<span class="types"><span class="type">float</span></span>
Rotational velocity in degrees per second. <strong>default: 0</strong>
<em>Optional.</em>
Rotational velocity in degrees per second.
<em>Default: 0.</em>
</li>
<li><span class="parameter">startSize</span>
<span class="types"><span class="type">float</span></span>
Size at start of life. <strong>default: 10</strong>
<em>Optional.</em>
Size at start of life.
<em>Default: 10.</em>
</li>
<li><span class="parameter">endSize</span>
<span class="types"><span class="type">float</span></span>
Size at end of life. <strong>default: 0</strong>
<em>Optional.</em>
Size at end of life.
<em>Default: 0.</em>
</li>
<li><span class="parameter">startColor</span>
<span class="types"><a class="type" href="../3 primitive classes/Color.html#">Color</a></span>
Color at start of life. <strong>default: Color(255, 255, 255)</strong>
<em>Optional.</em>
Color at start of life.
<em>Default: Color(255&#44; 255&#44; 255).</em>
</li>
<li><span class="parameter">endColor</span>
<span class="types"><a class="type" href="../3 primitive classes/Color.html#">Color</a></span>
Color at end of life. Note that this will finish long before the end of life due to internal math. <strong>default: Color(255, 255, 255)</strong>
<em>Optional.</em>
Color at end of life. Note that this will finish long before the end of life due to internal math.
<em>Default: Color(255&#44; 255&#44; 255).</em>
</li>
<li><span class="parameter">blendMode</span>
<span class="types"><a class="type" href="../4 enums/Effects.BlendID.html#">BlendID</a></span>
Render blend mode. <strong>default: TEN.Effects.BlendID.ALPHA_BLEND</strong>
<em>Optional.</em>
Render blend mode.
<em>Default: TEN.Effects.BlendID.ALPHA_BLEND.</em>
</li>
<li><span class="parameter">damage</span>
<span class="types"><span class="type">bool</span></span>
Harm the player on collision. <strong>default: false</strong>
<em>Optional.</em>
Harm the player on collision.
<em>Default: false.</em>
</li>
<li><span class="parameter">poison</span>
<span class="types"><span class="type">bool</span></span>
Poison the player on collision. <strong>default: false</strong>
<em>Optional.</em>
Poison the player on collision.
<em>Default: false.</em>
</li>
<li><span class="parameter">burn</span>
<span class="types"><span class="type">bool</span></span>
Burn the player on collision. <strong>default: false</strong>
<em>Optional.</em>
Burn the player on collision.
<em>Default: false.</em>
</li>
<li><span class="parameter">wind</span>
<span class="types"><span class="type">bool</span></span>
Affect position by wind in outside rooms. <strong>default: false</strong>
<em>Optional.</em>
Affect position by wind in outside rooms.
<em>Default: false.</em>
</li>
<li><span class="parameter">damageHit</span>
<span class="types"><span class="type">int</span></span>
Player damage amount on collision. <strong>default: 2</strong>
<em>Optional.</em>
Player damage amount on collision.
<em>Default: 2.</em>
</li>
<li><span class="parameter">light</span>
<span class="types"><span class="type">bool</span></span>
Emit a colored light. CAUTION: Recommended only for a single particle. Too many particles with lights can overwhelm the lighting system. <strong>default: false</strong>
<em>Optional.</em>
Emit a colored light. <strong>Caution</strong>: Recommended only for a single particle. Too many particles with lights can overwhelm the lighting system.
<em>Default: false.</em>
</li>
<li><span class="parameter">lightRadius</span>
<span class="types"><span class="type">int</span></span>
Light radius in 1/4 blocks. <strong>default: 0</strong>
<em>Optional.</em>
Light radius in 1/4 blocks.
<em>Default: 0.</em>
</li>
<li><span class="parameter">lightFlicker</span>
<span class="types"><span class="type">int</span></span>
Interval at which the light should flicker. <strong>default: 0</strong>
<em>Optional.</em>
Interval at which the light should flicker.
<em>Default: 0.</em>
</li>
<li><span class="parameter">soundID</span>
<span class="types"><span class="type">int</span></span>
Sound ID to play. CAUTION: Recommended only for a single particle. Too many particles with sounds can overwhelm the sound system. <strong>default: none</strong>
Sound ID to play. <strong>Caution</strong>: Recommended only for a single particle. Too many particles with sounds can overwhelm the sound system.
<em>Optional.</em>
</li>
<li><span class="parameter">animated</span>
<span class="types"><span class="type">bool</span></span>
Play animates sprite sequence. <strong>default: false</strong>
<em>Optional.</em>
Play animates sprite sequence.
<em>Default: false.</em>
</li>
<li><span class="parameter">animType</span>
<span class="types"><a class="type" href="../4 enums/Effects.ParticleAnimationType.html#">ParticleAnimationType</a></span>
Animation type of the sprite sequence. <strong>default: TEN.Effects.ParticleAnimationType.LOOP</strong>
<em>Optional.</em>
Animation type of the sprite sequence.
<em>Default: TEN.Effects.ParticleAnimationType.LOOP.</em>
</li>
<li><span class="parameter">frameRate</span>
<span class="types"><span class="type">float</span></span>
Sprite sequence animation framerate. <strong>default: 1</strong>
<em>Optional.</em>
Sprite sequence animation framerate.
<em>Default: 1.</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.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -132,6 +132,10 @@ scripts too.</p>
<td class="summary">Image to show when loading the game.</td>
</tr>
<tr>
<td class="name" ><a href="#SetIntroVideoPath">SetIntroVideoPath(path)</a></td>
<td class="summary">Video to show when loading the game.</td>
</tr>
<tr>
<td class="name" ><a href="#SetTitleScreenImagePath">SetTitleScreenImagePath(path)</a></td>
<td class="summary">Image to show in the background of the title screen.</td>
</tr>
@ -179,11 +183,11 @@ scripts too.</p>
<td class="summary">Finishes the current level, with optional level index and start position index provided.</td>
</tr>
<tr>
<td class="name" ><a href="#GetStatistics">GetStatistics(game)</a></td>
<td class="name" ><a href="#GetStatistics">GetStatistics([game])</a></td>
<td class="summary">Get game or level statistics.</td>
</tr>
<tr>
<td class="name" ><a href="#SetStatistics">SetStatistics(statistics, game)</a></td>
<td class="name" ><a href="#SetStatistics">SetStatistics(statistics, [game])</a></td>
<td class="summary">Set game or level statistics.</td>
</tr>
<tr>
@ -261,11 +265,11 @@ scripts too.</p>
<td class="summary">Set string variable keys and their translations.</td>
</tr>
<tr>
<td class="name" ><a href="#GetString">GetString(string)</a></td>
<td class="name" ><a href="#GetString">GetString(key)</a></td>
<td class="summary">Get translated string.</td>
</tr>
<tr>
<td class="name" ><a href="#IsStringPresent">IsStringPresent(string)</a></td>
<td class="name" ><a href="#IsStringPresent">IsStringPresent(key)</a></td>
<td class="summary">Check if translated string is present.</td>
</tr>
<tr>
@ -299,7 +303,7 @@ ambient tracks.
<ul>
<li><span class="parameter">level</span>
<span class="types"><a class="type" href="../2 classes/Flow.Level.html#">Level</a></span>
a level object
A level object.
</li>
</ul>
@ -313,8 +317,7 @@ ambient tracks.
<strong>SetIntroImagePath(path)</strong>
</dt>
<dd>
Image to show when loading the game.
Must be a .jpg or .png image.
Image to show when loading the game. Must be a .jpg or .png image.
@ -322,7 +325,29 @@ Must be a .jpg or .png image.
<ul>
<li><span class="parameter">path</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.4/manual.html#6.4">string</a></span>
the path to the image, relative to the TombEngine exe
The path to the image, relative to the TombEngine executable.
</li>
</ul>
</dd>
<dt>
<a name = "SetIntroVideoPath"></a>
<strong>SetIntroVideoPath(path)</strong>
</dt>
<dd>
Video to show when loading the game. Must be a common video format, such as mp4, mkv, mov or avi.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">path</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.4/manual.html#6.4">string</a></span>
the path to the video, relative to the TombEngine exe
</li>
</ul>
@ -336,9 +361,7 @@ Must be a .jpg or .png image.
<strong>SetTitleScreenImagePath(path)</strong>
</dt>
<dd>
Image to show in the background of the title screen.
Must be a .jpg or .png image.
<strong>(not yet implemented)</strong>
Image to show in the background of the title screen. Must be a .jpg or .png image. <em>Not yet implemented.</em>
@ -346,7 +369,7 @@ Must be a .jpg or .png image.
<ul>
<li><span class="parameter">path</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.4/manual.html#6.4">string</a></span>
the path to the image, relative to the TombEngine exe
The path to the image, relative to the TombEngine executable.
</li>
</ul>
@ -369,7 +392,7 @@ Must be true or false
<ul>
<li><span class="parameter">enabled</span>
<span class="types"><span class="type">bool</span></span>
true or false
True or false.
</li>
</ul>
@ -392,7 +415,7 @@ Must be true or false
<ul>
<li><span class="parameter">enabled</span>
<span class="types"><span class="type">bool</span></span>
true or false
True or false.
</li>
</ul>
@ -406,7 +429,7 @@ Must be true or false
<strong>EnableHomeLevel(enabled)</strong>
</dt>
<dd>
Enable or disable Home Level entry in the main menu. ()
Enable or disable Home Level entry in the main menu.
@ -428,7 +451,7 @@ Must be true or false
<strong>EnableLoadSave(enabled)</strong>
</dt>
<dd>
Enable or disable saving and loading of savegames. ()
Enable or disable saving and loading of savegames.
@ -454,7 +477,7 @@ Must be true or false
<strong>EnableFlyCheat(enabled)</strong>
</dt>
<dd>
Enable or disable the fly cheat. ()
Enable or disable the fly cheat.
@ -485,7 +508,7 @@ Must be true or false
<ul>
<li><span class="parameter">enabled</span>
<span class="types"><span class="type">bool</span></span>
true or false
True or false.
</li>
</ul>
@ -508,7 +531,7 @@ Must be true or false
<ul>
<li><span class="parameter">enabled</span>
<span class="types"><span class="type">bool</span></span>
true or false
True or false.
</li>
</ul>
@ -524,7 +547,7 @@ Must be true or false
<dd>
Returns the level by index.
Indices depend on the order in which AddLevel was called; the first added will
have an ID of 0, the second an ID of 1, and so on.
have an index of 0, the second an index of 1, and so on.
@ -532,7 +555,7 @@ have an ID of 0, the second an ID of 1, and so on.
<ul>
<li><span class="parameter">index</span>
<span class="types"><span class="type">int</span></span>
of the level
Index of the level.
</li>
</ul>
@ -540,7 +563,7 @@ have an ID of 0, the second an ID of 1, and so on.
<ol>
<span class="types"><a class="type" href="../2 classes/Flow.Level.html#">Level</a></span>
the level indicated by the id
The level indicated by the index.
</ol>
@ -561,7 +584,7 @@ have an ID of 0, the second an ID of 1, and so on.
<ol>
<span class="types"><a class="type" href="../2 classes/Flow.Level.html#">Level</a></span>
the current level
The current level.
</ol>
@ -584,13 +607,13 @@ teleported to such object with OCB similar to provided second argument.
<ul>
<li><span class="parameter">index</span>
<span class="types"><span class="type">int</span></span>
level index (default 0)
<em>Optional.</em>
Level index.
<em>Default: 0.</em>
</li>
<li><span class="parameter">startPos</span>
<span class="types"><span class="type">int</span></span>
player start position (default 0)
<em>Optional.</em>
Player start position in the next level. Should correspond to OCB of <code>Objects.ObjID.LARA_START_POS</code> object in the next level.
<em>Default: 0.</em>
</li>
</ul>
@ -601,7 +624,7 @@ teleported to such object with OCB similar to provided second argument.
</dd>
<dt>
<a name = "GetStatistics"></a>
<strong>GetStatistics(game)</strong>
<strong>GetStatistics([game])</strong>
</dt>
<dd>
Get game or level statistics. For reference about statistics class, see <a href="../2 classes/Flow.Statistics.html#">Flow.Statistics</a>.
@ -612,7 +635,8 @@ teleported to such object with OCB similar to provided second argument.
<ul>
<li><span class="parameter">game</span>
<span class="types"><span class="type">bool</span></span>
if true, returns overall game statistics, otherwise returns current level statistics (default: false)
If true, returns overall game statistics, otherwise returns current level statistics.
<em>Default: false.</em>
</li>
</ul>
@ -620,7 +644,7 @@ teleported to such object with OCB similar to provided second argument.
<ol>
<span class="types"><a class="type" href="../2 classes/Flow.Statistics.html#">Statistics</a></span>
statistics structure representing game or level statistics
Statistics structure representing game or level statistics.
</ol>
@ -629,7 +653,7 @@ teleported to such object with OCB similar to provided second argument.
</dd>
<dt>
<a name = "SetStatistics"></a>
<strong>SetStatistics(statistics, game)</strong>
<strong>SetStatistics(statistics, [game])</strong>
</dt>
<dd>
Set game or level statistics. For reference about statistics class, see <a href="../2 classes/Flow.Statistics.html#">Flow.Statistics</a>.
@ -640,11 +664,12 @@ teleported to such object with OCB similar to provided second argument.
<ul>
<li><span class="parameter">statistics</span>
<span class="types"><a class="type" href="../2 classes/Flow.Statistics.html#">Statistics</a></span>
statistic object to set
Statistic object to set.
</li>
<li><span class="parameter">game</span>
<span class="types"><span class="type">bool</span></span>
if true, sets overall game statistics, otherwise sets current level statistics (default: false)
If true, sets overall game statistics, otherwise sets current level statistics.
<em>Default: false.</em>
</li>
</ul>
@ -667,7 +692,7 @@ teleported to such object with OCB similar to provided second argument.
<ol>
<span class="types"><a class="type" href="../4 enums/Flow.GameStatus.html#">GameStatus</a></span>
the current game status
The current game status.
</ol>
@ -688,7 +713,7 @@ teleported to such object with OCB similar to provided second argument.
<ol>
<span class="types"><a class="type" href="../4 enums/Flow.FreezeMode.html#">FreezeMode</a></span>
the current freeze mode
The current freeze mode.
</ol>
@ -710,7 +735,7 @@ custom menu creation, photo mode or time freeze.
<ul>
<li><span class="parameter">freezeMode</span>
<span class="types"><a class="type" href="../4 enums/Flow.FreezeMode.html#">FreezeMode</a></span>
new freeze mode to set.
New freeze mode to set.
</li>
</ul>
@ -847,7 +872,7 @@ custom menu creation, photo mode or time freeze.
<ul>
<li><span class="parameter">count</span>
<span class="types"><span class="type">int</span></span>
new secret count.
New secret count.
</li>
</ul>
@ -870,7 +895,7 @@ The index argument corresponds to the secret's unique ID, the same that would go
<ul>
<li><span class="parameter">index</span>
<span class="types"><span class="type">int</span></span>
an index of current level's secret (must be from 0 to 31).
An index of current level's secret (must be from 0 to 31).
</li>
</ul>
@ -994,7 +1019,7 @@ Must be an integer value (0 means no secrets).
<ul>
<li><span class="parameter">settings</span>
<span class="types"><a class="type" href="../2 classes/Flow.Settings.html#">Settings</a></span>
a settings table
A settings table.
</li>
</ul>
@ -1017,7 +1042,7 @@ Must be an integer value (0 means no secrets).
<ol>
<span class="types"><a class="type" href="../2 classes/Flow.Settings.html#">Settings</a></span>
current settings table
Current settings table.
</ol>
@ -1029,8 +1054,7 @@ Must be an integer value (0 means no secrets).
<div class="section-description">
These functions used in strings.lua, which is generated by TombIDE.
You will not need to call them manually.
These functions used in strings.lua, which is generated by TombIDE. You will not need to call them manually.
</div>
<dl class="function">
<dt>
@ -1045,8 +1069,8 @@ You will not need to call them manually.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">table</span>
<span class="types"><span class="type">tab</span></span>
array-style table with strings
<span class="types"><a class="type" href="https://www.lua.org/manual/5.4/manual.html#6.6">table</a></span>
Array-style table with strings.
</li>
</ul>
@ -1057,7 +1081,7 @@ You will not need to call them manually.
</dd>
<dt>
<a name = "GetString"></a>
<strong>GetString(string)</strong>
<strong>GetString(key)</strong>
</dt>
<dd>
Get translated string.
@ -1066,9 +1090,9 @@ You will not need to call them manually.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">string</span>
<span class="types"><span class="type">key</span></span>
key for translated string
<li><span class="parameter">key</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.4/manual.html#6.4">string</a></span>
Key for translated string.
</li>
</ul>
@ -1079,7 +1103,7 @@ You will not need to call them manually.
</dd>
<dt>
<a name = "IsStringPresent"></a>
<strong>IsStringPresent(string)</strong>
<strong>IsStringPresent(key)</strong>
</dt>
<dd>
Check if translated string is present.
@ -1088,9 +1112,9 @@ You will not need to call them manually.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">string</span>
<span class="types"><span class="type">key</span></span>
key for translated string
<li><span class="parameter">key</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.4/manual.html#6.4">string</a></span>
Key for translated string.
</li>
</ul>
@ -1112,8 +1136,8 @@ Specify which translations in the strings table correspond to which languages.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">table</span>
<span class="types"><span class="type">tab</span></span>
array-style table with language names
<span class="types"><a class="type" href="https://www.lua.org/manual/5.4/manual.html#6.6">table</a></span>
Array-style table with language names.
</li>
</ul>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -295,7 +295,7 @@
<strong>GetMouseDisplayPosition()</strong>
</dt>
<dd>
Get the display position of the cursor in percent. ()
Get the display position of the cursor in percent.

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -132,7 +132,7 @@
<td class="summary">Deregister a function as a callback.</td>
</tr>
<tr>
<td class="name" ><a href="#HandleEvent">HandleEvent(name, type, activator)</a></td>
<td class="name" ><a href="#HandleEvent">HandleEvent(name, type, [activator])</a></td>
<td class="summary">Attempt to find an event set and execute a particular event from it.</td>
</tr>
<tr>
@ -148,7 +148,7 @@
<table class="function_list">
<tr>
<td class="name" ><a href="#Lara">Lara</a></td>
<td class="summary">A <a href="../2 classes/Objects.Moveable.html#">Objects.Moveable</a> representing Lara herself.</td>
<td class="summary">An <a href="../2 classes/Objects.Moveable.html#">Objects.Moveable</a> entry representing Lara herself.</td>
</tr>
</table>
<h2><a href="#Special_tables">Special tables </a></h2>
@ -272,7 +272,7 @@ Will have no effect if the function was not registered as a callback
</dd>
<dt>
<a name = "HandleEvent"></a>
<strong>HandleEvent(name, type, activator)</strong>
<strong>HandleEvent(name, type, [activator])</strong>
</dt>
<dd>
Attempt to find an event set and execute a particular event from it.
@ -302,7 +302,8 @@ MENU</pre>
</li>
<li><span class="parameter">activator</span>
<span class="types"><a class="type" href="../2 classes/Objects.Moveable.html#">Moveable</a></span>
Optional activator. Default is the player object.
Optional activator.
<em>Default: Lara.</em>
</li>
</ul>
@ -372,7 +373,7 @@ MENU</pre>
<strong>Lara</strong>
</dt>
<dd>
A <a href="../2 classes/Objects.Moveable.html#">Objects.Moveable</a> representing Lara herself.
An <a href="../2 classes/Objects.Moveable.html#">Objects.Moveable</a> entry representing Lara herself.

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -189,14 +189,14 @@
<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>
the unique name of the Moveable as set in, or generated by, Tomb Editor
The unique name of the moveable as set in, or generated by, Tomb Editor.
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">Moveable</span></span>
<span class="types"><a class="type" href="../2 classes/Objects.Moveable.html#">Moveable</a></span>
a non-owning Moveable referencing the item.
</ol>
@ -217,15 +217,15 @@
<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>
the unique name of the mesh as set in, or generated by, Tomb Editor
The unique name of the static mesh as set in, or generated by, Tomb Editor.
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">Static</span></span>
a non-owning Static referencing the mesh.
<span class="types"><a class="type" href="../2 classes/Objects.Static.html#">Static</a></span>
a non-owning Static referencing the static mesh.
</ol>
@ -245,7 +245,7 @@
<ul>
<li><span class="parameter">slot</span>
<span class="types"><a class="type" href="../4 enums/Objects.ObjID.html#">ObjID</a></span>
the unique slot of the Moveable, e.g. <code>Objects.ObjID.ANIMATING1</code>
The unique slot of the moveable, e.g. <code>Objects.ObjID.ANIMATING1</code>.
</li>
</ul>
@ -253,7 +253,7 @@
<ol>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.4/manual.html#6.6">table</a></span>
table of Moveables referencing the given slot.
Table of moveables referencing the given slot.
</ol>
@ -273,7 +273,7 @@
<ul>
<li><span class="parameter">slot</span>
<span class="types"><span class="type">int</span></span>
the unique slot of the mesh like 10
The unique numerical slot of the static mesh.
</li>
</ul>
@ -281,7 +281,7 @@
<ol>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.4/manual.html#6.6">table</a></span>
table of Statics referencing the given slot ID.
Table of static meshes referencing the given slot.
</ol>
@ -301,7 +301,7 @@
<ul>
<li><span class="parameter">tag</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.4/manual.html#6.4">string</a></span>
to select rooms by
Tag to select rooms by.
</li>
</ul>
@ -309,7 +309,7 @@
<ol>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.4/manual.html#6.6">table</a></span>
table of Rooms containing the given tag.
Table of rooms containing the given tag.
</ol>
@ -329,15 +329,15 @@
<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>
the unique name of the camera as set in, or generated by, Tomb Editor
The unique name of the camera as set in, or generated by, Tomb Editor.
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">Camera</span></span>
a non-owning Camera referencing the camera.
<span class="types"><a class="type" href="../2 classes/Objects.Camera.html#">Camera</a></span>
A non-owning Camera referencing the camera.
</ol>
@ -357,15 +357,15 @@
<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>
the unique name of the sink as set in, or generated by, Tomb Editor
The unique name of the sink as set in, or generated by, Tomb Editor.
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">Sink</span></span>
a non-owning Sink referencing the sink.
<span class="types"><a class="type" href="../2 classes/Objects.Sink.html#">Sink</a></span>
A non-owning Sink referencing the sink.
</ol>
@ -385,15 +385,15 @@
<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>
the unique name of the sound source as set in, or generated by, Tomb Editor
The unique name of the sound source as set in, or generated by, Tomb Editor.
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">SoundSource</span></span>
a non-owning SoundSource referencing the sound source.
<span class="types"><a class="type" href="../2 classes/Objects.SoundSource.html#">SoundSource</a></span>
A non-owning SoundSource referencing the sound source.
</ol>
@ -413,15 +413,15 @@
<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>
the unique name of the AIObject as set in, or generated by, Tomb Editor
The unique name of the AIObject as set in, or generated by, Tomb Editor.
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">AIObject</span></span>
a non-owning SoundSource referencing the AI moveable.
<span class="types"><a class="type" href="../2 classes/Objects.AIObject.html#">AIObject</a></span>
A non-owning AIObject referencing the AI object.
</ol>
@ -441,15 +441,15 @@
<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>
the unique name of the volume as set in, or generated by, Tomb Editor
The unique name of the volume as set in, or generated by, Tomb Editor.
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">Volume</span></span>
a non-owning Volume referencing the room.
<span class="types"><a class="type" href="../2 classes/Objects.Volume.html#">Volume</a></span>
A non-owning Volume referencing the volume.
</ol>
@ -469,15 +469,15 @@
<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>
the unique name of the room as set in Tomb Editor
The unique name of the room as set in Tomb Editor.
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">Room</span></span>
a non-owning Room referencing the room.
<span class="types"><a class="type" href="../2 classes/Objects.Room.html#">Room</a></span>
A non-owning Room referencing the room.
</ol>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -156,7 +156,7 @@
<td class="summary">Check if the sound effect is playing.</td>
</tr>
<tr>
<td class="name" ><a href="#IsAudioTrackPlaying">IsAudioTrackPlaying(Track)</a></td>
<td class="name" ><a href="#IsAudioTrackPlaying">IsAudioTrackPlaying(track)</a></td>
<td class="summary">Check if the audio track is playing.</td>
</tr>
<tr>
@ -177,7 +177,7 @@
<strong>PlayAudioTrack(filename, type)</strong>
</dt>
<dd>
Play an audio track. Supported formats are wav, mp3 and ogg.
Play an audio track. Should be placed in the <code>Audio</code> folder. Supported formats are wav, mp3 and ogg.
@ -362,7 +362,7 @@
</dd>
<dt>
<a name = "IsAudioTrackPlaying"></a>
<strong>IsAudioTrackPlaying(Track)</strong>
<strong>IsAudioTrackPlaying(track)</strong>
</dt>
<dd>
Check if the audio track is playing.
@ -371,7 +371,7 @@
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">Track</span>
<li><span class="parameter">track</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.4/manual.html#6.4">string</a></span>
Filename to check. Should be without extension and without full directory path.
</li>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -124,15 +124,15 @@
<h2><a href="#Functions">Functions</a></h2>
<table class="function_list">
<tr>
<td class="name" ><a href="#ShowString">ShowString(str, time, autoDelete)</a></td>
<td class="name" ><a href="#ShowString">ShowString(string, [time], [autoDelete])</a></td>
<td class="summary">Show some text on-screen.</td>
</tr>
<tr>
<td class="name" ><a href="#HideString">HideString(str)</a></td>
<td class="name" ><a href="#HideString">HideString(string)</a></td>
<td class="summary">Hide some on-screen text.</td>
</tr>
<tr>
<td class="name" ><a href="#IsStringDisplaying">IsStringDisplaying(str)</a></td>
<td class="name" ><a href="#IsStringDisplaying">IsStringDisplaying(string)</a></td>
<td class="summary">Checks if the string is shown</td>
</tr>
</table>
@ -146,7 +146,7 @@
<dl class="function">
<dt>
<a name = "ShowString"></a>
<strong>ShowString(str, time, autoDelete)</strong>
<strong>ShowString(string, [time], [autoDelete])</strong>
</dt>
<dd>
Show some text on-screen.
@ -155,23 +155,21 @@
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">str</span>
<li><span class="parameter">string</span>
<span class="types"><span class="type">DisplayString</span></span>
the string object to draw
The string object to draw.
</li>
<li><span class="parameter">time</span>
<span class="types"><span class="type">float</span></span>
the time in seconds for which to show the string.
If not given, the string will have an "infinite" life, and will show
The time in seconds for which to show the string. If not given, the string will have an "infinite" life, and will show
until <a href="../1 modules/Strings.html#HideString">HideString</a> is called or until the level is finished.
Default: nil (i.e. infinite)
<em>Optional.</em>
</li>
<li><span class="parameter">autoDelete</span>
<span class="types"><span class="type">bool</span></span>
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: true
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.
<em>Default: true.</em>
</li>
</ul>
@ -182,7 +180,7 @@ Default: true
</dd>
<dt>
<a name = "HideString"></a>
<strong>HideString(str)</strong>
<strong>HideString(string)</strong>
</dt>
<dd>
Hide some on-screen text.
@ -191,10 +189,9 @@ Default: true
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">str</span>
<li><span class="parameter">string</span>
<span class="types"><span class="type">DisplayString</span></span>
the string object to hide. Must previously have been shown
with a call to <a href="../1 modules/Strings.html#ShowString">ShowString</a>, or this function will have no effect.
The string object to hide. Must previously have been shown with a call to <a href="../1 modules/Strings.html#ShowString">ShowString</a>, or this function will have no effect.
</li>
</ul>
@ -205,7 +202,7 @@ with a call to <a href="../1 modules/Strings.html#ShowString">ShowString</a>, or
</dd>
<dt>
<a name = "IsStringDisplaying"></a>
<strong>IsStringDisplaying(str)</strong>
<strong>IsStringDisplaying(string)</strong>
</dt>
<dd>
Checks if the string is shown
@ -214,9 +211,9 @@ with a call to <a href="../1 modules/Strings.html#ShowString">ShowString</a>, or
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">str</span>
<li><span class="parameter">string</span>
<span class="types"><span class="type">DisplayString</span></span>
the string object to be checked
The string object to be checked.
</li>
</ul>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -144,15 +144,15 @@
<td class="summary">Translate a pair of pixel coordinates to display position coordinates.</td>
</tr>
<tr>
<td class="name" ><a href="#PickMoveableByDisplayPosition">PickMoveableByDisplayPosition(Display)</a></td>
<td class="name" ><a href="#PickMoveableByDisplayPosition">PickMoveableByDisplayPosition(position)</a></td>
<td class="summary">Pick a moveable by the given display position.</td>
</tr>
<tr>
<td class="name" ><a href="#PickStaticByDisplayPosition">PickStaticByDisplayPosition(Display)</a></td>
<td class="name" ><a href="#PickStaticByDisplayPosition">PickStaticByDisplayPosition(position)</a></td>
<td class="summary">Pick a static mesh by the given display position.</td>
</tr>
<tr>
<td class="name" ><a href="#PrintLog">PrintLog(message, logLevel, [allowSpam])</a></td>
<td class="name" ><a href="#PrintLog">PrintLog(Message, logLevel, [allowSpam])</a></td>
<td class="summary">Write messages within the Log file</td>
</tr>
</table>
@ -169,8 +169,7 @@
<strong>HasLineOfSight(roomID, posA, posB)</strong>
</dt>
<dd>
Determine if there is a clear line of sight between two positions.
NOTE: Limited to room geometry. Objects are ignored.()
Determine if there is a clear line of sight between two positions. Limited to room geometry. Objects are ignored.
@ -194,7 +193,7 @@
<ol>
<span class="types"><span class="type">bool</span></span>
<strong>true</strong> if there is a line of sight, <strong>false</strong> if not.
true if there is a line of sight, false if not.
</ol>
@ -358,7 +357,7 @@ To be used with <a href="../2 classes/Strings.DisplayString.html#DisplayString:G
</dd>
<dt>
<a name = "PickMoveableByDisplayPosition"></a>
<strong>PickMoveableByDisplayPosition(Display)</strong>
<strong>PickMoveableByDisplayPosition(position)</strong>
</dt>
<dd>
Pick a moveable by the given display position.
@ -367,9 +366,9 @@ To be used with <a href="../2 classes/Strings.DisplayString.html#DisplayString:G
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">Display</span>
<li><span class="parameter">position</span>
<span class="types"><a class="type" href="../3 primitive classes/Vec2.html#">Vec2</a></span>
space position in percent.
Display space position in percent.
</li>
</ul>
@ -386,7 +385,7 @@ To be used with <a href="../2 classes/Strings.DisplayString.html#DisplayString:G
</dd>
<dt>
<a name = "PickStaticByDisplayPosition"></a>
<strong>PickStaticByDisplayPosition(Display)</strong>
<strong>PickStaticByDisplayPosition(position)</strong>
</dt>
<dd>
Pick a static mesh by the given display position.
@ -395,9 +394,9 @@ To be used with <a href="../2 classes/Strings.DisplayString.html#DisplayString:G
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">Display</span>
<li><span class="parameter">position</span>
<span class="types"><a class="type" href="../3 primitive classes/Vec2.html#">Vec2</a></span>
space position in percent.
Display space position in percent.
</li>
</ul>
@ -414,7 +413,7 @@ To be used with <a href="../2 classes/Strings.DisplayString.html#DisplayString:G
</dd>
<dt>
<a name = "PrintLog"></a>
<strong>PrintLog(message, logLevel, [allowSpam])</strong>
<strong>PrintLog(Message, logLevel, [allowSpam])</strong>
</dt>
<dd>
Write messages within the Log file
@ -428,17 +427,17 @@ To be used with <a href="../2 classes/Strings.DisplayString.html#DisplayString:G
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">message</span>
<li><span class="parameter">Message</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.4/manual.html#6.4">string</a></span>
to be displayed within the Log
to be displayed within the log.
</li>
<li><span class="parameter">logLevel</span>
<span class="types"><a class="type" href="../4 enums/Util.LogLevel.html#">LogLevel</a></span>
log level to be displayed
Log level to be displayed.
</li>
<li><span class="parameter">allowSpam</span>
<span class="types"><span class="type">bool</span></span>
true allows spamming of the message
If true, allows continuous spamming of the message.
<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.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -124,15 +124,15 @@
<h2><a href="#Functions">Functions</a></h2>
<table class="function_list">
<tr>
<td class="name" ><a href="#FadeIn">FadeIn(speed)</a></td>
<td class="name" ><a href="#FadeIn">FadeIn([speed])</a></td>
<td class="summary">Do a full-screen fade-in from black.</td>
</tr>
<tr>
<td class="name" ><a href="#FadeOut">FadeOut(speed)</a></td>
<td class="name" ><a href="#FadeOut">FadeOut([speed])</a></td>
<td class="summary">Do a full-screen fade-to-black.</td>
</tr>
<tr>
<td class="name" ><a href="#SetCineBars">SetCineBars(height, speed)</a></td>
<td class="name" ><a href="#SetCineBars">SetCineBars([height], [speed])</a></td>
<td class="summary">Move black cinematic bars in from the top and bottom of the game window.</td>
</tr>
<tr>
@ -164,7 +164,7 @@
<td class="summary">Sets the post-process effect mode, like negative or monochrome.</td>
</tr>
<tr>
<td class="name" ><a href="#SetPostProcessStrength">SetPostProcessStrength(strength)</a></td>
<td class="name" ><a href="#SetPostProcessStrength">SetPostProcessStrength([strength])</a></td>
<td class="summary">Sets the post-process effect strength.</td>
</tr>
<tr>
@ -172,6 +172,30 @@
<td class="summary">Sets the post-process tint.</td>
</tr>
<tr>
<td class="name" ><a href="#PlayVideo">PlayVideo(fileName, [background], [silent], [loop])</a></td>
<td class="summary">Play a video file.</td>
</tr>
<tr>
<td class="name" ><a href="#StopVideo">StopVideo()</a></td>
<td class="summary">Stop the currently playing video.</td>
</tr>
<tr>
<td class="name" ><a href="#GetVideoPosition">GetVideoPosition()</a></td>
<td class="summary">Gets the currently playing video position.</td>
</tr>
<tr>
<td class="name" ><a href="#SetVideoPosition">SetVideoPosition(position)</a></td>
<td class="summary">Sets the currently playing video position.</td>
</tr>
<tr>
<td class="name" ><a href="#GetVideoDominantColor">GetVideoDominantColor()</a></td>
<td class="summary">Gets the dominant color for the current video frame.</td>
</tr>
<tr>
<td class="name" ><a href="#IsVideoPlaying">IsVideoPlaying([name])</a></td>
<td class="summary">Checks if video is currently playing.</td>
</tr>
<tr>
<td class="name" ><a href="#PlayFlyby">PlayFlyby(seqID)</a></td>
<td class="summary">Play a flyby sequence.</td>
</tr>
@ -188,7 +212,7 @@
<td class="summary">Reset object camera back to Lara and deactivate object camera.</td>
</tr>
<tr>
<td class="name" ><a href="#FlashScreen">FlashScreen(color, speed)</a></td>
<td class="name" ><a href="#FlashScreen">FlashScreen([color], [speed])</a></td>
<td class="summary">Flash screen.</td>
</tr>
<tr>
@ -206,7 +230,7 @@
<dl class="function">
<dt>
<a name = "FadeIn"></a>
<strong>FadeIn(speed)</strong>
<strong>FadeIn([speed])</strong>
</dt>
<dd>
Do a full-screen fade-in from black.
@ -217,7 +241,8 @@
<ul>
<li><span class="parameter">speed</span>
<span class="types"><span class="type">float</span></span>
(default 1.0). Speed in units per second. A value of 1 will make the fade take one second.
Speed in units per second. A value of 1 will make the fade take one second.
<em>Default: 1.</em>
</li>
</ul>
@ -228,7 +253,7 @@
</dd>
<dt>
<a name = "FadeOut"></a>
<strong>FadeOut(speed)</strong>
<strong>FadeOut([speed])</strong>
</dt>
<dd>
Do a full-screen fade-to-black. The screen will remain black until a call to FadeIn.
@ -239,7 +264,8 @@
<ul>
<li><span class="parameter">speed</span>
<span class="types"><span class="type">float</span></span>
(default 1.0). Speed in units per second. A value of 1 will make the fade take one second.
Speed in units per second. A value of 1 will make the fade take one second.
<em>Default: 1.</em>
</li>
</ul>
@ -250,7 +276,7 @@
</dd>
<dt>
<a name = "SetCineBars"></a>
<strong>SetCineBars(height, speed)</strong>
<strong>SetCineBars([height], [speed])</strong>
</dt>
<dd>
Move black cinematic bars in from the top and bottom of the game window.
@ -261,11 +287,13 @@
<ul>
<li><span class="parameter">height</span>
<span class="types"><span class="type">float</span></span>
<strong>(default 30)</strong> Percentage of the screen to be covered
Percentage of the screen to be covered.
<em>Default: 30.</em>
</li>
<li><span class="parameter">speed</span>
<span class="types"><span class="type">float</span></span>
<strong>(default 30)</strong> Coverage percent per second
Coverage percent per second.
<em>Default: 30.</em>
</li>
</ul>
@ -287,7 +315,7 @@
<ul>
<li><span class="parameter">angle</span>
<span class="types"><span class="type">float</span></span>
in degrees (clamped to [10, 170])
Angle in degrees (clamped to [10, 170]).
</li>
</ul>
@ -310,7 +338,7 @@
<ol>
<span class="types"><span class="type">float</span></span>
current FOV angle in degrees
Current FOV angle in degrees.
</ol>
@ -331,7 +359,7 @@
<ol>
<span class="types"><a class="type" href="../4 enums/View.CameraType.html#">CameraType</a></span>
value used by the Main Camera.
Value used by the game camera.
</ol>
@ -360,7 +388,7 @@
<ol>
<span class="types"><a class="type" href="../3 primitive classes/Vec3.html#">Vec3</a></span>
current camera position
Current camera position.
</ol>
@ -381,7 +409,7 @@
<ol>
<span class="types"><a class="type" href="../3 primitive classes/Vec3.html#">Vec3</a></span>
current camera target
Current camera target.
</ol>
@ -402,7 +430,7 @@
<ol>
<span class="types"><a class="type" href="../2 classes/Objects.Room.html#">Room</a></span>
current room of the camera
Current room of the camera.
</ol>
@ -422,7 +450,7 @@
<ul>
<li><span class="parameter">effect</span>
<span class="types"><a class="type" href="../4 enums/View.PostProcessMode.html#">PostProcessMode</a></span>
type to set.
Effect type to set.
</li>
</ul>
@ -433,7 +461,7 @@
</dd>
<dt>
<a name = "SetPostProcessStrength"></a>
<strong>SetPostProcessStrength(strength)</strong>
<strong>SetPostProcessStrength([strength])</strong>
</dt>
<dd>
Sets the post-process effect strength.
@ -444,7 +472,8 @@
<ul>
<li><span class="parameter">strength</span>
<span class="types"><span class="type">float</span></span>
(default 1.0). How strong the effect is.
How strong the effect is.
<em>Default: 1.</em>
</li>
</ul>
@ -474,6 +503,152 @@
</dd>
<dt>
<a name = "PlayVideo"></a>
<strong>PlayVideo(fileName, [background], [silent], [loop])</strong>
</dt>
<dd>
Play a video file. File should be placed in the <code>FMV</code> folder.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">fileName</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.4/manual.html#6.4">string</a></span>
Video file name. Can be provided without extension, if type is mp4, mkv, mov or avi.
</li>
<li><span class="parameter">background</span>
<span class="types"><span class="type">bool</span></span>
Play video in the background mode.
In such case, video won't play in fullscreen, but must be shown using special animated texture type in Tomb Editor, or using <a href="../2 classes/View.DisplaySprite.html#">View.DisplaySprite</a>.
<em>Default: false.</em>
</li>
<li><span class="parameter">silent</span>
<span class="types"><span class="type">bool</span></span>
Play video without sound.
<em>Default: false.</em>
</li>
<li><span class="parameter">loop</span>
<span class="types"><span class="type">bool</span></span>
Play video in a loop.
<em>Default: false.</em>
</li>
</ul>
</dd>
<dt>
<a name = "StopVideo"></a>
<strong>StopVideo()</strong>
</dt>
<dd>
Stop the currently playing video. Only possible if video is playing in the background mode.
</dd>
<dt>
<a name = "GetVideoPosition"></a>
<strong>GetVideoPosition()</strong>
</dt>
<dd>
Gets the currently playing video position.
<h3>Returns:</h3>
<ol>
<span class="types"><a class="type" href="../3 primitive classes/Time.html#">Time</a></span>
Current video position.
</ol>
</dd>
<dt>
<a name = "SetVideoPosition"></a>
<strong>SetVideoPosition(position)</strong>
</dt>
<dd>
Sets the currently playing video position.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">position</span>
<span class="types"><a class="type" href="../3 primitive classes/Time.html#">Time</a></span>
New video position.
</li>
</ul>
</dd>
<dt>
<a name = "GetVideoDominantColor"></a>
<strong>GetVideoDominantColor()</strong>
</dt>
<dd>
Gets the dominant color for the current video frame. If no video is playing, returns black.
<h3>Returns:</h3>
<ol>
<span class="types"><a class="type" href="../3 primitive classes/Color.html#">Color</a></span>
Dominant video color.
</ol>
</dd>
<dt>
<a name = "IsVideoPlaying"></a>
<strong>IsVideoPlaying([name])</strong>
</dt>
<dd>
Checks if video is currently playing.
<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>
Video file name. If provided, checks if the currently playing video file name is the same as the provided one.
<em>Optional.</em>
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">bool</span></span>
True if video is currently playing.
</ol>
</dd>
<dt>
<a name = "PlayFlyby"></a>
@ -588,7 +763,7 @@
</dd>
<dt>
<a name = "FlashScreen"></a>
<strong>FlashScreen(color, speed)</strong>
<strong>FlashScreen([color], [speed])</strong>
</dt>
<dd>
Flash screen.
@ -599,11 +774,13 @@
<ul>
<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))
Color.
<em>Default: Color(255&#44; 255&#44; 255).</em>
</li>
<li><span class="parameter">speed</span>
<span class="types"><span class="type">float</span></span>
(default 1.0). Speed in units per second. Value of 1 will make flash take one second. Clamped to [0.005, 1.0].
Speed in units per second. Value of 1 will make flash take one second. Clamped to [0.005, 1.0].
<em>Default: 1.</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.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -123,7 +123,7 @@
<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>
<td class="summary">(string) String key for the level's name.</td>
</tr>
<tr>
<td class="name" ><a href="#scriptFile">scriptFile</a></td>
@ -139,7 +139,7 @@
</tr>
<tr>
<td class="name" ><a href="#ambientTrack">ambientTrack</a></td>
<td class="summary">(string) initial ambient sound track to play.</td>
<td class="summary">(string) Initial ambient sound track to play.</td>
</tr>
<tr>
<td class="name" ><a href="#layer1">layer1</a></td>
@ -151,11 +151,11 @@
</tr>
<tr>
<td class="name" ><a href="#horizon1">horizon1</a></td>
<td class="summary">(<a href="../3 primitive classes/Flow.Horizon.html#">Flow.Horizon</a>) First horizon layer.</td>
<td class="summary">(<a href="../3 primitive classes/Flow.Horizon.html#">Flow.Horizon</a>) Primary horizon object.</td>
</tr>
<tr>
<td class="name" ><a href="#horizon2">horizon2</a></td>
<td class="summary">(<a href="../3 primitive classes/Flow.Horizon.html#">Flow.Horizon</a>) Second horizon layer.</td>
<td class="summary">(<a href="../3 primitive classes/Flow.Horizon.html#">Flow.Horizon</a>) Secondary horizon object.</td>
</tr>
<tr>
<td class="name" ><a href="#starfield">starfield</a></td>
@ -183,7 +183,7 @@
</tr>
<tr>
<td class="name" ><a href="#laraType">laraType</a></td>
<td class="summary">(LaraType) Must be one of the LaraType values.</td>
<td class="summary">(LaraType) Appearance of Lara.</td>
</tr>
<tr>
<td class="name" ><a href="#rumble">rumble</a></td>
@ -226,8 +226,7 @@
<strong>nameKey</strong>
</dt>
<dd>
(string) string key for the level's (localised) name.
Corresponds to an entry in strings.lua.
(string) String key for the level's name. Corresponds to an entry in strings.lua.
@ -243,7 +242,7 @@
</dt>
<dd>
(string) Level-specific Lua script file.
Path of the Lua file holding the level's logic script, relative to the location of the tombengine executable
Path of the Lua file holding the level's logic script, relative to the location of the Tomb Engine executable.
@ -275,7 +274,7 @@
</dt>
<dd>
(string) Load screen image.
Path of the level's load screen file (.png or .jpg), relative to the location of the tombengine executable
Path of the level's load screen file (.png or .jpg), relative to the location of the Tomb Engine executable.
@ -290,7 +289,7 @@
<strong>ambientTrack</strong>
</dt>
<dd>
(string) initial ambient sound track to play.
(string) Initial ambient sound track to play.
This is the filename of the track <strong>without</strong> the .wav extension.
@ -336,7 +335,7 @@
<strong>horizon1</strong>
</dt>
<dd>
(<a href="../3 primitive classes/Flow.Horizon.html#">Flow.Horizon</a>) First horizon layer.
(<a href="../3 primitive classes/Flow.Horizon.html#">Flow.Horizon</a>) Primary horizon object.
@ -351,7 +350,7 @@
<strong>horizon2</strong>
</dt>
<dd>
(<a href="../3 primitive classes/Flow.Horizon.html#">Flow.Horizon</a>) Second horizon layer.
(<a href="../3 primitive classes/Flow.Horizon.html#">Flow.Horizon</a>) Secondary horizon object.
@ -413,7 +412,7 @@
</dt>
<dd>
(bool) Enable flickering lightning in the sky.
Equivalent to classic TRLE's LIGHTNING setting. As in the TRC Ireland levels.
Equivalent to classic TRLE's lightning setting, as in the TRC Ireland levels or TR4 Cairo levels.
@ -460,20 +459,9 @@
<strong>laraType</strong>
</dt>
<dd>
(LaraType) Must be one of the LaraType values.
These are:</p>
<pre><code>Normal
Young
Bunhead
Catsuit
Divesuit
Invisible
</code></pre>
<p>e.g. <code>myLevel.laraType = LaraType.Divesuit</code></p>
<p> <strong>Not yet fully implemented.</strong> Only types <code>Normal</code> and <code>Young</code> are guaranteed to work.
(LaraType) Appearance of Lara. Must be either <code>LaraType.Normal</code> or <code>LaraType.Young</code>.
E.g. <code>myLevel.laraType = LaraType.Young</code> will make Lara appear as young (with two ponytails rendered).
This setting does not affect ability to use weapons or flares.

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -350,7 +350,7 @@
<ul>
<li><span class="parameter">crawlExtended</span>
<span class="types"><span class="type">bool</span></span>
when enabled, player will be able to traverse across one-click steps in crawlspaces.
When enabled, player will be able to traverse across one-click steps in crawlspaces.
</li>
</ul>
@ -371,7 +371,7 @@
<ul>
<li><span class="parameter">crouchRoll</span>
<span class="types"><span class="type">bool</span></span>
when enabled, player can perform crawlspace roll by pressing sprint key.
When enabled, player can perform crawlspace roll by pressing sprint key.
</li>
</ul>
@ -392,7 +392,7 @@
<ul>
<li><span class="parameter">crawlspaceSwandive</span>
<span class="types"><span class="type">bool</span></span>
when enabled, player will be able to swandive into crawlspaces.
When enabled, player will be able to swandive into crawlspaces.
</li>
</ul>
@ -413,7 +413,7 @@
<ul>
<li><span class="parameter">sprintJump</span>
<span class="types"><span class="type">bool</span></span>
if enabled, player will be able to perform extremely long jump when sprinting.
If enabled, player will be able to perform extremely long jump when sprinting.
</li>
</ul>
@ -434,7 +434,7 @@
<ul>
<li><span class="parameter">ledgeJumps</span>
<span class="types"><span class="type">bool</span></span>
if this setting is enabled, player will be able to jump upwards while hanging on the ledge.
If this setting is enabled, player will be able to jump upwards while hanging on the ledge.
</li>
</ul>
@ -455,7 +455,7 @@
<ul>
<li><span class="parameter">poseTimeout</span>
<span class="types"><span class="type">int</span></span>
if this setting is larger than 0, idle standing pose animation will be performed after given timeout (in seconds).
If this setting is larger than 0, idle standing pose animation will be performed after given timeout (in seconds).
</li>
</ul>
@ -483,7 +483,7 @@
<ul>
<li><span class="parameter">binocularLightColor</span>
<span class="types"><a class="type" href="../3 primitive classes/Color.html#">Color</a></span>
color of highlight, when player presses action. Zero color means there will be no highlight.
Color of highlight, when player presses action. Zero color means there will be no highlight.
</li>
</ul>
@ -504,7 +504,7 @@
<ul>
<li><span class="parameter">lasersightLightColor</span>
<span class="types"><a class="type" href="../3 primitive classes/Color.html#">Color</a></span>
lasersight highlight color. Zero color means there will be no highlight.
Lasersight highlight color. Zero color means there will be no highlight.
</li>
</ul>
@ -525,7 +525,7 @@
<ul>
<li><span class="parameter">objectCollision</span>
<span class="types"><span class="type">bool</span></span>
when enabled, camera will collide with moveables and statics. Disable for TR4-like camera behaviour.
When enabled, camera will collide with moveables and statics. Disable for TR4-like camera behaviour.
</li>
</ul>
@ -553,7 +553,7 @@
<ul>
<li><span class="parameter">color</span>
<span class="types"><a class="type" href="../3 primitive classes/Color.html#">Color</a></span>
flare color. Used for sparks and lensflare coloring as well.
Flare color. Used for sparks and lensflare coloring as well.
</li>
</ul>
@ -574,7 +574,7 @@
<ul>
<li><span class="parameter">offset</span>
<span class="types"><a class="type" href="../3 primitive classes/Vec3.html#">Vec3</a></span>
a relative muzzle offset where light and particle effects originate from.
A relative muzzle offset where light and particle effects originate from.
</li>
</ul>
@ -595,7 +595,7 @@
<ul>
<li><span class="parameter">range</span>
<span class="types"><span class="type">int</span></span>
flare light radius or range. Represented in "clicks" equal to 256 world units.
Flare light radius or range. Represented in "clicks" equal to 256 world units.
</li>
</ul>
@ -616,7 +616,7 @@
<ul>
<li><span class="parameter">timeout</span>
<span class="types"><span class="type">int</span></span>
flare burn timeout. Flare will stop working after given timeout (specified in seconds).
Flare burn timeout. Flare will stop working after given timeout (specified in seconds).
</li>
</ul>
@ -637,7 +637,7 @@
<ul>
<li><span class="parameter">pickupCount</span>
<span class="types"><span class="type">int</span></span>
specifies amount of flares that you get when you pick up a box of flares.
Specifies amount of flares that you get when you pick up a box of flares.
</li>
</ul>
@ -658,7 +658,7 @@
<ul>
<li><span class="parameter">lensflareBrightness</span>
<span class="types"><span class="type">float</span></span>
brightness multiplier. Specifies how bright lens flare is in relation to light (on a range from 0 to 1).
Brightness multiplier. Specifies how bright lens flare is in relation to light (on a range from 0 to 1).
</li>
</ul>
@ -679,7 +679,7 @@
<ul>
<li><span class="parameter">sparks</span>
<span class="types"><span class="type">bool</span></span>
spark effect. Determines whether flare generates sparks when burning.
Spark effect. Determines whether flare generates sparks when burning.
</li>
</ul>
@ -700,7 +700,7 @@
<ul>
<li><span class="parameter">smoke</span>
<span class="types"><span class="type">bool</span></span>
smoke effect. Determines whether flare generates smoke when burning.
Smoke effect. Determines whether flare generates smoke when burning.
</li>
</ul>
@ -721,7 +721,7 @@
<ul>
<li><span class="parameter">flicker</span>
<span class="types"><span class="type">bool</span></span>
light and lensflare flickering. When turned off, flare light will be constant.
Light and lensflare flickering. When turned off, flare light will be constant.
</li>
</ul>
@ -751,7 +751,7 @@
<ul>
<li><span class="parameter">mesh</span>
<span class="types"><span class="type">int</span></span>
index of a root mesh to which hair will attach. Root mesh may be different for each hair object.
Index of a root mesh to which hair will attach. Root mesh may be different for each hair object.
</li>
</ul>
@ -772,7 +772,7 @@
<ul>
<li><span class="parameter">offset</span>
<span class="types"><a class="type" href="../3 primitive classes/Vec3.html#">Vec3</a></span>
specifies how braid is positioned in relation to a headmesh.
Specifies how braid is positioned in relation to a headmesh.
</li>
</ul>
@ -793,7 +793,7 @@
<ul>
<li><span class="parameter">indices</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.4/manual.html#6.6">table</a></span>
a list of headmesh's vertex connection indices. Each index corresponds to nearest braid rootmesh vertex. Amount of indices is unlimited.
A list of headmesh's vertex connection indices. Each index corresponds to nearest braid rootmesh vertex. Amount of indices is unlimited.
</li>
</ul>
@ -821,7 +821,7 @@
<ul>
<li><span class="parameter">statusBars</span>
<span class="types"><span class="type">bool</span></span>
if disabled, all status bars (health, air, stamina) will be hidden.
If disabled, all status bars (health, air, stamina) will be hidden.
</li>
</ul>
@ -842,7 +842,7 @@
<ul>
<li><span class="parameter">loadingBar</span>
<span class="types"><span class="type">bool</span></span>
if disabled, loading bar will be invisible in game.
If disabled, loading bar will be invisible in game.
</li>
</ul>
@ -863,7 +863,7 @@
<ul>
<li><span class="parameter">speedometer</span>
<span class="types"><span class="type">bool</span></span>
if disabled, speedometer will be invisible in game.
If disabled, speedometer will be invisible in game.
</li>
</ul>
@ -884,7 +884,7 @@
<ul>
<li><span class="parameter">pickupNotifier</span>
<span class="types"><span class="type">bool</span></span>
if disabled, pickup notifier will be invisible in game.
If disabled, pickup notifier will be invisible in game.
</li>
</ul>
@ -912,7 +912,7 @@
<ul>
<li><span class="parameter">gravity</span>
<span class="types"><span class="type">float</span></span>
specifies global gravity. Mostly affects Lara and several other objects.
Specifies global gravity. Mostly affects Lara and several other objects.
</li>
</ul>
@ -933,7 +933,7 @@
<ul>
<li><span class="parameter">swimVelocity</span>
<span class="types"><span class="type">float</span></span>
specifies swim velocity for Lara. Affects both surface and underwater.
Specifies swim velocity for Lara. Affects both surface and underwater.
</li>
</ul>
@ -962,7 +962,7 @@
<ul>
<li><span class="parameter">accuracy</span>
<span class="types"><span class="type">float</span></span>
determines accuracy range in angles (smaller angles mean higher accuracy). Applicable only for firearms.
Determines accuracy range in angles (smaller angles mean higher accuracy). Applicable only for firearms.
</li>
</ul>
@ -983,7 +983,7 @@
<ul>
<li><span class="parameter">targetingDistance</span>
<span class="types"><span class="type">float</span></span>
specifies maximum targeting distance in world units (1 block = 1024 world units) for a given weapon.
Specifies maximum targeting distance in world units (1 block = 1024 world units) for a given weapon.
</li>
</ul>
@ -1004,7 +1004,7 @@
<ul>
<li><span class="parameter">interval</span>
<span class="types"><span class="type">float</span></span>
specifies an interval (in frames), after which Lara is able to shoot again. Not applicable for backholster weapons.
Specifies an interval (in frames), after which Lara is able to shoot again. Not applicable for backholster weapons.
</li>
</ul>
@ -1025,7 +1025,7 @@
<ul>
<li><span class="parameter">damage</span>
<span class="types"><span class="type">int</span></span>
amount of hit points taken for every hit.
Amount of hit points taken for every hit.
</li>
</ul>
@ -1046,7 +1046,7 @@
<ul>
<li><span class="parameter">alternateDamage</span>
<span class="types"><span class="type">int</span></span>
for Revolver and HK, specifies damage in lasersight mode. For crossbow, specifies damage for explosive ammo.
For Revolver and HK, specifies damage in lasersight mode. For crossbow, specifies damage for explosive ammo.
</li>
</ul>
@ -1067,7 +1067,7 @@
<ul>
<li><span class="parameter">waterLevel</span>
<span class="types"><span class="type">int</span></span>
specifies water depth, at which Lara will put weapons back into holsters, indicating it's not possible to use it in water.
Specifies water depth, at which Lara will put weapons back into holsters, indicating it's not possible to use it in water.
</li>
</ul>
@ -1088,7 +1088,7 @@
<ul>
<li><span class="parameter">pickupCount</span>
<span class="types"><span class="type">int</span></span>
amount of ammo which is given with every ammo pickup for this weapon.
Amount of ammo which is given with every ammo pickup for this weapon.
</li>
</ul>
@ -1109,7 +1109,7 @@
<ul>
<li><span class="parameter">flashColor</span>
<span class="types"><a class="type" href="../3 primitive classes/Color.html#">Color</a></span>
specifies the color of the gunflash. Applicable only for firearms.
specifies the color of the gunflash.
</li>
</ul>
@ -1130,7 +1130,7 @@
<ul>
<li><span class="parameter">flashRange</span>
<span class="types"><a class="type" href="../3 primitive classes/Color.html#">Color</a></span>
specifies the range of the gunflash. Applicable only for firearms.
specifies the range of the gunflash.
</li>
</ul>
@ -1151,7 +1151,7 @@
<ul>
<li><span class="parameter">flashDuration</span>
<span class="types"><span class="type">int</span></span>
specifies the duration of a gunflash effect. Applicable only for firearms.
specifies the duration of a gunflash effect.
</li>
</ul>
@ -1172,7 +1172,7 @@
<ul>
<li><span class="parameter">smoke</span>
<span class="types"><span class="type">bool</span></span>
if set to true, indicates that weapon emits gun smoke. Not applicable for crossbow and harpoon gun.
if set to true, indicates that weapon emits gun smoke.
</li>
</ul>
@ -1193,7 +1193,7 @@
<ul>
<li><span class="parameter">shell</span>
<span class="types"><span class="type">bool</span></span>
if set to true, indicates that weapon emits gun shell. Applicable only for firearms.
If set to true, indicates that weapon emits gun shell. Applicable only for firearms.
</li>
</ul>
@ -1214,7 +1214,7 @@
<ul>
<li><span class="parameter">muzzleFlash</span>
<span class="types"><span class="type">bool</span></span>
specifies whether muzzle flash should be displayed or not. Applicable only for firearms.
specifies whether muzzle flash should be displayed or not.
</li>
</ul>
@ -1235,7 +1235,7 @@
<ul>
<li><span class="parameter">muzzleGlow</span>
<span class="types"><span class="type">bool</span></span>
specifies whether muzzle glow should be displayed or not. Applicable only for firearms.
specifies whether muzzle glow should be displayed or not.
</li>
</ul>
@ -1256,7 +1256,7 @@
<ul>
<li><span class="parameter">colorizeMuzzleFlash</span>
<span class="types"><span class="type">bool</span></span>
specifies whether muzzle flash should be tinted with the same color as gunflash color. Applicable only for firearms.
specifies whether muzzle flash should be tinted with the same color as gunflash color.
</li>
</ul>
@ -1277,7 +1277,7 @@
<ul>
<li><span class="parameter">muzzleOffset</span>
<span class="types"><a class="type" href="../3 primitive classes/Vec3.html#">Vec3</a></span>
specifies offset for spawning muzzle gunflash effects. Applicable only for firearms.
specifies offset for spawning muzzle gunflash effects.
</li>
</ul>
@ -1305,7 +1305,7 @@
<ul>
<li><span class="parameter">errorMode</span>
<span class="types"><a class="type" href="../4 enums/Flow.ErrorMode.html#">ErrorMode</a></span>
error mode to use.
Error mode to use.
</li>
</ul>
@ -1328,7 +1328,7 @@
<ul>
<li><span class="parameter">multithreaded</span>
<span class="types"><span class="type">bool</span></span>
determines whether to use multithreading or not.
Determines whether to use multithreading or not.
</li>
</ul>
@ -1352,7 +1352,7 @@
<ul>
<li><span class="parameter">fastReload</span>
<span class="types"><span class="type">bool</span></span>
toggle fast reload on or off.
Toggles fast reload on or off.
</li>
</ul>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -178,7 +178,7 @@
<ul>
<li><span class="parameter">ammoHits</span>
<span class="types"><span class="type">int</span></span>
amount of successful enemy hits.
Amount of successful enemy hits.
</li>
</ul>
@ -199,7 +199,7 @@
<ul>
<li><span class="parameter">ammoUsed</span>
<span class="types"><span class="type">int</span></span>
amount of used ammo.
Amount of used ammo.
</li>
</ul>
@ -220,7 +220,7 @@
<ul>
<li><span class="parameter">distanceTraveled</span>
<span class="types"><span class="type">int</span></span>
amount of traveled distance in world units. One meter is 420 world units.
Amount of traveled distance in world units. One meter is 420 world units.
</li>
</ul>
@ -241,7 +241,7 @@
<ul>
<li><span class="parameter">healthPacksUsed</span>
<span class="types"><span class="type">int</span></span>
amount of used medipacks.
Amount of used medipacks.
</li>
</ul>
@ -262,7 +262,7 @@
<ul>
<li><span class="parameter">damageTaken</span>
<span class="types"><span class="type">int</span></span>
overall amount of taken damage.
overall Amount of taken damage.
</li>
</ul>
@ -283,7 +283,7 @@
<ul>
<li><span class="parameter">kills</span>
<span class="types"><span class="type">int</span></span>
amount of killed enemies.
Amount of killed enemies.
</li>
</ul>
@ -304,7 +304,7 @@
<ul>
<li><span class="parameter">pickups</span>
<span class="types"><span class="type">int</span></span>
amount of picked up items.
Amount of picked up items.
</li>
</ul>
@ -325,7 +325,7 @@
<ul>
<li><span class="parameter">secrets</span>
<span class="types"><span class="type">int</span></span>
amount of found secrets.
Amount of found secrets.
</li>
</ul>
@ -346,7 +346,7 @@
<ul>
<li><span class="parameter">timeTaken</span>
<span class="types"><a class="type" href="../3 primitive classes/Time.html#">Time</a></span>
amount of time passed.
Amount of time passed.
</li>
</ul>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -125,11 +125,11 @@
<table class="function_list">
<tr>
<td class="name" ><a href="#AIObject:GetPosition">AIObject:GetPosition()</a></td>
<td class="summary">Get the object's position</td>
<td class="summary">Get the object's position.</td>
</tr>
<tr>
<td class="name" ><a href="#AIObject:SetPosition">AIObject:SetPosition(position)</a></td>
<td class="summary">Set the object's position</td>
<td class="summary">Set the object's position.</td>
</tr>
<tr>
<td class="name" ><a href="#AIObject:GetRotationY">AIObject:GetRotationY()</a></td>
@ -141,32 +141,31 @@
</tr>
<tr>
<td class="name" ><a href="#AIObject:GetName">AIObject:GetName()</a></td>
<td class="summary">Get the object's unique string identifier</td>
<td class="summary">Get the object's unique string identifier.</td>
</tr>
<tr>
<td class="name" ><a href="#AIObject:SetName">AIObject:SetName(name)</a></td>
<td class="summary">Set the object's name (its unique string identifier)</td>
<td class="summary">Set the object's unique string identifier.</td>
</tr>
<tr>
<td class="name" ><a href="#AIObject:GetRoom">AIObject:GetRoom()</a></td>
<td class="summary">Get the current room of the object</td>
<td class="summary">Get the current room of the object.</td>
</tr>
<tr>
<td class="name" ><a href="#AIObject:GetRoomNumber">AIObject:GetRoomNumber()</a></td>
<td class="summary">Get the current room number of the object</td>
<td class="summary">Get the current room number of the object.</td>
</tr>
<tr>
<td class="name" ><a href="#AIObject:SetRoomNumber">AIObject:SetRoomNumber(ID)</a></td>
<td class="summary">Set room number of the object
This is used in conjunction with SetPosition to teleport the object to a new room.</td>
<td class="summary">Set room number of the object.</td>
</tr>
<tr>
<td class="name" ><a href="#AIObject:GetObjectID">AIObject:GetObjectID()</a></td>
<td class="summary">Retrieve the object ID</td>
<td class="summary">Retrieve the object ID.</td>
</tr>
<tr>
<td class="name" ><a href="#AIObject:SetObjectID">AIObject:SetObjectID(ID)</a></td>
<td class="summary">Change the object's ID.</td>
<td class="summary">Change the object ID.</td>
</tr>
</table>
@ -182,7 +181,7 @@
<strong>AIObject:GetPosition()</strong>
</dt>
<dd>
Get the object's position
Get the object's position.
@ -191,7 +190,7 @@
<ol>
<span class="types"><a class="type" href="../3 primitive classes/Vec3.html#">Vec3</a></span>
a copy of the object's position
A copy of the object's position.
</ol>
@ -203,7 +202,7 @@
<strong>AIObject:SetPosition(position)</strong>
</dt>
<dd>
Set the object's position
Set the object's position.
@ -211,7 +210,7 @@
<ul>
<li><span class="parameter">position</span>
<span class="types"><a class="type" href="../3 primitive classes/Vec3.html#">Vec3</a></span>
the new position of the object
The new position of the object.
</li>
</ul>
@ -226,7 +225,6 @@
</dt>
<dd>
Get the object's Y-axis rotation.
To the best of my knowledge, the rotation of an AIObject has no effect.
@ -234,8 +232,8 @@
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">number</span></span>
the object's Y-axis rotation
<span class="types"><span class="type">int</span></span>
The object's Y-axis rotation.
</ol>
@ -248,15 +246,14 @@
</dt>
<dd>
Set the object's Y-axis rotation.
To the best of my knowledge, the rotation of an AIObject has no effect.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">rotation</span>
<span class="types"><span class="type">number</span></span>
The object's new Y-axis rotation
<span class="types"><span class="type">int</span></span>
The object's new Y-axis rotation.
</li>
</ul>
@ -270,7 +267,7 @@
<strong>AIObject:GetName()</strong>
</dt>
<dd>
Get the object's unique string identifier
Get the object's unique string identifier.
@ -279,7 +276,7 @@
<ol>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.4/manual.html#6.4">string</a></span>
the object's name
The object's name.
</ol>
@ -291,7 +288,7 @@
<strong>AIObject:SetName(name)</strong>
</dt>
<dd>
Set the object's name (its unique string identifier)
Set the object's unique string identifier.
@ -299,7 +296,7 @@
<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>
The object's new name
The object's new name.
</li>
</ul>
@ -313,7 +310,7 @@
<strong>AIObject:GetRoom()</strong>
</dt>
<dd>
Get the current room of the object
Get the current room of the object.
@ -321,8 +318,8 @@
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">Room</span></span>
current room of the object
<span class="types"><a class="type" href="../2 classes/Objects.Room.html#">Room</a></span>
current room of the object.
</ol>
@ -334,7 +331,7 @@
<strong>AIObject:GetRoomNumber()</strong>
</dt>
<dd>
Get the current room number of the object
Get the current room number of the object.
@ -343,7 +340,7 @@
<ol>
<span class="types"><span class="type">int</span></span>
number representing the current room of the object
Number representing the current room of the object.
</ol>
@ -355,7 +352,7 @@
<strong>AIObject:SetRoomNumber(ID)</strong>
</dt>
<dd>
Set room number of the object
Set room number of the object.
This is used in conjunction with SetPosition to teleport the object to a new room.
@ -364,7 +361,7 @@
<ul>
<li><span class="parameter">ID</span>
<span class="types"><span class="type">int</span></span>
the ID of the new room
The ID of the new room.
</li>
</ul>
@ -378,7 +375,7 @@
<strong>AIObject:GetObjectID()</strong>
</dt>
<dd>
Retrieve the object ID
Retrieve the object ID.
@ -387,7 +384,7 @@
<ol>
<span class="types"><span class="type">int</span></span>
a number representing the ID of the object
A number representing the ID of the object.
</ol>
@ -399,7 +396,7 @@
<strong>AIObject:SetObjectID(ID)</strong>
</dt>
<dd>
Change the object's ID. This will change the type of AI object it is.
Change the object ID. This will change the type of AI object it is.
Note that a baddy will gain the behaviour of the tile it's on <em>before</em> said baddy is triggered.
This means that changing the type of an AI object beneath a moveable will have no effect.
Instead, this function can be used to change an object that the baddy isn't standing on.
@ -412,7 +409,7 @@
<ul>
<li><span class="parameter">ID</span>
<span class="types"><a class="type" href="../4 enums/Objects.ObjID.html#">ObjID</a></span>
the new ID
the new ID.
</li>
</ul>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -125,11 +125,11 @@
<table class="function_list">
<tr>
<td class="name" ><a href="#Camera:GetPosition">Camera:GetPosition()</a></td>
<td class="summary">Get the camera's position</td>
<td class="summary">Get the camera's position.</td>
</tr>
<tr>
<td class="name" ><a href="#Camera:SetPosition">Camera:SetPosition(position)</a></td>
<td class="summary">Set the camera's position</td>
<td class="summary">Set the camera's position.</td>
</tr>
<tr>
<td class="name" ><a href="#Camera:GetName">Camera:GetName()</a></td>
@ -137,24 +137,23 @@
</tr>
<tr>
<td class="name" ><a href="#Camera:SetName">Camera:SetName(name)</a></td>
<td class="summary">Set the camera's name (its unique string identifier)</td>
<td class="summary">Set the camera's name (its unique string identifier).</td>
</tr>
<tr>
<td class="name" ><a href="#Camera:GetRoom">Camera:GetRoom()</a></td>
<td class="summary">Get the current room of the camera</td>
<td class="summary">Get the current room of the camera.</td>
</tr>
<tr>
<td class="name" ><a href="#Camera:GetRoomNumber">Camera:GetRoomNumber()</a></td>
<td class="summary">Get the current room number of the camera</td>
<td class="summary">Get the current room number of the camera.</td>
</tr>
<tr>
<td class="name" ><a href="#Camera:SetRoomNumber">Camera:SetRoomNumber(ID)</a></td>
<td class="summary">Set room of camera
This is used in conjunction with SetPosition to teleport the camera to a new room.</td>
<td class="summary">Set room of camera.</td>
</tr>
<tr>
<td class="name" ><a href="#Camera:PlayCamera">Camera:PlayCamera([Target])</a></td>
<td class="summary">Active the camera during that frame.</td>
<td class="name" ><a href="#Camera:PlayCamera">Camera:PlayCamera([target])</a></td>
<td class="summary">Activate the camera for the current game frame.</td>
</tr>
</table>
@ -170,7 +169,7 @@
<strong>Camera:GetPosition()</strong>
</dt>
<dd>
Get the camera's position
Get the camera's position.
@ -179,7 +178,7 @@
<ol>
<span class="types"><a class="type" href="../3 primitive classes/Vec3.html#">Vec3</a></span>
a copy of the camera's position
Camera's position.
</ol>
@ -191,7 +190,7 @@
<strong>Camera:SetPosition(position)</strong>
</dt>
<dd>
Set the camera's position
Set the camera's position.
@ -199,7 +198,7 @@
<ul>
<li><span class="parameter">position</span>
<span class="types"><a class="type" href="../3 primitive classes/Vec3.html#">Vec3</a></span>
the new position of the camera
The new position of the camera.
</li>
</ul>
@ -222,7 +221,7 @@
<ol>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.4/manual.html#6.4">string</a></span>
the camera's name
the camera's name.
</ol>
@ -234,7 +233,7 @@
<strong>Camera:SetName(name)</strong>
</dt>
<dd>
Set the camera's name (its unique string identifier)
Set the camera's name (its unique string identifier).
@ -242,7 +241,7 @@
<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>
The camera's new name
The camera's new name.
</li>
</ul>
@ -256,7 +255,7 @@
<strong>Camera:GetRoom()</strong>
</dt>
<dd>
Get the current room of the camera
Get the current room of the camera.
@ -264,8 +263,8 @@
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">Room</span></span>
current room of the camera
<span class="types"><a class="type" href="../2 classes/Objects.Room.html#">Room</a></span>
Current room of the camera.
</ol>
@ -277,7 +276,7 @@
<strong>Camera:GetRoomNumber()</strong>
</dt>
<dd>
Get the current room number of the camera
Get the current room number of the camera.
@ -286,7 +285,7 @@
<ol>
<span class="types"><span class="type">int</span></span>
number representing the current room of the camera
Number representing the current room of the camera.
</ol>
@ -298,7 +297,7 @@
<strong>Camera:SetRoomNumber(ID)</strong>
</dt>
<dd>
Set room of camera
Set room of camera.
This is used in conjunction with SetPosition to teleport the camera to a new room.
@ -307,7 +306,7 @@
<ul>
<li><span class="parameter">ID</span>
<span class="types"><span class="type">int</span></span>
the ID of the new room
The ID of the new room.
</li>
</ul>
@ -318,17 +317,17 @@
</dd>
<dt>
<a name = "Camera:PlayCamera"></a>
<strong>Camera:PlayCamera([Target])</strong>
<strong>Camera:PlayCamera([target])</strong>
</dt>
<dd>
Active the camera during that frame.
Activate the camera for the current game frame.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">Target</span>
<span class="types"><span class="type">Moveable</span></span>
<li><span class="parameter">target</span>
<span class="types"><a class="type" href="../2 classes/Objects.Moveable.html#">Moveable</a></span>
If you put a moveable, the camera will look at it. Otherwise, it will look at Lara.
<em>Optional.</em>
</li>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -115,7 +115,7 @@
<div id="content">
<h1>Class <code>Objects.LaraObject</code></h1>
<p>Class for extra player-only functions.</p>
<p>Class for player-only functions.</p>
<p> Do not try to create an object of this type. Use the built-in <em>Lara</em> variable instead.
LaraObject inherits all the functions of <a href="../2 classes/Objects.Moveable.html#">Moveable</a>.</p>
@ -124,63 +124,63 @@
<table class="function_list">
<tr>
<td class="name" ><a href="#LaraObject:SetPoison">LaraObject:SetPoison([poison])</a></td>
<td class="summary">Set player poison.</td>
<td class="summary">Set the player's poison value.</td>
</tr>
<tr>
<td class="name" ><a href="#LaraObject:GetPoison">LaraObject:GetPoison()</a></td>
<td class="summary">Get poison potency of Lara.</td>
<td class="summary">Get the player's poison value.</td>
</tr>
<tr>
<td class="name" ><a href="#LaraObject:SetAir">LaraObject:SetAir(air)</a></td>
<td class="summary">Set air value of Lara.</td>
<td class="summary">Set the player's air value.</td>
</tr>
<tr>
<td class="name" ><a href="#LaraObject:GetAir">LaraObject:GetAir()</a></td>
<td class="summary">Get air value of Lara.</td>
<td class="summary">Get the player's air value.</td>
</tr>
<tr>
<td class="name" ><a href="#LaraObject:SetWet">LaraObject:SetWet(wetness)</a></td>
<td class="summary">Set wetness value of Lara (causes dripping).</td>
<td class="summary">Set the player's wetness value, causing drips.</td>
</tr>
<tr>
<td class="name" ><a href="#LaraObject:GetWet">LaraObject:GetWet()</a></td>
<td class="summary">Get wetness value of Lara.</td>
<td class="summary">Get the player's wetness value.</td>
</tr>
<tr>
<td class="name" ><a href="#LaraObject:SetStamina">LaraObject:SetStamina(stamina)</a></td>
<td class="summary">Set sprint energy value of Lara.</td>
<td class="name" ><a href="#LaraObject:SetStamina">LaraObject:SetStamina(New)</a></td>
<td class="summary">Set the player's stamina value.</td>
</tr>
<tr>
<td class="name" ><a href="#LaraObject:GetStamina">LaraObject:GetStamina()</a></td>
<td class="summary">Get stamina value of Lara.</td>
<td class="summary">Get the player's stamina value.</td>
</tr>
<tr>
<td class="name" ><a href="#Moveable:GetAirborne">Moveable:GetAirborne()</a></td>
<td class="summary">Get the moveable's airborne status.</td>
<td class="summary">Get the player's airborne status (set when jumping and falling).</td>
</tr>
<tr>
<td class="name" ><a href="#Moveable:SetAirborne">Moveable:SetAirborne(airborne)</a></td>
<td class="summary">Set the moveable's airborne status.</td>
<td class="summary">Set the player's airborne status.</td>
</tr>
<tr>
<td class="name" ><a href="#LaraObject:UndrawWeapon">LaraObject:UndrawWeapon()</a></td>
<td class="summary">Lara will undraw her weapon if it is drawn and throw away a flare if she is currently holding one.</td>
<td class="summary">Undraw a weapon if it is drawn and throw away a flare if currently holding one.</td>
</tr>
<tr>
<td class="name" ><a href="#LaraObject:ThrowAwayTorch">LaraObject:ThrowAwayTorch()</a></td>
<td class="summary">Lara will throw away the torch if she currently holds one in her hand.</td>
<td class="name" ><a href="#LaraObject:DiscardTorch">LaraObject:DiscardTorch()</a></td>
<td class="summary">Discard a held torch.</td>
</tr>
<tr>
<td class="name" ><a href="#LaraObject:GetHandStatus">LaraObject:GetHandStatus()</a></td>
<td class="summary">Get actual hand status of Lara.</td>
<td class="summary">Get the player's hand status.</td>
</tr>
<tr>
<td class="name" ><a href="#LaraObject:GetWeaponType">LaraObject:GetWeaponType()</a></td>
<td class="summary">Get actual weapon type of Lara.</td>
<td class="summary">Get the player's weapon type.</td>
</tr>
<tr>
<td class="name" ><a href="#LaraObject:SetWeaponType">LaraObject:SetWeaponType(weaponType, activate)</a></td>
<td class="summary">Set Lara weapon type.</td>
<td class="summary">Set the player's weapon type.</td>
</tr>
<tr>
<td class="name" ><a href="#LaraObject:GetAmmoType">LaraObject:GetAmmoType()</a></td>
@ -203,8 +203,16 @@
<td class="summary">Get the player's current interacted moveable (if it exists).</td>
</tr>
<tr>
<td class="name" ><a href="#LaraObject:TorchIsLit">LaraObject:TorchIsLit()</a></td>
<td class="summary">Get current light state of the torch, if it exists</td>
<td class="name" ><a href="#LaraObject:IsTorchLit">LaraObject:IsTorchLit()</a></td>
<td class="summary">Check if a held torch is lit.</td>
</tr>
<tr>
<td class="name" ><a href="#LaraObject:Interact">LaraObject:Interact(mov, [animNumber], [offset], [minOffsetConstraint], [maxOffsetConstraint], [minRotConstraint], [maxRotConstraint], [actionID])</a></td>
<td class="summary">Align the player with a moveable object for interaction.</td>
</tr>
<tr>
<td class="name" ><a href="#LaraObject:TestInteraction">LaraObject:TestInteraction(mov, [minOffsetConstraint], [maxOffsetConstraint], [minRotConstraint], [maxRotConstraint])</a></td>
<td class="summary">Test the player against a moveable object for interaction.</td>
</tr>
</table>
@ -220,7 +228,7 @@
<strong>LaraObject:SetPoison([poison])</strong>
</dt>
<dd>
Set player poison.
Set the player's poison value.
@ -228,7 +236,7 @@
<ul>
<li><span class="parameter">poison</span>
<span class="types"><span class="type">int</span></span>
Poison strength. Maximum value is 128 (default 0)
New poison value. <strong>default: 0, max: 128</strong>
<em>Optional.</em>
</li>
</ul>
@ -247,7 +255,7 @@
<strong>LaraObject:GetPoison()</strong>
</dt>
<dd>
Get poison potency of Lara.
Get the player's poison value.
@ -256,7 +264,7 @@
<ol>
<span class="types"><span class="type">int</span></span>
Current poison potency.
Poison value.
</ol>
@ -272,7 +280,7 @@
<strong>LaraObject:SetAir(air)</strong>
</dt>
<dd>
Set air value of Lara.
Set the player's air value.
@ -280,7 +288,7 @@
<ul>
<li><span class="parameter">air</span>
<span class="types"><span class="type">int</span></span>
Air value to give Lara. Maximum value is 1800.
New air value. <strong>max: 1800</strong>
</li>
</ul>
@ -298,7 +306,7 @@
<strong>LaraObject:GetAir()</strong>
</dt>
<dd>
Get air value of Lara.
Get the player's air value.
@ -307,7 +315,7 @@
<ol>
<span class="types"><span class="type">int</span></span>
Current air value.
Air value.
</ol>
@ -323,7 +331,7 @@
<strong>LaraObject:SetWet(wetness)</strong>
</dt>
<dd>
Set wetness value of Lara (causes dripping).
Set the player's wetness value, causing drips.
@ -331,7 +339,7 @@
<ul>
<li><span class="parameter">wetness</span>
<span class="types"><span class="type">int</span></span>
Wetness value. Maximum value is 255.
New wetness value. <strong>max: 255</strong>
</li>
</ul>
@ -349,7 +357,7 @@
<strong>LaraObject:GetWet()</strong>
</dt>
<dd>
Get wetness value of Lara.
Get the player's wetness value.
@ -358,7 +366,7 @@
<ol>
<span class="types"><span class="type">int</span></span>
Current wetness value.
Wetness value.
</ol>
@ -371,18 +379,18 @@
</dd>
<dt>
<a name = "LaraObject:SetStamina"></a>
<strong>LaraObject:SetStamina(stamina)</strong>
<strong>LaraObject:SetStamina(New)</strong>
</dt>
<dd>
Set sprint energy value of Lara.
Set the player's stamina value.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">stamina</span>
<li><span class="parameter">New</span>
<span class="types"><span class="type">int</span></span>
Stamina to give to Lara. Maximum value is 120.
stamina value. <strong>max: 120</strong>
</li>
</ul>
@ -400,7 +408,7 @@
<strong>LaraObject:GetStamina()</strong>
</dt>
<dd>
Get stamina value of Lara.
Get the player's stamina value.
@ -409,7 +417,7 @@
<ol>
<span class="types"><span class="type">int</span></span>
Current sprint value.
Stamina value.
</ol>
@ -425,7 +433,7 @@
<strong>Moveable:GetAirborne()</strong>
</dt>
<dd>
Get the moveable's airborne status.
Get the player's airborne status (set when jumping and falling).
@ -434,7 +442,7 @@
<ol>
<span class="types"><span class="type">bool</span></span>
True if Lara state must react to aerial forces.
True if airborne, otherwise false.
</ol>
@ -446,7 +454,7 @@
<strong>Moveable:SetAirborne(airborne)</strong>
</dt>
<dd>
Set the moveable's airborne status.
Set the player's airborne status.
@ -454,7 +462,7 @@
<ul>
<li><span class="parameter">airborne</span>
<span class="types"><span class="type">bool</span></span>
New airborne status for Lara.
New airborne status.
</li>
</ul>
@ -468,7 +476,7 @@
<strong>LaraObject:UndrawWeapon()</strong>
</dt>
<dd>
Lara will undraw her weapon if it is drawn and throw away a flare if she is currently holding one.
Undraw a weapon if it is drawn and throw away a flare if currently holding one.
@ -483,11 +491,11 @@
</dd>
<dt>
<a name = "LaraObject:ThrowAwayTorch"></a>
<strong>LaraObject:ThrowAwayTorch()</strong>
<a name = "LaraObject:DiscardTorch"></a>
<strong>LaraObject:DiscardTorch()</strong>
</dt>
<dd>
Lara will throw away the torch if she currently holds one in her hand.
Discard a held torch.
@ -497,7 +505,7 @@
<h3>Usage:</h3>
<ul>
<pre class="example">Lara:ThrowAwayTorch()</pre>
<pre class="example">Lara:DiscardTorch()</pre>
</ul>
</dd>
@ -506,7 +514,7 @@
<strong>LaraObject:GetHandStatus()</strong>
</dt>
<dd>
Get actual hand status of Lara.
Get the player's hand status.
@ -515,7 +523,7 @@
<ol>
<span class="types"><a class="type" href="../4 enums/Objects.HandStatus.html#">HandStatus</a></span>
Current hand status.
Hand status.
</ol>
@ -531,7 +539,7 @@
<strong>LaraObject:GetWeaponType()</strong>
</dt>
<dd>
Get actual weapon type of Lara.
Get the player's weapon type.
@ -556,7 +564,7 @@
<strong>LaraObject:SetWeaponType(weaponType, activate)</strong>
</dt>
<dd>
Set Lara weapon type.
Set the player's weapon type.
@ -645,7 +653,7 @@
<ol>
<span class="types"><a class="type" href="../2 classes/Objects.Moveable.html#">Moveable</a></span>
current vehicle (nil if no vehicle present).
Current vehicle (nil if no vehicle present).
</ol>
@ -707,11 +715,11 @@
</dd>
<dt>
<a name = "LaraObject:TorchIsLit"></a>
<strong>LaraObject:TorchIsLit()</strong>
<a name = "LaraObject:IsTorchLit"></a>
<strong>LaraObject:IsTorchLit()</strong>
</dt>
<dd>
Get current light state of the torch, if it exists
Check if a held torch is lit.
@ -720,16 +728,122 @@
<ol>
<span class="types"><span class="type">bool</span></span>
is torch currently lit or not? (false if no torch exists)
True if lit, otherwise false (also false if there is no torch in hand).
</ol>
<h3>Usage:</h3>
<ul>
<pre class="example"><span class="keyword">local</span> torchIsLit = Lara:TorchIsLit()</pre>
<pre class="example"><span class="keyword">local</span> isTorchLit = Lara:IsTorchLit()</pre>
</ul>
</dd>
<dt>
<a name = "LaraObject:Interact"></a>
<strong>LaraObject:Interact(mov, [animNumber], [offset], [minOffsetConstraint], [maxOffsetConstraint], [minRotConstraint], [maxRotConstraint], [actionID])</strong>
</dt>
<dd>
Align the player with a moveable object for interaction.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">mov</span>
<span class="types"><a class="type" href="../2 classes/Objects.Moveable.html#">Moveable</a></span>
Moveable object to align the player with.
</li>
<li><span class="parameter">animNumber</span>
<span class="types"><span class="type">int</span></span>
The animation to play after alignment is complete.
<em>Default: 197 (BUTTON_PUSH).</em>
</li>
<li><span class="parameter">offset</span>
<span class="types"><a class="type" href="../3 primitive classes/Vec3.html#">Vec3</a></span>
Relative position offset from the moveable.
<em>Default: Vec3(0&#44; 0&#44; 312).</em>
</li>
<li><span class="parameter">minOffsetConstraint</span>
<span class="types"><a class="type" href="../3 primitive classes/Vec3.html#">Vec3</a></span>
Minimum relative offset constraint.
<em>Default: Vec3(-256&#44; -512&#44; 0).</em>
</li>
<li><span class="parameter">maxOffsetConstraint</span>
<span class="types"><a class="type" href="../3 primitive classes/Vec3.html#">Vec3</a></span>
Maximum relative offset constraint.
<em>Default: Vec3(256&#44; 0&#44; 512).</em>
</li>
<li><span class="parameter">minRotConstraint</span>
<span class="types"><a class="type" href="../3 primitive classes/Rotation.html#">Rotation</a></span>
Minimum relative rotation constraint.
<em>Default: Rotation(-10&#44; -40&#44; -10).</em>
</li>
<li><span class="parameter">maxRotConstraint</span>
<span class="types"><a class="type" href="../3 primitive classes/Rotation.html#">Rotation</a></span>
Maximum relative rotation constraint.
<em>Default: Rotation(10&#44; 40&#44; 10).</em>
</li>
<li><span class="parameter">actionID</span>
<span class="types"><a class="type" href="../4 enums/Input.ActionID.html#">ActionID</a></span>
Input action ID to trigger the alignment.
<em>Default: Input.ActionID.ACTION.</em>
</li>
</ul>
<h3>Usage:</h3>
<ul>
<pre class="example"><span class="keyword">local</span> Lara:Interact(
moveable, <span class="number">197</span>,
Vec3(<span class="number">0</span>, <span class="number">0</span>, <span class="number">312</span>), Vec3(-<span class="number">256</span>, -<span class="number">512</span>, -<span class="number">256</span>), Vec3(<span class="number">256</span>, <span class="number">0</span>, <span class="number">512</span>),
Rotation(-<span class="number">10</span>, -<span class="number">30</span>, -<span class="number">10</span>), Rotation(<span class="number">10</span>, <span class="number">30</span>, <span class="number">10</span>), TEN.Input.ActionID.ACTION)</pre>
</ul>
</dd>
<dt>
<a name = "LaraObject:TestInteraction"></a>
<strong>LaraObject:TestInteraction(mov, [minOffsetConstraint], [maxOffsetConstraint], [minRotConstraint], [maxRotConstraint])</strong>
</dt>
<dd>
Test the player against a moveable object for interaction.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">mov</span>
<span class="types"><a class="type" href="../2 classes/Objects.Moveable.html#">Moveable</a></span>
Moveable object to align the player with.
</li>
<li><span class="parameter">minOffsetConstraint</span>
<span class="types"><a class="type" href="../3 primitive classes/Vec3.html#">Vec3</a></span>
Minimum relative offset constraint.
<em>Default: Vec3(-256&#44; -512&#44; 0).</em>
</li>
<li><span class="parameter">maxOffsetConstraint</span>
<span class="types"><a class="type" href="../3 primitive classes/Vec3.html#">Vec3</a></span>
Maximum relative offset constraint.
<em>Default: Vec3(256&#44; 0&#44; 512).</em>
</li>
<li><span class="parameter">minRotConstraint</span>
<span class="types"><a class="type" href="../3 primitive classes/Rotation.html#">Rotation</a></span>
Minimum relative rotation constraint.
<em>Default: Rotation(-10&#44; -40&#44; -10).</em>
</li>
<li><span class="parameter">maxRotConstraint</span>
<span class="types"><a class="type" href="../3 primitive classes/Rotation.html#">Rotation</a></span>
Maximum relative rotation constraint.
<em>Default: Rotation(10&#44; 40&#44; 10).</em>
</li>
</ul>
</dd>
</dl>

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.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -125,27 +125,27 @@
<table class="function_list">
<tr>
<td class="name" ><a href="#SoundSource:GetPosition">SoundSource:GetPosition()</a></td>
<td class="summary">Get the sound source's position</td>
<td class="summary">Get the sound source's position.</td>
</tr>
<tr>
<td class="name" ><a href="#SoundSource:SetPosition">SoundSource:SetPosition(position)</a></td>
<td class="summary">Set the sound source's position</td>
<td class="summary">Set the sound source's position.</td>
</tr>
<tr>
<td class="name" ><a href="#SoundSource:GetName">SoundSource:GetName()</a></td>
<td class="summary">Get the sound source's unique string identifier</td>
<td class="summary">Get the sound source's unique string identifier.</td>
</tr>
<tr>
<td class="name" ><a href="#SoundSource:SetName">SoundSource:SetName(name)</a></td>
<td class="summary">Set the sound source's name (its unique string identifier)</td>
<td class="summary">Set the sound source's unique string identifier.</td>
</tr>
<tr>
<td class="name" ><a href="#SoundSource:GetSoundID">SoundSource:GetSoundID()</a></td>
<td class="summary">Get the sound source's unique int identifier</td>
<td class="summary">Get the sound source's sound ID.</td>
</tr>
<tr>
<td class="name" ><a href="#SoundSource:SetSoundID">SoundSource:SetSoundID(name)</a></td>
<td class="summary">Set the sound source's ID</td>
<td class="summary">Set the sound source's ID.</td>
</tr>
</table>
@ -161,7 +161,7 @@
<strong>SoundSource:GetPosition()</strong>
</dt>
<dd>
Get the sound source's position
Get the sound source's position.
@ -170,7 +170,7 @@
<ol>
<span class="types"><a class="type" href="../3 primitive classes/Vec3.html#">Vec3</a></span>
a copy of the sound source's position
Sound source's position.
</ol>
@ -182,7 +182,7 @@
<strong>SoundSource:SetPosition(position)</strong>
</dt>
<dd>
Set the sound source's position
Set the sound source's position.
@ -190,7 +190,7 @@
<ul>
<li><span class="parameter">position</span>
<span class="types"><a class="type" href="../3 primitive classes/Vec3.html#">Vec3</a></span>
the new position of the sound source
The new position of the sound source.
</li>
</ul>
@ -204,7 +204,7 @@
<strong>SoundSource:GetName()</strong>
</dt>
<dd>
Get the sound source's unique string identifier
Get the sound source's unique string identifier.
@ -213,7 +213,7 @@
<ol>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.4/manual.html#6.4">string</a></span>
the sound source's name
The sound source's name.
</ol>
@ -225,7 +225,7 @@
<strong>SoundSource:SetName(name)</strong>
</dt>
<dd>
Set the sound source's name (its unique string identifier)
Set the sound source's unique string identifier.
@ -233,7 +233,7 @@
<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>
The sound source's new name
The sound source's new name.
</li>
</ul>
@ -247,7 +247,7 @@
<strong>SoundSource:GetSoundID()</strong>
</dt>
<dd>
Get the sound source's unique int identifier
Get the sound source's sound ID.
@ -256,7 +256,7 @@
<ol>
<span class="types"><span class="type">int</span></span>
the ID of the sound
The ID of the sound.
</ol>
@ -268,7 +268,7 @@
<strong>SoundSource:SetSoundID(name)</strong>
</dt>
<dd>
Set the sound source's ID
Set the sound source's ID.
@ -276,7 +276,7 @@
<ul>
<li><span class="parameter">name</span>
<span class="types"><span class="type">int</span></span>
The sound source's new name
The sound source's new sound ID.
</li>
</ul>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -381,7 +381,7 @@
<ol>
<span class="types"><span class="type">bool</span></span>
Status. <strong>true: visible</strong>, <strong>false: invisible</strong>
Status. true means visible, false otherwise.
</ol>
@ -402,7 +402,7 @@
<ol>
<span class="types"><span class="type">bool</span></span>
Collision status. <strong>true: can be collided with</strong>, <strong>false: no collision</strong>
Collision status. true if can be collided with, false otherwise.
</ol>
@ -423,7 +423,7 @@
<ol>
<span class="types"><span class="type">bool</span></span>
Solid Status. <strong>true: solid</strong>, <strong>false: soft</strong>
Solid Status. true if solid, false if soft.
</ol>
@ -597,7 +597,7 @@
<ul>
<li><span class="parameter">status</span>
<span class="types"><span class="type">bool</span></span>
New status. <strong>true: solid</strong>, <strong>false: soft</strong>
New status, true is solid, false is soft.
</li>
</ul>
@ -619,7 +619,7 @@
<ul>
<li><span class="parameter">collidable</span>
<span class="types"><span class="type">bool</span></span>
New collision status. <strong>true: can be collided with</strong>, <strong>false: no collision</strong>
New collision status. true if can be collided with, false: no collision.
</li>
</ul>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -160,7 +160,7 @@
<td class="summary">Determine if this volume is active.</td>
</tr>
<tr>
<td class="name" ><a href="#Volume:IsMoveableInside">Volume:IsMoveableInside(Moveable)</a></td>
<td class="name" ><a href="#Volume:IsMoveableInside">Volume:IsMoveableInside(moveable)</a></td>
<td class="summary">Determine if a moveable is inside this volume.</td>
</tr>
<tr>
@ -189,7 +189,7 @@
<strong>Volume:GetName()</strong>
</dt>
<dd>
Get the unique string identifier of this volume. ()
Get the unique string identifier of this volume.
@ -210,7 +210,7 @@
<strong>Volume:GetPosition()</strong>
</dt>
<dd>
Get the position of this volume. ()
Get the position of this volume.
@ -231,7 +231,7 @@
<strong>Volume:GetRotation()</strong>
</dt>
<dd>
Get the rotation of this volume. ()
Get the rotation of this volume.
@ -252,7 +252,7 @@
<strong>Volume:GetScale()</strong>
</dt>
<dd>
Get this scale of this volume. ()
Get this scale of this volume.
@ -273,7 +273,7 @@
<strong>Volume:SetName(name)</strong>
</dt>
<dd>
Set the unique string identifier of this volume. ()
Set the unique string identifier of this volume.
@ -295,7 +295,7 @@
<strong>Volume:SetPosition(pos)</strong>
</dt>
<dd>
Set the position of this volume. ()
Set the position of this volume.
@ -317,7 +317,7 @@
<strong>Volume:SetRotation(rot)</strong>
</dt>
<dd>
Set the rotation of this volume. ()
Set the rotation of this volume.
@ -339,7 +339,7 @@
<strong>Volume:SetScale(scale)</strong>
</dt>
<dd>
Set the scale of the volume. ()
Set the scale of the volume.
@ -361,7 +361,7 @@
<strong>Volume:GetActive()</strong>
</dt>
<dd>
Determine if this volume is active. ()
Determine if this volume is active.
@ -379,18 +379,18 @@
</dd>
<dt>
<a name = "Volume:IsMoveableInside"></a>
<strong>Volume:IsMoveableInside(Moveable)</strong>
<strong>Volume:IsMoveableInside(moveable)</strong>
</dt>
<dd>
Determine if a moveable is inside this volume. ()
Determine if a moveable is inside this volume.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">Moveable</span>
<li><span class="parameter">moveable</span>
<span class="types"><a class="type" href="../2 classes/Objects.Moveable.html#">Moveable</a></span>
to be checked for containment.
Moveable to be checked for containment.
</li>
</ul>
@ -410,7 +410,7 @@
<strong>Volume:Enable()</strong>
</dt>
<dd>
Enable this volume. ()
Enable this volume.
@ -425,7 +425,7 @@
<strong>Volume:Disable()</strong>
</dt>
<dd>
Disable this volume. ()
Disable this volume.
@ -440,7 +440,7 @@
<strong>Volume:ClearActivators()</strong>
</dt>
<dd>
Clear the activators for this volume, allowing it to trigger again. ()
Clear the activators for this volume, allowing it to trigger again.

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -129,23 +129,23 @@ when you need to use screen-space coordinates.</p>
<h2><a href="#Functions">Functions</a></h2>
<table class="function_list">
<tr>
<td class="name" ><a href="#DisplayString">DisplayString(string, Position, [scale], [color], [translated], table)</a></td>
<td class="name" ><a href="#DisplayString">DisplayString(string, position, [scale], [color], [translated], [flags])</a></td>
<td class="summary">Create a DisplayString.</td>
</tr>
<tr>
<td class="name" ><a href="#DisplayString:GetColor">DisplayString:GetColor()</a></td>
<td class="summary">Get the display string's color</td>
<td class="summary">Get the display string's color.</td>
</tr>
<tr>
<td class="name" ><a href="#DisplayString:SetColor">DisplayString:SetColor(color)</a></td>
<td class="summary">Set the display string's color</td>
<td class="summary">Set the display string's color.</td>
</tr>
<tr>
<td class="name" ><a href="#DisplayString:GetKey">DisplayString:GetKey()</a></td>
<td class="summary">Get the string key to use.</td>
<td class="summary">Get the string key.</td>
</tr>
<tr>
<td class="name" ><a href="#DisplayString:SetKey">DisplayString:SetKey(string)</a></td>
<td class="name" ><a href="#DisplayString:SetKey">DisplayString:SetKey(key)</a></td>
<td class="summary">Set the string key to use.</td>
</tr>
<tr>
@ -166,11 +166,7 @@ when you need to use screen-space coordinates.</p>
</tr>
<tr>
<td class="name" ><a href="#DisplayString:SetFlags">DisplayString:SetFlags(table)</a></td>
<td class="summary">Set the display string's flags</td>
</tr>
<tr>
<td class="name" ><a href="#DisplayString:SetTranslated">DisplayString:SetTranslated(shouldTranslate)</a></td>
<td class="summary">Set translated parameter of the string</td>
<td class="summary">Set the display string's flags.</td>
</tr>
</table>
@ -183,7 +179,7 @@ when you need to use screen-space coordinates.</p>
<dl class="function">
<dt>
<a name = "DisplayString"></a>
<strong>DisplayString(string, Position, [scale], [color], [translated], table)</strong>
<strong>DisplayString(string, position, [scale], [color], [translated], [flags])</strong>
</dt>
<dd>
Create a DisplayString.
@ -197,29 +193,30 @@ For use in <a href="../1 modules/Strings.html#ShowString">ShowString</a> and <a
<span class="types"><a class="type" href="https://www.lua.org/manual/5.4/manual.html#6.4">string</a></span>
The string to display or key of the translated string.
</li>
<li><span class="parameter">Position</span>
<li><span class="parameter">position</span>
<span class="types"><a class="type" href="../3 primitive classes/Vec2.html#">Vec2</a></span>
of the string in pixel coordinates.
Position of the string in pixel coordinates.
</li>
<li><span class="parameter">scale</span>
<span class="types"><span class="type">float</span></span>
size of the string, relative to the default size. <strong>Default: 1.0</strong>
<em>Optional.</em>
Size of the string, relative to the default size.
<em>Default: 1.</em>
</li>
<li><span class="parameter">color</span>
<span class="types"><a class="type" href="../3 primitive classes/Color.html#">Color</a></span>
the color of the text. <strong>Default: white</strong>
<em>Optional.</em>
The color of the text.
<em>Default: Color(255&#44; 255&#44; 255).</em>
</li>
<li><span class="parameter">translated</span>
<span class="types"><span class="type">bool</span></span>
If false or omitted, the input string argument will be displayed.
If true, the string argument will be the key of a translated string specified in strings.lua. <strong>Default: false</strong>.
<em>Optional.</em>
If true, the string argument will be the key of a translated string specified in strings.lua.
<em>Default: false.</em>
</li>
<li><span class="parameter">table</span>
<li><span class="parameter">flags</span>
<span class="types"><a class="type" href="../4 enums/Strings.DisplayStringOption.html#">DisplayStringOption</a></span>
<strong>Default: None.</strong> <em>Please note that Strings are automatically aligned to the LEFT</em>
Flags which affect visual representation of a string, such as shadow or alignment.
<em>Optional.</em>
</li>
</ul>
@ -239,7 +236,7 @@ If true, the string argument will be the key of a translated string specified in
<strong>DisplayString:GetColor()</strong>
</dt>
<dd>
Get the display string's color
Get the display string's color.
@ -248,7 +245,7 @@ If true, the string argument will be the key of a translated string specified in
<ol>
<span class="types"><a class="type" href="../3 primitive classes/Color.html#">Color</a></span>
a copy of the display string's color
Display string's color.
</ol>
@ -260,7 +257,7 @@ If true, the string argument will be the key of a translated string specified in
<strong>DisplayString:SetColor(color)</strong>
</dt>
<dd>
Set the display string's color
Set the display string's color.
@ -268,7 +265,7 @@ If true, the string argument will be the key of a translated string specified in
<ul>
<li><span class="parameter">color</span>
<span class="types"><a class="type" href="../3 primitive classes/Color.html#">Color</a></span>
the new color of the display string
The new color of the display string.
</li>
</ul>
@ -282,9 +279,7 @@ If true, the string argument will be the key of a translated string specified in
<strong>DisplayString:GetKey()</strong>
</dt>
<dd>
Get the string key to use. If <code>isTranslated</code> is true when <a href="../2 classes/Strings.DisplayString.html#DisplayString">DisplayString</a>
is called, this will be the string key for the translation that will be displayed.
If false or omitted, this will be the string that's displayed.()
Get the string key.
@ -293,7 +288,7 @@ If true, the string argument will be the key of a translated string specified in
<ol>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.4/manual.html#6.4">string</a></span>
the string to use
The string key.
</ol>
@ -302,20 +297,18 @@ If true, the string argument will be the key of a translated string specified in
</dd>
<dt>
<a name = "DisplayString:SetKey"></a>
<strong>DisplayString:SetKey(string)</strong>
<strong>DisplayString:SetKey(key)</strong>
</dt>
<dd>
Set the string key to use. If <code>isTranslated</code> is true when <a href="../2 classes/Strings.DisplayString.html#DisplayString">DisplayString</a>
is called, this will be the string key for the translation that will be displayed.
If false or omitted, this will be the string that's displayed.()
Set the string key to use.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">string</span>
<li><span class="parameter">key</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.4/manual.html#6.4">string</a></span>
the new key for the display string
The new key for the display string.
</li>
</ul>
@ -329,7 +322,7 @@ If true, the string argument will be the key of a translated string specified in
<strong>DisplayString:SetScale(scale)</strong>
</dt>
<dd>
Set the scale of the string. ()
Set the scale of the string.
@ -351,7 +344,7 @@ If true, the string argument will be the key of a translated string specified in
<strong>DisplayString:GetScale()</strong>
</dt>
<dd>
Get the scale of the string. ()
Get the scale of the string.
@ -373,7 +366,7 @@ If true, the string argument will be the key of a translated string specified in
</dt>
<dd>
Set the position of the string.
Screen-space coordinates are expected.()
Screen-space coordinates are expected.
@ -396,7 +389,7 @@ If true, the string argument will be the key of a translated string specified in
</dt>
<dd>
Get the position of the string.
Screen-space coordinates are returned.()
Screen-space coordinates are returned.
@ -417,7 +410,7 @@ If true, the string argument will be the key of a translated string specified in
<strong>DisplayString:SetFlags(table)</strong>
</dt>
<dd>
Set the display string's flags ()
Set the display string's flags.
@ -425,7 +418,7 @@ If true, the string argument will be the key of a translated string specified in
<ul>
<li><span class="parameter">table</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.4/manual.html#6.6">table</a></span>
the new table with display flags options
The new table with display flags options.
</li>
</ul>
@ -444,29 +437,6 @@ varDisplayString:SetFlags({ TEN.Strings.DisplayStringOption.SHADOW, TEN.Strings.
</span>varDisplayString:SetFlags{ TEN.Strings.DisplayStringOption.CENTER }</pre>
</ul>
</dd>
<dt>
<a name = "DisplayString:SetTranslated"></a>
<strong>DisplayString:SetTranslated(shouldTranslate)</strong>
</dt>
<dd>
Set translated parameter of the string
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">shouldTranslate</span>
<span class="types"><span class="type">bool</span></span>
if true, the string's key will be used as the key for the translation that will be displayed.
If false, the key itself will be displayed
</li>
</ul>
</dd>
</dl>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -124,10 +124,14 @@
<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="name" ><a href="#DisplaySprite">DisplaySprite(objectID, index, pos, rot, scale, [color])</a></td>
<td class="summary">Create a DisplaySprite object.</td>
</tr>
<tr>
<td class="name" ><a href="#DisplaySprite">DisplaySprite(pos, rot, scale, [color])</a></td>
<td class="summary">Create a DisplaySprite object with a video image.</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>
@ -152,27 +156,27 @@
<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="name" ><a href="#DisplaySprite:SetObjectID">DisplaySprite:SetObjectID(objectID)</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="name" ><a href="#DisplaySprite:SetSpriteID">DisplaySprite:SetSpriteID(spriteID)</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="name" ><a href="#DisplaySprite:SetPosition">DisplaySprite:SetPosition(position)</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="name" ><a href="#DisplaySprite:SetRotation">DisplaySprite:SetRotation(rotation)</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="name" ><a href="#DisplaySprite:SetScale">DisplaySprite:SetScale(scale)</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="name" ><a href="#DisplaySprite:SetColor">DisplaySprite:SetColor(color)</a></td>
<td class="summary">Set the color of the display sprite.</td>
</tr>
<tr>
@ -190,23 +194,65 @@
<dl class="function">
<dt>
<a name = "DisplaySprite"></a>
<strong>DisplaySprite(ID, int, pos, rot, scale, [color])</strong>
<strong>DisplaySprite(objectID, index, pos, rot, scale, [color])</strong>
</dt>
<dd>
Create a DisplaySprite object. ()
Create a DisplaySprite object.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">ID</span>
<li><span class="parameter">objectID</span>
<span class="types"><a class="type" href="../4 enums/Objects.ObjID.html#SpriteConstants">SpriteConstants</a></span>
of the sprite sequence object.
ID of the sprite sequence object.
</li>
<li><span class="parameter">int</span>
<li><span class="parameter">index</span>
<span class="types"><span class="type">int</span></span>
spriteID ID of the sprite in the sequence.
Index 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.
<em>Default: Color(255&#44; 255&#44; 255).</em>
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><a class="type" href="../2 classes/View.DisplaySprite.html#DisplaySprite">DisplaySprite</a></span>
A new DisplaySprite object.
</ol>
</dd>
<dt>
<a name = "DisplaySprite"></a>
<strong>DisplaySprite(pos, rot, scale, [color])</strong>
</dt>
<dd>
Create a DisplaySprite object with a video image.
Video should be played using <a href="../1 modules/View.html#PlayVideo">View.PlayVideo</a> function in a background mode. If no video is played, sprite will not show.
<h3>Parameters:</h3>
<ul>
<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.
@ -230,7 +276,7 @@
<ol>
<span class="types"><a class="type" href="../2 classes/View.DisplaySprite.html#DisplaySprite">DisplaySprite</a></span>
A new DisplaySprite object.
A new DisplaySprite object with attached video image.
</ol>
@ -242,7 +288,7 @@
<strong>DisplaySprite:GetObjectID()</strong>
</dt>
<dd>
Get the object ID of the sprite sequence object used by the display sprite. ()
Get the object ID of the sprite sequence object used by the display sprite.
@ -263,7 +309,7 @@
<strong>DisplaySprite:GetSpriteID()</strong>
</dt>
<dd>
Get the sprite ID in the sprite sequence object used by the display sprite. ()
Get the sprite ID in the sprite sequence object used by the display sprite.
@ -272,7 +318,7 @@
<ol>
<span class="types"><span class="type">int</span></span>
Sprite ID in the sprite sequence object.
Sprite ID in the sprite sequence object. Value <strong>-1</strong> means that it is a background video, played using <a href="../1 modules/View.html#PlayVideo">View.PlayVideo</a>.
</ol>
@ -284,7 +330,7 @@
<strong>DisplaySprite:GetPosition()</strong>
</dt>
<dd>
Get the display position of the display sprite in percent. ()
Get the display position of the display sprite in percent.
@ -305,7 +351,7 @@
<strong>DisplaySprite:GetRotation()</strong>
</dt>
<dd>
Get the rotation of the display sprite in degrees. ()
Get the rotation of the display sprite in degrees.
@ -326,7 +372,7 @@
<strong>DisplaySprite:GetScale()</strong>
</dt>
<dd>
Get the horizontal and vertical scale of the display sprite in percent. ()
Get the horizontal and vertical scale of the display sprite in percent.
@ -347,7 +393,7 @@
<strong>DisplaySprite:GetColor()</strong>
</dt>
<dd>
Get the color of the display sprite. ()
Get the color of the display sprite.
@ -365,18 +411,18 @@
</dd>
<dt>
<a name = "DisplaySprite:SetObjectID"></a>
<strong>DisplaySprite:SetObjectID(New)</strong>
<strong>DisplaySprite:SetObjectID(objectID)</strong>
</dt>
<dd>
Set the sprite sequence object ID used by the display sprite. (Objects.ObjID.SpriteConstants)
Set the sprite sequence object ID used by the display sprite.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">New</span>
<li><span class="parameter">objectID</span>
<span class="types"><a class="type" href="../4 enums/Objects.ObjID.html#SpriteConstants">SpriteConstants</a></span>
sprite sequence object ID.
New sprite sequence object ID.
</li>
</ul>
@ -387,18 +433,18 @@
</dd>
<dt>
<a name = "DisplaySprite:SetSpriteID"></a>
<strong>DisplaySprite:SetSpriteID(New)</strong>
<strong>DisplaySprite:SetSpriteID(spriteID)</strong>
</dt>
<dd>
Set the sprite ID in the sprite sequence object used by the display sprite. (int)
Set the sprite ID in the sprite sequence object used by the display sprite.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">New</span>
<li><span class="parameter">spriteID</span>
<span class="types"><span class="type">int</span></span>
sprite ID in the sprite sequence object.
New sprite ID in the sprite sequence object.
</li>
</ul>
@ -409,18 +455,18 @@
</dd>
<dt>
<a name = "DisplaySprite:SetPosition"></a>
<strong>DisplaySprite:SetPosition(New)</strong>
<strong>DisplaySprite:SetPosition(position)</strong>
</dt>
<dd>
Set the display position of the display sprite in percent. (Vec2)
Set the display position of the display sprite in percent.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">New</span>
<li><span class="parameter">position</span>
<span class="types"><a class="type" href="../3 primitive classes/Vec2.html#">Vec2</a></span>
display position in percent.
New display position in percent.
</li>
</ul>
@ -431,18 +477,18 @@
</dd>
<dt>
<a name = "DisplaySprite:SetRotation"></a>
<strong>DisplaySprite:SetRotation(New)</strong>
<strong>DisplaySprite:SetRotation(rotation)</strong>
</dt>
<dd>
Set the rotation of the display sprite in degrees. (float)
Set the rotation of the display sprite in degrees.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">New</span>
<li><span class="parameter">rotation</span>
<span class="types"><span class="type">float</span></span>
rotation in degrees.
New rotation in degrees.
</li>
</ul>
@ -453,18 +499,18 @@
</dd>
<dt>
<a name = "DisplaySprite:SetScale"></a>
<strong>DisplaySprite:SetScale(New)</strong>
<strong>DisplaySprite:SetScale(scale)</strong>
</dt>
<dd>
Set the horizontal and vertical scale of the display sprite in percent. (Vec2)
Set the horizontal and vertical scale of the display sprite in percent.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">New</span>
<li><span class="parameter">scale</span>
<span class="types"><span class="type">float</span></span>
horizontal and vertical scale in percent.
New horizontal and vertical scale in percent.
</li>
</ul>
@ -475,18 +521,18 @@
</dd>
<dt>
<a name = "DisplaySprite:SetColor"></a>
<strong>DisplaySprite:SetColor(New)</strong>
<strong>DisplaySprite:SetColor(color)</strong>
</dt>
<dd>
Set the color of the display sprite. (Color)
Set the color of the display sprite.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">New</span>
<span class="types"><span class="type">float</span></span>
color.
<li><span class="parameter">color</span>
<span class="types"><a class="type" href="../3 primitive classes/Color.html#">Color</a></span>
New color.
</li>
</ul>
@ -508,23 +554,23 @@
<ul>
<li><span class="parameter">priority</span>
<span class="types"><span class="type">int</span></span>
Draw priority. Can be thought of as a layer, with higher values having precedence. <strong>Default: 0</strong>
<em>Optional.</em>
Draw priority. Can be thought of as a layer, with higher values having precedence.
<em>Default: 0.</em>
</li>
<li><span class="parameter">alignMode</span>
<span class="types"><a class="type" href="../4 enums/View.AlignMode.html#">AlignMode</a></span>
Align mode interpreting an offset from the sprite's position. <strong>Default: View.AlignMode.CENTER</strong>
<em>Optional.</em>
Align mode interpreting an offset from the sprite's position.
<em>Default: View.AlignMode.CENTER.</em>
</li>
<li><span class="parameter">scaleMode</span>
<span class="types"><a class="type" href="../4 enums/View.ScaleMode.html#">ScaleMode</a></span>
Scale mode interpreting the display sprite's horizontal and vertical scale. <strong>Default: View.ScaleMode.FIT</strong>
<em>Optional.</em>
Scale mode interpreting the display sprite's horizontal and vertical scale.
<em>Default: View.ScaleMode.FIT.</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>
Blend mode.
<em>Default: Effects.BlendID.ALPHABLEND.</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.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -240,15 +240,15 @@
<ul>
<li><span class="parameter">R</span>
<span class="types"><span class="type">int</span></span>
red component
Red component.
</li>
<li><span class="parameter">G</span>
<span class="types"><span class="type">int</span></span>
green component
Green component.
</li>
<li><span class="parameter">B</span>
<span class="types"><span class="type">int</span></span>
blue component
Blue component.
</li>
</ul>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -221,11 +221,11 @@
</li>
<li><span class="parameter">min</span>
<span class="types"><span class="type">int</span></span>
Distance at which fog starts (in sectors)
Distance at which fog starts (in sectors).
</li>
<li><span class="parameter">max</span>
<span class="types"><span class="type">int</span></span>
Distance at which fog reaches the maximum strength (in sectors)
Distance at which fog reaches the maximum strength (in sectors).
</li>
</ul>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -147,8 +147,7 @@
<ul>
<li><span class="parameter">nameKey</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.4/manual.html#6.4">string</a></span>
key for the item's (localised) name.<br />
Corresponds to an entry in strings.lua.
key for the item's (localised) name. Corresponds to an entry in strings.lua.
</li>
<li><span class="parameter">objectID</span>
<span class="types"><a class="type" href="../4 enums/Objects.ObjID.html#">ObjID</a></span>
@ -167,7 +166,7 @@ and a value of 2 will cause the item to render at twice the size.
</li>
<li><span class="parameter">rot</span>
<span class="types"><a class="type" href="../3 primitive classes/Rotation.html#">Rotation</a></span>
rotation around x, y, and z axes
rotation around x, y, and z axes.
</li>
<li><span class="parameter">axis</span>
<span class="types"><span class="type">RotationAxis</span></span>
@ -182,7 +181,7 @@ Z
</li>
<li><span class="parameter">meshBits</span>
<span class="types"><span class="type">int</span></span>
<strong>Not currently implemented</strong> (will have no effect regardless of what you set it to)
<em>Not currently implemented</em> (will have no effect regardless of what you set it to).
</li>
<li><span class="parameter">action</span>
<span class="types"><span class="type">ItemAction</span></span>
@ -201,7 +200,7 @@ EXAMINE
<ol>
<span class="types"><a class="type" href="../3 primitive classes/Flow.InventoryItem.html#InventoryItem">InventoryItem</a></span>
an InventoryItem
an InventoryItem.
</ol>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -123,11 +123,11 @@
<table class="function_list">
<tr>
<td class="name" ><a href="#color">color</a></td>
<td class="summary">(<a href="../3 primitive classes/Color.html#">Color</a>) RGB sky color</td>
<td class="summary">(<a href="../3 primitive classes/Color.html#">Color</a>) RGB sky color.</td>
</tr>
<tr>
<td class="name" ><a href="#speed">speed</a></td>
<td class="summary">(int) cloud speed.</td>
<td class="summary">(int) Cloud speed.</td>
</tr>
</table>
<h2><a href="#Functions">Functions</a></h2>
@ -152,7 +152,7 @@
<strong>color</strong>
</dt>
<dd>
(<a href="../3 primitive classes/Color.html#">Color</a>) RGB sky color
(<a href="../3 primitive classes/Color.html#">Color</a>) RGB sky color.
@ -167,7 +167,7 @@
<strong>speed</strong>
</dt>
<dd>
(int) cloud speed. </p>
(int) Cloud speed. </p>
<pre><code> Values can be between [-32768, 32767], with positive numbers resulting in a sky that scrolls from
west to east, and negative numbers resulting in one that travels east to west.
@ -205,11 +205,11 @@
<ul>
<li><span class="parameter">color</span>
<span class="types"><a class="type" href="../3 primitive classes/Color.html#">Color</a></span>
RGB color
RGB color.
</li>
<li><span class="parameter">speed</span>
<span class="types"><span class="type">int</span></span>
cloud speed
Cloud speed.
</li>
</ul>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -281,7 +281,7 @@
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">StarField</span></span>
<span class="types"><a class="type" href="../3 primitive classes/Flow.Starfield.html#Starfield">Starfield</a></span>
A new Starfield object.
</ol>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -142,7 +142,10 @@
</dt>
<dd>
<p>Table of MaterialType constants. To be used with <a href="../2 classes/Collision.Probe.html#GetFloorMaterialType">Collision.Probe.GetFloorMaterialType</a> and <a href="../2 classes/Collision.Probe.html#GetCeilingMaterialType">Collision.Probe.GetCeilingMaterialType</a>.</p>
<p>Table of MaterialType constants.
<br>
Corresponds to Tomb Editor texture sound material types.
To be used with <a href="../2 classes/Collision.Probe.html#GetFloorMaterialType">Collision.Probe.GetFloorMaterialType</a> and <a href="../2 classes/Collision.Probe.html#GetCeilingMaterialType">Collision.Probe.GetCeilingMaterialType</a>.</p>
<ul>
<li><code>MUD</code></li>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -142,18 +142,20 @@
</dt>
<dd>
<p>Table of Effects.BlendID constants. </p>
<p>Table of Effects.BlendID constants.
<br>
All blending modes except <code>OPAQUE</code>, <code>ADDITIVE</code> and <code>ALPHA_BLEND</code> will use depth sorting for applicable polygons.
This may reduce engine performance, so it is preferable to minimize usage of other blending modes.</p>
<ul>
<li><code>OPAQUE</code></li>
<li><code>ALPHA_TEST</code></li>
<li><code>ADDITIVE</code></li>
<li><code>NO_DEPTH_TEST</code></li>
<li><code>SUBTRACTIVE</code></li>
<li><code>EXCLUDE</code></li>
<li><code>SCREEN</code></li>
<li><code>LIGHTEN</code></li>
<li><code>ALPHA_BLEND</code></li>
<li><code>OPAQUE</code> - No transparency.</li>
<li><code>ALPHA_TEST</code> - So called "magenta transparency", every pixel can be either fully transparent or opaque.</li>
<li><code>ADDITIVE</code> - Standard additive blending.</li>
<li><code>SUBTRACTIVE</code> - Subtractive blending, with brighter texture areas making everything darker behind them.</li>
<li><code>EXCLUDE</code> - Produces "inversion" effect.</li>
<li><code>SCREEN</code> - Similar to <code>ADDITIVE</code>, but without excessive overbright.</li>
<li><code>LIGHTEN</code> - Similar to <code>SCREEN</code>, but with a little different blending formula.</li>
<li><code>ALPHA_BLEND</code> - True alpha blending. Should be used for textures with gradually changing alpha values.</li>
</ul>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -146,12 +146,12 @@
<p> The following constants are inside Flow.ErrorMode: <br></p>
<ul>
<li><p><code>TERMINATE</code> - print to the log file and return to the title level when any script error is hit.
This is the one you will want to go for if you want to know IMMEDIATELY if something has gone wrong.</p></li>
<li><p><code>WARN</code> - print to the log file and continue running the application when a recoverable script error is hit.
<li><p><code>TERMINATE</code> - Print to the log file and return to the title level when any script error is hit.
This is the one you will want to go for if you want to know <em>immediately</em> if something has gone wrong.</p></li>
<li><p><code>WARN</code> - Print to the log file and continue running the application when a recoverable script error is hit.
Choose this one if booting to the title level is too much for you.</p></li>
<li><p><code>SILENT</code> - do nothing when a recoverable script error is hit.
Think <strong>very</strong> carefully before using this setting. These error modes are here to help you to keep your scripts
<li><p><code>SILENT</code> - Do nothing when a recoverable script error is hit.
Think <em>very</em> carefully before using this setting. These error modes are here to help you to keep your scripts
working properly, but if you opt to ignore errors, you won't be alerted if you've misused a function or passed
an invalid argument.</p></li>
</ul>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -147,10 +147,10 @@
<p> To be used with <a href="../2 classes/Objects.Moveable.html#Moveable:GetStatus">Objects.Moveable.GetStatus</a> and <a href="../2 classes/Objects.Moveable.html#Moveable:SetStatus">Objects.Moveable.SetStatus</a> functions.</p>
<ul>
<li><code>INACTIVE</code> - moveable is inactive (was never activated).</li>
<li><code>ACTIVE</code> - moveable is active.</li>
<li><code>DEACTIVATED</code> - moveable is deactivated (was previously active and later deactivated).</li>
<li><code>INVISIBLE</code> - moveable is invisible.</li>
<li><code>INACTIVE</code> - Moveable is inactive (was never activated).</li>
<li><code>ACTIVE</code> - Moveable is active.</li>
<li><code>DEACTIVATED</code> - Moveable is deactivated (was previously active and later deactivated).</li>
<li><code>INVISIBLE</code> - Moveable is invisible.</li>
</ul>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -883,7 +883,7 @@ INVENTORY_PASSPORT
INVENTORY_SUNGLASSES
INVENTORY_KEYS
INVENTORY_HEADPHONES
INVENTORY_POLAROID
INVENTORY_PHOTO
SMOKE_EMITTER_WHITE
SMOKE_EMITTER_BLACK
SMOKE_EMITTER

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -143,7 +143,8 @@
<dd>
<p>Table of Objects.RoomFlagID constants.
To be used with <a href="../2 classes/Objects.Room.html#Room:SetFlag">Objects.Room.SetFlag</a> and <a href="../2 classes/Objects.Room.html#Room:GetFlag">Objects.Room.GetFlag</a> functions.</p>
<br>
Corresponds to room flags in Tomb Editor. To be used with <a href="../2 classes/Objects.Room.html#Room:SetFlag">Objects.Room.SetFlag</a> and <a href="../2 classes/Objects.Room.html#Room:GetFlag">Objects.Room.GetFlag</a> functions.</p>
<p>The following constants are inside RoomFlagID.</p>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -143,16 +143,16 @@
<dd>
<p>Table of Objects.RoomReverb constants.
To be used with <a href="../2 classes/Objects.Room.html#Room:GetReverbType">Objects.Room.GetReverbType</a> and <a href="../2 classes/Objects.Room.html#Room:SetReverbType">Objects.Room.SetReverbType</a> functions.</p>
<p>The following constants are inside RoomReverb.</p>
<br>
Corresponds to room reverb setting set in Tomb Editor. To be used with <a href="../2 classes/Objects.Room.html#Room:GetReverbType">Objects.Room.GetReverbType</a> and <a href="../2 classes/Objects.Room.html#Room:SetReverbType">Objects.Room.SetReverbType</a> functions.
The following constants are inside RoomReverb.</p>
<ul>
<li>OUTSIDE</li>
<li>SMALL</li>
<li>MEDIUM</li>
<li>LARGE</li>
<li>PIPE</li>
<li><code>OUTSIDE</code></li>
<li><code>SMALL</code></li>
<li><code>MEDIUM</code></li>
<li><code>LARGE</code></li>
<li><code>PIPE</code></li>
</ul>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -147,9 +147,9 @@
<p>To be used with sound track functions, such as <a href="../1 modules/Sound.html#PlayAudioTrack">Sound.PlayAudioTrack</a> and <a href="../1 modules/Sound.html#StopAudioTrack">Sound.StopAudioTrack</a>.</p>
<ul>
<li><code>ONESHOT</code> - used for one-time music tracks.</li>
<li><code>LOOPED</code> - used for looped ambience or music.</li>
<li><code>VOICE</code> - used for dialogs. Also supports subtitles, set by <a href="../1 modules/Sound.html#GetCurrentSubtitle">Sound.GetCurrentSubtitle</a> function.</li>
<li><code>ONESHOT</code> - Used for one-time music tracks.</li>
<li><code>LOOPED</code> - Used for looped ambience or music.</li>
<li><code>VOICE</code> - Used for dialogs. Also supports subtitles, set by <a href="../1 modules/Sound.html#GetCurrentSubtitle">Sound.GetCurrentSubtitle</a> function.</li>
</ul>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -145,10 +145,10 @@
<p>Strings.DisplayStringOption constants. To be used with <a href="../2 classes/Strings.DisplayString.html#">Strings.DisplayString</a> class.</p>
<ul>
<li><code>CENTER</code> - set the horizontal origin point to the center of the string.</li>
<li><code>RIGHT</code> - set the horizontal origin point to right of the string.</li>
<li><code>SHADOW</code> - gives the string a small drop shadow.</li>
<li><code>BLINK</code> - blinks the string</li>
<li><code>CENTER</code> - Set the horizontal origin point to the center of the string.</li>
<li><code>RIGHT</code> - Set the horizontal origin point to right of the string.</li>
<li><code>SHADOW</code> - Gives the string a small drop shadow.</li>
<li><code>BLINK</code> - Blinks the string.</li>
</ul>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -145,13 +145,13 @@
<p>Table of View.CameraType constants. To be used with <a href="../1 modules/View.html#GetCameraType">View.GetCameraType</a> function.</p>
<ul>
<li><code>NORMAL</code> - standard in-game camera when weapons are holstered.</li>
<li><code>COMBAT</code> - in-game camera when weapons are unholstered.</li>
<li><code>FIXED</code> - classic fixed camera.</li>
<li><code>LOOK</code> - look camera.</li>
<li><code>FLYBY</code> - flyby or tracking camera.</li>
<li><code>BINOCULARS</code> - binoculars is active.</li>
<li><code>LASERSIGHT</code> - lasersight is active.</li>
<li><code>NORMAL</code> - Standard in-game camera when weapons are holstered.</li>
<li><code>COMBAT</code> - In-game camera when weapons are unholstered.</li>
<li><code>FIXED</code> - Classic fixed camera.</li>
<li><code>LOOK</code> - Look camera.</li>
<li><code>FLYBY</code> - Flyby or tracking camera.</li>
<li><code>BINOCULARS</code> - Binocular camera.</li>
<li><code>LASERSIGHT</code> - Lasersight camera.</li>
</ul>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -145,9 +145,9 @@
<p>Table of View.ScaleMode constants. To be used with <a href="../2 classes/View.DisplaySprite.html#">View.DisplaySprite</a> class.</p>
<ul>
<li><code>FIT</code></li>
<li><code>FILL</code></li>
<li><code>STRETCH</code>
<li><code>FIT</code> - Image will proportionally fit the whole image into the sprite surface.</li>
<li><code>FILL</code> - Image will scale up proportionally and crop to fill all sprite surface.</li>
<li><code>STRETCH</code> - Image will stretch according to sprite dimensions, not taking aspect ratio into consideration.
</li>
</ul>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -294,7 +294,7 @@
</li>
<li><span class="parameter">pos</span>
<span class="types"><a class="type" href="../3 primitive classes/Vec2.html#">Vec2</a></span>
X,Y position of the bar's background in screen percent (0-100).
X,Y position of the diary background sprite in screen percent (0-100).
</li>
<li><span class="parameter">rot</span>
<span class="types"><span class="type">float</span></span>
@ -302,7 +302,7 @@
</li>
<li><span class="parameter">scale</span>
<span class="types"><a class="type" href="../3 primitive classes/Vec2.html#">Vec2</a></span>
X,Y Scaling factor for the bar's background sprite.
X,Y Scaling factor for the diary background sprite.
</li>
<li><span class="parameter">alignMode</span>
<span class="types"><a class="type" href="../4 enums/View.AlignMode.html#">AlignMode</a></span>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="ldoc.css" type="text/css" />
</head>
<body>
@ -115,7 +115,7 @@
<div id="content">
<h2>TombEngine 1.8.1 scripting interface</h2>
<h2>TombEngine 1.8.2 scripting interface</h2>
<p>Welcome to the TombEngine scripting API.</p>
<p>Note that this is primarily a reference document, not a tutorial, so expect descriptions to be fairly sparse.
@ -208,7 +208,7 @@ local door = GetMoveableByName("door_type4_14")
</tr>
<tr>
<td class="name" ><a href="2 classes/Objects.LaraObject.html">Objects.LaraObject</a></td>
<td class="summary">Class for extra player-only functions.</td>
<td class="summary">Class for player-only functions.</td>
</tr>
<tr>
<td class="name" ><a href="2 classes/Objects.Moveable.html">Objects.Moveable</a></td>

23
LICENSE
View file

@ -1,16 +1,23 @@
MIT License
Modified MIT License (for non-commercial use only)
Copyright (c) 2025 TombEngine Team
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
of this software and associated documentation files (the “Software”), to use,
copy, modify, merge, publish, and distribute copies of the Software, and to
permit persons to whom the Software is furnished to do so, for non-commercial
purposes only, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
1. Commercial use of the Software — including, but not limited to, selling,
renting, leasing, or using it in a product or service for which you receive
compensation (monetary or otherwise) — is strictly prohibited.
2. The Software may be combined with proprietary or closed-source third-party
components, provided those components are available for non-commercial use,
and the resulting product is not used for commercial purposes.
3. The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,

546
Libs/vlc/libvlc.h Normal file
View file

@ -0,0 +1,546 @@
/*****************************************************************************
* libvlc.h: libvlc external API
*****************************************************************************
* Copyright (C) 1998-2009 VLC authors and VideoLAN
*
* Authors: Clément Stenac <zorglub@videolan.org>
* Jean-Paul Saman <jpsaman@videolan.org>
* Pierre d'Herbemont <pdherbemont@videolan.org>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
/**
* \defgroup libvlc LibVLC
* LibVLC is the external programming interface of the VLC media player.
* It is used to embed VLC into other applications or frameworks.
* @{
* \file
* LibVLC core external API
*/
#ifndef VLC_LIBVLC_H
#define VLC_LIBVLC_H 1
#if defined (_WIN32) && defined (LIBVLC_DLL_EXPORT)
# define LIBVLC_API __declspec(dllexport)
#elif defined (__GNUC__) && (__GNUC__ >= 4)
# define LIBVLC_API __attribute__((visibility("default")))
#else
# define LIBVLC_API
#endif
#ifdef LIBVLC_INTERNAL_
/* Avoid unhelpful warnings from libvlc with our deprecated APIs */
# define LIBVLC_DEPRECATED
#elif defined(__GNUC__) && \
(__GNUC__ > 3 || __GNUC__ == 3 && __GNUC_MINOR__ > 0)
# define LIBVLC_DEPRECATED __attribute__((deprecated))
#else
# define LIBVLC_DEPRECATED
#endif
#include <stdio.h>
#include <stdarg.h>
#include <stdint.h>
# ifdef __cplusplus
extern "C" {
# endif
/** \defgroup libvlc_core LibVLC core
* \ingroup libvlc
* Before it can do anything useful, LibVLC must be initialized.
* You can create one (or more) instance(s) of LibVLC in a given process,
* with libvlc_new() and destroy them with libvlc_release().
*
* \version Unless otherwise stated, these functions are available
* from LibVLC versions numbered 1.1.0 or more.
* Earlier versions (0.9.x and 1.0.x) are <b>not</b> compatible.
* @{
*/
/** This structure is opaque. It represents a libvlc instance */
typedef struct libvlc_instance_t libvlc_instance_t;
typedef int64_t libvlc_time_t;
/** \defgroup libvlc_error LibVLC error handling
* @{
*/
/**
* A human-readable error message for the last LibVLC error in the calling
* thread. The resulting string is valid until another error occurs (at least
* until the next LibVLC call).
*
* @warning
* This will be NULL if there was no error.
*/
LIBVLC_API const char *libvlc_errmsg (void);
/**
* Clears the LibVLC error status for the current thread. This is optional.
* By default, the error status is automatically overridden when a new error
* occurs, and destroyed when the thread exits.
*/
LIBVLC_API void libvlc_clearerr (void);
/**
* Sets the LibVLC error status and message for the current thread.
* Any previous error is overridden.
* \param fmt the format string
* \param ... the arguments for the format string
* \return a nul terminated string in any case
*/
const char *libvlc_printerr (const char *fmt, ...);
/**@} */
/**
* Create and initialize a libvlc instance.
* This functions accept a list of "command line" arguments similar to the
* main(). These arguments affect the LibVLC instance default configuration.
*
* \note
* LibVLC may create threads. Therefore, any thread-unsafe process
* initialization must be performed before calling libvlc_new(). In particular
* and where applicable:
* - setlocale() and textdomain(),
* - setenv(), unsetenv() and putenv(),
* - with the X11 display system, XInitThreads()
* (see also libvlc_media_player_set_xwindow()) and
* - on Microsoft Windows, SetErrorMode().
* - sigprocmask() shall never be invoked; pthread_sigmask() can be used.
*
* On POSIX systems, the SIGCHLD signal <b>must not</b> be ignored, i.e. the
* signal handler must set to SIG_DFL or a function pointer, not SIG_IGN.
* Also while LibVLC is active, the wait() function shall not be called, and
* any call to waitpid() shall use a strictly positive value for the first
* parameter (i.e. the PID). Failure to follow those rules may lead to a
* deadlock or a busy loop.
* Also on POSIX systems, it is recommended that the SIGPIPE signal be blocked,
* even if it is not, in principles, necessary, e.g.:
* @code
sigset_t set;
signal(SIGCHLD, SIG_DFL);
sigemptyset(&set);
sigaddset(&set, SIGPIPE);
pthread_sigmask(SIG_BLOCK, &set, NULL);
* @endcode
*
* On Microsoft Windows, setting the default DLL directories to SYSTEM32
* exclusively is strongly recommended for security reasons:
* @code
SetDefaultDllDirectories(LOAD_LIBRARY_SEARCH_SYSTEM32);
* @endcode
*
* \version
* Arguments are meant to be passed from the command line to LibVLC, just like
* VLC media player does. The list of valid arguments depends on the LibVLC
* version, the operating system and platform, and set of available LibVLC
* plugins. Invalid or unsupported arguments will cause the function to fail
* (i.e. return NULL). Also, some arguments may alter the behaviour or
* otherwise interfere with other LibVLC functions.
*
* \warning
* There is absolutely no warranty or promise of forward, backward and
* cross-platform compatibility with regards to libvlc_new() arguments.
* We recommend that you do not use them, other than when debugging.
*
* \param argc the number of arguments (should be 0)
* \param argv list of arguments (should be NULL)
* \return the libvlc instance or NULL in case of error
*/
LIBVLC_API libvlc_instance_t *
libvlc_new( int argc , const char *const *argv );
/**
* Decrement the reference count of a libvlc instance, and destroy it
* if it reaches zero.
*
* \param p_instance the instance to destroy
*/
LIBVLC_API void libvlc_release( libvlc_instance_t *p_instance );
/**
* Increments the reference count of a libvlc instance.
* The initial reference count is 1 after libvlc_new() returns.
*
* \param p_instance the instance to reference
* \return the same object
*/
LIBVLC_API libvlc_instance_t *libvlc_retain( libvlc_instance_t *p_instance );
/**
* Get the ABI version of the libvlc library.
*
* This is different than the VLC version, which is the version of the whole
* VLC package. The value is the same as LIBVLC_ABI_VERSION_INT used when
* compiling.
*
* \return a value with the following mask in hexadecimal
* 0xFF000000: major VLC version, similar to VLC major version,
* 0x00FF0000: major ABI version, incremented incompatible changes are added,
* 0x0000FF00: minor ABI version, incremented when new functions are added
* 0x000000FF: micro ABI version, incremented with new release/builds
*
* \note This the same value as the .so version but cross platform.
*/
LIBVLC_API int libvlc_abi_version(void);
/**
* Sets the application name. LibVLC passes this as the user agent string
* when a protocol requires it.
*
* \param p_instance LibVLC instance
* \param name human-readable application name, e.g. "FooBar player 1.2.3"
* \param http HTTP User Agent, e.g. "FooBar/1.2.3 Python/2.6.0"
* \version LibVLC 1.1.1 or later
*/
LIBVLC_API
void libvlc_set_user_agent( libvlc_instance_t *p_instance,
const char *name, const char *http );
/**
* Sets some meta-information about the application.
* See also libvlc_set_user_agent().
*
* \param p_instance LibVLC instance
* \param id Java-style application identifier, e.g. "com.acme.foobar"
* \param version application version numbers, e.g. "1.2.3"
* \param icon application icon name, e.g. "foobar"
* \version LibVLC 2.1.0 or later.
*/
LIBVLC_API
void libvlc_set_app_id( libvlc_instance_t *p_instance, const char *id,
const char *version, const char *icon );
/**
* Retrieve libvlc version.
*
* Example: "1.1.0-git The Luggage"
*
* \return a string containing the libvlc version
*/
LIBVLC_API const char * libvlc_get_version(void);
/**
* Retrieve libvlc compiler version.
*
* Example: "gcc version 4.2.3 (Ubuntu 4.2.3-2ubuntu6)"
*
* \return a string containing the libvlc compiler version
*/
LIBVLC_API const char * libvlc_get_compiler(void);
/**
* Retrieve libvlc changeset.
*
* Example: "aa9bce0bc4"
*
* \return a string containing the libvlc changeset
*/
LIBVLC_API const char * libvlc_get_changeset(void);
/**
* Frees an heap allocation returned by a LibVLC function.
* If you know you're using the same underlying C run-time as the LibVLC
* implementation, then you can call ANSI C free() directly instead.
*
* \param ptr the pointer
*/
LIBVLC_API void libvlc_free( void *ptr );
/** \defgroup libvlc_event LibVLC asynchronous events
* LibVLC emits asynchronous events.
*
* Several LibVLC objects (such @ref libvlc_instance_t as
* @ref libvlc_media_player_t) generate events asynchronously. Each of them
* provides @ref libvlc_event_manager_t event manager. You can subscribe to
* events with libvlc_event_attach() and unsubscribe with
* libvlc_event_detach().
* @{
*/
/**
* Event manager that belongs to a libvlc object, and from whom events can
* be received.
*/
typedef struct libvlc_event_manager_t libvlc_event_manager_t;
struct libvlc_event_t;
/**
* Type of a LibVLC event.
*/
typedef int libvlc_event_type_t;
/**
* Callback function notification
* \param p_event the event triggering the callback
*/
typedef void ( *libvlc_callback_t )( const struct libvlc_event_t *p_event, void *p_data );
/**
* Register for an event notification.
*
* \param p_event_manager the event manager to which you want to attach to.
* Generally it is obtained by vlc_my_object_event_manager() where
* my_object is the object you want to listen to.
* \param i_event_type the desired event to which we want to listen
* \param f_callback the function to call when i_event_type occurs
* \param user_data user provided data to carry with the event
* \return 0 on success, ENOMEM on error
*/
LIBVLC_API int libvlc_event_attach( libvlc_event_manager_t *p_event_manager,
libvlc_event_type_t i_event_type,
libvlc_callback_t f_callback,
void *user_data );
/**
* Unregister an event notification.
*
* \param p_event_manager the event manager
* \param i_event_type the desired event to which we want to unregister
* \param f_callback the function to call when i_event_type occurs
* \param p_user_data user provided data to carry with the event
*/
LIBVLC_API void libvlc_event_detach( libvlc_event_manager_t *p_event_manager,
libvlc_event_type_t i_event_type,
libvlc_callback_t f_callback,
void *p_user_data );
/** @} */
/** \defgroup libvlc_log LibVLC logging
* libvlc_log_* functions provide access to the LibVLC messages log.
* This is used for logging and debugging.
* @{
*/
/**
* Logging messages level.
* \note Future LibVLC versions may define new levels.
*/
enum libvlc_log_level
{
LIBVLC_DEBUG=0, /**< Debug message */
LIBVLC_NOTICE=2, /**< Important informational message */
LIBVLC_WARNING=3, /**< Warning (potential error) message */
LIBVLC_ERROR=4 /**< Error message */
};
typedef struct vlc_log_t libvlc_log_t;
/**
* Gets log message debug infos.
*
* This function retrieves self-debug information about a log message:
* - the name of the VLC module emitting the message,
* - the name of the source code module (i.e. file) and
* - the line number within the source code module.
*
* The returned module name and file name will be NULL if unknown.
* The returned line number will similarly be zero if unknown.
*
* \param ctx message context (as passed to the @ref libvlc_log_cb callback)
* \param module module name storage (or NULL) [OUT]
* \param file source code file name storage (or NULL) [OUT]
* \param line source code file line number storage (or NULL) [OUT]
* \warning The returned module name and source code file name, if non-NULL,
* are only valid until the logging callback returns.
*
* \version LibVLC 2.1.0 or later
*/
LIBVLC_API void libvlc_log_get_context(const libvlc_log_t *ctx,
const char **module, const char **file, unsigned *line);
/**
* Gets log message info.
*
* This function retrieves meta-information about a log message:
* - the type name of the VLC object emitting the message,
* - the object header if any, and
* - a temporaly-unique object identifier.
*
* This information is mainly meant for <b>manual</b> troubleshooting.
*
* The returned type name may be "generic" if unknown, but it cannot be NULL.
* The returned header will be NULL if unset; in current versions, the header
* is used to distinguish for VLM inputs.
* The returned object ID will be zero if the message is not associated with
* any VLC object.
*
* \param ctx message context (as passed to the @ref libvlc_log_cb callback)
* \param name object name storage (or NULL) [OUT]
* \param header object header (or NULL) [OUT]
* \param id temporarily-unique object identifier (or 0) [OUT]
* \warning The returned module name and source code file name, if non-NULL,
* are only valid until the logging callback returns.
*
* \version LibVLC 2.1.0 or later
*/
LIBVLC_API void libvlc_log_get_object(const libvlc_log_t *ctx,
const char **name, const char **header, uintptr_t *id);
/**
* Callback prototype for LibVLC log message handler.
*
* \param data data pointer as given to libvlc_log_set()
* \param level message level (@ref libvlc_log_level)
* \param ctx message context (meta-information about the message)
* \param fmt printf() format string (as defined by ISO C11)
* \param args variable argument list for the format
* \note Log message handlers <b>must</b> be thread-safe.
* \warning The message context pointer, the format string parameters and the
* variable arguments are only valid until the callback returns.
*/
typedef void (*libvlc_log_cb)(void *data, int level, const libvlc_log_t *ctx,
const char *fmt, va_list args);
/**
* Unsets the logging callback.
*
* This function deregisters the logging callback for a LibVLC instance.
* This is rarely needed as the callback is implicitly unset when the instance
* is destroyed.
*
* \note This function will wait for any pending callbacks invocation to
* complete (causing a deadlock if called from within the callback).
*
* \param p_instance libvlc instance
* \version LibVLC 2.1.0 or later
*/
LIBVLC_API void libvlc_log_unset( libvlc_instance_t *p_instance );
/**
* Sets the logging callback for a LibVLC instance.
*
* This function is thread-safe: it will wait for any pending callbacks
* invocation to complete.
*
* \param cb callback function pointer
* \param data opaque data pointer for the callback function
*
* \note Some log messages (especially debug) are emitted by LibVLC while
* is being initialized. These messages cannot be captured with this interface.
*
* \warning A deadlock may occur if this function is called from the callback.
*
* \param p_instance libvlc instance
* \version LibVLC 2.1.0 or later
*/
LIBVLC_API void libvlc_log_set( libvlc_instance_t *p_instance,
libvlc_log_cb cb, void *data );
/**
* Sets up logging to a file.
* \param p_instance libvlc instance
* \param stream FILE pointer opened for writing
* (the FILE pointer must remain valid until libvlc_log_unset())
* \version LibVLC 2.1.0 or later
*/
LIBVLC_API void libvlc_log_set_file( libvlc_instance_t *p_instance, FILE *stream );
/** @} */
/**
* Description of a module.
*/
typedef struct libvlc_module_description_t
{
char *psz_name;
char *psz_shortname;
char *psz_longname;
char *psz_help;
char *psz_help_html;
struct libvlc_module_description_t *p_next;
} libvlc_module_description_t;
/**
* Release a list of module descriptions.
*
* \param p_list the list to be released
*/
LIBVLC_API
void libvlc_module_description_list_release( libvlc_module_description_t *p_list );
/**
* Returns a list of audio filters that are available.
*
* \param p_instance libvlc instance
*
* \return a list of module descriptions. It should be freed with libvlc_module_description_list_release().
* In case of an error, NULL is returned.
*
* \see libvlc_module_description_t
* \see libvlc_module_description_list_release
*/
LIBVLC_API
libvlc_module_description_t *libvlc_audio_filter_list_get( libvlc_instance_t *p_instance );
/**
* Returns a list of video filters that are available.
*
* \param p_instance libvlc instance
*
* \return a list of module descriptions. It should be freed with libvlc_module_description_list_release().
* In case of an error, NULL is returned.
*
* \see libvlc_module_description_t
* \see libvlc_module_description_list_release
*/
LIBVLC_API
libvlc_module_description_t *libvlc_video_filter_list_get( libvlc_instance_t *p_instance );
/** @} */
/** \defgroup libvlc_clock LibVLC time
* These functions provide access to the LibVLC time/clock.
* @{
*/
/**
* Return the current time as defined by LibVLC. The unit is the microsecond.
* Time increases monotonically (regardless of time zone changes and RTC
* adjustments).
* The origin is arbitrary but consistent across the whole system
* (e.g. the system uptime, the time since the system was booted).
* \note On systems that support it, the POSIX monotonic clock is used.
*/
LIBVLC_API
int64_t libvlc_clock(void);
/**
* Return the delay (in microseconds) until a certain timestamp.
* \param pts timestamp
* \return negative if timestamp is in the past,
* positive if it is in the future
*/
static inline int64_t libvlc_delay(int64_t pts)
{
return pts - libvlc_clock();
}
/** @} */
# ifdef __cplusplus
}
# endif
#endif /** @} */

260
Libs/vlc/libvlc_dialog.h Normal file
View file

@ -0,0 +1,260 @@
/*****************************************************************************
* libvlc_dialog.h: libvlc dialog API
*****************************************************************************
* Copyright © 2016 VLC authors and VideoLAN
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#ifndef LIBVLC_DIALOG_H
#define LIBVLC_DIALOG_H 1
#include <stdbool.h>
# ifdef __cplusplus
extern "C" {
# endif
typedef struct libvlc_dialog_id libvlc_dialog_id;
/**
* @defgroup libvlc_dialog LibVLC dialog
* @ingroup libvlc
* @{
* @file
* LibVLC dialog external API
*/
typedef enum libvlc_dialog_question_type
{
LIBVLC_DIALOG_QUESTION_NORMAL,
LIBVLC_DIALOG_QUESTION_WARNING,
LIBVLC_DIALOG_QUESTION_CRITICAL,
} libvlc_dialog_question_type;
/**
* Dialog callbacks to be implemented
*
* @attention starting with vlc 4.0.0 the error callback (pf_display_error) is
* no longer part of this struct and need to be registered separately
* using @a libvlc_dialog_set_error_callback
*
* @see libvlc_dialog_set_error_callback
*/
typedef struct libvlc_dialog_cbs
{
/**
* Called when a login dialog needs to be displayed
*
* You can interact with this dialog by calling libvlc_dialog_post_login()
* to post an answer or libvlc_dialog_dismiss() to cancel this dialog.
*
* @note to receive this callback, libvlc_dialog_cbs.pf_cancel should not be
* NULL.
*
* @param p_data opaque pointer for the callback
* @param p_id id used to interact with the dialog
* @param psz_title title of the dialog
* @param psz_text text of the dialog
* @param psz_default_username user name that should be set on the user form
* @param b_ask_store if true, ask the user if he wants to save the
* credentials
*/
void (*pf_display_login)(void *p_data, libvlc_dialog_id *p_id,
const char *psz_title, const char *psz_text,
const char *psz_default_username,
bool b_ask_store);
/**
* Called when a question dialog needs to be displayed
*
* You can interact with this dialog by calling libvlc_dialog_post_action()
* to post an answer or libvlc_dialog_dismiss() to cancel this dialog.
*
* @note to receive this callback, libvlc_dialog_cbs.pf_cancel should not be
* NULL.
*
* @param p_data opaque pointer for the callback
* @param p_id id used to interact with the dialog
* @param psz_title title of the dialog
* @param psz_text text of the dialog
* @param i_type question type (or severity) of the dialog
* @param psz_cancel text of the cancel button
* @param psz_action1 text of the first button, if NULL, don't display this
* button
* @param psz_action2 text of the second button, if NULL, don't display
* this button
*/
void (*pf_display_question)(void *p_data, libvlc_dialog_id *p_id,
const char *psz_title, const char *psz_text,
libvlc_dialog_question_type i_type,
const char *psz_cancel, const char *psz_action1,
const char *psz_action2);
/**
* Called when a progress dialog needs to be displayed
*
* If cancellable (psz_cancel != NULL), you can cancel this dialog by
* calling libvlc_dialog_dismiss()
*
* @note to receive this callback, libvlc_dialog_cbs.pf_cancel and
* libvlc_dialog_cbs.pf_update_progress should not be NULL.
*
* @param p_data opaque pointer for the callback
* @param p_id id used to interact with the dialog
* @param psz_title title of the dialog
* @param psz_text text of the dialog
* @param b_indeterminate true if the progress dialog is indeterminate
* @param f_position initial position of the progress bar (between 0.0 and
* 1.0)
* @param psz_cancel text of the cancel button, if NULL the dialog is not
* cancellable
*/
void (*pf_display_progress)(void *p_data, libvlc_dialog_id *p_id,
const char *psz_title, const char *psz_text,
bool b_indeterminate, float f_position,
const char *psz_cancel);
/**
* Called when a displayed dialog needs to be cancelled
*
* The implementation must call libvlc_dialog_dismiss() to really release
* the dialog.
*
* @param p_data opaque pointer for the callback
* @param p_id id of the dialog
*/
void (*pf_cancel)(void *p_data, libvlc_dialog_id *p_id);
/**
* Called when a progress dialog needs to be updated
*
* @param p_data opaque pointer for the callback
* @param p_id id of the dialog
* @param f_position osition of the progress bar (between 0.0 and 1.0)
* @param psz_text new text of the progress dialog
*/
void (*pf_update_progress)(void *p_data, libvlc_dialog_id *p_id,
float f_position, const char *psz_text);
} libvlc_dialog_cbs;
/**
* Called when an error message needs to be displayed
*
* @param p_data opaque pointer for the callback
* @param psz_title title of the dialog
* @param psz_text text of the dialog
*/
typedef void (*libvlc_dialog_error_cbs)(void *p_data, const char *psz_title, const char *psz_text);
/**
* Register callbacks in order to handle VLC dialogs
*
* @version LibVLC 3.0.0 and later.
*
* @param p_instance the libvlc instance to attach the dialog callbacks to
* @param p_cbs a pointer to callbacks, or NULL to unregister callbacks.
* @param p_data opaque pointer for the callback
*/
LIBVLC_API void
libvlc_dialog_set_callbacks(libvlc_instance_t *p_instance,
const libvlc_dialog_cbs *p_cbs, void *p_data);
/*
* Register callback in order to handle VLC error messages
*
* @version LibVLC 4.0.0 and later.
*
* @param p_cbs a pointer to callback, or NULL to unregister callback.
* @param p_data opaque pointer for the callback
*/
LIBVLC_API void
libvlc_dialog_set_error_callback(libvlc_instance_t *p_instance,
libvlc_dialog_error_cbs p_cbs, void *p_data);
/**
* Associate an opaque pointer with the dialog id
*
* @version LibVLC 3.0.0 and later.
*/
LIBVLC_API void
libvlc_dialog_set_context(libvlc_dialog_id *p_id, void *p_context);
/**
* Return the opaque pointer associated with the dialog id
* \see libvlc_dialog_set_context
* @version LibVLC 3.0.0 and later.
*/
LIBVLC_API void *
libvlc_dialog_get_context(libvlc_dialog_id *p_id);
/**
* Post a login answer
*
* After this call, p_id won't be valid anymore
*
* @see libvlc_dialog_cbs.pf_display_login
*
* @version LibVLC 3.0.0 and later.
*
* @param p_id id of the dialog
* @param psz_username valid and non empty string
* @param psz_password valid string (can be empty)
* @param b_store if true, store the credentials
* @return 0 on success, or -1 on error
*/
LIBVLC_API int
libvlc_dialog_post_login(libvlc_dialog_id *p_id, const char *psz_username,
const char *psz_password, bool b_store);
/**
* Post a question answer
*
* After this call, p_id won't be valid anymore
*
* @see libvlc_dialog_cbs.pf_display_question
*
* @version LibVLC 3.0.0 and later.
*
* @param p_id id of the dialog
* @param i_action 1 for action1, 2 for action2
* @return 0 on success, or -1 on error
*/
LIBVLC_API int
libvlc_dialog_post_action(libvlc_dialog_id *p_id, int i_action);
/**
* Dismiss a dialog
*
* After this call, p_id won't be valid anymore
*
* @see libvlc_dialog_cbs.pf_cancel
*
* @version LibVLC 3.0.0 and later.
*
* @param p_id id of the dialog
* @return 0 on success, or -1 on error
*/
LIBVLC_API int
libvlc_dialog_dismiss(libvlc_dialog_id *p_id);
/** @} */
# ifdef __cplusplus
}
# endif
#endif /* LIBVLC_DIALOG_H */

457
Libs/vlc/libvlc_events.h Normal file
View file

@ -0,0 +1,457 @@
/*****************************************************************************
* libvlc_events.h: libvlc_events external API structure
*****************************************************************************
* Copyright (C) 1998-2010 VLC authors and VideoLAN
*
* Authors: Filippo Carone <littlejohn@videolan.org>
* Pierre d'Herbemont <pdherbemont@videolan.org>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#ifndef LIBVLC_EVENTS_H
#define LIBVLC_EVENTS_H 1
# include <vlc/libvlc.h>
# include <vlc/libvlc_picture.h>
# include <vlc/libvlc_media_track.h>
# include <vlc/libvlc_media.h>
/**
* \file
* This file defines libvlc_event external API
*/
# ifdef __cplusplus
extern "C" {
# else
# include <stdbool.h>
# endif
typedef struct libvlc_renderer_item_t libvlc_renderer_item_t;
typedef struct libvlc_title_description_t libvlc_title_description_t;
typedef struct libvlc_picture_t libvlc_picture_t;
typedef struct libvlc_picture_list_t libvlc_picture_list_t;
typedef struct libvlc_media_t libvlc_media_t;
typedef struct libvlc_media_list_t libvlc_media_list_t;
/**
* \ingroup libvlc_event
* @{
*/
/**
* Event types
*/
enum libvlc_event_e {
/* Append new event types at the end of a category.
* Do not remove, insert or re-order any entry.
*/
/**
* 1 or several Metadata of a \link #libvlc_media_t media item\endlink changed
*/
libvlc_MediaMetaChanged=0,
/**
* Subitem was added to a \link #libvlc_media_t media item\endlink
* \see libvlc_media_subitems()
*/
libvlc_MediaSubItemAdded,
/**
* Deprecated, use libvlc_MediaParsedChanged or libvlc_MediaPlayerLengthChanged.
*/
libvlc_MediaDurationChanged,
/**
* Parsing state of a \link #libvlc_media_t media item\endlink changed
* \see libvlc_media_parse_request(),
* libvlc_media_get_parsed_status(),
* libvlc_media_parse_stop()
*/
libvlc_MediaParsedChanged,
/* Removed: libvlc_MediaFreed, */
/* Removed: libvlc_MediaStateChanged */
/**
* Subitem tree was added to a \link #libvlc_media_t media item\endlink
*/
libvlc_MediaSubItemTreeAdded = libvlc_MediaParsedChanged + 3,
/**
* A thumbnail generation for this \link #libvlc_media_t media \endlink completed.
* \see libvlc_media_thumbnail_request_by_time()
* \see libvlc_media_thumbnail_request_by_pos()
*/
libvlc_MediaThumbnailGenerated,
/**
* One or more embedded thumbnails were found during the media preparsing
* The user can hold these picture(s) using libvlc_picture_retain if they
* wish to use them
*/
libvlc_MediaAttachedThumbnailsFound,
libvlc_MediaPlayerMediaChanged=0x100,
libvlc_MediaPlayerNothingSpecial,
libvlc_MediaPlayerOpening,
libvlc_MediaPlayerBuffering,
libvlc_MediaPlayerPlaying,
libvlc_MediaPlayerPaused,
libvlc_MediaPlayerStopped,
libvlc_MediaPlayerForward,
libvlc_MediaPlayerBackward,
libvlc_MediaPlayerStopping,
libvlc_MediaPlayerEncounteredError,
libvlc_MediaPlayerTimeChanged,
libvlc_MediaPlayerPositionChanged,
libvlc_MediaPlayerSeekableChanged,
libvlc_MediaPlayerPausableChanged,
/* libvlc_MediaPlayerTitleChanged, */
libvlc_MediaPlayerSnapshotTaken = libvlc_MediaPlayerPausableChanged + 2,
libvlc_MediaPlayerLengthChanged,
libvlc_MediaPlayerVout,
/* libvlc_MediaPlayerScrambledChanged, use libvlc_MediaPlayerProgramUpdated */
/** A track was added, cf. media_player_es_changed in \ref libvlc_event_t.u
* to get the id of the new track. */
libvlc_MediaPlayerESAdded = libvlc_MediaPlayerVout + 2,
/** A track was removed, cf. media_player_es_changed in \ref
* libvlc_event_t.u to get the id of the removed track. */
libvlc_MediaPlayerESDeleted,
/** Tracks were selected or unselected, cf.
* media_player_es_selection_changed in \ref libvlc_event_t.u to get the
* unselected and/or the selected track ids. */
libvlc_MediaPlayerESSelected,
libvlc_MediaPlayerCorked,
libvlc_MediaPlayerUncorked,
libvlc_MediaPlayerMuted,
libvlc_MediaPlayerUnmuted,
libvlc_MediaPlayerAudioVolume,
libvlc_MediaPlayerAudioDevice,
/** A track was updated, cf. media_player_es_changed in \ref
* libvlc_event_t.u to get the id of the updated track. */
libvlc_MediaPlayerESUpdated,
libvlc_MediaPlayerProgramAdded,
libvlc_MediaPlayerProgramDeleted,
libvlc_MediaPlayerProgramSelected,
libvlc_MediaPlayerProgramUpdated,
/**
* The title list changed, call
* libvlc_media_player_get_full_title_descriptions() to get the new list.
*/
libvlc_MediaPlayerTitleListChanged,
/**
* The title selection changed, cf media_player_title_selection_changed in
* \ref libvlc_event_t.u
*/
libvlc_MediaPlayerTitleSelectionChanged,
libvlc_MediaPlayerChapterChanged,
libvlc_MediaPlayerRecordChanged,
/**
* A \link #libvlc_media_t media item\endlink was added to a
* \link #libvlc_media_list_t media list\endlink.
*/
libvlc_MediaListItemAdded=0x200,
/**
* A \link #libvlc_media_t media item\endlink is about to get
* added to a \link #libvlc_media_list_t media list\endlink.
*/
libvlc_MediaListWillAddItem,
/**
* A \link #libvlc_media_t media item\endlink was deleted from
* a \link #libvlc_media_list_t media list\endlink.
*/
libvlc_MediaListItemDeleted,
/**
* A \link #libvlc_media_t media item\endlink is about to get
* deleted from a \link #libvlc_media_list_t media list\endlink.
*/
libvlc_MediaListWillDeleteItem,
/**
* A \link #libvlc_media_list_t media list\endlink has reached the
* end.
* All \link #libvlc_media_t items\endlink were either added (in
* case of a \ref libvlc_media_discoverer_t) or parsed (preparser).
*/
libvlc_MediaListEndReached,
/**
* \deprecated No longer used.
* This belonged to the removed libvlc_media_list_view_t
*/
libvlc_MediaListViewItemAdded LIBVLC_DEPRECATED =0x300,
/**
* \deprecated No longer used.
* This belonged to the removed libvlc_media_list_view_t
*/
libvlc_MediaListViewWillAddItem LIBVLC_DEPRECATED,
/**
* \deprecated No longer used.
* This belonged to the removed libvlc_media_list_view_t
*/
libvlc_MediaListViewItemDeleted LIBVLC_DEPRECATED,
/**
* \deprecated No longer used.
* This belonged to the removed libvlc_media_list_view_t
*/
libvlc_MediaListViewWillDeleteItem LIBVLC_DEPRECATED,
/**
* Playback of a \link #libvlc_media_list_player_t media list
* player\endlink has started.
*/
libvlc_MediaListPlayerPlayed=0x400,
/**
* The current \link #libvlc_media_t item\endlink of a
* \link #libvlc_media_list_player_t media list player\endlink
* has changed to a different item.
*/
libvlc_MediaListPlayerNextItemSet,
/**
* Playback of a \link #libvlc_media_list_player_t media list
* player\endlink has stopped.
*/
libvlc_MediaListPlayerStopped,
/**
* A new \link #libvlc_renderer_item_t renderer item\endlink was found by a
* \link #libvlc_renderer_discoverer_t renderer discoverer\endlink.
* The renderer item is valid until deleted.
*/
libvlc_RendererDiscovererItemAdded=0x502,
/**
* A previously discovered \link #libvlc_renderer_item_t renderer item\endlink
* was deleted by a \link #libvlc_renderer_discoverer_t renderer discoverer\endlink.
* The renderer item is no longer valid.
*/
libvlc_RendererDiscovererItemDeleted,
/**
* The current media set into the \ref libvlc_media_player_t is stopping.
*
* This event can be used to notify when the media callbacks, initialized
* from \ref libvlc_media_new_callbacks, should be interrupted, and in
* particular the \ref libvlc_media_read_cb. It can also be used to signal
* the application state that any input resource (webserver, file mounting,
* etc) can be discarded. Output resources still need to be active until
* the player switches to the \ref libvlc_Stopped state.
*/
libvlc_MediaPlayerMediaStopping,
};
/**
* A LibVLC event
*/
typedef struct libvlc_event_t
{
int type; /**< Event type (see @ref libvlc_event_e) */
void *p_obj; /**< Object emitting the event */
union
{
/* media descriptor */
struct
{
libvlc_meta_t meta_type; /**< Deprecated, any meta_type can change */
} media_meta_changed;
struct
{
libvlc_media_t * new_child;
} media_subitem_added;
struct
{
int64_t new_duration;
} media_duration_changed;
struct
{
int new_status; /**< see @ref libvlc_media_parsed_status_t */
} media_parsed_changed;
struct
{
int new_state; /**< see @ref libvlc_state_t */
} media_state_changed;
struct
{
libvlc_picture_t* p_thumbnail;
} media_thumbnail_generated;
struct
{
libvlc_media_t * item;
} media_subitemtree_added;
struct
{
libvlc_picture_list_t* thumbnails;
} media_attached_thumbnails_found;
/* media instance */
struct
{
float new_cache;
} media_player_buffering;
struct
{
int new_chapter;
} media_player_chapter_changed;
struct
{
double new_position;
} media_player_position_changed;
struct
{
libvlc_time_t new_time;
} media_player_time_changed;
struct
{
const libvlc_title_description_t *title;
int index;
} media_player_title_selection_changed;
struct
{
int new_seekable;
} media_player_seekable_changed;
struct
{
int new_pausable;
} media_player_pausable_changed;
struct
{
int new_scrambled;
} media_player_scrambled_changed;
struct
{
int new_count;
} media_player_vout;
/* media list */
struct
{
libvlc_media_t * item;
int index;
} media_list_item_added;
struct
{
libvlc_media_t * item;
int index;
} media_list_will_add_item;
struct
{
libvlc_media_t * item;
int index;
} media_list_item_deleted;
struct
{
libvlc_media_t * item;
int index;
} media_list_will_delete_item;
/* media list player */
struct
{
libvlc_media_t * item;
} media_list_player_next_item_set;
/* snapshot taken */
struct
{
char* psz_filename ;
} media_player_snapshot_taken ;
/* Length changed */
struct
{
libvlc_time_t new_length;
} media_player_length_changed;
/* Extra MediaPlayer */
struct
{
libvlc_media_t * new_media;
} media_player_media_changed;
struct
{
libvlc_media_t * media;
} media_player_media_stopping;
/* ESAdded, ESDeleted, ESUpdated */
struct
{
libvlc_track_type_t i_type;
int i_id; /**< Deprecated, use psz_id */
/** Call libvlc_media_player_get_track_from_id() to get the track
* description. */
const char *psz_id;
} media_player_es_changed;
/* ESSelected */
struct
{
libvlc_track_type_t i_type;
const char *psz_unselected_id;
const char *psz_selected_id;
} media_player_es_selection_changed;
/* ProgramAdded, ProgramDeleted, ProgramUpdated */
struct
{
int i_id;
} media_player_program_changed;
/* ProgramSelected */
struct
{
int i_unselected_id;
int i_selected_id;
} media_player_program_selection_changed;
struct
{
float volume;
} media_player_audio_volume;
struct
{
const char *device;
} media_player_audio_device;
struct
{
bool recording;
/** Only valid when recording ends (recording == false) */
const char *recorded_file_path;
} media_player_record_changed;
struct
{
libvlc_renderer_item_t *item;
} renderer_discoverer_item_added;
struct
{
libvlc_renderer_item_t *item;
} renderer_discoverer_item_deleted;
} u; /**< Type-dependent event description */
} libvlc_event_t;
/**@} */
# ifdef __cplusplus
}
# endif
#endif /* _LIBVLC_EVENTS_H */

917
Libs/vlc/libvlc_media.h Normal file
View file

@ -0,0 +1,917 @@
/*****************************************************************************
* libvlc_media.h: libvlc external API
*****************************************************************************
* Copyright (C) 1998-2009 VLC authors and VideoLAN
*
* Authors: Clément Stenac <zorglub@videolan.org>
* Jean-Paul Saman <jpsaman@videolan.org>
* Pierre d'Herbemont <pdherbemont@videolan.org>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#ifndef VLC_LIBVLC_MEDIA_H
#define VLC_LIBVLC_MEDIA_H 1
#include <vlc/libvlc_picture.h>
#include <vlc/libvlc_media_track.h>
# ifdef __cplusplus
extern "C" {
# else
# include <stdbool.h>
# endif
#include <stddef.h>
/** \defgroup libvlc_media LibVLC media
* \ingroup libvlc
* @ref libvlc_media_t is an abstract representation of a playable media.
* It consists of a media location and various optional meta data.
* @{
* \file
* LibVLC media item/descriptor external API
*/
typedef struct libvlc_media_t libvlc_media_t;
/** Meta data types */
typedef enum libvlc_meta_t {
libvlc_meta_Title,
libvlc_meta_Artist,
libvlc_meta_Genre,
libvlc_meta_Copyright,
libvlc_meta_Album,
libvlc_meta_TrackNumber,
libvlc_meta_Description,
libvlc_meta_Rating,
libvlc_meta_Date,
libvlc_meta_Setting,
libvlc_meta_URL,
libvlc_meta_Language,
libvlc_meta_NowPlaying,
libvlc_meta_Publisher,
libvlc_meta_EncodedBy,
libvlc_meta_ArtworkURL,
libvlc_meta_TrackID,
libvlc_meta_TrackTotal,
libvlc_meta_Director,
libvlc_meta_Season,
libvlc_meta_Episode,
libvlc_meta_ShowName,
libvlc_meta_Actors,
libvlc_meta_AlbumArtist,
libvlc_meta_DiscNumber,
libvlc_meta_DiscTotal
/* Add new meta types HERE */
} libvlc_meta_t;
/**
* libvlc media or media_player state
*/
typedef enum libvlc_state_t
{
libvlc_NothingSpecial=0,
libvlc_Opening,
libvlc_Buffering, /* XXX: Deprecated value. Check the
* libvlc_MediaPlayerBuffering event to know the
* buffering state of a libvlc_media_player */
libvlc_Playing,
libvlc_Paused,
libvlc_Stopped,
libvlc_Stopping,
libvlc_Error
} libvlc_state_t;
enum
{
libvlc_media_option_trusted = 0x2,
libvlc_media_option_unique = 0x100
};
typedef struct libvlc_media_stats_t
{
/* Input */
uint64_t i_read_bytes;
float f_input_bitrate;
/* Demux */
uint64_t i_demux_read_bytes;
float f_demux_bitrate;
uint64_t i_demux_corrupted;
uint64_t i_demux_discontinuity;
/* Decoders */
uint64_t i_decoded_video;
uint64_t i_decoded_audio;
/* Video Output */
uint64_t i_displayed_pictures;
uint64_t i_late_pictures;
uint64_t i_lost_pictures;
/* Audio output */
uint64_t i_played_abuffers;
uint64_t i_lost_abuffers;
} libvlc_media_stats_t;
/**
* Media type
*
* \see libvlc_media_get_type
*/
typedef enum libvlc_media_type_t {
libvlc_media_type_unknown,
libvlc_media_type_file,
libvlc_media_type_directory,
libvlc_media_type_disc,
libvlc_media_type_stream,
libvlc_media_type_playlist,
} libvlc_media_type_t;
/**
* Parse flags used by libvlc_media_parse_request()
*/
typedef enum libvlc_media_parse_flag_t
{
/**
* Parse media if it's a local file
*/
libvlc_media_parse_local = 0x01,
/**
* Parse media even if it's a network file
*/
libvlc_media_parse_network = 0x02,
/**
* Force parsing the media even if it would be skipped.
*/
libvlc_media_parse_forced = 0x04,
/**
* Fetch meta and cover art using local resources
*/
libvlc_media_fetch_local = 0x08,
/**
* Fetch meta and cover art using network resources
*/
libvlc_media_fetch_network = 0x10,
/**
* Interact with the user (via libvlc_dialog_cbs) when preparsing this item
* (and not its sub items). Set this flag in order to receive a callback
* when the input is asking for credentials.
*/
libvlc_media_do_interact = 0x20,
} libvlc_media_parse_flag_t;
/**
* Parse status used sent by libvlc_media_parse_request() or returned by
* libvlc_media_get_parsed_status()
*/
typedef enum libvlc_media_parsed_status_t
{
libvlc_media_parsed_status_none,
libvlc_media_parsed_status_pending,
libvlc_media_parsed_status_skipped,
libvlc_media_parsed_status_failed,
libvlc_media_parsed_status_timeout,
libvlc_media_parsed_status_cancelled,
libvlc_media_parsed_status_done,
} libvlc_media_parsed_status_t;
/**
* Type of a media slave: subtitle or audio.
*/
typedef enum libvlc_media_slave_type_t
{
libvlc_media_slave_type_subtitle,
libvlc_media_slave_type_generic,
libvlc_media_slave_type_audio = libvlc_media_slave_type_generic,
} libvlc_media_slave_type_t;
/**
* A slave of a libvlc_media_t
* \see libvlc_media_slaves_get
*/
typedef struct libvlc_media_slave_t
{
char * psz_uri;
libvlc_media_slave_type_t i_type;
unsigned int i_priority;
} libvlc_media_slave_t;
/**
* Type of stat that can be requested from libvlc_media_get_filestat()
*/
#define libvlc_media_filestat_mtime 0
#define libvlc_media_filestat_size 1
/**
* Callback prototype to open a custom bitstream input media.
*
* The same media item can be opened multiple times. Each time, this callback
* is invoked. It should allocate and initialize any instance-specific
* resources, then store them in *datap. The instance resources can be freed
* in the @ref libvlc_media_close_cb callback.
*
* \param opaque private pointer as passed to libvlc_media_new_callbacks()
* \param datap storage space for a private data pointer [OUT]
* \param sizep byte length of the bitstream or UINT64_MAX if unknown [OUT]
*
* \note For convenience, *datap is initially NULL and *sizep is initially 0.
*
* \return 0 on success, non-zero on error. In case of failure, the other
* callbacks will not be invoked and any value stored in *datap and *sizep is
* discarded.
*/
typedef int (*libvlc_media_open_cb)(void *opaque, void **datap,
uint64_t *sizep);
/**
* Callback prototype to read data from a custom bitstream input media.
*
* \param opaque private pointer as set by the @ref libvlc_media_open_cb
* callback
* \param buf start address of the buffer to read data into
* \param len bytes length of the buffer
*
* \return strictly positive number of bytes read, 0 on end-of-stream,
* or -1 on non-recoverable error
*
* \note If no data is immediately available, then the callback should sleep.
* \warning The application is responsible for avoiding deadlock situations.
*/
typedef ptrdiff_t (*libvlc_media_read_cb)(void *opaque, unsigned char *buf,
size_t len);
/**
* Callback prototype to seek a custom bitstream input media.
*
* \param opaque private pointer as set by the @ref libvlc_media_open_cb
* callback
* \param offset absolute byte offset to seek to
* \return 0 on success, -1 on error.
*/
typedef int (*libvlc_media_seek_cb)(void *opaque, uint64_t offset);
/**
* Callback prototype to close a custom bitstream input media.
*
* \param opaque private pointer as set by the @ref libvlc_media_open_cb
* callback
*/
typedef void (*libvlc_media_close_cb)(void *opaque);
/**
* Create a media with a certain given media resource location,
* for instance a valid URL.
*
* \note To refer to a local file with this function,
* the file://... URI syntax <b>must</b> be used (see IETF RFC3986).
* We recommend using libvlc_media_new_path() instead when dealing with
* local files.
*
* \see libvlc_media_release
*
* \param psz_mrl the media location
* \return the newly created media or NULL on error
*/
LIBVLC_API libvlc_media_t *libvlc_media_new_location(const char * psz_mrl);
/**
* Create a media for a certain file path.
*
* \see libvlc_media_release
*
* \param path local filesystem path
* \return the newly created media or NULL on error
*/
LIBVLC_API libvlc_media_t *libvlc_media_new_path(const char *path);
/**
* Create a media for an already open file descriptor.
* The file descriptor shall be open for reading (or reading and writing).
*
* Regular file descriptors, pipe read descriptors and character device
* descriptors (including TTYs) are supported on all platforms.
* Block device descriptors are supported where available.
* Directory descriptors are supported on systems that provide fdopendir().
* Sockets are supported on all platforms where they are file descriptors,
* i.e. all except Windows.
*
* \note This library will <b>not</b> automatically close the file descriptor
* under any circumstance. Nevertheless, a file descriptor can usually only be
* rendered once in a media player. To render it a second time, the file
* descriptor should probably be rewound to the beginning with lseek().
*
* \see libvlc_media_release
*
* \version LibVLC 1.1.5 and later.
*
* \param fd open file descriptor
* \return the newly created media or NULL on error
*/
LIBVLC_API libvlc_media_t *libvlc_media_new_fd(int fd);
/**
* Create a media with custom callbacks to read the data from.
*
* \param open_cb callback to open the custom bitstream input media
* \param read_cb callback to read data (must not be NULL)
* \param seek_cb callback to seek, or NULL if seeking is not supported
* \param close_cb callback to close the media, or NULL if unnecessary
* \param opaque data pointer for the open callback
*
* \return the newly created media or NULL on error
*
* \note If open_cb is NULL, the opaque pointer will be passed to read_cb,
* seek_cb and close_cb, and the stream size will be treated as unknown.
*
* \note The callbacks may be called asynchronously (from another thread).
* A single stream instance need not be reentrant. However the open_cb needs to
* be reentrant if the media is used by multiple player instances.
*
* \warning The callbacks may be used until all or any player instances
* that were supplied the media item are stopped.
*
* \see libvlc_media_release
*
* \version LibVLC 3.0.0 and later.
*/
LIBVLC_API libvlc_media_t *libvlc_media_new_callbacks(
libvlc_media_open_cb open_cb,
libvlc_media_read_cb read_cb,
libvlc_media_seek_cb seek_cb,
libvlc_media_close_cb close_cb,
void *opaque );
/**
* Create a media as an empty node with a given name.
*
* \see libvlc_media_release
*
* \param psz_name the name of the node
* \return the new empty media or NULL on error
*/
LIBVLC_API libvlc_media_t *libvlc_media_new_as_node(const char * psz_name);
/**
* Add an option to the media.
*
* This option will be used to determine how the media_player will
* read the media. This allows to use VLC's advanced
* reading/streaming options on a per-media basis.
*
* \note The options are listed in 'vlc --longhelp' from the command line,
* e.g. "--sout-all". Keep in mind that available options and their semantics
* vary across LibVLC versions and builds.
* \warning Not all options affects libvlc_media_t objects:
* Specifically, due to architectural issues most audio and video options,
* such as text renderer options, have no effects on an individual media.
* These options must be set through libvlc_new() instead.
*
* \param p_md the media descriptor
* \param psz_options the options (as a string)
*/
LIBVLC_API void libvlc_media_add_option(
libvlc_media_t *p_md,
const char * psz_options );
/**
* Add an option to the media with configurable flags.
*
* This option will be used to determine how the media_player will
* read the media. This allows to use VLC's advanced
* reading/streaming options on a per-media basis.
*
* The options are detailed in vlc --longhelp, for instance
* "--sout-all". Note that all options are not usable on medias:
* specifically, due to architectural issues, video-related options
* such as text renderer options cannot be set on a single media. They
* must be set on the whole libvlc instance instead.
*
* \param p_md the media descriptor
* \param psz_options the options (as a string)
* \param i_flags the flags for this option
*/
LIBVLC_API void libvlc_media_add_option_flag(
libvlc_media_t *p_md,
const char * psz_options,
unsigned i_flags );
/**
* Retain a reference to a media descriptor object (libvlc_media_t). Use
* libvlc_media_release() to decrement the reference count of a
* media descriptor object.
*
* \param p_md the media descriptor
* \return the same object
*/
LIBVLC_API libvlc_media_t *libvlc_media_retain( libvlc_media_t *p_md );
/**
* Decrement the reference count of a media descriptor object. If the
* reference count is 0, then libvlc_media_release() will release the
* media descriptor object. If the media descriptor object has been released it
* should not be used again.
*
* \param p_md the media descriptor
*/
LIBVLC_API void libvlc_media_release( libvlc_media_t *p_md );
/**
* Get the media resource locator (mrl) from a media descriptor object
*
* \param p_md a media descriptor object
* \return string with mrl of media descriptor object
*/
LIBVLC_API char *libvlc_media_get_mrl( libvlc_media_t *p_md );
/**
* Duplicate a media descriptor object.
*
* \warning the duplicated media won't share forthcoming updates from the
* original one.
*
* \param p_md a media descriptor object.
*/
LIBVLC_API libvlc_media_t *libvlc_media_duplicate( libvlc_media_t *p_md );
/**
* Read the meta of the media.
*
* Note, you need to call libvlc_media_parse_request() or play the media
* at least once before calling this function.
* If the media has not yet been parsed this will return NULL.
*
* \see libvlc_MediaMetaChanged
*
* \param p_md the media descriptor
* \param e_meta the meta to read
* \return the media's meta
*/
LIBVLC_API char *libvlc_media_get_meta( libvlc_media_t *p_md,
libvlc_meta_t e_meta );
/**
* Set the meta of the media (this function will not save the meta, call
* libvlc_media_save_meta in order to save the meta)
*
* \param p_md the media descriptor
* \param e_meta the meta to write
* \param psz_value the media's meta
*/
LIBVLC_API void libvlc_media_set_meta( libvlc_media_t *p_md,
libvlc_meta_t e_meta,
const char *psz_value );
/**
* Read the meta extra of the media.
*
* If the media has not yet been parsed this will return NULL.
*
* \see libvlc_media_parse
* \see libvlc_media_parse_with_options
*
* \param p_md the media descriptor
* \param psz_name the meta extra to read (nonnullable)
* \return the media's meta extra or NULL
*/
LIBVLC_API char *libvlc_media_get_meta_extra( libvlc_media_t *p_md,
const char *psz_name );
/**
* Set the meta of the media (this function will not save the meta, call
* libvlc_media_save_meta in order to save the meta)
*
* \param p_md the media descriptor
* \param psz_name the meta extra to write (nonnullable)
* \param psz_value the media's meta extra (nullable)
* Removed from meta extra if set to NULL
*/
LIBVLC_API void libvlc_media_set_meta_extra( libvlc_media_t *p_md,
const char *psz_name,
const char *psz_value );
/**
* Read the meta extra names of the media.
*
* \param p_md the media descriptor
* \param pppsz_names the media's meta extra name array
* you can access the elements using the return value (count)
* must be released with libvlc_media_meta_extra_names_release()
* \return the meta extra count
*/
LIBVLC_API unsigned libvlc_media_get_meta_extra_names( libvlc_media_t *p_md,
char ***pppsz_names );
/**
* Release a media meta extra names
*
* \param ppsz_names meta extra names array to release
* \param i_count number of elements in the array
*/
LIBVLC_API void libvlc_media_meta_extra_names_release( char **ppsz_names,
unsigned i_count );
/**
* Save the meta previously set
*
* \param inst LibVLC instance
* \param p_md the media descriptor
* \return true if the write operation was successful
*/
LIBVLC_API int libvlc_media_save_meta( libvlc_instance_t *inst,
libvlc_media_t *p_md );
/**
* Get the current statistics about the media
* \param p_md media descriptor object
* \param p_stats structure that contain the statistics about the media
* (this structure must be allocated by the caller)
* \retval true statistics are available
* \retval false otherwise
*/
LIBVLC_API bool libvlc_media_get_stats(libvlc_media_t *p_md,
libvlc_media_stats_t *p_stats);
/* The following method uses libvlc_media_list_t, however, media_list usage is optional
* and this is here for convenience */
#define VLC_FORWARD_DECLARE_OBJECT(a) struct a
/**
* Get subitems of media descriptor object. This will increment
* the reference count of supplied media descriptor object. Use
* libvlc_media_list_release() to decrement the reference counting.
*
* \param p_md media descriptor object
* \return list of media descriptor subitems or NULL
*/
LIBVLC_API VLC_FORWARD_DECLARE_OBJECT(libvlc_media_list_t *)
libvlc_media_subitems( libvlc_media_t *p_md );
/**
* Get event manager from media descriptor object.
* NOTE: this function doesn't increment reference counting.
*
* \param p_md a media descriptor object
* \return event manager object
*/
LIBVLC_API libvlc_event_manager_t *
libvlc_media_event_manager( libvlc_media_t *p_md );
/**
* Get duration (in ms) of media descriptor object item.
*
* Note, you need to call libvlc_media_parse_request() or play the media
* at least once before calling this function.
* Not doing this will result in an undefined result.
*
* \param p_md media descriptor object
* \return duration of media item or -1 on error
*/
LIBVLC_API libvlc_time_t
libvlc_media_get_duration( libvlc_media_t *p_md );
/**
* Get a 'stat' value of media descriptor object item.
*
* \note 'stat' values are currently only parsed by directory accesses. This
* mean that only sub medias of a directory media, parsed with
* libvlc_media_parse_request() can have valid 'stat' properties.
* \version LibVLC 4.0.0 and later.
*
* \param p_md media descriptor object
* \param type a valid libvlc_media_stat_ define
* \param out field in which the value will be stored
* \return 1 on success, 0 if not found, -1 on error.
*/
LIBVLC_API int
libvlc_media_get_filestat( libvlc_media_t *p_md, unsigned type, uint64_t *out );
/**
* Parse the media asynchronously with options.
*
* This fetches (local or network) art, meta data and/or tracks information.
*
* To track when this is over you can listen to libvlc_MediaParsedChanged
* event. However if this functions returns an error, you will not receive any
* events.
*
* It uses a flag to specify parse options (see libvlc_media_parse_flag_t). All
* these flags can be combined. By default, media is parsed if it's a local
* file.
*
* \note Parsing can be aborted with libvlc_media_parse_stop().
*
* \see libvlc_MediaParsedChanged
* \see libvlc_media_get_meta
* \see libvlc_media_get_tracklist
* \see libvlc_media_get_parsed_status
* \see libvlc_media_parse_flag_t
*
* \param inst LibVLC instance that is to parse the media
* \param p_md media descriptor object
* \param parse_flag parse options:
* \param timeout maximum time allowed to preparse the media. If -1, the
* default "preparse-timeout" option will be used as a timeout. If 0, it will
* wait indefinitely. If > 0, the timeout will be used (in milliseconds).
* \return -1 in case of error, 0 otherwise
* \version LibVLC 4.0.0 or later
*/
LIBVLC_API int
libvlc_media_parse_request( libvlc_instance_t *inst, libvlc_media_t *p_md,
libvlc_media_parse_flag_t parse_flag,
int timeout );
/**
* Stop the parsing of the media
*
* When the media parsing is stopped, the libvlc_MediaParsedChanged event will
* be sent with the libvlc_media_parsed_status_timeout status.
*
* \see libvlc_media_parse_request()
*
* \param inst LibVLC instance that is to cease or give up parsing the media
* \param p_md media descriptor object
* \version LibVLC 3.0.0 or later
*/
LIBVLC_API void
libvlc_media_parse_stop( libvlc_instance_t *inst, libvlc_media_t *p_md );
/**
* Get Parsed status for media descriptor object.
*
* \see libvlc_MediaParsedChanged
* \see libvlc_media_parsed_status_t
* \see libvlc_media_parse_request()
*
* \param p_md media descriptor object
* \return a value of the libvlc_media_parsed_status_t enum
* \version LibVLC 3.0.0 or later
*/
LIBVLC_API libvlc_media_parsed_status_t
libvlc_media_get_parsed_status( libvlc_media_t *p_md );
/**
* Sets media descriptor's user_data. user_data is specialized data
* accessed by the host application, VLC.framework uses it as a pointer to
* an native object that references a libvlc_media_t pointer
*
* \param p_md media descriptor object
* \param p_new_user_data pointer to user data
*/
LIBVLC_API void
libvlc_media_set_user_data( libvlc_media_t *p_md, void *p_new_user_data );
/**
* Get media descriptor's user_data. user_data is specialized data
* accessed by the host application, VLC.framework uses it as a pointer to
* an native object that references a libvlc_media_t pointer
*
* \see libvlc_media_set_user_data
*
* \param p_md media descriptor object
*/
LIBVLC_API void *libvlc_media_get_user_data( libvlc_media_t *p_md );
/**
* Get the track list for one type
*
* \version LibVLC 4.0.0 and later.
*
* \note You need to call libvlc_media_parse_request() or play the media
* at least once before calling this function. Not doing this will result in
* an empty list.
*
* \see libvlc_media_tracklist_count
* \see libvlc_media_tracklist_at
*
* \param p_md media descriptor object
* \param type type of the track list to request
*
* \return a valid libvlc_media_tracklist_t or NULL in case of error, if there
* is no track for a category, the returned list will have a size of 0, delete
* with libvlc_media_tracklist_delete()
*/
LIBVLC_API libvlc_media_tracklist_t *
libvlc_media_get_tracklist( libvlc_media_t *p_md, libvlc_track_type_t type );
/**
* Get codec description from media elementary stream
*
* Note, you need to call libvlc_media_parse_request() or play the media
* at least once before calling this function.
*
* \version LibVLC 3.0.0 and later.
*
* \see libvlc_media_track_t
*
* \param i_type i_type from libvlc_media_track_t
* \param i_codec i_codec or i_original_fourcc from libvlc_media_track_t
*
* \return codec description
*/
LIBVLC_API
const char *libvlc_media_get_codec_description( libvlc_track_type_t i_type,
uint32_t i_codec );
/**
* Get the media type of the media descriptor object
*
* \version LibVLC 3.0.0 and later.
*
* \see libvlc_media_type_t
*
* \param p_md media descriptor object
*
* \return media type
*/
LIBVLC_API
libvlc_media_type_t libvlc_media_get_type( libvlc_media_t *p_md );
/**
* \brief libvlc_media_thumbnail_request_t An opaque thumbnail request object
*/
typedef struct libvlc_media_thumbnail_request_t libvlc_media_thumbnail_request_t;
typedef enum libvlc_thumbnailer_seek_speed_t
{
libvlc_media_thumbnail_seek_precise,
libvlc_media_thumbnail_seek_fast,
} libvlc_thumbnailer_seek_speed_t;
/**
* \brief libvlc_media_request_thumbnail_by_time Start an asynchronous thumbnail generation
*
* If the request is successfully queued, the libvlc_MediaThumbnailGenerated is
* guaranteed to be emitted (except if the request is destroyed early by the
* user).
* The resulting thumbnail size can either be:
* - Hardcoded by providing both width & height. In which case, the image will
* be stretched to match the provided aspect ratio, or cropped if crop is true.
* - Derived from the media aspect ratio if only width or height is provided and
* the other one is set to 0.
*
* \param inst LibVLC instance to generate the thumbnail with
* \param md media descriptor object
* \param time The time at which the thumbnail should be generated
* \param speed The seeking speed \sa{libvlc_thumbnailer_seek_speed_t}
* \param width The thumbnail width
* \param height the thumbnail height
* \param crop Should the picture be cropped to preserve source aspect ratio
* \param picture_type The thumbnail picture type \sa{libvlc_picture_type_t}
* \param timeout A timeout value in ms, or 0 to disable timeout
*
* \return A valid opaque request object, or NULL in case of failure.
* It must be released by libvlc_media_thumbnail_request_destroy() and
* can be cancelled by calling it early.
*
* \version libvlc 4.0 or later
*
* \see libvlc_picture_t
* \see libvlc_picture_type_t
*/
LIBVLC_API libvlc_media_thumbnail_request_t*
libvlc_media_thumbnail_request_by_time( libvlc_instance_t *inst,
libvlc_media_t *md, libvlc_time_t time,
libvlc_thumbnailer_seek_speed_t speed,
unsigned int width, unsigned int height,
bool crop, libvlc_picture_type_t picture_type,
libvlc_time_t timeout );
/**
* \brief libvlc_media_request_thumbnail_by_pos Start an asynchronous thumbnail generation
*
* If the request is successfully queued, the libvlc_MediaThumbnailGenerated is
* guaranteed to be emitted (except if the request is destroyed early by the
* user).
* The resulting thumbnail size can either be:
* - Hardcoded by providing both width & height. In which case, the image will
* be stretched to match the provided aspect ratio, or cropped if crop is true.
* - Derived from the media aspect ratio if only width or height is provided and
* the other one is set to 0.
*
* \param inst LibVLC instance to generate the thumbnail with
* \param md media descriptor object
* \param pos The position at which the thumbnail should be generated
* \param speed The seeking speed \sa{libvlc_thumbnailer_seek_speed_t}
* \param width The thumbnail width
* \param height the thumbnail height
* \param crop Should the picture be cropped to preserve source aspect ratio
* \param picture_type The thumbnail picture type \sa{libvlc_picture_type_t}
* \param timeout A timeout value in ms, or 0 to disable timeout
*
* \return A valid opaque request object, or NULL in case of failure.
* It must be released by libvlc_media_thumbnail_request_destroy().
*
* \version libvlc 4.0 or later
*
* \see libvlc_picture_t
* \see libvlc_picture_type_t
*/
LIBVLC_API libvlc_media_thumbnail_request_t*
libvlc_media_thumbnail_request_by_pos( libvlc_instance_t *inst,
libvlc_media_t *md, double pos,
libvlc_thumbnailer_seek_speed_t speed,
unsigned int width, unsigned int height,
bool crop, libvlc_picture_type_t picture_type,
libvlc_time_t timeout );
/**
* @brief libvlc_media_thumbnail_destroy destroys a thumbnail request
* @param p_req An opaque thumbnail request object.
*
* This will also cancel the thumbnail request, no events will be emitted after
* this call.
*/
LIBVLC_API void
libvlc_media_thumbnail_request_destroy( libvlc_media_thumbnail_request_t *p_req );
/**
* Add a slave to the current media.
*
* A slave is an external input source that may contains an additional subtitle
* track (like a .srt) or an additional audio track (like a .ac3).
*
* \note This function must be called before the media is parsed (via
* libvlc_media_parse_request()) or before the media is played (via
* libvlc_media_player_play())
*
* \version LibVLC 3.0.0 and later.
*
* \param p_md media descriptor object
* \param i_type subtitle or audio
* \param i_priority from 0 (low priority) to 4 (high priority)
* \param psz_uri Uri of the slave (should contain a valid scheme).
*
* \return 0 on success, -1 on error.
*/
LIBVLC_API
int libvlc_media_slaves_add( libvlc_media_t *p_md,
libvlc_media_slave_type_t i_type,
unsigned int i_priority,
const char *psz_uri );
/**
* Clear all slaves previously added by libvlc_media_slaves_add() or
* internally.
*
* \version LibVLC 3.0.0 and later.
*
* \param p_md media descriptor object
*/
LIBVLC_API
void libvlc_media_slaves_clear( libvlc_media_t *p_md );
/**
* Get a media descriptor's slave list
*
* The list will contain slaves parsed by VLC or previously added by
* libvlc_media_slaves_add(). The typical use case of this function is to save
* a list of slave in a database for a later use.
*
* \version LibVLC 3.0.0 and later.
*
* \see libvlc_media_slaves_add
*
* \param p_md media descriptor object
* \param ppp_slaves address to store an allocated array of slaves (must be
* freed with libvlc_media_slaves_release()) [OUT]
*
* \return the number of slaves (zero on error)
*/
LIBVLC_API
unsigned int libvlc_media_slaves_get( libvlc_media_t *p_md,
libvlc_media_slave_t ***ppp_slaves );
/**
* Release a media descriptor's slave list
*
* \version LibVLC 3.0.0 and later.
*
* \param pp_slaves slave array to release
* \param i_count number of elements in the array
*/
LIBVLC_API
void libvlc_media_slaves_release( libvlc_media_slave_t **pp_slaves,
unsigned int i_count );
/** @}*/
# ifdef __cplusplus
}
# endif
#endif /* VLC_LIBVLC_MEDIA_H */

View file

@ -0,0 +1,188 @@
/*****************************************************************************
* libvlc_media_discoverer.h: libvlc external API
*****************************************************************************
* Copyright (C) 1998-2009 VLC authors and VideoLAN
*
* Authors: Clément Stenac <zorglub@videolan.org>
* Jean-Paul Saman <jpsaman@videolan.org>
* Pierre d'Herbemont <pdherbemont@videolan.org>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#ifndef VLC_LIBVLC_MEDIA_DISCOVERER_H
#define VLC_LIBVLC_MEDIA_DISCOVERER_H 1
# ifdef __cplusplus
extern "C" {
# endif
typedef struct libvlc_media_list_t libvlc_media_list_t;
/**
* Category of a media discoverer
* \see libvlc_media_discoverer_list_get()
*/
typedef enum libvlc_media_discoverer_category_t {
/** devices, like portable music player */
libvlc_media_discoverer_devices,
/** LAN/WAN services, like Upnp, SMB, or SAP */
libvlc_media_discoverer_lan,
/** Podcasts */
libvlc_media_discoverer_podcasts,
/** Local directories, like Video, Music or Pictures directories */
libvlc_media_discoverer_localdirs,
} libvlc_media_discoverer_category_t;
/**
* Media discoverer description
* \see libvlc_media_discoverer_list_get()
*/
typedef struct libvlc_media_discoverer_description_t {
char *psz_name;
char *psz_longname;
libvlc_media_discoverer_category_t i_cat;
} libvlc_media_discoverer_description_t;
/** \defgroup libvlc_media_discoverer LibVLC media discovery
* \ingroup libvlc
* LibVLC media discovery finds available media via various means.
* This corresponds to the service discovery functionality in VLC media player.
* Different plugins find potential medias locally (e.g. user media directory),
* from peripherals (e.g. video capture device), on the local network
* (e.g. SAP) or on the Internet (e.g. Internet radios).
* @{
* \file
* LibVLC media discovery external API
*/
typedef struct libvlc_media_discoverer_t libvlc_media_discoverer_t;
/**
* Create a media discoverer object by name.
*
* After this object is created, you should attach to media_list events in
* order to be notified of new items discovered.
*
* You need to call libvlc_media_discoverer_start() in order to start the
* discovery.
*
* \see libvlc_media_discoverer_media_list
* \see libvlc_media_discoverer_start
*
* \param p_inst libvlc instance
* \param psz_name service name; use libvlc_media_discoverer_list_get() to get
* a list of the discoverer names available in this libVLC instance
* \return media discover object or NULL in case of error
* \version LibVLC 3.0.0 or later
*/
LIBVLC_API libvlc_media_discoverer_t *
libvlc_media_discoverer_new( libvlc_instance_t * p_inst,
const char * psz_name );
/**
* Start media discovery.
*
* To stop it, call libvlc_media_discoverer_stop() or
* libvlc_media_discoverer_list_release() directly.
*
* \see libvlc_media_discoverer_stop
*
* \param p_mdis media discover object
* \return -1 in case of error, 0 otherwise
* \version LibVLC 3.0.0 or later
*/
LIBVLC_API int
libvlc_media_discoverer_start( libvlc_media_discoverer_t * p_mdis );
/**
* Stop media discovery.
*
* \see libvlc_media_discoverer_start
*
* \param p_mdis media discover object
* \version LibVLC 3.0.0 or later
*/
LIBVLC_API void
libvlc_media_discoverer_stop( libvlc_media_discoverer_t * p_mdis );
/**
* Release media discover object. If the reference count reaches 0, then
* the object will be released.
*
* \param p_mdis media service discover object
*/
LIBVLC_API void
libvlc_media_discoverer_release( libvlc_media_discoverer_t * p_mdis );
/**
* Get media service discover media list.
*
* \param p_mdis media service discover object
* \return list of media items
*/
LIBVLC_API libvlc_media_list_t *
libvlc_media_discoverer_media_list( libvlc_media_discoverer_t * p_mdis );
/**
* Query if media service discover object is running.
*
* \param p_mdis media service discover object
*
* \retval true running
* \retval false not running
*/
LIBVLC_API bool
libvlc_media_discoverer_is_running(libvlc_media_discoverer_t *p_mdis);
/**
* Get media discoverer services by category
*
* \version LibVLC 3.0.0 and later.
*
* \param p_inst libvlc instance
* \param i_cat category of services to fetch
* \param ppp_services address to store an allocated array of media discoverer
* services (must be freed with libvlc_media_discoverer_list_release() by
* the caller) [OUT]
*
* \return the number of media discoverer services (0 on error)
*/
LIBVLC_API size_t
libvlc_media_discoverer_list_get( libvlc_instance_t *p_inst,
libvlc_media_discoverer_category_t i_cat,
libvlc_media_discoverer_description_t ***ppp_services );
/**
* Release an array of media discoverer services
*
* \version LibVLC 3.0.0 and later.
*
* \see libvlc_media_discoverer_list_get()
*
* \param pp_services array to release
* \param i_count number of elements in the array
*/
LIBVLC_API void
libvlc_media_discoverer_list_release( libvlc_media_discoverer_description_t **pp_services,
size_t i_count );
/**@} */
# ifdef __cplusplus
}
# endif
#endif /* <vlc/libvlc.h> */

View file

@ -0,0 +1,200 @@
/*****************************************************************************
* libvlc_media_list.h: libvlc_media_list API
*****************************************************************************
* Copyright (C) 1998-2008 VLC authors and VideoLAN
*
* Authors: Pierre d'Herbemont
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#ifndef LIBVLC_MEDIA_LIST_H
#define LIBVLC_MEDIA_LIST_H 1
typedef struct libvlc_media_t libvlc_media_t;
# ifdef __cplusplus
extern "C" {
# endif
/** \defgroup libvlc_media_list LibVLC media list
* \ingroup libvlc
* A LibVLC media list holds multiple @ref libvlc_media_t media descriptors.
* @{
* \file
* LibVLC media list (playlist) external API
*/
typedef struct libvlc_media_list_t libvlc_media_list_t;
/**
* Create an empty media list.
*
* \return empty media list, or NULL on error
*/
LIBVLC_API libvlc_media_list_t *libvlc_media_list_new(void);
/**
* Release media list created with libvlc_media_list_new().
*
* \param p_ml a media list created with libvlc_media_list_new()
*/
LIBVLC_API void
libvlc_media_list_release( libvlc_media_list_t *p_ml );
/**
* Retain reference to a media list
*
* \param p_ml a media list created with libvlc_media_list_new()
* \return the same object
*/
LIBVLC_API libvlc_media_list_t *
libvlc_media_list_retain( libvlc_media_list_t *p_ml );
/**
* Associate media instance with this media list instance.
* If another media instance was present it will be released.
* The libvlc_media_list_lock should NOT be held upon entering this function.
*
* \param p_ml a media list instance
* \param p_md media instance to add
*/
LIBVLC_API void
libvlc_media_list_set_media( libvlc_media_list_t *p_ml, libvlc_media_t *p_md );
/**
* Get media instance from this media list instance. This action will increase
* the refcount on the media instance.
* The libvlc_media_list_lock should NOT be held upon entering this function.
*
* \param p_ml a media list instance
* \return media instance
*/
LIBVLC_API libvlc_media_t *
libvlc_media_list_media( libvlc_media_list_t *p_ml );
/**
* Add media instance to media list
* The libvlc_media_list_lock should be held upon entering this function.
*
* \param p_ml a media list instance
* \param p_md a media instance
* \return 0 on success, -1 if the media list is read-only
*/
LIBVLC_API int
libvlc_media_list_add_media( libvlc_media_list_t *p_ml, libvlc_media_t *p_md );
/**
* Insert media instance in media list on a position
* The libvlc_media_list_lock should be held upon entering this function.
*
* \param p_ml a media list instance
* \param p_md a media instance
* \param i_pos position in array where to insert
* \return 0 on success, -1 if the media list is read-only
*/
LIBVLC_API int
libvlc_media_list_insert_media( libvlc_media_list_t *p_ml,
libvlc_media_t *p_md, int i_pos );
/**
* Remove media instance from media list on a position
* The libvlc_media_list_lock should be held upon entering this function.
*
* \param p_ml a media list instance
* \param i_pos position in array where to insert
* \return 0 on success, -1 if the list is read-only or the item was not found
*/
LIBVLC_API int
libvlc_media_list_remove_index( libvlc_media_list_t *p_ml, int i_pos );
/**
* Get count on media list items
* The libvlc_media_list_lock should be held upon entering this function.
*
* \param p_ml a media list instance
* \return number of items in media list
*/
LIBVLC_API int
libvlc_media_list_count( libvlc_media_list_t *p_ml );
/**
* List media instance in media list at a position
* The libvlc_media_list_lock should be held upon entering this function.
*
* \param p_ml a media list instance
* \param i_pos position in array where to insert
* \return media instance at position i_pos, or NULL if not found.
* In case of success, libvlc_media_retain() is called to increase the refcount
* on the media.
*/
LIBVLC_API libvlc_media_t *
libvlc_media_list_item_at_index( libvlc_media_list_t *p_ml, int i_pos );
/**
* Find index position of List media instance in media list.
* Warning: the function will return the first matched position.
* The libvlc_media_list_lock should be held upon entering this function.
*
* \param p_ml a media list instance
* \param p_md media instance
* \return position of media instance or -1 if media not found
*/
LIBVLC_API int
libvlc_media_list_index_of_item( libvlc_media_list_t *p_ml,
libvlc_media_t *p_md );
/**
* This indicates if this media list is read-only from a user point of view
*
* \param p_ml media list instance
* \retval true read-only
* \retval false read/write
*/
LIBVLC_API bool libvlc_media_list_is_readonly(libvlc_media_list_t *p_ml);
/**
* Get lock on media list items
*
* \param p_ml a media list instance
*/
LIBVLC_API void
libvlc_media_list_lock( libvlc_media_list_t *p_ml );
/**
* Release lock on media list items
* The libvlc_media_list_lock should be held upon entering this function.
*
* \param p_ml a media list instance
*/
LIBVLC_API void
libvlc_media_list_unlock( libvlc_media_list_t *p_ml );
/**
* Get libvlc_event_manager from this media list instance.
* The p_event_manager is immutable, so you don't have to hold the lock
*
* \param p_ml a media list instance
* \return libvlc_event_manager
*/
LIBVLC_API libvlc_event_manager_t *
libvlc_media_list_event_manager( libvlc_media_list_t *p_ml );
/** @} media_list */
# ifdef __cplusplus
}
# endif
#endif /* _LIBVLC_MEDIA_LIST_H */

View file

@ -0,0 +1,249 @@
/*****************************************************************************
* libvlc_media_list_player.h: libvlc_media_list API
*****************************************************************************
* Copyright (C) 1998-2008 VLC authors and VideoLAN
*
* Authors: Pierre d'Herbemont
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#ifndef LIBVLC_MEDIA_LIST_PLAYER_H
#define LIBVLC_MEDIA_LIST_PLAYER_H 1
#include <vlc/libvlc.h>
#include <vlc/libvlc_media.h>
# ifdef __cplusplus
extern "C" {
# endif
typedef struct libvlc_instance_t libvlc_instance_t;
typedef struct libvlc_media_player_t libvlc_media_player_t;
typedef struct libvlc_media_list_t libvlc_media_list_t;
typedef struct libvlc_media_t libvlc_media_t;
/** \defgroup libvlc_media_list_player LibVLC media list player
* \ingroup libvlc
* The LibVLC media list player plays a @ref libvlc_media_list_t list of media,
* in a certain order.
* This is required to especially support playlist files.
* The normal @ref libvlc_media_player_t LibVLC media player can only play a
* single media, and does not handle playlist files properly.
* @{
* \file
* LibVLC media list player external API
*/
typedef struct libvlc_media_list_player_t libvlc_media_list_player_t;
/**
* Defines playback modes for playlist.
*/
typedef enum libvlc_playback_mode_t
{
libvlc_playback_mode_default,
libvlc_playback_mode_loop,
libvlc_playback_mode_repeat
} libvlc_playback_mode_t;
/**
* Create new media_list_player.
*
* \param p_instance libvlc instance
* \return media list player instance or NULL on error
* (it must be released by libvlc_media_list_player_release())
*/
LIBVLC_API libvlc_media_list_player_t *
libvlc_media_list_player_new( libvlc_instance_t * p_instance );
/**
* Release a media_list_player after use
* Decrement the reference count of a media player object. If the
* reference count is 0, then libvlc_media_list_player_release() will
* release the media player object. If the media player object
* has been released, then it should not be used again.
*
* \param p_mlp media list player instance
*/
LIBVLC_API void
libvlc_media_list_player_release( libvlc_media_list_player_t * p_mlp );
/**
* Retain a reference to a media player list object. Use
* libvlc_media_list_player_release() to decrement reference count.
*
* \param p_mlp media player list object
* \return the same object
*/
LIBVLC_API libvlc_media_list_player_t *
libvlc_media_list_player_retain( libvlc_media_list_player_t *p_mlp );
/**
* Return the event manager of this media_list_player.
*
* \param p_mlp media list player instance
* \return the event manager
*/
LIBVLC_API libvlc_event_manager_t *
libvlc_media_list_player_event_manager(libvlc_media_list_player_t * p_mlp);
/**
* Replace media player in media_list_player with this instance.
*
* \param p_mlp media list player instance
* \param p_mi media player instance
*/
LIBVLC_API void
libvlc_media_list_player_set_media_player(
libvlc_media_list_player_t * p_mlp,
libvlc_media_player_t * p_mi );
/**
* Get media player of the media_list_player instance.
*
* \param p_mlp media list player instance
* \return media player instance
* \note the caller is responsible for releasing the returned instance
with libvlc_media_list_player_set_media_player().
*/
LIBVLC_API libvlc_media_player_t *
libvlc_media_list_player_get_media_player(libvlc_media_list_player_t * p_mlp);
/**
* Set the media list associated with the player
*
* \param p_mlp media list player instance
* \param p_mlist list of media
*/
LIBVLC_API void
libvlc_media_list_player_set_media_list(
libvlc_media_list_player_t * p_mlp,
libvlc_media_list_t * p_mlist );
/**
* Play media list
*
* \param p_mlp media list player instance
*/
LIBVLC_API
void libvlc_media_list_player_play(libvlc_media_list_player_t * p_mlp);
/**
* Toggle pause (or resume) media list
*
* \param p_mlp media list player instance
*/
LIBVLC_API
void libvlc_media_list_player_pause(libvlc_media_list_player_t * p_mlp);
/**
* Pause or resume media list
*
* \param p_mlp media list player instance
* \param do_pause play/resume if zero, pause if non-zero
* \version LibVLC 3.0.0 or later
*/
LIBVLC_API
void libvlc_media_list_player_set_pause(libvlc_media_list_player_t * p_mlp,
int do_pause);
/**
* Is media list playing?
*
* \param p_mlp media list player instance
*
* \retval true playing
* \retval false not playing
*/
LIBVLC_API bool
libvlc_media_list_player_is_playing(libvlc_media_list_player_t * p_mlp);
/**
* Get current libvlc_state of media list player
*
* \param p_mlp media list player instance
* \return libvlc_state_t for media list player
*/
LIBVLC_API libvlc_state_t
libvlc_media_list_player_get_state( libvlc_media_list_player_t * p_mlp );
/**
* Play media list item at position index
*
* \param p_mlp media list player instance
* \param i_index index in media list to play
* \return 0 upon success -1 if the item wasn't found
*/
LIBVLC_API
int libvlc_media_list_player_play_item_at_index(libvlc_media_list_player_t * p_mlp,
int i_index);
/**
* Play the given media item
*
* \param p_mlp media list player instance
* \param p_md the media instance
* \return 0 upon success, -1 if the media is not part of the media list
*/
LIBVLC_API
int libvlc_media_list_player_play_item(libvlc_media_list_player_t * p_mlp,
libvlc_media_t * p_md);
/**
* Stop playing media list
*
* \param p_mlp media list player instance
*/
LIBVLC_API void
libvlc_media_list_player_stop_async( libvlc_media_list_player_t * p_mlp);
/**
* Play next item from media list
*
* \param p_mlp media list player instance
* \return 0 upon success -1 if there is no next item
*/
LIBVLC_API
int libvlc_media_list_player_next(libvlc_media_list_player_t * p_mlp);
/**
* Play previous item from media list
*
* \param p_mlp media list player instance
* \return 0 upon success -1 if there is no previous item
*/
LIBVLC_API
int libvlc_media_list_player_previous(libvlc_media_list_player_t * p_mlp);
/**
* Sets the playback mode for the playlist
*
* \param p_mlp media list player instance
* \param e_mode playback mode specification
*/
LIBVLC_API
void libvlc_media_list_player_set_playback_mode(libvlc_media_list_player_t * p_mlp,
libvlc_playback_mode_t e_mode );
/** @} media_list_player */
# ifdef __cplusplus
}
# endif
#endif /* LIBVLC_MEDIA_LIST_PLAYER_H */

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,212 @@
/*****************************************************************************
* libvlc_media_track.h: libvlc external API
*****************************************************************************
* Copyright (C) 1998-2020 VLC authors and VideoLAN
*
* Authors: Clément Stenac <zorglub@videolan.org>
* Jean-Paul Saman <jpsaman@videolan.org>
* Pierre d'Herbemont <pdherbemont@videolan.org>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#ifndef VLC_LIBVLC_MEDIA_TRACK_H
#define VLC_LIBVLC_MEDIA_TRACK_H 1
# include "libvlc_video.h"
# ifdef __cplusplus
extern "C" {
# else
# include <stdbool.h>
# endif
/** \defgroup libvlc_media_track LibVLC media track
* \ingroup libvlc
* @ref libvlc_media_track_t is an abstract representation of a media track.
* @{
* \file
* LibVLC media track
*/
typedef enum libvlc_track_type_t
{
libvlc_track_unknown = -1,
libvlc_track_audio = 0,
libvlc_track_video = 1,
libvlc_track_text = 2
} libvlc_track_type_t;
typedef struct libvlc_audio_track_t
{
unsigned i_channels;
unsigned i_rate;
} libvlc_audio_track_t;
/**
* Viewpoint
*
* \warning allocate using libvlc_video_new_viewpoint()
*/
typedef struct libvlc_video_viewpoint_t
{
float f_yaw; /**< view point yaw in degrees ]-180;180] */
float f_pitch; /**< view point pitch in degrees ]-90;90] */
float f_roll; /**< view point roll in degrees ]-180;180] */
float f_field_of_view; /**< field of view in degrees ]0;180[ (default 80.)*/
} libvlc_video_viewpoint_t;
typedef struct libvlc_video_track_t
{
unsigned i_height;
unsigned i_width;
unsigned i_sar_num;
unsigned i_sar_den;
unsigned i_frame_rate_num;
unsigned i_frame_rate_den;
libvlc_video_orient_t i_orientation;
libvlc_video_projection_t i_projection;
libvlc_video_viewpoint_t pose; /**< Initial view point */
libvlc_video_multiview_t i_multiview;
} libvlc_video_track_t;
typedef struct libvlc_subtitle_track_t
{
char *psz_encoding;
} libvlc_subtitle_track_t;
typedef struct libvlc_media_track_t
{
/* Codec fourcc */
uint32_t i_codec;
uint32_t i_original_fourcc;
int i_id; /* DEPRECATED: use psz_id */
libvlc_track_type_t i_type;
/* Codec specific */
int i_profile;
int i_level;
union {
libvlc_audio_track_t *audio;
libvlc_video_track_t *video;
libvlc_subtitle_track_t *subtitle;
};
unsigned int i_bitrate;
char *psz_language;
char *psz_description;
/** String identifier of track, can be used to save the track preference
* from an other LibVLC run */
const char *psz_id;
/** A string identifier is stable when it is certified to be the same
* across different playback instances for the same track. */
bool id_stable;
/** Name of the track, only valid when the track is fetch from a
* media_player */
char *psz_name;
/** true if the track is selected, only valid when the track is fetch from
* a media_player */
bool selected;
} libvlc_media_track_t;
/**
* Opaque struct containing a list of tracks
*/
typedef struct libvlc_media_tracklist_t libvlc_media_tracklist_t;
/**
* Get the number of tracks in a tracklist
*
* \version LibVLC 4.0.0 and later.
*
* \param list valid tracklist
*
* \return number of tracks, or 0 if the list is empty
*/
LIBVLC_API size_t
libvlc_media_tracklist_count( const libvlc_media_tracklist_t *list );
/**
* Get a track at a specific index
*
* \warning The behaviour is undefined if the index is not valid.
*
* \version LibVLC 4.0.0 and later.
*
* \param list valid tracklist
* \param index valid index in the range [0; count[
*
* \return a valid track (can't be NULL if libvlc_media_tracklist_count()
* returned a valid count)
*/
LIBVLC_API libvlc_media_track_t *
libvlc_media_tracklist_at( libvlc_media_tracklist_t *list, size_t index );
/**
* Release a tracklist
*
* \version LibVLC 4.0.0 and later.
*
* \see libvlc_media_get_tracklist
* \see libvlc_media_player_get_tracklist
*
* \param list valid tracklist
*/
LIBVLC_API void
libvlc_media_tracklist_delete( libvlc_media_tracklist_t *list );
/**
* Hold a single track reference
*
* \version LibVLC 4.0.0 and later.
*
* This function can be used to hold a track from a tracklist. In that case,
* the track can outlive its tracklist.
*
* \param track valid track
* \return the same track, need to be released with libvlc_media_track_release()
*/
LIBVLC_API libvlc_media_track_t *
libvlc_media_track_hold( libvlc_media_track_t *track );
/**
* Release a single track
*
* \version LibVLC 4.0.0 and later.
*
* \warning Tracks from a tracklist are released alongside the list with
* libvlc_media_tracklist_delete().
*
* \note You only need to release tracks previously held with
* libvlc_media_track_hold() or returned by
* libvlc_media_player_get_selected_track() and
* libvlc_media_player_get_track_from_id()
*
* \param track valid track
*/
LIBVLC_API void
libvlc_media_track_release( libvlc_media_track_t *track );
/** @}*/
# ifdef __cplusplus
}
# endif
#endif /* VLC_LIBVLC_MEDIA_TRACK_H */

151
Libs/vlc/libvlc_picture.h Normal file
View file

@ -0,0 +1,151 @@
/*****************************************************************************
* libvlc_picture.h: libvlc external API
*****************************************************************************
* Copyright (C) 2018 VLC authors and VideoLAN
*
* Authors: Hugo Beauzée-Luyssen <hugo@beauzee.fr>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#ifndef VLC_LIBVLC_PICTURE_H
#define VLC_LIBVLC_PICTURE_H 1
# ifdef __cplusplus
extern "C" {
# endif
typedef struct libvlc_picture_t libvlc_picture_t;
typedef struct libvlc_picture_list_t libvlc_picture_list_t;
typedef enum libvlc_picture_type_t
{
libvlc_picture_Argb,
libvlc_picture_Png,
libvlc_picture_Jpg,
libvlc_picture_WebP,
} libvlc_picture_type_t;
/**
* Increment the reference count of this picture.
*
* \see libvlc_picture_release()
* \param pic A picture object
* \return the same object
*/
LIBVLC_API libvlc_picture_t *
libvlc_picture_retain( libvlc_picture_t* pic );
/**
* Decrement the reference count of this picture.
* When the reference count reaches 0, the picture will be released.
* The picture must not be accessed after calling this function.
*
* \see libvlc_picture_retain
* \param pic A picture object
*/
LIBVLC_API void
libvlc_picture_release( libvlc_picture_t* pic );
/**
* Saves this picture to a file. The image format is the same as the one
* returned by \link libvlc_picture_type \endlink
*
* \param pic A picture object
* \param path The path to the generated file
* \return 0 in case of success, -1 otherwise
*/
LIBVLC_API int
libvlc_picture_save( const libvlc_picture_t* pic, const char* path );
/**
* Returns the image internal buffer, including potential padding.
* The libvlc_picture_t owns the returned buffer, which must not be modified nor
* freed.
*
* \param pic A picture object
* \param size A pointer to a size_t that will hold the size of the buffer [required]
* \return A pointer to the internal buffer.
*/
LIBVLC_API const unsigned char*
libvlc_picture_get_buffer( const libvlc_picture_t* pic, size_t *size );
/**
* Returns the picture type
*
* \param pic A picture object
* \see libvlc_picture_type_t
*/
LIBVLC_API libvlc_picture_type_t
libvlc_picture_type( const libvlc_picture_t* pic );
/**
* Returns the image stride, ie. the number of bytes per line.
* This can only be called on images of type libvlc_picture_Argb
*
* \param pic A picture object
*/
LIBVLC_API unsigned int
libvlc_picture_get_stride( const libvlc_picture_t* pic );
/**
* Returns the width of the image in pixels
*
* \param pic A picture object
*/
LIBVLC_API unsigned int
libvlc_picture_get_width( const libvlc_picture_t* pic );
/**
* Returns the height of the image in pixels
*
* \param pic A picture object
*/
LIBVLC_API unsigned int
libvlc_picture_get_height( const libvlc_picture_t* pic );
/**
* Returns the time at which this picture was generated, in milliseconds
* \param pic A picture object
*/
LIBVLC_API libvlc_time_t
libvlc_picture_get_time( const libvlc_picture_t* pic );
/**
* Returns the number of pictures in the list
*/
LIBVLC_API size_t libvlc_picture_list_count( const libvlc_picture_list_t* list );
/**
* Returns the picture at the provided index.
*
* If the index is out of bound, the result is undefined.
*/
LIBVLC_API libvlc_picture_t* libvlc_picture_list_at( const libvlc_picture_list_t* list,
size_t index );
/**
* Destroys a picture list and releases the pictures it contains
* \param list The list to destroy
*
* Calling this function with a NULL list is safe and will return immediately
*/
LIBVLC_API void libvlc_picture_list_destroy( libvlc_picture_list_t* list );
# ifdef __cplusplus
}
# endif
#endif // VLC_LIBVLC_PICTURE_H

View file

@ -0,0 +1,255 @@
/*****************************************************************************
* libvlc_renderer_discoverer.h: libvlc external API
*****************************************************************************
* Copyright © 2016 VLC authors and VideoLAN
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#ifndef VLC_LIBVLC_RENDERER_DISCOVERER_H
#define VLC_LIBVLC_RENDERER_DISCOVERER_H 1
# ifdef __cplusplus
extern "C" {
# endif
/**
* @defgroup libvlc_renderer_discoverer LibVLC renderer discoverer
* @ingroup libvlc
* LibVLC renderer discoverer finds available renderers available on the local
* network
* @{
* @file
* LibVLC renderer discoverer external API
*/
typedef struct libvlc_renderer_discoverer_t libvlc_renderer_discoverer_t;
/**
* Renderer discoverer description
*
* \see libvlc_renderer_discoverer_list_get()
*/
typedef struct libvlc_rd_description_t
{
char *psz_name;
char *psz_longname;
} libvlc_rd_description_t;
/** The renderer can render audio */
#define LIBVLC_RENDERER_CAN_AUDIO 0x0001
/** The renderer can render video */
#define LIBVLC_RENDERER_CAN_VIDEO 0x0002
/**
* Renderer item
*
* This struct is passed by a @ref libvlc_event_t when a new renderer is added
* or deleted.
*
* An item is valid until the @ref libvlc_RendererDiscovererItemDeleted event
* is called with the same pointer.
*
* \see libvlc_renderer_discoverer_event_manager()
*/
typedef struct libvlc_renderer_item_t libvlc_renderer_item_t;
/**
* Hold a renderer item, i.e. creates a new reference
*
* This functions need to called from the libvlc_RendererDiscovererItemAdded
* callback if the libvlc user wants to use this item after. (for display or
* for passing it to the mediaplayer for example).
*
* \version LibVLC 3.0.0 or later
*
* \return the current item
*/
LIBVLC_API libvlc_renderer_item_t *
libvlc_renderer_item_hold(libvlc_renderer_item_t *p_item);
/**
* Releases a renderer item, i.e. decrements its reference counter
*
* \version LibVLC 3.0.0 or later
*/
LIBVLC_API void
libvlc_renderer_item_release(libvlc_renderer_item_t *p_item);
/**
* Get the human readable name of a renderer item
*
* \version LibVLC 3.0.0 or later
*
* \return the name of the item (can't be NULL, must *not* be freed)
*/
LIBVLC_API const char *
libvlc_renderer_item_name(const libvlc_renderer_item_t *p_item);
/**
* Get the type (not translated) of a renderer item. For now, the type can only
* be "chromecast" ("upnp", "airplay" may come later).
*
* \version LibVLC 3.0.0 or later
*
* \return the type of the item (can't be NULL, must *not* be freed)
*/
LIBVLC_API const char *
libvlc_renderer_item_type(const libvlc_renderer_item_t *p_item);
/**
* Get the icon uri of a renderer item
*
* \version LibVLC 3.0.0 or later
*
* \return the uri of the item's icon (can be NULL, must *not* be freed)
*/
LIBVLC_API const char *
libvlc_renderer_item_icon_uri(const libvlc_renderer_item_t *p_item);
/**
* Get the flags of a renderer item
*
* \see LIBVLC_RENDERER_CAN_AUDIO
* \see LIBVLC_RENDERER_CAN_VIDEO
*
* \version LibVLC 3.0.0 or later
*
* \return bitwise flag: capabilities of the renderer, see
*/
LIBVLC_API int
libvlc_renderer_item_flags(const libvlc_renderer_item_t *p_item);
/**
* Create a renderer discoverer object by name
*
* After this object is created, you should attach to events in order to be
* notified of the discoverer events.
*
* You need to call libvlc_renderer_discoverer_start() in order to start the
* discovery.
*
* \see libvlc_renderer_discoverer_event_manager()
* \see libvlc_renderer_discoverer_start()
*
* \version LibVLC 3.0.0 or later
*
* \param p_inst libvlc instance
* \param psz_name service name; use libvlc_renderer_discoverer_list_get() to
* get a list of the discoverer names available in this libVLC instance
* \return media discover object or NULL in case of error
*/
LIBVLC_API libvlc_renderer_discoverer_t *
libvlc_renderer_discoverer_new( libvlc_instance_t *p_inst,
const char *psz_name );
/**
* Release a renderer discoverer object
*
* \version LibVLC 3.0.0 or later
*
* \param p_rd renderer discoverer object
*/
LIBVLC_API void
libvlc_renderer_discoverer_release( libvlc_renderer_discoverer_t *p_rd );
/**
* Start renderer discovery
*
* To stop it, call libvlc_renderer_discoverer_stop() or
* libvlc_renderer_discoverer_release() directly.
*
* \see libvlc_renderer_discoverer_stop()
*
* \version LibVLC 3.0.0 or later
*
* \param p_rd renderer discoverer object
* \return -1 in case of error, 0 otherwise
*/
LIBVLC_API int
libvlc_renderer_discoverer_start( libvlc_renderer_discoverer_t *p_rd );
/**
* Stop renderer discovery.
*
* \see libvlc_renderer_discoverer_start()
*
* \version LibVLC 3.0.0 or later
*
* \param p_rd renderer discoverer object
*/
LIBVLC_API void
libvlc_renderer_discoverer_stop( libvlc_renderer_discoverer_t *p_rd );
/**
* Get the event manager of the renderer discoverer
*
* The possible events to attach are @ref libvlc_RendererDiscovererItemAdded
* and @ref libvlc_RendererDiscovererItemDeleted.
*
* The @ref libvlc_renderer_item_t struct passed to event callbacks is owned by
* VLC, users should take care of holding/releasing this struct for their
* internal usage.
*
* \see libvlc_event_t.u.renderer_discoverer_item_added.item
* \see libvlc_event_t.u.renderer_discoverer_item_removed.item
*
* \version LibVLC 3.0.0 or later
*
* \return a valid event manager (can't fail)
*/
LIBVLC_API libvlc_event_manager_t *
libvlc_renderer_discoverer_event_manager( libvlc_renderer_discoverer_t *p_rd );
/**
* Get media discoverer services
*
* \see libvlc_renderer_list_release()
*
* \version LibVLC 3.0.0 and later
*
* \param p_inst libvlc instance
* \param ppp_services address to store an allocated array of renderer
* discoverer services (must be freed with libvlc_renderer_list_release() by
* the caller) [OUT]
*
* \return the number of media discoverer services (0 on error)
*/
LIBVLC_API size_t
libvlc_renderer_discoverer_list_get( libvlc_instance_t *p_inst,
libvlc_rd_description_t ***ppp_services );
/**
* Release an array of media discoverer services
*
* \see libvlc_renderer_discoverer_list_get()
*
* \version LibVLC 3.0.0 and later
*
* \param pp_services array to release
* \param i_count number of elements in the array
*/
LIBVLC_API void
libvlc_renderer_discoverer_list_release( libvlc_rd_description_t **pp_services,
size_t i_count );
/** @} */
# ifdef __cplusplus
}
# endif
#endif

79
Libs/vlc/libvlc_version.h Normal file
View file

@ -0,0 +1,79 @@
/*****************************************************************************
* libvlc_version.h
*****************************************************************************
* Copyright (C) 2010 Rémi Denis-Courmont
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
/**
* \file
* This file defines version macros for LibVLC.
* Those macros are primilarly intended for conditional (pre)compilation.
* To get the run-time LibVLC version, use libvlc_get_version() instead
* (the run-time version may be more recent than build-time one, thanks to
* backward binary compatibility).
*
* \version This header file is available in LibVLC 1.1.4 and higher.
*/
#ifndef LIBVLC_VERSION_H
# define LIBVLC_VERSION_H 1
/** LibVLC major version number */
# define LIBVLC_VERSION_MAJOR (4)
/** LibVLC minor version number */
# define LIBVLC_VERSION_MINOR (0)
/** LibVLC revision */
# define LIBVLC_VERSION_REVISION (0)
# define LIBVLC_VERSION_EXTRA (0)
/** Makes a single integer from a LibVLC version numbers */
# define LIBVLC_VERSION(maj,min,rev,extra) \
((maj << 24) | (min << 16) | (rev << 8) | (extra))
/** LibVLC full version as a single integer (for comparison) */
# define LIBVLC_VERSION_INT \
LIBVLC_VERSION(LIBVLC_VERSION_MAJOR, LIBVLC_VERSION_MINOR, \
LIBVLC_VERSION_REVISION, LIBVLC_VERSION_EXTRA)
/** LibVLC ABI major version number, updated when incompatible changes are added */
# define LIBVLC_ABI_VERSION_MAJOR (12)
/** LibVLC ABI minor version number, updated when compatible changes are added */
# define LIBVLC_ABI_VERSION_MINOR (0)
/** LibVLC ABI micro version number, updated with new releases */
# define LIBVLC_ABI_VERSION_MICRO (0)
/** LibVLC full ABI version combining the major VLC version and the .so version:
* - A 0xFF000000 mask gives the VLC major version,
* - A 0x00FF0000 mask gives the LibVLC major ABI version,
* - A 0x0000FF00 mask gives the LibVLC minor ABI version,
* - A 0x000000FF mask gives the LibVLC ABI revision.
*
* LibVLC is considered compatible with your code if the VLC major and LibVLC
* major values are equal and the minor ABI version is equal or higher than the
* value you compiled with.
*/
# define LIBVLC_ABI_VERSION_INT \
LIBVLC_VERSION(LIBVLC_VERSION_MAJOR, LIBVLC_ABI_VERSION_MAJOR, \
LIBVLC_ABI_VERSION_MINOR, LIBVLC_ABI_VERSION_MICRO )
#endif

67
Libs/vlc/libvlc_video.h Normal file
View file

@ -0,0 +1,67 @@
/*****************************************************************************
* libvlc_video.h: libvlc video-related enumerations
*****************************************************************************
* Copyright (C) 1998-2010 VLC authors and VideoLAN
* Copyright (C) 2023 Videolabs
*
* Authors: Filippo Carone <littlejohn@videolan.org>
* Pierre d'Herbemont <pdherbemont@videolan.org>
* Alexandre Janniaux <ajanni@videolabs.io>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#ifndef VLC_LIBVLC_VIDEO_H
#define VLC_LIBVLC_VIDEO_H 1
# ifdef __cplusplus
extern "C"{
# endif
typedef enum libvlc_video_orient_t
{
libvlc_video_orient_top_left, /**< Normal. Top line represents top, left column left. */
libvlc_video_orient_top_right, /**< Flipped horizontally */
libvlc_video_orient_bottom_left, /**< Flipped vertically */
libvlc_video_orient_bottom_right, /**< Rotated 180 degrees */
libvlc_video_orient_left_top, /**< Transposed */
libvlc_video_orient_left_bottom, /**< Rotated 90 degrees clockwise (or 270 anti-clockwise) */
libvlc_video_orient_right_top, /**< Rotated 90 degrees anti-clockwise */
libvlc_video_orient_right_bottom /**< Anti-transposed */
} libvlc_video_orient_t;
typedef enum libvlc_video_projection_t
{
libvlc_video_projection_rectangular,
libvlc_video_projection_equirectangular, /**< 360 spherical */
libvlc_video_projection_cubemap_layout_standard = 0x100,
} libvlc_video_projection_t;
typedef enum libvlc_video_multiview_t
{
libvlc_video_multiview_2d, /**< No stereoscopy: 2D picture. */
libvlc_video_multiview_stereo_sbs, /**< Side-by-side */
libvlc_video_multiview_stereo_tb, /**< Top-bottom */
libvlc_video_multiview_stereo_row, /**< Row sequential */
libvlc_video_multiview_stereo_col, /**< Column sequential */
libvlc_video_multiview_stereo_frame, /**< Frame sequential */
libvlc_video_multiview_stereo_checkerboard, /**< Checkerboard pattern */
} libvlc_video_multiview_t;
# ifdef __cplusplus
} // extern "C"
# endif
#endif

55
Libs/vlc/vlc.h Normal file
View file

@ -0,0 +1,55 @@
/*****************************************************************************
* vlc.h: global header for libvlc
*****************************************************************************
* Copyright (C) 1998-2008 VLC authors and VideoLAN
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
* Gildas Bazin <gbazin@netcourrier.com>
* Derk-Jan Hartman <hartman at videolan dot org>
* Pierre d'Herbemont <pdherbemont@videolan.org>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#ifndef VLC_VLC_H
#define VLC_VLC_H 1
/**
* \file
* This file defines libvlc new external API
*/
# ifdef __cplusplus
extern "C" {
# endif
#include "libvlc.h"
#include "libvlc_renderer_discoverer.h"
#include "libvlc_picture.h"
#include "libvlc_media.h"
#include "libvlc_media_player.h"
#include "libvlc_media_list.h"
#include "libvlc_media_list_player.h"
#include "libvlc_media_discoverer.h"
#include "libvlc_events.h"
#include "libvlc_dialog.h"
#include "libvlc_version.h"
# ifdef __cplusplus
}
# endif
#endif /* _VLC_VLC_H */

BIN
Libs/vlc/x64/libvlc.dll Normal file

Binary file not shown.

BIN
Libs/vlc/x64/libvlc.lib Normal file

Binary file not shown.

BIN
Libs/vlc/x64/libvlccore.dll Normal file

Binary file not shown.

BIN
Libs/vlc/x64/libvlccore.lib Normal file

Binary file not shown.

BIN
Libs/vlc/x86/libvlc.dll Normal file

Binary file not shown.

BIN
Libs/vlc/x86/libvlc.lib Normal file

Binary file not shown.

BIN
Libs/vlc/x86/libvlccore.dll Normal file

Binary file not shown.

BIN
Libs/vlc/x86/libvlccore.lib Normal file

Binary file not shown.

View file

@ -8,9 +8,7 @@
- Support for high framerate, antialiasing, mipmapping, and SSAO.
- Full diagonal geometry support.
- Uncapped map size.
- A streamlined player control scheme..
Contributions are welcome. If you would like to participate in development to any degree, whether that be through suggestions, bug reports, or code, join our [Discord server](https://discord.gg/h5tUYFmres).
- A streamlined player control scheme.
*Tomb Engine* is used in conjunction with *Tomb Editor*. The repository can be found [here](https://github.com/MontyTRC89/Tomb-Editor).
@ -36,6 +34,9 @@ Steps:
Once done, you should be able to build a level with *Tomb Editor* and run it in *TEN*.
# Disclaimer
This community project is unaffiliated with Core Design, Eidos Interactive, or Embracer Group AB. *Tomb Raider* is a registered trademark of Embracer Group AB. *Tomb Engine* is not for sale. The code is open-source to encourage contributions and for study purposes. We are not responsible for illegal uses of this source code. This source code is released as-is and continues to be maintained by non-paid contributors in their free time.
# Contributions
Contributions are welcome. If you would like to participate in development to any degree, whether that be through suggestions, bug reports, or code, join our [Discord server](https://discord.gg/h5tUYFmres).
# Disclaimer
Tomb Engine uses modified MIT license for non-commercial use only. For more information, see [license](LICENSE). Tomb Engine is unaffiliated with Core Design, Eidos Interactive, or Embracer Group AB. *Tomb Raider* is a registered trademark of Embracer Group AB. Tomb Engine source code is open to encourage contributions and for study purposes. Tomb Engine team is not responsible for illegal use of this source code alone or in combination with third-party assets or components. This source code is released as-is and continues to be maintained by non-paid contributors in their free time.

View file

@ -531,9 +531,9 @@ end
-- @tparam Objects.ObjID objectIdBg Object ID for the diary's sprite.
-- @tparam int spriteIdBg SpriteID from the specified object for the diary's sprite.
-- @tparam Color colorBg Color of diary's sprite.
-- @tparam Vec2 pos X,Y position of the bar's background in screen percent (0-100).
-- @tparam Vec2 pos X,Y position of the diary background sprite in screen percent (0-100).
-- @tparam float rot rotation of the diary's sprite (0-360).
-- @tparam Vec2 scale X,Y Scaling factor for the bar's background sprite.
-- @tparam Vec2 scale X,Y Scaling factor for the diary background sprite.
-- @tparam View.AlignMode alignMode Alignment for the diary's sprite.
-- @tparam View.ScaleMode scaleMode Scaling for the diary's sprite.
-- @tparam Effects.BlendID blendMode Blending modes for the diary's sprite.

View file

@ -6,6 +6,11 @@
Flow.SetIntroImagePath("Screens\\main.jpg")
-- Intro video plays right after or instead of intro image, if specified.
-- If you don't want it to appear, just remove this line.
--Flow.SetIntroVideoPath("FMV\\core.mp4")
-- Set overall amount of secrets in game.
-- If set to 0, secrets won't be displayed in statistics.

View file

@ -871,7 +871,6 @@ FireWeaponType FireWeapon(LaraWeaponType weaponType, ItemInfo* targetEntity, Ite
auto ray = Ray(origin, directionNorm);
player.Control.Weapon.HasFired = true;
player.Control.Weapon.Fired = true;
auto vOrigin = GameVector(pos);
short roomNumber = laraItem.RoomNumber;

View file

@ -94,6 +94,8 @@ void AnimateShotgun(ItemInfo& laraItem, LaraWeaponType weaponType)
player.Control.Weapon.Timer = 0.0f;
}
bool hasFired = false;
switch (item.Animation.ActiveState)
{
case WEAPON_STATE_AIM:
@ -168,11 +170,11 @@ void AnimateShotgun(ItemInfo& laraItem, LaraWeaponType weaponType)
switch (weaponType)
{
default:
FireShotgun(laraItem);
hasFired = FireShotgun(laraItem);
break;
case LaraWeaponType::HarpoonGun:
FireHarpoon(laraItem);
hasFired = FireHarpoon(laraItem);
if (!(player.Weapons[(int)LaraWeaponType::HarpoonGun].Ammo->GetCount() % 4) &&
!player.Weapons[(int)weaponType].Ammo->HasInfinite())
@ -183,15 +185,15 @@ void AnimateShotgun(ItemInfo& laraItem, LaraWeaponType weaponType)
break;
case LaraWeaponType::RocketLauncher:
FireRocket(laraItem);
hasFired = FireRocket(laraItem);
break;
case LaraWeaponType::GrenadeLauncher:
FireGrenade(laraItem);
hasFired = FireGrenade(laraItem);
break;
case LaraWeaponType::Crossbow:
FireCrossbow(laraItem);
hasFired = FireCrossbow(laraItem);
break;
case LaraWeaponType::HK:
@ -203,7 +205,7 @@ void AnimateShotgun(ItemInfo& laraItem, LaraWeaponType weaponType)
}
else
{
FireHK(laraItem, false);
hasFired = FireHK(laraItem, false);
player.Control.Weapon.Timer = 1.0f;
item.Animation.TargetState = WEAPON_STATE_RECOIL;
@ -264,7 +266,7 @@ void AnimateShotgun(ItemInfo& laraItem, LaraWeaponType weaponType)
break;
case LaraWeaponType::HarpoonGun:
FireHarpoon(laraItem);
hasFired = FireHarpoon(laraItem);
if (!(player.Weapons[(int)LaraWeaponType::HarpoonGun].Ammo->GetCount() % 4) &&
!player.Weapons[(int)weaponType].Ammo->HasInfinite())
@ -276,14 +278,14 @@ void AnimateShotgun(ItemInfo& laraItem, LaraWeaponType weaponType)
case LaraWeaponType::HK:
if ((weapon.WeaponMode == LaraWeaponTypeCarried::WTYPE_AMMO_2 ||
weapon.WeaponMode == LaraWeaponTypeCarried::WTYPE_AMMO_3) &&
weapon.WeaponMode == LaraWeaponTypeCarried::WTYPE_AMMO_3) &&
player.Control.Weapon.Interval != 0.0f)
{
item.Animation.TargetState = WEAPON_STATE_UNDERWATER_AIM;
}
else
{
FireHK(laraItem, true);
hasFired = FireHK(laraItem, true);
player.Control.Weapon.Timer = 1.0f;
item.Animation.TargetState = WEAPON_STATE_UNDERWATER_RECOIL;
@ -322,6 +324,18 @@ void AnimateShotgun(ItemInfo& laraItem, LaraWeaponType weaponType)
break;
}
if (hasFired)
{
player.Control.Weapon.HasFired = true;
player.RightArm.GunFlash = Weapons[(int)weaponType].FlashTime;
if (weaponType != LaraWeaponType::GrenadeLauncher && weaponType != LaraWeaponType::RocketLauncher)
player.LeftArm.GunSmoke = 20;
SaveGame::Statistics.Level.AmmoUsed++;
SaveGame::Statistics.Game.AmmoUsed++;
}
item.Pose.Position = laraItem.Pose.Position;
item.RoomNumber = laraItem.RoomNumber;
@ -348,13 +362,13 @@ void ReadyShotgun(ItemInfo& laraItem, LaraWeaponType weaponType)
player.RightArm.FrameBase = Objects[GetWeaponObjectID(weaponType)].frameBase;
}
void FireShotgun(ItemInfo& laraItem)
bool FireShotgun(ItemInfo& laraItem)
{
auto& player = *GetLaraInfo(&laraItem);
auto& ammo = GetAmmo(player, LaraWeaponType::Shotgun);
if (!ammo.HasInfinite() && !ammo.GetCount())
return;
return false;
auto armOrient = EulerAngles(
player.LeftArm.Orientation.x,
@ -393,8 +407,6 @@ void FireShotgun(ItemInfo& laraItem)
auto pos = GetJointPosition(&laraItem, LM_RHAND, offset + Vector3::UnitY * CLICK(2));
auto pos2 = GetJointPosition(&laraItem, LM_RHAND, offset);
player.LeftArm.GunSmoke = 32;
if (laraItem.MeshBits != 0)
{
for (int i = 0; i < 7; i++)
@ -406,16 +418,13 @@ void FireShotgun(ItemInfo& laraItem)
}
}
player.RightArm.GunFlash = Weapons[(int)LaraWeaponType::Shotgun].FlashTime;
SoundEffect(SFX_TR4_EXPLOSION1, &laraItem.Pose, TestEnvironment(ENV_FLAG_WATER, &laraItem) ? SoundEnvironment::Underwater : SoundEnvironment::Land);
SoundEffect(Weapons[(int)LaraWeaponType::Shotgun].SampleNum, &laraItem.Pose);
Rumble(0.5f, 0.2f);
SaveGame::Statistics.Level.AmmoUsed++;
SaveGame::Statistics.Game.AmmoUsed++;
}
return hasFired;
}
void DrawShotgun(ItemInfo& laraItem, LaraWeaponType weaponType)
@ -552,8 +561,6 @@ bool FireHarpoon(ItemInfo& laraItem, const std::optional<Pose>& pose)
if (!ammo)
return false;
player.Control.Weapon.HasFired = true;
int itemNumber = CreateItem();
if (itemNumber == NO_VALUE)
return false;
@ -608,14 +615,10 @@ bool FireHarpoon(ItemInfo& laraItem, const std::optional<Pose>& pose)
harpoonItem.HitPoints = HARPOON_TIME;
AddActiveItem(itemNumber);
harpoonItem.ItemFlags[0] = (int)ProjectileType::Harpoon;
Rumble(0.2f, 0.1f);
SaveGame::Statistics.Level.AmmoUsed++;
SaveGame::Statistics.Game.AmmoUsed++;
return true;
}
@ -652,19 +655,17 @@ void HarpoonBoltControl(short itemNumber)
HandleProjectile(harpoonItem, *LaraItem, prevPos, (ProjectileType)harpoonItem.ItemFlags[0], damage);
}
void FireGrenade(ItemInfo& laraItem)
bool FireGrenade(ItemInfo& laraItem)
{
auto& player = *GetLaraInfo(&laraItem);
auto& ammo = GetAmmo(player, LaraWeaponType::GrenadeLauncher);
if (!ammo)
return;
player.Control.Weapon.HasFired = true;
return false;
short itemNumber = CreateItem();
if (itemNumber == NO_VALUE)
return;
return false;
auto& grenadeItem = g_Level.Items[itemNumber];
@ -743,8 +744,7 @@ void FireGrenade(ItemInfo& laraItem)
break;
}
SaveGame::Statistics.Level.AmmoUsed++;
SaveGame::Statistics.Game.AmmoUsed++;
return true;
}
void GrenadeControl(short itemNumber)
@ -835,19 +835,17 @@ void GrenadeControl(short itemNumber)
HandleProjectile(grenadeItem, *LaraItem, prevPos, (ProjectileType)grenadeItem.ItemFlags[0], Weapons[(int)LaraWeaponType::GrenadeLauncher].Damage);
}
void FireRocket(ItemInfo& laraItem)
bool FireRocket(ItemInfo& laraItem)
{
auto& player = *GetLaraInfo(&laraItem);
auto& ammo = GetAmmo(player, LaraWeaponType::RocketLauncher);
if (!ammo)
return;
player.Control.Weapon.HasFired = true;
return false;
short itemNumber = CreateItem();
if (itemNumber == NO_VALUE)
return;
return false;
auto& rocketItem = g_Level.Items[itemNumber];
rocketItem.ObjectNumber = ID_ROCKET;
@ -905,8 +903,7 @@ void FireRocket(ItemInfo& laraItem)
Rumble(0.4f, 0.3f);
SoundEffect(SFX_TR4_EXPLOSION1, &laraItem.Pose);
SaveGame::Statistics.Level.AmmoUsed++;
SaveGame::Statistics.Game.AmmoUsed++;
return true;
}
void RocketControl(short itemNumber)
@ -974,19 +971,17 @@ void RocketControl(short itemNumber)
HandleProjectile(rocketItem, *LaraItem, prevPos, ProjectileType::Explosive, Weapons[(int)LaraWeaponType::RocketLauncher].Damage);
}
void FireCrossbow(ItemInfo& laraItem, const std::optional<Pose>& pose)
bool FireCrossbow(ItemInfo& laraItem, const std::optional<Pose>& pose)
{
auto& player = *GetLaraInfo(&laraItem);
auto& ammo = GetAmmo(player, LaraWeaponType::Crossbow);
if (!ammo)
return;
player.Control.Weapon.HasFired = true;
return false;
short itemNumber = CreateItem();
if (itemNumber == NO_VALUE)
return;
return false;
auto& boltItem = g_Level.Items[itemNumber];
boltItem.ObjectNumber = ID_CROSSBOW_BOLT;
@ -1059,8 +1054,7 @@ void FireCrossbow(ItemInfo& laraItem, const std::optional<Pose>& pose)
Rumble(0.2f, 0.1f);
SoundEffect(SFX_TR4_CROSSBOW_FIRE, &laraItem.Pose);
SaveGame::Statistics.Level.AmmoUsed++;
SaveGame::Statistics.Game.AmmoUsed++;
return true;
}
void FireCrossBowFromLaserSight(ItemInfo& laraItem, GameVector* origin, GameVector* target)
@ -1092,7 +1086,7 @@ void CrossbowBoltControl(short itemNumber)
HandleProjectile(boltItem, *LaraItem, prevPos, (ProjectileType)boltItem.ItemFlags[0], damage);
}
void FireHK(ItemInfo& laraItem, bool inaccurateMode)
bool FireHK(ItemInfo& laraItem, bool inaccurateMode)
{
auto& player = *GetLaraInfo(&laraItem);
const auto& weapon = player.Weapons[(int)LaraWeaponType::HK];
@ -1134,19 +1128,19 @@ void FireHK(ItemInfo& laraItem, bool inaccurateMode)
Weapons[(int)LaraWeaponType::HK].Damage = damage / 3;
}
if (FireWeapon(LaraWeaponType::HK, player.TargetEntity, laraItem, angles) != FireWeaponType::NoAmmo)
bool hasFired = FireWeapon(LaraWeaponType::HK, player.TargetEntity, laraItem, angles) != FireWeaponType::NoAmmo;
if (hasFired)
{
player.LeftArm.GunSmoke = 12;
TriggerGunShell(1, ID_GUNSHELL, LaraWeaponType::HK);
player.RightArm.GunFlash = Weapons[(int)LaraWeaponType::HK].FlashTime;
Rumble(0.2f, 0.1f);
}
// HACK: Restore accuracy/damage values.
Weapons[(int)LaraWeaponType::HK].ShotAccuracy = accuracy;
Weapons[(int)LaraWeaponType::HK].Damage = damage;
return hasFired;
}
void LasersightWeaponHandler(ItemInfo& item, LaraWeaponType weaponType)
@ -1195,6 +1189,9 @@ void LasersightWeaponHandler(ItemInfo& item, LaraWeaponType weaponType)
}
else if (player.Control.Weapon.GunType == LaraWeaponType::HK)
{
SaveGame::Statistics.Level.AmmoUsed++;
SaveGame::Statistics.Game.AmmoUsed++;
bool playSound = false;
if (weapon.WeaponMode == LaraWeaponTypeCarried::WTYPE_AMMO_3)
@ -1283,16 +1280,17 @@ void RifleHandler(ItemInfo& laraItem, LaraWeaponType weaponType)
auto color = Color(settings.FlashColor);
color += Color(Random::GenerateFloat(-0.2f, 0.2f));
if (weaponType == LaraWeaponType::Shotgun || weaponType == LaraWeaponType::HK)
{
auto pos = GetJointPosition(&laraItem, LM_RHAND, Vector3i(0, -64, 0));
SpawnDynamicPointLight(pos.ToVector3(), color, CLICK(settings.FlashRange));
}
else if (weaponType == LaraWeaponType::Revolver)
if (weaponType == LaraWeaponType::Revolver)
{
auto pos = GetJointPosition(&laraItem, LM_RHAND, Vector3i(0, -32, 0));
SpawnDynamicPointLight(pos.ToVector3(), color, CLICK(settings.FlashRange));
}
else
{
auto pos = GetJointPosition(&laraItem, LM_RHAND, Vector3i(0, -64, 0));
SpawnDynamicPointLight(pos.ToVector3(), color, CLICK(settings.FlashRange));
}
}
}

View file

@ -28,7 +28,7 @@ enum class ProjectileType
void AnimateShotgun(ItemInfo& laraItem, LaraWeaponType weaponType);
void ReadyShotgun(ItemInfo& laraItem, LaraWeaponType weaponType);
void FireShotgun(ItemInfo& laraItem);
bool FireShotgun(ItemInfo& laraItem);
void DrawShotgun(ItemInfo& laraItem, LaraWeaponType weaponType);
void UndrawShotgun(ItemInfo& laraItem, LaraWeaponType weaponType);
void DrawShotgunMeshes(ItemInfo& laraItem, LaraWeaponType weaponType);
@ -36,16 +36,15 @@ void UndrawShotgunMeshes(ItemInfo& laraItem, LaraWeaponType weaponType);
bool FireHarpoon(ItemInfo& laraItem, const std::optional<Pose>& pose = std::nullopt);
void HarpoonBoltControl(short itemNumber);
void FireGrenade(ItemInfo& laraItem);
bool FireGrenade(ItemInfo& laraItem);
void GrenadeControl(short itemNumber);
void FireRocket(ItemInfo& laraItem);
void FireRocket(ItemInfo& laraItem);
bool FireRocket(ItemInfo& laraItem);
void RocketControl(short itemNumber);
void FireCrossbow(ItemInfo& laraItem, const std::optional<Pose>& pose = std::nullopt);
bool FireCrossbow(ItemInfo& laraItem, const std::optional<Pose>& pose = std::nullopt);
void FireCrossBowFromLaserSight(ItemInfo& laraItem, GameVector* origin, GameVector* target);
void CrossbowBoltControl(short itemNumber);
void FireHK(ItemInfo& laraItem, bool inaccurateMode);
bool FireHK(ItemInfo& laraItem, bool inaccurateMode);
void RifleHandler(ItemInfo& laraItem, LaraWeaponType weaponType);
void LasersightWeaponHandler(ItemInfo& item, LaraWeaponType weaponType);

View file

@ -1218,7 +1218,6 @@ struct WeaponControlData
short WeaponItem = -1;
bool HasFired = false;
bool Fired = false;
bool UziLeft = false;
bool UziRight = false;

View file

@ -971,7 +971,8 @@ void TargetBox(LOTInfo* LOT, int boxNumber)
{
if (boxNumber == NO_VALUE)
return;
auto* box = &g_Level.PathfindingBoxes[boxNumber];
const auto* box = &g_Level.PathfindingBoxes[boxNumber];
// Maximize target precision. DO NOT change bracket precedence!
LOT->Target.x = (int)((box->top * BLOCK(1)) + (float)GetRandomControl() * (((float)(box->bottom - box->top) - 1.0f) / 32.0f) + CLICK(2.0f));
@ -1637,9 +1638,9 @@ void CreatureMood(ItemInfo* item, AI_INFO* AI, bool isViolent)
auto* enemy = creature->Enemy;
// HACK: Fallback to bored mood from attack mood if enemy was cleared.
// HACK: Fallback to bored mood from attack or escape mood if enemy was cleared.
// Replaces previous "fix" with early exit, because it was breaking friendly NPC pathfinding. -- Lwmte, 24.03.25
if (enemy == nullptr && creature->Mood == MoodType::Attack)
if (enemy == nullptr && (creature->Mood == MoodType::Attack || creature->Mood == MoodType::Escape))
creature->Mood = MoodType::Bored;
int boxNumber;

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