mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-05-01 09:18:00 +03:00
Merge branch 'ten_beta' into states_tier_3
This commit is contained in:
commit
db2e47a943
147 changed files with 858 additions and 867 deletions
|
@ -519,7 +519,7 @@ local strings = {
|
|||
"",
|
||||
""
|
||||
},
|
||||
HARPOON_ITEM = {
|
||||
harpoon_item = {
|
||||
"Harpoon Launcher",
|
||||
"",
|
||||
"",
|
||||
|
@ -1169,8 +1169,8 @@ SILENCER_ITEM = {
|
|||
"",
|
||||
""
|
||||
},
|
||||
torch = {
|
||||
"Torch",
|
||||
torch2 = {
|
||||
"Torch2",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
|
|
|
@ -32,8 +32,8 @@
|
|||
#include "Game/items.h"
|
||||
#include "Game/misc.h"
|
||||
#include "Game/savegame.h"
|
||||
#include "Scripting/Flow/ScriptInterfaceFlowHandler.h"
|
||||
#include "Scripting/ScriptInterfaceLevel.h"
|
||||
#include "Flow/ScriptInterfaceFlowHandler.h"
|
||||
#include "ScriptInterfaceLevel.h"
|
||||
#include "Sound/sound.h"
|
||||
#include "Renderer/Renderer11.h"
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
#include "Specific/input.h"
|
||||
#include "Specific/level.h"
|
||||
#include "Specific/setup.h"
|
||||
#include "Scripting/Flow/ScriptInterfaceFlowHandler.h"
|
||||
#include "Flow/ScriptInterfaceFlowHandler.h"
|
||||
|
||||
// ------------------------------
|
||||
// BASIC MOVEMENT & MISCELLANEOUS
|
||||
|
@ -170,7 +170,7 @@ void lara_as_walk_forward(ItemInfo* item, CollisionInfo* coll)
|
|||
}
|
||||
else if (lara->Control.WaterStatus == WaterStatus::Wade)
|
||||
item->Animation.TargetState = LS_WADE_FORWARD;
|
||||
else if (TrInput & IN_WALK) [[likely]]
|
||||
else if (TrInput & IN_WALK) USE_FEATURE_IF_CPP20([[likely]])
|
||||
item->Animation.TargetState = LS_WALK_FORWARD;
|
||||
else
|
||||
item->Animation.TargetState = LS_RUN_FORWARD;
|
||||
|
@ -314,7 +314,7 @@ void lara_as_run_forward(ItemInfo* item, CollisionInfo* coll)
|
|||
item->Animation.TargetState = LS_WALK_FORWARD;
|
||||
else if (TrInput & IN_SPRINT && lara->SprintEnergy)
|
||||
item->Animation.TargetState = LS_SPRINT;
|
||||
else [[likely]]
|
||||
else USE_FEATURE_IF_CPP20([[likely]])
|
||||
item->Animation.TargetState = LS_RUN_FORWARD;
|
||||
|
||||
return;
|
||||
|
@ -439,7 +439,7 @@ void lara_as_idle(ItemInfo* item, CollisionInfo* coll)
|
|||
{
|
||||
if (isSwamp)
|
||||
PseudoLaraAsSwampIdle(item, coll);
|
||||
else [[likely]]
|
||||
else USE_FEATURE_IF_CPP20([[likely]])
|
||||
PseudoLaraAsWadeIdle(item, coll);
|
||||
|
||||
return;
|
||||
|
@ -489,7 +489,7 @@ void lara_as_idle(ItemInfo* item, CollisionInfo* coll)
|
|||
item->Animation.TargetState = LS_SPRINT;
|
||||
return;
|
||||
}
|
||||
else if (TestLaraRunForward(item, coll)) [[likely]]
|
||||
else if (TestLaraRunForward(item, coll)) USE_FEATURE_IF_CPP20([[likely]])
|
||||
{
|
||||
item->Animation.TargetState = LS_RUN_FORWARD;
|
||||
return;
|
||||
|
@ -505,7 +505,7 @@ void lara_as_idle(ItemInfo* item, CollisionInfo* coll)
|
|||
return;
|
||||
}
|
||||
}
|
||||
else if (TestLaraRunBack(item, coll)) [[likely]]
|
||||
else if (TestLaraRunBack(item, coll)) USE_FEATURE_IF_CPP20([[likely]])
|
||||
{
|
||||
item->Animation.TargetState = LS_RUN_BACK;
|
||||
return;
|
||||
|
@ -538,7 +538,7 @@ void lara_as_idle(ItemInfo* item, CollisionInfo* coll)
|
|||
{
|
||||
item->Animation.TargetState = LS_TURN_LEFT_FAST;
|
||||
}
|
||||
else [[likely]]
|
||||
else USE_FEATURE_IF_CPP20([[likely]])
|
||||
item->Animation.TargetState = LS_TURN_LEFT_SLOW;
|
||||
|
||||
return;
|
||||
|
@ -550,7 +550,7 @@ void lara_as_idle(ItemInfo* item, CollisionInfo* coll)
|
|||
{
|
||||
item->Animation.TargetState = LS_TURN_RIGHT_FAST;
|
||||
}
|
||||
else [[likely]]
|
||||
else USE_FEATURE_IF_CPP20([[likely]])
|
||||
item->Animation.TargetState = LS_TURN_RIGHT_SLOW;
|
||||
|
||||
return;
|
||||
|
@ -594,7 +594,7 @@ void PseudoLaraAsWadeIdle(ItemInfo* item, CollisionInfo* coll)
|
|||
SetLaraVault(item, coll, vaultResult);
|
||||
return;
|
||||
}
|
||||
else if (TestLaraRunForward(item, coll)) [[likely]]
|
||||
else if (TestLaraRunForward(item, coll)) USE_FEATURE_IF_CPP20([[likely]])
|
||||
{
|
||||
item->Animation.TargetState = LS_WADE_FORWARD;
|
||||
return;
|
||||
|
@ -887,7 +887,7 @@ void lara_as_turn_right_slow(ItemInfo* item, CollisionInfo* coll)
|
|||
{
|
||||
if (isSwamp)
|
||||
PsuedoLaraAsSwampTurnRightSlow(item, coll);
|
||||
else [[likely]]
|
||||
else USE_FEATURE_IF_CPP20([[likely]])
|
||||
PsuedoLaraAsWadeTurnRightSlow(item, coll);
|
||||
|
||||
return;
|
||||
|
@ -938,7 +938,7 @@ void lara_as_turn_right_slow(ItemInfo* item, CollisionInfo* coll)
|
|||
item->Animation.TargetState = LS_SPRINT;
|
||||
return;
|
||||
}
|
||||
else if (TestLaraRunForward(item, coll)) [[likely]]
|
||||
else if (TestLaraRunForward(item, coll)) USE_FEATURE_IF_CPP20([[likely]])
|
||||
{
|
||||
item->Animation.TargetState = LS_RUN_FORWARD;
|
||||
return;
|
||||
|
@ -954,7 +954,7 @@ void lara_as_turn_right_slow(ItemInfo* item, CollisionInfo* coll)
|
|||
return;
|
||||
}
|
||||
}
|
||||
else if (TestLaraRunBack(item, coll)) [[likely]]
|
||||
else if (TestLaraRunBack(item, coll)) USE_FEATURE_IF_CPP20([[likely]])
|
||||
{
|
||||
item->Animation.TargetState = LS_RUN_BACK;
|
||||
return;
|
||||
|
@ -992,7 +992,7 @@ void lara_as_turn_right_slow(ItemInfo* item, CollisionInfo* coll)
|
|||
}
|
||||
else */if (lara->Control.TurnRate.y > LARA_SLOW_MED_TURN_MAX)
|
||||
item->Animation.TargetState = LS_TURN_RIGHT_FAST;
|
||||
else [[likely]]
|
||||
else USE_FEATURE_IF_CPP20([[likely]])
|
||||
item->Animation.TargetState = LS_TURN_RIGHT_SLOW;
|
||||
|
||||
return;
|
||||
|
@ -1026,7 +1026,7 @@ void PsuedoLaraAsWadeTurnRightSlow(ItemInfo* item, CollisionInfo* coll)
|
|||
SetLaraVault(item, coll, vaultResult);
|
||||
return;
|
||||
}
|
||||
else if (TestLaraRunForward(item, coll)) [[likely]]
|
||||
else if (TestLaraRunForward(item, coll)) USE_FEATURE_IF_CPP20([[likely]])
|
||||
{
|
||||
item->Animation.TargetState = LS_WADE_FORWARD;
|
||||
return;
|
||||
|
@ -1084,7 +1084,7 @@ void PsuedoLaraAsSwampTurnRightSlow(ItemInfo* item, CollisionInfo* coll)
|
|||
SetLaraVault(item, coll, vaultResult);
|
||||
return;
|
||||
}
|
||||
else if (TestLaraWadeForwardSwamp(item, coll)) [[likely]]
|
||||
else if (TestLaraWadeForwardSwamp(item, coll)) USE_FEATURE_IF_CPP20([[likely]])
|
||||
{
|
||||
item->Animation.TargetState = LS_WADE_FORWARD;
|
||||
return;
|
||||
|
@ -1157,7 +1157,7 @@ void lara_as_turn_left_slow(ItemInfo* item, CollisionInfo* coll)
|
|||
{
|
||||
if (isSwamp)
|
||||
PsuedoLaraAsSwampTurnLeftSlow(item, coll);
|
||||
else [[likely]]
|
||||
else USE_FEATURE_IF_CPP20([[likely]])
|
||||
PsuedoLaraAsWadeTurnLeftSlow(item, coll);
|
||||
|
||||
return;
|
||||
|
@ -1208,7 +1208,7 @@ void lara_as_turn_left_slow(ItemInfo* item, CollisionInfo* coll)
|
|||
item->Animation.TargetState = LS_SPRINT;
|
||||
return;
|
||||
}
|
||||
else if (TestLaraRunForward(item, coll)) [[likely]]
|
||||
else if (TestLaraRunForward(item, coll)) USE_FEATURE_IF_CPP20([[likely]])
|
||||
{
|
||||
item->Animation.TargetState = LS_RUN_FORWARD;
|
||||
return;
|
||||
|
@ -1224,7 +1224,7 @@ void lara_as_turn_left_slow(ItemInfo* item, CollisionInfo* coll)
|
|||
return;
|
||||
}
|
||||
}
|
||||
else if (TestLaraRunBack(item, coll)) [[likely]]
|
||||
else if (TestLaraRunBack(item, coll)) USE_FEATURE_IF_CPP20([[likely]])
|
||||
{
|
||||
item->Animation.TargetState = LS_RUN_BACK;
|
||||
return;
|
||||
|
@ -1262,7 +1262,7 @@ void lara_as_turn_left_slow(ItemInfo* item, CollisionInfo* coll)
|
|||
}
|
||||
else */if (lara->Control.TurnRate.y < -LARA_SLOW_MED_TURN_MAX)
|
||||
item->Animation.TargetState = LS_TURN_LEFT_FAST;
|
||||
else [[likely]]
|
||||
else USE_FEATURE_IF_CPP20([[likely]])
|
||||
item->Animation.TargetState = LS_TURN_LEFT_SLOW;
|
||||
|
||||
return;
|
||||
|
@ -1296,7 +1296,7 @@ void PsuedoLaraAsWadeTurnLeftSlow(ItemInfo* item, CollisionInfo* coll)
|
|||
SetLaraVault(item, coll, vaultResult);
|
||||
return;
|
||||
}
|
||||
else if (TestLaraRunForward(item, coll)) [[likely]]
|
||||
else if (TestLaraRunForward(item, coll)) USE_FEATURE_IF_CPP20([[likely]])
|
||||
{
|
||||
item->Animation.TargetState = LS_WADE_FORWARD;
|
||||
return;
|
||||
|
@ -1354,7 +1354,7 @@ void PsuedoLaraAsSwampTurnLeftSlow(ItemInfo* item, CollisionInfo* coll)
|
|||
SetLaraVault(item, coll, vaultResult);
|
||||
return;
|
||||
}
|
||||
else if (TestLaraWadeForwardSwamp(item, coll)) [[likely]]
|
||||
else if (TestLaraWadeForwardSwamp(item, coll)) USE_FEATURE_IF_CPP20([[likely]])
|
||||
{
|
||||
item->Animation.TargetState = LS_WADE_FORWARD;
|
||||
return;
|
||||
|
@ -1688,7 +1688,7 @@ void lara_as_turn_right_fast(ItemInfo* item, CollisionInfo* coll)
|
|||
item->Animation.TargetState = LS_SPRINT;
|
||||
return;
|
||||
}
|
||||
else if (TestLaraRunForward(item, coll)) [[likely]]
|
||||
else if (TestLaraRunForward(item, coll)) USE_FEATURE_IF_CPP20([[likely]])
|
||||
{
|
||||
item->Animation.TargetState = LS_RUN_FORWARD;
|
||||
return;
|
||||
|
@ -1704,7 +1704,7 @@ void lara_as_turn_right_fast(ItemInfo* item, CollisionInfo* coll)
|
|||
return;
|
||||
}
|
||||
}
|
||||
else if (TestLaraRunBack(item, coll)) [[likely]]
|
||||
else if (TestLaraRunBack(item, coll)) USE_FEATURE_IF_CPP20([[likely]])
|
||||
{
|
||||
item->Animation.TargetState = LS_RUN_BACK;
|
||||
return;
|
||||
|
@ -1819,7 +1819,7 @@ void lara_as_turn_left_fast(ItemInfo* item, CollisionInfo* coll)
|
|||
item->Animation.TargetState = LS_SPRINT;
|
||||
return;
|
||||
}
|
||||
else if (TestLaraRunForward(item, coll)) [[likely]]
|
||||
else if (TestLaraRunForward(item, coll)) USE_FEATURE_IF_CPP20([[likely]])
|
||||
{
|
||||
item->Animation.TargetState = LS_RUN_FORWARD;
|
||||
return;
|
||||
|
@ -1835,7 +1835,7 @@ void lara_as_turn_left_fast(ItemInfo* item, CollisionInfo* coll)
|
|||
return;
|
||||
}
|
||||
}
|
||||
else if (TestLaraRunBack(item, coll)) [[likely]]
|
||||
else if (TestLaraRunBack(item, coll)) USE_FEATURE_IF_CPP20([[likely]])
|
||||
{
|
||||
item->Animation.TargetState = LS_RUN_BACK;
|
||||
return;
|
||||
|
@ -2257,7 +2257,7 @@ void lara_as_wade_forward(ItemInfo* item, CollisionInfo* coll)
|
|||
}
|
||||
else if (lara->Control.WaterStatus == WaterStatus::Dry)
|
||||
item->Animation.TargetState = LS_RUN_FORWARD;
|
||||
else [[likely]]
|
||||
else USE_FEATURE_IF_CPP20([[likely]])
|
||||
item->Animation.TargetState = LS_WADE_FORWARD;
|
||||
|
||||
return;
|
||||
|
@ -2298,7 +2298,7 @@ void PseudoLaraAsSwampWadeForward(ItemInfo* item, CollisionInfo* coll)
|
|||
SetLaraVault(item, coll, vaultResult);
|
||||
return;
|
||||
}
|
||||
else [[likely]]
|
||||
else USE_FEATURE_IF_CPP20([[likely]])
|
||||
item->Animation.TargetState = LS_WADE_FORWARD;
|
||||
|
||||
return;
|
||||
|
@ -2428,7 +2428,7 @@ void lara_as_sprint(ItemInfo* item, CollisionInfo* coll)
|
|||
item->Animation.TargetState = LS_RUN_FORWARD; // TODO: Dispatch to wade forward state directly. @Sezz 2021.09.29
|
||||
else if (TrInput & IN_WALK)
|
||||
item->Animation.TargetState = LS_RUN_FORWARD;
|
||||
else if (TrInput & IN_SPRINT && lara->SprintEnergy > 0) [[likely]]
|
||||
else if (TrInput & IN_SPRINT && lara->SprintEnergy > 0) USE_FEATURE_IF_CPP20([[likely]])
|
||||
item->Animation.TargetState = LS_SPRINT;
|
||||
else
|
||||
item->Animation.TargetState = LS_RUN_FORWARD;
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#include "Game/effects/effects.h"
|
||||
#include "Game/items.h"
|
||||
#include "Game/Lara/lara.h"
|
||||
#include "Scripting/Flow/ScriptInterfaceFlowHandler.h"
|
||||
#include "Flow/ScriptInterfaceFlowHandler.h"
|
||||
#include "Game/Lara/lara_helpers.h"
|
||||
#include "Sound/sound.h"
|
||||
#include "Specific/input.h"
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
#include "Game/Lara/lara_overhang.h"
|
||||
#include "Specific/level.h"
|
||||
#include "Specific/input.h"
|
||||
#include "Scripting/Flow/ScriptInterfaceFlowHandler.h"
|
||||
#include "Flow/ScriptInterfaceFlowHandler.h"
|
||||
|
||||
// -----------------------------
|
||||
// LADDER CLIMB
|
||||
|
@ -292,14 +292,11 @@ void lara_col_climb_idle(ItemInfo* item, CollisionInfo* coll)
|
|||
resultRight = LaraTestClimbUpPos(item, coll->Setup.Radius, coll->Setup.Radius + CLICK(0.5f), &shiftRight, &ledgeRight);
|
||||
resultLeft = LaraTestClimbUpPos(item, coll->Setup.Radius, -CLICK(0.5f) - coll->Setup.Radius, &shiftLeft, &ledgeLeft);
|
||||
|
||||
// Overhang hook.
|
||||
if (g_GameFlow->HasOverhangClimb())
|
||||
// Overhang + ladder-to-monkey hook.
|
||||
if (!resultRight || !resultLeft)
|
||||
{
|
||||
if (!resultRight || !resultLeft)
|
||||
{
|
||||
if (LadderMonkeyExtra(item, coll))
|
||||
return;
|
||||
}
|
||||
if (LadderMonkeyExtra(item, coll))
|
||||
return;
|
||||
}
|
||||
|
||||
if (resultRight >= 0 && resultLeft >= 0)
|
||||
|
@ -319,8 +316,14 @@ void lara_col_climb_idle(ItemInfo* item, CollisionInfo* coll)
|
|||
yShift = shiftRight;
|
||||
}
|
||||
|
||||
item->Animation.TargetState = LS_LADDER_UP;
|
||||
item->Pose.Position.y += yShift;
|
||||
// HACK: Prevent climbing inside sloped ceilings. Breaks overhang even more, but that shouldn't matter since we'll be doing it over. @Sezz 2022.05.13
|
||||
int y = item->Pose.Position.y - (coll->Setup.Height + CLICK(0.5f));
|
||||
auto probe = GetCollision(item, 0, 0, -(coll->Setup.Height + CLICK(0.5f)));
|
||||
if ((probe.Position.Ceiling - y) < 0)
|
||||
{
|
||||
item->Animation.TargetState = LS_LADDER_UP;
|
||||
item->Pose.Position.y += yShift;
|
||||
}
|
||||
}
|
||||
else if (abs(ledgeLeft - ledgeRight) <= CLICK(0.5f))
|
||||
{
|
||||
|
|
|
@ -14,8 +14,8 @@
|
|||
#include "Specific/input.h"
|
||||
#include "Specific/level.h"
|
||||
#include "Specific/setup.h"
|
||||
#include "Scripting/Flow/ScriptInterfaceFlowHandler.h"
|
||||
#include "Scripting/ScriptInterfaceLevel.h"
|
||||
#include "Flow/ScriptInterfaceFlowHandler.h"
|
||||
#include "ScriptInterfaceLevel.h"
|
||||
|
||||
// -----------------------------
|
||||
// COLLISION TEST FUNCTIONS
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
#include "Game/Lara/lara_helpers.h"
|
||||
#include "Specific/input.h"
|
||||
#include "Specific/level.h"
|
||||
#include "Scripting/Flow/ScriptInterfaceFlowHandler.h"
|
||||
#include "Flow/ScriptInterfaceFlowHandler.h"
|
||||
|
||||
// -----------------------------
|
||||
// CROUCH & CRAWL
|
||||
|
@ -61,9 +61,8 @@ void lara_as_crouch_idle(ItemInfo* item, CollisionInfo* coll)
|
|||
if ((TrInput & IN_CROUCH || lara->Control.KeepLow) &&
|
||||
lara->Control.WaterStatus != WaterStatus::Wade)
|
||||
{
|
||||
if (TrInput & IN_SPRINT
|
||||
&& TestLaraCrouchRoll(item, coll)
|
||||
&& g_GameFlow->HasCrouchRoll())
|
||||
if (TrInput & IN_SPRINT && TestLaraCrouchRoll(item, coll) &&
|
||||
g_GameFlow->HasCrouchRoll())
|
||||
{
|
||||
item->Animation.TargetState = LS_CROUCH_ROLL;
|
||||
return;
|
||||
|
@ -189,11 +188,7 @@ void lara_col_crouch_roll(ItemInfo* item, CollisionInfo* coll)
|
|||
// TODO: With sufficient speed, Lara can still roll off ledges. This is particularly a problem in the uncommon scenario where
|
||||
// she becomes Airborne within a crawlspace; collision handling will push her back very rapidly and potentially cause a softlock. @Sezz 2021.11.02
|
||||
if (LaraDeflectEdgeCrawl(item, coll))
|
||||
{
|
||||
item->Pose.Position.x = coll->Setup.OldPosition.x;
|
||||
item->Pose.Position.y = coll->Setup.OldPosition.y;
|
||||
item->Pose.Position.z = coll->Setup.OldPosition.z;
|
||||
}
|
||||
item->Pose.Position = coll->Setup.OldPosition;
|
||||
|
||||
if (TestLaraFall(item, coll))
|
||||
{
|
||||
|
@ -247,9 +242,8 @@ void lara_as_crouch_turn_left(ItemInfo* item, CollisionInfo* coll)
|
|||
if ((TrInput & IN_CROUCH || lara->Control.KeepLow) &&
|
||||
lara->Control.WaterStatus != WaterStatus::Wade)
|
||||
{
|
||||
if (TrInput & IN_SPRINT
|
||||
&& TestLaraCrouchRoll(item, coll)
|
||||
&& g_GameFlow->HasCrouchRoll())
|
||||
if (TrInput & IN_SPRINT && TestLaraCrouchRoll(item, coll) &&
|
||||
g_GameFlow->HasCrouchRoll())
|
||||
{
|
||||
item->Animation.TargetState = LS_CROUCH_ROLL;
|
||||
return;
|
||||
|
@ -304,9 +298,8 @@ void lara_as_crouch_turn_right(ItemInfo* item, CollisionInfo* coll)
|
|||
if ((TrInput & IN_CROUCH || lara->Control.KeepLow) &&
|
||||
lara->Control.WaterStatus != WaterStatus::Wade)
|
||||
{
|
||||
if (TrInput & IN_SPRINT
|
||||
&& TestLaraCrouchRoll(item, coll)
|
||||
&& g_GameFlow->HasCrouchRoll())
|
||||
if (TrInput & IN_SPRINT && TestLaraCrouchRoll(item, coll) &&
|
||||
g_GameFlow->HasCrouchRoll())
|
||||
{
|
||||
item->Animation.TargetState = LS_CROUCH_ROLL;
|
||||
return;
|
||||
|
@ -387,15 +380,14 @@ void lara_as_crawl_idle(ItemInfo* item, CollisionInfo* coll)
|
|||
{
|
||||
auto crawlVaultResult = TestLaraCrawlVault(item, coll);
|
||||
|
||||
if (TrInput & (IN_ACTION | IN_JUMP)
|
||||
&& crawlVaultResult.Success
|
||||
&& g_GameFlow->HasCrawlExtended())
|
||||
if (TrInput & (IN_ACTION | IN_JUMP) && crawlVaultResult.Success &&
|
||||
g_GameFlow->HasCrawlExtended())
|
||||
{
|
||||
item->Animation.TargetState = crawlVaultResult.TargetState;
|
||||
ResetLaraFlex(item);
|
||||
return;
|
||||
}
|
||||
else if (TestLaraCrawlForward(item, coll)) [[likely]]
|
||||
else if (TestLaraCrawlForward(item, coll)) USE_FEATURE_IF_CPP20([[likely]])
|
||||
{
|
||||
item->Animation.TargetState = LS_CRAWL_FORWARD;
|
||||
return;
|
||||
|
@ -409,7 +401,7 @@ void lara_as_crawl_idle(ItemInfo* item, CollisionInfo* coll)
|
|||
DoLaraCrawlToHangSnap(item, coll);
|
||||
return;
|
||||
}
|
||||
else if (TestLaraCrawlBack(item, coll)) [[likely]]
|
||||
else if (TestLaraCrawlBack(item, coll)) USE_FEATURE_IF_CPP20([[likely]])
|
||||
{
|
||||
item->Animation.TargetState = LS_CRAWL_BACK;
|
||||
return;
|
||||
|
|
|
@ -18,15 +18,15 @@
|
|||
#include "Game/savegame.h"
|
||||
#include "Objects/Generic/Object/burning_torch.h"
|
||||
#include "Objects/Generic/Object/objects.h"
|
||||
#include "Scripting/Flow/ScriptInterfaceFlowHandler.h"
|
||||
#include "Scripting/ScriptInterfaceLevel.h"
|
||||
#include "Flow/ScriptInterfaceFlowHandler.h"
|
||||
#include "ScriptInterfaceLevel.h"
|
||||
#include "Sound/sound.h"
|
||||
#include "Specific/setup.h"
|
||||
#include "Specific/input.h"
|
||||
#include "Specific/level.h"
|
||||
|
||||
#include "Scripting/ScriptInterfaceGame.h"
|
||||
#include "Scripting/Objects/ScriptInterfaceObjectsHandler.h"
|
||||
#include "ScriptInterfaceGame.h"
|
||||
#include "Objects/ScriptInterfaceObjectsHandler.h"
|
||||
|
||||
using namespace TEN::Entities::Generic;
|
||||
|
||||
|
@ -772,7 +772,7 @@ void HitTarget(ItemInfo* laraItem, ItemInfo* target, GameVector* hitPos, int dam
|
|||
switch (object->hitEffect)
|
||||
{
|
||||
case HIT_BLOOD:
|
||||
if (target->ObjectNumber == ID_GOON2 &&
|
||||
if (target->ObjectNumber == ID_BADDY2 &&
|
||||
(target->Animation.ActiveState == 8 || GetRandomControl() & 1) &&
|
||||
(lara->Control.Weapon.GunType == LaraWeaponType::Pistol ||
|
||||
lara->Control.Weapon.GunType == LaraWeaponType::Shotgun ||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#include "Game/items.h"
|
||||
#include "Game/Lara/lara.h"
|
||||
#include "Game/Lara/lara_collide.h"
|
||||
#include "Scripting/Flow/ScriptInterfaceFlowHandler.h"
|
||||
#include "Flow/ScriptInterfaceFlowHandler.h"
|
||||
#include "Game/Lara/lara_fire.h"
|
||||
#include "Game/Lara/lara_tests.h"
|
||||
#include "Renderer/Renderer11.h"
|
||||
|
@ -324,7 +324,7 @@ void DoLaraFallDamage(ItemInfo* item)
|
|||
{
|
||||
if (item->Animation.VerticalVelocity >= LARA_DEATH_VELOCITY)
|
||||
item->HitPoints = 0;
|
||||
else [[likely]]
|
||||
else USE_FEATURE_IF_CPP20([[likely]])
|
||||
{
|
||||
int base = item->Animation.VerticalVelocity - (LARA_DAMAGE_VELOCITY - 1);
|
||||
item->HitPoints -= LARA_HEALTH_MAX * (pow(base, 2) / 196);
|
||||
|
@ -586,7 +586,7 @@ void SetLaraJumpDirection(ItemInfo* item, CollisionInfo* coll)
|
|||
{
|
||||
lara->Control.JumpDirection = JumpDirection::Right;
|
||||
}
|
||||
else if (TestLaraJumpUp(item, coll)) [[likely]]
|
||||
else if (TestLaraJumpUp(item, coll)) USE_FEATURE_IF_CPP20([[likely]])
|
||||
lara->Control.JumpDirection = JumpDirection::Up;
|
||||
else
|
||||
lara->Control.JumpDirection = JumpDirection::None;
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
#include "Game/Lara/lara_basic.h"
|
||||
#include "Game/Lara/lara_overhang.h"
|
||||
#include "Game/Lara/lara_slide.h"
|
||||
#include "Scripting/Flow/ScriptInterfaceFlowHandler.h"
|
||||
#include "Flow/ScriptInterfaceFlowHandler.h"
|
||||
#include "Sound/sound.h"
|
||||
#include "Specific/input.h"
|
||||
#include "Specific/level.h"
|
||||
|
@ -68,7 +68,7 @@ void lara_as_jump_forward(ItemInfo* item, CollisionInfo* coll)
|
|||
{
|
||||
DoLaraFallDamage(item);
|
||||
|
||||
if (item->HitPoints <= 0) [[unlikely]]
|
||||
if (item->HitPoints <= 0) USE_FEATURE_IF_CPP20([[unlikely]])
|
||||
item->Animation.TargetState = LS_DEATH;
|
||||
else if (TestLaraSlide(item, coll))
|
||||
SetLaraSlideAnimation(item, coll);
|
||||
|
@ -152,7 +152,7 @@ void lara_as_freefall(ItemInfo* item, CollisionInfo* coll)
|
|||
item->Animation.TargetState = LS_DEATH;
|
||||
else if (TestLaraSlide(item, coll))
|
||||
SetLaraSlideAnimation(item, coll);
|
||||
else [[likely]]
|
||||
else USE_FEATURE_IF_CPP20([[likely]])
|
||||
item->Animation.TargetState = LS_IDLE;
|
||||
|
||||
SetLaraLand(item, coll);
|
||||
|
@ -219,7 +219,7 @@ void lara_as_reach(ItemInfo* item, CollisionInfo* coll)
|
|||
item->Animation.TargetState = LS_DEATH;
|
||||
else if (TestLaraSlide(item, coll))
|
||||
SetLaraSlideAnimation(item, coll);
|
||||
else [[likely]]
|
||||
else USE_FEATURE_IF_CPP20([[likely]])
|
||||
item->Animation.TargetState = LS_IDLE;
|
||||
|
||||
SetLaraLand(item, coll);
|
||||
|
@ -449,7 +449,7 @@ void lara_as_jump_back(ItemInfo* item, CollisionInfo* coll)
|
|||
item->Animation.TargetState = LS_DEATH;
|
||||
else if (TestLaraSlide(item, coll))
|
||||
SetLaraSlideAnimation(item, coll);
|
||||
else [[likely]]
|
||||
else USE_FEATURE_IF_CPP20([[likely]])
|
||||
item->Animation.TargetState = LS_IDLE;
|
||||
|
||||
SetLaraLand(item, coll);
|
||||
|
@ -505,7 +505,7 @@ void lara_as_jump_right(ItemInfo* item, CollisionInfo* coll)
|
|||
item->Animation.TargetState = LS_DEATH;
|
||||
else if (TestLaraSlide(item, coll))
|
||||
SetLaraSlideAnimation(item, coll);
|
||||
else [[likely]]
|
||||
else USE_FEATURE_IF_CPP20([[likely]])
|
||||
item->Animation.TargetState = LS_IDLE;
|
||||
|
||||
SetLaraLand(item, coll);
|
||||
|
@ -562,7 +562,7 @@ void lara_as_jump_left(ItemInfo* item, CollisionInfo* coll)
|
|||
item->Animation.TargetState = LS_DEATH;
|
||||
else if (TestLaraSlide(item, coll))
|
||||
SetLaraSlideAnimation(item, coll);
|
||||
else [[likely]]
|
||||
else USE_FEATURE_IF_CPP20([[likely]])
|
||||
item->Animation.TargetState = LS_IDLE;
|
||||
|
||||
SetLaraLand(item, coll);
|
||||
|
@ -617,7 +617,7 @@ void lara_as_jump_up(ItemInfo* item, CollisionInfo* coll)
|
|||
item->Animation.TargetState = LS_DEATH;
|
||||
else if (TestLaraSlide(item, coll))
|
||||
SetLaraSlideAnimation(item, coll);
|
||||
else [[likely]]
|
||||
else USE_FEATURE_IF_CPP20([[likely]])
|
||||
item->Animation.TargetState = LS_IDLE;
|
||||
|
||||
SetLaraLand(item, coll);
|
||||
|
@ -722,7 +722,7 @@ void lara_as_fall_back(ItemInfo* item, CollisionInfo* coll)
|
|||
item->Animation.TargetState = LS_DEATH;
|
||||
else if (TestLaraSlide(item, coll))
|
||||
SetLaraSlideAnimation(item, coll);
|
||||
else [[likely]]
|
||||
else USE_FEATURE_IF_CPP20([[likely]])
|
||||
item->Animation.TargetState = LS_IDLE;
|
||||
|
||||
SetLaraLand(item, coll);
|
||||
|
@ -811,7 +811,7 @@ void lara_as_swan_dive(ItemInfo* item, CollisionInfo* coll)
|
|||
item->Animation.TargetState = LS_CROUCH_IDLE;
|
||||
TranslateItem(item, coll->Setup.ForwardAngle, CLICK(0.5f), 0, 0); // HACK: Move forward to avoid standing up or falling out on an edge.
|
||||
}
|
||||
else [[likely]]
|
||||
else USE_FEATURE_IF_CPP20([[likely]])
|
||||
item->Animation.TargetState = LS_IDLE;
|
||||
|
||||
SetLaraLand(item, coll);
|
||||
|
@ -883,7 +883,7 @@ void lara_as_freefall_dive(ItemInfo* item, CollisionInfo* coll)
|
|||
}
|
||||
else if (TestLaraSlide(item, coll))
|
||||
SetLaraSlideAnimation(item, coll);
|
||||
else [[likely]]
|
||||
else USE_FEATURE_IF_CPP20([[likely]])
|
||||
item->Animation.TargetState = LS_IDLE;
|
||||
|
||||
SetLaraLand(item, coll);
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
#include "Game/Lara/lara_tests.h"
|
||||
#include "Specific/input.h"
|
||||
#include "Specific/level.h"
|
||||
#include "Scripting/Flow/ScriptInterfaceFlowHandler.h"
|
||||
#include "Flow/ScriptInterfaceFlowHandler.h"
|
||||
|
||||
// -----------------------------
|
||||
// MONKEY SWING
|
||||
|
|
|
@ -964,7 +964,7 @@ void GrenadeControl(short itemNumber)
|
|||
if (currentItem->ObjectNumber < ID_SHOOT_SWITCH1 || currentItem->ObjectNumber > ID_SHOOT_SWITCH4 || (currentItem->Flags & 0x40))
|
||||
{
|
||||
if (Objects[currentItem->ObjectNumber].intelligent || currentItem->ObjectNumber == ID_LARA)
|
||||
DoExplosiveDamageOnBaddie(LaraItem, currentItem, item, LaraWeaponType::GrenadeLauncher);
|
||||
DoExplosiveDamageOnBaddy(LaraItem, currentItem, item, LaraWeaponType::GrenadeLauncher);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1274,7 +1274,7 @@ void RocketControl(short itemNumber)
|
|||
// Explosion is handled by CreatureDie()
|
||||
// Also Lara can be damaged
|
||||
// HitTarget() is called inside this
|
||||
DoExplosiveDamageOnBaddie(LaraItem, currentItem, item, LaraWeaponType::RocketLauncher);
|
||||
DoExplosiveDamageOnBaddy(LaraItem, currentItem, item, LaraWeaponType::RocketLauncher);
|
||||
}
|
||||
else if (currentItem->ObjectNumber >= ID_SMASH_OBJECT1 && currentItem->ObjectNumber <= ID_SMASH_OBJECT8)
|
||||
{
|
||||
|
@ -1546,7 +1546,7 @@ void CrossbowBoltControl(short itemNumber)
|
|||
// Explosion is handled by CreatureDie()
|
||||
// Also Lara can be damaged
|
||||
// HitTarget() is called inside this
|
||||
DoExplosiveDamageOnBaddie(LaraItem, currentItem, item, LaraWeaponType::Crossbow);
|
||||
DoExplosiveDamageOnBaddy(LaraItem, currentItem, item, LaraWeaponType::Crossbow);
|
||||
}
|
||||
else if (currentItem->ObjectNumber != ID_LARA)
|
||||
{
|
||||
|
@ -1767,7 +1767,7 @@ void RifleHandler(ItemInfo* laraItem, LaraWeaponType weaponType)
|
|||
}
|
||||
}
|
||||
|
||||
void DoExplosiveDamageOnBaddie(ItemInfo* laraItem, ItemInfo* dest, ItemInfo* src, LaraWeaponType weaponType)
|
||||
void DoExplosiveDamageOnBaddy(ItemInfo* laraItem, ItemInfo* dest, ItemInfo* src, LaraWeaponType weaponType)
|
||||
{
|
||||
if (!(dest->Flags & 0x8000))
|
||||
{
|
||||
|
|
|
@ -58,7 +58,7 @@ void FireCrossBowFromLaserSight(ItemInfo* laraItem, GameVector* src, GameVector*
|
|||
void FireHK(ItemInfo* laraItem, int mode);
|
||||
void RifleHandler(ItemInfo* laraItem, LaraWeaponType weaponType);
|
||||
|
||||
void DoExplosiveDamageOnBaddie(ItemInfo* laraItem, ItemInfo* src, ItemInfo* dest, LaraWeaponType weaponType);
|
||||
void DoExplosiveDamageOnBaddy(ItemInfo* laraItem, ItemInfo* src, ItemInfo* dest, LaraWeaponType weaponType);
|
||||
void TriggerUnderwaterExplosion(ItemInfo* item, int flag);
|
||||
void SomeSparkEffect(int x, int y, int z, int count);
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
#include "Game/items.h"
|
||||
#include "Specific/input.h"
|
||||
#include "Specific/setup.h"
|
||||
#include "Scripting/Flow/ScriptInterfaceFlowHandler.h"
|
||||
#include "Flow/ScriptInterfaceFlowHandler.h"
|
||||
#include "Specific/level.h"
|
||||
|
||||
constexpr auto HORIZONTAL_ALIGN_NORTHEAST = 155;
|
||||
|
@ -958,9 +958,6 @@ void SlopeClimbExtra(ItemInfo* item, CollisionInfo* coll)
|
|||
// Extends LS_LADDER_IDLE (56)
|
||||
bool LadderMonkeyExtra(ItemInfo* item, CollisionInfo* coll)
|
||||
{
|
||||
if (!g_GameFlow->HasOverhangClimb())
|
||||
return false;
|
||||
|
||||
auto probe = GetCollision(item);
|
||||
|
||||
if (probe.Position.CeilingSlope)
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
#include "Game/Lara/lara_collide.h"
|
||||
#include "Game/Lara/lara_helpers.h"
|
||||
#include "Game/Lara/lara.h"
|
||||
#include "Scripting/Flow/ScriptInterfaceFlowHandler.h"
|
||||
#include "Scripting/ScriptInterfaceLevel.h"
|
||||
#include "Flow/ScriptInterfaceFlowHandler.h"
|
||||
#include "ScriptInterfaceLevel.h"
|
||||
#include "Sound/sound.h"
|
||||
#include "Specific/level.h"
|
||||
#include "Specific/input.h"
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
#include "Game/Lara/lara_helpers.h"
|
||||
#include "Game/Lara/lara_monkey.h"
|
||||
#include "Renderer/Renderer11.h"
|
||||
#include "Scripting/Flow/ScriptInterfaceFlowHandler.h"
|
||||
#include "Flow/ScriptInterfaceFlowHandler.h"
|
||||
#include "Specific/input.h"
|
||||
#include "Specific/level.h"
|
||||
|
||||
|
@ -878,9 +878,7 @@ void TestLaraWaterDepth(ItemInfo* item, CollisionInfo* coll)
|
|||
if (waterDepth == NO_HEIGHT)
|
||||
{
|
||||
item->Animation.VerticalVelocity = 0;
|
||||
item->Pose.Position.x = coll->Setup.OldPosition.x;
|
||||
item->Pose.Position.y = coll->Setup.OldPosition.y;
|
||||
item->Pose.Position.z = coll->Setup.OldPosition.z;
|
||||
item->Pose.Position = coll->Setup.OldPosition;
|
||||
}
|
||||
// Height check was at CLICK(2) before but changed to this
|
||||
// because now Lara surfaces on a head level, not mid-body level.
|
||||
|
@ -891,9 +889,9 @@ void TestLaraWaterDepth(ItemInfo* item, CollisionInfo* coll)
|
|||
item->Pose.Position.y = probe.Position.Floor;
|
||||
item->Pose.Orientation.x = 0;
|
||||
item->Pose.Orientation.z = 0;
|
||||
item->Animation.Airborne = false;
|
||||
item->Animation.Velocity = 0;
|
||||
item->Animation.VerticalVelocity = 0;
|
||||
item->Animation.Airborne = false;
|
||||
lara->Control.WaterStatus = WaterStatus::Wade;
|
||||
}
|
||||
}
|
||||
|
@ -1069,7 +1067,10 @@ bool TestLaraFall(ItemInfo* item, CollisionInfo* coll)
|
|||
{
|
||||
auto* lara = GetLaraInfo(item);
|
||||
|
||||
if (coll->Middle.Floor <= STEPUP_HEIGHT ||
|
||||
int y = item->Pose.Position.y;
|
||||
auto probe = GetCollision(item);
|
||||
|
||||
if ((probe.Position.Floor - y) <= STEPUP_HEIGHT ||
|
||||
lara->Control.WaterStatus == WaterStatus::Wade) // TODO: This causes a legacy floor snap bug when Lara wades off a ledge into a dry room. @Sezz 2021.09.26
|
||||
{
|
||||
return false;
|
||||
|
@ -1192,25 +1193,29 @@ bool TestLaraMoveTolerance(ItemInfo* item, CollisionInfo* coll, MoveTestSetup te
|
|||
item->Pose.Position.x,
|
||||
y + testSetup.UpperFloorBound - 1,
|
||||
item->Pose.Position.z,
|
||||
item->RoomNumber);
|
||||
item->RoomNumber
|
||||
);
|
||||
|
||||
auto end1 = GameVector(
|
||||
probe.Coordinates.x,
|
||||
y + testSetup.UpperFloorBound - 1,
|
||||
probe.Coordinates.z,
|
||||
item->RoomNumber);
|
||||
item->RoomNumber
|
||||
);
|
||||
|
||||
auto start2 = GameVector(
|
||||
item->Pose.Position.x,
|
||||
y - laraHeight + 1,
|
||||
item->Pose.Position.z,
|
||||
item->RoomNumber);
|
||||
item->RoomNumber
|
||||
);
|
||||
|
||||
auto end2 = GameVector(
|
||||
probe.Coordinates.x,
|
||||
probe.Coordinates.y + 1,
|
||||
probe.Coordinates.z,
|
||||
item->RoomNumber);
|
||||
item->RoomNumber
|
||||
);
|
||||
|
||||
// Discard walls.
|
||||
if (probe.Position.Floor == NO_HEIGHT)
|
||||
|
@ -1220,11 +1225,11 @@ bool TestLaraMoveTolerance(ItemInfo* item, CollisionInfo* coll, MoveTestSetup te
|
|||
if (isSlopeDown || isSlopeUp || isDeath)
|
||||
return false;
|
||||
|
||||
// Conduct ray test at upper floor bound and lowest ceiling bound.
|
||||
// Assess ray/room collision.
|
||||
if (!LOS(&start1, &end1) || !LOS(&start2, &end2))
|
||||
return false;
|
||||
|
||||
// Assess move feasibility to location ahead.
|
||||
// Assess point/room collision.
|
||||
if ((probe.Position.Floor - y) <= testSetup.LowerFloorBound && // Within lower floor bound.
|
||||
(probe.Position.Floor - y) >= testSetup.UpperFloorBound && // Within upper floor bound.
|
||||
(probe.Position.Ceiling - y) < -laraHeight && // Within lowest ceiling bound.
|
||||
|
@ -1478,25 +1483,29 @@ bool TestLaraMonkeyMoveTolerance(ItemInfo* item, CollisionInfo* coll, MonkeyMove
|
|||
item->Pose.Position.x,
|
||||
y + testSetup.LowerCeilingBound + 1,
|
||||
item->Pose.Position.z,
|
||||
item->RoomNumber);
|
||||
item->RoomNumber
|
||||
);
|
||||
|
||||
auto end1 = GameVector(
|
||||
probe.Coordinates.x,
|
||||
probe.Coordinates.y - LARA_HEIGHT_MONKEY + testSetup.LowerCeilingBound + 1,
|
||||
probe.Coordinates.z,
|
||||
item->RoomNumber);
|
||||
item->RoomNumber
|
||||
);
|
||||
|
||||
auto start2 = GameVector(
|
||||
item->Pose.Position.x,
|
||||
y + LARA_HEIGHT_MONKEY - 1,
|
||||
item->Pose.Position.z,
|
||||
item->RoomNumber);
|
||||
item->RoomNumber
|
||||
);
|
||||
|
||||
auto end2 = GameVector(
|
||||
probe.Coordinates.x,
|
||||
probe.Coordinates.y - 1,
|
||||
probe.Coordinates.z,
|
||||
item->RoomNumber);
|
||||
item->RoomNumber
|
||||
);
|
||||
|
||||
// Discard walls.
|
||||
if (probe.Position.Ceiling == NO_HEIGHT)
|
||||
|
@ -1506,11 +1515,11 @@ bool TestLaraMonkeyMoveTolerance(ItemInfo* item, CollisionInfo* coll, MonkeyMove
|
|||
if (probe.Position.CeilingSlope)
|
||||
return false;
|
||||
|
||||
// Conduct ray test at lower ceiling bound and highest floor bound.
|
||||
// Assess ray/room collision.
|
||||
if (!LOS(&start1, &end1) || !LOS(&start2, &end2))
|
||||
return false;
|
||||
|
||||
// Assess move feasibility to location ahead.
|
||||
// Assess point/room collision.
|
||||
if (probe.BottomBlock->Flags.Monkeyswing && // Is monkey sector.
|
||||
(probe.Position.Floor - y) > LARA_HEIGHT_MONKEY && // Within highest floor bound.
|
||||
(probe.Position.Ceiling - y) <= testSetup.LowerCeilingBound && // Within lower ceiling bound.
|
||||
|
@ -1591,9 +1600,12 @@ VaultTestResult TestLaraVaultTolerance(ItemInfo* item, CollisionInfo* coll, Vaul
|
|||
if (swampTooDeep)
|
||||
return VaultTestResult{ false };
|
||||
|
||||
// HACK: Where the probe finds that the wall in front is formed by a ceiling or the space between the floor and ceiling is a clamp,
|
||||
// any climbable floor in a room above will be missed.
|
||||
// Raise y position of probe point by increments of CLICK(0.5f) to find this potential vault candidate location.
|
||||
// NOTE: Where the point/room probe finds that
|
||||
// a) the "wall" in front is formed by a ceiling, or
|
||||
// b) the space between the floor and ceiling is a clamp (i.e. it is too narrow),
|
||||
// any potentially climbable floor in a room above will be missed. The following block considers this.
|
||||
|
||||
// Raise y position of point/room probe by increments of CLICK(0.5f) to find potential vault ledge.
|
||||
int yOffset = testSetup.LowerFloorBound;
|
||||
while (((probeFront.Position.Ceiling - y) > -coll->Setup.Height || // Ceiling is below Lara's height...
|
||||
abs(probeFront.Position.Ceiling - probeFront.Position.Floor) <= testSetup.ClampMin || // OR clamp is too small
|
||||
|
@ -1608,7 +1620,7 @@ VaultTestResult TestLaraVaultTolerance(ItemInfo* item, CollisionInfo* coll, Vaul
|
|||
if (probeFront.Position.Floor == NO_HEIGHT)
|
||||
return VaultTestResult{ false };
|
||||
|
||||
// Assess vault candidate location.
|
||||
// Assess point/room collision.
|
||||
if ((probeFront.Position.Floor - y) < testSetup.LowerFloorBound && // Within lower floor bound.
|
||||
(probeFront.Position.Floor - y) >= testSetup.UpperFloorBound && // Within upper floor bound.
|
||||
abs(probeFront.Position.Ceiling - probeFront.Position.Floor) > testSetup.ClampMin && // Within clamp min.
|
||||
|
@ -1968,7 +1980,7 @@ CrawlVaultTestResult TestLaraCrawlVaultTolerance(ItemInfo* item, CollisionInfo*
|
|||
if (isSlope || isDeath)
|
||||
return CrawlVaultTestResult{ false };
|
||||
|
||||
// Assess crawl vault feasibility to location ahead.
|
||||
// Assess point/room collision.
|
||||
if ((probeA.Position.Floor - y) <= testSetup.LowerFloorBound && // Within lower floor bound.
|
||||
(probeA.Position.Floor - y) >= testSetup.UpperFloorBound && // Within upper floor bound.
|
||||
abs(probeA.Position.Ceiling - probeA.Position.Floor) > testSetup.ClampMin && // Crossing clamp limit.
|
||||
|
@ -2468,7 +2480,7 @@ bool TestLaraJumpTolerance(ItemInfo* item, CollisionInfo* coll, JumpTestSetup te
|
|||
if (isSwamp || isWading)
|
||||
return false;
|
||||
|
||||
// Assess jump feasibility toward location ahead.
|
||||
// Assess point/room collision.
|
||||
if (!TestLaraFacingCorner(item, testSetup.Angle, testSetup.Distance) && // Avoid jumping through corners.
|
||||
(probe.Position.Floor - y) >= -STEPUP_HEIGHT && // Within highest floor bound.
|
||||
((probe.Position.Ceiling - y) < -(coll->Setup.Height + (LARA_HEADROOM * 0.8f)) || // Within lowest ceiling bound...
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#include "Specific/trmath.h"
|
||||
#include "Specific/prng.h"
|
||||
#include "Renderer/Renderer11.h"
|
||||
#include "Scripting/ScriptInterfaceGame.h"
|
||||
#include "ScriptInterfaceGame.h"
|
||||
|
||||
using namespace TEN::Math::Random;
|
||||
using namespace TEN::Renderer;
|
||||
|
@ -1676,7 +1676,7 @@ void DoProjectileDynamics(short itemNumber, int x, int y, int z, int xv, int yv,
|
|||
ItemNewRoom(itemNumber, collResult.RoomNumber);
|
||||
}
|
||||
|
||||
void DoObjectCollision(ItemInfo* laraItem, CollisionInfo* coll) // previously LaraBaddieCollision
|
||||
void DoObjectCollision(ItemInfo* laraItem, CollisionInfo* coll) // previously LaraBaddyCollision
|
||||
{
|
||||
laraItem->HitStatus = false;
|
||||
coll->HitStatic = false;
|
||||
|
|
|
@ -399,7 +399,7 @@ void GetCollisionInfo(CollisionInfo* coll, ItemInfo* item, Vector3Int offset, bo
|
|||
coll->Front.Floor = STOP_SIZE;
|
||||
}
|
||||
else if (coll->Setup.BlockMonkeySwingEdge &&
|
||||
!collResult.BottomBlock->Flags.Monkeyswing)
|
||||
!GetCollision(x, y + coll->Setup.Height, z, item->RoomNumber).BottomBlock->Flags.Monkeyswing)
|
||||
{
|
||||
coll->Front.Floor = MAX_HEIGHT;
|
||||
}
|
||||
|
@ -457,7 +457,7 @@ void GetCollisionInfo(CollisionInfo* coll, ItemInfo* item, Vector3Int offset, bo
|
|||
coll->MiddleLeft.Floor = STOP_SIZE;
|
||||
}
|
||||
else if (coll->Setup.BlockMonkeySwingEdge &&
|
||||
!collResult.BottomBlock->Flags.Monkeyswing)
|
||||
!GetCollision(x, y + coll->Setup.Height, z, item->RoomNumber).BottomBlock->Flags.Monkeyswing)
|
||||
{
|
||||
coll->MiddleLeft.Floor = MAX_HEIGHT;
|
||||
}
|
||||
|
@ -510,7 +510,7 @@ void GetCollisionInfo(CollisionInfo* coll, ItemInfo* item, Vector3Int offset, bo
|
|||
coll->FrontLeft.Floor = STOP_SIZE;
|
||||
}
|
||||
else if (coll->Setup.BlockMonkeySwingEdge &&
|
||||
!collResult.BottomBlock->Flags.Monkeyswing)
|
||||
!GetCollision(x, y + coll->Setup.Height, z, item->RoomNumber).BottomBlock->Flags.Monkeyswing)
|
||||
{
|
||||
coll->FrontLeft.Floor = MAX_HEIGHT;
|
||||
}
|
||||
|
@ -568,7 +568,7 @@ void GetCollisionInfo(CollisionInfo* coll, ItemInfo* item, Vector3Int offset, bo
|
|||
coll->MiddleRight.Floor = STOP_SIZE;
|
||||
}
|
||||
else if (coll->Setup.BlockMonkeySwingEdge &&
|
||||
!collResult.BottomBlock->Flags.Monkeyswing)
|
||||
!GetCollision(x, y + coll->Setup.Height, z, item->RoomNumber).BottomBlock->Flags.Monkeyswing)
|
||||
{
|
||||
coll->MiddleRight.Floor = MAX_HEIGHT;
|
||||
}
|
||||
|
@ -621,7 +621,7 @@ void GetCollisionInfo(CollisionInfo* coll, ItemInfo* item, Vector3Int offset, bo
|
|||
coll->FrontRight.Floor = STOP_SIZE;
|
||||
}
|
||||
else if (coll->Setup.BlockMonkeySwingEdge &&
|
||||
!collResult.BottomBlock->Flags.Monkeyswing)
|
||||
!GetCollision(x, y + coll->Setup.Height, z, item->RoomNumber).BottomBlock->Flags.Monkeyswing)
|
||||
{
|
||||
coll->FrontRight.Floor = MAX_HEIGHT;
|
||||
}
|
||||
|
|
|
@ -1032,7 +1032,7 @@ int CreatureActive(short itemNumber)
|
|||
|
||||
if (item->Status == ITEM_INVISIBLE || !item->Data.is<CreatureInfo>())
|
||||
{
|
||||
if (!EnableBaddieAI(itemNumber, 0))
|
||||
if (!EnableBaddyAI(itemNumber, 0))
|
||||
return false; // AI couldn't be activated
|
||||
|
||||
item->Status = ITEM_ACTIVE;
|
||||
|
@ -1080,13 +1080,13 @@ int StalkBox(ItemInfo* item, ItemInfo* enemy, int boxNumber)
|
|||
if (enemyQuad == boxQuad)
|
||||
return false;
|
||||
|
||||
int baddieQuad = 0;
|
||||
int baddyQuad = 0;
|
||||
if (item->Pose.Position.z > enemy->Pose.Position.z)
|
||||
baddieQuad = (item->Pose.Position.x > enemy->Pose.Position.x) ? 2 : 1;
|
||||
baddyQuad = (item->Pose.Position.x > enemy->Pose.Position.x) ? 2 : 1;
|
||||
else
|
||||
baddieQuad = (item->Pose.Position.x > enemy->Pose.Position.x) ? 3 : 0;
|
||||
baddyQuad = (item->Pose.Position.x > enemy->Pose.Position.x) ? 3 : 0;
|
||||
|
||||
if (enemyQuad == baddieQuad && abs(enemyQuad - boxQuad) == 2)
|
||||
if (enemyQuad == baddyQuad && abs(enemyQuad - boxQuad) == 2)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
|
@ -1108,18 +1108,18 @@ int CreatureVault(short itemNumber, short angle, int vault, int shift)
|
|||
vault = 0;
|
||||
else if (item->Floor > y + CHECK_CLICK(7))
|
||||
vault = -4;
|
||||
// FIXME: edit assets adding climb down animations for Von Croy and baddies?
|
||||
// FIXME: edit assets adding climb down animations for Von Croy and baddys?
|
||||
else if (item->Floor > y + CHECK_CLICK(5) &&
|
||||
item->ObjectNumber != ID_VON_CROY &&
|
||||
item->ObjectNumber != ID_GOON1 &&
|
||||
item->ObjectNumber != ID_GOON2)
|
||||
item->ObjectNumber != ID_BADDY1 &&
|
||||
item->ObjectNumber != ID_BADDY2)
|
||||
{
|
||||
vault = -3;
|
||||
}
|
||||
else if (item->Floor > y + CHECK_CLICK(3) &&
|
||||
item->ObjectNumber != ID_VON_CROY &&
|
||||
item->ObjectNumber != ID_GOON1 &&
|
||||
item->ObjectNumber != ID_GOON2)
|
||||
item->ObjectNumber != ID_BADDY1 &&
|
||||
item->ObjectNumber != ID_BADDY2)
|
||||
{
|
||||
vault = -2;
|
||||
}
|
||||
|
|
|
@ -45,10 +45,10 @@
|
|||
#include "Specific/setup.h"
|
||||
#include "Specific/prng.h"
|
||||
#include "Specific/winmain.h"
|
||||
#include "Scripting/Flow/ScriptInterfaceFlowHandler.h"
|
||||
#include "Scripting/ScriptInterfaceGame.h"
|
||||
#include "Scripting/Objects/ScriptInterfaceObjectsHandler.h"
|
||||
#include "Scripting/Strings/ScriptInterfaceStringsHandler.h"
|
||||
#include "Flow/ScriptInterfaceFlowHandler.h"
|
||||
#include "ScriptInterfaceGame.h"
|
||||
#include "Objects/ScriptInterfaceObjectsHandler.h"
|
||||
#include "Strings/ScriptInterfaceStringsHandler.h"
|
||||
|
||||
using std::vector;
|
||||
using std::unordered_map;
|
||||
|
|
|
@ -75,7 +75,7 @@ function<EffectFunction> effect_routines[NUM_FLIPEFFECTS] =
|
|||
MeshSwapToPour, //43
|
||||
MeshSwapFromPour, //44
|
||||
LaraLocationPad, //45
|
||||
KillActiveBaddies //46
|
||||
KillActiveBaddys //46
|
||||
};
|
||||
|
||||
void FlashOrange(ItemInfo* item)
|
||||
|
@ -191,7 +191,7 @@ void LaraHandsFree(ItemInfo* item)
|
|||
lara->Control.HandStatus = HandStatus::Free;
|
||||
}
|
||||
|
||||
void KillActiveBaddies(ItemInfo* item)
|
||||
void KillActiveBaddys(ItemInfo* item)
|
||||
{
|
||||
if (NextItemActive != NO_ITEM)
|
||||
{
|
||||
|
|
|
@ -25,7 +25,7 @@ void SwapCrowbar(ItemInfo* item);
|
|||
void ExplosionFX(ItemInfo* item);
|
||||
void LaraLocation(ItemInfo* item);
|
||||
void LaraLocationPad(ItemInfo* item);
|
||||
void KillActiveBaddies(ItemInfo* item);
|
||||
void KillActiveBaddys(ItemInfo* item);
|
||||
void LaraHandsFree(ItemInfo* item);
|
||||
void ShootRightGun(ItemInfo* item);
|
||||
void ShootLeftGun(ItemInfo* item);
|
||||
|
|
|
@ -10,12 +10,12 @@
|
|||
#include "Game/Lara/lara_one_gun.h"
|
||||
#include "Objects/Generic/Object/objects.h"
|
||||
#include "Objects/Generic/Switches/switch.h"
|
||||
#include "Scripting/ScriptInterfaceGame.h"
|
||||
#include "ScriptInterfaceGame.h"
|
||||
#include "Sound/sound.h"
|
||||
#include "Specific/input.h"
|
||||
#include "Specific/setup.h"
|
||||
|
||||
#include "Scripting/Objects/ScriptInterfaceObjectsHandler.h"
|
||||
#include "Objects/ScriptInterfaceObjectsHandler.h"
|
||||
|
||||
int NumberLosRooms;
|
||||
short LosRooms[20];
|
||||
|
@ -111,7 +111,7 @@ bool GetTargetOnLOS(GameVector* src, GameVector* dest, int drawTarget, bool firi
|
|||
GetFloor(target.x, target.y, target.z, &target.roomNumber);
|
||||
|
||||
// TODO: for covering scientist
|
||||
// if ((itemNumber >= 0) && (BaddieSlots[itemNumber].itemNum != NO_ITEM)) // BUGFIX: ensure target has AI. No more pistol desync and camera wobble when shooting non-AI movable objects.
|
||||
// if ((itemNumber >= 0) && (BaddySlots[itemNumber].itemNum != NO_ITEM)) // BUGFIX: ensure target has AI. No more pistol desync and camera wobble when shooting non-AI movable objects.
|
||||
// Lara.target = &g_Level.Items[itemNumber];
|
||||
// this is crashing and it's not really doing anything..
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ void InitialiseLOTarray(int itemNumber)
|
|||
}
|
||||
}
|
||||
|
||||
int EnableBaddieAI(short itemNum, int always)
|
||||
int EnableBaddyAI(short itemNum, int always)
|
||||
{
|
||||
ItemInfo* item = &g_Level.Items[itemNum];
|
||||
|
||||
|
@ -73,7 +73,7 @@ int EnableBaddieAI(short itemNum, int always)
|
|||
CREATURE_INFO* creatureToDisable = &ActiveCreatures[slotToDisable];
|
||||
|
||||
itemToDisable->status = ITEM_INVISIBLE;
|
||||
DisableBaddieAI(creatureToDisable->itemNum);
|
||||
DisableBaddyAI(creatureToDisable->itemNum);
|
||||
InitialiseSlot(itemNum, slotToDisable);
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
extern std::vector<CreatureInfo*> ActiveCreatures;
|
||||
|
||||
void InitialiseLOTarray(int allocMem);
|
||||
int EnableBaddieAI(short itemNum, int always);
|
||||
int EnableBaddyAI(short itemNum, int always);
|
||||
void InitialiseSlot(short itemNum, short slot);
|
||||
void DisableEntityAI(short itemNumber);
|
||||
void ClearLOT(LOTInfo* LOT);
|
||||
|
|
|
@ -509,7 +509,7 @@ void TestTriggers(FloorInfo* floor, int x, int y, int z, bool heavy, int heavyFl
|
|||
|
||||
if ((item->Flags & CODE_BITS) == CODE_BITS)
|
||||
{
|
||||
item->Flags |= 0x20;
|
||||
item->Flags |= TRIGGERED;
|
||||
|
||||
if (flags & ONESHOT)
|
||||
item->Flags |= ONESHOT;
|
||||
|
@ -523,7 +523,7 @@ void TestTriggers(FloorInfo* floor, int x, int y, int z, bool heavy, int heavyFl
|
|||
if (item->Status == ITEM_INVISIBLE)
|
||||
{
|
||||
item->TouchBits = 0;
|
||||
if (EnableBaddieAI(value, 0))
|
||||
if (EnableBaddyAI(value, 0))
|
||||
{
|
||||
item->Status = ITEM_ACTIVE;
|
||||
AddActiveItem(value);
|
||||
|
@ -540,7 +540,7 @@ void TestTriggers(FloorInfo* floor, int x, int y, int z, bool heavy, int heavyFl
|
|||
item->TouchBits = 0;
|
||||
item->Status = ITEM_ACTIVE;
|
||||
AddActiveItem(value);
|
||||
EnableBaddieAI(value, 1);
|
||||
EnableBaddyAI(value, 1);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
@ -11,7 +11,7 @@ constexpr auto ATONESHOT = 0x0080;
|
|||
constexpr auto VALUE_BITS = 0x03FF;
|
||||
constexpr auto CODE_BITS = 0x3E00;
|
||||
constexpr auto END_BIT = 0x8000;
|
||||
constexpr auto TRIGGERED = 0x20;
|
||||
constexpr auto TRIGGERED = 0x20;
|
||||
enum FLOORDATA_MASKS
|
||||
{
|
||||
FD_MASK_FUNCTION = 0x001F,
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#include "Specific/setup.h"
|
||||
#include "Renderer/Renderer11Enums.h"
|
||||
#include "Renderer/Renderer11.h"
|
||||
#include "Scripting/ScriptInterfaceGame.h"
|
||||
#include "ScriptInterfaceGame.h"
|
||||
|
||||
using TEN::Renderer::g_Renderer;
|
||||
|
||||
|
@ -50,9 +50,6 @@ namespace TEN::Control::Volumes
|
|||
break;
|
||||
}
|
||||
|
||||
// TODO: Implement checks on which item is entering/inside/leaving volume
|
||||
// and pass item name or ID as argument for Lua function, so it knows its caller.
|
||||
|
||||
if (contains)
|
||||
{
|
||||
CurrentCollidedVolume = i + 1;
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#include "Specific/setup.h"
|
||||
#include "Specific/prng.h"
|
||||
#include "Specific/trmath.h"
|
||||
#include "Scripting/Flow/ScriptInterfaceFlowHandler.h"
|
||||
#include "Flow/ScriptInterfaceFlowHandler.h"
|
||||
#include "Renderer/Renderer11.h"
|
||||
|
||||
using TEN::Renderer::g_Renderer;
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#include "Game/items.h"
|
||||
#include "Game/Lara/lara.h"
|
||||
#include "Renderer/Renderer11.h"
|
||||
#include "Scripting/Flow/ScriptInterfaceFlowHandler.h"
|
||||
#include "Flow/ScriptInterfaceFlowHandler.h"
|
||||
#include "Specific/setup.h"
|
||||
#include "Specific/level.h"
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
#include "Game/Lara/lara.h"
|
||||
#include "Renderer/Renderer11.h"
|
||||
#include "Sound/sound.h"
|
||||
#include "Scripting/Flow/ScriptInterfaceFlowHandler.h"
|
||||
#include "Flow/ScriptInterfaceFlowHandler.h"
|
||||
#include "Specific/setup.h"
|
||||
#include "Specific/level.h"
|
||||
#include "Specific/trmath.h"
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
#include "Game/items.h"
|
||||
#include "Game/Lara/lara.h"
|
||||
#include "Renderer/Renderer11.h"
|
||||
#include "Scripting/Flow/ScriptInterfaceFlowHandler.h"
|
||||
#include "Flow/ScriptInterfaceFlowHandler.h"
|
||||
#include "Sound/sound.h"
|
||||
#include "Specific/level.h"
|
||||
#include "Specific/setup.h"
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
#include "Specific/prng.h"
|
||||
#include "Specific/setup.h"
|
||||
#include "Specific/level.h"
|
||||
#include "Scripting/ScriptInterfaceLevel.h"
|
||||
#include "ScriptInterfaceLevel.h"
|
||||
|
||||
using namespace TEN::Math::Random;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#pragma once
|
||||
#include <SimpleMath.h>
|
||||
#include "Scripting/ScriptInterfaceLevel.h"
|
||||
#include "ScriptInterfaceLevel.h"
|
||||
#include "Specific/trmath.h"
|
||||
|
||||
namespace TEN {
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#include "Specific/input.h"
|
||||
#include "Specific/configuration.h"
|
||||
#include "Renderer/Renderer11.h"
|
||||
#include "Scripting/ScriptInterfaceLevel.h"
|
||||
#include "ScriptInterfaceLevel.h"
|
||||
|
||||
using namespace TEN::Renderer;
|
||||
GuiController g_Gui;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#pragma once
|
||||
#include "Scripting/LanguageScript.h"
|
||||
#include "LanguageScript.h"
|
||||
#include "Specific/configuration.h"
|
||||
|
||||
enum class InventoryMode
|
||||
|
|
|
@ -5,10 +5,10 @@
|
|||
#include "Game/collision/floordata.h"
|
||||
#include "Game/effects/effects.h"
|
||||
#include "Game/Lara/lara.h"
|
||||
#include "Scripting/ScriptInterfaceGame.h"
|
||||
#include "ScriptInterfaceGame.h"
|
||||
#include "Specific/setup.h"
|
||||
#include "Specific/level.h"
|
||||
#include "Scripting/Objects/ScriptInterfaceObjectsHandler.h"
|
||||
#include "Objects/ScriptInterfaceObjectsHandler.h"
|
||||
|
||||
using namespace TEN::Floordata;
|
||||
|
||||
|
|
|
@ -261,7 +261,7 @@ void DoPickup(ItemInfo* laraItem)
|
|||
else
|
||||
{
|
||||
pickupItem->ItemFlags[3] = 1;
|
||||
pickupItem->Flags |= 0x20;
|
||||
pickupItem->Flags |= TRIGGERED;
|
||||
pickupItem->Status = ITEM_INVISIBLE;
|
||||
}
|
||||
|
||||
|
@ -294,7 +294,7 @@ void DoPickup(ItemInfo* laraItem)
|
|||
if (pickupItem->TriggerFlags & 0xC0)
|
||||
{
|
||||
pickupItem->ItemFlags[3] = 1;
|
||||
pickupItem->Flags |= 0x20;
|
||||
pickupItem->Flags |= TRIGGERED;
|
||||
pickupItem->Status = ITEM_INVISIBLE;
|
||||
}
|
||||
|
||||
|
@ -900,7 +900,7 @@ void InitialisePickup(short itemNumber)
|
|||
item->MeshBits = 0;
|
||||
|
||||
if (item->Status == ITEM_INVISIBLE)
|
||||
item->Flags |= 0x20;
|
||||
item->Flags |= TRIGGERED;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -26,9 +26,9 @@
|
|||
#include "Specific/level.h"
|
||||
#include "Specific/setup.h"
|
||||
#include "Specific/savegame/flatbuffers/ten_savegame_generated.h"
|
||||
#include "Scripting/ScriptInterfaceLevel.h"
|
||||
#include "Scripting/ScriptInterfaceGame.h"
|
||||
#include "Scripting/Objects/ScriptInterfaceObjectsHandler.h"
|
||||
#include "ScriptInterfaceLevel.h"
|
||||
#include "ScriptInterfaceGame.h"
|
||||
#include "Objects/ScriptInterfaceObjectsHandler.h"
|
||||
|
||||
|
||||
using namespace TEN::Effects::Lara;
|
||||
|
@ -1127,7 +1127,7 @@ bool SaveGame::Load(int slot)
|
|||
// Creature data for intelligent items
|
||||
if (item->ObjectNumber != ID_LARA && obj->intelligent)
|
||||
{
|
||||
EnableBaddieAI(i, true);
|
||||
EnableBaddyAI(i, true);
|
||||
|
||||
auto creature = GetCreatureInfo(item);
|
||||
auto data = savedItem->data();
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#pragma once
|
||||
#include "Scripting/Flow/ScriptInterfaceFlowHandler.h"
|
||||
#include "Flow/ScriptInterfaceFlowHandler.h"
|
||||
#include "Specific/IO/ChunkId.h"
|
||||
#include "Specific/IO/ChunkReader.h"
|
||||
#include "Specific/IO/ChunkWriter.h"
|
||||
|
|
|
@ -146,7 +146,7 @@ void PuzzleHoleCollision(short itemNumber, ItemInfo* laraItem, CollisionInfo* co
|
|||
laraInfo->Control.HandStatus = HandStatus::Busy;
|
||||
laraInfo->InteractedItem = itemNumber;
|
||||
receptableItem->Pose.Orientation.y = oldYrot;
|
||||
receptableItem->Flags |= 0x20;
|
||||
receptableItem->Flags |= TRIGGERED;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -309,7 +309,7 @@ void KeyHoleCollision(short itemNumber, ItemInfo* laraItem, CollisionInfo* coll)
|
|||
laraInfo->Control.IsMoving = false;
|
||||
ResetLaraFlex(laraItem);
|
||||
laraInfo->Control.HandStatus = HandStatus::Busy;
|
||||
keyHoleItem->Flags |= 0x20;
|
||||
keyHoleItem->Flags |= TRIGGERED;
|
||||
keyHoleItem->Status = ITEM_ACTIVE;
|
||||
|
||||
if (keyHoleItem->TriggerFlags == 1 && keyHoleItem->ObjectNumber == ID_KEY_HOLE8)
|
||||
|
|
|
@ -88,9 +88,7 @@ void ControlCentaurBomb(short itemNumber)
|
|||
if (probe.Position.Floor < item->Pose.Position.y ||
|
||||
probe.Position.Ceiling > item->Pose.Position.y)
|
||||
{
|
||||
item->Pose.Position.x = oldPos.x;
|
||||
item->Pose.Position.y = oldPos.y;
|
||||
item->Pose.Position.z = oldPos.z;
|
||||
item->Pose.Position = oldPos;
|
||||
|
||||
if (TestEnvironment(ENV_FLAG_WATER, item->RoomNumber))
|
||||
TriggerUnderwaterExplosion(item, 0);
|
||||
|
@ -131,7 +129,7 @@ void ControlCentaurBomb(short itemNumber)
|
|||
currentObject->intelligent && !currentObject->undead &&
|
||||
currentObject->collision)
|
||||
{
|
||||
DoExplosiveDamageOnBaddie(LaraItem, currentItem, item, LaraWeaponType::Crossbow);
|
||||
DoExplosiveDamageOnBaddy(LaraItem, currentItem, item, LaraWeaponType::Crossbow);
|
||||
}
|
||||
|
||||
k++;
|
||||
|
@ -154,12 +152,10 @@ static void RocketGun(ItemInfo* centaurItem)
|
|||
projectileItem->Shade = 16 * 256;
|
||||
projectileItem->RoomNumber = centaurItem->RoomNumber;
|
||||
|
||||
Vector3Int pos = { 11, 415, 41 };
|
||||
auto pos = Vector3Int(11, 415, 41);
|
||||
GetJointAbsPosition(centaurItem, &pos, 13);
|
||||
|
||||
projectileItem->Pose.Position.x = pos.x;
|
||||
projectileItem->Pose.Position.y = pos.y;
|
||||
projectileItem->Pose.Position.z = pos.z;
|
||||
projectileItem->Pose.Position = pos;
|
||||
InitialiseItem(itemNumber);
|
||||
|
||||
projectileItem->Pose.Orientation.x = 0;
|
||||
|
|
|
@ -559,7 +559,7 @@ void BartoliControl(short itemNumber)
|
|||
front = &g_Level.Items[frontItem];
|
||||
|
||||
front->TouchBits = back->TouchBits = 0;
|
||||
EnableBaddieAI(frontItem, 1);
|
||||
EnableBaddyAI(frontItem, 1);
|
||||
AddActiveItem(frontItem);
|
||||
AddActiveItem(backItem);
|
||||
back->Status = ITEM_ACTIVE;
|
||||
|
|
|
@ -110,7 +110,7 @@ void SkidooManControl(short riderItemNumber)
|
|||
|
||||
if (!item->Data)
|
||||
{
|
||||
EnableBaddieAI(itemNumber, TRUE);
|
||||
EnableBaddyAI(itemNumber, TRUE);
|
||||
item->Status = ITEM_ACTIVE;
|
||||
}
|
||||
|
||||
|
|
|
@ -155,7 +155,7 @@ static void StartEntity(ObjectInfo* obj)
|
|||
g_Level.Bones[obj->boneIndex + 14 * 4] |= (ROT_Y);
|
||||
}
|
||||
|
||||
obj = &Objects[ID_GOON_SILENCER1];
|
||||
obj = &Objects[ID_BADDY_SILENCER1];
|
||||
if (obj->loaded)
|
||||
{
|
||||
obj->initialise = InitialiseCreature;
|
||||
|
@ -176,17 +176,17 @@ static void StartEntity(ObjectInfo* obj)
|
|||
g_Level.Bones[obj->boneIndex + 1 * 4] |= (ROT_X | ROT_Y);
|
||||
}
|
||||
|
||||
obj = &Objects[ID_GOON_SILENCER2];
|
||||
obj = &Objects[ID_BADDY_SILENCER2];
|
||||
if (obj->loaded)
|
||||
{
|
||||
if (Objects[ID_GOON_SILENCER1].loaded)
|
||||
if (Objects[ID_BADDY_SILENCER1].loaded)
|
||||
{
|
||||
obj->animIndex = Objects[ID_GOON_SILENCER1].animIndex;
|
||||
obj->frameBase = Objects[ID_GOON_SILENCER1].frameBase;
|
||||
obj->animIndex = Objects[ID_BADDY_SILENCER1].animIndex;
|
||||
obj->frameBase = Objects[ID_BADDY_SILENCER1].frameBase;
|
||||
}
|
||||
else
|
||||
{
|
||||
TENLog("ID_GOON_SILENCER1 not found!", LogLevel::Error);
|
||||
TENLog("ID_BADDY_SILENCER1 not found!", LogLevel::Error);
|
||||
}
|
||||
|
||||
obj->initialise = InitialiseCreature;
|
||||
|
@ -207,17 +207,17 @@ static void StartEntity(ObjectInfo* obj)
|
|||
g_Level.Bones[obj->boneIndex + 1 * 4] |= (ROT_X | ROT_Y);
|
||||
}
|
||||
|
||||
obj = &Objects[ID_GOON_SILENCER3];
|
||||
obj = &Objects[ID_BADDY_SILENCER3];
|
||||
if (obj->loaded)
|
||||
{
|
||||
if (Objects[ID_GOON_SILENCER1].loaded)
|
||||
if (Objects[ID_BADDY_SILENCER1].loaded)
|
||||
{
|
||||
obj->animIndex = Objects[ID_GOON_SILENCER1].animIndex;
|
||||
obj->frameBase = Objects[ID_GOON_SILENCER1].frameBase;
|
||||
obj->animIndex = Objects[ID_BADDY_SILENCER1].animIndex;
|
||||
obj->frameBase = Objects[ID_BADDY_SILENCER1].frameBase;
|
||||
}
|
||||
else
|
||||
{
|
||||
TENLog("ID_GOON_SILENCER1 not found!", LogLevel::Error);
|
||||
TENLog("ID_BADDY_SILENCER1 not found!", LogLevel::Error);
|
||||
}
|
||||
|
||||
obj->initialise = InitialiseCreature;
|
||||
|
|
|
@ -393,7 +393,7 @@ namespace TEN::Entities::TR4
|
|||
item->Status = ITEM_ACTIVE;
|
||||
item->Collidable = true;
|
||||
|
||||
EnableBaddieAI(itemNumber, 1);
|
||||
EnableBaddyAI(itemNumber, 1);
|
||||
|
||||
item->TriggerFlags = 1;
|
||||
return true;
|
||||
|
|
File diff suppressed because it is too large
Load diff
7
TombEngine/Objects/TR4/Entity/tr4_baddy.h
Normal file
7
TombEngine/Objects/TR4/Entity/tr4_baddy.h
Normal file
|
@ -0,0 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
namespace TEN::Entities::TR4
|
||||
{
|
||||
void InitialiseBaddy(short itemNumber);
|
||||
void BaddyControl(short itemNumber);
|
||||
}
|
|
@ -89,7 +89,7 @@ namespace TEN::Entities::TR4
|
|||
/*bestdistance = MAXINT;
|
||||
bat->enemy = LaraItem;
|
||||
|
||||
slots = &BaddieSlots[0];
|
||||
slots = &BaddySlots[0];
|
||||
for (int i = 0; i < NUM_SLOTS; i++, slots++)
|
||||
{
|
||||
if (slots->itemNum != NO_ITEM && slots->itemNum != itemNumber)
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
namespace TEN::Entities::TR4
|
||||
{
|
||||
void InitialiseGoon(short itemNumber);
|
||||
void GoonControl(short itemNumber);
|
||||
}
|
|
@ -524,7 +524,7 @@ static int GetJeepCollisionAnim(ItemInfo* item, Vector3Int* p)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void JeepBaddieCollision(ItemInfo* jeep)
|
||||
static void JeepBaddyCollision(ItemInfo* jeep)
|
||||
{
|
||||
vector<short> roomsList;
|
||||
short* door, numDoors;
|
||||
|
@ -788,7 +788,7 @@ int JeepDynamics(ItemInfo* item)
|
|||
|
||||
if (!(item->Flags & ONESHOT))
|
||||
{
|
||||
JeepBaddieCollision(item);
|
||||
JeepBaddyCollision(item);
|
||||
// v37 = sub_467850(item->pos.Position.x, item->pos.Position.y, item->pos.Position.z, item->roomNumber, 512);
|
||||
}
|
||||
|
||||
|
@ -1525,7 +1525,7 @@ void JeepCollision(short itemNumber, ItemInfo* l, CollisionInfo* coll)
|
|||
goto LABEL_11;
|
||||
}
|
||||
}
|
||||
EnableBaddieAI(v4, 1);
|
||||
EnableBaddyAI(v4, 1);
|
||||
*(_DWORD*)(v5 + 5610) = *(_DWORD*)(v5 + 5610) & 0xFFFFFFFB | 2;
|
||||
AddActiveItem(v4);
|
||||
}*/
|
||||
|
@ -1559,7 +1559,7 @@ void JeepCollision(short itemNumber, ItemInfo* l, CollisionInfo* coll)
|
|||
jeep->revs = 0;
|
||||
jeep->unknown2 = 0;
|
||||
|
||||
item->Flags |= 0x20;
|
||||
item->Flags |= TRIGGERED;
|
||||
}
|
||||
else
|
||||
ObjectCollision(itemNumber, l, coll);
|
||||
|
|
|
@ -642,7 +642,7 @@ static int GetMotorbikeCollisionAnim(ItemInfo* item, Vector3Int* pos)
|
|||
return 0;
|
||||
}
|
||||
|
||||
void MotorbikeBaddieCollision(ItemInfo* bike)
|
||||
void MotorbikeBaddyCollision(ItemInfo* bike)
|
||||
{
|
||||
int x, y, z, i;
|
||||
|
||||
|
@ -859,7 +859,7 @@ static int MotorBikeDynamics(ItemInfo* item)
|
|||
|
||||
if (!(item->Flags & ONESHOT))
|
||||
{
|
||||
MotorbikeBaddieCollision(item);
|
||||
MotorbikeBaddyCollision(item);
|
||||
//MotorBikeStaticCollision(item->pos.x, item->pos.y, item->pos.z, item->room_number, (WALL_L / 2));
|
||||
}
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#include "Game/pickup/pickup.h"
|
||||
/// entities
|
||||
#include "tr4_ahmet.h" // OK
|
||||
#include "tr4_goon.h" // OK
|
||||
#include "tr4_baddy.h" // OK
|
||||
#include "tr4_bat.h" // OK
|
||||
#include "tr4_bigscorpion.h" // OK
|
||||
#include "tr4_crocodile.h" // OK
|
||||
|
@ -222,11 +222,11 @@ static void StartEntity(ObjectInfo* obj)
|
|||
g_Level.Bones[obj->boneIndex + 9 * 4] |= ROT_Y;
|
||||
}
|
||||
|
||||
obj = &Objects[ID_GOON1];
|
||||
obj = &Objects[ID_BADDY1];
|
||||
if (obj->loaded)
|
||||
{
|
||||
obj->initialise = InitialiseGoon;
|
||||
obj->control = GoonControl;
|
||||
obj->initialise = InitialiseBaddy;
|
||||
obj->control = BaddyControl;
|
||||
obj->collision = CreatureCollision;
|
||||
obj->shadowSize = 128;
|
||||
obj->HitPoints = 25;
|
||||
|
@ -247,11 +247,11 @@ static void StartEntity(ObjectInfo* obj)
|
|||
//g_Level.Bones[obj->boneIndex + 88 * 4] |= ROT_X;
|
||||
}
|
||||
|
||||
obj = &Objects[ID_GOON2];
|
||||
obj = &Objects[ID_BADDY2];
|
||||
if (obj->loaded)
|
||||
{
|
||||
obj->initialise = InitialiseGoon;
|
||||
obj->control = GoonControl;
|
||||
obj->initialise = InitialiseBaddy;
|
||||
obj->control = BaddyControl;
|
||||
obj->collision = CreatureCollision;
|
||||
obj->shadowSize = 128;
|
||||
obj->HitPoints = 25;
|
||||
|
|
|
@ -413,7 +413,7 @@ void LarsonControl(short itemNumber)
|
|||
else
|
||||
{
|
||||
item->HitPoints = -16384;
|
||||
DisableBaddieAI(itemNumber);
|
||||
DisableBaddyAI(itemNumber);
|
||||
KillItem(itemNumber);
|
||||
}
|
||||
}*/
|
||||
|
|
|
@ -112,7 +112,7 @@ void ControlHighObject1(short itemNumber)
|
|||
item->Pose.Position.y += 8;
|
||||
|
||||
auto* targetItem = &g_Level.Items[(item->ItemFlags[3] / 256) & 0xFF];
|
||||
targetItem->Flags |= 0x20u;
|
||||
targetItem->Flags |= TRIGGERED;
|
||||
targetItem->Pose.Position.y = item->Pose.Position.y - 560;
|
||||
}
|
||||
|
||||
|
@ -120,7 +120,7 @@ void ControlHighObject1(short itemNumber)
|
|||
{
|
||||
auto* targetItem = &g_Level.Items[item->ItemFlags[2] & 0xFF];
|
||||
targetItem->ItemFlags[1] = 0;
|
||||
targetItem->Flags |= 0x20u;
|
||||
targetItem->Flags |= TRIGGERED;
|
||||
|
||||
item->ItemFlags[0] = 0;
|
||||
item->ItemFlags[1] = 0;
|
||||
|
@ -172,7 +172,7 @@ void ControlHighObject1(short itemNumber)
|
|||
targetItem = &g_Level.Items[targetItemNumber];
|
||||
|
||||
targetItem->ItemFlags[1] = 1;
|
||||
targetItem->Flags |= 0x20;
|
||||
targetItem->Flags |= TRIGGERED;
|
||||
targetItem->Flags &= 0xC1FF;
|
||||
return;
|
||||
}
|
||||
|
@ -203,7 +203,7 @@ void ControlHighObject1(short itemNumber)
|
|||
|
||||
short targetItemNumber = (item->ItemFlags[3] / 256) & 0xFF;
|
||||
auto* targetItem = &g_Level.Items[targetItemNumber];
|
||||
targetItem->Flags |= 0x20;
|
||||
targetItem->Flags |= TRIGGERED;
|
||||
targetItem->Pose.Position.y = item->Pose.Position.y - 560;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -132,7 +132,7 @@ void ExplosionControl(short itemNumber)
|
|||
else if (CollidedItems[i]->ObjectNumber != ID_SWITCH_TYPE7 && CollidedItems[i]->ObjectNumber != ID_SWITCH_TYPE8)
|
||||
{
|
||||
if (Objects[CollidedItems[i]->ObjectNumber].intelligent)
|
||||
DoExplosiveDamageOnBaddie(LaraItem, CollidedItems[i], item, LaraWeaponType::GrenadeLauncher);
|
||||
DoExplosiveDamageOnBaddy(LaraItem, CollidedItems[i], item, LaraWeaponType::GrenadeLauncher);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -116,9 +116,9 @@ enum GAME_OBJECT_ID : short
|
|||
/* Humans */
|
||||
ID_SCUBA_HARPOON = 150,
|
||||
ID_SCUBA_DIVER,
|
||||
ID_GOON_SILENCER1,
|
||||
ID_GOON_SILENCER2,
|
||||
ID_GOON_SILENCER3,
|
||||
ID_BADDY_SILENCER1,
|
||||
ID_BADDY_SILENCER2,
|
||||
ID_BADDY_SILENCER3,
|
||||
ID_BARRACUDA,
|
||||
ID_WORKER_SHOTGUN,
|
||||
ID_WORKER_MACHINEGUN,
|
||||
|
@ -138,8 +138,8 @@ enum GAME_OBJECT_ID : short
|
|||
ID_TRIBESMAN_WITH_DARTS,
|
||||
ID_MP_WITH_STICK,
|
||||
ID_MP_WITH_GUN,
|
||||
ID_GOON1, // TR4 - OK
|
||||
ID_GOON2, // TR4 - OK
|
||||
ID_BADDY1, // TR4 - OK
|
||||
ID_BADDY2, // TR4 - OK
|
||||
ID_SAS_CAIRO, // TR4 - OK
|
||||
ID_SAS_DYING, // DEPRECATED?
|
||||
ID_SAS_CAPTAIN, // DEPRECATED?
|
||||
|
|
|
@ -495,7 +495,7 @@ namespace TEN::Renderer
|
|||
void DrawItems(RenderView& view, bool transparent);
|
||||
void DrawItemsTransparent(RendererTransparentFaceInfo* info, RenderView& view);
|
||||
void DrawAnimatingItem(RendererItem* item, RenderView& view, bool transparent);
|
||||
void DrawBaddieGunflashes(RenderView& view);
|
||||
void DrawBaddyGunflashes(RenderView& view);
|
||||
void DrawStatics(RenderView& view, bool transparent);
|
||||
void RenderShadowMap(RenderView& view);
|
||||
void DrawWraithExtra(RendererItem* item, RenderView& view);
|
||||
|
|
|
@ -2715,7 +2715,7 @@ namespace TEN::Renderer
|
|||
DrawItems(view, true);
|
||||
DrawEffects(view, true);
|
||||
DrawGunFlashes(view);
|
||||
DrawBaddieGunflashes(view);
|
||||
DrawBaddyGunflashes(view);
|
||||
|
||||
DrawTransparentFaces(view);
|
||||
|
||||
|
|
|
@ -633,7 +633,7 @@ namespace TEN::Renderer
|
|||
return true;
|
||||
}
|
||||
|
||||
void Renderer11::DrawBaddieGunflashes(RenderView& view)
|
||||
void Renderer11::DrawBaddyGunflashes(RenderView& view)
|
||||
{
|
||||
for (auto room : view.roomsToDraw)
|
||||
{
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include "Game/control/control.h"
|
||||
#include "Game/Lara/lara.h"
|
||||
#include "Game/collision/sphere.h"
|
||||
#include "Scripting/Flow/ScriptInterfaceFlowHandler.h"
|
||||
#include "Flow/ScriptInterfaceFlowHandler.h"
|
||||
#include "Renderer\RenderView\RenderView.h"
|
||||
#include "Objects/TR3/Vehicles/quad.h"
|
||||
#include "Objects/TR3/Vehicles/rubberboat.h"
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#include "Renderer/Renderer11.h"
|
||||
#include "Specific/configuration.h"
|
||||
#include "Specific/winmain.h"
|
||||
#include "Scripting/Flow/ScriptInterfaceFlowHandler.h"
|
||||
#include "Flow/ScriptInterfaceFlowHandler.h"
|
||||
#include "Quad/RenderQuad.h"
|
||||
#include "Specific/memory/Vector.h"
|
||||
#include <string>
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include "Game/camera.h"
|
||||
#include "Game/collision/sphere.h"
|
||||
#include "Specific/level.h"
|
||||
#include "Scripting/Flow/ScriptInterfaceFlowHandler.h"
|
||||
#include "Flow/ScriptInterfaceFlowHandler.h"
|
||||
#include <Specific\setup.h>
|
||||
#include "Game/Lara/lara_fire.h"
|
||||
#include "Game/items.h"
|
||||
|
|
|
@ -20,8 +20,7 @@ static constexpr char ScriptReserved_DisplayString[] = "DisplayString";
|
|||
static constexpr char ScriptReserved_Vec3[] = "Vec3";
|
||||
|
||||
// Member functions
|
||||
static constexpr char ScriptReserved_new[] = "New";
|
||||
static constexpr char ScriptReserved_newTemporary[] = "NewTemporary";
|
||||
static constexpr char ScriptReserved_new[] = "new";
|
||||
static constexpr char ScriptReserved_Init[] = "Init";
|
||||
static constexpr char ScriptReserved_Enable[] = "Enable";
|
||||
static constexpr char ScriptReserved_Disable[] = "Disable";
|
|
@ -12,8 +12,10 @@ Components are specified in bytes; all values are clamped to [0, 255].
|
|||
|
||||
void ScriptColor::Register(sol::table & parent)
|
||||
{
|
||||
using ctors = sol::constructors<ScriptColor(byte, byte, byte), ScriptColor(byte, byte, byte, byte)>;
|
||||
parent.new_usertype<ScriptColor>("Color",
|
||||
sol::constructors<ScriptColor(byte, byte, byte), ScriptColor(byte, byte, byte, byte)>(),
|
||||
ctors(),
|
||||
sol::call_constructor, ctors(),
|
||||
sol::meta_function::to_string, &ScriptColor::ToString,
|
||||
|
||||
/// (int) red component
|
||||
|
@ -84,7 +86,7 @@ ScriptColor::operator Vector4() const
|
|||
return m_color;
|
||||
}
|
||||
|
||||
// D3DCOLOR is 32 bits and is layed out as ARGB.
|
||||
// D3DCOLOR is 32 bits and is laid out as ARGB.
|
||||
ScriptColor::operator D3DCOLOR() const
|
||||
{
|
||||
return m_color;
|
|
@ -10,6 +10,8 @@ New custom animations which Lara can perform.
|
|||
void Animations::Register(sol::table& parent)
|
||||
{
|
||||
parent.new_usertype<Animations>("Animations",
|
||||
sol::constructors<Animations()>(),
|
||||
sol::call_constructor, sol::constructors<Animations()>(),
|
||||
"crawlExtended", &Animations::HasCrawlExtended,
|
||||
"crouchRoll", &Animations::HasCrouchRoll,
|
||||
"crawlspaceSwandive", &Animations::HasCrawlspaceDive,
|
|
@ -10,8 +10,10 @@ Fog
|
|||
|
||||
void Fog::Register(sol::table & parent)
|
||||
{
|
||||
using ctors = sol::constructors<Fog(RGBAColor8Byte const&, short, short)>;
|
||||
parent.new_usertype<Fog>("Fog",
|
||||
sol::constructors<Fog(RGBAColor8Byte const&, short, short)>(),
|
||||
ctors(),
|
||||
sol::call_constructor, ctors(),
|
||||
|
||||
/// (@{Color}) RGB fog color
|
||||
//@mem color
|
||||
|
@ -29,7 +31,7 @@ void Fog::Register(sol::table & parent)
|
|||
This is the distance at which the fog reaches the maximum strength
|
||||
|
||||
@mem maxDistance*/
|
||||
"maxDistance", & Fog::MaxDistance
|
||||
"maxDistance", &Fog::MaxDistance
|
||||
);
|
||||
}
|
||||
|
|
@ -12,7 +12,7 @@ Represents the properties of an object as it appears in the inventory.
|
|||
*/
|
||||
|
||||
/*** Create an InventoryItem.
|
||||
@function InventoryItem.new
|
||||
@function InventoryItem
|
||||
@tparam string nameKey key for the item's (localised) name.<br />
|
||||
Corresponds to an entry in strings.lua.
|
||||
@tparam Flow.InvItem slot slot of inventory object to change
|
||||
|
@ -49,9 +49,11 @@ InventoryItem::InventoryItem(std::string const& a_name, ItemEnumPair a_slot, sho
|
|||
|
||||
void InventoryItem::Register(sol::table & parent)
|
||||
{
|
||||
using ctors = sol::constructors<InventoryItem(std::string const&, ItemEnumPair, short, float, Rotation const&, RotationFlags, int, ItemOptions)>;
|
||||
parent.new_usertype<InventoryItem>(ScriptReserved_InventoryItem,
|
||||
sol::constructors<InventoryItem(std::string const &, ItemEnumPair, short, float, Rotation const &, RotationFlags, int, ItemOptions)>()
|
||||
);
|
||||
ctors(),
|
||||
sol::call_constructor, ctors()
|
||||
);
|
||||
}
|
||||
|
||||
// Add validation so the user can't choose something unimplemented
|
|
@ -15,10 +15,10 @@ These are things things which aren't present in the compiled level file itself.
|
|||
@return a Level object
|
||||
*/
|
||||
void Level::Register(sol::table & parent)
|
||||
{
|
||||
{
|
||||
parent.new_usertype<Level>("Level",
|
||||
sol::constructors<Level()>(),
|
||||
|
||||
sol::call_constructor, sol::constructors<Level()>(),
|
||||
/// (string) string key for the level's (localised) name.
|
||||
// Corresponds to an entry in strings.lua.
|
||||
//@mem nameKey
|
|
@ -13,8 +13,10 @@ __Not currently implemented.__
|
|||
|
||||
void Mirror::Register(sol::table& parent)
|
||||
{
|
||||
using ctors = sol::constructors<Mirror(short, int, int, int, int)>;
|
||||
parent.new_usertype<Mirror>("Mirror",
|
||||
sol::constructors<Mirror(short, int, int, int, int)>(),
|
||||
ctors(),
|
||||
sol::call_constructor, ctors(),
|
||||
"room", &Mirror::Room,
|
||||
"startX", &Mirror::StartX,
|
||||
"endX", &Mirror::EndX,
|
|
@ -10,6 +10,9 @@ Settings that will be run on game startup.
|
|||
void Settings::Register(sol::table & parent)
|
||||
{
|
||||
parent.new_usertype<Settings>("Settings",
|
||||
sol::constructors<Settings()>(),
|
||||
sol::call_constructor, sol::constructors<Settings>(),
|
||||
|
||||
"screenWidth", &Settings::ScreenWidth,
|
||||
"screenHeight", &Settings::ScreenHeight,
|
||||
"enableDynamicShadows", &Settings::EnableDynamicShadows,
|
|
@ -10,8 +10,10 @@ As seen in TR4's City of the Dead.
|
|||
|
||||
void SkyLayer::Register(sol::table & parent)
|
||||
{
|
||||
using ctors = sol::constructors<SkyLayer(ScriptColor const&, short)>;
|
||||
parent.new_usertype<SkyLayer>("SkyLayer",
|
||||
sol::constructors<SkyLayer(ScriptColor const &, short)>(),
|
||||
ctors(),
|
||||
sol::call_constructor, ctors(),
|
||||
|
||||
/// (@{Color}) RGB sky color
|
||||
//@mem color
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue