Merge branch 'entities_fixings'

# Conflicts:
#	TR5Main/Renderer/Renderer11Draw.cpp
#	TR5Main/TombEngine.vcxproj.filters
This commit is contained in:
MontyTRC89 2021-10-28 10:43:09 +02:00
commit e5c8c1010e
30 changed files with 1933 additions and 1803 deletions

View file

@ -42,9 +42,9 @@
#include "items.h"
#include "newinv2.h"
#include "Game/rope.h"
#include "Objects/Generic/Object/rope.h"
using namespace TEN::Game::Rope;
using namespace TEN::Entities::Generic;
using std::function;
using TEN::Renderer::g_Renderer;
using namespace TEN::Control::Volumes;

View file

@ -9,7 +9,6 @@
#include "effects/effects.h"
#include "sphere.h"
#include "animation.h"
#include "effects/flmtorch.h"
#include "level.h"
#include "control/lot.h"
#include "setup.h"
@ -20,6 +19,9 @@
#include "GameFlowScript.h"
#include "lara_struct.h"
#include "itemdata/creature_info.h"
#include "Objects/Generic/Object/burning_torch.h"
using namespace TEN::Entities::Generic;
WEAPON_INFO Weapons[NUM_WEAPONS] =
{

View file

@ -9,9 +9,9 @@
#include "collide.h"
#include "items.h"
#include "control/control.h"
#include "Game/rope.h"
#include "Objects/Generic/Object/rope.h"
using namespace TEN::Game::Rope;
using namespace TEN::Entities::Generic;
/*This file has "all" lara_as/lara_col functions where Lara is interacting with an object.*/

View file

@ -6,7 +6,6 @@
#include "effects\debris.h"
#include "lara_fire.h"
#include "lara.h"
#include "effects\flmtorch.h"
#include "effects\weather.h"
#include "sphere.h"
#include "level.h"
@ -17,7 +16,9 @@
#include "savegame.h"
#include "input.h"
#include "items.h"
#include "Objects/Generic/Object/burning_torch.h"
using namespace TEN::Entities::Generic;
using TEN::Renderer::g_Renderer;
using namespace TEN::Effects::Environment;

View file

@ -1,332 +0,0 @@
#include "framework.h"
#include "effects/flmtorch.h"
#include "effects/effects.h"
#include "lara_flare.h"
#include "lara.h"
#include "animation.h"
#include "items.h"
#include "level.h"
#include "setup.h"
#include "input.h"
#include "Sound/sound.h"
#include "Objects/Effects/flame_emitters.h"
using namespace TEN::Entities::Effects;
void TriggerTorchFlame(char fxObj, char node)
{
SPARKS* spark = &Sparks[GetFreeSpark()];
spark->on = 1;
spark->sR = 255;
spark->sB = 48;
spark->sG = (GetRandomControl() & 0x1F) + 48;
spark->dR = (GetRandomControl() & 0x3F) - 64;
spark->dB = 32;
spark->dG = (GetRandomControl() & 0x3F) + -128;
spark->fadeToBlack = 8;
spark->colFadeSpeed = (GetRandomControl() & 3) + 12;
spark->transType = COLADD;
spark->life = spark->sLife = (GetRandomControl() & 7) + 24;
spark->y = 0;
spark->x = (GetRandomControl() & 0xF) - 8;
spark->z = (GetRandomControl() & 0xF) - 8;
spark->xVel = (GetRandomControl() & 0xFF) - 128;
spark->yVel = -16 - (GetRandomControl() & 0xF);
spark->friction = 5;
spark->flags = 4762;
spark->zVel = (GetRandomControl() & 0xFF) - 128;
spark->rotAng = GetRandomControl() & 0xFFF;
if (GetRandomControl() & 1)
spark->rotAdd = -16 - (GetRandomControl() & 0xF);
else
spark->rotAdd = (GetRandomControl() & 0xF) + 16;
spark->gravity = -16 - (GetRandomControl() & 0x1F);
spark->nodeNumber = node;
spark->maxYvel = -16 - (GetRandomControl() & 7);
spark->fxObj = fxObj;
spark->scalar = 1;
spark->sSize = spark->size = (GetRandomControl() & 0x1F) + 80;
spark->dSize = spark->size / 8;
}
void DoFlameTorch()
{
switch (Lara.leftArm.lock)
{
case 0:
if (Lara.requestGunType != Lara.gunType)
{
Lara.leftArm.lock = 2;
Lara.leftArm.frameNumber = 31;
Lara.leftArm.animNumber = Objects[ID_LARA_TORCH_ANIM].animIndex + 2;
break;
}
if (TrInput & IN_DRAW
&& !(LaraItem->gravityStatus)
&& !LaraItem->fallspeed
&& LaraItem->currentAnimState != LS_JUMP_PREPARE
&& LaraItem->currentAnimState != LS_JUMP_UP
&& LaraItem->currentAnimState != LS_JUMP_FORWARD
&& LaraItem->currentAnimState != LS_JUMP_BACK
&& LaraItem->currentAnimState != LS_JUMP_LEFT
&& LaraItem->currentAnimState != LS_JUMP_RIGHT
|| Lara.waterStatus == LW_UNDERWATER)
{
Lara.leftArm.lock = true;
Lara.leftArm.frameNumber = 1;
Lara.leftArm.animNumber = Objects[ID_LARA_TORCH_ANIM].animIndex + 1;
if (Lara.waterStatus == LW_UNDERWATER)
Lara.litTorch = false;
}
break;
case 1:
if (Lara.leftArm.frameNumber < 12 && LaraItem->gravityStatus)
{
Lara.leftArm.lock = false;
Lara.leftArm.frameNumber = 0;
Lara.leftArm.animNumber = Objects[ID_LARA_TORCH_ANIM].animIndex;
}
else
{
Lara.leftArm.frameNumber++;
if (Lara.leftArm.frameNumber == 27)
{
Lara.litTorch = false;
Lara.flareControlLeft = false;
Lara.leftArm.lock = false;
Lara.gunType = Lara.lastGunType;
Lara.requestGunType = WEAPON_NONE;
Lara.gunStatus = LG_NO_ARMS;
}
else if (Lara.leftArm.frameNumber == 12)
{
Lara.meshPtrs[LM_LHAND] = Objects[ID_LARA_SKIN].meshIndex + LM_LHAND;
CreateFlare(ID_BURNING_TORCH_ITEM, 1);
}
}
break;
case 2:
Lara.leftArm.frameNumber++;
if (Lara.leftArm.frameNumber == 41)
{
Lara.litTorch = false;
Lara.flareControlLeft = false;
Lara.leftArm.lock = false;
Lara.lastGunType = WEAPON_NONE;
Lara.gunType = WEAPON_NONE;
Lara.gunStatus = LG_NO_ARMS;
}
else if (Lara.leftArm.frameNumber == 36)
{
Lara.meshPtrs[LM_LHAND] = Objects[ID_LARA_SKIN].meshIndex + LM_LHAND;
CreateFlare(ID_BURNING_TORCH_ITEM, 0);
}
break;
case 3:
if (LaraItem->currentAnimState != LS_MISC_CONTROL)
{
Lara.leftArm.lock = false;
Lara.leftArm.frameNumber = 0;
Lara.flareControlLeft = true;
Lara.litTorch = LaraItem->itemFlags[3] & 1;
Lara.leftArm.animNumber = Objects[ID_LARA_TORCH_ANIM].animIndex;
}
break;
default:
break;
}
if (Lara.flareControlLeft)
Lara.gunStatus = LG_READY;
Lara.leftArm.frameBase = g_Level.Anims[Lara.leftArm.animNumber].framePtr;
if (Lara.litTorch)
{
PHD_VECTOR pos;
pos.x = -32;
pos.y = 64;
pos.z = 256;
GetLaraJointPosition(&pos, LM_LHAND);
TriggerDynamicLight(pos.x, pos.y, pos.z, 12 - (GetRandomControl() & 1), (GetRandomControl() & 0x3F) + 192, (GetRandomControl() & 0x1F) + 96, 0);
if (!(Wibble & 7))
TriggerTorchFlame(LaraItem - g_Level.Items.data(), 0);
SoundEffect(SFX_TR4_LOOP_FOR_SMALL_FIRES, (PHD_3DPOS*)&pos, 0);
}
}
void GetFlameTorch()
{
if (Lara.gunType == WEAPON_FLARE)
CreateFlare(ID_FLARE_ITEM, 0);
Lara.requestGunType = WEAPON_TORCH;
Lara.gunType = WEAPON_TORCH;
Lara.flareControlLeft = true;
Lara.leftArm.animNumber = Objects[ID_LARA_TORCH_ANIM].animIndex;
Lara.gunStatus = LG_READY;
Lara.leftArm.lock = false;
Lara.leftArm.frameNumber = 0;
Lara.leftArm.frameBase = g_Level.Anims[Lara.leftArm.animNumber].framePtr;
Lara.meshPtrs[LM_LHAND] = Objects[ID_LARA_TORCH_ANIM].meshIndex + LM_LHAND;
}
void TorchControl(short itemNumber)
{
ITEM_INFO* item = &g_Level.Items[itemNumber];
int oldX = item->pos.xPos;
int oldY = item->pos.yPos;
int oldZ = item->pos.zPos;
if (item->fallspeed)
item->pos.zRot += ANGLE(5);
else if (!item->speed)
{
item->pos.xRot = 0;
item->pos.zRot = 0;
}
int xv = item->speed * phd_sin(item->pos.yRot);
int zv = item->speed * phd_cos(item->pos.yRot);
item->pos.xPos += xv;
item->pos.zPos += zv;
if (g_Level.Rooms[item->roomNumber].flags & ENV_FLAG_WATER)
{
item->fallspeed += (5 - item->fallspeed) / 2;
item->speed += (5 - item->speed) / 2;
if (item->itemFlags[3] != 0)
item->itemFlags[3] = 0;
}
else
{
item->fallspeed += 6;
}
item->pos.yPos += item->fallspeed;
DoProjectileDynamics(itemNumber, oldX, oldY, oldZ, xv, item->fallspeed, zv);
if (GetCollidedObjects(item, 0, 1, CollidedItems, CollidedMeshes, 0))
{
LaraCollision.Setup.EnableObjectPush = true;
if (CollidedItems)
{
if (!Objects[CollidedItems[0]->objectNumber].intelligent)
ObjectCollision(CollidedItems[0] - g_Level.Items.data(), item, &LaraCollision);
}
else
{
ItemPushStatic(item, CollidedMeshes[0], &LaraCollision);
}
item->speed >>= 1;
}
if (item->itemFlags[3])
{
TriggerDynamicLight(item->pos.xPos, item->pos.yPos, item->pos.zPos, 12 - (GetRandomControl() & 1), (GetRandomControl() & 0x3F) + 192, (GetRandomControl() & 0x1F) + 96, 0);
if (!(Wibble & 7))
TriggerTorchFlame(itemNumber, 1);
SoundEffect(SFX_TR4_LOOP_FOR_SMALL_FIRES, &item->pos, 0);
}
}
void FireCollision(short itemNumber, ITEM_INFO* l, COLL_INFO* coll)
{
ITEM_INFO* item = &g_Level.Items[itemNumber];
if (Lara.gunType != WEAPON_TORCH
|| Lara.gunStatus != LG_READY
|| Lara.leftArm.lock
|| Lara.litTorch == (item->status == ITEM_ACTIVE)
|| item->timer == -1
|| !(TrInput & IN_ACTION)
|| l->currentAnimState != LS_STOP
|| l->animNumber != LA_STAND_IDLE
|| l->gravityStatus)
{
if (item->objectNumber == ID_BURNING_ROOTS)
ObjectCollision(itemNumber, l, coll);
}
else
{
short rot = item->pos.yRot;
switch (item->objectNumber)
{
case ID_FLAME_EMITTER:
FireBounds.boundingBox.X1 = -256;
FireBounds.boundingBox.X2 = 256;
FireBounds.boundingBox.Y1 = 0;
FireBounds.boundingBox.Y2 = 1024;
FireBounds.boundingBox.Z1 = -800;
FireBounds.boundingBox.Z2 = 800;
break;
case ID_FLAME_EMITTER2:
FireBounds.boundingBox.X1 = -256;
FireBounds.boundingBox.X2 = 256;
FireBounds.boundingBox.Y1 = 0;
FireBounds.boundingBox.Y2 = 1024;
FireBounds.boundingBox.Z1 = -600;
FireBounds.boundingBox.Z2 = 600;
break;
case ID_BURNING_ROOTS:
FireBounds.boundingBox.X1 = -384;
FireBounds.boundingBox.X2 = 384;
FireBounds.boundingBox.Y1 = 0;
FireBounds.boundingBox.Y2 = 2048;
FireBounds.boundingBox.Z1 = -384;
FireBounds.boundingBox.Z2 = 384;
break;
}
item->pos.yRot = l->pos.yRot;
if (TestLaraPosition(&FireBounds, item, l))
{
if (item->objectNumber == ID_BURNING_ROOTS)
{
l->animNumber = LA_TORCH_LIGHT_5;
}
else
{
int dy = abs(l->pos.yPos - item->pos.yPos);
l->itemFlags[3] = 1;
l->animNumber = (dy >> 8) + LA_TORCH_LIGHT_1;
}
l->currentAnimState = LS_MISC_CONTROL;
l->frameNumber = g_Level.Anims[l->animNumber].frameBase;
Lara.flareControlLeft = false;
Lara.leftArm.lock = 3;
Lara.interactedItem = itemNumber;
}
item->pos.yRot = rot;
}
if (Lara.interactedItem == itemNumber && item->status != ITEM_ACTIVE && l->currentAnimState == LS_MISC_CONTROL)
{
if (l->animNumber >= LA_TORCH_LIGHT_1 && l->animNumber <= LA_TORCH_LIGHT_5)
{
if (l->frameNumber - g_Level.Anims[l->animNumber].frameBase == 40)
{
TestTriggers(item, true, item->flags & IFLAG_ACTIVATION_MASK);
item->flags |= 0x3E00;
item->itemFlags[3] = 0;
item->status = ITEM_ACTIVE;
AddActiveItem(itemNumber);
}
}
}
}

View file

@ -1,9 +0,0 @@
#pragma once
#include "collide.h"
void TriggerTorchFlame(char fxObj, char node);
void DoFlameTorch();
void GetFlameTorch();
void TorchControl(short itemNumber);
void FireCollision(short itemNumber, ITEM_INFO* l, COLL_INFO* coll);

View file

@ -27,14 +27,6 @@ OBJECT_COLLISION_BOUNDS ParallelBarsBounds =
0xFD80, 0x0280, 0x02C0, 0x0340, 0xFFA0, 0x0060, 0xF8E4, 0x071C, 0xEAAC, 0x1554, 0xF8E4, 0x071C
};
PHD_VECTOR PolePos = { 0, 0, -208 };
PHD_VECTOR PolePosR = { 0, 0, 0 };
OBJECT_COLLISION_BOUNDS PoleBounds = // offset 0xA1250
{
0xFF00, 0x0100, 0x0000, 0x0000, 0xFE00, 0x0200, 0xF8E4, 0x071C, 0xEAAC, 0x1554,
0xF8E4, 0x071C
};
void ControlAnimatingSlots(short itemNumber)
{
// TODO: TR5 has here a series of hardcoded OCB codes, this function actually is just a placeholder
@ -44,84 +36,6 @@ void ControlAnimatingSlots(short itemNumber)
AnimateItem(item);
}
void PoleCollision(short itemNumber, ITEM_INFO* l, COLL_INFO* coll)
{
ITEM_INFO* item = &g_Level.Items[itemNumber];
if ((TrInput & IN_ACTION) && !Lara.gunStatus && l->currentAnimState == LS_STOP &&
l->animNumber == LA_STAND_IDLE
|| Lara.isMoving && Lara.interactedItem == itemNumber)
{
short rot = item->pos.yRot;
item->pos.yRot = l->pos.yRot;
if (TestLaraPosition(&PoleBounds, item, l))
{
if (MoveLaraPosition(&PolePos, item, l))
{
l->animNumber = LA_STAND_TO_POLE;
l->currentAnimState = LS_POLE_IDLE;
l->frameNumber = g_Level.Anims[l->animNumber].frameBase;
Lara.isMoving = false;
Lara.gunStatus = LG_HANDS_BUSY;
}
else
{
Lara.interactedItem = itemNumber;
}
item->pos.yRot = rot;
}
else
{
if (Lara.isMoving && Lara.interactedItem == itemNumber)
{
Lara.isMoving = false;
Lara.gunStatus = LG_NO_ARMS;
}
item->pos.yRot = rot;
}
}
else if (TrInput & IN_ACTION
&& !Lara.gunStatus
&& l->gravityStatus
&& l->fallspeed > Lara.gunStatus
&& (l->currentAnimState == LS_REACH || l->currentAnimState == LS_JUMP_UP))
{
if (TestBoundsCollide(item, l, 100))
{
if (TestCollision(item, l))
{
short rot = item->pos.yRot;
item->pos.yRot = l->pos.yRot;
if (l->currentAnimState == LS_REACH)
{
PolePosR.y = l->pos.yPos - item->pos.yPos + 10;
AlignLaraPosition(&PolePosR, item, l);
l->animNumber = LA_REACH_TO_POLE;
l->frameNumber = g_Level.Anims[l->animNumber].frameBase;
}
else
{
PolePosR.y = l->pos.yPos - item->pos.yPos + 66;
AlignLaraPosition(&PolePosR, item, l);
l->animNumber = LA_JUMP_UP_TO_POLE;
l->frameNumber = g_Level.Anims[l->animNumber].frameBase;
}
l->gravityStatus = false;
l->fallspeed = false;
l->currentAnimState = LS_POLE_IDLE;
Lara.gunStatus = LG_HANDS_BUSY;
item->pos.yRot = rot;
}
}
}
else
{
if ((l->currentAnimState < LS_POLE_IDLE || l->currentAnimState > LS_POLE_TURN_COUNTER_CLOCKWISE) &&
l->currentAnimState != LS_JUMP_BACK)
ObjectCollision(itemNumber, l, coll);
}
}
void ControlTriggerTriggerer(short itemNumber)
{
ITEM_INFO* item = &g_Level.Items[itemNumber];

View file

@ -12,7 +12,6 @@
#include "lara_flare.h"
#include "lara_one_gun.h"
#include "lara_two_guns.h"
#include "effects/flmtorch.h"
#include "setup.h"
#include "camera.h"
#include "level.h"
@ -24,6 +23,10 @@
#include "pickup/pickup_weapon.h"
#include "pickup/pickup_consumable.h"
#include "pickup/pickup_misc_items.h"
#include "Objects/Generic/Object/burning_torch.h"
#include "Game/collide.h"
using namespace TEN::Entities::Generic;
OBJECT_COLLISION_BOUNDS PickUpBounds = // offset 0xA1338
{

View file

@ -21,12 +21,12 @@
#include "Game/misc.h"
#include "Game/puzzles_keys.h"
#include "Objects/TR4/Entity/tr4_littlebeetle.h"
#include "Game/rope.h"
#include "Objects/Generic/Object/rope.h"
using namespace TEN::Effects::Fire;
using namespace TEN::Entities::Switches;
using namespace TEN::Entities::TR4;
using namespace TEN::Game::Rope;
using namespace TEN::Entities::Generic;
using namespace flatbuffers;
namespace Save = TEN::Save;
@ -628,25 +628,25 @@ bool SaveGame::Save(int slot)
Save::PendulumBuilder pendulumInfo{ fbb };
pendulumInfo.add_node(CurrentPendulum.node);
pendulumInfo.add_position(&Save::Vector3(
CurrentPendulum.Position.x,
CurrentPendulum.Position.y,
CurrentPendulum.Position.z));
CurrentPendulum.position.x,
CurrentPendulum.position.y,
CurrentPendulum.position.z));
pendulumInfo.add_velocity(&Save::Vector3(
CurrentPendulum.Velocity.x,
CurrentPendulum.Velocity.y,
CurrentPendulum.Velocity.z));
CurrentPendulum.velocity.x,
CurrentPendulum.velocity.y,
CurrentPendulum.velocity.z));
pendulumOffset = pendulumInfo.Finish();
Save::PendulumBuilder alternatePendulumInfo{ fbb };
alternatePendulumInfo.add_node(AlternatePendulum.node);
alternatePendulumInfo.add_position(&Save::Vector3(
AlternatePendulum.Position.x,
AlternatePendulum.Position.y,
AlternatePendulum.Position.z));
AlternatePendulum.position.x,
AlternatePendulum.position.y,
AlternatePendulum.position.z));
alternatePendulumInfo.add_velocity(&Save::Vector3(
AlternatePendulum.Velocity.x,
AlternatePendulum.Velocity.y,
AlternatePendulum.Velocity.z));
AlternatePendulum.velocity.x,
AlternatePendulum.velocity.y,
AlternatePendulum.velocity.z));
alternatePendulumOffset = alternatePendulumInfo.Finish();
}
@ -1226,31 +1226,31 @@ bool SaveGame::Load(int slot)
s->rope()->position()->y(),
s->rope()->position()->z());
CurrentPendulum.Position = PHD_VECTOR(
CurrentPendulum.position = PHD_VECTOR(
s->pendulum()->position()->x(),
s->pendulum()->position()->y(),
s->pendulum()->position()->z());
CurrentPendulum.Velocity = PHD_VECTOR(
CurrentPendulum.velocity = PHD_VECTOR(
s->pendulum()->velocity()->x(),
s->pendulum()->velocity()->y(),
s->pendulum()->velocity()->z());
CurrentPendulum.node = s->pendulum()->node();
CurrentPendulum.Rope = rope;
CurrentPendulum.rope = rope;
AlternatePendulum.Position = PHD_VECTOR(
AlternatePendulum.position = PHD_VECTOR(
s->alternate_pendulum()->position()->x(),
s->alternate_pendulum()->position()->y(),
s->alternate_pendulum()->position()->z());
AlternatePendulum.Velocity = PHD_VECTOR(
AlternatePendulum.velocity = PHD_VECTOR(
s->alternate_pendulum()->velocity()->x(),
s->alternate_pendulum()->velocity()->y(),
s->alternate_pendulum()->velocity()->z());
AlternatePendulum.node = s->alternate_pendulum()->node();
AlternatePendulum.Rope = rope;
AlternatePendulum.rope = rope;
}
return true;

View file

@ -1,7 +1,8 @@
#include "framework.h"
#include "effect_objects.h"
#include "Objects/Effects/effect_objects.h"
#include "Specific/setup.h"
#include "Objects/Effects/flame_emitters.h"
#include "Objects/Effects/enemy_missile.h"
using namespace TEN::Entities::Effects;
@ -49,4 +50,14 @@ void InitialiseEffectsObjects()
obj->saveFlags = true;
obj->usingDrawAnimatingItem = false;
}
obj = &Objects[ID_ENERGY_BUBBLES];
{
obj->initialise = nullptr;
obj->collision = nullptr;
obj->control = ControlEnemyMissile;
obj->savePosition = true;
obj->saveFlags = true;
obj->saveAnim = true;
}
}

View file

@ -1,19 +1,21 @@
#include "framework.h"
#include "tr4_bubbles.h"
#include "effects/debris.h"
#include "items.h"
#include "effects/tomb4fx.h"
#include "effects/effects.h"
#include "level.h"
#include "lara.h"
#include "control/control.h"
#include "tr4_mutant.h"
#include "collide.h"
#include "Objects/Effects/enemy_missile.h"
#include "Game/effects/debris.h"
#include "Game/items.h"
#include "Game/effects/tomb4fx.h"
#include "Game/effects/effects.h"
#include "Specific/level.h"
#include "Game/Lara/lara.h"
#include "Game/Control/control.h"
#include "Game/collide.h"
#include "Game/effects/lara_burn.h"
#include "Objects/TR4/Entity/tr4_mutant.h"
#include "Objects/TR4/Entity/tr4_demigod.h"
using namespace TEN::Effects::Fire;
using namespace TEN::Entities::TR4;
namespace TEN::entities::all
namespace TEN::Entities::Effects
{
void TriggerSethMissileFlame(short fxNum, short xVel, short yVel, short zVel)
{
@ -117,66 +119,6 @@ namespace TEN::entities::all
}
}
void TriggerDemigodMissileFlame(short fxNum, short xVel, short yVel, short zVel)
{
FX_INFO* fx = &EffectList[fxNum];
int dx = LaraItem->pos.xPos - fx->pos.xPos;
int dz = LaraItem->pos.zPos - fx->pos.zPos;
if (dx >= -16384 && dx <= 16384 && dz >= -16384 && dz <= 16384)
{
SPARKS* spark = &Sparks[GetFreeSpark()];
spark->on = 1;
if (fx->flag1 == 3 || fx->flag1 == 4)
{
spark->sR = 0;
spark->dR = 0;
spark->sB = (GetRandomControl() & 0x7F) + 32;
spark->sG = spark->sB + 64;
spark->dG = (GetRandomControl() & 0x7F) + 32;
spark->dB = spark->dG + 64;
}
else
{
spark->sR = (GetRandomControl() & 0x7F) + 32;
spark->sG = spark->sR - (GetRandomControl() & 0x1F);
spark->sB = 0;
spark->dR = (GetRandomControl() & 0x7F) + 32;
spark->dB = 0;
spark->dG = spark->dR - (GetRandomControl() & 0x1F);
}
spark->fadeToBlack = 8;
spark->colFadeSpeed = (GetRandomControl() & 3) + 4;
spark->transType = COLADD;
spark->life = spark->sLife = (GetRandomControl() & 3) + 16;
spark->y = 0;
spark->x = (GetRandomControl() & 0xF) - 8;
spark->yVel = yVel;
spark->zVel = zVel;
spark->z = (GetRandomControl() & 0xF) - 8;
spark->xVel = xVel;
spark->friction = 68;
spark->flags = 602;
spark->rotAng = GetRandomControl() & 0xFFF;
if (GetRandomControl() & 1)
{
spark->rotAdd = -32 - (GetRandomControl() & 0x1F);
}
else
{
spark->rotAdd = (GetRandomControl() & 0x1F) + 32;
}
spark->gravity = 0;
spark->maxYvel = 0;
spark->fxObj = fxNum;
spark->scalar = 2;
spark->sSize = spark->size = (GetRandomControl() & 7) + 64;
spark->dSize = spark->size / 32;
}
}
void BubblesShatterFunction(FX_INFO* fx, int param1, int param2)
{
ShatterItem.yRot = fx->pos.yRot;
@ -237,17 +179,17 @@ namespace TEN::entities::all
}
int dy = angles[0] - fx->pos.yRot;
if (abs(dy) <= ANGLE(180.0f))
if (abs(dy) > 0x8000)
{
dy = -dy;
}
int dx = angles[1] - fx->pos.xRot;
if (abs(dx) <= ANGLE(180.0f))
if (abs(dx) > 0x8000)
dx = -dx;
dy /= 8;
dx /= 8;
dy >>= 3;
dx >>= 3;
if (dy < -maxRotation)
dy = -maxRotation;
@ -275,9 +217,9 @@ namespace TEN::entities::all
int oldZ = fx->pos.zPos;
int speed = (fx->speed * phd_cos(fx->pos.xRot));
fx->pos.zPos += (speed * phd_cos(fx->pos.yRot));
fx->pos.xPos += (speed * phd_sin(fx->pos.yRot));
fx->pos.yPos += -((fx->speed * phd_sin(fx->pos.xRot))) + fx->fallspeed;
fx->pos.zPos += (speed * phd_cos(fx->pos.yRot));
short roomNumber = fx->roomNumber;
FLOOR_INFO* floor = GetFloor(fx->pos.xPos, fx->pos.yPos, fx->pos.zPos, &roomNumber);
@ -413,7 +355,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);
TriggerCrocgodMissileFlame(fxNum, 16 * dx, 16 * dy, 16 * dz);
break;
}
}

View file

@ -1,6 +1,6 @@
#pragma once
namespace TEN::entities::all
namespace TEN::Entities::Effects
{
void ControlEnemyMissile(short fxNum);
}

View file

@ -0,0 +1,345 @@
#include "framework.h"
#include "Objects/Generic/Object/burning_torch.h"
#include "Game/Lara/lara_flare.h"
#include "Game/Lara/lara.h"
#include "Game/animation.h"
#include "Game/items.h"
#include "Specific/level.h"
#include "Specific/input.h"
#include "Sound/sound.h"
#include "Objects/Effects/flame_emitters.h"
#include "Game/effects/effects.h"
#include "Specific/setup.h"
#include "Game/collide.h"
using namespace TEN::Entities::Effects;
namespace TEN::Entities::Generic
{
void TriggerTorchFlame(char fxObj, char node)
{
SPARKS* spark = &Sparks[GetFreeSpark()];
spark->on = true;
spark->sR = 255;
spark->sB = 48;
spark->sG = (GetRandomControl() & 0x1F) + 48;
spark->dR = (GetRandomControl() & 0x3F) - 64;
spark->dB = 32;
spark->dG = (GetRandomControl() & 0x3F) + -128;
spark->fadeToBlack = 8;
spark->colFadeSpeed = (GetRandomControl() & 3) + 12;
spark->transType = COLADD;
spark->life = spark->sLife = (GetRandomControl() & 7) + 24;
spark->x = (GetRandomControl() & 0xF) - 8;
spark->y = 0;
spark->z = (GetRandomControl() & 0xF) - 8;
spark->xVel = (GetRandomControl() & 0xFF) - 128;
spark->yVel = -16 - (GetRandomControl() & 0xF);
spark->zVel = (GetRandomControl() & 0xFF) - 128;
spark->friction = 5;
spark->flags = SP_NODEATTACH | SP_EXPDEF | SP_ITEM | SP_ROTATE | SP_DEF | SP_SCALE;
spark->rotAng = GetRandomControl() & 0xFFF;
if (GetRandomControl() & 1)
spark->rotAdd = -16 - (GetRandomControl() & 0xF);
else
spark->rotAdd = (GetRandomControl() & 0xF) + 16;
spark->gravity = -16 - (GetRandomControl() & 0x1F);
spark->nodeNumber = node;
spark->maxYvel = -16 - (GetRandomControl() & 7);
spark->fxObj = fxObj;
spark->scalar = 1;
spark->sSize = spark->size = (GetRandomControl() & 0x1F) + 80;
spark->dSize = spark->size / 8;
}
void DoFlameTorch()
{
switch (Lara.leftArm.lock)
{
case 0:
if (Lara.requestGunType != Lara.gunType)
{
Lara.leftArm.lock = 2;
Lara.leftArm.frameNumber = 31;
Lara.leftArm.animNumber = Objects[ID_LARA_TORCH_ANIM].animIndex + 2;
break;
}
if (TrInput & IN_DRAW
&& !(LaraItem->gravityStatus)
&& !LaraItem->fallspeed
&& LaraItem->currentAnimState != LS_JUMP_PREPARE
&& LaraItem->currentAnimState != LS_JUMP_UP
&& LaraItem->currentAnimState != LS_JUMP_FORWARD
&& LaraItem->currentAnimState != LS_JUMP_BACK
&& LaraItem->currentAnimState != LS_JUMP_LEFT
&& LaraItem->currentAnimState != LS_JUMP_RIGHT
|| Lara.waterStatus == LW_UNDERWATER)
{
Lara.leftArm.lock = true;
Lara.leftArm.frameNumber = 1;
Lara.leftArm.animNumber = Objects[ID_LARA_TORCH_ANIM].animIndex + 1;
if (Lara.waterStatus == LW_UNDERWATER)
Lara.litTorch = false;
}
break;
case 1:
if (Lara.leftArm.frameNumber < 12 && LaraItem->gravityStatus)
{
Lara.leftArm.lock = false;
Lara.leftArm.frameNumber = 0;
Lara.leftArm.animNumber = Objects[ID_LARA_TORCH_ANIM].animIndex;
}
else
{
Lara.leftArm.frameNumber++;
if (Lara.leftArm.frameNumber == 27)
{
Lara.litTorch = false;
Lara.flareControlLeft = false;
Lara.leftArm.lock = false;
Lara.gunType = Lara.lastGunType;
Lara.requestGunType = WEAPON_NONE;
Lara.gunStatus = LG_NO_ARMS;
}
else if (Lara.leftArm.frameNumber == 12)
{
Lara.meshPtrs[LM_LHAND] = Objects[ID_LARA_SKIN].meshIndex + LM_LHAND;
CreateFlare(ID_BURNING_TORCH_ITEM, 1);
}
}
break;
case 2:
Lara.leftArm.frameNumber++;
if (Lara.leftArm.frameNumber == 41)
{
Lara.litTorch = false;
Lara.flareControlLeft = false;
Lara.leftArm.lock = false;
Lara.lastGunType = WEAPON_NONE;
Lara.gunType = WEAPON_NONE;
Lara.gunStatus = LG_NO_ARMS;
}
else if (Lara.leftArm.frameNumber == 36)
{
Lara.meshPtrs[LM_LHAND] = Objects[ID_LARA_SKIN].meshIndex + LM_LHAND;
CreateFlare(ID_BURNING_TORCH_ITEM, 0);
}
break;
case 3:
if (LaraItem->currentAnimState != LS_MISC_CONTROL)
{
Lara.leftArm.lock = false;
Lara.leftArm.frameNumber = 0;
Lara.flareControlLeft = true;
Lara.litTorch = LaraItem->itemFlags[3] & 1;
Lara.leftArm.animNumber = Objects[ID_LARA_TORCH_ANIM].animIndex;
}
break;
default:
break;
}
if (Lara.flareControlLeft)
Lara.gunStatus = LG_READY;
Lara.leftArm.frameBase = g_Level.Anims[Lara.leftArm.animNumber].framePtr;
if (Lara.litTorch)
{
PHD_VECTOR pos;
pos.x = -32;
pos.y = 64;
pos.z = 256;
GetLaraJointPosition(&pos, LM_LHAND);
TriggerDynamicLight(pos.x, pos.y, pos.z, 12 - (GetRandomControl() & 1), (GetRandomControl() & 0x3F) + 192, (GetRandomControl() & 0x1F) + 96, 0);
if (!(Wibble & 7))
TriggerTorchFlame(LaraItem - g_Level.Items.data(), 0);
SoundEffect(SFX_TR4_LOOP_FOR_SMALL_FIRES, (PHD_3DPOS*)&pos, 0);
}
}
void GetFlameTorch()
{
if (Lara.gunType == WEAPON_FLARE)
CreateFlare(ID_FLARE_ITEM, 0);
Lara.requestGunType = WEAPON_TORCH;
Lara.gunType = WEAPON_TORCH;
Lara.flareControlLeft = true;
Lara.leftArm.animNumber = Objects[ID_LARA_TORCH_ANIM].animIndex;
Lara.gunStatus = LG_READY;
Lara.leftArm.lock = false;
Lara.leftArm.frameNumber = 0;
Lara.leftArm.frameBase = g_Level.Anims[Lara.leftArm.animNumber].framePtr;
Lara.meshPtrs[LM_LHAND] = Objects[ID_LARA_TORCH_ANIM].meshIndex + LM_LHAND;
}
void TorchControl(short itemNumber)
{
ITEM_INFO* item = &g_Level.Items[itemNumber];
int oldX = item->pos.xPos;
int oldY = item->pos.yPos;
int oldZ = item->pos.zPos;
if (item->fallspeed)
item->pos.zRot += ANGLE(5);
else if (!item->speed)
{
item->pos.xRot = 0;
item->pos.zRot = 0;
}
int xv = item->speed * phd_sin(item->pos.yRot);
int zv = item->speed * phd_cos(item->pos.yRot);
item->pos.xPos += xv;
item->pos.zPos += zv;
if (g_Level.Rooms[item->roomNumber].flags & ENV_FLAG_WATER)
{
item->fallspeed += (5 - item->fallspeed) / 2;
item->speed += (5 - item->speed) / 2;
if (item->itemFlags[3] != 0)
item->itemFlags[3] = 0;
}
else
{
item->fallspeed += 6;
}
item->pos.yPos += item->fallspeed;
DoProjectileDynamics(itemNumber, oldX, oldY, oldZ, xv, item->fallspeed, zv);
if (GetCollidedObjects(item, 0, 1, CollidedItems, CollidedMeshes, 0))
{
LaraCollision.Setup.EnableObjectPush = true;
if (CollidedItems)
{
if (!Objects[CollidedItems[0]->objectNumber].intelligent
&& CollidedItems[0]->objectNumber != ID_LARA)
ObjectCollision(CollidedItems[0] - g_Level.Items.data(), item, &LaraCollision);
}
else
{
ItemPushStatic(item, CollidedMeshes[0], &LaraCollision);
}
item->speed >>= 1;
}
if (item->itemFlags[3])
{
TriggerDynamicLight(item->pos.xPos, item->pos.yPos, item->pos.zPos, 12 - (GetRandomControl() & 1), (GetRandomControl() & 0x3F) + 192, (GetRandomControl() & 0x1F) + 96, 0);
if (!(Wibble & 7))
TriggerTorchFlame(itemNumber, 1);
SoundEffect(SFX_TR4_LOOP_FOR_SMALL_FIRES, &item->pos, 0);
}
}
void FireCollision(short itemNumber, ITEM_INFO* l, COLL_INFO* coll)
{
ITEM_INFO* item = &g_Level.Items[itemNumber];
if (Lara.gunType != WEAPON_TORCH
|| Lara.gunStatus != LG_READY
|| Lara.leftArm.lock
|| Lara.litTorch == (item->status == ITEM_ACTIVE)
|| item->timer == -1
|| !(TrInput & IN_ACTION)
|| l->currentAnimState != LS_STOP
|| l->animNumber != LA_STAND_IDLE
|| l->gravityStatus)
{
if (item->objectNumber == ID_BURNING_ROOTS)
ObjectCollision(itemNumber, l, coll);
}
else
{
short rot = item->pos.yRot;
switch (item->objectNumber)
{
case ID_FLAME_EMITTER:
FireBounds.boundingBox.X1 = -256;
FireBounds.boundingBox.X2 = 256;
FireBounds.boundingBox.Y1 = 0;
FireBounds.boundingBox.Y2 = 1024;
FireBounds.boundingBox.Z1 = -800;
FireBounds.boundingBox.Z2 = 800;
break;
case ID_FLAME_EMITTER2:
FireBounds.boundingBox.X1 = -256;
FireBounds.boundingBox.X2 = 256;
FireBounds.boundingBox.Y1 = 0;
FireBounds.boundingBox.Y2 = 1024;
FireBounds.boundingBox.Z1 = -600;
FireBounds.boundingBox.Z2 = 600;
break;
case ID_BURNING_ROOTS:
FireBounds.boundingBox.X1 = -384;
FireBounds.boundingBox.X2 = 384;
FireBounds.boundingBox.Y1 = 0;
FireBounds.boundingBox.Y2 = 2048;
FireBounds.boundingBox.Z1 = -384;
FireBounds.boundingBox.Z2 = 384;
break;
}
item->pos.yRot = l->pos.yRot;
if (TestLaraPosition(&FireBounds, item, l))
{
if (item->objectNumber == ID_BURNING_ROOTS)
{
l->animNumber = LA_TORCH_LIGHT_5;
}
else
{
int dy = abs(l->pos.yPos - item->pos.yPos);
l->itemFlags[3] = 1;
l->animNumber = (dy >> 8) + LA_TORCH_LIGHT_1;
}
l->currentAnimState = LS_MISC_CONTROL;
l->frameNumber = g_Level.Anims[l->animNumber].frameBase;
Lara.flareControlLeft = false;
Lara.leftArm.lock = 3;
Lara.interactedItem = itemNumber;
}
item->pos.yRot = rot;
}
if (Lara.interactedItem == itemNumber && item->status != ITEM_ACTIVE && l->currentAnimState == LS_MISC_CONTROL)
{
if (l->animNumber >= LA_TORCH_LIGHT_1 && l->animNumber <= LA_TORCH_LIGHT_5)
{
if (l->frameNumber - g_Level.Anims[l->animNumber].frameBase == 40)
{
TestTriggers(item, true, item->flags & IFLAG_ACTIVATION_MASK);
item->flags |= 0x3E00;
item->itemFlags[3] = 0;
item->status = ITEM_ACTIVE;
AddActiveItem(itemNumber);
}
}
}
}
}

View file

@ -0,0 +1,13 @@
#pragma once
struct ITEM_INFO;
struct COLL_INFO;
namespace TEN::Entities::Generic
{
void TriggerTorchFlame(char fxObj, char node);
void DoFlameTorch();
void GetFlameTorch();
void TorchControl(short itemNumber);
void FireCollision(short itemNumber, ITEM_INFO* l, COLL_INFO* coll);
}

View file

@ -0,0 +1,112 @@
#include "framework.h"
#include "Specific/level.h"
#include "Game/control/control.h"
#include "Game/control/box.h"
#include "Game/items.h"
#include "Game/control/lot.h"
#include "Specific/input.h"
#include "Game/Lara/lara_struct.h"
#include "Game/Lara/lara.h"
#include "Specific/trmath.h"
#include "Game/collide.h"
#include "Game/sphere.h"
namespace TEN::Entities::Generic
{
PHD_VECTOR PolePos = { 0, 0, -208 };
PHD_VECTOR PolePosR = { 0, 0, 0 };
OBJECT_COLLISION_BOUNDS PoleBounds =
{
-256, 256,
0, 0,
-512, 512,
-ANGLE(10), ANGLE(10),
-ANGLE(30), ANGLE(30),
-ANGLE(10), ANGLE(10)
};
void PoleCollision(short itemNumber, ITEM_INFO* l, COLL_INFO* coll)
{
ITEM_INFO* item = &g_Level.Items[itemNumber];
if ((TrInput & IN_ACTION)
&& !Lara.gunStatus
&& l->currentAnimState == LS_STOP
&& l->animNumber == LA_STAND_IDLE
|| Lara.isMoving
&& Lara.interactedItem == itemNumber)
{
short rot = item->pos.yRot;
item->pos.yRot = l->pos.yRot;
if (TestLaraPosition(&PoleBounds, item, l))
{
if (MoveLaraPosition(&PolePos, item, l))
{
l->animNumber = LA_STAND_TO_POLE;
l->currentAnimState = LS_POLE_IDLE;
l->frameNumber = g_Level.Anims[l->animNumber].frameBase;
Lara.isMoving = false;
Lara.gunStatus = LG_HANDS_BUSY;
}
else
{
Lara.interactedItem = itemNumber;
}
item->pos.yRot = rot;
}
else
{
if (Lara.isMoving && Lara.interactedItem == itemNumber)
{
Lara.isMoving = false;
Lara.gunStatus = LG_NO_ARMS;
}
item->pos.yRot = rot;
}
}
else if (TrInput & IN_ACTION
&& !Lara.gunStatus
&& l->gravityStatus
&& l->fallspeed > Lara.gunStatus
&& (l->currentAnimState == LS_REACH
|| l->currentAnimState == LS_JUMP_UP))
{
if (TestBoundsCollide(item, l, 100))
{
if (TestCollision(item, l))
{
short rot = item->pos.yRot;
item->pos.yRot = l->pos.yRot;
if (l->currentAnimState == LS_REACH)
{
PolePosR.y = l->pos.yPos - item->pos.yPos + 10;
AlignLaraPosition(&PolePosR, item, l);
l->animNumber = LA_REACH_TO_POLE;
l->frameNumber = g_Level.Anims[l->animNumber].frameBase;
}
else
{
PolePosR.y = l->pos.yPos - item->pos.yPos + 66;
AlignLaraPosition(&PolePosR, item, l);
l->animNumber = LA_JUMP_UP_TO_POLE;
l->frameNumber = g_Level.Anims[l->animNumber].frameBase;
}
l->gravityStatus = false;
l->fallspeed = false;
l->currentAnimState = LS_POLE_IDLE;
Lara.gunStatus = LG_HANDS_BUSY;
item->pos.yRot = rot;
}
}
}
else
{
if ((l->currentAnimState < LS_POLE_IDLE
|| l->currentAnimState > LS_POLE_TURN_COUNTER_CLOCKWISE)
&& l->currentAnimState != LS_JUMP_BACK)
ObjectCollision(itemNumber, l, coll);
}
}
}

View file

@ -0,0 +1,9 @@
#pragma once
struct ITEM_INFO;
struct COLL_INFO;
namespace TEN::Entities::Generic
{
void PoleCollision(short itemNumber, ITEM_INFO* l, COLL_INFO* coll);
}

View file

@ -1,15 +1,20 @@
#include "framework.h"
#include "rope.h"
#include "animation.h"
#include "lara.h"
#include "level.h"
#include "input.h"
#include "control/control.h"
#include "Sound\sound.h"
#include "camera.h"
#include "items.h"
#include "Specific/level.h"
#include "Game/control/control.h"
#include "Game/control/box.h"
#include "Game/items.h"
#include "Game/control/lot.h"
#include "Specific/input.h"
#include "Game/Lara/lara_struct.h"
#include "Game/Lara/lara.h"
#include "Specific/trmath.h"
#include "Game/collide.h"
#include "Game/sphere.h"
#include "Objects/Generic/Object/rope.h"
#include "Sound/sound.h"
#include "Game/camera.h"
namespace TEN::Game::Rope
namespace TEN::Entities::Generic
{
PENDULUM CurrentPendulum;
PENDULUM AlternatePendulum;
@ -39,7 +44,7 @@ namespace TEN::Game::Rope
PrepareRope(&rope, &itemPos, &pos, 128, item);
item->triggerFlags = Ropes.size();
Ropes.push_back(rope);
}
@ -180,10 +185,24 @@ namespace TEN::Game::Rope
item = &g_Level.Items[itemNumber];
rope = &Ropes[item->triggerFlags];
if (TrInput & IN_ACTION && Lara.gunStatus == LG_NO_ARMS && (l->currentAnimState == LS_REACH || l->currentAnimState == LS_JUMP_UP) && l->gravityStatus && l->fallspeed > 0 && rope->active)
if (TrInput & IN_ACTION
&& Lara.gunStatus == LG_NO_ARMS
&& (l->currentAnimState == LS_REACH
|| l->currentAnimState == LS_JUMP_UP)
&& l->gravityStatus
&& l->fallspeed > 0
&& rope->active)
{
frame = GetBoundsAccurate(l);
segment = RopeNodeCollision(rope, l->pos.xPos, l->pos.yPos + frame->Y1 + 512, l->pos.zPos + frame->Z2 * phd_cos(l->pos.yRot), l->currentAnimState == LS_REACH ? 128 : 320);
segment = RopeNodeCollision(
rope,
l->pos.xPos,
l->pos.yPos + frame->Y1 + 512,
l->pos.zPos + frame->Z2 * phd_cos(l->pos.yRot),
l->currentAnimState == LS_REACH ? 128 : 320);
if (segment >= 0)
{
if (l->currentAnimState == LS_REACH)
@ -198,17 +217,22 @@ namespace TEN::Game::Rope
l->animNumber = LA_JUMP_UP_TO_ROPE_START;
l->currentAnimState = LS_ROPE_IDLE;
}
l->frameNumber = g_Level.Anims[l->animNumber].frameBase;
l->gravityStatus = false;
l->fallspeed = 0;
Lara.gunStatus = LG_HANDS_BUSY;
Lara.ropePtr = item->triggerFlags;
Lara.ropeSegment = segment;
Lara.ropeY = l->pos.yRot;
DelAlignLaraToRope(l);
CurrentPendulum.Velocity.x = 0;
CurrentPendulum.Velocity.y = 0;
CurrentPendulum.Velocity.z = 0;
CurrentPendulum.velocity.x = 0;
CurrentPendulum.velocity.y = 0;
CurrentPendulum.velocity.z = 0;
ApplyVelocityToRope(segment, l->pos.yRot, 16 * LaraItem->speed);
}
}
@ -242,31 +266,31 @@ namespace TEN::Game::Rope
else
{
pendulumPointer = &AlternatePendulum;
if (Lara.ropePtr == -1 && CurrentPendulum.Rope)
if (Lara.ropePtr == -1 && CurrentPendulum.rope)
{
for (i = 0; i < CurrentPendulum.node; ++i)
for (i = 0; i < CurrentPendulum.node; i++)
{
CurrentPendulum.Rope->velocity[i].x = CurrentPendulum.Rope->velocity[CurrentPendulum.node].x;
CurrentPendulum.Rope->velocity[i].y = CurrentPendulum.Rope->velocity[CurrentPendulum.node].y;
CurrentPendulum.Rope->velocity[i].z = CurrentPendulum.Rope->velocity[CurrentPendulum.node].z;
CurrentPendulum.rope->velocity[i].x = CurrentPendulum.rope->velocity[CurrentPendulum.node].x;
CurrentPendulum.rope->velocity[i].y = CurrentPendulum.rope->velocity[CurrentPendulum.node].y;
CurrentPendulum.rope->velocity[i].z = CurrentPendulum.rope->velocity[CurrentPendulum.node].z;
}
CurrentPendulum.Position.x = 0;
CurrentPendulum.Position.y = 0;
CurrentPendulum.Position.z = 0;
CurrentPendulum.position.x = 0;
CurrentPendulum.position.y = 0;
CurrentPendulum.position.z = 0;
CurrentPendulum.Velocity.x = 0;
CurrentPendulum.Velocity.y = 0;
CurrentPendulum.Velocity.z = 0;
CurrentPendulum.velocity.x = 0;
CurrentPendulum.velocity.y = 0;
CurrentPendulum.velocity.z = 0;
CurrentPendulum.node = -1;
CurrentPendulum.Rope = NULL;
CurrentPendulum.rope = NULL;
}
}
if (Lara.ropePtr != -1)
{
vec.x = pendulumPointer->Position.x - rope->segment[0].x;
vec.y = pendulumPointer->Position.y - rope->segment[0].y;
vec.z = pendulumPointer->Position.z - rope->segment[0].z;
vec.x = pendulumPointer->position.x - rope->segment[0].x;
vec.y = pendulumPointer->position.y - rope->segment[0].y;
vec.z = pendulumPointer->position.z - rope->segment[0].z;
NormaliseRopeVector(&vec);
for (i = pendulumPointer->node; i >= 0; --i)
@ -282,35 +306,49 @@ namespace TEN::Game::Rope
if (flag)
{
vec2.x = pendulumPointer->Position.x - rope->segment[pendulumPointer->node].x;
vec2.y = pendulumPointer->Position.y - rope->segment[pendulumPointer->node].y;
vec2.z = pendulumPointer->Position.z - rope->segment[pendulumPointer->node].z;
rope->segment[pendulumPointer->node].x = pendulumPointer->Position.x;
rope->segment[pendulumPointer->node].y = pendulumPointer->Position.y;
rope->segment[pendulumPointer->node].z = pendulumPointer->Position.z;
vec2.x = pendulumPointer->position.x - rope->segment[pendulumPointer->node].x;
vec2.y = pendulumPointer->position.y - rope->segment[pendulumPointer->node].y;
vec2.z = pendulumPointer->position.z - rope->segment[pendulumPointer->node].z;
rope->segment[pendulumPointer->node].x = pendulumPointer->position.x;
rope->segment[pendulumPointer->node].y = pendulumPointer->position.y;
rope->segment[pendulumPointer->node].z = pendulumPointer->position.z;
for (i = pendulumPointer->node; i < ROPE_SEGMENTS; ++i)
{
rope->segment[i].x -= vec2.x;
rope->segment[i].y -= vec2.y;
rope->segment[i].z -= vec2.z;
rope->velocity[i].x = 0;
rope->velocity[i].y = 0;
rope->velocity[i].z = 0;
}
}
ModelRigidRope(rope, pendulumPointer, &rope->velocity[0], &pendulumPointer->Velocity, rope->segmentLength * pendulumPointer->node);
pendulumPointer->Velocity.y += 393216;
pendulumPointer->Position.x += pendulumPointer->Velocity.x;
pendulumPointer->Position.y += pendulumPointer->Velocity.y;
pendulumPointer->Position.z += pendulumPointer->Velocity.z;
pendulumPointer->Velocity.x -= pendulumPointer->Velocity.x >> 8;
pendulumPointer->Velocity.z -= pendulumPointer->Velocity.z >> 8;
}
for (i = pendulumPointer->node; i < 23; ++i)
ModelRigid(&rope->segment[i], &rope->segment[i + 1], &rope->velocity[i], &rope->velocity[i + 1], rope->segmentLength);
ModelRigidRope(
rope,
pendulumPointer,
&rope->velocity[0],
&pendulumPointer->velocity,
rope->segmentLength * pendulumPointer->node);
pendulumPointer->velocity.y += 6 << FP_SHIFT;
pendulumPointer->position.x += pendulumPointer->velocity.x;
pendulumPointer->position.y += pendulumPointer->velocity.y;
pendulumPointer->position.z += pendulumPointer->velocity.z;
pendulumPointer->velocity.x -= pendulumPointer->velocity.x >> 8;
pendulumPointer->velocity.z -= pendulumPointer->velocity.z >> 8;
}
for (i = pendulumPointer->node; i < ROPE_SEGMENTS - 1; ++i)
ModelRigid(
&rope->segment[i],
&rope->segment[i + 1],
&rope->velocity[i],
&rope->velocity[i + 1],
rope->segmentLength);
for (i = 0; i < ROPE_SEGMENTS; ++i)
{
rope->segment[i].x += rope->velocity[i].x;
@ -320,8 +358,9 @@ namespace TEN::Game::Rope
for (i = pendulumPointer->node; i < ROPE_SEGMENTS; ++i)
{
rope->velocity[i].y += 196608;
if (pendulumPointer->Rope)
rope->velocity[i].y += 3 << FP_SHIFT;
if (pendulumPointer->rope)
{
rope->velocity[i].x -= rope->velocity[i].x >> 4;
rope->velocity[i].z -= rope->velocity[i].z >> 4;
@ -357,7 +396,7 @@ namespace TEN::Game::Rope
rope->meshSegment[1].x = rope->segment[0].x + ((int64_t)rope->segmentLength * rope->normalisedSegment[0].x >> FP_SHIFT);
rope->meshSegment[1].y = rope->segment[0].y + ((int64_t)rope->segmentLength * rope->normalisedSegment[0].y >> FP_SHIFT);
rope->meshSegment[1].z = rope->segment[0].z + ((int64_t)rope->segmentLength * rope->normalisedSegment[0].z >> FP_SHIFT);
for (i = 2; i < ROPE_SEGMENTS; i++)
{
rope->meshSegment[i].x = rope->meshSegment[i - 1].x + ((int64_t)rope->segmentLength * rope->normalisedSegment[i - 1].x >> FP_SHIFT);
@ -374,14 +413,14 @@ namespace TEN::Game::Rope
rope->meshSegment[pendulumPointer->node + 1].x = rope->segment[pendulumPointer->node].x + ((int64_t)rope->segmentLength * rope->normalisedSegment[pendulumPointer->node].x >> FP_SHIFT);
rope->meshSegment[pendulumPointer->node + 1].y = rope->segment[pendulumPointer->node].y + ((int64_t)rope->segmentLength * rope->normalisedSegment[pendulumPointer->node].y >> FP_SHIFT);
rope->meshSegment[pendulumPointer->node + 1].z = rope->segment[pendulumPointer->node].z + ((int64_t)rope->segmentLength * rope->normalisedSegment[pendulumPointer->node].z >> FP_SHIFT);
for (i = pendulumPointer->node + 1; i < ROPE_SEGMENTS - 1; ++i)
{
rope->meshSegment[i + 1].x = rope->meshSegment[i].x + ((int64_t)rope->segmentLength * rope->normalisedSegment[i].x >> FP_SHIFT);
rope->meshSegment[i + 1].y = rope->meshSegment[i].y + ((int64_t)rope->segmentLength * rope->normalisedSegment[i].y >> FP_SHIFT);
rope->meshSegment[i + 1].z = rope->meshSegment[i].z + ((int64_t)rope->segmentLength * rope->normalisedSegment[i].z >> FP_SHIFT);
}
for (i = 0; i < pendulumPointer->node; i++)
{
rope->meshSegment[i].x = rope->segment[i].x;
@ -397,7 +436,7 @@ namespace TEN::Game::Rope
for (int i = 0; i < ROPE_SEGMENTS - 2; ++i)
{
if (y > rope->position.y + (rope->meshSegment[i].y >> FP_SHIFT)
if (y > rope->position.y + (rope->meshSegment[i].y >> FP_SHIFT)
&& y < rope->position.y + (rope->meshSegment[i + 1].y >> FP_SHIFT))
{
dx = x - ((rope->meshSegment[i + 1].x + rope->meshSegment[i].x) >> (FP_SHIFT + 1)) - rope->position.x;
@ -429,26 +468,26 @@ namespace TEN::Game::Rope
z = (int64_t)val * z >> FP_SHIFT;
}
CurrentPendulum.Velocity.x += x;
CurrentPendulum.Velocity.y += y;
CurrentPendulum.Velocity.z += z;
CurrentPendulum.velocity.x += x;
CurrentPendulum.velocity.y += y;
CurrentPendulum.velocity.z += z;
}
void SetPendulumPoint(ROPE_STRUCT* rope, int node)
{
CurrentPendulum.Position.x = rope->segment[node].x;
CurrentPendulum.Position.y = rope->segment[node].y;
CurrentPendulum.Position.z = rope->segment[node].z;
CurrentPendulum.position.x = rope->segment[node].x;
CurrentPendulum.position.y = rope->segment[node].y;
CurrentPendulum.position.z = rope->segment[node].z;
if (CurrentPendulum.node == -1)
{
CurrentPendulum.Velocity.x += rope->velocity[node].x;
CurrentPendulum.Velocity.y += rope->velocity[node].y;
CurrentPendulum.Velocity.z += rope->velocity[node].z;
CurrentPendulum.velocity.x += rope->velocity[node].x;
CurrentPendulum.velocity.y += rope->velocity[node].y;
CurrentPendulum.velocity.z += rope->velocity[node].z;
}
CurrentPendulum.node = node;
CurrentPendulum.Rope = rope;
CurrentPendulum.rope = rope;
}
void ModelRigidRope(ROPE_STRUCT* rope, PENDULUM* pendulumPointer, PHD_VECTOR* ropeVelocity, PHD_VECTOR* pendulumVelocity, int value)
@ -456,13 +495,13 @@ namespace TEN::Game::Rope
PHD_VECTOR vec;
int result;
vec.x = pendulumPointer->Position.x + pendulumVelocity->x - rope->segment[0].x;
vec.y = pendulumPointer->Position.y + pendulumVelocity->y - rope->segment[0].y;
vec.z = pendulumPointer->Position.z + pendulumVelocity->z - rope->segment[0].z;
vec.x = pendulumPointer->position.x + pendulumVelocity->x - rope->segment[0].x;
vec.y = pendulumPointer->position.y + pendulumVelocity->y - rope->segment[0].y;
vec.z = pendulumPointer->position.z + pendulumVelocity->z - rope->segment[0].z;
result = 65536 * sqrt(abs(SQUARE(vec.x >> FP_SHIFT) + SQUARE(vec.y >> FP_SHIFT) + SQUARE(vec.z >> FP_SHIFT))) - value;
NormaliseRopeVector(&vec);
pendulumVelocity->x -= (int64_t)result * vec.x >> FP_SHIFT;
pendulumVelocity->y -= (int64_t)result * vec.y >> FP_SHIFT;
pendulumVelocity->z -= (int64_t)result * vec.z >> FP_SHIFT;
@ -476,7 +515,7 @@ namespace TEN::Game::Rope
vec.x = nextSegment->x + nextVelocity->x - segment->x - velocity->x;
vec.y = nextSegment->y + nextVelocity->y - segment->y - velocity->y;
vec.z = nextSegment->z + nextVelocity->z - segment->z - velocity->z;
result = (65536 * sqrt(abs(SQUARE(vec.x >> FP_SHIFT) + SQUARE(vec.y >> FP_SHIFT) + SQUARE(vec.z >> FP_SHIFT))) - length) / 2;
NormaliseRopeVector(&vec);
@ -629,7 +668,7 @@ namespace TEN::Game::Rope
void FallFromRope(ITEM_INFO* item)
{
item->speed = abs(CurrentPendulum.Velocity.x >> FP_SHIFT) + abs(CurrentPendulum.Velocity.z >> FP_SHIFT) >> 1;
item->speed = abs(CurrentPendulum.velocity.x >> FP_SHIFT) + abs(CurrentPendulum.velocity.z >> FP_SHIFT) >> 1;
item->pos.xRot = 0;
item->pos.yPos += 320;
@ -788,8 +827,8 @@ namespace TEN::Game::Rope
rotMatrix = rotMatrix.Transpose();
item->pos.xPos += -112 * rotMatrix.m[0][2];
item->pos.yPos += -112 * rotMatrix.m[1][2];
item->pos.xPos += -112 * rotMatrix.m[0][2];
item->pos.yPos += -112 * rotMatrix.m[1][2];
item->pos.zPos += -112 * rotMatrix.m[2][2];
item->pos.xRot = angle[0];

View file

@ -1,33 +1,35 @@
#pragma once
#include "collide.h"
struct ITEM_INFO;
struct COLL_INFO;
struct PHD_VECTOR;
namespace TEN::Game::Rope
namespace TEN::Entities::Generic
{
constexpr auto ROPE_SEGMENTS = 24;
constexpr auto ROPE_WIDTH = 24;
struct ROPE_STRUCT
{
PHD_VECTOR segment[24]; // size=288, offset=0
PHD_VECTOR velocity[24]; // size=288, offset=288
PHD_VECTOR normalisedSegment[24]; // size=288, offset=576
PHD_VECTOR meshSegment[24]; // size=288, offset=864
PHD_VECTOR position; // size=12, offset=1152
PHD_VECTOR coords[24];
int segmentLength; // size=0, offset=1164
short active; // size=0, offset=1168
short coiled; // size=0, offset=1170
PHD_VECTOR segment[ROPE_SEGMENTS];
PHD_VECTOR velocity[ROPE_SEGMENTS];
PHD_VECTOR normalisedSegment[ROPE_SEGMENTS];
PHD_VECTOR meshSegment[ROPE_SEGMENTS];
PHD_VECTOR position;
PHD_VECTOR coords[ROPE_SEGMENTS];
int segmentLength;
short active;
short coiled;
};
struct PENDULUM
{
PHD_VECTOR Position; // size=12, offset=0
PHD_VECTOR Velocity; // size=12, offset=12
int node; // size=0, offset=24
ROPE_STRUCT* Rope; // size=1172, offset=28
PHD_VECTOR position;
PHD_VECTOR velocity;
int node;
ROPE_STRUCT* rope;
};
constexpr auto ROPE_SEGMENTS = 24;
constexpr auto ROPE_WIDTH = 24;
extern PENDULUM CurrentPendulum;
extern PENDULUM AlternatePendulum;
extern std::vector<ROPE_STRUCT> Ropes;
@ -50,9 +52,9 @@ namespace TEN::Game::Rope
void SetPendulumPoint(ROPE_STRUCT* rope, int node);
void ModelRigidRope(ROPE_STRUCT* rope, PENDULUM* pendulumPointer, PHD_VECTOR* ropeVelocity, PHD_VECTOR* pendulumVelocity, int value);
void ModelRigid(PHD_VECTOR* segment, PHD_VECTOR* nextSegment, PHD_VECTOR* velocity, PHD_VECTOR* nextVelocity, int length);
void DelAlignLaraToRope(ITEM_INFO* item);
void UpdateRopeSwing(ITEM_INFO* item);
void JumpOffRope(ITEM_INFO* item);
void FallFromRope(ITEM_INFO* item);
void LaraClimbRope(ITEM_INFO* item, COLL_INFO* coll);
void DelAlignLaraToRope(ITEM_INFO* item);
}

View file

@ -27,12 +27,19 @@
// Traps
#include "Objects/Generic/Traps/dart_emitter.h"
#include "Objects/Generic/Object/polerope.h"
#include "Objects/Generic/Object/rope.h"
/// necessary import
#include "setup.h"
#include "Game/pickup/pickup.h"
#include "Objects/Generic/Object/burning_torch.h"
using namespace TEN::Entities::Switches;
using namespace TEN::Entities::Doors;
using namespace TEN::Entities::Traps;
using namespace TEN::Entities::Generic;
static void StartObject()
{
@ -431,6 +438,34 @@ void StartTraps()
obj->saveFlags = true;
obj->usingDrawAnimatingItem = false;
}
obj = &Objects[ID_ROPE];
if (obj->loaded)
{
obj->initialise = InitialiseRope;
obj->control = RopeControl;
obj->collision = RopeCollision;
obj->drawRoutine = nullptr;
obj->saveFlags = true;
obj->usingDrawAnimatingItem = false;
}
obj = &Objects[ID_POLEROPE];
if (obj->loaded)
{
obj->collision = PoleCollision;
obj->saveFlags = true;
}
obj = &Objects[ID_BURNING_TORCH_ITEM];
if (obj->loaded)
{
obj->control = TorchControl;
obj->collision = PickupCollision;
obj->saveFlags = true;
obj->savePosition = true;
obj->usingDrawAnimatingItem = true;
}
}
void InitialiseGenericObjects()

File diff suppressed because it is too large Load diff

View file

@ -1,4 +1,13 @@
#pragma once
void InitialiseDemigod(short itemNumber);
void DemigodControl(short itemNumber);
struct PHD_3DPOS;
namespace TEN::Entities::TR4
{
void InitialiseDemigod(short itemNumber);
void DemigodControl(short itemNumber);
void TriggerDemigodMissile(PHD_3DPOS* pos, short roomNumber, int flags);
void DoDemigodEffects(short itemNumber);
void TriggerHammerSmoke(int x, int y, int z, int something);
void TriggerDemigodMissileFlame(short fxNum, short xVel, short yVel, short zVel);
}

File diff suppressed because it is too large Load diff

View file

@ -1,11 +1,13 @@
#pragma once
struct ITEM_INFO;
void InitialiseWraith(short itemNumber);
void WraithControl(short itemNumber);
void WraithWallsEffect(int x, int y, int z, short yrot, short objNumber);
void DrawWraith(int x, int y, int z, short xVel, short yVel, short zVel, int objNumber);
void KillWraith(ITEM_INFO* item);
void WraithExplosionEffect(ITEM_INFO* item, byte r, byte g, byte b, int speed);
namespace TEN::Entities::TR4
{
void InitialiseWraith(short itemNumber);
void WraithControl(short itemNumber);
void WraithWallsEffect(int x, int y, int z, short yrot, short objNumber);
void DrawWraith(int x, int y, int z, short xVel, short yVel, short zVel, int objNumber);
void KillWraith(ITEM_INFO* item);
void WraithExplosionEffect(ITEM_INFO* item, byte r, byte g, byte b, int speed);
}

View file

@ -4,12 +4,14 @@
#include "lara.h"
#include "animation.h"
#include "effects/effects.h"
#include "effects/flmtorch.h"
#include "control/box.h"
#include "setup.h"
#include "level.h"
#include "itemdata/creature_info.h"
#include "control/control.h"
#include "Objects/Generic/Object/burning_torch.h"
using namespace TEN::Entities::Generic;
#define STATE_IMP_WALK 0
#define STATE_IMP_STOP 1

View file

@ -36,7 +36,6 @@
#include "tr5_bodypart.h"
#include "tr5_teleporter.h"
#include "tr5_highobject.h"
#include "tr4_bubbles.h"
#include "tr5_missile.h"
#include "tr5_genslot.h"
/// traps
@ -58,7 +57,6 @@
#include "lara_flare.h"
#include "lara_initialise.h"
#include "pickup.h"
#include "effects\flmtorch.h"
#include "setup.h"
#include "switch.h"
#include "objects.h"
@ -882,7 +880,6 @@ static void StartBaddy(OBJECT_INFO *obj)
static void StartObject(OBJECT_INFO *obj)
{
InitPickupItem(obj, FlareControl, ID_FLARE_ITEM);
InitPickupItem(obj, TorchControl, ID_BURNING_TORCH_ITEM, true);
for (int objNumber = ID_SEARCH_OBJECT1; objNumber <= ID_SEARCH_OBJECT4; objNumber++)
InitSearchObject(obj, objNumber);
@ -1209,7 +1206,6 @@ static void StartShatter(OBJECT_INFO *obj)
static void StartProjectiles(OBJECT_INFO *obj)
{
InitProjectile(obj, TEN::entities::all::ControlEnemyMissile, ID_ENERGY_BUBBLES, true);
InitProjectile(obj, MissileControl, ID_BUBBLES, true);
InitProjectile(obj, MissileControl, ID_IMP_ROCK, true);
InitProjectile(obj, TorpedoControl, ID_TORPEDO);

View file

@ -100,7 +100,7 @@ enum GAME_OBJECT_ID : short
ID_BABOON_SILENT,
ID_LITTLE_BEETLE, // TR4 -
ID_LOCUSTS, // TR4 - OK
ID_SHARK,
ID_SHARK, // DEPRECATED?
ID_HUSKIE,
ID_DOG, // TR4 - OK
ID_BATS_EMITTER,
@ -140,8 +140,8 @@ enum GAME_OBJECT_ID : short
ID_BADDY1, // TR4 - OK
ID_BADDY2, // TR4 - OK
ID_SAS_CAIRO, // TR4 - OK
ID_SAS_DYING,
ID_SAS_CAPTAIN,
ID_SAS_DYING, // DEPRECATED?
ID_SAS_CAPTAIN, // DEPRECATED?
ID_SAS_DRAG_BLOKE, // TR4 - OK
ID_GUIDE,
ID_VON_CROY,
@ -201,8 +201,8 @@ enum GAME_OBJECT_ID : short
ID_SKELETON, // TR4 - OK
ID_MUMMY, // TR4 - OK
ID_ENEMY_JEEP,
ID_HORSE,
ID_HORSEMAN,
ID_HORSE, // TR4 - OK
ID_HORSEMAN, // TR4 - OK
ID_DEMIGOD1,
ID_DEMIGOD2,
ID_DEMIGOD3,
@ -276,19 +276,19 @@ enum GAME_OBJECT_ID : short
ID_MINE, // TR4 - TESTING
ID_SCALES, // TR4 - OK
ID_ROME_HAMMER,
ID_FLAME,
ID_FLAME_EMITTER,
ID_FLAME_EMITTER2,
ID_FLAME_EMITTER3,
ID_FLAME, // TR4 - OK
ID_FLAME_EMITTER, // TR4 - OK
ID_FLAME_EMITTER2, // TR4 - OK
ID_FLAME_EMITTER3, // TR4 - OK
ID_BURNING_ROOTS,
ID_ROPE, // TR4 - OK but needs rendering
ID_FIREROPE,
ID_POLEROPE,
ID_ELECTRICAL_CABLES,
ID_BURNING_FLOOR,
ID_DARTS,
ID_DART_EMITTER,
ID_HOMING_DART_EMITTER,
ID_DARTS, // TR4 - OK but needs rendering
ID_DART_EMITTER, // TR4 - OK
ID_HOMING_DART_EMITTER, // TR4 - OK
ID_FALLING_CEILING,
ID_FALLING_BLOCK, // TR5 - OK
ID_FALLING_BLOCK2,

View file

@ -24,10 +24,10 @@
#include "Objects/Effects/tr4_locusts.h"
#include "control/volume.h"
#include "items.h"
#include <chrono>
#include "Objects/Generic/Object/rope.h"
using namespace TEN::Game::Rope;
using namespace TEN::Entities::Generic;
extern TEN::Renderer::RendererHUDBar *g_DashBar;
extern TEN::Renderer::RendererHUDBar *g_SFXVolumeBar;

View file

@ -28,9 +28,7 @@
#include "fullblock_switch.h"
#include "itemdata/creature_info.h"
#include <Objects/Effects/effect_objects.h>
#include "Game/rope.h"
using namespace TEN::Game::Rope;
using namespace TEN::Entities::Switches;
OBJECT_INFO Objects[ID_NUMBER_OBJECTS];
@ -342,27 +340,6 @@ void TrapObjects()
obj->usingDrawAnimatingItem = false;
}
//FIXME
//InitialiseRopeTrap();
obj = &Objects[ID_ROPE];
if (obj->loaded)
{
obj->initialise = InitialiseRope;
obj->control = RopeControl;
obj->collision = RopeCollision;
obj->drawRoutine = nullptr;
obj->saveFlags = true;
obj->usingDrawAnimatingItem = false;
}
obj = &Objects[ID_POLEROPE];
if (obj->loaded)
{
obj->collision = PoleCollision;
obj->saveFlags = true;
}
obj = &Objects[ID_WRECKING_BALL];
if (obj->loaded)
{

View file

@ -151,6 +151,9 @@ xcopy /Y "$(ProjectDir)Shaders\HUD\*.hlsl" "$(TargetDir)\Shaders\HUD\"</Command>
<ClInclude Include="Game\effects\footprint.h" />
<ClInclude Include="Game\effects\groundfx.h" />
<ClInclude Include="Game\roomvector.h" />
<ClInclude Include="Objects\Generic\Object\burning_torch.h" />
<ClInclude Include="Objects\Generic\Object\polerope.h" />
<ClInclude Include="Objects\Generic\Object\rope.h" />
<ClInclude Include="Objects\Generic\Traps\falling_block.h" />
<ClInclude Include="Objects\Effects\effect_objects.h" />
<ClInclude Include="Objects\Effects\flame_emitters.h" />
@ -262,7 +265,7 @@ xcopy /Y "$(ProjectDir)Shaders\HUD\*.hlsl" "$(TargetDir)\Shaders\HUD\"</Command>
<ClInclude Include="Libs\zlib\zconf.h" />
<ClInclude Include="Libs\zlib\zip.h" />
<ClInclude Include="Libs\zlib\zlib.h" />
<ClInclude Include="Objects\Effects\tr4_bubbles.h" />
<ClInclude Include="Objects\Effects\enemy_missile.h" />
<ClInclude Include="Objects\Effects\tr4_locusts.h" />
<ClInclude Include="Objects\Effects\tr5_electricity.h" />
<ClInclude Include="Objects\TR1\Entity\tr1_bigrat.h" />
@ -480,7 +483,6 @@ xcopy /Y "$(ProjectDir)Shaders\HUD\*.hlsl" "$(TargetDir)\Shaders\HUD\"</Command>
<ClInclude Include="Game\animation.h" />
<ClInclude Include="Game\effects\effects.h" />
<ClInclude Include="Game\flipeffect.h" />
<ClInclude Include="Game\effects\flmtorch.h" />
<ClInclude Include="Game\gameflow.h" />
<ClInclude Include="Game\effects\hair.h" />
<ClInclude Include="Game\health.h" />
@ -499,7 +501,6 @@ xcopy /Y "$(ProjectDir)Shaders\HUD\*.hlsl" "$(TargetDir)\Shaders\HUD\"</Command>
<ClInclude Include="Game\objects.h" />
<ClInclude Include="Game\people.h" />
<ClInclude Include="Game\pickup\pickup.h" />
<ClInclude Include="Game\rope.h" />
<ClInclude Include="Game\savegame.h" />
<ClInclude Include="Sound\sound.h" />
<ClInclude Include="Game\sphere.h" />
@ -564,6 +565,9 @@ xcopy /Y "$(ProjectDir)Shaders\HUD\*.hlsl" "$(TargetDir)\Shaders\HUD\"</Command>
<ClCompile Include="Game\pickup\pickup_misc_items.cpp" />
<ClCompile Include="Game\pickup\pickup_weapon.cpp" />
<ClCompile Include="Game\room.cpp" />
<ClCompile Include="Objects\Generic\Object\burning_torch.cpp" />
<ClCompile Include="Objects\Generic\Object\polerope.cpp" />
<ClCompile Include="Objects\Generic\Object\rope.cpp" />
<ClCompile Include="Objects\Generic\Traps\falling_block.cpp" />
<ClCompile Include="Objects\Effects\effect_objects.cpp" />
<ClCompile Include="Objects\Effects\flame_emitters.cpp" />
@ -785,7 +789,6 @@ xcopy /Y "$(ProjectDir)Shaders\HUD\*.hlsl" "$(TargetDir)\Shaders\HUD\"</Command>
<ClCompile Include="Game\animation.cpp" />
<ClCompile Include="Game\effects\effects.cpp" />
<ClCompile Include="Game\flipeffect.cpp" />
<ClCompile Include="Game\effects\flmtorch.cpp" />
<ClCompile Include="Game\gameflow.cpp" />
<ClCompile Include="Game\effects\hair.cpp" />
<ClCompile Include="Game\health.cpp" />
@ -803,7 +806,6 @@ xcopy /Y "$(ProjectDir)Shaders\HUD\*.hlsl" "$(TargetDir)\Shaders\HUD\"</Command>
<ClCompile Include="Game\objects.cpp" />
<ClCompile Include="Game\people.cpp" />
<ClCompile Include="Game\pickup\pickup.cpp" />
<ClCompile Include="Game\rope.cpp" />
<ClCompile Include="Game\savegame.cpp" />
<ClCompile Include="Sound\sound.cpp" />
<ClCompile Include="Game\sphere.cpp" />
@ -853,7 +855,7 @@ xcopy /Y "$(ProjectDir)Shaders\HUD\*.hlsl" "$(TargetDir)\Shaders\HUD\"</Command>
<ClCompile Include="Scripting\ScriptAssert.cpp" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="Objects\Effects\tr4_bubbles.cpp" />
<ClCompile Include="Objects\Effects\enemy_missile.cpp" />
<None Include="Objects\Generic\Switches\rail_switch.h" />
<None Include="packages.config" />
<None Include="Resources.aps" />

View file

@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<ClCompile Include="framework.cpp" />
@ -244,7 +245,6 @@
<ClCompile Include="Game\animation.cpp" />
<ClCompile Include="Game\effects\effects.cpp" />
<ClCompile Include="Game\flipeffect.cpp" />
<ClCompile Include="Game\effects\flmtorch.cpp" />
<ClCompile Include="Game\gameflow.cpp" />
<ClCompile Include="Game\effects\hair.cpp" />
<ClCompile Include="Game\health.cpp" />
@ -262,7 +262,6 @@
<ClCompile Include="Game\objects.cpp" />
<ClCompile Include="Game\people.cpp" />
<ClCompile Include="Game\pickup\pickup.cpp" />
<ClCompile Include="Game\rope.cpp" />
<ClCompile Include="Game\savegame.cpp" />
<ClCompile Include="Sound\sound.cpp" />
<ClCompile Include="Game\sphere.cpp" />
@ -310,12 +309,15 @@
<ClCompile Include="Scripting\GameLogicScript.cpp" />
<ClCompile Include="Scripting\LuaHandler.cpp" />
<ClCompile Include="Scripting\ScriptAssert.cpp" />
<ClCompile Include="Objects\Effects\tr4_bubbles.cpp" />
<ClCompile Include="Objects\Effects\enemy_missile.cpp" />
<ClCompile Include="Objects\Effects\flame_emitters.cpp" />
<ClCompile Include="Objects\Effects\effect_objects.cpp" />
<ClCompile Include="Game\effects\lara_burn.cpp" />
<ClCompile Include="Objects\Generic\Traps\dart_emitter.cpp" />
<ClCompile Include="Objects\Generic\Traps\falling_block.cpp" />
<ClCompile Include="Objects\Generic\Object\polerope.cpp" />
<ClCompile Include="Objects\Generic\Object\rope.cpp" />
<ClCompile Include="Objects\Generic\Object\burning_torch.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="framework.h" />
@ -440,7 +442,7 @@
<ClInclude Include="Libs\zlib\zconf.h" />
<ClInclude Include="Libs\zlib\zip.h" />
<ClInclude Include="Libs\zlib\zlib.h" />
<ClInclude Include="Objects\Effects\tr4_bubbles.h" />
<ClInclude Include="Objects\Effects\enemy_missile.h" />
<ClInclude Include="Objects\Effects\tr4_locusts.h" />
<ClInclude Include="Objects\Effects\tr5_electricity.h" />
<ClInclude Include="Objects\TR1\Entity\tr1_bigrat.h" />
@ -658,7 +660,6 @@
<ClInclude Include="Game\animation.h" />
<ClInclude Include="Game\effects\effects.h" />
<ClInclude Include="Game\flipeffect.h" />
<ClInclude Include="Game\effects\flmtorch.h" />
<ClInclude Include="Game\gameflow.h" />
<ClInclude Include="Game\effects\hair.h" />
<ClInclude Include="Game\health.h" />
@ -677,7 +678,6 @@
<ClInclude Include="Game\objects.h" />
<ClInclude Include="Game\people.h" />
<ClInclude Include="Game\pickup\pickup.h" />
<ClInclude Include="Game\rope.h" />
<ClInclude Include="Game\savegame.h" />
<ClInclude Include="Sound\sound.h" />
<ClInclude Include="Game\sphere.h" />
@ -710,6 +710,9 @@
<ClInclude Include="Objects\Generic\Traps\falling_block.h" />
<ClInclude Include="Specific\savegame\flatbuffers\ten_itemdata_generated.h" />
<ClInclude Include="Specific\savegame\flatbuffers\ten_savegame_generated.h" />
<ClInclude Include="Objects\Generic\Object\polerope.h" />
<ClInclude Include="Objects\Generic\Object\rope.h" />
<ClInclude Include="Objects\Generic\Object\burning_torch.h" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="Resources.rc" />