Refactored switches

This commit is contained in:
MontyTRC89 2021-08-28 06:37:22 +02:00
parent 82898fe37b
commit d0da243f73
48 changed files with 910 additions and 907 deletions

View file

@ -25,6 +25,9 @@
#include "savegame.h"
#include "sound.h"
#include "bubble.h"
#include "generic_switch.h"
using namespace TEN::Entities::Switches;
extern GameFlow* g_GameFlow;

View file

@ -51,6 +51,9 @@
#include <process.h>
#include "prng.h"
#include <Game/Lara/lara_one_gun.h>
#include "generic_switch.h"
using namespace TEN::Entities::Switches;
using std::vector;
using std::unordered_map;
@ -569,8 +572,8 @@ GAME_STATUS ControlPhase(int numFrames, int demoMode)
ten::Effects::Drip::UpdateDrips();
UpdateExplosionParticles();
UpdateShockwaves();
ten::entities::tr4::UpdateScarabs();
ten::entities::tr4::UpdateLocusts();
TEN::Entities::TR4::UpdateScarabs();
TEN::Entities::TR4::UpdateLocusts();
//Legacy_UpdateLightning();
AnimateWaterfalls();

View file

@ -18,6 +18,11 @@
#include "sound.h"
#include "trmath.h"
#include "cog_switch.h"
#include "generic_switch.h"
#include "pickup.h"
#include "fullblock_switch.h"
using namespace TEN::Entities::Switches;
PHD_VECTOR DoubleDoorPos(0, 0, 220);
PHD_VECTOR PullDoorPos(-201, 0, 322);
@ -45,11 +50,6 @@ ITEM_INFO* ClosedDoors[32];
byte LiftDoor;
int DontUnlockBox;
extern byte SequenceUsed[6];
extern byte SequenceResults[3][3][3];
extern byte Sequences[3];
extern byte CurrentSequence;
extern PHD_VECTOR OldPickupPos;
#ifndef NEW_INV
extern Inventory g_Inventory;
#endif
@ -458,7 +458,7 @@ void DoorControl(short itemNumber)
{
BOUNDING_BOX* bounds = GetBoundsAccurate(item);
--item->itemFlags[0];
item->pos.yPos -= ten::entities::switches::COG_DOOR_SPEED;
item->pos.yPos -= TEN::Entities::Switches::COG_DOOR_SPEED;
int y = bounds->Y1 + item->itemFlags[2] - STEP_SIZE;
if (item->pos.yPos < y)
{

View file

@ -4,6 +4,10 @@
enum GAME_OBJECT_ID : short;
extern int NumRPickups;
extern short RPickups[16];
extern PHD_VECTOR OldPickupPos;
void InitialisePickup(short itemNumber);
void PickedUpObject(GAME_OBJECT_ID objectNumber, int count);
void RemoveObjectFromInventory(GAME_OBJECT_ID objectNumber, int count);

View file

@ -11,6 +11,9 @@
#include "pickup.h"
#include "draw.h"
#include "puzzles_keys.h"
#include "generic_switch.h"
using namespace TEN::Entities::Switches;
enum PuzzleType {
PUZZLETYPE_NORMAL,

View file

@ -16,6 +16,11 @@
#include "tr5_rats_emitter.h"
#include "tr5_bats_emitter.h"
#include "tr5_spider_emitter.h"
#include "generic_switch.h"
#include "fullblock_switch.h"
using namespace TEN::Entities::Switches;
using std::string;
using std::vector;
FileStream* SaveGame::m_stream;
@ -68,10 +73,6 @@ std::unique_ptr<ChunkId> SaveGame::m_chunkWeaponItem;
SAVEGAME_INFO Savegame;
//extern vector<AudioTrack> g_AudioTracks;
extern byte SequenceUsed[6];
extern byte SequenceResults[3][3][3];
extern byte Sequences[3];
extern byte CurrentSequence;
void SaveGame::saveItems()
{

View file

@ -18,50 +18,7 @@
#include "input.h"
#include "sound.h"
byte SequenceUsed[6];
byte SequenceResults[3][3][3];
byte Sequences[3];
byte CurrentSequence;
int PulleyItemNumber = NO_ITEM;
extern PHD_VECTOR OldPickupPos;
#ifndef NEW_INV
extern Inventory g_Inventory;
#endif
OBJECT_COLLISION_BOUNDS Switch2Bounds =
{
0xFC00, 0x0400, 0xFC00, 0x0400, 0xFC00, 0x0200, 0xC720, 0x38E0, 0xC720, 0x38E0,
0xC720, 0x38E0
};
PHD_VECTOR Switch2Position = { 0, 0, 108 };
OBJECT_COLLISION_BOUNDS TurnSwitchBoundsA = // offset 0xA14D8
{
0x0200, 0x0380, 0x0000, 0x0000, 0xFE00, 0x0000, 0xF8E4, 0x071C, 0xEAAC, 0x1554,
0xF8E4, 0x071C
};
PHD_VECTOR TurnSwitchPos = { 650, 0, 138 }; // offset 0xA14F0
OBJECT_COLLISION_BOUNDS TurnSwitchBoundsC = // offset 0xA14FC
{
0x0200, 0x0380, 0x0000, 0x0000, 0x0000, 0x0200, 0xF8E4, 0x071C, 0xEAAC, 0x1554,
0xF8E4, 0x071C
};
PHD_VECTOR TurnSwitchPosA = { 650, 0, -138 }; // offset 0xA1514
OBJECT_COLLISION_BOUNDS FullBlockSwitchBounds = // offset 0xA15F8
{
0xFE80, 0x0180, 0x0000, 0x0100, 0x0000, 0x0200, 0xF8E4, 0x071C, 0xEAAC, 0x1554,
0xF8E4, 0x071C
};
PHD_VECTOR FullBlockSwitchPos = { 0, 0, 0 }; // offset 0xA1610
OBJECT_COLLISION_BOUNDS PulleyBounds = // offset 0xA161C
{
0xFF00, 0x0100, 0x0000, 0x0000, 0xFE00, 0x0200, 0xF8E4, 0x071C, 0xEAAC, 0x1554,
0xF8E4, 0x071C
};
PHD_VECTOR PulleyPos = { 0, 0, -148 }; // offset 0xA1634
PHD_VECTOR CrowDovePos = { 0, 0, -400 }; // offset 0xA1640
// NOTE: we need to decompile/inspect if these functions are still needed
void ProcessExplodingSwitchType8(ITEM_INFO* item)
{
@ -75,721 +32,6 @@ void ProcessExplodingSwitchType8(ITEM_INFO* item)
item->meshBits |= 1 << ((Objects[item->objectNumber].nmeshes & 0xFF) - 2);
}
void CrowDoveSwitchCollision(short itemNum, ITEM_INFO* l, COLL_INFO* coll)
{
ITEM_INFO* item = &g_Level.Items[itemNum];
if (item->flags & 0x100
|| !(item->meshBits & 4)
|| (!(TrInput & IN_ACTION)
|| Lara.gunStatus
|| l->currentAnimState != LS_STOP
|| l->animNumber != LA_STAND_IDLE
|| l->gravityStatus)
&& (!Lara.isMoving || Lara.generalPtr != (void*)itemNum))
{
if (l->currentAnimState != LS_DOVESWITCH)
ObjectCollision(itemNum, l, coll);
}
else
{
int oldYrot = item->pos.yRot;
item->pos.yRot = l->pos.yRot;
if (TestLaraPosition(&PulleyBounds, item, l))
{
if (MoveLaraPosition(&CrowDovePos, item, l))
{
l->animNumber = LA_DOVESWITCH_TURN;
l->currentAnimState = LS_DOVESWITCH;
l->frameNumber = g_Level.Anims[l->animNumber].frameBase;
AddActiveItem(itemNum);
item->itemFlags[0] = 0; // This enables the switch again (in TR5 this switch was always triggered by heavy triggers)
item->status = ITEM_ACTIVE;
item->pos.yRot = oldYrot;
Lara.isMoving = false;
Lara.headYrot = 0;
Lara.headXrot = 0;
Lara.torsoYrot = 0;
Lara.torsoXrot = 0;
Lara.gunStatus = LG_HANDS_BUSY;
Lara.generalPtr = (void*)item;
}
else
{
Lara.generalPtr = (void*)itemNum;
}
item->pos.yRot = oldYrot;
}
else
{
if (Lara.isMoving && Lara.generalPtr == (void*)itemNum)
{
Lara.isMoving = false;
Lara.gunStatus = LG_NO_ARMS;
}
item->pos.yRot = oldYrot;
}
}
}
void CrowDoveSwitchControl(short itemNumber)
{
ITEM_INFO* item = &g_Level.Items[itemNumber];
if ((item->meshBits & 2))
{
ExplodeItemNode(item, 1, 0, 0x100);
SoundEffect(SFX_TR5_RAVENSWITCH_EXP, &item->pos, 0);
item->meshBits = 5;
RemoveActiveItem(itemNumber);
item->itemFlags[0] = 1; // I use this for not making it activable again by trigger
}
else if (!item->itemFlags[0])
{
if (item->currentAnimState == 0)
item->goalAnimState = 1;
AnimateItem(item);
if (item->currentAnimState == 0)
item->pos.yRot += ANGLE(90);
}
}
void FullBlockSwitchCollision(short itemNum, ITEM_INFO* l, COLL_INFO* coll)
{
ITEM_INFO* item = &g_Level.Items[itemNum];
if ((!(TrInput & IN_ACTION)
|| item->status
|| item->flags & 0x100
|| CurrentSequence >= 3u
|| Lara.gunStatus
|| l->currentAnimState != LS_STOP
|| l->animNumber != LA_STAND_IDLE)
&& (!Lara.isMoving || Lara.generalPtr != (void*)itemNum))
{
ObjectCollision(itemNum, l, coll);
return;
}
if (TestLaraPosition(&FullBlockSwitchBounds, item, l))
{
if (MoveLaraPosition(&FullBlockSwitchPos, item, l))
{
if (item->currentAnimState == 1)
{
l->currentAnimState = LS_SWITCH_DOWN;
l->animNumber = LA_BUTTON_GIANT_PUSH;
item->goalAnimState = 0;
}
l->goalAnimState = LS_STOP;
l->frameNumber = g_Level.Anims[l->animNumber].frameBase;
item->status = ITEM_ACTIVE;
AddActiveItem(itemNum);
AnimateItem(item);
Lara.isMoving = false;
Lara.headYrot = 0;
Lara.headXrot = 0;
Lara.torsoYrot = 0;
Lara.torsoXrot = 0;
Lara.gunStatus = LG_HANDS_BUSY;
}
else
{
Lara.generalPtr = (void*)itemNum;
}
}
else if (Lara.isMoving && Lara.generalPtr == (void*)itemNum)
{
Lara.isMoving = false;
Lara.gunStatus = LG_NO_ARMS;
}
}
void FullBlockSwitchControl(short itemNumber)
{
ITEM_INFO* item = &g_Level.Items[itemNumber];
if (item->animNumber != Objects[item->objectNumber].animIndex + 2
|| CurrentSequence >= 3u
|| item->itemFlags[0])
{
if (CurrentSequence >= 4u)
{
item->itemFlags[0] = 0;
item->goalAnimState = 1;
item->status = ITEM_NOT_ACTIVE;
if (++CurrentSequence >= 7u)
CurrentSequence = 0;
}
}
else
{
item->itemFlags[0] = 1;
Sequences[CurrentSequence++] = item->triggerFlags;
}
AnimateItem(item);
}
void CrowbarSwitchCollision(short itemNum, ITEM_INFO* l, COLL_INFO* coll)
{
int doSwitch = 0;
ITEM_INFO* item = &g_Level.Items[itemNum];
if ((!(TrInput & IN_ACTION) &&
#ifdef NEW_INV
GLOBAL_inventoryitemchosen != ID_CROWBAR_ITEM
#else
g_Inventory.GetSelectedObject() != ID_CROWBAR_ITEM
#endif
|| l->currentAnimState != LS_STOP
|| l->animNumber != LA_STAND_IDLE
|| Lara.gunStatus
|| item->itemFlags[0])
&& (!Lara.isMoving || Lara.generalPtr != (void*)itemNum))
{
ObjectCollision(itemNum, l, coll);
return;
}
if (item->currentAnimState)
{
if (item->currentAnimState != 1)
{
ObjectCollision(itemNum, l, coll);
return;
}
l->pos.yRot ^= (short)ANGLE(180);
if (TestLaraPosition(&CrowbarBounds2, item, l))
{
if (Lara.isMoving ||
#ifdef NEW_INV
GLOBAL_inventoryitemchosen == ID_CROWBAR_ITEM
#else
g_Inventory.GetSelectedObject() == ID_CROWBAR_ITEM
#endif
)
{
if (MoveLaraPosition(&CrowbarPos2, item, l))
{
l->animNumber = LA_CROWBAR_USE_ON_FLOOR;
doSwitch = 1;
l->frameNumber = g_Level.Anims[l->animNumber].frameBase;
item->goalAnimState = 0;
}
else
{
Lara.generalPtr = (void*)itemNum;
}
#ifdef NEW_INV
GLOBAL_inventoryitemchosen = NO_ITEM;
#else
g_Inventory.SetSelectedObject(NO_ITEM);
#endif
}
else
{
doSwitch = -1;
}
}
else if (Lara.isMoving && Lara.generalPtr == (void*)itemNum)
{
Lara.isMoving = false;
Lara.gunStatus = LG_NO_ARMS;
}
l->pos.yRot ^= (short)ANGLE(180);
}
else
{
if (!TestLaraPosition(&CrowbarBounds, item, l))
{
if (Lara.isMoving && Lara.generalPtr == (void*)itemNum)
{
Lara.isMoving = false;
Lara.gunStatus = LG_NO_ARMS;
}
ObjectCollision(itemNum, l, coll);
return;
}
if (!(Lara.isMoving &&
#ifdef NEW_INV
GLOBAL_inventoryitemchosen != ID_CROWBAR_ITEM)
#else
g_Inventory.GetSelectedObject() != ID_CROWBAR_ITEM)
#endif
)
{
if (Lara.Crowbar)
#ifdef NEW_INV
GLOBAL_inventoryitemchosen = ID_CROWBAR_ITEM;
#else
g_Inventory.SetEnterObject(ID_CROWBAR_ITEM);
#endif
else
{
if (OldPickupPos.x != l->pos.xPos || OldPickupPos.y != l->pos.yPos || OldPickupPos.z != l->pos.zPos)
{
OldPickupPos.x = l->pos.xPos;
OldPickupPos.y = l->pos.yPos;
OldPickupPos.z = l->pos.zPos;
SayNo();
}
}
return;
}
if (MoveLaraPosition(&CrowbarPos, item, l))
{
l->animNumber = LA_CROWBAR_USE_ON_FLOOR;
doSwitch = 1;
l->frameNumber = g_Level.Anims[l->animNumber].frameBase;
item->goalAnimState = 1;
}
else
{
Lara.generalPtr = (void*)itemNum;
}
#ifdef NEW_INV
GLOBAL_inventoryitemchosen = NO_ITEM;
#else
g_Inventory.SetSelectedObject(NO_ITEM);
#endif
}
if (!doSwitch)
{
ObjectCollision(itemNum, l, coll);
return;
}
if (doSwitch != -1)
{
l->goalAnimState = LS_SWITCH_DOWN;
l->currentAnimState = LS_SWITCH_DOWN;
Lara.isMoving = false;
Lara.headYrot = 0;
Lara.headXrot = 0;
Lara.torsoYrot = 0;
Lara.torsoXrot = 0;
Lara.gunStatus = LG_HANDS_BUSY;
item->status = ITEM_ACTIVE;
AddActiveItem(itemNum);
AnimateItem(item);
return;
}
if (Lara.Crowbar)
#ifdef NEW_INV
GLOBAL_enterinventory = ID_CROWBAR_ITEM;
#else
g_Inventory.SetEnterObject(ID_CROWBAR_ITEM);
#endif
else
{
if (OldPickupPos.x != l->pos.xPos || OldPickupPos.y != l->pos.yPos || OldPickupPos.z != l->pos.zPos)
{
OldPickupPos.x = l->pos.xPos;
OldPickupPos.y = l->pos.yPos;
OldPickupPos.z = l->pos.zPos;
SayNo();
}
}
}
void TurnSwitchCollision(short itemNum, ITEM_INFO* l, COLL_INFO* coll)
{
ITEM_INFO* item = &g_Level.Items[itemNum];
int flag = 0;
if (item->currentAnimState
&& TrInput & IN_ACTION
&& l->currentAnimState == LS_STOP
&& l->animNumber == LA_STAND_IDLE
&& !l->gravityStatus
&& Lara.gunStatus == LG_NO_ARMS
|| Lara.isMoving && Lara.generalPtr == (void*)itemNum)
{
short ItemNos[8];
if (TestLaraPosition(&TurnSwitchBoundsA, item, l))
{
if (MoveLaraPosition(&TurnSwitchPosA, item, l))
{
l->animNumber = LA_TURNSWITCH_GRAB_COUNTER_CLOCKWISE;
l->frameNumber = g_Level.Anims[LA_TURNSWITCH_GRAB_COUNTER_CLOCKWISE].frameBase;
item->animNumber = Objects[item->objectNumber].animIndex + 4;
item->frameNumber = g_Level.Anims[item->animNumber].frameBase;
item->itemFlags[0] = 1;
ForcedFixedCamera.x = item->pos.xPos - 1024 * phd_sin(item->pos.yRot);
ForcedFixedCamera.z = item->pos.zPos - 1024 * phd_cos(item->pos.yRot);
Lara.isMoving = 0;
Lara.headYrot = 0;
Lara.headXrot = 0;
Lara.torsoYrot = 0;
Lara.torsoXrot = 0;
Lara.gunStatus = LG_HANDS_BUSY;
l->currentAnimState = LA_REACH;
UseForcedFixedCamera = true;
ForcedFixedCamera.y = item->pos.yPos - 2048;
ForcedFixedCamera.roomNumber = item->roomNumber;
AddActiveItem(itemNum);
item->status = ITEM_ACTIVE;
item->itemFlags[1] = 0;
if (GetSwitchTrigger(item, ItemNos, 0))
{
if (!TriggerActive(&g_Level.Items[ItemNos[0]]))
{
g_Level.Items[ItemNos[0]].animNumber = Objects[g_Level.Items[ItemNos[0]].objectNumber].animIndex;
g_Level.Items[ItemNos[0]].frameNumber = g_Level.Anims[g_Level.Items[ItemNos[0]].animNumber].frameBase;
}
}
return;
}
Lara.generalPtr = (void*)itemNum;
}
else
{
l->pos.yRot ^= (short)ANGLE(180);
if (TestLaraPosition(&TurnSwitchBoundsC, item, l))
{
if (MoveLaraPosition(&TurnSwitchPos, item, l))
{
l->animNumber = 319;
flag = 1;
l->frameNumber = g_Level.Anims[319].frameBase;
item->itemFlags[0] = 2;
ForcedFixedCamera.x = item->pos.xPos + 1024 * phd_sin(item->pos.yRot);
ForcedFixedCamera.z = item->pos.zPos + 1024 * phd_cos(item->pos.yRot);
}
else
{
Lara.generalPtr = (void*)itemNum;
}
}
else if (Lara.isMoving && Lara.generalPtr == (void*)itemNum)
{
Lara.isMoving = false;
Lara.gunStatus = LG_NO_ARMS;
}
l->pos.yRot ^= (short)ANGLE(180);
if (flag)
{
Lara.isMoving = 0;
Lara.headYrot = 0;
Lara.headXrot = 0;
Lara.torsoYrot = 0;
Lara.torsoXrot = 0;
Lara.gunStatus = LG_HANDS_BUSY;
l->currentAnimState = LA_REACH;
UseForcedFixedCamera = true;
ForcedFixedCamera.y = item->pos.yPos - 2048;
ForcedFixedCamera.roomNumber = item->roomNumber;
AddActiveItem(itemNum);
item->status = ITEM_ACTIVE;
item->itemFlags[1] = 0;
if (GetSwitchTrigger(item, ItemNos, 0))
{
if (!TriggerActive(&g_Level.Items[ItemNos[0]]))
{
g_Level.Items[ItemNos[0]].animNumber = Objects[g_Level.Items[ItemNos[0]].objectNumber].animIndex + 4;
g_Level.Items[ItemNos[0]].frameNumber = g_Level.Anims[g_Level.Items[ItemNos[0]].animNumber].frameBase;
}
}
return;
}
}
}
if (coll->enableBaddiePush && TestBoundsCollide(item, l, coll->radius))
{
GlobalCollisionBounds.X1 = -512;
GlobalCollisionBounds.X2 = 512;
GlobalCollisionBounds.Y1 = -512;
GlobalCollisionBounds.Y2 = 0;
GlobalCollisionBounds.Z1 = -512;
GlobalCollisionBounds.Z2 = 512;
ItemPushLara(item, l, coll, 0, 2);
GlobalCollisionBounds.X1 = 256;
GlobalCollisionBounds.X2 = 1024;
GlobalCollisionBounds.Z1 = -128;
GlobalCollisionBounds.Z2 = 128;
ItemPushLara(item, l, coll, 0, 2);
}
}
void TurnSwitchControl(short itemNum)
{
ITEM_INFO* l = LaraItem;
ITEM_INFO* item = &g_Level.Items[itemNum];
if (g_Level.Items[itemNum].itemFlags[0] == 2)
{
if (item->animNumber == Objects[ID_TURN_SWITCH].animIndex + 2)
{
item->pos.yRot += ANGLE(90);
if (TrInput & IN_ACTION)
{
l->animNumber = LA_TURNSWITCH_PUSH_CLOCKWISE_START;
l->frameNumber = g_Level.Anims[l->animNumber].frameBase;
item->animNumber = Objects[item->objectNumber].animIndex + 1;
item->frameNumber = g_Level.Anims[item->animNumber].frameBase;
}
}
if (l->animNumber == LA_TURNSWITCH_PUSH_CLOCKWISE_END && l->frameNumber == g_Level.Anims[l->animNumber].frameEnd && !item->itemFlags[1])
item->itemFlags[1] = 1;
if (l->frameNumber >= g_Level.Anims[LA_TURNSWITCH_PUSH_CLOCKWISE_START].frameBase &&
l->frameNumber <= g_Level.Anims[LA_TURNSWITCH_PUSH_CLOCKWISE_START].frameBase + 43
||
l->frameNumber >= g_Level.Anims[LA_TURNSWITCH_PUSH_CLOCKWISE_START].frameBase + 58 &&
l->frameNumber <= g_Level.Anims[LA_TURNSWITCH_PUSH_CLOCKWISE_START].frameBase + 115)
{
SoundEffect(SFX_TR4_PUSHABLE_SOUND, &item->pos, 2);
}
}
else
{
if (item->animNumber == Objects[ID_TURN_SWITCH].animIndex + 6)
{
item->pos.yRot -= ANGLE(90);
if (TrInput & IN_ACTION)
{
l->animNumber = LA_TURNSWITCH_PUSH_COUNTER_CLOCKWISE_START;
l->frameNumber = g_Level.Anims[l->animNumber].frameBase;
item->animNumber = Objects[item->objectNumber].animIndex + 5;
item->frameNumber = g_Level.Anims[item->animNumber].frameBase;
}
}
if (l->animNumber == LA_TURNSWITCH_PUSH_COUNTER_CLOCKWISE_END && l->frameNumber == g_Level.Anims[LA_TURNSWITCH_PUSH_COUNTER_CLOCKWISE_END].frameEnd &&
!item->itemFlags[1])
item->itemFlags[1] = 1;
if (l->frameNumber >= g_Level.Anims[LA_TURNSWITCH_PUSH_COUNTER_CLOCKWISE_START].frameBase &&
l->frameNumber <= g_Level.Anims[LA_TURNSWITCH_PUSH_COUNTER_CLOCKWISE_START].frameBase + 43
||
l->frameNumber >= g_Level.Anims[LA_TURNSWITCH_PUSH_COUNTER_CLOCKWISE_START].frameBase + 58 &&
l->frameNumber <= g_Level.Anims[LA_TURNSWITCH_PUSH_COUNTER_CLOCKWISE_START].frameBase + 115)
{
SoundEffect(SFX_TR4_PUSHABLE_SOUND, &item->pos, 2);
}
}
AnimateItem(item);
if (item->itemFlags[1] == 1)
{
l->animNumber = LA_STAND_IDLE;
l->currentAnimState = LS_STOP;
l->frameNumber = g_Level.Anims[l->animNumber].frameBase;
item->animNumber = Objects[item->objectNumber].animIndex;
item->frameNumber = g_Level.Anims[item->animNumber].frameBase;
item->status = ITEM_NOT_ACTIVE;
RemoveActiveItem(itemNum);
Lara.gunStatus = LG_NO_ARMS;
UseForcedFixedCamera = 0;
item->itemFlags[1] = 2;
}
}
void PulleyCollision(short itemNum, ITEM_INFO* l, COLL_INFO* coll)
{
ITEM_INFO* item = &g_Level.Items[itemNum];
if (item->flags & 0x100
|| (!(TrInput & IN_ACTION)
|| Lara.gunStatus
|| l->currentAnimState != LS_STOP
|| l->animNumber != LA_STAND_IDLE
|| item->gravityStatus)
&& (!Lara.isMoving
|| Lara.generalPtr != (void*)itemNum))
{
if (l->currentAnimState != LS_PULLEY)
ObjectCollision(itemNum, l, coll);
}
else
{
short oldYrot = item->pos.yRot;
item->pos.yRot = l->pos.yRot;
if (TestLaraPosition(&PulleyBounds, item, l))
{
if (item->itemFlags[1])
{
if (OldPickupPos.x != l->pos.xPos || OldPickupPos.y != l->pos.yPos || OldPickupPos.z != l->pos.zPos)
{
OldPickupPos.x = l->pos.xPos;
OldPickupPos.y = l->pos.yPos;
OldPickupPos.z = l->pos.zPos;
SayNo();
}
}
else if (MoveLaraPosition(&PulleyPos, item, l))
{
l->animNumber = LA_PULLEY_GRAB;
l->currentAnimState = LS_PULLEY;
l->frameNumber = g_Level.Anims[l->animNumber].frameBase;
AddActiveItem(itemNum);
item->pos.yRot = oldYrot;
item->status = ITEM_ACTIVE;
Lara.isMoving = false;
Lara.headYrot = 0;
Lara.headXrot = 0;
Lara.torsoYrot = 0;
Lara.torsoXrot = 0;
Lara.gunStatus = LG_HANDS_BUSY;
Lara.generalPtr = item;
}
else
{
Lara.generalPtr = (void*)itemNum;
}
item->pos.yRot = oldYrot;
}
else
{
if (Lara.isMoving && Lara.generalPtr == (void*)itemNum)
{
Lara.isMoving = false;
Lara.gunStatus = LG_NO_ARMS;
}
item->pos.yRot = oldYrot;
}
}
}
int GetKeyTrigger(ITEM_INFO* item)
{
FLOOR_INFO* floor = GetFloor(item->pos.xPos, item->pos.yPos, item->pos.zPos, &item->roomNumber);
GetFloorHeight(floor, item->pos.xPos, item->pos.yPos, item->pos.zPos);
if (TriggerIndex)
{
short* trigger = TriggerIndex;
for (short i = *TriggerIndex; (i & 0x1F) != 4; trigger++)
{
if (i < 0)
break;
i = trigger[1];
}
if (*trigger & 4)
{
for (short* j = &trigger[2]; (*j / 256) & 0x3C || item != &g_Level.Items[*j & 0x3FF]; j++)
{
if (*j & 0x8000)
return 0;
}
return 1;
}
}
return 0;
}
int GetSwitchTrigger(ITEM_INFO* item, short* itemNos, int AttatchedToSwitch)
{
FLOOR_INFO* floor = GetFloor(item->pos.xPos, item->pos.yPos, item->pos.zPos, &item->roomNumber);
GetFloorHeight(floor, item->pos.xPos, item->pos.yPos, item->pos.zPos);
if (TriggerIndex)
{
short* trigger;
for (trigger = TriggerIndex; (*trigger & DATA_TYPE) != TRIGGER_TYPE; trigger++)
{
if (*trigger & END_BIT)
break;
}
if (*trigger & 4)
{
trigger += 2;
short* current = itemNos;
int k = 0;
do
{
if (TRIG_BITS(*trigger) == TO_OBJECT && item != &g_Level.Items[*trigger & VALUE_BITS])
{
current[k] = *trigger & VALUE_BITS;
++k;
}
if (*trigger & END_BIT)
break;
++trigger;
}
while (true);
return k;
}
}
return 0;
}
int SwitchTrigger(short itemNum, short timer)
{
ITEM_INFO* item = &g_Level.Items[itemNum];
if (item->status == ITEM_DEACTIVATED)
{
if ((!item->currentAnimState && item->objectNumber != ID_JUMP_SWITCH || item->currentAnimState == 1 && item->objectNumber == ID_JUMP_SWITCH) && timer > 0)
{
item->timer = timer;
item->status = ITEM_ACTIVE;
if (timer != 1)
item->timer = 30 * timer;
return 1;
}
if (item->triggerFlags != 6 || item->currentAnimState)
{
RemoveActiveItem(itemNum);
item->status = ITEM_NOT_ACTIVE;
if (!item->itemFlags[0] == 0)
item->flags |= 0x100;
if (item->currentAnimState != 1)
return 1;
if (item->triggerFlags != 5 && item->triggerFlags != 6)
return 1;
}
else
{
item->status = ITEM_ACTIVE;
return 1;
}
}
else if (item->status)
{
return ((item->flags & 0x100u) / 256);
}
else
{
return 0;
}
return 0;
}
void InitialiseShootSwitch(short itemNumber)
{
ITEM_INFO* item = &g_Level.Items[itemNumber];
@ -797,25 +39,6 @@ void InitialiseShootSwitch(short itemNumber)
item->meshBits &= ~(1 << (Objects[item->objectNumber].nmeshes - 2));
}
void InitialisePulleySwitch(short itemNumber)
{
ITEM_INFO* item = &g_Level.Items[itemNumber];
item->itemFlags[3] = item->triggerFlags;
item->triggerFlags = abs(item->triggerFlags);
if (item->status == ITEM_INVISIBLE)
{
item->itemFlags[1] = 1;
item->status = ITEM_NOT_ACTIVE;
}
}
void InitialiseCrowDoveSwitch(short itemNumber)
{
g_Level.Items[itemNumber].meshBits = 3;
}
void ShootSwitchCollision(short itemNumber, ITEM_INFO* l, COLL_INFO* coll)
{
ITEM_INFO* item = &g_Level.Items[itemNumber];

View file

@ -2,23 +2,6 @@
#include "collide.h"
extern int PulleyItemNumber;
void CrowDoveSwitchCollision(short itemNum, ITEM_INFO* l, COLL_INFO* coll);
void CrowDoveSwitchControl(short itemNumber);
void FullBlockSwitchCollision(short itemNum, ITEM_INFO* l, COLL_INFO* coll);
void FullBlockSwitchControl(short itemNumber);
void CrowbarSwitchCollision(short itemNum, ITEM_INFO* l, COLL_INFO* coll);
void TurnSwitchCollision(short itemNum, ITEM_INFO* l, COLL_INFO* coll);
void TurnSwitchControl(short itemNum);
void PulleyCollision(short itemNum, ITEM_INFO* l, COLL_INFO* coll);
void UnderwaterSwitchCollision(short itemNum, ITEM_INFO* l, COLL_INFO* coll);
void SwitchCollision2(short itemNum, ITEM_INFO* l, COLL_INFO* coll);
int GetKeyTrigger(ITEM_INFO* item);
int GetSwitchTrigger(ITEM_INFO* item, short* itemNos, int AttatchedToSwitch);
int SwitchTrigger(short itemNum, short timer);
void InitialisePulleySwitch(short itemNumber);
void InitialiseCrowDoveSwitch(short itemNumber);
void ProcessExplodingSwitchType8(ITEM_INFO* item);
void InitialiseShootSwitch(short itemNumber);
void ShootSwitchCollision(short itemNumber, ITEM_INFO* l, COLL_INFO* coll);

View file

@ -411,7 +411,7 @@ namespace ten::entities::all
TriggerDemigodMissileFlame(fxNum, 16 * dx, 16 * dy, 16 * dz);
break;
case 6:
ten::entities::tr4::TriggerCrocgodMissileFlame(fxNum, 16 * dx, 16 * dy, 16 * dz);
TEN::Entities::TR4::TriggerCrocgodMissileFlame(fxNum, 16 * dx, 16 * dy, 16 * dz);
break;
}
}

View file

@ -7,7 +7,7 @@
#include "lara.h"
#include "tomb4fx.h"
namespace ten::entities::tr4 {
namespace TEN::Entities::TR4 {
LOCUST_INFO Locusts[MAX_LOCUSTS];
int CreateLocust(void)

View file

@ -15,7 +15,7 @@ struct LOCUST_INFO
BYTE counter;
};
namespace ten::entities::tr4 {
namespace TEN::Entities::TR4 {
constexpr auto MAX_LOCUSTS = 64;
constexpr auto LOCUST_LARA_DAMAGE = 3;
constexpr auto LOCUST_ENTITY_DAMAGE = 1;

View file

@ -6,7 +6,7 @@
#include "generic_switch.h"
#include "door.h"
namespace ten::entities::switches
namespace TEN::Entities::Switches
{
PHD_VECTOR CogSwitchPos(0, 0, -856);

View file

@ -3,7 +3,7 @@
#include "items.h"
#include <collide.h>
namespace ten::entities::switches
namespace TEN::Entities::Switches
{
constexpr auto COG_DOOR_TURN = 40;
constexpr auto COG_DOOR_SPEED = 12;

View file

@ -6,8 +6,9 @@
#include "crowbar_switch.h"
#include "newinv2.h"
#include "sound.h"
#include "pickup.h"
namespace ten::entities::switches
namespace TEN::Entities::Switches
{
PHD_VECTOR CrowbarPos = { -89, 0, -328 };
@ -33,8 +34,6 @@ namespace ten::entities::switches
-ANGLE(10), ANGLE(10)
};
extern PHD_VECTOR OldPickupPos;
void CrowbarSwitchCollision(short itemNum, ITEM_INFO* l, COLL_INFO* coll)
{
int doSwitch = 0;

View file

@ -3,7 +3,7 @@
#include "items.h"
#include <collide.h>
namespace ten::entities::switches
namespace TEN::Entities::Switches
{
void CrowbarSwitchCollision(short itemNum, ITEM_INFO* l, COLL_INFO* coll);
}

View file

@ -0,0 +1,105 @@
#include "framework.h"
#include "fullblock_switch.h"
#include "control.h"
#include "input.h"
#include "lara.h"
#include "generic_switch.h"
namespace TEN::Entities::Switches
{
OBJECT_COLLISION_BOUNDS FullBlockSwitchBounds =
{
-384, 384,
0, 256,
0, 512,
-ANGLE(10), ANGLE(10),
-ANGLE(30), ANGLE(30),
-ANGLE(10), ANGLE(10)
};
PHD_VECTOR FullBlockSwitchPos = { 0, 0, 0 };
byte SequenceUsed[6];
byte SequenceResults[3][3][3];
byte Sequences[3];
byte CurrentSequence;
void FullBlockSwitchCollision(short itemNum, ITEM_INFO* l, COLL_INFO* coll)
{
ITEM_INFO* item = &g_Level.Items[itemNum];
if ((!(TrInput & IN_ACTION)
|| item->status
|| item->flags & 0x100
|| CurrentSequence >= 3
|| Lara.gunStatus
|| l->currentAnimState != LS_STOP
|| l->animNumber != LA_STAND_IDLE)
&& (!Lara.isMoving || Lara.generalPtr != (void*)itemNum))
{
ObjectCollision(itemNum, l, coll);
return;
}
if (TestLaraPosition(&FullBlockSwitchBounds, item, l))
{
if (MoveLaraPosition(&FullBlockSwitchPos, item, l))
{
if (item->currentAnimState == 1)
{
l->currentAnimState = LS_SWITCH_DOWN;
l->animNumber = LA_BUTTON_GIANT_PUSH;
item->goalAnimState = 0;
}
l->goalAnimState = LS_STOP;
l->frameNumber = g_Level.Anims[l->animNumber].frameBase;
item->status = ITEM_ACTIVE;
AddActiveItem(itemNum);
AnimateItem(item);
Lara.isMoving = false;
Lara.headYrot = 0;
Lara.headXrot = 0;
Lara.torsoYrot = 0;
Lara.torsoXrot = 0;
Lara.gunStatus = LG_HANDS_BUSY;
}
else
{
Lara.generalPtr = (void*)itemNum;
}
}
else if (Lara.isMoving && Lara.generalPtr == (void*)itemNum)
{
Lara.isMoving = false;
Lara.gunStatus = LG_NO_ARMS;
}
}
void FullBlockSwitchControl(short itemNumber)
{
ITEM_INFO* item = &g_Level.Items[itemNumber];
if (item->animNumber != Objects[item->objectNumber].animIndex + 2
|| CurrentSequence >= 3
|| item->itemFlags[0])
{
if (CurrentSequence >= 4)
{
item->itemFlags[0] = 0;
item->goalAnimState = SWITCH_ON;
item->status = ITEM_NOT_ACTIVE;
if (++CurrentSequence >= 7)
CurrentSequence = 0;
}
}
else
{
item->itemFlags[0] = 1;
Sequences[CurrentSequence++] = item->triggerFlags;
}
AnimateItem(item);
}
}

View file

@ -0,0 +1,15 @@
#pragma once
#include "items.h"
#include <collide.h>
namespace TEN::Entities::Switches
{
extern byte SequenceUsed[6];
extern byte SequenceResults[3][3][3];
extern byte Sequences[3];
extern byte CurrentSequence;
void FullBlockSwitchControl(short itemNumber);
void FullBlockSwitchCollision(short itemNum, ITEM_INFO* l, COLL_INFO* coll);
}

View file

@ -6,7 +6,7 @@
#include "sphere.h"
#include "draw.h"
namespace ten::entities::switches
namespace TEN::Entities::Switches
{
OBJECT_COLLISION_BOUNDS SwitchBounds =
{
@ -227,4 +227,113 @@ namespace ten::entities::switches
if (l->currentAnimState != LS_SWITCH_DOWN && l->currentAnimState != LS_SWITCH_UP)
ObjectCollision(itemNum, l, coll);
}
int GetKeyTrigger(ITEM_INFO* item)
{
FLOOR_INFO* floor = GetFloor(item->pos.xPos, item->pos.yPos, item->pos.zPos, &item->roomNumber);
GetFloorHeight(floor, item->pos.xPos, item->pos.yPos, item->pos.zPos);
if (TriggerIndex)
{
short* trigger = TriggerIndex;
for (short i = *TriggerIndex; (i & 0x1F) != 4; trigger++)
{
if (i < 0)
break;
i = trigger[1];
}
if (*trigger & 4)
{
for (short* j = &trigger[2]; (*j / 256) & 0x3C || item != &g_Level.Items[*j & 0x3FF]; j++)
{
if (*j & 0x8000)
return 0;
}
return 1;
}
}
return 0;
}
int GetSwitchTrigger(ITEM_INFO* item, short* itemNos, int AttatchedToSwitch)
{
FLOOR_INFO* floor = GetFloor(item->pos.xPos, item->pos.yPos, item->pos.zPos, &item->roomNumber);
GetFloorHeight(floor, item->pos.xPos, item->pos.yPos, item->pos.zPos);
if (TriggerIndex)
{
short* trigger;
for (trigger = TriggerIndex; (*trigger & DATA_TYPE) != TRIGGER_TYPE; trigger++)
{
if (*trigger & END_BIT)
break;
}
if (*trigger & 4)
{
trigger += 2;
short* current = itemNos;
int k = 0;
do
{
if (TRIG_BITS(*trigger) == TO_OBJECT && item != &g_Level.Items[*trigger & VALUE_BITS])
{
current[k] = *trigger & VALUE_BITS;
++k;
}
if (*trigger & END_BIT)
break;
++trigger;
} while (true);
return k;
}
}
return 0;
}
int SwitchTrigger(short itemNum, short timer)
{
ITEM_INFO* item = &g_Level.Items[itemNum];
if (item->status == ITEM_DEACTIVATED)
{
if ((!item->currentAnimState && item->objectNumber != ID_JUMP_SWITCH || item->currentAnimState == 1 && item->objectNumber == ID_JUMP_SWITCH) && timer > 0)
{
item->timer = timer;
item->status = ITEM_ACTIVE;
if (timer != 1)
item->timer = 30 * timer;
return 1;
}
if (item->triggerFlags != 6 || item->currentAnimState)
{
RemoveActiveItem(itemNum);
item->status = ITEM_NOT_ACTIVE;
if (!item->itemFlags[0] == 0)
item->flags |= 0x100;
if (item->currentAnimState != 1)
return 1;
if (item->triggerFlags != 5 && item->triggerFlags != 6)
return 1;
}
else
{
item->status = ITEM_ACTIVE;
return 1;
}
}
else if (item->status)
{
return ((item->flags & 0x100u) / 256);
}
else
{
return 0;
}
return 0;
}
}

View file

@ -3,15 +3,17 @@
#include "items.h"
#include <collide.h>
namespace ten::entities::switches
namespace TEN::Entities::Switches
{
enum SwitchStatus
{
SWITCH_OFF,
SWITCH_ON
};
void InitialiseSwitch(short itemNumber);
void SwitchControl(short itemNumber);
void SwitchCollision(short itemNum, ITEM_INFO* l, COLL_INFO* coll);
int GetKeyTrigger(ITEM_INFO* item);
int GetSwitchTrigger(ITEM_INFO* item, short* itemNos, int AttatchedToSwitch);
int SwitchTrigger(short itemNum, short timer);
}

View file

@ -5,7 +5,7 @@
#include "lara.h"
#include "generic_switch.h"
namespace ten::entities::switches
namespace TEN::Entities::Switches
{
OBJECT_COLLISION_BOUNDS JumpSwitchBounds =
{

View file

@ -3,7 +3,7 @@
#include "items.h"
#include <collide.h>
namespace ten::entities::switches
namespace TEN::Entities::Switches
{
void JumpSwitchCollision(short itemNum, ITEM_INFO* l, COLL_INFO* coll);
}

View file

@ -0,0 +1,103 @@
#include "framework.h"
#include "pulley_switch.h"
#include "control.h"
#include "input.h"
#include "lara.h"
#include "generic_switch.h"
#include "sound.h"
#include "pickup.h"
namespace TEN::Entities::Switches
{
OBJECT_COLLISION_BOUNDS PulleyBounds =
{
-256, 256,
0, 0,
-512, 512,
-ANGLE(10), ANGLE(10),
-ANGLE(30), ANGLE(30),
-ANGLE(10), ANGLE(10)
};
PHD_VECTOR PulleyPos = { 0, 0, -148 };
void InitialisePulleySwitch(short itemNumber)
{
ITEM_INFO* item = &g_Level.Items[itemNumber];
item->itemFlags[3] = item->triggerFlags;
item->triggerFlags = abs(item->triggerFlags);
if (item->status == ITEM_INVISIBLE)
{
item->itemFlags[1] = 1;
item->status = ITEM_NOT_ACTIVE;
}
}
void PulleySwitchCollision(short itemNum, ITEM_INFO* l, COLL_INFO* coll)
{
ITEM_INFO* item = &g_Level.Items[itemNum];
if ((TrInput & IN_ACTION)
&& Lara.gunStatus == LG_NO_ARMS
&& l->currentAnimState == LS_STOP
&& l->animNumber == LA_STAND_IDLE
&& l->gravityStatus == false
|| Lara.isMoving && Lara.generalPtr == (void*)itemNum)
{
short oldYrot = item->pos.yRot;
item->pos.yRot = l->pos.yRot;
if (TestLaraPosition(&PulleyBounds, item, l))
{
if (item->itemFlags[1])
{
if (OldPickupPos.x != l->pos.xPos || OldPickupPos.y != l->pos.yPos || OldPickupPos.z != l->pos.zPos)
{
OldPickupPos.x = l->pos.xPos;
OldPickupPos.y = l->pos.yPos;
OldPickupPos.z = l->pos.zPos;
SayNo();
}
}
else if (MoveLaraPosition(&PulleyPos, item, l))
{
l->animNumber = LA_PULLEY_GRAB;
l->currentAnimState = LS_PULLEY;
l->frameNumber = g_Level.Anims[l->animNumber].frameBase;
AddActiveItem(itemNum);
item->pos.yRot = oldYrot;
item->status = ITEM_ACTIVE;
Lara.isMoving = false;
Lara.headYrot = 0;
Lara.headXrot = 0;
Lara.torsoYrot = 0;
Lara.torsoXrot = 0;
Lara.gunStatus = LG_HANDS_BUSY;
Lara.generalPtr = item;
}
else
{
Lara.generalPtr = (void*)itemNum;
}
item->pos.yRot = oldYrot;
}
else
{
if (Lara.isMoving && Lara.generalPtr == (void*)itemNum)
{
Lara.isMoving = false;
Lara.gunStatus = LG_NO_ARMS;
}
item->pos.yRot = oldYrot;
}
}
else if (l->currentAnimState != LS_PULLEY)
{
ObjectCollision(itemNum, l, coll);
}
}
}

View file

@ -0,0 +1,10 @@
#pragma once
#include "items.h"
#include <collide.h>
namespace TEN::Entities::Switches
{
void InitialisePulleySwitch(short itemNumber);
void PulleySwitchCollision(short itemNum, ITEM_INFO* l, COLL_INFO* coll);
}

View file

@ -5,7 +5,7 @@
#include "lara.h"
#include "generic_switch.h"
namespace ten::entities::switches
namespace TEN::Entities::Switches
{
PHD_VECTOR RailSwitchPos = { 0, 0, -550 };

View file

@ -3,7 +3,7 @@
#include "items.h"
#include <collide.h>
namespace ten::entities::switches
namespace TEN::Entities::Switches
{
void RailSwitchCollision(short itemNum, ITEM_INFO* l, COLL_INFO* coll);
}

View file

@ -0,0 +1,252 @@
#include "framework.h"
#include "turn_switch.h"
#include "control.h"
#include "input.h"
#include "lara.h"
#include "generic_switch.h"
#include "door.h"
#include "sound.h"
#include "switch.h"
namespace TEN::Entities::Switches
{
enum TurnSwitchDirection
{
TURN_SWITCH_STOP,
TURN_SWITCH_ANTICLOCKWISE,
TURN_SWITCH_CLOCKWISE
};
OBJECT_COLLISION_BOUNDS TurnSwitchBoundsA =
{
512, 896,
0, 0,
-512, 0,
-ANGLE(10), ANGLE(10),
-ANGLE(30), ANGLE(30),
-ANGLE(10), ANGLE(10)
};
PHD_VECTOR TurnSwitchPos = { 650, 0, 138 };
OBJECT_COLLISION_BOUNDS TurnSwitchBoundsC =
{
512, 896,
0, 0,
0, 512,
-ANGLE(10), ANGLE(10),
-ANGLE(30), ANGLE(30),
-ANGLE(10), ANGLE(10)
};
PHD_VECTOR TurnSwitchPosA = { 650, 0, -138 };
void TurnSwitchCollision(short itemNum, ITEM_INFO* l, COLL_INFO* coll)
{
ITEM_INFO* item = &g_Level.Items[itemNum];
int flag = 0;
if (item->currentAnimState
&& TrInput & IN_ACTION
&& l->currentAnimState == LS_STOP
&& l->animNumber == LA_STAND_IDLE
&& !l->gravityStatus
&& Lara.gunStatus == LG_NO_ARMS
|| Lara.isMoving && Lara.generalPtr == (void*)itemNum)
{
short ItemNos[8];
if (TestLaraPosition(&TurnSwitchBoundsA, item, l))
{
if (MoveLaraPosition(&TurnSwitchPosA, item, l))
{
l->animNumber = LA_TURNSWITCH_GRAB_COUNTER_CLOCKWISE;
l->frameNumber = g_Level.Anims[LA_TURNSWITCH_GRAB_COUNTER_CLOCKWISE].frameBase;
item->animNumber = Objects[item->objectNumber].animIndex + 4;
item->frameNumber = g_Level.Anims[item->animNumber].frameBase;
item->itemFlags[0] = 1;
ForcedFixedCamera.x = item->pos.xPos - 1024 * phd_sin(item->pos.yRot);
ForcedFixedCamera.z = item->pos.zPos - 1024 * phd_cos(item->pos.yRot);
Lara.isMoving = false;
Lara.headYrot = 0;
Lara.headXrot = 0;
Lara.torsoYrot = 0;
Lara.torsoXrot = 0;
Lara.gunStatus = LG_HANDS_BUSY;
l->currentAnimState = LA_REACH;
UseForcedFixedCamera = true;
ForcedFixedCamera.y = item->pos.yPos - 2048;
ForcedFixedCamera.roomNumber = item->roomNumber;
AddActiveItem(itemNum);
item->status = ITEM_ACTIVE;
item->itemFlags[1] = 0;
if (GetSwitchTrigger(item, ItemNos, 0))
{
if (!TriggerActive(&g_Level.Items[ItemNos[0]]))
{
g_Level.Items[ItemNos[0]].animNumber = Objects[g_Level.Items[ItemNos[0]].objectNumber].animIndex;
g_Level.Items[ItemNos[0]].frameNumber = g_Level.Anims[g_Level.Items[ItemNos[0]].animNumber].frameBase;
}
}
return;
}
Lara.generalPtr = (void*)itemNum;
}
else
{
l->pos.yRot ^= (short)ANGLE(180);
if (TestLaraPosition(&TurnSwitchBoundsC, item, l))
{
if (MoveLaraPosition(&TurnSwitchPos, item, l))
{
l->animNumber = 319;
flag = 1;
l->frameNumber = g_Level.Anims[319].frameBase;
item->itemFlags[0] = 2;
ForcedFixedCamera.x = item->pos.xPos + 1024 * phd_sin(item->pos.yRot);
ForcedFixedCamera.z = item->pos.zPos + 1024 * phd_cos(item->pos.yRot);
}
else
{
Lara.generalPtr = (void*)itemNum;
}
}
else if (Lara.isMoving && Lara.generalPtr == (void*)itemNum)
{
Lara.isMoving = false;
Lara.gunStatus = LG_NO_ARMS;
}
l->pos.yRot ^= (short)ANGLE(180);
if (flag)
{
Lara.isMoving = 0;
Lara.headYrot = 0;
Lara.headXrot = 0;
Lara.torsoYrot = 0;
Lara.torsoXrot = 0;
Lara.gunStatus = LG_HANDS_BUSY;
l->currentAnimState = LA_REACH;
UseForcedFixedCamera = true;
ForcedFixedCamera.y = item->pos.yPos - 2048;
ForcedFixedCamera.roomNumber = item->roomNumber;
AddActiveItem(itemNum);
item->status = ITEM_ACTIVE;
item->itemFlags[1] = 0;
if (GetSwitchTrigger(item, ItemNos, 0))
{
if (!TriggerActive(&g_Level.Items[ItemNos[0]]))
{
g_Level.Items[ItemNos[0]].animNumber = Objects[g_Level.Items[ItemNos[0]].objectNumber].animIndex + 4;
g_Level.Items[ItemNos[0]].frameNumber = g_Level.Anims[g_Level.Items[ItemNos[0]].animNumber].frameBase;
}
}
return;
}
}
}
if (coll->enableBaddiePush && TestBoundsCollide(item, l, coll->radius))
{
GlobalCollisionBounds.X1 = -512;
GlobalCollisionBounds.X2 = 512;
GlobalCollisionBounds.Y1 = -512;
GlobalCollisionBounds.Y2 = 0;
GlobalCollisionBounds.Z1 = -512;
GlobalCollisionBounds.Z2 = 512;
ItemPushLara(item, l, coll, 0, 2);
GlobalCollisionBounds.X1 = 256;
GlobalCollisionBounds.X2 = 1024;
GlobalCollisionBounds.Z1 = -128;
GlobalCollisionBounds.Z2 = 128;
ItemPushLara(item, l, coll, 0, 2);
}
}
void TurnSwitchControl(short itemNum)
{
ITEM_INFO* l = LaraItem;
ITEM_INFO* item = &g_Level.Items[itemNum];
if (g_Level.Items[itemNum].itemFlags[0] == TURN_SWITCH_CLOCKWISE)
{
if (item->animNumber == Objects[item->objectNumber].animIndex + 2)
{
item->pos.yRot += ANGLE(90);
if (TrInput & IN_ACTION)
{
l->animNumber = LA_TURNSWITCH_PUSH_CLOCKWISE_START;
l->frameNumber = g_Level.Anims[l->animNumber].frameBase;
item->animNumber = Objects[item->objectNumber].animIndex + 1;
item->frameNumber = g_Level.Anims[item->animNumber].frameBase;
}
}
if (l->animNumber == LA_TURNSWITCH_PUSH_CLOCKWISE_END
&& l->frameNumber == g_Level.Anims[l->animNumber].frameEnd &&
!item->itemFlags[1])
item->itemFlags[1] = 1;
if (l->frameNumber >= g_Level.Anims[LA_TURNSWITCH_PUSH_CLOCKWISE_START].frameBase &&
l->frameNumber <= g_Level.Anims[LA_TURNSWITCH_PUSH_CLOCKWISE_START].frameBase + 43
||
l->frameNumber >= g_Level.Anims[LA_TURNSWITCH_PUSH_CLOCKWISE_START].frameBase + 58 &&
l->frameNumber <= g_Level.Anims[LA_TURNSWITCH_PUSH_CLOCKWISE_START].frameBase + 115)
{
SoundEffect(SFX_TR4_PUSHABLE_SOUND, &item->pos, 2);
}
}
else
{
if (item->animNumber == Objects[ID_TURN_SWITCH].animIndex + 6)
{
item->pos.yRot -= ANGLE(90);
if (TrInput & IN_ACTION)
{
l->animNumber = LA_TURNSWITCH_PUSH_COUNTER_CLOCKWISE_START;
l->frameNumber = g_Level.Anims[l->animNumber].frameBase;
item->animNumber = Objects[item->objectNumber].animIndex + 5;
item->frameNumber = g_Level.Anims[item->animNumber].frameBase;
}
}
if (l->animNumber == LA_TURNSWITCH_PUSH_COUNTER_CLOCKWISE_END && l->frameNumber == g_Level.Anims[LA_TURNSWITCH_PUSH_COUNTER_CLOCKWISE_END].frameEnd &&
!item->itemFlags[1])
item->itemFlags[1] = 1;
if (l->frameNumber >= g_Level.Anims[LA_TURNSWITCH_PUSH_COUNTER_CLOCKWISE_START].frameBase &&
l->frameNumber <= g_Level.Anims[LA_TURNSWITCH_PUSH_COUNTER_CLOCKWISE_START].frameBase + 43
||
l->frameNumber >= g_Level.Anims[LA_TURNSWITCH_PUSH_COUNTER_CLOCKWISE_START].frameBase + 58 &&
l->frameNumber <= g_Level.Anims[LA_TURNSWITCH_PUSH_COUNTER_CLOCKWISE_START].frameBase + 115)
{
SoundEffect(SFX_TR4_PUSHABLE_SOUND, &item->pos, 2);
}
}
AnimateItem(item);
if (item->itemFlags[1] == 1)
{
l->animNumber = LA_STAND_IDLE;
l->currentAnimState = LS_STOP;
l->frameNumber = g_Level.Anims[l->animNumber].frameBase;
item->animNumber = Objects[item->objectNumber].animIndex;
item->frameNumber = g_Level.Anims[item->animNumber].frameBase;
item->status = ITEM_NOT_ACTIVE;
RemoveActiveItem(itemNum);
Lara.gunStatus = LG_NO_ARMS;
UseForcedFixedCamera = 0;
item->itemFlags[1] = 2;
}
}
}

View file

@ -0,0 +1,10 @@
#pragma once
#include "items.h"
#include <collide.h>
namespace TEN::Entities::Switches
{
void TurnSwitchControl(short itemNumber);
void TurnSwitchCollision(short itemNum, ITEM_INFO* l, COLL_INFO* coll);
}

View file

@ -7,7 +7,7 @@
#include "sound.h"
#include "generic_switch.h"
namespace ten::entities::switches
namespace TEN::Entities::Switches
{
OBJECT_COLLISION_BOUNDS UnderwaterSwitchBounds =
{

View file

@ -3,7 +3,7 @@
#include "items.h"
#include <collide.h>
namespace ten::entities::switches
namespace TEN::Entities::Switches
{
void UnderwaterSwitchCollision(short itemNum, ITEM_INFO* l, COLL_INFO* coll);
void CeilingUnderwaterSwitchCollision(short itemNum, ITEM_INFO* l, COLL_INFO* coll);

View file

@ -12,11 +12,13 @@
#include "generic_switch.h"
#include "crowbar_switch.h"
#include "underwater_switch.h"
#include "pulley_switch.h"
#include "fullblock_switch.h"
/// necessary import
#include "setup.h"
using namespace ten::entities::switches;
using namespace TEN::Entities::Switches;
static void StartObject()
{
@ -234,6 +236,43 @@ void StartSwitches()
obj->saveAnim = true;
}
}
obj = &Objects[ID_PULLEY];
if (obj->loaded)
{
obj->initialise = InitialisePulleySwitch;
obj->control = SwitchControl;
obj->collision = PulleySwitchCollision;
obj->saveFlags = true;
obj->saveAnim = true;
}
obj = &Objects[ID_SEQUENCE_SWITCH1];
if (obj->loaded)
{
obj->collision = FullBlockSwitchCollision;
obj->control = FullBlockSwitchControl;
obj->saveFlags = true;
obj->saveAnim = true;
}
obj = &Objects[ID_SEQUENCE_SWITCH2];
if (obj->loaded)
{
obj->collision = FullBlockSwitchCollision;
obj->control = FullBlockSwitchControl;
obj->saveFlags = true;
obj->saveAnim = true;
}
obj = &Objects[ID_SEQUENCE_SWITCH3];
if (obj->loaded)
{
obj->collision = FullBlockSwitchCollision;
obj->control = FullBlockSwitchControl;
obj->saveFlags = true;
obj->saveAnim = true;
}
}
void InitialiseGenericObjects()

View file

@ -5,7 +5,7 @@
#include "trmath.h"
#include "lara.h"
namespace ten::entities::tr4
namespace TEN::Entities::TR4
{
SCARAB_INFO* Scarabs;
int NextScarab;

View file

@ -11,7 +11,7 @@ struct SCARAB_INFO
byte flags;
};
namespace ten::entities::tr4
namespace TEN::Entities::TR4
{
constexpr auto NUM_LITTLE_BETTLES = 256;

View file

@ -10,7 +10,7 @@
#include "objectslist.h"
#include "trmath.h"
namespace ten::entities::tr4
namespace TEN::Entities::TR4
{
void TriggerCrocgodMissile(PHD_3DPOS* src, short roomNumber, short counter)
{
@ -306,7 +306,7 @@ namespace ten::entities::tr4
case STATE_MUTANT_LOCUST1:
frameNumber = (item->frameNumber - g_Level.Anims[item->animNumber].frameBase);
if (frameNumber >= 60 && frameNumber <= 120)
ten::entities::tr4::SpawnLocust(item);
TEN::Entities::TR4::SpawnLocust(item);
break;
case STATE_MUTANT_LOCUST2:

View file

@ -3,7 +3,7 @@
#include "framework.h"
#include "trmath.h"
namespace ten::entities::tr4
namespace TEN::Entities::TR4
{
enum STATES_CROCGOD
{

View file

@ -14,7 +14,7 @@
#include "tomb4fx.h"
#include "level.h"
namespace ten::entities::tr4
namespace TEN::Entities::TR4
{
BITE_INFO skeletonBite = { 0, -16, 200, 11 };

View file

@ -1,6 +1,6 @@
#pragma once
namespace ten::entities::tr4
namespace TEN::Entities::TR4
{
enum STATES_SKELETON
{

View file

@ -10,6 +10,9 @@
#include <tomb4fx.h>
#include <switch.h>
#include <input.h>
#include "generic_switch.h"
using namespace TEN::Entities::Switches;
OBJECT_COLLISION_BOUNDS ElementPuzzleBounds = {
0x0000, 0x0000, 0xFFC0, 0x0000, 0x0000, 0x0000,

View file

@ -10,6 +10,9 @@
#include "draw.h"
#include "tomb4fx.h"
#include "tr4_ahmet.h"
#include "generic_switch.h"
using namespace TEN::Entities::Switches;
OBJECT_COLLISION_BOUNDS ScalesBounds =
{

View file

@ -314,8 +314,8 @@ static void StartBaddy(OBJECT_INFO* obj)
obj = &Objects[ID_SKELETON];
if (obj->loaded)
{
obj->initialise = ten::entities::tr4::InitialiseSkeleton;
obj->control = ten::entities::tr4::SkeletonControl;
obj->initialise = TEN::Entities::TR4::InitialiseSkeleton;
obj->control = TEN::Entities::TR4::SkeletonControl;
obj->collision = CreatureCollision;
obj->hitPoints = 15;
obj->hitEffect = HIT_SMOKE;
@ -664,8 +664,8 @@ static void StartBaddy(OBJECT_INFO* obj)
obj = &Objects[ID_CROCODILE_GOD];
if (obj->loaded)
{
obj->initialise = ten::entities::tr4::InitialiseCrocgod;
obj->control = ten::entities::tr4::CrocgodControl;
obj->initialise = TEN::Entities::TR4::InitialiseCrocgod;
obj->control = TEN::Entities::TR4::CrocgodControl;
obj->collision = CreatureCollision;
obj->shadowSize = UNIT_SHADOW / 2;
obj->hitPoints = NOT_TARGETABLE;
@ -686,8 +686,8 @@ static void StartBaddy(OBJECT_INFO* obj)
obj = &Objects[ID_LOCUSTS_EMITTER];
if (obj->loaded)
{
obj->initialise = ten::entities::tr4::InitialiseLocust;
obj->control = ten::entities::tr4::LocustControl;
obj->initialise = TEN::Entities::TR4::InitialiseLocust;
obj->control = TEN::Entities::TR4::LocustControl;
obj->drawRoutine = NULL;
obj->saveFlags = true;
obj->zoneType = ZONE_BASIC;
@ -729,8 +729,8 @@ static void StartBaddy(OBJECT_INFO* obj)
obj = &Objects[ID_LITTLE_BEETLE];
if (obj->loaded)
{
obj->initialise = ten::entities::tr4::InitialiseScarabs;
obj->control = ten::entities::tr4::ScarabsControl;
obj->initialise = TEN::Entities::TR4::InitialiseScarabs;
obj->control = TEN::Entities::TR4::ScarabsControl;
obj->drawRoutine = NULL;
obj->saveFlags = true;
obj->zoneType = ZONE_BASIC;
@ -1185,6 +1185,6 @@ void InitialiseTR4Objects()
void AllocTR4Objects()
{
ten::entities::tr4::Scarabs = game_malloc<SCARAB_INFO>(ten::entities::tr4::NUM_LITTLE_BETTLES);
ZeroMemory(ten::entities::tr4::Scarabs, ten::entities::tr4::NUM_LITTLE_BETTLES * sizeof(SCARAB_INFO));
TEN::Entities::TR4::Scarabs = game_malloc<SCARAB_INFO>(TEN::Entities::TR4::NUM_LITTLE_BETTLES);
ZeroMemory(TEN::Entities::TR4::Scarabs, TEN::Entities::TR4::NUM_LITTLE_BETTLES * sizeof(SCARAB_INFO));
}

View file

@ -0,0 +1,118 @@
#include "framework.h"
#include "tr5_crowdove_switch.h"
#include "control.h"
#include "input.h"
#include "lara.h"
#include "generic_switch.h"
#include "sound.h"
using namespace TEN::Entities::Switches;
namespace TEN::Entities::TR5
{
OBJECT_COLLISION_BOUNDS CrowDoveBounds =
{
-256, 256,
0, 0,
-512, 512,
-ANGLE(10), ANGLE(10),
-ANGLE(30), ANGLE(30),
-ANGLE(10), ANGLE(10)
};
PHD_VECTOR CrowDovePos = { 0, 0, -400 };
void InitialiseCrowDoveSwitch(short itemNumber)
{
g_Level.Items[itemNumber].meshBits = 3;
}
void CrowDoveSwitchCollision(short itemNum, ITEM_INFO* l, COLL_INFO* coll)
{
ITEM_INFO* item = &g_Level.Items[itemNum];
if (item->flags & ONESHOT
|| !(item->meshBits & 4)
|| (!(TrInput & IN_ACTION)
|| Lara.gunStatus
|| l->currentAnimState != LS_STOP
|| l->animNumber != LA_STAND_IDLE
|| l->gravityStatus)
&& (!Lara.isMoving || Lara.generalPtr != (void*)itemNum))
{
if (l->currentAnimState != LS_DOVESWITCH)
ObjectCollision(itemNum, l, coll);
}
else
{
int oldYrot = item->pos.yRot;
item->pos.yRot = l->pos.yRot;
if (TestLaraPosition(&CrowDoveBounds, item, l))
{
if (MoveLaraPosition(&CrowDovePos, item, l))
{
l->animNumber = LA_DOVESWITCH_TURN;
l->currentAnimState = LS_DOVESWITCH;
l->frameNumber = g_Level.Anims[l->animNumber].frameBase;
AddActiveItem(itemNum);
// NOTE: In original TR5 the switch was used together with heavy switches.
// This little fix make it usable normaly and less hardcoded.
item->itemFlags[0] = 0;
item->status = ITEM_ACTIVE;
item->pos.yRot = oldYrot;
Lara.isMoving = false;
Lara.headYrot = 0;
Lara.headXrot = 0;
Lara.torsoYrot = 0;
Lara.torsoXrot = 0;
Lara.gunStatus = LG_HANDS_BUSY;
Lara.generalPtr = (void*)item;
}
else
{
Lara.generalPtr = (void*)itemNum;
}
item->pos.yRot = oldYrot;
}
else
{
if (Lara.isMoving && Lara.generalPtr == (void*)itemNum)
{
Lara.isMoving = false;
Lara.gunStatus = LG_NO_ARMS;
}
item->pos.yRot = oldYrot;
}
}
}
void CrowDoveSwitchControl(short itemNumber)
{
ITEM_INFO* item = &g_Level.Items[itemNumber];
if (item->meshBits & 2)
{
ExplodeItemNode(item, 1, 0, 256);
SoundEffect(SFX_TR5_RAVENSWITCH_EXP, &item->pos, 0);
item->meshBits = 5;
RemoveActiveItem(itemNumber);
// NOTE: In original TR5 the switch was used together with heavy switches.
// This little fix make it usable normaly and less hardcoded.
item->itemFlags[0] = 1;
}
else if (item->itemFlags[0] == 0)
{
if (item->currentAnimState == SWITCH_OFF)
item->goalAnimState = SWITCH_ON;
AnimateItem(item);
if (item->currentAnimState == SWITCH_OFF)
item->pos.yRot += ANGLE(90);
}
}
}

View file

@ -0,0 +1,11 @@
#pragma once
#include "items.h"
#include "collide.h"
namespace TEN::Entities::TR5
{
void InitialiseCrowDoveSwitch(short itemNumber);
void CrowDoveSwitchControl(short itemNumber);
void CrowDoveSwitchCollision(short itemNum, ITEM_INFO* l, COLL_INFO* coll);
}

View file

@ -7,6 +7,9 @@
#include "sound.h"
#include "spotcam.h"
#include "objectslist.h"
#include "generic_switch.h"
using namespace TEN::Entities::Switches;
void InitialiseRaisingCog(short itemNumber)
{
@ -29,7 +32,8 @@ void InitialiseRaisingCog(short itemNumber)
if (currentItem->objectNumber == ID_PULLEY || currentItem->objectNumber == ID_TRIGGER_TRIGGERER)
{
currentItem->itemFlags[1] = 1;
PulleyItemNumber = itemNos[i];
// FIXME: no more hardcoding!
//PulleyItemNumber = itemNos[i];
}
}
}

View file

@ -12,6 +12,9 @@
#include "lara_one_gun.h"
#include "switch.h"
#include "debris.h"
#include "generic_switch.h"
using namespace TEN::Entities::Switches;
void InitialiseExplosion(short itemNumber)
{

View file

@ -50,6 +50,7 @@
#include "tr5_rollingball.h"
#include "tr5_explosion.h"
/// switch
#include "tr5_crowdove_switch.h"
/// shatter
#include "tr5_smashobject.h"
@ -67,6 +68,8 @@
/// register objects
#include "object_helper.h"
using namespace TEN::Entities::TR5;
static void StartBaddy(OBJECT_INFO *obj)
{
obj = &Objects[ID_LARA];
@ -1221,6 +1224,18 @@ static void StartSwitch(OBJECT_INFO *obj)
obj->savePosition = true;
obj->saveAnim = true;
}
obj = &Objects[ID_CROWDOVE_SWITCH];
if (obj->loaded)
{
obj->initialise = InitialiseCrowDoveSwitch;
obj->collision = CrowDoveSwitchCollision;
obj->control = CrowDoveSwitchControl;
obj->hitEffect = HIT_RICOCHET;
obj->saveFlags = true;
obj->saveAnim = true;
obj->saveMesh = true;
}
}
static void StartShatter(OBJECT_INFO *obj)

View file

@ -2307,9 +2307,9 @@ namespace ten::renderer
for (int m = 0; m < 32; m++)
memcpy(&m_stItem.BonesMatrices[m], &Matrix::Identity, sizeof(Matrix));
for (int i = 0; i < ten::entities::tr4::NUM_LITTLE_BETTLES; i++)
for (int i = 0; i < TEN::Entities::TR4::NUM_LITTLE_BETTLES; i++)
{
SCARAB_INFO* beetle = &ten::entities::tr4::Scarabs[i];
SCARAB_INFO* beetle = &TEN::Entities::TR4::Scarabs[i];
if (beetle->on)
{
@ -2355,9 +2355,9 @@ namespace ten::renderer
for (int m = 0; m < 32; m++)
memcpy(&m_stItem.BonesMatrices[m], &Matrix::Identity, sizeof(Matrix));
for (int i = 0; i < ten::entities::tr4::MAX_LOCUSTS; i++)
for (int i = 0; i < TEN::Entities::TR4::MAX_LOCUSTS; i++)
{
LOCUST_INFO* locust = &ten::entities::tr4::Locusts[i];
LOCUST_INFO* locust = &TEN::Entities::TR4::Locusts[i];
if (locust->on)
{

View file

@ -31,11 +31,10 @@
/// register objects
#include "object_helper.h"
extern byte SequenceUsed[6];
extern byte SequenceResults[3][3][3];
extern byte Sequences[3];
extern byte CurrentSequence;
extern int NumRPickups;
#include "generic_switch.h"
#include "fullblock_switch.h"
using namespace TEN::Entities::Switches;
OBJECT_INFO Objects[ID_NUMBER_OBJECTS];
STATIC_INFO StaticObjects[MAX_STATICS];
@ -163,63 +162,14 @@ void ObjectObjects()
obj->saveMesh = true;
}
obj = &Objects[ID_AIRLOCK_SWITCH];
/*obj = &Objects[ID_AIRLOCK_SWITCH];
if (obj->loaded)
{
obj->collision = ten::entities::switches::SwitchCollision;
obj->collision = TEN::Entities::Switches::SwitchCollision;
obj->control = SwitchControl;
obj->saveFlags = true;
obj->saveAnim = true;
}
obj = &Objects[ID_SEQUENCE_SWITCH1];
if (obj->loaded)
{
obj->collision = FullBlockSwitchCollision;
obj->control = FullBlockSwitchControl;
obj->saveFlags = true;
obj->saveAnim = true;
}
obj = &Objects[ID_SEQUENCE_SWITCH2];
if (obj->loaded)
{
obj->collision = FullBlockSwitchCollision;
obj->control = FullBlockSwitchControl;
obj->saveFlags = true;
obj->saveAnim = true;
}
obj = &Objects[ID_SEQUENCE_SWITCH3];
if (obj->loaded)
{
obj->collision = FullBlockSwitchCollision;
obj->control = FullBlockSwitchControl;
obj->saveFlags = true;
obj->saveAnim = true;
}
obj = &Objects[ID_PULLEY];
if (obj->loaded)
{
obj->initialise = InitialisePulleySwitch;
obj->control = SwitchControl;
obj->collision = PulleyCollision;
obj->saveFlags = true;
obj->saveAnim = true;
}
obj = &Objects[ID_CROWDOVE_SWITCH];
if (obj->loaded)
{
obj->initialise = InitialiseCrowDoveSwitch;
obj->collision = CrowDoveSwitchCollision;
obj->control = CrowDoveSwitchControl;
obj->hitEffect = HIT_RICOCHET;
obj->saveFlags = true;
obj->saveAnim = true;
obj->saveMesh = true;
}
}*/
for (int objNum = ID_DOOR_TYPE1; objNum <= ID_CLOSED_DOOR6; objNum++)
{
@ -601,7 +551,7 @@ void InitialiseSpecialEffects()
NextDrip = 0;
NextBlood = 0;
WBRoom = -1;
ten::entities::tr4::ClearScarabs();
TEN::Entities::TR4::ClearScarabs();
}
void CustomObjects()

View file

@ -174,9 +174,13 @@ xcopy /Y "$(ProjectDir)Shaders\HUD\*.hlsl" "$(TargetDir)\Shaders\HUD\"</Command>
<ClInclude Include="Game\room.h" />
<ClInclude Include="Objects\Generic\Switches\cog_switch.h" />
<ClInclude Include="Objects\Generic\Switches\crowbar_switch.h" />
<ClInclude Include="Objects\Generic\Switches\fullblock_switch.h" />
<ClInclude Include="Objects\Generic\Switches\jump_switch.h" />
<ClInclude Include="Objects\Generic\Switches\generic_switch.h" />
<ClInclude Include="Objects\Generic\Switches\pulley_switch.h" />
<ClInclude Include="Objects\Generic\Switches\turn_switch.h" />
<ClInclude Include="Objects\Generic\Switches\underwater_switch.h" />
<ClInclude Include="Objects\TR5\Switch\tr5_crowdove_switch.h" />
<ClInclude Include="Scripting\GameScriptAIObject.h" />
<ClInclude Include="Scripting\GameScriptAudioTrack.h" />
<ClInclude Include="Scripting\GameScriptCameraInfo.h" />
@ -520,10 +524,14 @@ xcopy /Y "$(ProjectDir)Shaders\HUD\*.hlsl" "$(TargetDir)\Shaders\HUD\"</Command>
<ClCompile Include="Game\puzzles_keys.cpp" />
<ClCompile Include="Objects\Generic\Switches\cog_switch.cpp" />
<ClCompile Include="Objects\Generic\Switches\crowbar_switch.cpp" />
<ClCompile Include="Objects\Generic\Switches\fullblock_switch.cpp" />
<ClCompile Include="Objects\Generic\Switches\jump_switch.cpp" />
<ClCompile Include="Objects\Generic\Switches\pulley_switch.cpp" />
<ClCompile Include="Objects\Generic\Switches\rail_switch.cpp" />
<ClCompile Include="Objects\Generic\Switches\generic_switch.cpp" />
<ClCompile Include="Objects\Generic\Switches\turn_switch.cpp" />
<ClCompile Include="Objects\Generic\Switches\underwater_switch.cpp" />
<ClCompile Include="Objects\TR5\Switch\tr5_crowdove_switch.cpp" />
<ClCompile Include="Scripting\GameScriptAIObject.cpp" />
<ClCompile Include="Scripting\GameScriptAudioTrack.cpp" />
<ClCompile Include="Scripting\GameScriptCameraInfo.cpp" />

View file

@ -1068,6 +1068,18 @@
<ClInclude Include="Objects\Generic\Switches\underwater_switch.h">
<Filter>File di intestazione</Filter>
</ClInclude>
<ClInclude Include="Objects\Generic\Switches\pulley_switch.h">
<Filter>File di intestazione</Filter>
</ClInclude>
<ClInclude Include="Objects\Generic\Switches\fullblock_switch.h">
<Filter>File di intestazione</Filter>
</ClInclude>
<ClInclude Include="Objects\Generic\Switches\turn_switch.h">
<Filter>File di intestazione</Filter>
</ClInclude>
<ClInclude Include="Objects\TR5\Switch\tr5_crowdove_switch.h">
<Filter>File di intestazione</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="Game\box.cpp">
@ -1961,6 +1973,18 @@
<ClCompile Include="Objects\Generic\Switches\underwater_switch.cpp">
<Filter>File di origine</Filter>
</ClCompile>
<ClCompile Include="Objects\Generic\Switches\pulley_switch.cpp">
<Filter>File di origine</Filter>
</ClCompile>
<ClCompile Include="Objects\Generic\Switches\fullblock_switch.cpp">
<Filter>File di origine</Filter>
</ClCompile>
<ClCompile Include="Objects\Generic\Switches\turn_switch.cpp">
<Filter>File di origine</Filter>
</ClCompile>
<ClCompile Include="Objects\TR5\Switch\tr5_crowdove_switch.cpp">
<Filter>File di origine</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />