mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-04-28 15:57:59 +03:00
Merge branch 'develop' into develop_water
This commit is contained in:
commit
89913f785c
48 changed files with 369 additions and 295 deletions
12
CHANGELOG.md
12
CHANGELOG.md
|
@ -9,6 +9,18 @@ TombEngine releases are located in this repository (alongside with Tomb Editor):
|
||||||
* Fixed crashes when shooting, if gunflash or gunshell objects are not present in a level.
|
* Fixed crashes when shooting, if gunflash or gunshell objects are not present in a level.
|
||||||
* Fixed Teleporter object.
|
* Fixed Teleporter object.
|
||||||
* Fixed Wraith objects not working correctly in flipped rooms.
|
* Fixed Wraith objects not working correctly in flipped rooms.
|
||||||
|
* Fixed lensflare enabled status not saved in a 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 HK sound effects.
|
||||||
|
|
||||||
|
### New features
|
||||||
|
* Added muzzle glow effect for firearms.
|
||||||
|
|
||||||
|
### Lua API changes
|
||||||
|
* Added `muzzleGlow` and `muzzleOffset` parameters to 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
|
## [Version 1.8.1](https://github.com/TombEngine/TombEditorReleases/releases/tag/v1.8.1) - 2025-03-29
|
||||||
|
|
||||||
|
|
|
@ -846,7 +846,7 @@ end
|
||||||
function build_arg_list (names,pmods)
|
function build_arg_list (names,pmods)
|
||||||
-- build up the string representation of the argument list,
|
-- build up the string representation of the argument list,
|
||||||
-- using any opt and optchain modifiers if present.
|
-- using any opt and optchain modifiers if present.
|
||||||
-- For instance, '(a [, b])' if b is marked as optional
|
-- For instance, '(a, [b])' if b is marked as optional
|
||||||
-- with @param[opt] b
|
-- with @param[opt] b
|
||||||
local buffer, npending = { }, 0
|
local buffer, npending = { }, 0
|
||||||
local function acc(x) table.insert(buffer, x) end
|
local function acc(x) table.insert(buffer, x) end
|
||||||
|
@ -868,20 +868,17 @@ function build_arg_list (names,pmods)
|
||||||
local opt
|
local opt
|
||||||
if m then
|
if m then
|
||||||
if not m.optchain then
|
if not m.optchain then
|
||||||
acc ((']'):rep(npending))
|
|
||||||
npending=0
|
npending=0
|
||||||
end
|
end
|
||||||
opt = m.optchain or m.opt
|
opt = m.optchain or m.opt
|
||||||
if opt then
|
|
||||||
acc('[')
|
|
||||||
npending=npending+1
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
if i>1 then acc (', ') end
|
if i>1 then acc (', ') end
|
||||||
|
if opt then
|
||||||
|
acc('[' .. names[i] .. ']')
|
||||||
|
else
|
||||||
acc(names[i])
|
acc(names[i])
|
||||||
if opt and opt ~= true then acc('='..opt) end
|
|
||||||
end
|
end
|
||||||
acc ((']'):rep(npending))
|
end
|
||||||
return '('..table.concat(buffer)..')'
|
return '('..table.concat(buffer)..')'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -215,12 +215,12 @@ return [==[
|
||||||
# end
|
# end
|
||||||
$(M(item.params.map[p],item))
|
$(M(item.params.map[p],item))
|
||||||
# if def == true then
|
# if def == true then
|
||||||
(<em>optional</em>)
|
(<em>Optional.</em>)
|
||||||
# elseif def then
|
# elseif def then
|
||||||
(<em>default</em> $(def))
|
(<em>Default.</em> $(def))
|
||||||
# end
|
# end
|
||||||
# if item:readonly(p) then
|
# if item:readonly(p) then
|
||||||
<em>readonly</em>
|
<em>Read-only.</em>
|
||||||
# end
|
# end
|
||||||
</li>
|
</li>
|
||||||
# end
|
# end
|
||||||
|
|
|
@ -140,11 +140,11 @@
|
||||||
<td class="summary">Emit a shockwave, similar to that seen when a harpy projectile hits something.</td>
|
<td class="summary">Emit a shockwave, similar to that seen when a harpy projectile hits something.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" ><a href="#EmitLight">EmitLight(pos[, color][, radius][, shadows][, name])</a></td>
|
<td class="name" ><a href="#EmitLight">EmitLight(pos, [color], [radius], [shadows], [name])</a></td>
|
||||||
<td class="summary">Emit dynamic light that lasts for a single frame.</td>
|
<td class="summary">Emit dynamic light that lasts for a single frame.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" ><a href="#EmitSpotLight">EmitSpotLight(pos, dir[, color][, radius][, falloff][, distance][, shadows][, name])</a></td>
|
<td class="name" ><a href="#EmitSpotLight">EmitSpotLight(pos, dir, [color], [radius], [falloff], [distance], [shadows], [name])</a></td>
|
||||||
<td class="summary">Emit dynamic directional spotlight that lasts for a single frame.</td>
|
<td class="summary">Emit dynamic directional spotlight that lasts for a single frame.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -152,7 +152,7 @@
|
||||||
<td class="summary">Emit blood.</td>
|
<td class="summary">Emit blood.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" ><a href="#EmitAirBubble">EmitAirBubble(pos[, size][, amp])</a></td>
|
<td class="name" ><a href="#EmitAirBubble">EmitAirBubble(pos, [size], [amp])</a></td>
|
||||||
<td class="summary">Emit an air bubble in a water room.</td>
|
<td class="summary">Emit an air bubble in a water room.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -172,7 +172,7 @@
|
||||||
<td class="summary">Get the wind vector for the current game frame.</td>
|
<td class="summary">Get the wind vector for the current game frame.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" ><a href="#EmitStreamer">EmitStreamer(mov, tag, pos, dir[, rot][, startColor][, endColor][, width][, life][, vel][, expRate][, rotRate][, edgeFeatherMode][, lengthFeatherMode][, blendID])</a></td>
|
<td class="name" ><a href="#EmitStreamer">EmitStreamer(mov, tag, pos, dir, [rot], [startColor], [endColor], [width], [life], [vel], [expRate], [rotRate], [edgeFeatherMode], [lengthFeatherMode], [blendID])</a></td>
|
||||||
<td class="summary">Emit an extending streamer effect.</td>
|
<td class="summary">Emit an extending streamer effect.</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
@ -454,7 +454,7 @@ EmitAdvancedParticle(particle)</pre>
|
||||||
</dd>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "EmitLight"></a>
|
<a name = "EmitLight"></a>
|
||||||
<strong>EmitLight(pos[, color][, radius][, shadows][, name])</strong>
|
<strong>EmitLight(pos, [color], [radius], [shadows], [name])</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Emit dynamic light that lasts for a single frame.
|
Emit dynamic light that lasts for a single frame.
|
||||||
|
@ -471,22 +471,22 @@ EmitAdvancedParticle(particle)</pre>
|
||||||
<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>
|
<span class="types"><a class="type" href="../3 primitive classes/Color.html#">Color</a></span>
|
||||||
light color (default Color(255, 255, 255))
|
light color (default Color(255, 255, 255))
|
||||||
(<em>optional</em>)
|
<em>Optional.</em>
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">radius</span>
|
<li><span class="parameter">radius</span>
|
||||||
<span class="types"><span class="type">int</span></span>
|
<span class="types"><span class="type">int</span></span>
|
||||||
measured in "clicks" or 256 world units (default 20)
|
measured in "clicks" or 256 world units (default 20)
|
||||||
(<em>optional</em>)
|
<em>Optional.</em>
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">shadows</span>
|
<li><span class="parameter">shadows</span>
|
||||||
<span class="types"><span class="type">bool</span></span>
|
<span class="types"><span class="type">bool</span></span>
|
||||||
determines whether light should generate dynamic shadows for applicable moveables (default is false)
|
determines whether light should generate dynamic shadows for applicable moveables (default is false)
|
||||||
(<em>optional</em>)
|
<em>Optional.</em>
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">name</span>
|
<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>
|
<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>)
|
<em>Optional.</em>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
@ -497,7 +497,7 @@ EmitAdvancedParticle(particle)</pre>
|
||||||
</dd>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "EmitSpotLight"></a>
|
<a name = "EmitSpotLight"></a>
|
||||||
<strong>EmitSpotLight(pos, dir[, color][, radius][, falloff][, distance][, shadows][, name])</strong>
|
<strong>EmitSpotLight(pos, dir, [color], [radius], [falloff], [distance], [shadows], [name])</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Emit dynamic directional spotlight that lasts for a single frame.
|
Emit dynamic directional spotlight that lasts for a single frame.
|
||||||
|
@ -518,32 +518,32 @@ EmitAdvancedParticle(particle)</pre>
|
||||||
<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>
|
<span class="types"><a class="type" href="../3 primitive classes/Color.html#">Color</a></span>
|
||||||
(default Color(255, 255, 255))
|
(default Color(255, 255, 255))
|
||||||
(<em>optional</em>)
|
<em>Optional.</em>
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">radius</span>
|
<li><span class="parameter">radius</span>
|
||||||
<span class="types"><span class="type">int</span></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)
|
overall radius at the endpoint of a light cone, measured in "clicks" or 256 world units (default 10)
|
||||||
(<em>optional</em>)
|
<em>Optional.</em>
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">falloff</span>
|
<li><span class="parameter">falloff</span>
|
||||||
<span class="types"><span class="type">int</span></span>
|
<span class="types"><span class="type">int</span></span>
|
||||||
radius, at which light starts to fade out, measured in "clicks" (default 5)
|
radius, at which light starts to fade out, measured in "clicks" (default 5)
|
||||||
(<em>optional</em>)
|
<em>Optional.</em>
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">distance</span>
|
<li><span class="parameter">distance</span>
|
||||||
<span class="types"><span class="type">int</span></span>
|
<span class="types"><span class="type">int</span></span>
|
||||||
distance, at which light cone fades out, measured in "clicks" (default 20)
|
distance, at which light cone fades out, measured in "clicks" (default 20)
|
||||||
(<em>optional</em>)
|
<em>Optional.</em>
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">shadows</span>
|
<li><span class="parameter">shadows</span>
|
||||||
<span class="types"><span class="type">bool</span></span>
|
<span class="types"><span class="type">bool</span></span>
|
||||||
determines whether light should generate dynamic shadows for applicable moveables (default is false)
|
determines whether light should generate dynamic shadows for applicable moveables (default is false)
|
||||||
(<em>optional</em>)
|
<em>Optional.</em>
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">name</span>
|
<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>
|
<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>)
|
<em>Optional.</em>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
@ -582,7 +582,7 @@ EmitAdvancedParticle(particle)</pre>
|
||||||
</dd>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "EmitAirBubble"></a>
|
<a name = "EmitAirBubble"></a>
|
||||||
<strong>EmitAirBubble(pos[, size][, amp])</strong>
|
<strong>EmitAirBubble(pos, [size], [amp])</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Emit an air bubble in a water room.
|
Emit an air bubble in a water room.
|
||||||
|
@ -598,12 +598,12 @@ EmitAdvancedParticle(particle)</pre>
|
||||||
<li><span class="parameter">size</span>
|
<li><span class="parameter">size</span>
|
||||||
<span class="types"><span class="type">float</span></span>
|
<span class="types"><span class="type">float</span></span>
|
||||||
Sprite size. <strong>Default: 32</strong>
|
Sprite size. <strong>Default: 32</strong>
|
||||||
(<em>optional</em>)
|
<em>Optional.</em>
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">amp</span>
|
<li><span class="parameter">amp</span>
|
||||||
<span class="types"><span class="type">float</span></span>
|
<span class="types"><span class="type">float</span></span>
|
||||||
Oscillation amplitude. <strong>Default: 32</strong>
|
Oscillation amplitude. <strong>Default: 32</strong>
|
||||||
(<em>optional</em>)
|
<em>Optional.</em>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
@ -718,7 +718,7 @@ EmitAdvancedParticle(particle)</pre>
|
||||||
</dd>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "EmitStreamer"></a>
|
<a name = "EmitStreamer"></a>
|
||||||
<strong>EmitStreamer(mov, tag, pos, dir[, rot][, startColor][, endColor][, width][, life][, vel][, expRate][, rotRate][, edgeFeatherMode][, lengthFeatherMode][, blendID])</strong>
|
<strong>EmitStreamer(mov, tag, pos, dir, [rot], [startColor], [endColor], [width], [life], [vel], [expRate], [rotRate], [edgeFeatherMode], [lengthFeatherMode], [blendID])</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Emit an extending streamer effect.
|
Emit an extending streamer effect.
|
||||||
|
@ -746,57 +746,57 @@ EmitAdvancedParticle(particle)</pre>
|
||||||
<li><span class="parameter">rot</span>
|
<li><span class="parameter">rot</span>
|
||||||
<span class="types"><span class="type">float</span></span>
|
<span class="types"><span class="type">float</span></span>
|
||||||
Start rotation in degrees. <strong>Default: 0</strong>
|
Start rotation in degrees. <strong>Default: 0</strong>
|
||||||
(<em>optional</em>)
|
<em>Optional.</em>
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">startColor</span>
|
<li><span class="parameter">startColor</span>
|
||||||
<span class="types"><a class="type" href="../3 primitive classes/Color.html#">Color</a></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>
|
Color at the start of life. <strong>Default: Color(255, 255, 255, 255))</strong>
|
||||||
(<em>optional</em>)
|
<em>Optional.</em>
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">endColor</span>
|
<li><span class="parameter">endColor</span>
|
||||||
<span class="types"><a class="type" href="../3 primitive classes/Color.html#">Color</a></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>
|
Color at the end of life. <strong>Default: Color(0, 0, 0, 0))</strong>
|
||||||
(<em>optional</em>)
|
<em>Optional.</em>
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">width</span>
|
<li><span class="parameter">width</span>
|
||||||
<span class="types"><span class="type">float</span></span>
|
<span class="types"><span class="type">float</span></span>
|
||||||
Width in world units. <strong>Default: 0</strong>
|
Width in world units. <strong>Default: 0</strong>
|
||||||
(<em>optional</em>)
|
<em>Optional.</em>
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">life</span>
|
<li><span class="parameter">life</span>
|
||||||
<span class="types"><span class="type">float</span></span>
|
<span class="types"><span class="type">float</span></span>
|
||||||
Lifetime in seconds. <strong>Default: 1</strong>
|
Lifetime in seconds. <strong>Default: 1</strong>
|
||||||
(<em>optional</em>)
|
<em>Optional.</em>
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">vel</span>
|
<li><span class="parameter">vel</span>
|
||||||
<span class="types"><span class="type">float</span></span>
|
<span class="types"><span class="type">float</span></span>
|
||||||
Movement velocity in world units per second. <strong>Default: 0</strong>
|
Movement velocity in world units per second. <strong>Default: 0</strong>
|
||||||
(<em>optional</em>)
|
<em>Optional.</em>
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">expRate</span>
|
<li><span class="parameter">expRate</span>
|
||||||
<span class="types"><span class="type">float</span></span>
|
<span class="types"><span class="type">float</span></span>
|
||||||
Width expansion rate in world units per second. <strong>Default: 0</strong>
|
Width expansion rate in world units per second. <strong>Default: 0</strong>
|
||||||
(<em>optional</em>)
|
<em>Optional.</em>
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">rotRate</span>
|
<li><span class="parameter">rotRate</span>
|
||||||
<span class="types"><span class="type">float</span></span>
|
<span class="types"><span class="type">float</span></span>
|
||||||
Rotation rate in degrees per second. <strong>Default: 0</strong>
|
Rotation rate in degrees per second. <strong>Default: 0</strong>
|
||||||
(<em>optional</em>)
|
<em>Optional.</em>
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">edgeFeatherMode</span>
|
<li><span class="parameter">edgeFeatherMode</span>
|
||||||
<span class="types"><a class="type" href="../4 enums/Effects.StreamerFeatherMode.html#">StreamerFeatherMode</a></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>
|
Edge feather mode. <strong>Default: Effects.StreamerFeatherMode.NONE</strong>
|
||||||
(<em>optional</em>)
|
<em>Optional.</em>
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">lengthFeatherMode</span>
|
<li><span class="parameter">lengthFeatherMode</span>
|
||||||
<span class="types"><a class="type" href="../4 enums/Effects.StreamerFeatherMode.html#">StreamerFeatherMode</a></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>
|
Length feather mode. <strong>UNIMPLEMENTED, currently will always leave a fading tail</strong>
|
||||||
(<em>optional</em>)
|
<em>Optional.</em>
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">blendID</span>
|
<li><span class="parameter">blendID</span>
|
||||||
<span class="types"><a class="type" href="../4 enums/Effects.BlendID.html#">BlendID</a></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>
|
Renderer blend ID. <strong>Default: Effects.BlendID.ALPHA_BLEND</strong>
|
||||||
(<em>optional</em>)
|
<em>Optional.</em>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
@ -831,127 +831,127 @@ EmitAdvancedParticle(particle)</pre>
|
||||||
<li><span class="parameter">spriteSeqID</span>
|
<li><span class="parameter">spriteSeqID</span>
|
||||||
<span class="types"><a class="type" href="../4 enums/Objects.ObjID.html#SpriteConstants">SpriteConstants</a></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. <strong>default: Objects.ObjID.DEFAULT_SPRITES</strong>
|
||||||
(<em>optional</em>)
|
<em>Optional.</em>
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">spriteID</span>
|
<li><span class="parameter">spriteID</span>
|
||||||
<span class="types"><span class="type">int</span></span>
|
<span class="types"><span class="type">int</span></span>
|
||||||
Sprite ID in the sprite sequence slot. <strong>default: 0</strong>
|
Sprite ID in the sprite sequence slot. <strong>default: 0</strong>
|
||||||
(<em>optional</em>)
|
<em>Optional.</em>
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">life</span>
|
<li><span class="parameter">life</span>
|
||||||
<span class="types"><span class="type">float</span></span>
|
<span class="types"><span class="type">float</span></span>
|
||||||
Lifespan in seconds. <strong>default: 2</strong>
|
Lifespan in seconds. <strong>default: 2</strong>
|
||||||
(<em>optional</em>)
|
<em>Optional.</em>
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">maxYVel</span>
|
<li><span class="parameter">maxYVel</span>
|
||||||
<span class="types"><span class="type">float</span></span>
|
<span class="types"><span class="type">float</span></span>
|
||||||
Maximum vertical velocity in world units per second. <strong>default: 0</strong>
|
Maximum vertical velocity in world units per second. <strong>default: 0</strong>
|
||||||
(<em>optional</em>)
|
<em>Optional.</em>
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">gravity</span>
|
<li><span class="parameter">gravity</span>
|
||||||
<span class="types"><span class="type">float</span></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>
|
Effect of gravity in world units per second. Positive value ascend, negative value descend. <strong>default: 0</strong>
|
||||||
(<em>optional</em>)
|
<em>Optional.</em>
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">friction</span>
|
<li><span class="parameter">friction</span>
|
||||||
<span class="types"><span class="type">float</span></span>
|
<span class="types"><span class="type">float</span></span>
|
||||||
Friction affecting velocity over time in world units per second. <strong>default: 0</strong>
|
Friction affecting velocity over time in world units per second. <strong>default: 0</strong>
|
||||||
(<em>optional</em>)
|
<em>Optional.</em>
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">startRot</span>
|
<li><span class="parameter">startRot</span>
|
||||||
<span class="types"><span class="type">float</span></span>
|
<span class="types"><span class="type">float</span></span>
|
||||||
Rotation at start of life. <strong>default: random</strong>
|
Rotation at start of life. <strong>default: random</strong>
|
||||||
(<em>optional</em>)
|
<em>Optional.</em>
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">rotVel</span>
|
<li><span class="parameter">rotVel</span>
|
||||||
<span class="types"><span class="type">float</span></span>
|
<span class="types"><span class="type">float</span></span>
|
||||||
Rotational velocity in degrees per second. <strong>default: 0</strong>
|
Rotational velocity in degrees per second. <strong>default: 0</strong>
|
||||||
(<em>optional</em>)
|
<em>Optional.</em>
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">startSize</span>
|
<li><span class="parameter">startSize</span>
|
||||||
<span class="types"><span class="type">float</span></span>
|
<span class="types"><span class="type">float</span></span>
|
||||||
Size at start of life. <strong>default: 10</strong>
|
Size at start of life. <strong>default: 10</strong>
|
||||||
(<em>optional</em>)
|
<em>Optional.</em>
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">endSize</span>
|
<li><span class="parameter">endSize</span>
|
||||||
<span class="types"><span class="type">float</span></span>
|
<span class="types"><span class="type">float</span></span>
|
||||||
Size at end of life. <strong>default: 0</strong>
|
Size at end of life. <strong>default: 0</strong>
|
||||||
(<em>optional</em>)
|
<em>Optional.</em>
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">startColor</span>
|
<li><span class="parameter">startColor</span>
|
||||||
<span class="types"><a class="type" href="../3 primitive classes/Color.html#">Color</a></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. <strong>default: Color(255, 255, 255)</strong>
|
||||||
(<em>optional</em>)
|
<em>Optional.</em>
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">endColor</span>
|
<li><span class="parameter">endColor</span>
|
||||||
<span class="types"><a class="type" href="../3 primitive classes/Color.html#">Color</a></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>
|
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>)
|
<em>Optional.</em>
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">blendMode</span>
|
<li><span class="parameter">blendMode</span>
|
||||||
<span class="types"><a class="type" href="../4 enums/Effects.BlendID.html#">BlendID</a></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>
|
Render blend mode. <strong>default: TEN.Effects.BlendID.ALPHA_BLEND</strong>
|
||||||
(<em>optional</em>)
|
<em>Optional.</em>
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">damage</span>
|
<li><span class="parameter">damage</span>
|
||||||
<span class="types"><span class="type">bool</span></span>
|
<span class="types"><span class="type">bool</span></span>
|
||||||
Harm the player on collision. <strong>default: false</strong>
|
Harm the player on collision. <strong>default: false</strong>
|
||||||
(<em>optional</em>)
|
<em>Optional.</em>
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">poison</span>
|
<li><span class="parameter">poison</span>
|
||||||
<span class="types"><span class="type">bool</span></span>
|
<span class="types"><span class="type">bool</span></span>
|
||||||
Poison the player on collision. <strong>default: false</strong>
|
Poison the player on collision. <strong>default: false</strong>
|
||||||
(<em>optional</em>)
|
<em>Optional.</em>
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">burn</span>
|
<li><span class="parameter">burn</span>
|
||||||
<span class="types"><span class="type">bool</span></span>
|
<span class="types"><span class="type">bool</span></span>
|
||||||
Burn the player on collision. <strong>default: false</strong>
|
Burn the player on collision. <strong>default: false</strong>
|
||||||
(<em>optional</em>)
|
<em>Optional.</em>
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">wind</span>
|
<li><span class="parameter">wind</span>
|
||||||
<span class="types"><span class="type">bool</span></span>
|
<span class="types"><span class="type">bool</span></span>
|
||||||
Affect position by wind in outside rooms. <strong>default: false</strong>
|
Affect position by wind in outside rooms. <strong>default: false</strong>
|
||||||
(<em>optional</em>)
|
<em>Optional.</em>
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">damageHit</span>
|
<li><span class="parameter">damageHit</span>
|
||||||
<span class="types"><span class="type">int</span></span>
|
<span class="types"><span class="type">int</span></span>
|
||||||
Player damage amount on collision. <strong>default: 2</strong>
|
Player damage amount on collision. <strong>default: 2</strong>
|
||||||
(<em>optional</em>)
|
<em>Optional.</em>
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">light</span>
|
<li><span class="parameter">light</span>
|
||||||
<span class="types"><span class="type">bool</span></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>
|
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>)
|
<em>Optional.</em>
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">lightRadius</span>
|
<li><span class="parameter">lightRadius</span>
|
||||||
<span class="types"><span class="type">int</span></span>
|
<span class="types"><span class="type">int</span></span>
|
||||||
Light radius in 1/4 blocks. <strong>default: 0</strong>
|
Light radius in 1/4 blocks. <strong>default: 0</strong>
|
||||||
(<em>optional</em>)
|
<em>Optional.</em>
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">lightFlicker</span>
|
<li><span class="parameter">lightFlicker</span>
|
||||||
<span class="types"><span class="type">int</span></span>
|
<span class="types"><span class="type">int</span></span>
|
||||||
Interval at which the light should flicker. <strong>default: 0</strong>
|
Interval at which the light should flicker. <strong>default: 0</strong>
|
||||||
(<em>optional</em>)
|
<em>Optional.</em>
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">soundID</span>
|
<li><span class="parameter">soundID</span>
|
||||||
<span class="types"><span class="type">int</span></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. CAUTION: Recommended only for a single particle. Too many particles with sounds can overwhelm the sound system. <strong>default: none</strong>
|
||||||
(<em>optional</em>)
|
<em>Optional.</em>
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">animated</span>
|
<li><span class="parameter">animated</span>
|
||||||
<span class="types"><span class="type">bool</span></span>
|
<span class="types"><span class="type">bool</span></span>
|
||||||
Play animates sprite sequence. <strong>default: false</strong>
|
Play animates sprite sequence. <strong>default: false</strong>
|
||||||
(<em>optional</em>)
|
<em>Optional.</em>
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">animType</span>
|
<li><span class="parameter">animType</span>
|
||||||
<span class="types"><a class="type" href="../4 enums/Effects.ParticleAnimationType.html#">ParticleAnimationType</a></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>
|
Animation type of the sprite sequence. <strong>default: TEN.Effects.ParticleAnimationType.LOOP</strong>
|
||||||
(<em>optional</em>)
|
<em>Optional.</em>
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">frameRate</span>
|
<li><span class="parameter">frameRate</span>
|
||||||
<span class="types"><span class="type">float</span></span>
|
<span class="types"><span class="type">float</span></span>
|
||||||
Sprite sequence animation framerate. <strong>default: 1</strong>
|
Sprite sequence animation framerate. <strong>default: 1</strong>
|
||||||
(<em>optional</em>)
|
<em>Optional.</em>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
|
@ -175,7 +175,7 @@ scripts too.</p>
|
||||||
<td class="summary">Returns the level that the game control is running in that moment.</td>
|
<td class="summary">Returns the level that the game control is running in that moment.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" ><a href="#EndLevel">EndLevel([index][, startPos])</a></td>
|
<td class="name" ><a href="#EndLevel">EndLevel([index], [startPos])</a></td>
|
||||||
<td class="summary">Finishes the current level, with optional level index and start position index provided.</td>
|
<td class="summary">Finishes the current level, with optional level index and start position index provided.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -570,7 +570,7 @@ have an ID of 0, the second an ID of 1, and so on.
|
||||||
</dd>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "EndLevel"></a>
|
<a name = "EndLevel"></a>
|
||||||
<strong>EndLevel([index][, startPos])</strong>
|
<strong>EndLevel([index], [startPos])</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Finishes the current level, with optional level index and start position index provided.
|
Finishes the current level, with optional level index and start position index provided.
|
||||||
|
@ -585,12 +585,12 @@ teleported to such object with OCB similar to provided second argument.
|
||||||
<li><span class="parameter">index</span>
|
<li><span class="parameter">index</span>
|
||||||
<span class="types"><span class="type">int</span></span>
|
<span class="types"><span class="type">int</span></span>
|
||||||
level index (default 0)
|
level index (default 0)
|
||||||
(<em>optional</em>)
|
<em>Optional.</em>
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">startPos</span>
|
<li><span class="parameter">startPos</span>
|
||||||
<span class="types"><span class="type">int</span></span>
|
<span class="types"><span class="type">int</span></span>
|
||||||
player start position (default 0)
|
player start position (default 0)
|
||||||
(<em>optional</em>)
|
<em>Optional.</em>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
@ -959,7 +959,7 @@ Must be an integer value (0 means no secrets).
|
||||||
<li><span class="parameter">index</span>
|
<li><span class="parameter">index</span>
|
||||||
<span class="types"><span class="type">int</span></span>
|
<span class="types"><span class="type">int</span></span>
|
||||||
Flipmap group ID to check. If no group specified or group is -1, function returns overall flipmap status (on or off).
|
Flipmap group ID to check. If no group specified or group is -1, function returns overall flipmap status (on or off).
|
||||||
(<em>optional</em>)
|
<em>Optional.</em>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
|
@ -124,7 +124,7 @@
|
||||||
<h2><a href="#Functions">Functions</a></h2>
|
<h2><a href="#Functions">Functions</a></h2>
|
||||||
<table class="function_list">
|
<table class="function_list">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" ><a href="#Vibrate">Vibrate(strength, time)</a></td>
|
<td class="name" ><a href="#Vibrate">Vibrate(strength, [time])</a></td>
|
||||||
<td class="summary">Vibrate the game controller if the function is available and the setting is on.</td>
|
<td class="summary">Vibrate the game controller if the function is available and the setting is on.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -162,7 +162,7 @@
|
||||||
<dl class="function">
|
<dl class="function">
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "Vibrate"></a>
|
<a name = "Vibrate"></a>
|
||||||
<strong>Vibrate(strength, time)</strong>
|
<strong>Vibrate(strength, [time])</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Vibrate the game controller if the function is available and the setting is on.
|
Vibrate the game controller if the function is available and the setting is on.
|
||||||
|
@ -177,7 +177,8 @@
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">time</span>
|
<li><span class="parameter">time</span>
|
||||||
<span class="types"><span class="type">float</span></span>
|
<span class="types"><span class="type">float</span></span>
|
||||||
<strong>(default 0.3)</strong> Vibration time in seconds.
|
Vibration time in seconds.
|
||||||
|
<em>Default: 0.3.</em>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
|
@ -124,11 +124,11 @@
|
||||||
<h2><a href="#Functions">Functions</a></h2>
|
<h2><a href="#Functions">Functions</a></h2>
|
||||||
<table class="function_list">
|
<table class="function_list">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" ><a href="#GiveItem">GiveItem(objectID[, count][, addToPickupSummary])</a></td>
|
<td class="name" ><a href="#GiveItem">GiveItem(objectID, [count], [addToPickupSummary])</a></td>
|
||||||
<td class="summary">Add an item to the player's inventory.</td>
|
<td class="summary">Add an item to the player's inventory.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" ><a href="#TakeItem">TakeItem(Object[, count])</a></td>
|
<td class="name" ><a href="#TakeItem">TakeItem(Object, [count])</a></td>
|
||||||
<td class="summary">Remove an item from the player's inventory.</td>
|
<td class="summary">Remove an item from the player's inventory.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -162,7 +162,7 @@
|
||||||
<dl class="function">
|
<dl class="function">
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "GiveItem"></a>
|
<a name = "GiveItem"></a>
|
||||||
<strong>GiveItem(objectID[, count][, addToPickupSummary])</strong>
|
<strong>GiveItem(objectID, [count], [addToPickupSummary])</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Add an item to the player's inventory.
|
Add an item to the player's inventory.
|
||||||
|
@ -178,12 +178,12 @@
|
||||||
<li><span class="parameter">count</span>
|
<li><span class="parameter">count</span>
|
||||||
<span class="types"><span class="type">int</span></span>
|
<span class="types"><span class="type">int</span></span>
|
||||||
The amount of items to add. Default is the yield from a single pickup, e.g. 1 from a medipack, 12 from a flare pack.
|
The amount of items to add. Default is the yield from a single pickup, e.g. 1 from a medipack, 12 from a flare pack.
|
||||||
(<em>optional</em>)
|
<em>Optional.</em>
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">addToPickupSummary</span>
|
<li><span class="parameter">addToPickupSummary</span>
|
||||||
<span class="types"><span class="type">bool</span></span>
|
<span class="types"><span class="type">bool</span></span>
|
||||||
If true, display the item in the pickup summary. Default is false.
|
If true, display the item in the pickup summary. Default is false.
|
||||||
(<em>optional</em>)
|
<em>Optional.</em>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
@ -194,7 +194,7 @@
|
||||||
</dd>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "TakeItem"></a>
|
<a name = "TakeItem"></a>
|
||||||
<strong>TakeItem(Object[, count])</strong>
|
<strong>TakeItem(Object, [count])</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Remove an item from the player's inventory.
|
Remove an item from the player's inventory.
|
||||||
|
@ -210,7 +210,7 @@
|
||||||
<li><span class="parameter">count</span>
|
<li><span class="parameter">count</span>
|
||||||
<span class="types"><span class="type">int</span></span>
|
<span class="types"><span class="type">int</span></span>
|
||||||
The amount of items to remove. Default is the yield from a single pickup, e.g. 1 from a medipack, 12 from a flare pack.
|
The amount of items to remove. Default is the yield from a single pickup, e.g. 1 from a medipack, 12 from a flare pack.
|
||||||
(<em>optional</em>)
|
<em>Optional.</em>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
|
@ -144,7 +144,7 @@
|
||||||
<td class="summary">Get current loudness level for specified track type.</td>
|
<td class="summary">Get current loudness level for specified track type.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" ><a href="#PlaySound">PlaySound(soundID[, position])</a></td>
|
<td class="name" ><a href="#PlaySound">PlaySound(soundID, [position])</a></td>
|
||||||
<td class="summary">Play sound effect.</td>
|
<td class="summary">Play sound effect.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -291,7 +291,7 @@
|
||||||
</dd>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "PlaySound"></a>
|
<a name = "PlaySound"></a>
|
||||||
<strong>PlaySound(soundID[, position])</strong>
|
<strong>PlaySound(soundID, [position])</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Play sound effect.
|
Play sound effect.
|
||||||
|
@ -307,7 +307,7 @@
|
||||||
<li><span class="parameter">position</span>
|
<li><span class="parameter">position</span>
|
||||||
<span class="types"><a class="type" href="../3 primitive classes/Vec3.html#">Vec3</a></span>
|
<span class="types"><a class="type" href="../3 primitive classes/Vec3.html#">Vec3</a></span>
|
||||||
The 3D position of the sound, i.e. where the sound "comes from". If not given, the sound will not be positional.
|
The 3D position of the sound, i.e. where the sound "comes from". If not given, the sound will not be positional.
|
||||||
(<em>optional</em>)
|
<em>Optional.</em>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
|
@ -152,7 +152,7 @@
|
||||||
<td class="summary">Pick a static mesh by the given display position.</td>
|
<td class="summary">Pick a static mesh by the given display position.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<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>
|
<td class="summary">Write messages within the Log file</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
@ -414,7 +414,7 @@ To be used with <a href="../2 classes/Strings.DisplayString.html#DisplayString:G
|
||||||
</dd>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "PrintLog"></a>
|
<a name = "PrintLog"></a>
|
||||||
<strong>PrintLog(message, logLevel[, allowSpam])</strong>
|
<strong>PrintLog(message, logLevel, [allowSpam])</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Write messages within the Log file
|
Write messages within the Log file
|
||||||
|
@ -439,7 +439,7 @@ To be used with <a href="../2 classes/Strings.DisplayString.html#DisplayString:G
|
||||||
<li><span class="parameter">allowSpam</span>
|
<li><span class="parameter">allowSpam</span>
|
||||||
<span class="types"><span class="type">bool</span></span>
|
<span class="types"><span class="type">bool</span></span>
|
||||||
true allows spamming of the message
|
true allows spamming of the message
|
||||||
(<em>optional</em>)
|
<em>Optional.</em>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
|
@ -176,11 +176,11 @@
|
||||||
<td class="summary">Play a flyby sequence.</td>
|
<td class="summary">Play a flyby sequence.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" ><a href="#GetFlybyPosition">GetFlybyPosition(seqID, progress[, loop])</a></td>
|
<td class="name" ><a href="#GetFlybyPosition">GetFlybyPosition(seqID, progress, [loop])</a></td>
|
||||||
<td class="summary">Get a flyby sequence's position at a specified progress point in percent.</td>
|
<td class="summary">Get a flyby sequence's position at a specified progress point in percent.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" ><a href="#GetFlybyRotation">GetFlybyRotation(seqID, progress[, loop])</a></td>
|
<td class="name" ><a href="#GetFlybyRotation">GetFlybyRotation(seqID, progress, [loop])</a></td>
|
||||||
<td class="summary">Get a flyby sequence's rotation at a specified progress point in percent.</td>
|
<td class="summary">Get a flyby sequence's rotation at a specified progress point in percent.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -499,7 +499,7 @@
|
||||||
</dd>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "GetFlybyPosition"></a>
|
<a name = "GetFlybyPosition"></a>
|
||||||
<strong>GetFlybyPosition(seqID, progress[, loop])</strong>
|
<strong>GetFlybyPosition(seqID, progress, [loop])</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Get a flyby sequence's position at a specified progress point in percent.
|
Get a flyby sequence's position at a specified progress point in percent.
|
||||||
|
@ -519,7 +519,7 @@
|
||||||
<li><span class="parameter">loop</span>
|
<li><span class="parameter">loop</span>
|
||||||
<span class="types"><span class="type">bool</span></span>
|
<span class="types"><span class="type">bool</span></span>
|
||||||
Smooth the position near start and end points, as if the sequence is looped.
|
Smooth the position near start and end points, as if the sequence is looped.
|
||||||
(<em>optional</em>)
|
<em>Optional.</em>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
@ -536,7 +536,7 @@
|
||||||
</dd>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "GetFlybyRotation"></a>
|
<a name = "GetFlybyRotation"></a>
|
||||||
<strong>GetFlybyRotation(seqID, progress[, loop])</strong>
|
<strong>GetFlybyRotation(seqID, progress, [loop])</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Get a flyby sequence's rotation at a specified progress point in percent.
|
Get a flyby sequence's rotation at a specified progress point in percent.
|
||||||
|
@ -556,7 +556,7 @@
|
||||||
<li><span class="parameter">loop</span>
|
<li><span class="parameter">loop</span>
|
||||||
<span class="types"><span class="type">bool</span></span>
|
<span class="types"><span class="type">bool</span></span>
|
||||||
Smooth the position near start and end points, as if the sequence is looped.
|
Smooth the position near start and end points, as if the sequence is looped.
|
||||||
(<em>optional</em>)
|
<em>Optional.</em>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
|
@ -122,7 +122,7 @@
|
||||||
<h2><a href="#Functions">Functions</a></h2>
|
<h2><a href="#Functions">Functions</a></h2>
|
||||||
<table class="function_list">
|
<table class="function_list">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" ><a href="#Probe">Probe(pos[, roomNumber])</a></td>
|
<td class="name" ><a href="#Probe">Probe(pos, [roomNumber])</a></td>
|
||||||
<td class="summary">Create a Probe at a specified world position in a room.</td>
|
<td class="summary">Create a Probe at a specified world position in a room.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -220,7 +220,7 @@
|
||||||
<dl class="function">
|
<dl class="function">
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "Probe"></a>
|
<a name = "Probe"></a>
|
||||||
<strong>Probe(pos[, roomNumber])</strong>
|
<strong>Probe(pos, [roomNumber])</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Create a Probe at a specified world position in a room.
|
Create a Probe at a specified world position in a room.
|
||||||
|
@ -236,7 +236,7 @@
|
||||||
<li><span class="parameter">roomNumber</span>
|
<li><span class="parameter">roomNumber</span>
|
||||||
<span class="types"><span class="type">int</span></span>
|
<span class="types"><span class="type">int</span></span>
|
||||||
Room number. Must be used if probing a position in an overlapping room.
|
Room number. Must be used if probing a position in an overlapping room.
|
||||||
(<em>optional</em>)
|
<em>Optional.</em>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
|
@ -300,9 +300,17 @@
|
||||||
<td class="summary">Display muzzle flash.</td>
|
<td class="summary">Display muzzle flash.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
<td class="name" ><a href="#muzzleGlow">muzzleGlow</a></td>
|
||||||
|
<td class="summary">Display muzzle glow.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
<td class="name" ><a href="#colorizeMuzzleFlash">colorizeMuzzleFlash</a></td>
|
<td class="name" ><a href="#colorizeMuzzleFlash">colorizeMuzzleFlash</a></td>
|
||||||
<td class="summary">Colorize muzzle flash.</td>
|
<td class="summary">Colorize muzzle flash.</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="name" ><a href="#muzzleOffset">muzzleOffset</a></td>
|
||||||
|
<td class="summary">Muzzle offset.</td>
|
||||||
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<h2><a href="#System">System </a></h2>
|
<h2><a href="#System">System </a></h2>
|
||||||
<table class="function_list">
|
<table class="function_list">
|
||||||
|
@ -1214,6 +1222,27 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt>
|
||||||
|
<a name = "muzzleGlow"></a>
|
||||||
|
<strong>muzzleGlow</strong>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
Display muzzle glow.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<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.
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "colorizeMuzzleFlash"></a>
|
<a name = "colorizeMuzzleFlash"></a>
|
||||||
|
@ -1235,6 +1264,27 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt>
|
||||||
|
<a name = "muzzleOffset"></a>
|
||||||
|
<strong>muzzleOffset</strong>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
Muzzle offset.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<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.
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
<h2 class="section-header has-description"><a name="System"></a>System </h2>
|
<h2 class="section-header has-description"><a name="System"></a>System </h2>
|
||||||
|
|
|
@ -330,7 +330,7 @@
|
||||||
<li><span class="parameter">Target</span>
|
<li><span class="parameter">Target</span>
|
||||||
<span class="types"><span class="type">Moveable</span></span>
|
<span class="types"><span class="type">Moveable</span></span>
|
||||||
If you put a moveable, the camera will look at it. Otherwise, it will look at Lara.
|
If you put a moveable, the camera will look at it. Otherwise, it will look at Lara.
|
||||||
(<em>optional</em>)
|
<em>Optional.</em>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
|
@ -229,7 +229,7 @@
|
||||||
<li><span class="parameter">poison</span>
|
<li><span class="parameter">poison</span>
|
||||||
<span class="types"><span class="type">int</span></span>
|
<span class="types"><span class="type">int</span></span>
|
||||||
Poison strength. Maximum value is 128 (default 0)
|
Poison strength. Maximum value is 128 (default 0)
|
||||||
(<em>optional</em>)
|
<em>Optional.</em>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
|
@ -166,13 +166,13 @@
|
||||||
<td class="summary">Get the moveable's position</td>
|
<td class="summary">Get the moveable's position</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" ><a href="#Moveable:SetPosition">Moveable:SetPosition(position[, updateRoom])</a></td>
|
<td class="name" ><a href="#Moveable:SetPosition">Moveable:SetPosition(position, [updateRoom])</a></td>
|
||||||
<td class="summary">Set the moveable's position
|
<td class="summary">Set the moveable's position
|
||||||
If you are moving a moveable whose behaviour involves knowledge of room geometry,
|
If you are moving a moveable whose behaviour involves knowledge of room geometry,
|
||||||
(e.g.</td>
|
(e.g.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" ><a href="#Moveable:GetJointPosition">Moveable:GetJointPosition(jointID[, offset])</a></td>
|
<td class="name" ><a href="#Moveable:GetJointPosition">Moveable:GetJointPosition(jointIndex, [offset])</a></td>
|
||||||
<td class="summary">Get the moveable's joint position with an optional relative offset.</td>
|
<td class="summary">Get the moveable's joint position with an optional relative offset.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -217,11 +217,11 @@
|
||||||
<td class="summary">Set OCB (object code bit) of the moveable</td>
|
<td class="summary">Set OCB (object code bit) of the moveable</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" ><a href="#Moveable:SetEffect">Moveable:SetEffect(effect[, timeout])</a></td>
|
<td class="name" ><a href="#Moveable:SetEffect">Moveable:SetEffect(effect, [timeout])</a></td>
|
||||||
<td class="summary">Set the effect for this moveable.</td>
|
<td class="summary">Set the effect for this moveable.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" ><a href="#Moveable:SetCustomEffect">Moveable:SetCustomEffect(color1, color2[, timeout])</a></td>
|
<td class="name" ><a href="#Moveable:SetCustomEffect">Moveable:SetCustomEffect(color1, color2, [timeout])</a></td>
|
||||||
<td class="summary">Set custom colored burn effect to moveable</td>
|
<td class="summary">Set custom colored burn effect to moveable</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -285,7 +285,7 @@
|
||||||
<td class="summary">Retrieve the index of the current animation.</td>
|
<td class="summary">Retrieve the index of the current animation.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" ><a href="#Moveable:SetAnim">Moveable:SetAnim(index[, slot])</a></td>
|
<td class="name" ><a href="#Moveable:SetAnim">Moveable:SetAnim(index, [slot])</a></td>
|
||||||
<td class="summary">Set the object's animation to the one specified by the given index.</td>
|
<td class="summary">Set the object's animation to the one specified by the given index.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -364,7 +364,7 @@
|
||||||
if it is not swapped.</td>
|
if it is not swapped.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" ><a href="#Moveable:SwapMesh">Moveable:SwapMesh(index, slotIndex[, swapIndex])</a></td>
|
<td class="name" ><a href="#Moveable:SwapMesh">Moveable:SwapMesh(index, slotIndex, [swapIndex])</a></td>
|
||||||
<td class="summary">Set state of specified mesh swap of object
|
<td class="summary">Set state of specified mesh swap of object
|
||||||
Use this to swap specified mesh of an object.</td>
|
Use this to swap specified mesh of an object.</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -741,7 +741,7 @@ baddy:SetOnCollidedWithRoom(LevelFuncs.roomCollided)</pre>
|
||||||
</dd>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "Moveable:SetPosition"></a>
|
<a name = "Moveable:SetPosition"></a>
|
||||||
<strong>Moveable:SetPosition(position[, updateRoom])</strong>
|
<strong>Moveable:SetPosition(position, [updateRoom])</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Set the moveable's position
|
Set the moveable's position
|
||||||
|
@ -760,7 +760,7 @@ baddy:SetOnCollidedWithRoom(LevelFuncs.roomCollided)</pre>
|
||||||
<li><span class="parameter">updateRoom</span>
|
<li><span class="parameter">updateRoom</span>
|
||||||
<span class="types"><span class="type">bool</span></span>
|
<span class="types"><span class="type">bool</span></span>
|
||||||
Will room changes be automatically detected? Set to false if you are using overlapping rooms (default: true)
|
Will room changes be automatically detected? Set to false if you are using overlapping rooms (default: true)
|
||||||
(<em>optional</em>)
|
<em>Optional.</em>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
@ -771,7 +771,7 @@ baddy:SetOnCollidedWithRoom(LevelFuncs.roomCollided)</pre>
|
||||||
</dd>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "Moveable:GetJointPosition"></a>
|
<a name = "Moveable:GetJointPosition"></a>
|
||||||
<strong>Moveable:GetJointPosition(jointID[, offset])</strong>
|
<strong>Moveable:GetJointPosition(jointIndex, [offset])</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Get the moveable's joint position with an optional relative offset.
|
Get the moveable's joint position with an optional relative offset.
|
||||||
|
@ -780,14 +780,14 @@ baddy:SetOnCollidedWithRoom(LevelFuncs.roomCollided)</pre>
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
<h3>Parameters:</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><span class="parameter">jointID</span>
|
<li><span class="parameter">jointIndex</span>
|
||||||
<span class="types"><span class="type">int</span></span>
|
<span class="types"><span class="type">int</span></span>
|
||||||
Joint ID.
|
Index of a joint to get position.
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">offset</span>
|
<li><span class="parameter">offset</span>
|
||||||
<span class="types"><a class="type" href="../3 primitive classes/Vec3.html#">Vec3</a></span>
|
<span class="types"><a class="type" href="../3 primitive classes/Vec3.html#">Vec3</a></span>
|
||||||
Offset relative to the joint.
|
Offset relative to the joint.
|
||||||
(<em>optional</em>)
|
<em>Optional.</em>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
@ -1026,7 +1026,7 @@ baddy:SetOnCollidedWithRoom(LevelFuncs.roomCollided)</pre>
|
||||||
</dd>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "Moveable:SetEffect"></a>
|
<a name = "Moveable:SetEffect"></a>
|
||||||
<strong>Moveable:SetEffect(effect[, timeout])</strong>
|
<strong>Moveable:SetEffect(effect, [timeout])</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Set the effect for this moveable.
|
Set the effect for this moveable.
|
||||||
|
@ -1042,7 +1042,7 @@ baddy:SetOnCollidedWithRoom(LevelFuncs.roomCollided)</pre>
|
||||||
<li><span class="parameter">timeout</span>
|
<li><span class="parameter">timeout</span>
|
||||||
<span class="types"><span class="type">float</span></span>
|
<span class="types"><span class="type">float</span></span>
|
||||||
time (in seconds) after which effect turns off.
|
time (in seconds) after which effect turns off.
|
||||||
(<em>optional</em>)
|
<em>Optional.</em>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
@ -1053,7 +1053,7 @@ baddy:SetOnCollidedWithRoom(LevelFuncs.roomCollided)</pre>
|
||||||
</dd>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "Moveable:SetCustomEffect"></a>
|
<a name = "Moveable:SetCustomEffect"></a>
|
||||||
<strong>Moveable:SetCustomEffect(color1, color2[, timeout])</strong>
|
<strong>Moveable:SetCustomEffect(color1, color2, [timeout])</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Set custom colored burn effect to moveable
|
Set custom colored burn effect to moveable
|
||||||
|
@ -1073,7 +1073,7 @@ baddy:SetOnCollidedWithRoom(LevelFuncs.roomCollided)</pre>
|
||||||
<li><span class="parameter">timeout</span>
|
<li><span class="parameter">timeout</span>
|
||||||
<span class="types"><span class="type">float</span></span>
|
<span class="types"><span class="type">float</span></span>
|
||||||
Time (in seconds) after which effect turns off.
|
Time (in seconds) after which effect turns off.
|
||||||
(<em>optional</em>)
|
<em>Optional.</em>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
@ -1423,7 +1423,7 @@ sas:SetAIBits({<span class="number">1</span>, <span class="number">0</span>, <sp
|
||||||
</dd>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "Moveable:SetAnim"></a>
|
<a name = "Moveable:SetAnim"></a>
|
||||||
<strong>Moveable:SetAnim(index[, slot])</strong>
|
<strong>Moveable:SetAnim(index, [slot])</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Set the object's animation to the one specified by the given index.
|
Set the object's animation to the one specified by the given index.
|
||||||
|
@ -1441,7 +1441,7 @@ sas:SetAIBits({<span class="number">1</span>, <span class="number">0</span>, <sp
|
||||||
<li><span class="parameter">slot</span>
|
<li><span class="parameter">slot</span>
|
||||||
<span class="types"><span class="type">int</span></span>
|
<span class="types"><span class="type">int</span></span>
|
||||||
slot ID of the desired anim (if omitted, moveable's own slot ID is used)
|
slot ID of the desired anim (if omitted, moveable's own slot ID is used)
|
||||||
(<em>optional</em>)
|
<em>Optional.</em>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
@ -1857,7 +1857,7 @@ sas:SetPosition(newPos, <span class="keyword">false</span>)</pre>
|
||||||
</dd>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "Moveable:SwapMesh"></a>
|
<a name = "Moveable:SwapMesh"></a>
|
||||||
<strong>Moveable:SwapMesh(index, slotIndex[, swapIndex])</strong>
|
<strong>Moveable:SwapMesh(index, slotIndex, [swapIndex])</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Set state of specified mesh swap of object
|
Set state of specified mesh swap of object
|
||||||
|
@ -1878,7 +1878,7 @@ sas:SetPosition(newPos, <span class="keyword">false</span>)</pre>
|
||||||
<li><span class="parameter">swapIndex</span>
|
<li><span class="parameter">swapIndex</span>
|
||||||
<span class="types"><span class="type">int</span></span>
|
<span class="types"><span class="type">int</span></span>
|
||||||
index of a mesh from meshswap slot to use
|
index of a mesh from meshswap slot to use
|
||||||
(<em>optional</em>)
|
<em>Optional.</em>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
|
@ -129,7 +129,7 @@ when you need to use screen-space coordinates.</p>
|
||||||
<h2><a href="#Functions">Functions</a></h2>
|
<h2><a href="#Functions">Functions</a></h2>
|
||||||
<table class="function_list">
|
<table class="function_list">
|
||||||
<tr>
|
<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], table)</a></td>
|
||||||
<td class="summary">Create a DisplayString.</td>
|
<td class="summary">Create a DisplayString.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -183,7 +183,7 @@ when you need to use screen-space coordinates.</p>
|
||||||
<dl class="function">
|
<dl class="function">
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "DisplayString"></a>
|
<a name = "DisplayString"></a>
|
||||||
<strong>DisplayString(string, Position[, scale][, color][, translated], table)</strong>
|
<strong>DisplayString(string, Position, [scale], [color], [translated], table)</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Create a DisplayString.
|
Create a DisplayString.
|
||||||
|
@ -204,18 +204,18 @@ For use in <a href="../1 modules/Strings.html#ShowString">ShowString</a> and <a
|
||||||
<li><span class="parameter">scale</span>
|
<li><span class="parameter">scale</span>
|
||||||
<span class="types"><span class="type">float</span></span>
|
<span class="types"><span class="type">float</span></span>
|
||||||
size of the string, relative to the default size. <strong>Default: 1.0</strong>
|
size of the string, relative to the default size. <strong>Default: 1.0</strong>
|
||||||
(<em>optional</em>)
|
<em>Optional.</em>
|
||||||
</li>
|
</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>
|
<span class="types"><a class="type" href="../3 primitive classes/Color.html#">Color</a></span>
|
||||||
the color of the text. <strong>Default: white</strong>
|
the color of the text. <strong>Default: white</strong>
|
||||||
(<em>optional</em>)
|
<em>Optional.</em>
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">translated</span>
|
<li><span class="parameter">translated</span>
|
||||||
<span class="types"><span class="type">bool</span></span>
|
<span class="types"><span class="type">bool</span></span>
|
||||||
If false or omitted, the input string argument will be displayed.
|
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>.
|
If true, the string argument will be the key of a translated string specified in strings.lua. <strong>Default: false</strong>.
|
||||||
(<em>optional</em>)
|
<em>Optional.</em>
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">table</span>
|
<li><span class="parameter">table</span>
|
||||||
<span class="types"><a class="type" href="../4 enums/Strings.DisplayStringOption.html#">DisplayStringOption</a></span>
|
<span class="types"><a class="type" href="../4 enums/Strings.DisplayStringOption.html#">DisplayStringOption</a></span>
|
||||||
|
|
|
@ -124,7 +124,7 @@
|
||||||
<h2><a href="#Functions">Functions</a></h2>
|
<h2><a href="#Functions">Functions</a></h2>
|
||||||
<table class="function_list">
|
<table class="function_list">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" ><a href="#DisplaySprite">DisplaySprite(ID, int, pos, rot, scale[, color])</a></td>
|
<td class="name" ><a href="#DisplaySprite">DisplaySprite(ID, int, pos, rot, scale, [color])</a></td>
|
||||||
<td class="summary">Create a DisplaySprite object.</td>
|
<td class="summary">Create a DisplaySprite object.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -176,7 +176,7 @@
|
||||||
<td class="summary">Set the color of the display sprite.</td>
|
<td class="summary">Set the color of the display sprite.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" ><a href="#DisplaySprite:Draw">DisplaySprite:Draw([priority][, alignMode][, scaleMode][, blendMode])</a></td>
|
<td class="name" ><a href="#DisplaySprite:Draw">DisplaySprite:Draw([priority], [alignMode], [scaleMode], [blendMode])</a></td>
|
||||||
<td class="summary">Draw the display sprite in display space for the current frame.</td>
|
<td class="summary">Draw the display sprite in display space for the current frame.</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
@ -190,7 +190,7 @@
|
||||||
<dl class="function">
|
<dl class="function">
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "DisplaySprite"></a>
|
<a name = "DisplaySprite"></a>
|
||||||
<strong>DisplaySprite(ID, int, pos, rot, scale[, color])</strong>
|
<strong>DisplaySprite(ID, int, pos, rot, scale, [color])</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Create a DisplaySprite object. ()
|
Create a DisplaySprite object. ()
|
||||||
|
@ -222,7 +222,7 @@
|
||||||
<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>
|
<span class="types"><a class="type" href="../3 primitive classes/Color.html#">Color</a></span>
|
||||||
Color. <strong>Default: Color(255, 255, 255, 255)</strong>
|
Color. <strong>Default: Color(255, 255, 255, 255)</strong>
|
||||||
(<em>optional</em>)
|
<em>Optional.</em>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
@ -497,7 +497,7 @@
|
||||||
</dd>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "DisplaySprite:Draw"></a>
|
<a name = "DisplaySprite:Draw"></a>
|
||||||
<strong>DisplaySprite:Draw([priority][, alignMode][, scaleMode][, blendMode])</strong>
|
<strong>DisplaySprite:Draw([priority], [alignMode], [scaleMode], [blendMode])</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Draw the display sprite in display space for the current frame.
|
Draw the display sprite in display space for the current frame.
|
||||||
|
@ -509,22 +509,22 @@
|
||||||
<li><span class="parameter">priority</span>
|
<li><span class="parameter">priority</span>
|
||||||
<span class="types"><span class="type">int</span></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>
|
Draw priority. Can be thought of as a layer, with higher values having precedence. <strong>Default: 0</strong>
|
||||||
(<em>optional</em>)
|
<em>Optional.</em>
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">alignMode</span>
|
<li><span class="parameter">alignMode</span>
|
||||||
<span class="types"><a class="type" href="../4 enums/View.AlignMode.html#">AlignMode</a></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>
|
Align mode interpreting an offset from the sprite's position. <strong>Default: View.AlignMode.CENTER</strong>
|
||||||
(<em>optional</em>)
|
<em>Optional.</em>
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">scaleMode</span>
|
<li><span class="parameter">scaleMode</span>
|
||||||
<span class="types"><a class="type" href="../4 enums/View.ScaleMode.html#">ScaleMode</a></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>
|
Scale mode interpreting the display sprite's horizontal and vertical scale. <strong>Default: View.ScaleMode.FIT</strong>
|
||||||
(<em>optional</em>)
|
<em>Optional.</em>
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">blendMode</span>
|
<li><span class="parameter">blendMode</span>
|
||||||
<span class="types"><a class="type" href="../4 enums/Effects.BlendID.html#">BlendID</a></span>
|
<span class="types"><a class="type" href="../4 enums/Effects.BlendID.html#">BlendID</a></span>
|
||||||
Blend mode. <strong>Default: Effects.BlendID.ALPHABLEND</strong>
|
Blend mode. <strong>Default: Effects.BlendID.ALPHABLEND</strong>
|
||||||
(<em>optional</em>)
|
<em>Optional.</em>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
|
@ -127,7 +127,7 @@
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" ><a href="#spriteID">spriteID</a></td>
|
<td class="name" ><a href="#spriteID">spriteID</a></td>
|
||||||
<td class="summary">(<a href="../4 enums/Objects.ObjID.html#SpriteConstants">Objects.ObjID.SpriteConstants</a>) Lens flare's sun sprite object ID.</td>
|
<td class="summary">(int) Lens flare's sun sprite ID in DEFAULT_SPRITES sequence.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" ><a href="#pitch">pitch</a></td>
|
<td class="name" ><a href="#pitch">pitch</a></td>
|
||||||
|
@ -178,7 +178,7 @@
|
||||||
<strong>spriteID</strong>
|
<strong>spriteID</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
(<a href="../4 enums/Objects.ObjID.html#SpriteConstants">Objects.ObjID.SpriteConstants</a>) Lens flare's sun sprite object ID.
|
(int) Lens flare's sun sprite ID in DEFAULT_SPRITES sequence.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -354,7 +354,7 @@
|
||||||
<h3>Parameters:</h3>
|
<h3>Parameters:</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><span class="parameter">rot</span>
|
<li><span class="parameter">rot</span>
|
||||||
<span class="types"><a class="type" href="../3 primitive classes/Rotation.html#">Rotation</a></span>
|
<span class="types"><span class="type">float</span></span>
|
||||||
Rotation in degrees defining the direction.
|
Rotation in degrees defining the direction.
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">dist</span>
|
<li><span class="parameter">dist</span>
|
||||||
|
|
|
@ -168,7 +168,7 @@ LevelFuncs.SpawnBaddy = <span class="keyword">function</span>(baddy, name, pos)
|
||||||
<h2><a href="#Functions">Functions</a></h2>
|
<h2><a href="#Functions">Functions</a></h2>
|
||||||
<table class="function_list">
|
<table class="function_list">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" ><a href="#Create">Create(name, loop, timerFormat[, ...])</a></td>
|
<td class="name" ><a href="#Create">Create(name, loop, timerFormat, [...])</a></td>
|
||||||
<td class="summary">Create (but do not start) a new event sequence.</td>
|
<td class="summary">Create (but do not start) a new event sequence.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -206,7 +206,7 @@ LevelFuncs.SpawnBaddy = <span class="keyword">function</span>(baddy, name, pos)
|
||||||
<dl class="function">
|
<dl class="function">
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "Create"></a>
|
<a name = "Create"></a>
|
||||||
<strong>Create(name, loop, timerFormat[, ...])</strong>
|
<strong>Create(name, loop, timerFormat, [...])</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Create (but do not start) a new event sequence.
|
Create (but do not start) a new event sequence.
|
||||||
|
@ -229,7 +229,7 @@ LevelFuncs.SpawnBaddy = <span class="keyword">function</span>(baddy, name, pos)
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">...</span>
|
<li><span class="parameter">...</span>
|
||||||
a variable number of pairs of arguments - a time in seconds, followed by the function (must be defined in the LevelFuncs table) to call once the time has elapsed, followed by another duration in seconds, another function name, etc. You can specify a function either by its name as a string, or by a table with the function name as the first member, followed by its arguments (see above example).
|
a variable number of pairs of arguments - a time in seconds, followed by the function (must be defined in the LevelFuncs table) to call once the time has elapsed, followed by another duration in seconds, another function name, etc. You can specify a function either by its name as a string, or by a table with the function name as the first member, followed by its arguments (see above example).
|
||||||
(<em>optional</em>)
|
<em>Optional.</em>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
|
@ -152,7 +152,7 @@ LevelFuncs.TriggerTimer = <span class="keyword">function</span>(obj)
|
||||||
<h2><a href="#Functions">Functions</a></h2>
|
<h2><a href="#Functions">Functions</a></h2>
|
||||||
<table class="function_list">
|
<table class="function_list">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" ><a href="#Create">Create(name, totalTime, loop, timerFormat, func[, ...])</a></td>
|
<td class="name" ><a href="#Create">Create(name, totalTime, loop, timerFormat, func, [...])</a></td>
|
||||||
<td class="summary">Create (but do not start) a new timer.</td>
|
<td class="summary">Create (but do not start) a new timer.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -160,7 +160,7 @@ LevelFuncs.TriggerTimer = <span class="keyword">function</span>(obj)
|
||||||
<td class="summary">Get a timer by its name.</td>
|
<td class="summary">Get a timer by its name.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" ><a href="#myTimer:SetFunction">myTimer:SetFunction(func[, ...])</a></td>
|
<td class="name" ><a href="#myTimer:SetFunction">myTimer:SetFunction(func, [...])</a></td>
|
||||||
<td class="summary">Give the timer a new function and args</td>
|
<td class="summary">Give the timer a new function and args</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -214,7 +214,7 @@ LevelFuncs.TriggerTimer = <span class="keyword">function</span>(obj)
|
||||||
<dl class="function">
|
<dl class="function">
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "Create"></a>
|
<a name = "Create"></a>
|
||||||
<strong>Create(name, totalTime, loop, timerFormat, func[, ...])</strong>
|
<strong>Create(name, totalTime, loop, timerFormat, func, [...])</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Create (but do not start) a new timer. </p>
|
Create (but do not start) a new timer. </p>
|
||||||
|
@ -267,7 +267,7 @@ LevelFuncs.TriggerTimer = <span class="keyword">function</span>(obj)
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">...</span>
|
<li><span class="parameter">...</span>
|
||||||
a variable number of arguments with which the above function will be called
|
a variable number of arguments with which the above function will be called
|
||||||
(<em>optional</em>)
|
<em>Optional.</em>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
@ -312,7 +312,7 @@ LevelFuncs.TriggerTimer = <span class="keyword">function</span>(obj)
|
||||||
</dd>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "myTimer:SetFunction"></a>
|
<a name = "myTimer:SetFunction"></a>
|
||||||
<strong>myTimer:SetFunction(func[, ...])</strong>
|
<strong>myTimer:SetFunction(func, [...])</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Give the timer a new function and args
|
Give the timer a new function and args
|
||||||
|
@ -327,7 +327,7 @@ LevelFuncs.TriggerTimer = <span class="keyword">function</span>(obj)
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">...</span>
|
<li><span class="parameter">...</span>
|
||||||
a variable number of arguments with which the above function will be called
|
a variable number of arguments with which the above function will be called
|
||||||
(<em>optional</em>)
|
<em>Optional.</em>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
|
@ -216,12 +216,12 @@
|
||||||
# end
|
# end
|
||||||
$(M(item.params.map[p],item))
|
$(M(item.params.map[p],item))
|
||||||
# if def == true then
|
# if def == true then
|
||||||
(<em>optional</em>)
|
<em>Optional.</em>
|
||||||
# elseif def then
|
# elseif def then
|
||||||
(<em>default</em> $(def))
|
<em>Default: $(def).</em>
|
||||||
# end
|
# end
|
||||||
# if item:readonly(p) then
|
# if item:readonly(p) then
|
||||||
<em>readonly</em>
|
<em>Read-only.</em>
|
||||||
# end
|
# end
|
||||||
</li>
|
</li>
|
||||||
# end
|
# end
|
||||||
|
|
|
@ -531,9 +531,9 @@ end
|
||||||
-- @tparam Objects.ObjID objectIdBg Object ID for the diary's sprite.
|
-- @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 int spriteIdBg SpriteID from the specified object for the diary's sprite.
|
||||||
-- @tparam Color colorBg Color of 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 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.AlignMode alignMode Alignment for the diary's sprite.
|
||||||
-- @tparam View.ScaleMode scaleMode Scaling 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.
|
-- @tparam Effects.BlendID blendMode Blending modes for the diary's sprite.
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
#include "Specific/clock.h"
|
#include "Specific/clock.h"
|
||||||
#include "Specific/Input/Input.h"
|
#include "Specific/Input/Input.h"
|
||||||
#include "Specific/level.h"
|
#include "Specific/level.h"
|
||||||
|
#include "Specific/trutils.h"
|
||||||
|
|
||||||
using namespace TEN::Collision::Point;
|
using namespace TEN::Collision::Point;
|
||||||
using namespace TEN::Effects::Bubble;
|
using namespace TEN::Effects::Bubble;
|
||||||
|
@ -67,27 +68,6 @@ constexpr auto HK_RAPID_MODE_SHOT_INTERVAL = 3.0f;
|
||||||
|
|
||||||
constexpr auto SHOTGUN_PELLET_COUNT = 6;
|
constexpr auto SHOTGUN_PELLET_COUNT = 6;
|
||||||
|
|
||||||
static Vector3i GetWeaponSmokeRelOffset(LaraWeaponType weaponType)
|
|
||||||
{
|
|
||||||
switch (weaponType)
|
|
||||||
{
|
|
||||||
case LaraWeaponType::HK:
|
|
||||||
return Vector3i(0, 228, 96);
|
|
||||||
|
|
||||||
case LaraWeaponType::Shotgun:
|
|
||||||
return Vector3i(0, 228, 0);
|
|
||||||
|
|
||||||
case LaraWeaponType::GrenadeLauncher:
|
|
||||||
return Vector3i(0, 180, 80);
|
|
||||||
|
|
||||||
case LaraWeaponType::RocketLauncher:
|
|
||||||
return Vector3i(0, 84, 72);;
|
|
||||||
|
|
||||||
default:
|
|
||||||
return Vector3i::Zero;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void AnimateShotgun(ItemInfo& laraItem, LaraWeaponType weaponType)
|
void AnimateShotgun(ItemInfo& laraItem, LaraWeaponType weaponType)
|
||||||
{
|
{
|
||||||
auto& player = *GetLaraInfo(&laraItem);
|
auto& player = *GetLaraInfo(&laraItem);
|
||||||
|
@ -95,7 +75,7 @@ void AnimateShotgun(ItemInfo& laraItem, LaraWeaponType weaponType)
|
||||||
|
|
||||||
if (player.LeftArm.GunSmoke > 0)
|
if (player.LeftArm.GunSmoke > 0)
|
||||||
{
|
{
|
||||||
auto relOffset = GetWeaponSmokeRelOffset(weaponType);
|
auto relOffset = g_GameFlow->GetSettings()->Weapons[(int)weaponType - 1].MuzzleOffset.ToVector3();
|
||||||
auto pos = GetJointPosition(&laraItem, LM_RHAND, relOffset);
|
auto pos = GetJointPosition(&laraItem, LM_RHAND, relOffset);
|
||||||
|
|
||||||
if (laraItem.MeshBits.TestAny())
|
if (laraItem.MeshBits.TestAny())
|
||||||
|
@ -251,9 +231,8 @@ void AnimateShotgun(ItemInfo& laraItem, LaraWeaponType weaponType)
|
||||||
player.Control.Weapon.Timer = 0.0f;
|
player.Control.Weapon.Timer = 0.0f;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (player.Control.Weapon.Timer != 0.0f)
|
else if (weaponType == LaraWeaponType::HK && player.Control.Weapon.Timer != 0.0f)
|
||||||
{
|
{
|
||||||
SoundEffect(SFX_TR4_EXPLOSION1, &laraItem.Pose, SoundEnvironment::Land, 1.0f, 0.4f);
|
|
||||||
SoundEffect(SFX_TR4_HK_FIRE, &laraItem.Pose);
|
SoundEffect(SFX_TR4_HK_FIRE, &laraItem.Pose);
|
||||||
}
|
}
|
||||||
else if (weaponType == LaraWeaponType::Shotgun && !IsHeld(In::Action) && !player.LeftArm.Locked)
|
else if (weaponType == LaraWeaponType::Shotgun && !IsHeld(In::Action) && !player.LeftArm.Locked)
|
||||||
|
@ -332,9 +311,8 @@ void AnimateShotgun(ItemInfo& laraItem, LaraWeaponType weaponType)
|
||||||
player.Control.Weapon.Timer = 0.0f;
|
player.Control.Weapon.Timer = 0.0f;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (player.Control.Weapon.Timer != 0.0f)
|
else if (weaponType == LaraWeaponType::HK && player.Control.Weapon.Timer != 0.0f)
|
||||||
{
|
{
|
||||||
SoundEffect(SFX_TR4_EXPLOSION1, &laraItem.Pose, SoundEnvironment::Land, 1.0f, 0.4f);
|
|
||||||
SoundEffect(SFX_TR4_HK_FIRE, &laraItem.Pose);
|
SoundEffect(SFX_TR4_HK_FIRE, &laraItem.Pose);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -410,8 +388,10 @@ void FireShotgun(ItemInfo& laraItem)
|
||||||
if (!ammo.HasInfinite())
|
if (!ammo.HasInfinite())
|
||||||
ammo--;
|
ammo--;
|
||||||
|
|
||||||
auto pos = GetJointPosition(&laraItem, LM_RHAND, Vector3i(0, 1508, 32));
|
auto offset = g_GameFlow->GetSettings()->Weapons[(int)LaraWeaponType::Shotgun].MuzzleOffset.ToVector3i();
|
||||||
auto pos2 = GetJointPosition(&laraItem, LM_RHAND, Vector3i(0, 228, 32));
|
|
||||||
|
auto pos = GetJointPosition(&laraItem, LM_RHAND, offset + Vector3::UnitY * CLICK(2));
|
||||||
|
auto pos2 = GetJointPosition(&laraItem, LM_RHAND, offset);
|
||||||
|
|
||||||
player.LeftArm.GunSmoke = 32;
|
player.LeftArm.GunSmoke = 32;
|
||||||
|
|
||||||
|
@ -1251,7 +1231,6 @@ void LasersightWeaponHandler(ItemInfo& item, LaraWeaponType weaponType)
|
||||||
|
|
||||||
if (playSound)
|
if (playSound)
|
||||||
{
|
{
|
||||||
SoundEffect(SFX_TR4_EXPLOSION1, nullptr, SoundEnvironment::Land, 1.0f, 0.4f);
|
|
||||||
SoundEffect(SFX_TR4_HK_FIRE, nullptr);
|
SoundEffect(SFX_TR4_HK_FIRE, nullptr);
|
||||||
Camera.bounce = -16 - (GetRandomControl() & 0x1F);
|
Camera.bounce = -16 - (GetRandomControl() & 0x1F);
|
||||||
}
|
}
|
||||||
|
@ -1594,7 +1573,7 @@ void HandleProjectile(ItemInfo& projectile, ItemInfo& emitter, const Vector3i& p
|
||||||
for (auto* itemPtr : collObjects.Items)
|
for (auto* itemPtr : collObjects.Items)
|
||||||
{
|
{
|
||||||
// Object was already affected by collision, skip it.
|
// Object was already affected by collision, skip it.
|
||||||
if (std::find(affectedObjects.begin(), affectedObjects.end(), itemPtr->Index) != affectedObjects.end())
|
if (TEN::Utils::Contains(affectedObjects, itemPtr->Index))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
const auto& currentObject = Objects[itemPtr->ObjectNumber];
|
const auto& currentObject = Objects[itemPtr->ObjectNumber];
|
||||||
|
|
|
@ -45,24 +45,6 @@ static WeaponAnimData GetWeaponAnimData(LaraWeaponType weaponType)
|
||||||
return ((it != ANIM_DATA_MAP.end()) ? it->second : ANIM_DATA_MAP.at(LaraWeaponType::None));
|
return ((it != ANIM_DATA_MAP.end()) ? it->second : ANIM_DATA_MAP.at(LaraWeaponType::None));
|
||||||
}
|
}
|
||||||
|
|
||||||
static Vector3i GetWeaponSmokeRelOffset(LaraWeaponType weaponType, bool isRightWeapon)
|
|
||||||
{
|
|
||||||
switch (weaponType)
|
|
||||||
{
|
|
||||||
case LaraWeaponType::Pistol:
|
|
||||||
return Vector3i(isRightWeapon ? -16 : 4, 128, 40);
|
|
||||||
|
|
||||||
case LaraWeaponType::Revolver:
|
|
||||||
return Vector3i(isRightWeapon ? -32 : 16, 160, 56);
|
|
||||||
|
|
||||||
case LaraWeaponType::Uzi:
|
|
||||||
return Vector3i(isRightWeapon ? -16 : 8, 140, 48);
|
|
||||||
|
|
||||||
default:
|
|
||||||
return Vector3i::Zero;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void SetArmInfo(const ItemInfo& laraItem, ArmInfo& arm, int frame)
|
static void SetArmInfo(const ItemInfo& laraItem, ArmInfo& arm, int frame)
|
||||||
{
|
{
|
||||||
const auto& player = GetLaraInfo(laraItem);
|
const auto& player = GetLaraInfo(laraItem);
|
||||||
|
@ -118,8 +100,9 @@ static void AnimateWeapon(ItemInfo& laraItem, LaraWeaponType weaponType, bool& h
|
||||||
// Spawn weapon smoke.
|
// Spawn weapon smoke.
|
||||||
if (laraItem.MeshBits.TestAny() && arm.GunSmoke)
|
if (laraItem.MeshBits.TestAny() && arm.GunSmoke)
|
||||||
{
|
{
|
||||||
auto relOffset = GetWeaponSmokeRelOffset(weaponType, isRightWeapon);
|
auto relOffset = g_GameFlow->GetSettings()->Weapons[(int)weaponType - 1].MuzzleOffset.ToVector3();
|
||||||
auto pos = GetJointPosition(&laraItem, isRightWeapon ? LM_RHAND : LM_LHAND, relOffset);
|
auto pos = GetJointPosition(&laraItem, isRightWeapon ? LM_RHAND : LM_LHAND, relOffset);
|
||||||
|
|
||||||
TriggerGunSmoke(pos.x, pos.y, pos.z, 0, 0, 0, 0, weaponType, arm.GunSmoke);
|
TriggerGunSmoke(pos.x, pos.y, pos.z, 0, 0, 0, 0, weaponType, arm.GunSmoke);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -689,6 +689,18 @@ void ClampRotation(Pose& outPose, short angle, short rotation)
|
||||||
|
|
||||||
Vector3i GetJointPosition(const ItemInfo& item, int jointIndex, const Vector3i& relOffset)
|
Vector3i GetJointPosition(const ItemInfo& item, int jointIndex, const Vector3i& relOffset)
|
||||||
{
|
{
|
||||||
|
bool incorrectJoint = false;
|
||||||
|
if (jointIndex < 0 || jointIndex >= Objects[item.ObjectNumber].nmeshes)
|
||||||
|
{
|
||||||
|
TENLog("Unknown joint ID specified for object " + GetObjectName(item.ObjectNumber), LogLevel::Warning, LogConfig::All);
|
||||||
|
incorrectJoint = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Always return object's root position if it's invisible, because we can't predict its
|
||||||
|
// joint position otherwise, since it's not animated.
|
||||||
|
if (incorrectJoint || Objects[item.ObjectNumber].drawRoutine == nullptr || item.Status == ITEM_INVISIBLE)
|
||||||
|
return Geometry::TranslatePoint(item.Pose.Position, item.Pose.Orientation, relOffset);
|
||||||
|
|
||||||
// Use matrices done in renderer to transform relative offset.
|
// Use matrices done in renderer to transform relative offset.
|
||||||
return Vector3i(g_Renderer.GetMoveableBonePosition(item.Index, jointIndex, relOffset.ToVector3()));
|
return Vector3i(g_Renderer.GetMoveableBonePosition(item.Index, jointIndex, relOffset.ToVector3()));
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
#include "Sound/sound.h"
|
#include "Sound/sound.h"
|
||||||
#include "Specific/Input/Input.h"
|
#include "Specific/Input/Input.h"
|
||||||
#include "Specific/level.h"
|
#include "Specific/level.h"
|
||||||
|
#include "Specific/trutils.h"
|
||||||
#include "Specific/winmain.h"
|
#include "Specific/winmain.h"
|
||||||
|
|
||||||
using namespace TEN::Collision::Point;
|
using namespace TEN::Collision::Point;
|
||||||
|
@ -1392,7 +1393,7 @@ static std::vector<int> FillCollideableItemList()
|
||||||
{
|
{
|
||||||
const auto& item = g_Level.Items[i];
|
const auto& item = g_Level.Items[i];
|
||||||
|
|
||||||
if (std::find(roomList.begin(), roomList.end(), item.RoomNumber) == roomList.end())
|
if (!TEN::Utils::Contains(roomList, (int)item.RoomNumber))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (!g_Level.Rooms[item.RoomNumber].Active())
|
if (!g_Level.Rooms[item.RoomNumber].Active())
|
||||||
|
|
|
@ -194,6 +194,7 @@ GameStatus GamePhase(bool insideMenu)
|
||||||
UpdateBlood();
|
UpdateBlood();
|
||||||
UpdateBubbles();
|
UpdateBubbles();
|
||||||
UpdateDebris();
|
UpdateDebris();
|
||||||
|
UpdateGunFlashes();
|
||||||
UpdateGunShells();
|
UpdateGunShells();
|
||||||
UpdateFootprints();
|
UpdateFootprints();
|
||||||
UpdateSplashes();
|
UpdateSplashes();
|
||||||
|
|
|
@ -941,6 +941,55 @@ void TriggerGunShell(short hand, short objNum, LaraWeaponType weaponType)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void UpdateGunFlashes()
|
||||||
|
{
|
||||||
|
if (Lara.Control.Weapon.GunType == LaraWeaponType::None)
|
||||||
|
return;
|
||||||
|
|
||||||
|
const auto& settings = g_GameFlow->GetSettings()->Weapons[(int)Lara.Control.Weapon.GunType - 1];
|
||||||
|
|
||||||
|
if (!settings.MuzzleGlow)
|
||||||
|
return;
|
||||||
|
|
||||||
|
for (int hand = 0; hand < 2; hand++)
|
||||||
|
{
|
||||||
|
if ((hand ? Lara.RightArm.GunFlash : Lara.LeftArm.GunFlash) == 0)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
auto& part = *GetFreeParticle();
|
||||||
|
|
||||||
|
part.on = true;
|
||||||
|
part.SpriteSeqID = ID_DEFAULT_SPRITES;
|
||||||
|
part.SpriteID = 11;
|
||||||
|
part.blendMode = BlendMode::Additive;
|
||||||
|
|
||||||
|
auto pos = GetJointPosition(LaraItem, hand ? LM_RHAND : LM_LHAND, settings.MuzzleOffset.ToVector3i());
|
||||||
|
part.x = pos.x;
|
||||||
|
part.y = pos.y;
|
||||||
|
part.z = pos.z;
|
||||||
|
part.roomNumber = LaraItem->RoomNumber;
|
||||||
|
|
||||||
|
part.rotAng = ANGLE(TO_DEGREES(Random::GenerateAngle())) >> 4;
|
||||||
|
part.rotAdd = 0;
|
||||||
|
|
||||||
|
part.sSize = part.size = part.dSize = 192;
|
||||||
|
part.scalar = 2;
|
||||||
|
|
||||||
|
part.xVel = part.yVel = part.zVel = 0;
|
||||||
|
part.gravity = part.friction = part.maxYvel = 0;
|
||||||
|
|
||||||
|
part.sR = part.dR = settings.FlashColor.GetR() / 2;
|
||||||
|
part.sG = part.dG = settings.FlashColor.GetG() / 2;
|
||||||
|
part.sB = part.dB = settings.FlashColor.GetB() / 2;
|
||||||
|
|
||||||
|
part.life = part.sLife = 2;
|
||||||
|
part.colFadeSpeed = 1;
|
||||||
|
part.fadeToBlack = 1;
|
||||||
|
|
||||||
|
part.flags = SP_SCALE | SP_DEF | SP_EXPDEF;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void UpdateGunShells()
|
void UpdateGunShells()
|
||||||
{
|
{
|
||||||
for (int i = 0; i < MAX_GUNSHELL; i++)
|
for (int i = 0; i < MAX_GUNSHELL; i++)
|
||||||
|
|
|
@ -323,6 +323,7 @@ void TriggerBlood(int x, int y, int z, int unk, int num);
|
||||||
void UpdateBlood();
|
void UpdateBlood();
|
||||||
int GetFreeGunshell();
|
int GetFreeGunshell();
|
||||||
void TriggerGunShell(short hand, short objNum, LaraWeaponType weaponType);
|
void TriggerGunShell(short hand, short objNum, LaraWeaponType weaponType);
|
||||||
|
void UpdateGunFlashes();
|
||||||
void UpdateGunShells();
|
void UpdateGunShells();
|
||||||
void AddWaterSparks(int x, int y, int z, int num);
|
void AddWaterSparks(int x, int y, int z, int num);
|
||||||
void ExplodingDeath(short itemNumber, short flags); // BODY_ flags
|
void ExplodingDeath(short itemNumber, short flags); // BODY_ flags
|
||||||
|
|
|
@ -1143,6 +1143,7 @@ const std::vector<byte> SaveGame::Build()
|
||||||
levelData.add_sky_layer_2_color(level->GetSkyLayerColor(1));
|
levelData.add_sky_layer_2_color(level->GetSkyLayerColor(1));
|
||||||
levelData.add_sky_layer_2_speed(level->GetSkyLayerSpeed(1));
|
levelData.add_sky_layer_2_speed(level->GetSkyLayerSpeed(1));
|
||||||
|
|
||||||
|
levelData.add_lensflare_enabled(level->LensFlare.GetEnabled());
|
||||||
levelData.add_lensflare_color(level->LensFlare.GetColor());
|
levelData.add_lensflare_color(level->LensFlare.GetColor());
|
||||||
levelData.add_lensflare_pitch(level->LensFlare.GetPitch());
|
levelData.add_lensflare_pitch(level->LensFlare.GetPitch());
|
||||||
levelData.add_lensflare_yaw(level->LensFlare.GetYaw());
|
levelData.add_lensflare_yaw(level->LensFlare.GetYaw());
|
||||||
|
@ -1844,6 +1845,7 @@ static void ParseLua(const Save::SaveGame* s, bool hubMode)
|
||||||
level->Layer2.CloudSpeed = s->level_data()->sky_layer_2_speed();
|
level->Layer2.CloudSpeed = s->level_data()->sky_layer_2_speed();
|
||||||
level->Layer2.SetColor(s->level_data()->sky_layer_2_color());
|
level->Layer2.SetColor(s->level_data()->sky_layer_2_color());
|
||||||
|
|
||||||
|
level->LensFlare.SetEnabled(s->level_data()->lensflare_enabled());
|
||||||
level->LensFlare.SetSunSpriteID(s->level_data()->lensflare_sprite_id());
|
level->LensFlare.SetSunSpriteID(s->level_data()->lensflare_sprite_id());
|
||||||
level->LensFlare.SetPitch(s->level_data()->lensflare_pitch());
|
level->LensFlare.SetPitch(s->level_data()->lensflare_pitch());
|
||||||
level->LensFlare.SetYaw(s->level_data()->lensflare_yaw());
|
level->LensFlare.SetYaw(s->level_data()->lensflare_yaw());
|
||||||
|
|
|
@ -31,6 +31,7 @@
|
||||||
#include "Renderer/Structures/RendererSortableObject.h"
|
#include "Renderer/Structures/RendererSortableObject.h"
|
||||||
#include "Specific/configuration.h"
|
#include "Specific/configuration.h"
|
||||||
#include "Specific/level.h"
|
#include "Specific/level.h"
|
||||||
|
#include "Specific/trutils.h"
|
||||||
#include "Specific/winmain.h"
|
#include "Specific/winmain.h"
|
||||||
|
|
||||||
using namespace TEN::Effects::Hair;
|
using namespace TEN::Effects::Hair;
|
||||||
|
@ -2755,7 +2756,7 @@ namespace TEN::Renderer
|
||||||
if (rendererPass != RendererPass::GBuffer)
|
if (rendererPass != RendererPass::GBuffer)
|
||||||
{
|
{
|
||||||
// Bind caustics texture.
|
// Bind caustics texture.
|
||||||
if (std::find(SpriteSequencesIds.begin(), SpriteSequencesIds.end(), ID_CAUSTIC_TEXTURES) != SpriteSequencesIds.end())
|
if (TEN::Utils::Contains(SpriteSequencesIds, (int)ID_CAUSTIC_TEXTURES))
|
||||||
{
|
{
|
||||||
int nmeshes = -Objects[ID_CAUSTIC_TEXTURES].nmeshes;
|
int nmeshes = -Objects[ID_CAUSTIC_TEXTURES].nmeshes;
|
||||||
int meshIndex = Objects[ID_CAUSTIC_TEXTURES].meshIndex;
|
int meshIndex = Objects[ID_CAUSTIC_TEXTURES].meshIndex;
|
||||||
|
@ -2869,12 +2870,8 @@ namespace TEN::Renderer
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
BindTexture(
|
BindTexture(TextureRegister::ColorMap, &std::get<0>(_roomTextures[bucket.Texture]), SamplerStateRegister::AnisotropicClamp);
|
||||||
TextureRegister::ColorMap, &std::get<0>(_roomTextures[bucket.Texture]),
|
BindTexture(TextureRegister::NormalMap, &std::get<1>(_roomTextures[bucket.Texture]), SamplerStateRegister::AnisotropicClamp);
|
||||||
SamplerStateRegister::AnisotropicClamp);
|
|
||||||
BindTexture(
|
|
||||||
TextureRegister::NormalMap, &std::get<1>(_roomTextures[bucket.Texture]),
|
|
||||||
SamplerStateRegister::AnisotropicClamp);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DrawIndexedTriangles(bucket.NumIndices, bucket.StartIndex, 0);
|
DrawIndexedTriangles(bucket.NumIndices, bucket.StartIndex, 0);
|
||||||
|
@ -3285,11 +3282,7 @@ namespace TEN::Renderer
|
||||||
case RendererPass::GBuffer:
|
case RendererPass::GBuffer:
|
||||||
if (blendMode != BlendMode::Opaque &&
|
if (blendMode != BlendMode::Opaque &&
|
||||||
blendMode != BlendMode::AlphaTest &&
|
blendMode != BlendMode::AlphaTest &&
|
||||||
blendMode != BlendMode::FastAlphaBlend &&
|
blendMode != BlendMode::FastAlphaBlend)
|
||||||
// WARNING: For G-Buffer step we consider alpha blend like alpha test
|
|
||||||
// assuming that most of the geometry used in rooms, items and statics
|
|
||||||
// are fences, foliages, trees... But it could fail with translucent surfaces!
|
|
||||||
blendMode != BlendMode::AlphaBlend)
|
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1099,50 +1099,13 @@ namespace TEN::Renderer
|
||||||
if (!settings.MuzzleFlash)
|
if (!settings.MuzzleFlash)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
short length = 0;
|
|
||||||
short zOffset = 0;
|
|
||||||
short rotationX = 0;
|
|
||||||
|
|
||||||
if (Lara.Control.Weapon.GunType != LaraWeaponType::Flare &&
|
if (Lara.Control.Weapon.GunType != LaraWeaponType::Flare &&
|
||||||
Lara.Control.Weapon.GunType != LaraWeaponType::Crossbow)
|
Lara.Control.Weapon.GunType != LaraWeaponType::Crossbow)
|
||||||
{
|
{
|
||||||
switch (Lara.Control.Weapon.GunType)
|
|
||||||
{
|
|
||||||
case LaraWeaponType::Revolver:
|
|
||||||
length = 192;
|
|
||||||
zOffset = 68;
|
|
||||||
rotationX = -14560;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case LaraWeaponType::Uzi:
|
|
||||||
length = 190;
|
|
||||||
zOffset = 50;
|
|
||||||
rotationX = -14560;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case LaraWeaponType::HK:
|
|
||||||
case LaraWeaponType::Shotgun:
|
|
||||||
length = 300;
|
|
||||||
zOffset = 92;
|
|
||||||
rotationX = -14560;
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
case LaraWeaponType::Pistol:
|
|
||||||
length = 180;
|
|
||||||
zOffset = 40;
|
|
||||||
rotationX = -16830;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Use MP5 flash if available.
|
// Use MP5 flash if available.
|
||||||
auto gunflash = GAME_OBJECT_ID::ID_GUN_FLASH;
|
auto gunflash = GAME_OBJECT_ID::ID_GUN_FLASH;
|
||||||
if (Lara.Control.Weapon.GunType == LaraWeaponType::HK && Objects[GAME_OBJECT_ID::ID_GUN_FLASH2].loaded)
|
if (Lara.Control.Weapon.GunType == LaraWeaponType::HK && Objects[GAME_OBJECT_ID::ID_GUN_FLASH2].loaded)
|
||||||
{
|
|
||||||
gunflash = GAME_OBJECT_ID::ID_GUN_FLASH2;
|
gunflash = GAME_OBJECT_ID::ID_GUN_FLASH2;
|
||||||
length += 20;
|
|
||||||
zOffset += 10;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!_moveableObjects[gunflash].has_value())
|
if (!_moveableObjects[gunflash].has_value())
|
||||||
return false;
|
return false;
|
||||||
|
@ -1181,8 +1144,12 @@ namespace TEN::Renderer
|
||||||
|
|
||||||
BindTexture(TextureRegister::ColorMap, &std::get<0>(_moveablesTextures[flashBucket.Texture]), SamplerStateRegister::AnisotropicClamp);
|
BindTexture(TextureRegister::ColorMap, &std::get<0>(_moveablesTextures[flashBucket.Texture]), SamplerStateRegister::AnisotropicClamp);
|
||||||
|
|
||||||
auto tMatrix = Matrix::CreateTranslation(0, length, zOffset);
|
|
||||||
auto rotMatrix = Matrix::CreateRotationX(TO_RAD(rotationX));
|
auto meshOffset = g_Level.Frames[GetAnimData(gunflash, 0).FramePtr].Offset;
|
||||||
|
auto offset = settings.MuzzleOffset + Vector3(meshOffset.x, meshOffset.z, meshOffset.y); // Offsets are inverted because of bone orientation.
|
||||||
|
|
||||||
|
auto tMatrix = Matrix::CreateTranslation(offset);
|
||||||
|
auto rotMatrix = Matrix::CreateRotationX(TO_RAD(Lara.Control.Weapon.GunType == LaraWeaponType::Pistol ? -16830 : -14560)); // HACK
|
||||||
|
|
||||||
auto worldMatrix = Matrix::Identity;
|
auto worldMatrix = Matrix::Identity;
|
||||||
if (Lara.LeftArm.GunFlash)
|
if (Lara.LeftArm.GunFlash)
|
||||||
|
|
|
@ -971,7 +971,7 @@ namespace TEN::Renderer
|
||||||
}
|
}
|
||||||
|
|
||||||
// Light already on a list
|
// Light already on a list
|
||||||
if (std::find(renderView.LightsToDraw.begin(), renderView.LightsToDraw.end(), light) != renderView.LightsToDraw.end())
|
if (TEN::Utils::Contains(renderView.LightsToDraw, light))
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
|
@ -139,11 +139,11 @@ namespace TEN::Renderer
|
||||||
blendStateDesc.AlphaToCoverageEnable = false;
|
blendStateDesc.AlphaToCoverageEnable = false;
|
||||||
blendStateDesc.IndependentBlendEnable = false;
|
blendStateDesc.IndependentBlendEnable = false;
|
||||||
blendStateDesc.RenderTarget[0].BlendEnable = true;
|
blendStateDesc.RenderTarget[0].BlendEnable = true;
|
||||||
blendStateDesc.RenderTarget[0].SrcBlend = D3D11_BLEND_SRC_ALPHA;
|
blendStateDesc.RenderTarget[0].SrcBlend = D3D11_BLEND_INV_DEST_COLOR;
|
||||||
blendStateDesc.RenderTarget[0].DestBlend = D3D11_BLEND_INV_SRC_ALPHA;
|
blendStateDesc.RenderTarget[0].DestBlend = D3D11_BLEND_INV_SRC_COLOR;
|
||||||
blendStateDesc.RenderTarget[0].BlendOp = D3D11_BLEND_OP_REV_SUBTRACT;
|
blendStateDesc.RenderTarget[0].BlendOp = D3D11_BLEND_OP_ADD;
|
||||||
blendStateDesc.RenderTarget[0].SrcBlendAlpha = D3D11_BLEND_SRC_ALPHA;
|
blendStateDesc.RenderTarget[0].SrcBlendAlpha = D3D11_BLEND_ONE;
|
||||||
blendStateDesc.RenderTarget[0].DestBlendAlpha = D3D11_BLEND_DEST_ALPHA;
|
blendStateDesc.RenderTarget[0].DestBlendAlpha = D3D11_BLEND_ZERO;
|
||||||
blendStateDesc.RenderTarget[0].BlendOpAlpha = D3D11_BLEND_OP_ADD;
|
blendStateDesc.RenderTarget[0].BlendOpAlpha = D3D11_BLEND_OP_ADD;
|
||||||
blendStateDesc.RenderTarget[0].RenderTargetWriteMask = D3D11_COLOR_WRITE_ENABLE_ALL;
|
blendStateDesc.RenderTarget[0].RenderTargetWriteMask = D3D11_COLOR_WRITE_ENABLE_ALL;
|
||||||
Utils::throwIfFailed(_device->CreateBlendState(&blendStateDesc, _excludeBlendState.GetAddressOf()));
|
Utils::throwIfFailed(_device->CreateBlendState(&blendStateDesc, _excludeBlendState.GetAddressOf()));
|
||||||
|
|
|
@ -28,7 +28,7 @@ LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL
|
||||||
|
|
||||||
VS_VERSION_INFO VERSIONINFO
|
VS_VERSION_INFO VERSIONINFO
|
||||||
FILEVERSION TEN_MAJOR_VERSION,TEN_MINOR_VERSION,TEN_BUILD_NUMBER,TEN_REVISION_NUMBER
|
FILEVERSION TEN_MAJOR_VERSION,TEN_MINOR_VERSION,TEN_BUILD_NUMBER,TEN_REVISION_NUMBER
|
||||||
PRODUCTVERSION TE_MAJOR_VERSION,TE_MINOR_VERSION,TE_BUILD_NUMBER,TE_REVISION_NUMBER
|
PRODUCTVERSION TEN_MAJOR_VERSION, TEN_MINOR_VERSION, TEN_BUILD_NUMBER, TEN_REVISION_NUMBER
|
||||||
FILEFLAGSMASK 0x3fL
|
FILEFLAGSMASK 0x3fL
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
FILEFLAGS 0x1L
|
FILEFLAGS 0x1L
|
||||||
|
@ -49,7 +49,7 @@ BEGIN
|
||||||
VALUE "OriginalFilename", "TombEngine.exe"
|
VALUE "OriginalFilename", "TombEngine.exe"
|
||||||
VALUE "ProductName", "Tomb Engine"
|
VALUE "ProductName", "Tomb Engine"
|
||||||
VALUE "FileVersion", TEN_VERSION_STRING
|
VALUE "FileVersion", TEN_VERSION_STRING
|
||||||
VALUE "ProductVersion", TE_VERSION_STRING
|
VALUE "ProductVersion", TEN_VERSION_STRING
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
BLOCK "VarFileInfo"
|
BLOCK "VarFileInfo"
|
||||||
|
|
|
@ -30,7 +30,7 @@ namespace TEN::Scripting
|
||||||
// @mem enabled
|
// @mem enabled
|
||||||
"enabled", sol::property(&LensFlare::GetEnabled, &LensFlare::SetEnabled),
|
"enabled", sol::property(&LensFlare::GetEnabled, &LensFlare::SetEnabled),
|
||||||
|
|
||||||
/// (@{Objects.ObjID.SpriteConstants}) Lens flare's sun sprite object ID.
|
/// (int) Lens flare's sun sprite ID in DEFAULT_SPRITES sequence.
|
||||||
// @mem spriteID
|
// @mem spriteID
|
||||||
"spriteID", sol::property(&LensFlare::GetSunSpriteID, &LensFlare::SetSunSpriteID),
|
"spriteID", sol::property(&LensFlare::GetSunSpriteID, &LensFlare::SetSunSpriteID),
|
||||||
|
|
||||||
|
|
|
@ -25,15 +25,15 @@ namespace TEN::Scripting
|
||||||
|
|
||||||
// NOTE: Since Weapons array is bound to Lua directly and Lua accesses this array by native enum, where 0 is NONE, and 1 is PISTOLS,
|
// NOTE: Since Weapons array is bound to Lua directly and Lua accesses this array by native enum, where 0 is NONE, and 1 is PISTOLS,
|
||||||
// 0 index is omitted due to Lua indexing arrays starting from 1. 1 must be subtracted from initializer index.
|
// 0 index is omitted due to Lua indexing arrays starting from 1. 1 must be subtracted from initializer index.
|
||||||
Weapons[(int)LaraWeaponType::Pistol - 1] = { 8.0f, BLOCK(8), 9, (int)BLOCK(0.65f), 1, 1, 30, ScriptColor(192, 128, 0), 9, 3, true, true, true, false };
|
Weapons[(int)LaraWeaponType::Pistol - 1] = { 8.0f, BLOCK(8), 9, (int)BLOCK(0.65f), 1, 1, 30, ScriptColor(192, 128, 0), 9, 3, true, true, true, true, false, Vec3( 0, 120, 30) };
|
||||||
Weapons[(int)LaraWeaponType::Revolver - 1] = { 4.0f, BLOCK(8), 16, (int)BLOCK(0.65f), 21, 21, 6, ScriptColor(192, 128, 0), 9, 3, true, false, true, false };
|
Weapons[(int)LaraWeaponType::Revolver - 1] = { 4.0f, BLOCK(8), 16, (int)BLOCK(0.65f), 21, 21, 6, ScriptColor(192, 128, 0), 9, 3, true, false, true, true, false, Vec3(-10, 130, 45) };
|
||||||
Weapons[(int)LaraWeaponType::Uzi - 1] = { 8.0f, BLOCK(8), 3, (int)BLOCK(0.65f), 1, 1, 30, ScriptColor(192, 128, 0), 9, 2, true, true, true, false };
|
Weapons[(int)LaraWeaponType::Uzi - 1] = { 8.0f, BLOCK(8), 3, (int)BLOCK(0.65f), 1, 1, 30, ScriptColor(192, 128, 0), 9, 2, true, true, true, true, false, Vec3( 0, 110, 40) };
|
||||||
Weapons[(int)LaraWeaponType::Shotgun - 1] = { 10.0f, BLOCK(8), 0, (int)BLOCK(0.50f), 3, 3, 6, ScriptColor(192, 128, 0), 12, 3, true, true, false, false };
|
Weapons[(int)LaraWeaponType::Shotgun - 1] = { 10.0f, BLOCK(8), 0, (int)BLOCK(0.50f), 3, 3, 6, ScriptColor(192, 128, 0), 12, 3, true, true, false, false, false, Vec3( 0, 210, 42) };
|
||||||
Weapons[(int)LaraWeaponType::HK - 1] = { 4.0f, BLOCK(12), 0, (int)BLOCK(0.50f), 4, 4, 30, ScriptColor(192, 128, 0), 12, 2, true, true, true, false };
|
Weapons[(int)LaraWeaponType::HK - 1] = { 4.0f, BLOCK(12), 0, (int)BLOCK(0.50f), 4, 4, 30, ScriptColor(192, 128, 0), 12, 2, true, true, true, true, false, Vec3( 0, 220, 102) };
|
||||||
Weapons[(int)LaraWeaponType::Crossbow - 1] = { 8.0f, BLOCK(8), 0, (int)BLOCK(0.50f), 5, 20, 10, ScriptColor(192, 128, 0), 0, 0, false, false, false, false };
|
Weapons[(int)LaraWeaponType::Crossbow - 1] = { 8.0f, BLOCK(8), 0, (int)BLOCK(0.50f), 5, 20, 10, ScriptColor(192, 128, 0), 0, 0, false, false, false, false, false, Vec3() };
|
||||||
Weapons[(int)LaraWeaponType::GrenadeLauncher - 1] = { 8.0f, BLOCK(8), 0, (int)BLOCK(0.50f), 30, 30, 10, ScriptColor(192, 128, 0), 0, 0, true, false, false, false };
|
Weapons[(int)LaraWeaponType::GrenadeLauncher - 1] = { 8.0f, BLOCK(8), 0, (int)BLOCK(0.50f), 30, 30, 10, ScriptColor(192, 128, 0), 0, 0, true, false, false, false, false, Vec3() };
|
||||||
Weapons[(int)LaraWeaponType::RocketLauncher - 1] = { 8.0f, BLOCK(8), 0, (int)BLOCK(0.50f), 30, 30, 1, ScriptColor(192, 128, 0), 0, 0, true, false, false, false };
|
Weapons[(int)LaraWeaponType::RocketLauncher - 1] = { 8.0f, BLOCK(8), 0, (int)BLOCK(0.50f), 30, 30, 1, ScriptColor(192, 128, 0), 0, 0, true, false, false, false, false, Vec3() };
|
||||||
Weapons[(int)LaraWeaponType::HarpoonGun - 1] = { 8.0f, BLOCK(8), 0, (int)BLOCK(0.50f), 6, 6, 10, ScriptColor(192, 128, 0), 0, 0, false, false, false, false };
|
Weapons[(int)LaraWeaponType::HarpoonGun - 1] = { 8.0f, BLOCK(8), 0, (int)BLOCK(0.50f), 6, 6, 10, ScriptColor(192, 128, 0), 0, 0, false, false, false, false, false, Vec3() };
|
||||||
}
|
}
|
||||||
|
|
||||||
void Settings::Register(sol::table& parent)
|
void Settings::Register(sol::table& parent)
|
||||||
|
@ -309,9 +309,17 @@ namespace TEN::Scripting
|
||||||
// @tfield bool muzzleFlash specifies whether muzzle flash should be displayed or not. Applicable only for firearms.
|
// @tfield bool muzzleFlash specifies whether muzzle flash should be displayed or not. Applicable only for firearms.
|
||||||
"muzzleFlash", &WeaponSettings::MuzzleFlash,
|
"muzzleFlash", &WeaponSettings::MuzzleFlash,
|
||||||
|
|
||||||
|
/// Display muzzle glow.
|
||||||
|
// @tfield bool muzzleGlow specifies whether muzzle glow should be displayed or not. Applicable only for firearms.
|
||||||
|
"muzzleGlow", &WeaponSettings::MuzzleGlow,
|
||||||
|
|
||||||
/// Colorize muzzle flash.
|
/// Colorize muzzle flash.
|
||||||
// @tfield bool colorizeMuzzleFlash specifies whether muzzle flash should be tinted with the same color as gunflash color. Applicable only for firearms.
|
// @tfield bool colorizeMuzzleFlash specifies whether muzzle flash should be tinted with the same color as gunflash color. Applicable only for firearms.
|
||||||
"colorizeMuzzleFlash", &WeaponSettings::ColorizeMuzzleFlash);
|
"colorizeMuzzleFlash", &WeaponSettings::ColorizeMuzzleFlash,
|
||||||
|
|
||||||
|
/// Muzzle offset.
|
||||||
|
// @tfield Vec3 muzzleOffset specifies offset for spawning muzzle gunflash effects. Applicable only for firearms.
|
||||||
|
"muzzleOffset", &WeaponSettings::MuzzleOffset);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// System
|
/// System
|
||||||
|
|
|
@ -103,7 +103,9 @@ namespace TEN::Scripting
|
||||||
bool Smoke = false;
|
bool Smoke = false;
|
||||||
bool Shell = false;
|
bool Shell = false;
|
||||||
bool MuzzleFlash = true;
|
bool MuzzleFlash = true;
|
||||||
|
bool MuzzleGlow = true;
|
||||||
bool ColorizeMuzzleFlash = false;
|
bool ColorizeMuzzleFlash = false;
|
||||||
|
Vec3 MuzzleOffset = {};
|
||||||
|
|
||||||
static void Register(sol::table& parent);
|
static void Register(sol::table& parent);
|
||||||
};
|
};
|
||||||
|
|
|
@ -20,7 +20,7 @@ namespace TEN::Scripting::Input
|
||||||
/// Vibrate the game controller if the function is available and the setting is on.
|
/// Vibrate the game controller if the function is available and the setting is on.
|
||||||
// @function Vibrate
|
// @function Vibrate
|
||||||
// @tparam float strength Vibration strength.
|
// @tparam float strength Vibration strength.
|
||||||
// @tparam float time __(default 0.3)__ Vibration time in seconds.
|
// @tparam[opt=0.3] float time Vibration time in seconds.
|
||||||
static void Vibrate(float strength, sol::optional<float> time)
|
static void Vibrate(float strength, sol::optional<float> time)
|
||||||
{
|
{
|
||||||
Rumble(strength, time.value_or(0.3f), RumbleMode::Both);
|
Rumble(strength, time.value_or(0.3f), RumbleMode::Both);
|
||||||
|
|
|
@ -430,13 +430,13 @@ void Moveable::SetPosition(const Vec3& pos, sol::optional<bool> updateRoom)
|
||||||
|
|
||||||
/// Get the moveable's joint position with an optional relative offset.
|
/// Get the moveable's joint position with an optional relative offset.
|
||||||
// @function Moveable:GetJointPosition
|
// @function Moveable:GetJointPosition
|
||||||
// @tparam int jointID Joint ID.
|
// @tparam int jointIndex Index of a joint to get position.
|
||||||
// @tparam[opt] Vec3 offset Offset relative to the joint.
|
// @tparam[opt] Vec3 offset Offset relative to the joint.
|
||||||
// @treturn Vec3 World position.
|
// @treturn Vec3 World position.
|
||||||
Vec3 Moveable::GetJointPos(int jointID, sol::optional<Vec3> offset) const
|
Vec3 Moveable::GetJointPos(int jointIndex, sol::optional<Vec3> offset) const
|
||||||
{
|
{
|
||||||
auto convertedOffset = offset.has_value() ? offset->ToVector3i() : Vector3i::Zero;
|
auto convertedOffset = offset.has_value() ? offset->ToVector3i() : Vector3i::Zero;
|
||||||
return Vec3(GetJointPosition(_moveable, jointID, convertedOffset));
|
return Vec3(GetJointPosition(_moveable, jointIndex, convertedOffset));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Get the object's joint rotation
|
/// Get the object's joint rotation
|
||||||
|
@ -1240,7 +1240,6 @@ bool Moveable::MeshExists(int index) const
|
||||||
// @tparam int mesh Mesh of a target moveable to use as a camera target.
|
// @tparam int mesh Mesh of a target moveable to use as a camera target.
|
||||||
void Moveable::AttachObjCamera(short camMeshId, Moveable& mov, short targetMeshId)
|
void Moveable::AttachObjCamera(short camMeshId, Moveable& mov, short targetMeshId)
|
||||||
{
|
{
|
||||||
if ((_moveable->Active || _moveable->IsLara()) && (mov._moveable->Active || mov._moveable->IsLara()))
|
|
||||||
ObjCamera(_moveable, camMeshId, mov._moveable, targetMeshId, true);
|
ObjCamera(_moveable, camMeshId, mov._moveable, targetMeshId, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -107,7 +107,7 @@ Vec2 Vec2::Translate(const Vec2& dir, float dist)
|
||||||
|
|
||||||
/// Get a copy of this Vec2 translated in the direction of the input rotation in degrees by the input distance.
|
/// Get a copy of this Vec2 translated in the direction of the input rotation in degrees by the input distance.
|
||||||
// @function Vec2:Translate
|
// @function Vec2:Translate
|
||||||
// @tparam Rotation rot Rotation in degrees defining the direction.
|
// @tparam float rot Rotation in degrees defining the direction.
|
||||||
// @tparam float dist Distance.
|
// @tparam float dist Distance.
|
||||||
// @treturn Vec2 Translated vector.
|
// @treturn Vec2 Translated vector.
|
||||||
Vec2 Vec2::Translate(float rot, float dist)
|
Vec2 Vec2::Translate(float rot, float dist)
|
||||||
|
|
|
@ -95,6 +95,9 @@ PixelShaderOutput PS(PixelShaderInput input)
|
||||||
samplePosition = samplePosition * 0.5f + 0.5f;
|
samplePosition = samplePosition * 0.5f + 0.5f;
|
||||||
samplePosition.y = 1.0f - samplePosition.y;
|
samplePosition.y = 1.0f - samplePosition.y;
|
||||||
occlusion = pow(SSAOTexture.Sample(SSAOSampler, samplePosition).x, AmbientOcclusionExponent);
|
occlusion = pow(SSAOTexture.Sample(SSAOSampler, samplePosition).x, AmbientOcclusionExponent);
|
||||||
|
|
||||||
|
if (BlendMode == BLENDMODE_ALPHABLEND)
|
||||||
|
occlusion = lerp(occlusion, 1.0f, tex.w);
|
||||||
}
|
}
|
||||||
|
|
||||||
float3 color = (mode == 0) ?
|
float3 color = (mode == 0) ?
|
||||||
|
|
|
@ -128,6 +128,9 @@ PixelShaderOutput PS(PixelShaderInput input)
|
||||||
samplePosition = samplePosition * 0.5f + 0.5f; // transform to range 0.0 - 1.0
|
samplePosition = samplePosition * 0.5f + 0.5f; // transform to range 0.0 - 1.0
|
||||||
samplePosition.y = 1.0f - samplePosition.y;
|
samplePosition.y = 1.0f - samplePosition.y;
|
||||||
occlusion = pow(SSAOTexture.Sample(SSAOSampler, samplePosition).x, AmbientOcclusionExponent);
|
occlusion = pow(SSAOTexture.Sample(SSAOSampler, samplePosition).x, AmbientOcclusionExponent);
|
||||||
|
|
||||||
|
if (BlendMode == BLENDMODE_ALPHABLEND)
|
||||||
|
occlusion = lerp(occlusion, 1.0f, tex.w);
|
||||||
}
|
}
|
||||||
|
|
||||||
float3 color = (BoneLightModes[input.Bone / 4][input.Bone % 4] == 0) ?
|
float3 color = (BoneLightModes[input.Bone / 4][input.Bone % 4] == 0) ?
|
||||||
|
|
|
@ -153,6 +153,9 @@ PixelShaderOutput PS(PixelShaderInput input)
|
||||||
samplePosition = samplePosition * 0.5f + 0.5f; // transform to range 0.0 - 1.0
|
samplePosition = samplePosition * 0.5f + 0.5f; // transform to range 0.0 - 1.0
|
||||||
samplePosition.y = 1.0f - samplePosition.y;
|
samplePosition.y = 1.0f - samplePosition.y;
|
||||||
occlusion = pow(SSAOTexture.Sample(SSAOSampler, samplePosition).x, AmbientOcclusionExponent);
|
occlusion = pow(SSAOTexture.Sample(SSAOSampler, samplePosition).x, AmbientOcclusionExponent);
|
||||||
|
|
||||||
|
if (BlendMode == BLENDMODE_ALPHABLEND)
|
||||||
|
occlusion = lerp(occlusion, 1.0f, output.Color.w);
|
||||||
}
|
}
|
||||||
|
|
||||||
lighting = DoShadow(input.WorldPosition, normal, lighting, -2.5f);
|
lighting = DoShadow(input.WorldPosition, normal, lighting, -2.5f);
|
||||||
|
|
|
@ -571,6 +571,7 @@ struct LevelDataT : public flatbuffers::NativeTable {
|
||||||
std::unique_ptr<TEN::Save::Vector3> horizon2_position{};
|
std::unique_ptr<TEN::Save::Vector3> horizon2_position{};
|
||||||
std::unique_ptr<TEN::Save::EulerAngles> horizon2_orientation{};
|
std::unique_ptr<TEN::Save::EulerAngles> horizon2_orientation{};
|
||||||
float horizon2_transparency = 0.0f;
|
float horizon2_transparency = 0.0f;
|
||||||
|
bool lensflare_enabled = false;
|
||||||
int32_t lensflare_sprite_id = 0;
|
int32_t lensflare_sprite_id = 0;
|
||||||
float lensflare_pitch = 0.0f;
|
float lensflare_pitch = 0.0f;
|
||||||
float lensflare_yaw = 0.0f;
|
float lensflare_yaw = 0.0f;
|
||||||
|
@ -610,14 +611,15 @@ struct LevelData FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
|
||||||
VT_HORIZON2_POSITION = 46,
|
VT_HORIZON2_POSITION = 46,
|
||||||
VT_HORIZON2_ORIENTATION = 48,
|
VT_HORIZON2_ORIENTATION = 48,
|
||||||
VT_HORIZON2_TRANSPARENCY = 50,
|
VT_HORIZON2_TRANSPARENCY = 50,
|
||||||
VT_LENSFLARE_SPRITE_ID = 52,
|
VT_LENSFLARE_ENABLED = 52,
|
||||||
VT_LENSFLARE_PITCH = 54,
|
VT_LENSFLARE_SPRITE_ID = 54,
|
||||||
VT_LENSFLARE_YAW = 56,
|
VT_LENSFLARE_PITCH = 56,
|
||||||
VT_LENSFLARE_COLOR = 58,
|
VT_LENSFLARE_YAW = 58,
|
||||||
VT_STARFIELD_STAR_COUNT = 60,
|
VT_LENSFLARE_COLOR = 60,
|
||||||
VT_STARFIELD_METEOR_COUNT = 62,
|
VT_STARFIELD_STAR_COUNT = 62,
|
||||||
VT_STARFIELD_METEOR_SPAWN_DENSITY = 64,
|
VT_STARFIELD_METEOR_COUNT = 64,
|
||||||
VT_STARFIELD_METEOR_VELOCITY = 66
|
VT_STARFIELD_METEOR_SPAWN_DENSITY = 66,
|
||||||
|
VT_STARFIELD_METEOR_VELOCITY = 68
|
||||||
};
|
};
|
||||||
int32_t level_far_view() const {
|
int32_t level_far_view() const {
|
||||||
return GetField<int32_t>(VT_LEVEL_FAR_VIEW, 0);
|
return GetField<int32_t>(VT_LEVEL_FAR_VIEW, 0);
|
||||||
|
@ -691,6 +693,9 @@ struct LevelData FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
|
||||||
float horizon2_transparency() const {
|
float horizon2_transparency() const {
|
||||||
return GetField<float>(VT_HORIZON2_TRANSPARENCY, 0.0f);
|
return GetField<float>(VT_HORIZON2_TRANSPARENCY, 0.0f);
|
||||||
}
|
}
|
||||||
|
bool lensflare_enabled() const {
|
||||||
|
return GetField<uint8_t>(VT_LENSFLARE_ENABLED, 0) != 0;
|
||||||
|
}
|
||||||
int32_t lensflare_sprite_id() const {
|
int32_t lensflare_sprite_id() const {
|
||||||
return GetField<int32_t>(VT_LENSFLARE_SPRITE_ID, 0);
|
return GetField<int32_t>(VT_LENSFLARE_SPRITE_ID, 0);
|
||||||
}
|
}
|
||||||
|
@ -741,6 +746,7 @@ struct LevelData FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
|
||||||
VerifyField<TEN::Save::Vector3>(verifier, VT_HORIZON2_POSITION) &&
|
VerifyField<TEN::Save::Vector3>(verifier, VT_HORIZON2_POSITION) &&
|
||||||
VerifyField<TEN::Save::EulerAngles>(verifier, VT_HORIZON2_ORIENTATION) &&
|
VerifyField<TEN::Save::EulerAngles>(verifier, VT_HORIZON2_ORIENTATION) &&
|
||||||
VerifyField<float>(verifier, VT_HORIZON2_TRANSPARENCY) &&
|
VerifyField<float>(verifier, VT_HORIZON2_TRANSPARENCY) &&
|
||||||
|
VerifyField<uint8_t>(verifier, VT_LENSFLARE_ENABLED) &&
|
||||||
VerifyField<int32_t>(verifier, VT_LENSFLARE_SPRITE_ID) &&
|
VerifyField<int32_t>(verifier, VT_LENSFLARE_SPRITE_ID) &&
|
||||||
VerifyField<float>(verifier, VT_LENSFLARE_PITCH) &&
|
VerifyField<float>(verifier, VT_LENSFLARE_PITCH) &&
|
||||||
VerifyField<float>(verifier, VT_LENSFLARE_YAW) &&
|
VerifyField<float>(verifier, VT_LENSFLARE_YAW) &&
|
||||||
|
@ -832,6 +838,9 @@ struct LevelDataBuilder {
|
||||||
void add_horizon2_transparency(float horizon2_transparency) {
|
void add_horizon2_transparency(float horizon2_transparency) {
|
||||||
fbb_.AddElement<float>(LevelData::VT_HORIZON2_TRANSPARENCY, horizon2_transparency, 0.0f);
|
fbb_.AddElement<float>(LevelData::VT_HORIZON2_TRANSPARENCY, horizon2_transparency, 0.0f);
|
||||||
}
|
}
|
||||||
|
void add_lensflare_enabled(bool lensflare_enabled) {
|
||||||
|
fbb_.AddElement<uint8_t>(LevelData::VT_LENSFLARE_ENABLED, static_cast<uint8_t>(lensflare_enabled), 0);
|
||||||
|
}
|
||||||
void add_lensflare_sprite_id(int32_t lensflare_sprite_id) {
|
void add_lensflare_sprite_id(int32_t lensflare_sprite_id) {
|
||||||
fbb_.AddElement<int32_t>(LevelData::VT_LENSFLARE_SPRITE_ID, lensflare_sprite_id, 0);
|
fbb_.AddElement<int32_t>(LevelData::VT_LENSFLARE_SPRITE_ID, lensflare_sprite_id, 0);
|
||||||
}
|
}
|
||||||
|
@ -893,6 +902,7 @@ inline flatbuffers::Offset<LevelData> CreateLevelData(
|
||||||
const TEN::Save::Vector3 *horizon2_position = 0,
|
const TEN::Save::Vector3 *horizon2_position = 0,
|
||||||
const TEN::Save::EulerAngles *horizon2_orientation = 0,
|
const TEN::Save::EulerAngles *horizon2_orientation = 0,
|
||||||
float horizon2_transparency = 0.0f,
|
float horizon2_transparency = 0.0f,
|
||||||
|
bool lensflare_enabled = false,
|
||||||
int32_t lensflare_sprite_id = 0,
|
int32_t lensflare_sprite_id = 0,
|
||||||
float lensflare_pitch = 0.0f,
|
float lensflare_pitch = 0.0f,
|
||||||
float lensflare_yaw = 0.0f,
|
float lensflare_yaw = 0.0f,
|
||||||
|
@ -928,6 +938,7 @@ inline flatbuffers::Offset<LevelData> CreateLevelData(
|
||||||
builder_.add_weather_strength(weather_strength);
|
builder_.add_weather_strength(weather_strength);
|
||||||
builder_.add_weather_type(weather_type);
|
builder_.add_weather_type(weather_type);
|
||||||
builder_.add_level_far_view(level_far_view);
|
builder_.add_level_far_view(level_far_view);
|
||||||
|
builder_.add_lensflare_enabled(lensflare_enabled);
|
||||||
builder_.add_horizon2_enabled(horizon2_enabled);
|
builder_.add_horizon2_enabled(horizon2_enabled);
|
||||||
builder_.add_horizon1_enabled(horizon1_enabled);
|
builder_.add_horizon1_enabled(horizon1_enabled);
|
||||||
builder_.add_sky_layer_2_enabled(sky_layer_2_enabled);
|
builder_.add_sky_layer_2_enabled(sky_layer_2_enabled);
|
||||||
|
@ -9260,6 +9271,7 @@ inline void LevelData::UnPackTo(LevelDataT *_o, const flatbuffers::resolver_func
|
||||||
{ auto _e = horizon2_position(); if (_e) _o->horizon2_position = std::unique_ptr<TEN::Save::Vector3>(new TEN::Save::Vector3(*_e)); }
|
{ auto _e = horizon2_position(); if (_e) _o->horizon2_position = std::unique_ptr<TEN::Save::Vector3>(new TEN::Save::Vector3(*_e)); }
|
||||||
{ auto _e = horizon2_orientation(); if (_e) _o->horizon2_orientation = std::unique_ptr<TEN::Save::EulerAngles>(new TEN::Save::EulerAngles(*_e)); }
|
{ auto _e = horizon2_orientation(); if (_e) _o->horizon2_orientation = std::unique_ptr<TEN::Save::EulerAngles>(new TEN::Save::EulerAngles(*_e)); }
|
||||||
{ auto _e = horizon2_transparency(); _o->horizon2_transparency = _e; }
|
{ auto _e = horizon2_transparency(); _o->horizon2_transparency = _e; }
|
||||||
|
{ auto _e = lensflare_enabled(); _o->lensflare_enabled = _e; }
|
||||||
{ auto _e = lensflare_sprite_id(); _o->lensflare_sprite_id = _e; }
|
{ auto _e = lensflare_sprite_id(); _o->lensflare_sprite_id = _e; }
|
||||||
{ auto _e = lensflare_pitch(); _o->lensflare_pitch = _e; }
|
{ auto _e = lensflare_pitch(); _o->lensflare_pitch = _e; }
|
||||||
{ auto _e = lensflare_yaw(); _o->lensflare_yaw = _e; }
|
{ auto _e = lensflare_yaw(); _o->lensflare_yaw = _e; }
|
||||||
|
@ -9302,6 +9314,7 @@ inline flatbuffers::Offset<LevelData> CreateLevelData(flatbuffers::FlatBufferBui
|
||||||
auto _horizon2_position = _o->horizon2_position ? _o->horizon2_position.get() : 0;
|
auto _horizon2_position = _o->horizon2_position ? _o->horizon2_position.get() : 0;
|
||||||
auto _horizon2_orientation = _o->horizon2_orientation ? _o->horizon2_orientation.get() : 0;
|
auto _horizon2_orientation = _o->horizon2_orientation ? _o->horizon2_orientation.get() : 0;
|
||||||
auto _horizon2_transparency = _o->horizon2_transparency;
|
auto _horizon2_transparency = _o->horizon2_transparency;
|
||||||
|
auto _lensflare_enabled = _o->lensflare_enabled;
|
||||||
auto _lensflare_sprite_id = _o->lensflare_sprite_id;
|
auto _lensflare_sprite_id = _o->lensflare_sprite_id;
|
||||||
auto _lensflare_pitch = _o->lensflare_pitch;
|
auto _lensflare_pitch = _o->lensflare_pitch;
|
||||||
auto _lensflare_yaw = _o->lensflare_yaw;
|
auto _lensflare_yaw = _o->lensflare_yaw;
|
||||||
|
@ -9336,6 +9349,7 @@ inline flatbuffers::Offset<LevelData> CreateLevelData(flatbuffers::FlatBufferBui
|
||||||
_horizon2_position,
|
_horizon2_position,
|
||||||
_horizon2_orientation,
|
_horizon2_orientation,
|
||||||
_horizon2_transparency,
|
_horizon2_transparency,
|
||||||
|
_lensflare_enabled,
|
||||||
_lensflare_sprite_id,
|
_lensflare_sprite_id,
|
||||||
_lensflare_pitch,
|
_lensflare_pitch,
|
||||||
_lensflare_yaw,
|
_lensflare_yaw,
|
||||||
|
|
|
@ -38,6 +38,7 @@ table LevelData {
|
||||||
horizon2_orientation: EulerAngles;
|
horizon2_orientation: EulerAngles;
|
||||||
horizon2_transparency: float;
|
horizon2_transparency: float;
|
||||||
|
|
||||||
|
lensflare_enabled: bool;
|
||||||
lensflare_sprite_id: int32;
|
lensflare_sprite_id: int32;
|
||||||
lensflare_pitch: float;
|
lensflare_pitch: float;
|
||||||
lensflare_yaw: float;
|
lensflare_yaw: float;
|
||||||
|
|
|
@ -1,19 +1,12 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#define TE_MAJOR_VERSION 1
|
|
||||||
#define TE_MINOR_VERSION 8
|
|
||||||
#define TE_BUILD_NUMBER 1
|
|
||||||
#define TE_REVISION_NUMBER 0
|
|
||||||
|
|
||||||
#define TEN_MAJOR_VERSION 1
|
#define TEN_MAJOR_VERSION 1
|
||||||
#define TEN_MINOR_VERSION 8
|
#define TEN_MINOR_VERSION 8
|
||||||
#define TEN_BUILD_NUMBER 1
|
#define TEN_BUILD_NUMBER 2
|
||||||
#define TEN_REVISION_NUMBER 0
|
#define TEN_REVISION_NUMBER 0
|
||||||
|
|
||||||
#define TEST_BUILD 1
|
#define TEST_BUILD 1
|
||||||
|
|
||||||
#define TOSTR(x) #x
|
#define TOSTR(x) #x
|
||||||
#define MAKE_VERSION_STRING(major, minor, build, revision) TOSTR(major) "." TOSTR(minor) "." TOSTR(build) "." TOSTR(revision)
|
#define MAKE_VERSION_STRING(major, minor, build, revision) TOSTR(major) "." TOSTR(minor) "." TOSTR(build) "." TOSTR(revision)
|
||||||
|
|
||||||
#define TE_VERSION_STRING MAKE_VERSION_STRING(TE_MAJOR_VERSION, TE_MINOR_VERSION, TE_BUILD_NUMBER, TE_REVISION_NUMBER)
|
|
||||||
#define TEN_VERSION_STRING MAKE_VERSION_STRING(TEN_MAJOR_VERSION, TEN_MINOR_VERSION, TEN_BUILD_NUMBER, TEN_REVISION_NUMBER)
|
#define TEN_VERSION_STRING MAKE_VERSION_STRING(TEN_MAJOR_VERSION, TEN_MINOR_VERSION, TEN_BUILD_NUMBER, TEN_REVISION_NUMBER)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue