mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-04-28 15:57:59 +03:00
Squashed commit of the following:
commite50a4f8c27
Author: TrainWrack <120750885+TrainWrack@users.noreply.github.com> Date: Wed Dec 25 20:07:56 2024 -0500 Doc Revision commit39a6e713ce
Author: TrainWrack <120750885+TrainWrack@users.noreply.github.com> Date: Wed Dec 25 20:02:47 2024 -0500 Doc revisions commitc330343820
Author: TrainWrack <120750885+TrainWrack@users.noreply.github.com> Date: Wed Dec 25 19:52:59 2024 -0500 Update CHANGELOG.md commitad62d7b605
Author: TrainWrack <120750885+TrainWrack@users.noreply.github.com> Date: Wed Dec 25 19:42:32 2024 -0500 Check commite135195641
Author: TrainWrack <120750885+TrainWrack@users.noreply.github.com> Date: Wed Dec 25 19:26:23 2024 -0500 First Commit commit4a6c6ee270
Author: TrainWrack <120750885+TrainWrack@users.noreply.github.com> Date: Wed Dec 25 19:19:05 2024 -0500 Update EffectsFunctions.cpp
This commit is contained in:
parent
aa0868b955
commit
ff2e49c6ed
4 changed files with 55 additions and 0 deletions
|
@ -11,6 +11,7 @@ TombEngine releases are located in this repository (alongside with Tomb Editor):
|
||||||
* Added ability to use keys and puzzle items underwater.
|
* Added ability to use keys and puzzle items underwater.
|
||||||
*
|
*
|
||||||
### Lua API changes
|
### Lua API changes
|
||||||
|
* Added Effects.EmitAirBubble() function to spawn air bubbles.
|
||||||
|
|
||||||
## [Version 1.7](https://github.com/TombEngine/TombEditorReleases/releases/tag/v1.7.3) - 2024-12-25
|
## [Version 1.7](https://github.com/TombEngine/TombEditorReleases/releases/tag/v1.7.3) - 2024-12-25
|
||||||
|
|
||||||
|
|
|
@ -140,6 +140,10 @@
|
||||||
<td class="summary">Emit blood.</td>
|
<td class="summary">Emit blood.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
<td class="name" ><a href="#EmitAirBubble">EmitAirBubble(position, roomNumber, size, amplitude)</a></td>
|
||||||
|
<td class="summary">Emit Air bubble in a water room.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
<td class="name" ><a href="#EmitFire">EmitFire(pos, size)</a></td>
|
<td class="name" ><a href="#EmitFire">EmitFire(pos, size)</a></td>
|
||||||
<td class="summary">Emit fire for one frame.</td>
|
<td class="summary">Emit fire for one frame.</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -495,6 +499,40 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt>
|
||||||
|
<a name = "EmitAirBubble"></a>
|
||||||
|
<strong>EmitAirBubble(position, roomNumber, size, amplitude)</strong>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
Emit Air bubble in a water room.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h3>Parameters:</h3>
|
||||||
|
<ul>
|
||||||
|
<li><span class="parameter">position</span>
|
||||||
|
<span class="types"><a class="type" href="../3 primitive classes/Vec3.html#">Vec3</a></span>
|
||||||
|
The position where the air bubble will be spawned.
|
||||||
|
</li>
|
||||||
|
<li><span class="parameter">roomNumber</span>
|
||||||
|
<span class="types"><span class="type">int</span></span>
|
||||||
|
The room number where the air bubble will be generated.
|
||||||
|
</li>
|
||||||
|
<li><span class="parameter">size</span>
|
||||||
|
<span class="types"><span class="type">float</span></span>
|
||||||
|
The size of the air bubble.
|
||||||
|
</li>
|
||||||
|
<li><span class="parameter">amplitude</span>
|
||||||
|
<span class="types"><span class="type">float</span></span>
|
||||||
|
The oscillation amplitude of the air bubble.
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "EmitFire"></a>
|
<a name = "EmitFire"></a>
|
||||||
|
|
|
@ -323,6 +323,7 @@ static constexpr char ScriptReserved_EmitShockwave[] = "EmitShockwave";
|
||||||
static constexpr char ScriptReserved_EmitLight[] = "EmitLight";
|
static constexpr char ScriptReserved_EmitLight[] = "EmitLight";
|
||||||
static constexpr char ScriptReserved_EmitSpotLight[] = "EmitSpotLight";
|
static constexpr char ScriptReserved_EmitSpotLight[] = "EmitSpotLight";
|
||||||
static constexpr char ScriptReserved_EmitBlood[] = "EmitBlood";
|
static constexpr char ScriptReserved_EmitBlood[] = "EmitBlood";
|
||||||
|
static constexpr char ScriptReserved_EmitAirBubble[] = "EmitAirBubble";
|
||||||
static constexpr char ScriptReserved_EmitFire[] = "EmitFire";
|
static constexpr char ScriptReserved_EmitFire[] = "EmitFire";
|
||||||
static constexpr char ScriptReserved_MakeExplosion[] = "MakeExplosion";
|
static constexpr char ScriptReserved_MakeExplosion[] = "MakeExplosion";
|
||||||
static constexpr char ScriptReserved_MakeEarthquake[] = "MakeEarthquake";
|
static constexpr char ScriptReserved_MakeEarthquake[] = "MakeEarthquake";
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
#include "Game/effects/spark.h"
|
#include "Game/effects/spark.h"
|
||||||
#include "Game/effects/tomb4fx.h"
|
#include "Game/effects/tomb4fx.h"
|
||||||
#include "Game/effects/weather.h"
|
#include "Game/effects/weather.h"
|
||||||
|
#include "Game/effects/Bubble.h"
|
||||||
#include "Game/Setup.h"
|
#include "Game/Setup.h"
|
||||||
#include "Objects/Utils/object_helper.h"
|
#include "Objects/Utils/object_helper.h"
|
||||||
#include "Scripting/Internal/LuaHandler.h"
|
#include "Scripting/Internal/LuaHandler.h"
|
||||||
|
@ -36,6 +37,7 @@ using namespace TEN::Effects::Electricity;
|
||||||
using namespace TEN::Effects::Environment;
|
using namespace TEN::Effects::Environment;
|
||||||
using namespace TEN::Effects::Explosion;
|
using namespace TEN::Effects::Explosion;
|
||||||
using namespace TEN::Effects::Spark;
|
using namespace TEN::Effects::Spark;
|
||||||
|
using namespace TEN::Effects::Bubble;
|
||||||
|
|
||||||
namespace TEN::Scripting::Effects
|
namespace TEN::Scripting::Effects
|
||||||
{
|
{
|
||||||
|
@ -303,6 +305,18 @@ namespace TEN::Scripting::Effects
|
||||||
TriggerBlood(pos.x, pos.y, pos.z, -1, USE_IF_HAVE(int, num, 1));
|
TriggerBlood(pos.x, pos.y, pos.z, -1, USE_IF_HAVE(int, num, 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/***Emit Air bubble in a water room.
|
||||||
|
@function EmitAirBubble
|
||||||
|
@tparam Vec3 position The position where the air bubble will be spawned.
|
||||||
|
@tparam int roomNumber The room number where the air bubble will be generated.
|
||||||
|
@tparam float size The size of the air bubble.
|
||||||
|
@tparam float amplitude The oscillation amplitude of the air bubble.
|
||||||
|
*/
|
||||||
|
static void EmitAirBubble(Vec3 pos, int roomNumber, float size, float amplitude)
|
||||||
|
{
|
||||||
|
SpawnBubble(pos, roomNumber, size, amplitude);
|
||||||
|
}
|
||||||
|
|
||||||
/***Emit fire for one frame. Will not hurt Lara. Call this each frame if you want a continuous fire.
|
/***Emit fire for one frame. Will not hurt Lara. Call this each frame if you want a continuous fire.
|
||||||
@function EmitFire
|
@function EmitFire
|
||||||
@tparam Vec3 pos
|
@tparam Vec3 pos
|
||||||
|
@ -354,6 +368,7 @@ namespace TEN::Scripting::Effects
|
||||||
tableEffects.set_function(ScriptReserved_EmitLight, &EmitLight);
|
tableEffects.set_function(ScriptReserved_EmitLight, &EmitLight);
|
||||||
tableEffects.set_function(ScriptReserved_EmitSpotLight, &EmitSpotLight);
|
tableEffects.set_function(ScriptReserved_EmitSpotLight, &EmitSpotLight);
|
||||||
tableEffects.set_function(ScriptReserved_EmitBlood, &EmitBlood);
|
tableEffects.set_function(ScriptReserved_EmitBlood, &EmitBlood);
|
||||||
|
tableEffects.set_function(ScriptReserved_EmitAirBubble, &EmitAirBubble);
|
||||||
tableEffects.set_function(ScriptReserved_MakeExplosion, &MakeExplosion);
|
tableEffects.set_function(ScriptReserved_MakeExplosion, &MakeExplosion);
|
||||||
tableEffects.set_function(ScriptReserved_EmitFire, &EmitFire);
|
tableEffects.set_function(ScriptReserved_EmitFire, &EmitFire);
|
||||||
tableEffects.set_function(ScriptReserved_MakeEarthquake, &Earthquake);
|
tableEffects.set_function(ScriptReserved_MakeEarthquake, &Earthquake);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue