diff --git a/TR5Main/Game/control.cpp b/TR5Main/Game/control.cpp index 8fe1cfe14..fc7302575 100644 --- a/TR5Main/Game/control.cpp +++ b/TR5Main/Game/control.cpp @@ -3,7 +3,6 @@ #include "..\Global\global.h" #include "pickup.h" -#include "spotcam.h" #include "Camera.h" #include "Lara.h" #include "hair.h" @@ -65,6 +64,7 @@ short NextFxFree; short NextItemActive; short NextItemFree; short* TriggerIndex; +int DisableLaraControl = 0; extern GameFlow* g_GameFlow; extern GameScript* g_GameScript; @@ -3263,6 +3263,74 @@ void InterpolateAngle(short angle, short* rotation, short* outAngle, int shift) *rotation += deltaAngle >> shift; } +#define OutsideRoomTable VAR_U_(0x00EEF4AC, unsigned char*) +#define OutsideRoomOffsets ARRAY_(0x00EEF040, short, [27 * 27]) + +int IsRoomOutside(int x, int y, int z) +{ + short offset = OutsideRoomOffsets[((x >> 12) * 27) + (z >> 12)]; + if (offset == -1) + return -2; + + if (offset < 0) + { + ROOM_INFO* r = &Rooms[(offset & 0x7FFF)]; + + if ((y > r->maxceiling) && (y < r->minfloor) + && ((z > (r->z + 1024)) && (z < (r->z + ((r->xSize - 1) * 1024)))) + && ((x > (r->x + 1024)) && (x < (r->x + ((r->ySize - 1) * 1024))))) + { + short roomNumber = offset & 0x7fff; + FLOOR_INFO* floor = GetFloor(x, y, z, &roomNumber); + int height = GetFloorHeight(floor, x, y, z); + if (height == NO_HEIGHT || y > height) + return -2; + height = GetCeiling(floor, x, y, z); + if (y < height) + return -2; + + if (!(r->flags & (ENV_FLAG_WIND | ENV_FLAG_WATER))) + return -3; + + IsRoomOutsideNo = offset & 0x7FFF; + return 1; + } + else + return -2; + } + else + { + unsigned char* s = &OutsideRoomTable[offset]; + + while (*s != 0xFF) + { + ROOM_INFO* r = &Rooms[*s]; + + if ((y > r->maxceiling && y < r->minfloor) + && ((z > (r->z + 1024)) && (z < (r->z + ((r->xSize - 1) * 1024)))) + && ((x > (r->x + 1024)) && (x < (r->x + ((r->ySize - 1) * 1024))))) + { + short roomNumber = *s; + FLOOR_INFO* floor = GetFloor(x, y, z, &roomNumber); + int height = GetFloorHeight(floor, x, y, z); + if (height == NO_HEIGHT || y > height) + return -2; + height = GetCeiling(floor, x, y, z); + if (y < height) + return -2; + + if (!(r->flags & (ENV_FLAG_WIND | ENV_FLAG_WATER))) + return -3; + + IsRoomOutsideNo = *s; + return 1; + } + s++; + } + return -2; + } +} + void Inject_Control() { INJECT(0x00416760, TestTriggers); diff --git a/TR5Main/Game/control.h b/TR5Main/Game/control.h index 5b067b9a7..f1a09f291 100644 --- a/TR5Main/Game/control.h +++ b/TR5Main/Game/control.h @@ -19,6 +19,7 @@ extern short NextFxFree; extern short NextItemActive; extern short NextItemFree; extern short* TriggerIndex; +extern int DisableLaraControl; GAME_STATUS DoTitle(int index); GAME_STATUS DoLevel(int index, int ambient, bool loadFromSavegame); @@ -63,6 +64,7 @@ int TriggerActive(ITEM_INFO* item); int GetWaterHeight(int x, int y, int z, short roomNumber); int is_object_in_room(short roomNumber, short objectNumber); void InterpolateAngle(short angle, short* rotation, short* outAngle, int shift); +int IsRoomOutside(int x, int y, int z); unsigned __stdcall GameMain(void*); void Inject_Control(); diff --git a/TR5Main/Game/draw.cpp b/TR5Main/Game/draw.cpp index 76a6f5c3e..00504f095 100644 --- a/TR5Main/Game/draw.cpp +++ b/TR5Main/Game/draw.cpp @@ -569,44 +569,62 @@ void phd_RotYXZpack(int rots) } } -void _gar_RotYXZsuperpack(short** pproc, int skip) +void gar_RotYXZsuperpack(short** pprot, int skip) { + unsigned short* prot; + int packed; + + while (skip) + { + prot = reinterpret_cast(*pprot); + if (*prot & (3 << 14)) + (*pprot) += 1; + else + (*pprot) += 2; + skip--; + } + + prot = reinterpret_cast(*pprot); + switch (*prot >> 14) + { + case 0: + packed = (*prot << 16) + *(prot + 1); + phd_RotYXZpack(packed); + (*pprot) += 2; + return; + case 1: + phd_RotX((short)((*prot & 1023) << 4)); + break; + case 2: + phd_RotY((short)((*prot & 1023) << 4)); + break; + default: + phd_RotZ((short)((*prot & 1023) << 4)); + break; + } + + (*pprot) += 1; } -void _gar_RotYXZsuperpack_I(short** pproc1, short** pproc2, int skip) +void gar_RotYXZsuperpack_I(short** framePtr1, short** framePtr2, int skip) { + gar_RotYXZsuperpack(framePtr1, skip); + + int* mptr = MatrixPtr; + int* dxptr = DxMatrixPtr; + + MatrixPtr = IMptr; + DxMatrixPtr = DxIMptr; + + gar_RotYXZsuperpack(framePtr2, skip); + + MatrixPtr = mptr; + DxMatrixPtr = dxptr; } void _phd_ClipBoundingBox(short* frames) { -} -void _phd_DxTranslateRel(int x, int y, int z) -{ -} - -void _phd_DxTranslateAbs(int x, int y, int z) -{ -} - -void _phd_DxRotY(short ry) -{ -} - -void _phd_DxRotX(short rx) -{ -} - -void _phd_DxRotZ(short rz) -{ -} - -void _phd_DxRotYXZ(short ry, short rx, short rz) -{ -} - -void _phd_DxRotYXZpack(int rangle) -{ } void Inject_Draw() @@ -633,4 +651,6 @@ void Inject_Draw() INJECT(0x0048FA90, phd_PushUnitMatrix); INJECT(0x004904B0, phd_GetVectorAngles); INJECT(0x0048FEB0, phd_RotYXZpack); + /*INJECT(0x0042C310, gar_RotYXZsuperpack); + INJECT(0x0042C290, gar_RotYXZsuperpack_I);*/ } \ No newline at end of file diff --git a/TR5Main/Game/draw.h b/TR5Main/Game/draw.h index 483bd7204..530a02d6c 100644 --- a/TR5Main/Game/draw.h +++ b/TR5Main/Game/draw.h @@ -3,39 +3,14 @@ #include "..\Global\global.h" #define CalcLaraMatrices ((void (__cdecl*)(int)) 0x0041E120) -#define IsRoomOutside ((int (__cdecl*)(int, int, int)) 0x00418E90) +//#define IsRoomOutside ((int (__cdecl*)(int, int, int)) 0x00418E90) #define sub_42B4C0 ((void (__cdecl*)(ITEM_INFO*,short*)) 0x0042B4C0) - -#define gar_RotYXZsuperpack ((void(__cdecl*)(short**,int)) 0x0042C310) -#define gar_RotYXZsuperpack_I ((void(__cdecl*)(short**,short**,int)) 0x0042C290) #define phd_RotBoundingBoxNoPersp ((void (__cdecl*)(short*, short*)) 0x0042E240) - -//#define InitInterpolate ((void(__cdecl*)(int,int)) 0x0042BE90) -//#define Sync ((int (__cdecl*)()) 0x004D1A40) -//#define GetBoundsAccurate ((short* (__cdecl*)(ITEM_INFO*)) 0x0042CF80) -//#define GetBestFrame ((short* (__cdecl*)(ITEM_INFO*)) 0x0042D020) -//#define phd_PushMatrix ((void(__cdecl*)(void)) 0x0048F9C0) -//#define phd_RotYXZ ((void(__cdecl*)(short, short, short)) 0x00490150) -//#define phd_TranslateRel ((void(__cdecl*)(int, int, int)) 0x0048FB20) -//#define phd_TranslateRel_I ((void(__cdecl*)(int, int, int)) 0x0042C110) -//#define phd_TranslateRel_ID ((void(__cdecl*)(int,int,int,int,int,int)) 0x0042C190) -//#define phd_TranslateAbs ((void(__cdecl*)(int, int, int)) 0x004903F0) -//#define phd_PopMatrix_I ((void(__cdecl*)(void)) 0x0042BF00) -//#define phd_RotY ((void(__cdecl*)(short)) 0x0048FCD0) -//#define phd_RotX ((void(__cdecl*)(short)) 0x0048FBE0) -//#define phd_RotZ ((void(__cdecl*)(short)) 0x0048FDC0) -//#define phd_RotY_I ((void(__cdecl*)(short)) 0x0042BFC0) -//#define phd_RotX_I ((void(__cdecl*)(short)) 0x0042C030) -//#define phd_RotZ_I ((void(__cdecl*)(short)) 0x0042C0A0) -//#define phd_SetTrans ((void (__cdecl*)(int, int, int)) 0x0048FA40) -//#define phd_PushMatrix_I ((void(__cdecl*)(void)) 0x0042BF50) -//#define phd_PushUnitMatrix ((void (__cdecl*)()) 0x0048FA90) -//#define phd_GetVectorAngles ((void(__cdecl*)(int, int, int, short*)) 0x004904B0) -//#define phd_RotYXZpack ((void(__cdecl*)(int)) 0x0048FEB0) - #define mGetAngle ((int(__cdecl*)(int, int, int, int)) 0x0048F290) #define phd_GenerateW2V ((void(__cdecl*)(PHD_3DPOS*)) 0x0048F330) +extern Renderer11* g_Renderer; +extern BITE_INFO EnemyBites[9]; extern int LightningCount; extern int LightningRand; extern int StormTimer; @@ -52,7 +27,6 @@ int Sync(); bool TIME_Init(); bool TIME_Reset(); void DrawAnimatingItem(ITEM_INFO* item); - void phd_PushMatrix(); void InitInterpolate(int frac, int rate); void phd_PopMatrix(); @@ -73,14 +47,7 @@ void phd_PushMatrix_I(); void phd_PushUnitMatrix(); void phd_GetVectorAngles(int x, int y, int z, short* angles); void phd_RotYXZpack(int rots); - -/* phd function (DX11 version) */ -// TODO: phd_XX function after this lign is used with DX11 one, when it's finished, delete the #define one and delete this sign: "_" at the beginning of the new function. (delete the unused if needed) - -void _gar_RotYXZsuperpack(short** pproc, int skip); -void _gar_RotYXZsuperpack_I(short** pproc1, short** pproc2, int skip); - -extern Renderer11* g_Renderer; -extern BITE_INFO EnemyBites[9]; +void gar_RotYXZsuperpack(short** framePtr, int skip); +void gar_RotYXZsuperpack_I(short** framePtr1, short** framePtr2, int skip); void Inject_Draw(); \ No newline at end of file diff --git a/TR5Main/Game/effects.cpp b/TR5Main/Game/effects.cpp index fb02e73a3..547ca513a 100644 --- a/TR5Main/Game/effects.cpp +++ b/TR5Main/Game/effects.cpp @@ -503,6 +503,17 @@ void Richochet(PHD_3DPOS* pos) SoundEffect(SFX_LARA_RICOCHET, pos, 0); } +void DoLotsOfBlood(int x, int y, int z, int speed, short direction, short roomNumber, int count) +{ + for (int i = 0; i < count; i++) + { + DoBloodSplat(x + 256 - (GetRandomControl() * 512 / 0x8000), + y + 256 - (GetRandomControl() * 512 / 0x8000), + z + 256 - (GetRandomControl() * 512 / 0x8000), + speed, direction, roomNumber); + } +} + void Inject_Effects() { INJECT(0x00432580, ItemNearLara); diff --git a/TR5Main/Game/effects.h b/TR5Main/Game/effects.h index fa74e91a0..1dd50b3c5 100644 --- a/TR5Main/Game/effects.h +++ b/TR5Main/Game/effects.h @@ -3,7 +3,7 @@ #include "..\Global\global.h" #include "control.h" -#define DoLotsOfBlood ((void (__cdecl*)(int, int, int, short, short, short, int)) 0x00432800) +//#define DoLotsOfBlood ((void (__cdecl*)(int, int, int, short, short, short, int)) 0x00432800) #define SoundEffects ((void (__cdecl*)()) 0x00432640) int ItemNearLara(PHD_3DPOS* pos, int radius); @@ -47,6 +47,7 @@ void TL_10(ITEM_INFO* item); void TL_11(ITEM_INFO* item); void TL_12(ITEM_INFO* item); void Richochet(PHD_3DPOS* pos); +void DoLotsOfBlood(int x, int y, int z, int speed, short direction, short roomNumber, int count); void Inject_Effects(); diff --git a/TR5Main/Game/hair.cpp b/TR5Main/Game/hair.cpp index 56aa80e07..48db01b9c 100644 --- a/TR5Main/Game/hair.cpp +++ b/TR5Main/Game/hair.cpp @@ -105,7 +105,7 @@ void HairControl(int cutscene, int ponytail, short* framePtr) int* bone = Bones + object->boneIndex; phd_TranslateRel((int) * (frame + 6), (int) * (frame + 7), (int) * (frame + 8)); - gar_RotYXZsuperpack(&rotation, 0); + Legacy_gar_RotYXZsuperpack(&rotation, 0); // Hips phd_PushMatrix(); @@ -119,7 +119,7 @@ void HairControl(int cutscene, int ponytail, short* framePtr) phd_TranslateRel(*(bone + 1 + 24), *(bone + 2 + 24), *(bone + 3 + 24)); - gar_RotYXZsuperpack(&rotation, 6); + Legacy_gar_RotYXZsuperpack(&rotation, 6); phd_RotYXZ(Lara.torsoYrot, Lara.torsoXrot, Lara.torsoZrot); // Torso @@ -136,7 +136,7 @@ void HairControl(int cutscene, int ponytail, short* framePtr) phd_PushMatrix(); phd_TranslateRel(*(bone + 1 + 28), *(bone + 2 + 28), *(bone + 3 + 28)); - gar_RotYXZsuperpack(&rotation, 0); + Legacy_gar_RotYXZsuperpack(&rotation, 0); // Right arm objptr = Lara.meshPtrs[LM_RINARM]; @@ -149,7 +149,7 @@ void HairControl(int cutscene, int ponytail, short* framePtr) phd_PushMatrix(); phd_TranslateRel(*(bone + 1 + 40), *(bone + 2 + 40), *(bone + 3 + 40)); - gar_RotYXZsuperpack(&rotation, 2); + Legacy_gar_RotYXZsuperpack(&rotation, 2); // Left arm objptr = Lara.meshPtrs[LM_LINARM]; @@ -161,7 +161,7 @@ void HairControl(int cutscene, int ponytail, short* framePtr) phd_PopMatrix(); phd_TranslateRel(*(bone + 1 + 52), *(bone + 2 + 52), *(bone + 3 + 52)); - gar_RotYXZsuperpack(&rotation, 2); + Legacy_gar_RotYXZsuperpack(&rotation, 2); phd_RotYXZ(Lara.headYrot, Lara.headXrot, Lara.headZrot); // Head diff --git a/TR5Main/Game/inventory.cpp b/TR5Main/Game/inventory.cpp index 32057d026..ecbcea366 100644 --- a/TR5Main/Game/inventory.cpp +++ b/TR5Main/Game/inventory.cpp @@ -8,6 +8,7 @@ #include "savegame.h" #include "Lara.h" #include "camera.h" +#include "spotcam.h" #include "..\Global\global.h" #include "..\Specific\input.h" #include "..\Specific\configuration.h" diff --git a/TR5Main/Game/objects.cpp b/TR5Main/Game/objects.cpp index 4432743f7..992f28f67 100644 --- a/TR5Main/Game/objects.cpp +++ b/TR5Main/Game/objects.cpp @@ -645,6 +645,94 @@ void InitialiseTightRope(short itemNumber) } } +void InitialiseAnimating(short itemNumber) +{ + ITEM_INFO* item = &Items[itemNumber]; + item->currentAnimState = 0; + item->animNumber = Objects[item->objectNumber].animIndex; + item->frameNumber = Anims[item->animNumber].frameBase; +} + +void AnimatingControl(short itemNumber) +{ + ITEM_INFO* item = &Items[itemNumber]; + + if (!TriggerActive(item)) + return; + + item->status = ITEM_ACTIVE; + + AnimateItem(item); + + if (item->frameNumber >= Anims[item->animNumber].frameEnd) + { + item->frameNumber = Anims[item->animNumber].frameBase; + RemoveActiveItem(itemNumber); + item->aiBits = 0; + item->status = ITEM_INACTIVE; + } +} + +void HighObject2Control(short itemNumber) +{ + ITEM_INFO* item = &Items[itemNumber]; + + if (!TriggerActive(item)) + return; + + + if (!item->itemFlags[2]) + { + int div = item->triggerFlags % 10 << 10; + int mod = item->triggerFlags / 10 << 10; + item->itemFlags[0] = GetRandomControl() % div; + item->itemFlags[1] = GetRandomControl() % mod; + item->itemFlags[2] = (GetRandomControl() & 0xF) + 15; + } + + if (--item->itemFlags[2] < 15) + { + SPARKS* spark = &Sparks[GetFreeSpark()]; + spark->on = 1; + spark->sR = -1; + spark->sB = 16; + spark->sG = (GetRandomControl() & 0x1F) + 48; + spark->dR = (GetRandomControl() & 0x3F) - 64; + spark->dB = 0; + spark->dG = (GetRandomControl() & 0x3F) + -128; + spark->fadeToBlack = 4; + spark->colFadeSpeed = (GetRandomControl() & 3) + 4; + spark->transType = COLADD; + spark->life = spark->sLife = (GetRandomControl() & 3) + 24; + spark->x = item->itemFlags[1] + (GetRandomControl() & 0x3F) + item->pos.xPos - 544; + spark->y = item->pos.yPos; + spark->z = item->itemFlags[0] + (GetRandomControl() & 0x3F) + item->pos.zPos - 544; + spark->xVel = (GetRandomControl() & 0x1FF) - 256; + spark->friction = 6; + spark->zVel = (GetRandomControl() & 0x1FF) - 256; + spark->rotAng = GetRandomControl() & 0xFFF; + spark->rotAdd = (GetRandomControl() & 0x3F) - 32; + spark->maxYvel = 0; + spark->yVel = -512 - (GetRandomControl() & 0x3FF); + spark->sSize = spark->size = (GetRandomControl() & 0xF) + 32; + spark->dSize = spark->size >> 2; + + if (GetRandomControl() & 3) + { + spark->flags = SP_ROTATE | SP_DEF | SP_SCALE | SP_EXPDEF; + spark->scalar = 3; + spark->gravity = (GetRandomControl() & 0x3F) + 32; + } + else + { + spark->flags = SP_ROTATE | SP_DEF | SP_SCALE; + spark->def = Objects[ID_DEFAULT_SPRITES].meshIndex + SPR_UNDERWATERDUST; + spark->scalar = 1; + spark->gravity = (GetRandomControl() & 0xF) + 64; + } + } +} + void Inject_Objects() { INJECT(0x00465FE0, TightRopeCollision); diff --git a/TR5Main/Game/objects.h b/TR5Main/Game/objects.h index 5d1aff463..bace7a7a1 100644 --- a/TR5Main/Game/objects.h +++ b/TR5Main/Game/objects.h @@ -1,10 +1,6 @@ #pragma once #include "..\Global\global.h" -#define InitialiseAnimating ((void (__cdecl*)(short)) 0x00440100) -#define AnimatingControl ((void (__cdecl*)(short)) 0x00465590) - -//#define InitialiseSmashObject ((void (__cdecl*)(short)) 0x0043D7F0) void SmashObject(short itemNumber); void SmashObjectControl(short itemNumber); void BridgeFlatFloor(ITEM_INFO* item, int x, int y, int z, int* height); @@ -19,19 +15,15 @@ void PoleCollision(short itemNum, ITEM_INFO* l, COLL_INFO* coll); void ControlTriggerTriggerer(short itemNumber); void AnimateWaterfalls(); void ControlWaterfall(short itemNumber); -//#define InitialiseTightRope ((void (__cdecl*)(short)) 0x0043ED30) void TightRopeCollision(short itemNum, ITEM_INFO* l, COLL_INFO* coll); void ParallelBarsCollision(short itemNum, ITEM_INFO* l, COLL_INFO* coll); -#define InitialiseXRayMachine ((void (__cdecl*)(short)) 0x0043FA20) void ControlXRayMachine(short itemNumber); void CutsceneRopeControl(short itemNumber); void HybridCollision(short itemNum, ITEM_INFO* laraitem, COLL_INFO* coll); -//#define InitialiseRaisingBlock ((void (__cdecl*)(short)) 0x0043D730) -//#define RaisingBlockControl ((void (__cdecl*)(short)) 0x0048C3D0) -//#define InitialiseRaisingCog ((void (__cdecl*)(short)) 0x00440320) -//#define RaisingCogControl ((void (__cdecl*)(short)) 0x00406040) -#define HighObject2Control ((void (__cdecl*)(short)) 0x004070D0) void InitialiseSmashObject(short itemNumber); void InitialiseTightRope(short itemNumber); +void InitialiseAnimating(short itemNumber); +void AnimatingControl(short itemNumber); +void HighObject2Control(short itemNumber); void Inject_Objects(); \ No newline at end of file diff --git a/TR5Main/Game/pickup.h b/TR5Main/Game/pickup.h index 5b1d633b5..10d4e5fc2 100644 --- a/TR5Main/Game/pickup.h +++ b/TR5Main/Game/pickup.h @@ -2,10 +2,6 @@ #include "..\Global\global.h" -//#define PickupCollision ((void (__cdecl*)(short, ITEM_INFO*, COLL_INFO*)) 0x00467C00) -//#define InitialisePickup ((void (__cdecl*)(short)) 0x0043E260) -//#define PickupControl ((void (__cdecl*)(short)) 0x004679D0) - void InitialisePickup(short itemNumber); void PickedUpObject(short objectNumber); void RemoveObjectFromInventory(short objectNumber, int count); diff --git a/TR5Main/Game/rat.cpp b/TR5Main/Game/rat.cpp deleted file mode 100644 index 5065ae2b0..000000000 --- a/TR5Main/Game/rat.cpp +++ /dev/null @@ -1 +0,0 @@ -#include "rat.h" \ No newline at end of file diff --git a/TR5Main/Game/rat.h b/TR5Main/Game/rat.h deleted file mode 100644 index c45d1d232..000000000 --- a/TR5Main/Game/rat.h +++ /dev/null @@ -1,6 +0,0 @@ -#pragma once - -#include "..\Global\global.h" - -//#define InitialiseLittleRats ((void (__cdecl*)(short)) 0x0046B220) -//#define ControlLittleRats ((void (__cdecl*)(short)) 0x0046AB30) \ No newline at end of file diff --git a/TR5Main/Game/rope.h b/TR5Main/Game/rope.h index e871852b5..9ca16bec3 100644 --- a/TR5Main/Game/rope.h +++ b/TR5Main/Game/rope.h @@ -25,8 +25,6 @@ struct PENDULUM extern PENDULUM CurrentPendulum; -#define CalculateRopePoints ((void (__cdecl*)(ROPE_STRUCT*)) 0x0046EC70) - void InitialiseRope(short itemNumber); void PrepareRope(ROPE_STRUCT* rope, PHD_VECTOR* pos1, PHD_VECTOR* pos2, int length, ITEM_INFO* item); PHD_VECTOR* NormaliseRopeVector(PHD_VECTOR* vec); diff --git a/TR5Main/Game/savegame.h b/TR5Main/Game/savegame.h index 5449eb630..72a874172 100644 --- a/TR5Main/Game/savegame.h +++ b/TR5Main/Game/savegame.h @@ -7,12 +7,7 @@ #include "..\Specific\IO\LEB128.h" #include "..\Specific\IO\Streams.h" #include "..\Scripting\GameFlowScript.h" -#include "..\Scripting\GameLogicScript.h" - -#define RestoreGame ((int (__cdecl*)()) 0x00472060) -#define ReadSavegame ((int (__cdecl*)(int)) 0x004A8E10) -#define CreateSavegame ((void (__cdecl*)()) 0x00470FA0) -#define WriteSavegame ((int (__cdecl*)(int)) 0x004A8BC0) +#include "..\Scripting\GameLogicScript.h" #define SAVEGAME_BUFFER_SIZE 1048576 diff --git a/TR5Main/Game/sphere.cpp b/TR5Main/Game/sphere.cpp index 4b50f1073..ad0cbb91a 100644 --- a/TR5Main/Game/sphere.cpp +++ b/TR5Main/Game/sphere.cpp @@ -42,7 +42,7 @@ int GetSpheres(ITEM_INFO* item, SPHERE* ptr, char worldSpace) short* frame = GetBestFrame(item); phd_TranslateRel(frame[6], frame[7], frame[8]); short* rotation = frame + 9; - gar_RotYXZsuperpack(&rotation, 0); + Legacy_gar_RotYXZsuperpack(&rotation, 0); OBJECT_INFO* obj = &Objects[item->objectNumber]; short** meshPtr = &Meshes[obj->meshIndex]; @@ -74,7 +74,7 @@ int GetSpheres(ITEM_INFO* item, SPHERE* ptr, char worldSpace) phd_PushMatrix(); phd_TranslateRel(*(bone), *(bone + 1), *(bone + 2)); - gar_RotYXZsuperpack(&rotation, 0); + Legacy_gar_RotYXZsuperpack(&rotation, 0); if ((poppush & (ROT_X | ROT_Y | ROT_Z)) && extraRotation) { @@ -216,7 +216,7 @@ void GetJointAbsPosition(ITEM_INFO* item, PHD_VECTOR* vec, int joint) { phd_TranslateRel((int) * (frmptr[0] + 6), (int) * (frmptr[0] + 7), (int) * (frmptr[0] + 8)); short* rotation1 = frmptr[0] + 9; - gar_RotYXZsuperpack(&rotation1, 0); + Legacy_gar_RotYXZsuperpack(&rotation1, 0); for (int i = 0; i < joint; i++, bone += 4) { @@ -229,7 +229,7 @@ void GetJointAbsPosition(ITEM_INFO* item, PHD_VECTOR* vec, int joint) phd_PushMatrix(); phd_TranslateRel(bone[1], bone[2], bone[3]); - gar_RotYXZsuperpack(&rotation1, 0); + Legacy_gar_RotYXZsuperpack(&rotation1, 0); if (poppush & (ROT_X | ROT_Y | ROT_Z)) { @@ -257,7 +257,7 @@ void GetJointAbsPosition(ITEM_INFO* item, PHD_VECTOR* vec, int joint) short* rotation2 = frmptr[1] + 9; phd_TranslateRel_ID((int) * (frmptr[0] + 6), (int) * (frmptr[0] + 7), (int) * (frmptr[0] + 8), (int) * (frmptr[1] + 6), (int) * (frmptr[1] + 7), (int) * (frmptr[1] + 8)); - gar_RotYXZsuperpack_I(&rotation1, &rotation2, 0); + Legacy_gar_RotYXZsuperpack_I(&rotation1, &rotation2, 0); for (int i = 0; i < joint; i++, bone += 4) { @@ -269,7 +269,7 @@ void GetJointAbsPosition(ITEM_INFO* item, PHD_VECTOR* vec, int joint) phd_PushMatrix_I(); phd_TranslateRel_I(bone[1], bone[2], bone[3]); - gar_RotYXZsuperpack_I(&rotation1, &rotation2, 0); + Legacy_gar_RotYXZsuperpack_I(&rotation1, &rotation2, 0); if (poppush & (ROT_X | ROT_Y | ROT_Z)) { diff --git a/TR5Main/Game/sphere.h b/TR5Main/Game/sphere.h index 23ca7c4dc..c99652e3d 100644 --- a/TR5Main/Game/sphere.h +++ b/TR5Main/Game/sphere.h @@ -2,10 +2,6 @@ #include "..\Global\global.h" -//#define TestCollision ((int (__cdecl*)(ITEM_INFO*, ITEM_INFO*)) 0x00479170) -//#define GetJointAbsPosition ((int (__cdecl*)(ITEM_INFO*, PHD_VECTOR*, int)) 0x00479780) -//#define GetSpheres ((int (__cdecl*)(ITEM_INFO*, SPHERE*, int)) 0x00479380) - #define InterpolateMatrix ((int (__cdecl*)()) 0x0042C8F0) #define InitInterpolate2 ((int (__cdecl*)(int, int)) 0x00479BB0) diff --git a/TR5Main/Game/spikewall.h b/TR5Main/Game/spikewall.h deleted file mode 100644 index 1c6fd9964..000000000 --- a/TR5Main/Game/spikewall.h +++ /dev/null @@ -1,4 +0,0 @@ -#pragma once - -#include "..\Global\global.h" - diff --git a/TR5Main/Game/spotcam.cpp b/TR5Main/Game/spotcam.cpp index 62d9443bd..c74fd74c1 100644 --- a/TR5Main/Game/spotcam.cpp +++ b/TR5Main/Game/spotcam.cpp @@ -42,6 +42,8 @@ int LaraAir; int CurrentSpotcamSequence; SPOTCAM SpotCam[64]; int NumberSpotcams; +int CheckTrigger = 0; +int UseSpotCam = 0; extern Renderer11* g_Renderer; @@ -899,6 +901,36 @@ void CalculateSpotCameras() } } +// It just works (tm)! +int Spline(int x, int* knots, int nk) +{ + int64_t v3 = x * (int64_t)(nk - 3) << 16 >> 16; + int32_t v4 = (int32_t)v3 >> 16; + if ((int32_t)v3 >> 16 >= nk - 3) + v4 = nk - 4; + int32_t v5 = knots[v4]; + int32_t v6 = knots[v4 + 2]; + int32_t nka = knots[v4 + 3] >> 1; + int32_t v7 = knots[v4 + 1]; + return (int32_t)(v7 + + (int64_t)(uint64_t)((int32_t)((~v5 >> 1) + + (v6 >> 1) + + (int64_t)(uint64_t)((int32_t)(v5 + + (int64_t)(uint64_t)(((~v5 >> 1) + + nka + + v7 + + (v7 >> 1) + - (v6 >> 1) + - v6) + * (int64_t)((int32_t)v3 - (v4 << 16)) >> 16) + - 2 * v7 + + 2 * v6 + - (v7 >> 1) + - nka) + * (int64_t)((int32_t)v3 - (v4 << 16)) >> 16)) + * (int64_t)((int32_t)v3 - (v4 << 16)) >> 16)); +} + void Inject_Spotcam() { INJECT(0x0047A800, InitSpotCamSequences); diff --git a/TR5Main/Game/spotcam.h b/TR5Main/Game/spotcam.h index 773943307..58f431ebe 100644 --- a/TR5Main/Game/spotcam.h +++ b/TR5Main/Game/spotcam.h @@ -22,20 +22,16 @@ enum spotcam_flags SCF_CAMERA_ONE_SHOT = (1 << 15), // 0x8000 }; -//#define InitSpotCamSequences ((void (__cdecl*)()) 0x0047A800) -//#define CalculateSpotCameras ((void (__cdecl*)()) 0x0047B280) -//#define InitialiseSpotCam ((void (__cdecl*)(short)) 0x0047A9D0) -#define TriggerTitleSpotcam ((void (__cdecl*)(int)) 0x004284A0) -#define Spline ((int (__cdecl*)(int, int*, int)) 0x0047A890) - extern byte SpotCamRemap[16]; extern byte CameraCnt[16]; extern int LastSpotCam; extern SPOTCAM SpotCam[64]; extern int NumberSpotcams; +extern int UseSpotCam; void InitSpotCamSequences(); void InitialiseSpotCam(short sequence); void CalculateSpotCameras(); +int Spline(int x, int* knots, int nk); void Inject_Spotcam(); \ No newline at end of file diff --git a/TR5Main/Game/swat.cpp b/TR5Main/Game/swat.cpp deleted file mode 100644 index 8255e34fb..000000000 --- a/TR5Main/Game/swat.cpp +++ /dev/null @@ -1,1049 +0,0 @@ -#include "swat.h" -#include "..\Global\global.h" -#include "..\Game\Box.h" -#include "..\Game\items.h" -#include "..\Game\lot.h" -#include "..\Game\control.h" -#include "..\Game\effects.h" -#include "..\Game\draw.h" -#include "..\Game\sphere.h" -#include "..\Game\effect2.h" -#include "..\Game\people.h" -#include "..\Game\Lara.h" - -/* -void InitialiseGuard(short itemNum) -{ - ITEM_INFO* item = &Items[itemNum]; - - ClearItem(itemNum); - - short animIndex = Objects[ID_SWAT].animIndex; - if (!Objects[ID_SWAT].loaded) - animIndex = Objects[ID_GUARD1].animIndex; - - switch (item->triggerFlags) - { - case 0: - case 10: - item->animNumber = animIndex; - item->goalAnimState = 1; - break; - case 1: - item->goalAnimState = 11; - item->animNumber = v4 + 23; - break; - case 2: - item->goalAnimState = 13; - item->animNumber = v5 + 25; - item->_bf15ea ^= (item->_bf15ea ^ ((item->_bf15ea & 0xFE) + 2)) & 6; - break; - case 3: - v6 = item->roomNumber; - v7 = itemNum + 28; - item->goalAnimState = 15; - item->animNumber = v7; - *item->pad2 = 9216; - v8 = Rooms[v6].item_number; - if (v8 != -1) - { - while (1) - { - v9 = v8; - v10 = Items[v9].object_number; - v11 = &Items[v9]; - if (v10 >= 416 && v10 <= 444 && v11->roomNumber == v6 && v11->triggerFlags == 3) - break; - v8 = v11->next_item; - if (v8 == -1) - goto LABEL_21; - } - v11->meshBits = -5; - } - break; - case 4: - v12 = itemNum; - item->goalAnimState = 17; - *item->pad2 = 0x2000; - item->animNumber = v12 + 30; - break; - case 5: - LOWORD(v3) = item->roomNumber; - item->animNumber = itemNum + 26; - v13 = item->pos.zPos; - itemNum = v3; - v14 = item->pos.yPos; - v15 = item->pos.xPos; - item->goalAnimState = 14; - v16 = GetFloor(v15, v14, v13, &itemNum); - GetFloorHeight(v16, item->pos.xPos, item->pos.yPos, item->pos.zPos); - item->pos.yPos = GetCeiling(v16, item->pos.xPos, item->pos.yPos, item->pos.zPos) - 2048; - break; - case 6: - v17 = itemNum; - item->goalAnimState = 19; - item->animNumber = v17 + 32; - break; - case 7: - case 9: - v18 = item->pos.xPos; - v19 = itemNum + 59; - item->goalAnimState = 38; - item->animNumber = v19; - LOWORD(v19) = item->pos.yRot; - v20 = (v19 >> 3) & 0x1FFE; - item->pos.xPos = v18 - (rcossin_tbl[v20] << 9 >> 14); - item->pos.zPos -= rcossin_tbl[v20 + 1] << 9 >> 14; - break; - case 8: - v21 = itemNum; - item->goalAnimState = 31; - item->animNumber = v21 + 46; - break; - case 11: - v22 = itemNum; - item->goalAnimState = 7; - item->animNumber = v22 + 12; - break; - default: - break; - } -LABEL_21: - result = anims; - v24 = item->goalAnimState; - item->frameNumber = Anims[item->animNumber].frameBase; - item->currentAnimState = v24; - return result; -} - -void GuardControl(int itemNum) -{ - int v1; // eax - int v2; // ecx - ITEM_INFO* item; // esi - int v4; // eax - int v5; // edi - int v6; // ebp - int v7; // eax - int v8; // ebx - int v9; // ecx - int v10; // edi - int v11; // ebp - struct FLOOR_INFO* v12; // eax - int v13; // eax - int v14; // ebp - int v15; // edi - struct FLOOR_INFO* v16; // eax - int v17; // eax - int v18; // edx - int v19; // edi - int v20; // ebp - struct FLOOR_INFO* v21; // eax - int v22; // eax - unsigned short v23; // cx - unsigned short v24; // dx - int v25; // edi - int v26; // eax - CREATURE_INFO* v27; // ebp - ITEM_INFO* v28; // ecx - short v29; // ax - int v30; // edi - int v31; // ebx - short v32; // bx - short v33; // cx - short v34; // bx - short v35; // bx - int v36; // edi - int v37; // eax - int v38; // eax - enum mood_type v39; // edi - ITEM_INFO* v40; // ecx - int v41; // eax - int* v42; // edi - int v43; // eax - int v44; // ecx - _BOOL2 v45; // bx - short v46; // cx - int v47; // eax - int v48; // eax - int v49; // eax - short v50; // di - short v51; // ax - int v52; // eax - int v53; // eax - int v54; // eax - int v55; // eax - short v56; // dx - bool v57; // zf - short v58; // dx - int v59; // ecx - int v60; // ecx - int v61; // eax - short v62; // dx - short v63; // dx - short v64; // dx - short v65; // dx - int v66; // eax - int v67; // ecx - int v68; // ecx - int v69; // eax - struct FLOOR_INFO* v70; // eax - char v71; // al - int v72; // eax - int v73; // eax - short v74; // cx - short v75; // ax - short v76; // di - short v77; // ax - int v78; // eax - short v79; // cx - ITEM_INFO* v80; // eax - short v81; // cx - ITEM_INFO* v82; // eax - short i; // cx - short v84; // di - CREATURE_INFO_FINAL* v85; // ecx - short v86; // cx - int v87; // eax - int v88; // edx - struct FLOOR_INFO* v89; // eax - short v90; // ax - int v91; // eax - int v92; // eax - int v93; // eax - short v94; // ax - struct FLOOR_INFO* v95; // eax - int v96; // edx - int v97; // eax - short v98; // cx - int v99; // eax - int v100; // ecx - struct FLOOR_INFO* v101; // eax - short v102; // ax - short v103; // dx - short v104; // dx - short v105; // ax - short v106; // ax - short v107; // cx - short v108; // cx - short v109; // dx - short v110; // dx - short v111; // ax - short v112; // ax - short v113; // cx - short v114; // cx - int a4; // [esp+Ch] [ebp-8Ch] - int animIndex; // [esp+10h] [ebp-88h] - int v117; // [esp+14h] [ebp-84h] - int v118; // [esp+18h] [ebp-80h] - int v119; // [esp+1Ch] [ebp-7Ch] - int v120; // [esp+20h] [ebp-78h] - int v121; // [esp+24h] [ebp-74h] - int a2; // [esp+28h] [ebp-70h] - int v123; // [esp+2Ch] [ebp-6Ch] - int v124; // [esp+30h] [ebp-68h] - int v125; // [esp+38h] [ebp-60h] - int v126; // [esp+40h] [ebp-58h] - CREATURE_INFO_FINAL* creature; // [esp+44h] [ebp-54h] - int v128; // [esp+48h] [ebp-50h] - int v129; // [esp+4Ch] [ebp-4Ch] - int v130; // [esp+50h] [ebp-48h] - char v131; // [esp+54h] [ebp-44h] - int v132; // [esp+58h] [ebp-40h] - int v133; // [esp+64h] [ebp-34h] - int v134; // [esp+6Ch] [ebp-2Ch] - int v135; // [esp+70h] [ebp-28h] - int v136; // [esp+74h] [ebp-24h] - int v137; // [esp+78h] [ebp-20h] - int v138; // [esp+7Ch] [ebp-1Ch] - int v139; // [esp+80h] [ebp-18h] - short v140; // [esp+84h] [ebp-14h] - int v141; // [esp+88h] [ebp-10h] - int v142; // [esp+8Ch] [ebp-Ch] - int v143; // [esp+90h] [ebp-8h] - - CreatureActive(itemNum); - if (!v1) - return; - if (*(&Objects[33] + 50) & 1) - LOWORD(animIndex) = Objects[33].animIndex; - else - LOWORD(animIndex) = Objects[37].animIndex; - HIWORD(v2) = HIWORD(items); - item = &Items[itemNum]; - creature = Items[itemNum].data; - LOWORD(v2) = item->roomNumber; - v128 = 0; - v118 = 0; - v126 = 0; - v121 = 0; - v4 = item->object_number; - LOWORD(v120) = item->object_number; - a4 = v2; - LOWORD(v4) = item->pos.yRot; - v5 = item->pos.xPos; - v6 = item->pos.zPos; - v7 = (v4 >> 3) & 0x1FFE; - v8 = item->pos.yPos; - v9 = rcossin_tbl[v7 + 1]; - v119 = 3480 * rcossin_tbl[v7] >> 14; - v10 = v119 + v5; - v11 = (3480 * v9 >> 14) + v6; - v117 = 3480 * v9 >> 14; - v12 = GetFloor(v10, v8, v11, &a4); - v13 = GetFloorHeight(v12, v10, v8, v11); - v14 = v117 + v11; - v130 = v13; - LOWORD(v13) = item->roomNumber; - v15 = v119 + v10; - a4 = v13; - v16 = GetFloor(v15, v8, v14, &a4); - v17 = GetFloorHeight(v16, v15, v8, v14); - LOWORD(v18) = item->roomNumber; - v129 = v17; - a4 = v18; - v19 = v119 + v15; - v20 = v117 + v14; - v21 = GetFloor(v19, v8, v20, &a4); - v22 = GetFloorHeight(v21, v19, v8, v20); - v23 = item->box_number; - v24 = LaraItem->box_number; - if (v23 == v24 || v8 >= v130 - 384 || (v25 = v129, v8 >= v129 + 256) || v8 <= v129 - 256) - { - v25 = v129; - v119 = 0; - } - else - { - v119 = 1; - } - if (v23 == v24 || v8 >= v130 - 384 || v8 >= v25 - 384 || v8 >= v22 + 256 || (v117 = 1, v8 <= v22 - 256)) - v117 = 0; - if (item->firedWeapon) - { - v134 = SwatGunX; - v135 = SwatGunY; - v136 = SwatGunZ; - GetJointAbsPosition(item, &v134, SwatGunMesh); - TriggerDynamicLight(v134, v135, v136, 2 * item->firedWeapon + 10, 192, 128, 32); - item->firedWeapon--; - } - v26 = item->_bf15ea; - v27 = creature; - if (v26 & 0x3E00) - GetAITarget(creature); - else - creature->enemy = LaraItem; - CreatureAIInfo(item, &a2); - v28 = LaraItem; - if (*(&v27->mood + 2) == LaraItem) - { - v29 = v125; - LOWORD(v133) = v125; - v132 = v123; - } - else - { - v30 = LaraItem->pos.zPos - item->pos.zPos; - v31 = LaraItem->pos.xPos - item->pos.xPos; - v29 = phd_atan(v30, v31) - item->pos.yRot; - v132 = v30 * v30 + v31 * v31; - v28 = LaraItem; - LOWORD(v133) = v29; - } - v32 = animIndex; - if (item->hitPoints <= 0) - { - v33 = item->currentAnimState; - if (v33 != 8 && v33 != 6) - { - if (v29 >= 12288 || v29 <= -12288) - { - v35 = animIndex + 16; - item->currentAnimState = 8; - item->animNumber = v35; - item->pos.yRot += v133 + -32768; - } - else - { - v34 = animIndex + 11; - item->currentAnimState = 6; - item->animNumber = v34; - item->pos.yRot += v133; - } - item->frameNumber = Anims[item->animNumber].frameBase; - } - goto LABEL_255; - } - v36 = *(&v27->mood + 2) != v28; - GetCreatureMood(item, &a2, v36); - if (v120 == 69) - { - if (item->hitPoints >= Objects[69].hitPoints) - { - if (*(&v27->mood + 2) == LaraItem) - * (&v27->_bfc + 1) = 0; - } - else - { - *(&v27->_bfc + 1) = 2; - } - } - if (SLOBYTE(Rooms[item->roomNumber].flags) < 0) - { - if (item->object_number == 35) - { - if (++item->itemFlags[0] > 60 && !(GetRandomControl() & 0xF)) - { - SoundEffect(88, &item->pos, 0); - item->itemFlags[0] = 0; - } - } - else - { - if (!(GlobalCounter & 7)) - --item->hitPoints; - *(&v27->_bfc + 1) = 2; - if (item->hitPoints <= 0) - { - item->currentAnimState = 8; - item->animNumber = v32 + 16; - item->frameNumber = Anims[(v32 + 16)].frameBase; - } - } - } - CreatureMood(item, &a2, v36); - LOWORD(v37) = v27->maximumTurn; - LOWORD(v38) = CreatureTurn(item, v37); - v39 = *(&v27->mood + 2); - v128 = v38; - *(&v27->mood + 2) = LaraItem; - v40 = LaraItem; - if (v132 < 0x400000 && LaraItem->speed > 20 || item->_bf15ea & 0x10) - goto LABEL_52; - if (TargetVisible(item, &v131)) - { - v40 = LaraItem; - LABEL_52: - v41 = item->_bf15ea; - if (!(v41 & 0x2000) && item->object_number != 69 && abs(item->pos.yPos - v40->pos.yPos) < 1280) - { - *(&v27->mood + 2) = v40; - AlertAllGuards(itemNum); - } - } - *(&v27->mood + 2) = v39; - v42 = &item->pos.xPos; - v137 = item->pos.xPos; - v138 = item->pos.yPos - 384; - v139 = item->pos.zPos; - v140 = item->roomNumber; - v141 = LaraItem->pos.xPos; - v43 = GetBestFrame(LaraItem); - v142 = LaraItem->pos.yPos + ((*(v43 + 6) + 3 * *(v43 + 4)) >> 2); - v143 = LaraItem->pos.zPos; - v45 = !LOS(&v137, &v141) && item->triggerFlags != 10; - v27->maximumTurn = 0; - v46 = item->currentAnimState; - v47 = v46 - 1; - switch (v46) - { - case 1: - v48 = v133; - HIWORD(v27[24].LOT.target.x) &= 0xFFF7u; - v118 = v48; - v27->flags = 0; - if (v124) - { - v49 = item->_bf15ea; - if (!(v49 & 0x200)) - { - LOWORD(v49) = v125 >> 1; - v121 = v49; - v126 = *(&v125 + 2); - } - } - v50 = v120; - if (v120 == 69 && item == Lara.target) - { - item->goalAnimState = 39; - goto LABEL_105; - } - v51 = item->requiredAnimState; - if (v51) - { - item->goalAnimState = v51; - goto LABEL_105; - } - v52 = item->_bf15ea; - if (v52 & 0x200) - { - if (v52 & 0x1000) - { - v118 = 0; - } - else - { - LOWORD(v53) = AIGuard(v27); - v118 = v53; - } - v54 = item->_bf15ea; - if (v54 & 0x800) - { - if (--item->triggerFlags < 1) - { - BYTE1(v54) &= 0xFDu; - item->_bf15ea = v54; - } - } - goto LABEL_105; - } - if (*(&v27->mood + 2) == LaraItem && (v133 > 20480 || v133 < -20480) && v120 != 69) - { - item->goalAnimState = 2; - goto LABEL_105; - } - if (v52 & 0x800) - { - item->goalAnimState = 5; - goto LABEL_105; - } - if (v52 & 0x400) - { - item->goalAnimState = 7; - goto LABEL_105; - } - if (Targetable(item, &a2) && v50 != 69) - { - if (v123 >= 0x1000000 && a2 == HIWORD(a2)) - { - if ((item->_bf15ea & 0x3E00) == 4096) - goto LABEL_105; - goto LABEL_90; - } - item->goalAnimState = 4; - } - else if (v119 || v117) - { - v56 = animIndex; - v27->maximumTurn = 0; - v57 = v117 == 0; - item->animNumber = v56 + 41; - v58 = Anims[(v56 + 41)].frameBase; - item->currentAnimState = 26; - item->frameNumber = v58; - if (v57) - item->goalAnimState = 27; - else - item->goalAnimState = 28; - BYTE2(v27[24].LOT.target.x) |= 8u; - } - else if (v45) - { - item->goalAnimState = 31; - } - else if (*(&v27->_bfc + 1)) - { - if (v123 < &unk_900000 || (v55 = item->_bf15ea, BYTE1(v55) & 0x20)) - { - LABEL_90: - item->goalAnimState = 5; - goto LABEL_105; - } - item->goalAnimState = 7; - } - else - { - item->goalAnimState = 1; - } - LABEL_105: - if (item->triggerFlags == 11) - item->triggerFlags = 0; - LABEL_255: - CreatureJoint(item, 0, v121); - CreatureJoint(item, 1, v126); - CreatureJoint(item, 2, v118); - if (!(v27->_bfc & 8)) - goto LABEL_269; - v97 = *(&v27->mood + 2); - if (!v97) - goto LABEL_269; - v98 = *(v97 + 40); - if (v98 != 4) - { - if (v98 & 0x10) - { - v99 = item->_bf15ea; - item->goalAnimState = 1; - item->requiredAnimState = 38; - item->triggerFlags = 300; - BYTE1(v99) &= 0xCBu; - } - else - { - if (v98 & 0x20) - { - v100 = item->_bf15ea; - item->goalAnimState = 1; - item->requiredAnimState = 36; - BYTE1(v100) = BYTE1(v100) & 0xC9 | 8; - item->_bf15ea = v100; - goto LABEL_268; - } - LOWORD(v96) = *(v97 + 24); - a4 = v96; - v101 = GetFloor(*(*(&v27->mood + 2) + 64), *(*(&v27->mood + 2) + 68), *(*(&v27->mood + 2) + 72), &a4); - GetFloorHeight(v101, *(*(&v27->mood + 2) + 64), *(*(&v27->mood + 2) + 68), *(*(&v27->mood + 2) + 72)); - TestTriggers(TriggerIndex, 1, 0); - item->requiredAnimState = 5; - if (*(*(&v27->mood + 2) + 40) & 2) - item->itemFlags[3] = item->pad2[6] - 1; - if (!(*(*(&v27->mood + 2) + 40) & 8)) - goto LABEL_268; - v99 = item->_bf15ea; - item->requiredAnimState = 1; - item->triggerFlags = 300; - } - BYTE1(v99) |= 0xAu; - item->_bf15ea = v99; - goto LABEL_268; - } - item->goalAnimState = 1; - item->requiredAnimState = 37; - LABEL_268: - ++item->itemFlags[3]; - v27->_bfc &= 0xFFF7u; - *(&v27->mood + 2) = 0; - LABEL_269: - v102 = item->currentAnimState; - if ((v102 >= 20 || v102 == 6 || v102 == 8) && v102 != 30) - { - CreatureAnimation(itemNum, v128, 0); - } - else - { - switch (CreatureVault(itemNum, v128, 2, 256) + 4) - { - case 0: - v113 = animIndex; - v27->maximumTurn = 0; - item->animNumber = v113 + 38; - v114 = Anims[(v113 + 38)].frameBase; - item->currentAnimState = 23; - item->frameNumber = v114; - break; - case 1: - v111 = animIndex; - v27->maximumTurn = 0; - v111 += 39; - item->animNumber = v111; - v112 = Anims[v111].frameBase; - item->currentAnimState = 24; - item->frameNumber = v112; - break; - case 2: - v109 = animIndex; - v27->maximumTurn = 0; - item->animNumber = v109 + 40; - v110 = Anims[(v109 + 40)].frameBase; - item->currentAnimState = 25; - item->frameNumber = v110; - break; - case 6: - v103 = animIndex; - v27->maximumTurn = 0; - item->animNumber = v103 + 35; - v104 = Anims[(v103 + 35)].frameBase; - item->currentAnimState = 20; - item->frameNumber = v104; - break; - case 7: - v105 = animIndex; - v27->maximumTurn = 0; - v105 += 36; - item->animNumber = v105; - v106 = Anims[v105].frameBase; - item->currentAnimState = 21; - item->frameNumber = v106; - break; - case 8: - v107 = animIndex; - v27->maximumTurn = 0; - item->animNumber = v107 + 37; - v108 = Anims[(v107 + 37)].frameBase; - item->currentAnimState = 22; - item->frameNumber = v108; - break; - default: - return; - } - } - return; - case 2: - v27->flags = 0; - if ((v125 & 0x8000u) == 0) - item->pos.yRot -= 364; - else - item->pos.yRot += 364; - if (item->frameNumber == Anims[item->animNumber].frameEnd) - item->pos.yRot += -32768; - goto LABEL_255; - case 3: - case 35: - LOWORD(v47) = v133 >> 1; - v121 = v47; - v118 = v47; - if (v124) - v126 = *(&v125 + 2); - if (abs(v125) >= 364) - { - if ((v125 & 0x8000u) == 0) - item->pos.yRot += 364; - else - item->pos.yRot -= 364; - } - else - { - item->pos.yRot += v125; - } - if (v46 != 35) - goto LABEL_168; - if (!v27->flags) - goto LABEL_283; - v66 = Anims[item->animNumber].frameBase; - v67 = item->frameNumber; - if (v67 < v66 + 10 && (v67 - v66) & 1) - v27->flags = 0; - LABEL_168: - if (!v27->flags) - { - LABEL_283: - v27->flags = 1; - v57 = item->currentAnimState == 3; - item->fired_weapon = 2; - if (v57) - ShotLara(item, &a2, &SwatGunX, v121, 30 * ((gfCurrentLevel > 0xAu) + 1)); - else - ShotLara(item, &a2, &SwatGunX, v121, 10); - } - goto LABEL_255; - case 4: - LOWORD(v47) = v133; - v27->flags = 0; - LOWORD(v47) = v47 >> 1; - v121 = v47; - v118 = v47; - if (v124) - v126 = *(&v125 + 2); - if (abs(v125) >= 364) - { - if ((v125 & 0x8000u) == 0) - item->pos.yRot += 364; - else - item->pos.yRot -= 364; - } - else - { - item->pos.yRot += v125; - } - if (!Targetable(item, &a2)) - goto LABEL_242; - if (v120 == 37 || v120 == 55) - item->goalAnimState = 3; - else - item->goalAnimState = 35; - goto LABEL_255; - case 5: - HIWORD(v27[24].LOT.target.x) &= 0xFFF7u; - v27->maximumTurn = 910; - if (!Targetable(item, &a2) - || v123 >= 0x1000000 && a2 == HIWORD(a2) - || v120 == 69 - || (v59 = item->_bf15ea, BYTE1(v59) & 0xC)) - { - if (v119 || v117) - { - v62 = animIndex; - v27->maximumTurn = 0; - v57 = v117 == 0; - item->animNumber = v62 + 41; - v63 = Anims[(v62 + 41)].frameBase; - item->currentAnimState = 26; - item->frameNumber = v63; - if (v57) - item->goalAnimState = 27; - else - item->goalAnimState = 28; - BYTE2(v27[24].LOT.target.x) |= 8u; - } - else if (v123 >= 0x100000) - { - if (!v45 || (v60 = item->_bf15ea, BYTE1(v60) & 0x3E)) - { - if (v123 > & unk_900000) - { - v61 = item->_bf15ea; - if (!(v61 & 0x800)) - item->goalAnimState = 7; - } - } - else - { - item->goalAnimState = 1; - } - } - else - { - item->goalAnimState = 1; - } - } - else - { - item->goalAnimState = 4; - } - goto LABEL_255; - case 7: - HIWORD(v27[24].LOT.target.x) &= 0xFFF7u; - v27->maximumTurn = 1820; - if (Targetable(item, &a2) && (v123 < 0x1000000 || a2 != HIWORD(a2)) && v120 != 69) - { - item->goalAnimState = 4; - } - else if (v119 || v117) - { - v64 = animIndex; - v27->maximumTurn = 0; - v57 = v117 == 0; - item->animNumber = v64 + 50; - v65 = Anims[(v64 + 50)].frameBase; - item->currentAnimState = 26; - item->frameNumber = v65; - if (v57) - item->goalAnimState = 27; - else - item->goalAnimState = 28; - BYTE2(v27[24].LOT.target.x) |= 8u; - } - else if (v45) - { - item->goalAnimState = 1; - } - else if (v123 < &unk_900000) - { - item->goalAnimState = 5; - } - if (item->triggerFlags == 11) - { - BYTE2(v27[24].LOT.target.x) |= 8u; - v27->maximumTurn = 0; - } - goto LABEL_255; - case 14: - v68 = item->pos.yPos; - v118 = v133; - v69 = item->floor; - if (v68 <= item->floor - 2048 || item->triggerFlags != 5) - { - if (v68 >= v69 - 512) - item->goalAnimState = 4; - } - else - { - LOWORD(v69) = item->roomNumber; - item->triggerFlags = 0; - a4 = v69; - v70 = GetFloor(*v42, item->pos.yPos, item->pos.zPos, &a4); - GetFloorHeight(v70, *v42, item->pos.yPos, item->pos.zPos); - TestTriggers(TriggerIndex, 1, 0); - SoundEffect(340, &item->pos, 0); - } - if (abs(v125) >= 364) - { - if ((v125 & 0x8000u) == 0) - item->pos.yRot += 364; - else - item->pos.yRot -= 364; - } - else - { - item->pos.yRot += v125; - } - goto LABEL_255; - case 15: - LOWORD(v72) = AIGuard(v27); - v118 = v72; - if (v27->_bfc & 1) - item->goalAnimState = 16; - goto LABEL_255; - case 16: - case 18: - v74 = Anims[item->animNumber].frameBase; - v75 = item->frameNumber; - if (v75 == v74) - goto LABEL_254; - if (v75 == v74 + 44) - { - v76 = item->roomNumber; - *item->pad2 = 0; - v77 = Rooms[v76].item_number; - if (v77 == -1) - goto LABEL_255; - while (1) - { - v78 = v77; - v79 = Items[v78].object_number; - v80 = &Items[v78]; - if (v79 >= 416 && v79 <= 444 && v80->roomNumber == v76) - { - v81 = v80->triggerFlags; - if (v81 > 2 && v81 < 5) - break; - } - v77 = v80->next_item; - if (v77 == -1) - goto LABEL_255; - } - v80->meshBits = -3; - } - else if (v75 == Anims[item->animNumber].frameEnd) - { - item->pos.yRot -= 0x4000; - } - goto LABEL_255; - case 17: - v71 = item->_bf15ea; - v118 = 0; - if (!(v71 & 0x10) && LaraItem->speed < 40 && !(*(&lara + 69) & 0x10)) - v27->_bfc &= 0xFFFEu; - if (v27->_bfc & 1) - item->goalAnimState = 18; - goto LABEL_255; - case 19: - LOWORD(v73) = AIGuard(v27); - v118 = v73; - if (v27->_bfc & 1) - item->goalAnimState = 1; - goto LABEL_255; - case 30: - goto LABEL_176; - case 31: - if (item->triggerFlags != 8 || !v45 || item->_bf15ea & 0x10) - item->goalAnimState = 30; - LABEL_176: - HIWORD(v27[24].LOT.target.x) &= 0xFFF7u; - v57 = v119 == 0; - v27->maximumTurn = 910; - if (!v57 || v117 || v123 < 0x100000 || !v45 || item->_bf15ea & 0x10) - item->goalAnimState = 1; - goto LABEL_255; - case 36: - goto LABEL_253; - case 37: - v82 = 0; - for (i = Rooms[item->roomNumber].item_number; i != -1; i = v82->next_item) - { - v82 = &Items[i]; - if (Items[i].object_number == 249) - break; - } - v84 = item->frameNumber; - v85 = &Anims[item->animNumber]; - creature = v85; - LOWORD(v85) = HIWORD(v85->aiTarget.floor); - if (v84 == v85) - { - v86 = v82->pos.yRot; - v82->meshBits = 0x1FFF; - item->pos.yRot = v86; - item->pos.xPos = v82->pos.xPos - 256; - v87 = v82->pos.zPos; - *item->pad2 = 1024; - item->pos.zPos = v87 + 128; - } - else - { - v85 = v85; - v88 = v84; - if (v84 == v85 + 32) - { - v82->meshBits = 16381; - } - else if (v84 == v85->aiTarget.itemFlags) - { - v82->meshBits = 278461; - } - else if (v84 == &v85->aiTarget.pad_ex_light[16]) - { - v82->meshBits = 802621; - } - else if (v84 == (&v85->aiTarget.draw_room + 1)) - { - v82->meshBits = 819001; - } - else if (v84 == &v85->aiTarget.pad1[30]) - { - v82->meshBits = 17592121; - } - else if (v84 == LOWORD(creature->aiTarget.touch_bits)) - { - v82->meshBits = 0x1FFF; - LOWORD(v88) = item->roomNumber; - a4 = v88; - v89 = GetFloor(item->pos.xPos, item->pos.yPos, item->pos.zPos, &a4); - GetFloorHeight(v89, item->pos.xPos, item->pos.yPos, item->pos.zPos); - TestTriggers(TriggerIndex, 1, 0); - item->requiredAnimState = 5; - *item->pad2 = 0; - } - } - goto LABEL_255; - case 38: - if ((v120 != 69 || item != Lara.target) - && (GetRandomControl() & 0x7F || (v90 = item->triggerFlags, v90 >= 10) || v90 == 9)) - { - v91 = item->_bf15ea; - if (v91 & 0x200) - { - LOWORD(v92) = AIGuard(v27); - v118 = v92; - v93 = item->_bf15ea; - if (v93 & 0x800) - { - if (--item->triggerFlags < 1) - { - BYTE1(v93) = BYTE1(v93) & 0xC9 | 8; - item->_bf15ea = v93; - } - } - } - } - else - { - LABEL_242: - item->goalAnimState = 1; - } - goto LABEL_255; - case 39: - if (item != Lara.target && !(GetRandomControl() & 0x3F)) - { - v94 = item->triggerFlags; - if (v94 == 7 || v94 == 9) - item->requiredAnimState = 38; - item->goalAnimState = 1; - } - LABEL_253: - HIWORD(v44) = HIWORD(anims); - if (item->frameNumber == Anims[item->animNumber].frameBase + 39) - { - LABEL_254: - LOWORD(v44) = item->roomNumber; - a4 = v44; - v95 = GetFloor(*v42, item->pos.yPos, item->pos.zPos, &a4); - GetFloorHeight(v95, *v42, item->pos.yPos, item->pos.zPos); - TestTriggers(TriggerIndex, 1, 0); - } - goto LABEL_255; - default: - goto LABEL_255; - } -}**/ \ No newline at end of file diff --git a/TR5Main/Game/swat.h b/TR5Main/Game/swat.h deleted file mode 100644 index e69de29bb..000000000 diff --git a/TR5Main/Game/switch.h b/TR5Main/Game/switch.h index 2900beb0d..bfa77405b 100644 --- a/TR5Main/Game/switch.h +++ b/TR5Main/Game/switch.h @@ -1,12 +1,6 @@ #pragma once #include "..\Global\global.h" -//#define InitialiseSwitch ((void (__cdecl*)(short)) 0x00440070) -//#define SequenceControl ((void (__cdecl*)(short)) 0x0047F520) -//#define SequenceCollision ((void (__cdecl*)(short,ITEM_INFO*,COLL_INFO*)) 0x0047F610) -//#define LeverSwitchCollision ((void (__cdecl*)(short,ITEM_INFO*,COLL_INFO*)) 0x0047EE00) -//#define InitialisePulleySwitch ((void (__cdecl*)(short)) 0x0043E1F0) -//#define InitialiseCrowDoveSwitch ((void (__cdecl*)(short)) 0x0043ECF0) void CrowDoveSwitchCollision(short itemNum, ITEM_INFO* l, COLL_INFO* coll); void CrowDoveSwitchControl(short itemNumber); void CogSwitchCollision(short itemNum, ITEM_INFO* l, COLL_INFO* coll); diff --git a/TR5Main/Game/twogun.cpp b/TR5Main/Game/twogun.cpp deleted file mode 100644 index 02789a99e..000000000 --- a/TR5Main/Game/twogun.cpp +++ /dev/null @@ -1 +0,0 @@ -#include "twogun.h" \ No newline at end of file diff --git a/TR5Main/Game/twogun.h b/TR5Main/Game/twogun.h deleted file mode 100644 index 50e96676b..000000000 --- a/TR5Main/Game/twogun.h +++ /dev/null @@ -1 +0,0 @@ -#pragma once diff --git a/TR5Main/Global/legacyfunctions.h b/TR5Main/Global/legacyfunctions.h index d48d86ca4..c2b7f94e5 100644 --- a/TR5Main/Global/legacyfunctions.h +++ b/TR5Main/Global/legacyfunctions.h @@ -99,6 +99,30 @@ // DRAW.CPP #define Legacy_UpdateStorm ((void (__cdecl*)()) 0x0042A310) +#define Legacy_InitInterpolate ((void(__cdecl*)(int,int)) 0x0042BE90) +#define Legacy_Sync ((int (__cdecl*)()) 0x004D1A40) +#define Legacy_GetBoundsAccurate ((short* (__cdecl*)(ITEM_INFO*)) 0x0042CF80) +#define Legacy_GetBestFrame ((short* (__cdecl*)(ITEM_INFO*)) 0x0042D020) +#define Legacy_phd_PushMatrix ((void(__cdecl*)(void)) 0x0048F9C0) +#define Legacy_phd_RotYXZ ((void(__cdecl*)(short, short, short)) 0x00490150) +#define Legacy_phd_TranslateRel ((void(__cdecl*)(int, int, int)) 0x0048FB20) +#define Legacy_phd_TranslateRel_I ((void(__cdecl*)(int, int, int)) 0x0042C110) +#define Legacy_phd_TranslateRel_ID ((void(__cdecl*)(int,int,int,int,int,int)) 0x0042C190) +#define Legacy_phd_TranslateAbs ((void(__cdecl*)(int, int, int)) 0x004903F0) +#define Legacy_phd_PopMatrix_I ((void(__cdecl*)(void)) 0x0042BF00) +#define Legacy_phd_RotY ((void(__cdecl*)(short)) 0x0048FCD0) +#define Legacy_phd_RotX ((void(__cdecl*)(short)) 0x0048FBE0) +#define Legacy_phd_RotZ ((void(__cdecl*)(short)) 0x0048FDC0) +#define Legacy_phd_RotY_I ((void(__cdecl*)(short)) 0x0042BFC0) +#define Legacy_phd_RotX_I ((void(__cdecl*)(short)) 0x0042C030) +#define Legacy_phd_RotZ_I ((void(__cdecl*)(short)) 0x0042C0A0) +#define Legacy_phd_SetTrans ((void (__cdecl*)(int, int, int)) 0x0048FA40) +#define Legacy_phd_PushMatrix_I ((void(__cdecl*)(void)) 0x0042BF50) +#define Legacy_phd_PushUnitMatrix ((void (__cdecl*)()) 0x0048FA90) +#define Legacy_phd_GetVectorAngles ((void(__cdecl*)(int, int, int, short*)) 0x004904B0) +#define Legacy_phd_RotYXZpack ((void(__cdecl*)(int)) 0x0048FEB0) +#define Legacy_gar_RotYXZsuperpack ((void(__cdecl*)(short**,int)) 0x0042C310) +#define Legacy_gar_RotYXZsuperpack_I ((void(__cdecl*)(short**,short**,int)) 0x0042C290) // EFFECT2.CPP #define Legacy_DetatchSpark ((SPARKS* (__cdecl*)(int, int)) 0x0042E6A0) @@ -148,4 +172,54 @@ #define Legacy_TranslateItem ((void (__cdecl*)(ITEM_INFO*, int, int, int)) 0x00415960) // LARA.CPP -#define Legacy_AnimateLara ((int (__cdecl*)(ITEM_INFO*)) 0x004563F0) \ No newline at end of file +#define Legacy_AnimateLara ((int (__cdecl*)(ITEM_INFO*)) 0x004563F0) + +// OBJECTS.CPP +#define Legacy_InitialiseTightRope ((void (__cdecl*)(short)) 0x0043ED30) +#define Legacy_InitialiseRaisingBlock ((void (__cdecl*)(short)) 0x0043D730) +#define Legacy_RaisingBlockControl ((void (__cdecl*)(short)) 0x0048C3D0) +#define Legacy_InitialiseRaisingCog ((void (__cdecl*)(short)) 0x00440320) +#define Legacy_RaisingCogControl ((void (__cdecl*)(short)) 0x00406040) +#define Legacy_InitialiseSmashObject ((void (__cdecl*)(short)) 0x0043D7F0) +#define Legacy_InitialiseAnimating ((void (__cdecl*)(short)) 0x00440100) +#define Legacy_AnimatingControl ((void (__cdecl*)(short)) 0x00465590) +#define Legacy_InitialiseXRayMachine ((void (__cdecl*)(short)) 0x0043FA20) +#define Legacy_HighObject2Control ((void (__cdecl*)(short)) 0x004070D0) + + +// PICKUP.CPP +#define Legacy_PickupCollision ((void (__cdecl*)(short, ITEM_INFO*, COLL_INFO*)) 0x00467C00) +#define Legacy_InitialisePickup ((void (__cdecl*)(short)) 0x0043E260) +#define Legacy_PickupControl ((void (__cdecl*)(short)) 0x004679D0) + +// ROPE.CPP +#define Legacy_CalculateRopePoints ((void (__cdecl*)(ROPE_STRUCT*)) 0x0046EC70) + +// SAVEGAME.CPP +#define Legacy_RestoreGame ((int (__cdecl*)()) 0x00472060) +#define Legacy_ReadSavegame ((int (__cdecl*)(int)) 0x004A8E10) +#define Legacy_CreateSavegame ((void (__cdecl*)()) 0x00470FA0) +#define Legacy_WriteSavegame ((int (__cdecl*)(int)) 0x004A8BC0) + +// SPHERE.CPP +#define Legacy_TestCollision ((int (__cdecl*)(ITEM_INFO*, ITEM_INFO*)) 0x00479170) +#define Legacy_GetJointAbsPosition ((int (__cdecl*)(ITEM_INFO*, PHD_VECTOR*, int)) 0x00479780) +#define Legacy_GetSpheres ((int (__cdecl*)(ITEM_INFO*, SPHERE*, int)) 0x00479380) + +// SPOTCAM.CPP +#define Legacy_InitSpotCamSequences ((void (__cdecl*)()) 0x0047A800) +#define Legacy_CalculateSpotCameras ((void (__cdecl*)()) 0x0047B280) +#define Legacy_InitialiseSpotCam ((void (__cdecl*)(short)) 0x0047A9D0) +#define Legacy_TriggerTitleSpotcam ((void (__cdecl*)(int)) 0x004284A0) +#define Legacy_Spline ((int (__cdecl*)(int, int*, int)) 0x0047A890) + +// SWITCH.CPP +#define Legacy_InitialiseSwitch ((void (__cdecl*)(short)) 0x00440070) +#define Legacy_SequenceControl ((void (__cdecl*)(short)) 0x0047F520) +#define Legacy_SequenceCollision ((void (__cdecl*)(short,ITEM_INFO*,COLL_INFO*)) 0x0047F610) +#define Legacy_LeverSwitchCollision ((void (__cdecl*)(short,ITEM_INFO*,COLL_INFO*)) 0x0047EE00) +#define Legacy_InitialisePulleySwitch ((void (__cdecl*)(short)) 0x0043E1F0) +#define Legacy_InitialiseCrowDoveSwitch ((void (__cdecl*)(short)) 0x0043ECF0) + +// MISC +#define Legacy_SQRT_ASM ((int(__cdecl*)(int)) 0x0048F980) diff --git a/TR5Main/Global/math.h b/TR5Main/Global/math.h index ec3afef43..d64513900 100644 --- a/TR5Main/Global/math.h +++ b/TR5Main/Global/math.h @@ -18,7 +18,7 @@ #define TR_ANGLE_TO_DEGREES(x) ((x) / 65536.0f * 360.0f) #define TR_ANGLE_TO_RAD(x) ((x) / 65536.0f * 360.0f * RADIAN) -#define SQRT_ASM ((int(__cdecl*)(int)) 0x0048F980) +#define SQRT_ASM(x) (int)sqrt(x) #define ATAN ((int(__cdecl*)(int, int)) 0x0048F8A0) #define SIN(x) (4 * rcossin_tbl[(int(x) >> 3) & 8190]) #define COS(x) (4 * rcossin_tbl[((int(x) >> 3) & 8190) + 1]) diff --git a/TR5Main/Global/vars.h b/TR5Main/Global/vars.h index 9ade71195..ad22d3511 100644 --- a/TR5Main/Global/vars.h +++ b/TR5Main/Global/vars.h @@ -73,9 +73,9 @@ #define DelCutSeqPlayer VAR_U_(0x0051CE2C, short) #define TitleControlsLockedOut VAR_U_(0x00E5C2A8, byte) #define TrackCameraInit VAR_U_(0x0051D010, int) -#define CheckTrigger VAR_U_(0x0051D014, int) -#define UseSpotCam VAR_U_(0x0051D018, int) -#define DisableLaraControl VAR_U_(0x0051D01C, byte) +//#define CheckTrigger VAR_U_(0x0051D014, int) +//#define UseSpotCam VAR_U_(0x0051D018, int) +//#define DisableLaraControl VAR_U_(0x0051D01C, byte) #define FramesCount VAR_U_(0x0051CA78, int) #define GlobalCounter VAR_U_(0x0051CA58, short) #define LevelComplete VAR_U_(0x00E5C2F0, byte) diff --git a/TR5Main/Specific/setup.cpp b/TR5Main/Specific/setup.cpp index 3c4a8bd41..4ba42ff24 100644 --- a/TR5Main/Specific/setup.cpp +++ b/TR5Main/Specific/setup.cpp @@ -22,8 +22,6 @@ #include "..\Objects\oldobjects.h" #include "..\Objects\newobjects.h" -#include "..\Game\rat.h" - #include "roomload.h" #include @@ -2571,14 +2569,14 @@ void ObjectObjects() obj->savePosition = true; } - obj = &Objects[ID_XRAY_CONTROLLER]; + /*obj = &Objects[ID_XRAY_CONTROLLER]; if (obj->loaded) { obj->initialise = InitialiseXRayMachine; obj->control = ControlXRayMachine; obj->drawRoutine = NULL; obj->saveFlags = true; - } + }*/ // by default loaded, explosion time :D obj = &Objects[ID_BODY_PART]; diff --git a/TR5Main/TR5Main.vcxproj b/TR5Main/TR5Main.vcxproj index f13d963f3..104a66e77 100644 --- a/TR5Main/TR5Main.vcxproj +++ b/TR5Main/TR5Main.vcxproj @@ -120,7 +120,6 @@ xcopy /Y "$(ProjectDir)Scripting\Scripts\*.lua" "$(TargetDir)\Scripts" - @@ -187,19 +186,16 @@ xcopy /Y "$(ProjectDir)Scripting\Scripts\*.lua" "$(TargetDir)\Scripts" - - - @@ -226,7 +222,6 @@ xcopy /Y "$(ProjectDir)Scripting\Scripts\*.lua" "$(TargetDir)\Scripts" - @@ -365,7 +360,6 @@ xcopy /Y "$(ProjectDir)Scripting\Scripts\*.lua" "$(TargetDir)\Scripts" - @@ -375,7 +369,6 @@ xcopy /Y "$(ProjectDir)Scripting\Scripts\*.lua" "$(TargetDir)\Scripts" - diff --git a/TR5Main/TR5Main.vcxproj.filters b/TR5Main/TR5Main.vcxproj.filters index 917cabc04..a253039c2 100644 --- a/TR5Main/TR5Main.vcxproj.filters +++ b/TR5Main/TR5Main.vcxproj.filters @@ -114,9 +114,6 @@ File di intestazione - - File di intestazione - File di intestazione @@ -144,9 +141,6 @@ File di intestazione - - File di intestazione - File di intestazione @@ -180,9 +174,6 @@ File di intestazione - - File di intestazione - File di intestazione @@ -270,9 +261,6 @@ File di intestazione - - File di intestazione - File di intestazione @@ -425,9 +413,6 @@ File di origine - - File di origine - File di origine @@ -455,9 +440,6 @@ File di origine - - File di origine - File di origine @@ -506,9 +488,6 @@ File di origine - - File di origine - File di origine