mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-04-28 15:57:59 +03:00
Minor changes
This commit is contained in:
parent
04b659b410
commit
b62c8d7c40
6 changed files with 122 additions and 121 deletions
|
@ -171,18 +171,26 @@ pickups, and Lara herself (see also <a href="../2 classes/Objects.LaraObject.htm
|
|||
<td class="summary">Retrieve the index of the current animation.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" ><a href="#Moveable:GetAnimSlot">Moveable:GetAnimSlot()</a></td>
|
||||
<td class="summary">Retrieve the slot ID of the animation.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<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>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" ><a href="#Moveable:GetAnimSlot">Moveable:GetAnimSlot()</a></td>
|
||||
<td class="summary">Retrieve the slot ID of the animation.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" ><a href="#Moveable:GetFrame">Moveable:GetFrame()</a></td>
|
||||
<td class="summary">Retrieve frame number.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" ><a href="#Moveable:SetFrame">Moveable:SetFrame(frame)</a></td>
|
||||
<td class="summary">Set frame number.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" ><a href="#Moveable:GetEndFrame">Moveable:GetEndFrame()</a></td>
|
||||
<td class="summary">Get the end frame number of the moveable's active animation.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" ><a href="#Moveable:SetVelocity">Moveable:SetVelocity(velocity)</a></td>
|
||||
<td class="summary">Set the object's velocity to specified value.</td>
|
||||
</tr>
|
||||
|
@ -191,10 +199,6 @@ pickups, and Lara herself (see also <a href="../2 classes/Objects.LaraObject.htm
|
|||
<td class="summary">Get the object's velocity.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" ><a href="#Moveable:SetFrame">Moveable:SetFrame(frame)</a></td>
|
||||
<td class="summary">Set frame number.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" ><a href="#Moveable:GetHP">Moveable:GetHP()</a></td>
|
||||
<td class="summary">Get current HP (hit points/health points)</td>
|
||||
</tr>
|
||||
|
@ -328,10 +332,6 @@ pickups, and Lara herself (see also <a href="../2 classes/Objects.LaraObject.htm
|
|||
<td class="summary">Set AIBits of object
|
||||
Use this to force a moveable into a certain AI mode or modes, as if a certain nullmesh
|
||||
(or more than one) had suddenly spawned beneath their feet.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" ><a href="#Moveable:GetEndFrame">Moveable:GetEndFrame()</a></td>
|
||||
<td class="summary">Get the end frame number of the moveable's active animation.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" ><a href="#Moveable:GetRoom">Moveable:GetRoom()</a></td>
|
||||
|
@ -778,29 +778,6 @@ shiva:SetObjectID(TEN.Objects.ObjID.BIGMEDI_ITEM)</pre>
|
|||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "Moveable:GetAnimSlot"></a>
|
||||
<strong>Moveable:GetAnimSlot()</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Retrieve the slot ID of the animation.
|
||||
In certain cases, moveable may play animations from another object slot. Use this
|
||||
function when you need to identify such cases.
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><span class="type">int</span></span>
|
||||
animation slot ID
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "Moveable:SetAnim"></a>
|
||||
|
@ -830,6 +807,29 @@ shiva:SetObjectID(TEN.Objects.ObjID.BIGMEDI_ITEM)</pre>
|
|||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "Moveable:GetAnimSlot"></a>
|
||||
<strong>Moveable:GetAnimSlot()</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Retrieve the slot ID of the animation.
|
||||
In certain cases, moveable may play animations from another object slot. Use this
|
||||
function when you need to identify such cases.
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><span class="type">int</span></span>
|
||||
animation slot ID
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "Moveable:GetFrame"></a>
|
||||
|
@ -852,6 +852,54 @@ shiva:SetObjectID(TEN.Objects.ObjID.BIGMEDI_ITEM)</pre>
|
|||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "Moveable:SetFrame"></a>
|
||||
<strong>Moveable:SetFrame(frame)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Set frame number.
|
||||
This will move the animation to the given frame.
|
||||
The number of frames in an animation can be seen under the heading "End frame" in
|
||||
the WadTool animation editor. If the animation has no frames, the only valid argument
|
||||
is -1.
|
||||
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">frame</span>
|
||||
<span class="types"><span class="type">int</span></span>
|
||||
the new frame number
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "Moveable:GetEndFrame"></a>
|
||||
<strong>Moveable:GetEndFrame()</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Get the end frame number of the moveable's active animation.
|
||||
This is the "End Frame" set in WADTool for the animation.()
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><span class="type">int</span></span>
|
||||
End frame number of the active animation.
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "Moveable:SetVelocity"></a>
|
||||
|
@ -899,32 +947,6 @@ shiva:SetObjectID(TEN.Objects.ObjID.BIGMEDI_ITEM)</pre>
|
|||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "Moveable:SetFrame"></a>
|
||||
<strong>Moveable:SetFrame(frame)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Set frame number.
|
||||
This will move the animation to the given frame.
|
||||
The number of frames in an animation can be seen under the heading "End frame" in
|
||||
the WadTool animation editor. If the animation has no frames, the only valid argument
|
||||
is -1.
|
||||
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">frame</span>
|
||||
<span class="types"><span class="type">int</span></span>
|
||||
the new frame number
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "Moveable:GetHP"></a>
|
||||
|
@ -1693,28 +1715,6 @@ baddy:SetOnKilled(LevelFuncs.baddyKilled)</pre>
|
|||
sas:SetAIBits({<span class="number">1</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>})</pre>
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "Moveable:GetEndFrame"></a>
|
||||
<strong>Moveable:GetEndFrame()</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Get the end frame number of the moveable's active animation.
|
||||
This is the "End Frame" set in WADTool for the animation.()
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><span class="type">int</span></span>
|
||||
End frame number of the active animation.
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "Moveable:GetRoom"></a>
|
||||
|
|
|
@ -82,19 +82,19 @@ local settings = Flow.Settings.new()
|
|||
settings.Weapons[WeaponType.REVOLVER].colorizeMuzzleFlash = false
|
||||
settings.Weapons[WeaponType.REVOLVER].pickupCount = 6
|
||||
|
||||
settings.Weapons[WeaponType.UZI].accuracy = 8
|
||||
settings.Weapons[WeaponType.UZI].targetingDistance = 8192
|
||||
settings.Weapons[WeaponType.UZI].interval = 3
|
||||
settings.Weapons[WeaponType.UZI].waterLevel = 650
|
||||
settings.Weapons[WeaponType.UZI].flashDuration = 2
|
||||
settings.Weapons[WeaponType.UZI].flashRange = 9
|
||||
settings.Weapons[WeaponType.UZI].flashColor = Color(192, 128, 0)
|
||||
settings.Weapons[WeaponType.UZI].damage = 1
|
||||
settings.Weapons[WeaponType.UZI].smoke = true
|
||||
settings.Weapons[WeaponType.UZI].shell = true
|
||||
settings.Weapons[WeaponType.UZI].muzzleFlash = true
|
||||
settings.Weapons[WeaponType.UZI].colorizeMuzzleFlash = false
|
||||
settings.Weapons[WeaponType.UZI].pickupCount = 30
|
||||
settings.Weapons[WeaponType.UZIS].accuracy = 8
|
||||
settings.Weapons[WeaponType.UZIS].targetingDistance = 8192
|
||||
settings.Weapons[WeaponType.UZIS].interval = 3
|
||||
settings.Weapons[WeaponType.UZIS].waterLevel = 650
|
||||
settings.Weapons[WeaponType.UZIS].flashDuration = 2
|
||||
settings.Weapons[WeaponType.UZIS].flashRange = 9
|
||||
settings.Weapons[WeaponType.UZIS].flashColor = Color(192, 128, 0)
|
||||
settings.Weapons[WeaponType.UZIS].damage = 1
|
||||
settings.Weapons[WeaponType.UZIS].smoke = true
|
||||
settings.Weapons[WeaponType.UZIS].shell = true
|
||||
settings.Weapons[WeaponType.UZIS].muzzleFlash = true
|
||||
settings.Weapons[WeaponType.UZIS].colorizeMuzzleFlash = false
|
||||
settings.Weapons[WeaponType.UZIS].pickupCount = 30
|
||||
|
||||
settings.Weapons[WeaponType.SHOTGUN].accuracy = 10
|
||||
settings.Weapons[WeaponType.SHOTGUN].targetingDistance = 8192
|
||||
|
|
|
@ -4,13 +4,13 @@
|
|||
|
||||
#define index_error_maker(CPP_TYPE, LUA_CLASS_NAME) [](CPP_TYPE& item, sol::object key) \
|
||||
{ \
|
||||
std::string err = "Attempted to read missing var \"" + key.as<std::string>() + "\" from " + LUA_CLASS_NAME; \
|
||||
std::string err = "Attempted to read missing variable \"" + key.as<std::string>() + "\" from " + LUA_CLASS_NAME; \
|
||||
ScriptAssert(false, err);\
|
||||
}
|
||||
|
||||
#define newindex_error_maker(CPP_TYPE, LUA_CLASS_NAME) [](CPP_TYPE& item, sol::object key) \
|
||||
{ \
|
||||
std::string err = "Attempted to set missing var \"" + key.as<std::string>() + "\" of " + LUA_CLASS_NAME; \
|
||||
std::string err = "Attempted to set missing variable \"" + key.as<std::string>() + "\" of " + LUA_CLASS_NAME; \
|
||||
ScriptAssert(false, err);\
|
||||
}
|
||||
|
||||
|
|
|
@ -245,13 +245,6 @@ void Moveable::Register(sol::state& state, sol::table& parent)
|
|||
// @treturn int the index of the active animation
|
||||
ScriptReserved_GetAnimNumber, &Moveable::GetAnimNumber,
|
||||
|
||||
/// Retrieve the slot ID of the animation.
|
||||
// In certain cases, moveable may play animations from another object slot. Use this
|
||||
// function when you need to identify such cases.
|
||||
// @function Moveable:GetAnimSlot
|
||||
// @treturn int animation slot ID
|
||||
ScriptReserved_GetAnimSlot, &Moveable::GetAnimSlot,
|
||||
|
||||
/// Set the object's animation to the one specified by the given index.
|
||||
// Performs no bounds checking. *Ensure the number given is correct, else
|
||||
// object may end up in corrupted animation state.*
|
||||
|
@ -260,12 +253,33 @@ void Moveable::Register(sol::state& state, sol::table& parent)
|
|||
// @tparam[opt] int slot slot ID of the desired anim (if omitted, moveable's own slot ID is used)
|
||||
ScriptReserved_SetAnimNumber, &Moveable::SetAnimNumber,
|
||||
|
||||
/// Retrieve the slot ID of the animation.
|
||||
// In certain cases, moveable may play animations from another object slot. Use this
|
||||
// function when you need to identify such cases.
|
||||
// @function Moveable:GetAnimSlot
|
||||
// @treturn int animation slot ID
|
||||
ScriptReserved_GetAnimSlot, &Moveable::GetAnimSlot,
|
||||
|
||||
/// Retrieve frame number.
|
||||
// This is the current frame of the object's active animation.
|
||||
// @function Moveable:GetFrame
|
||||
// @treturn int the current frame of the active animation
|
||||
ScriptReserved_GetFrameNumber, &Moveable::GetFrameNumber,
|
||||
|
||||
/// Set frame number.
|
||||
// This will move the animation to the given frame.
|
||||
// The number of frames in an animation can be seen under the heading "End frame" in
|
||||
// the WadTool animation editor. If the animation has no frames, the only valid argument
|
||||
// is -1.
|
||||
// @function Moveable:SetFrame
|
||||
// @tparam int frame the new frame number
|
||||
ScriptReserved_SetFrameNumber, &Moveable::SetFrameNumber,
|
||||
|
||||
|
||||
/// Get the end frame number of the moveable's active animation.
|
||||
// This is the "End Frame" set in WADTool for the animation.
|
||||
// @function Moveable:GetEndFrame()
|
||||
// @treturn int End frame number of the active animation.
|
||||
ScriptReserved_GetEndFrame, &Moveable::GetEndFrame,
|
||||
|
||||
/// Set the object's velocity to specified value.
|
||||
|
@ -282,15 +296,6 @@ void Moveable::Register(sol::state& state, sol::table& parent)
|
|||
// @treturn Vec3 current object velocity
|
||||
ScriptReserved_GetVelocity, &Moveable::GetVelocity,
|
||||
|
||||
/// Set frame number.
|
||||
// This will move the animation to the given frame.
|
||||
// The number of frames in an animation can be seen under the heading "End frame" in
|
||||
// the WadTool animation editor. If the animation has no frames, the only valid argument
|
||||
// is -1.
|
||||
// @function Moveable:SetFrame
|
||||
// @tparam int frame the new frame number
|
||||
ScriptReserved_SetFrameNumber, &Moveable::SetFrameNumber,
|
||||
|
||||
/// Get current HP (hit points/health points)
|
||||
// @function Moveable:GetHP
|
||||
// @treturn int the amount of HP the moveable currently has
|
||||
|
@ -940,10 +945,6 @@ void Moveable::SetFrameNumber(int frameNumber)
|
|||
}
|
||||
}
|
||||
|
||||
/// Get the end frame number of the moveable's active animation.
|
||||
// This is the "End Frame" set in WADTool for the animation.
|
||||
// @function Moveable:GetEndFrame()
|
||||
// @treturn int End frame number of the active animation.
|
||||
int Moveable::GetEndFrame() const
|
||||
{
|
||||
const auto& anim = GetAnimData(*m_item);
|
||||
|
|
|
@ -538,6 +538,8 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
|
|||
|
||||
void WinClose()
|
||||
{
|
||||
TENLog("Cleaning up and exiting...", LogLevel::Info);
|
||||
|
||||
WaitForSingleObject((HANDLE)ThreadHandle, 5000);
|
||||
|
||||
DestroyAcceleratorTable(hAccTable);
|
||||
|
@ -545,8 +547,6 @@ void WinClose()
|
|||
Sound_DeInit();
|
||||
DeinitializeInput();
|
||||
|
||||
TENLog("Cleaning up and exiting...", LogLevel::Info);
|
||||
|
||||
delete g_GameScript;
|
||||
g_GameScript = nullptr;
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#define TEN_MAJOR_VERSION 1
|
||||
#define TEN_MINOR_VERSION 6
|
||||
#define TEN_BUILD_NUMBER 0
|
||||
#define TEN_REVISION_NUMBER 1
|
||||
#define TEN_REVISION_NUMBER 6
|
||||
|
||||
#define TEST_BUILD 1
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue