diff --git a/Documentation/doc/2 classes/Objects.Moveable.html b/Documentation/doc/2 classes/Objects.Moveable.html index 11998a0d1..b7dc02275 100644 --- a/Documentation/doc/2 classes/Objects.Moveable.html +++ b/Documentation/doc/2 classes/Objects.Moveable.html @@ -171,18 +171,26 @@ pickups, and Lara herself (see also Retrieve the index of the current animation. - Moveable:GetAnimSlot() - Retrieve the slot ID of the animation. - - Moveable:SetAnim(index[, slot]) Set the object's animation to the one specified by the given index. + Moveable:GetAnimSlot() + Retrieve the slot ID of the animation. + + Moveable:GetFrame() Retrieve frame number. + Moveable:SetFrame(frame) + Set frame number. + + + Moveable:GetEndFrame() + Get the end frame number of the moveable's active animation. + + Moveable:SetVelocity(velocity) Set the object's velocity to specified value. @@ -191,10 +199,6 @@ pickups, and Lara herself (see also Get the object's velocity. - Moveable:SetFrame(frame) - Set frame number. - - Moveable:GetHP() Get current HP (hit points/health points) @@ -328,10 +332,6 @@ pickups, and Lara herself (see also 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. - - - Moveable:GetEndFrame() - Get the end frame number of the moveable's active animation. Moveable:GetRoom() @@ -778,29 +778,6 @@ shiva:SetObjectID(TEN.Objects.ObjID.BIGMEDI_ITEM) - -
- - Moveable:GetAnimSlot() -
-
- 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. - - - - -

Returns:

-
    - - int - animation slot ID -
- - - -
@@ -830,6 +807,29 @@ shiva:SetObjectID(TEN.Objects.ObjID.BIGMEDI_ITEM) + +
+ + Moveable:GetAnimSlot() +
+
+ 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. + + + + +

Returns:

+
    + + int + animation slot ID +
+ + + +
@@ -852,6 +852,54 @@ shiva:SetObjectID(TEN.Objects.ObjID.BIGMEDI_ITEM) + +
+ + Moveable:SetFrame(frame) +
+
+ 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. + + + +

Parameters:

+ + + + + + +
+
+ + Moveable:GetEndFrame() +
+
+ Get the end frame number of the moveable's active animation. + This is the "End Frame" set in WADTool for the animation.() + + + + +

Returns:

+
    + + int + End frame number of the active animation. +
+ + + +
@@ -899,32 +947,6 @@ shiva:SetObjectID(TEN.Objects.ObjID.BIGMEDI_ITEM) - -
- - Moveable:SetFrame(frame) -
-
- 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. - - - -

Parameters:

- - - - - -
@@ -1693,28 +1715,6 @@ baddy:SetOnKilled(LevelFuncs.baddyKilled) sas:SetAIBits({1, 0, 0, 0, 0, 0}) - -
- - Moveable:GetEndFrame() -
-
- Get the end frame number of the moveable's active animation. - This is the "End Frame" set in WADTool for the animation.() - - - - -

Returns:

-
    - - int - End frame number of the active animation. -
- - - -
diff --git a/Scripts/Settings.lua b/Scripts/Settings.lua index 081e268e8..75981eaf7 100644 --- a/Scripts/Settings.lua +++ b/Scripts/Settings.lua @@ -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 diff --git a/TombEngine/Scripting/Internal/ScriptUtil.h b/TombEngine/Scripting/Internal/ScriptUtil.h index 700aab232..add1584de 100644 --- a/TombEngine/Scripting/Internal/ScriptUtil.h +++ b/TombEngine/Scripting/Internal/ScriptUtil.h @@ -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() + "\" from " + LUA_CLASS_NAME; \ + std::string err = "Attempted to read missing variable \"" + key.as() + "\" 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() + "\" of " + LUA_CLASS_NAME; \ + std::string err = "Attempted to set missing variable \"" + key.as() + "\" of " + LUA_CLASS_NAME; \ ScriptAssert(false, err);\ } diff --git a/TombEngine/Scripting/Internal/TEN/Objects/Moveable/MoveableObject.cpp b/TombEngine/Scripting/Internal/TEN/Objects/Moveable/MoveableObject.cpp index c681ea956..264265fec 100644 --- a/TombEngine/Scripting/Internal/TEN/Objects/Moveable/MoveableObject.cpp +++ b/TombEngine/Scripting/Internal/TEN/Objects/Moveable/MoveableObject.cpp @@ -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); diff --git a/TombEngine/Specific/winmain.cpp b/TombEngine/Specific/winmain.cpp index 7ed2fc1f9..27ec3f127 100644 --- a/TombEngine/Specific/winmain.cpp +++ b/TombEngine/Specific/winmain.cpp @@ -538,14 +538,14 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine void WinClose() { + TENLog("Cleaning up and exiting...", LogLevel::Info); + WaitForSingleObject((HANDLE)ThreadHandle, 5000); DestroyAcceleratorTable(hAccTable); Sound_DeInit(); DeinitializeInput(); - - TENLog("Cleaning up and exiting...", LogLevel::Info); delete g_GameScript; g_GameScript = nullptr; diff --git a/TombEngine/version.h b/TombEngine/version.h index ad5d353fc..1f244287b 100644 --- a/TombEngine/version.h +++ b/TombEngine/version.h @@ -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