2020-05-27 09:21:20 +02:00
|
|
|
#include "framework.h"
|
2019-11-09 09:55:56 +01:00
|
|
|
#include "switch.h"
|
|
|
|
#include "door.h"
|
|
|
|
#include "items.h"
|
|
|
|
#include "lot.h"
|
|
|
|
#include "objects.h"
|
|
|
|
#include "Lara.h"
|
2021-05-26 01:58:30 -05:00
|
|
|
#ifdef NEW_INV
|
|
|
|
#include "newinv2.h"
|
|
|
|
#else
|
2019-11-09 09:55:56 +01:00
|
|
|
#include "inventory.h"
|
2021-05-26 01:58:30 -05:00
|
|
|
#endif
|
2019-11-09 09:55:56 +01:00
|
|
|
#include "draw.h"
|
|
|
|
#include "sphere.h"
|
2020-04-12 07:08:22 +02:00
|
|
|
#include "camera.h"
|
2020-05-27 09:21:20 +02:00
|
|
|
#include "setup.h"
|
|
|
|
#include "level.h"
|
|
|
|
#include "input.h"
|
2020-04-24 19:15:05 +02:00
|
|
|
#include "sound.h"
|
2019-11-09 09:55:56 +01:00
|
|
|
|
2021-08-28 06:37:22 +02:00
|
|
|
// NOTE: we need to decompile/inspect if these functions are still needed
|
2019-11-09 09:55:56 +01:00
|
|
|
|
2019-12-02 14:49:19 +01:00
|
|
|
void ProcessExplodingSwitchType8(ITEM_INFO* item)
|
2019-11-09 09:55:56 +01:00
|
|
|
{
|
|
|
|
PHD_VECTOR pos;
|
|
|
|
pos.x = 0;
|
|
|
|
pos.y = 0;
|
|
|
|
pos.z = 0;
|
|
|
|
GetJointAbsPosition(item, &pos, 0);
|
|
|
|
TestTriggersAtXYZ(pos.x, pos.y, pos.z, item->roomNumber, 1, 0);
|
|
|
|
ExplodeItemNode(item, Objects[item->objectNumber].nmeshes - 1, 0, 64);
|
|
|
|
item->meshBits |= 1 << ((Objects[item->objectNumber].nmeshes & 0xFF) - 2);
|
|
|
|
}
|
|
|
|
|
2020-01-12 08:02:48 +01:00
|
|
|
void InitialiseShootSwitch(short itemNumber)
|
|
|
|
{
|
2020-07-21 09:56:47 +02:00
|
|
|
ITEM_INFO* item = &g_Level.Items[itemNumber];
|
2020-01-12 08:02:48 +01:00
|
|
|
if (item->triggerFlags == 444)
|
|
|
|
item->meshBits &= ~(1 << (Objects[item->objectNumber].nmeshes - 2));
|
|
|
|
}
|
|
|
|
|
2020-01-11 12:58:12 -03:00
|
|
|
void ShootSwitchCollision(short itemNumber, ITEM_INFO* l, COLL_INFO* coll)
|
|
|
|
{
|
2020-07-21 09:56:47 +02:00
|
|
|
ITEM_INFO* item = &g_Level.Items[itemNumber];
|
2020-01-11 12:58:12 -03:00
|
|
|
|
|
|
|
if (item->objectNumber == ID_SHOOT_SWITCH1 && !(item->meshBits & 1))
|
|
|
|
item->status = ITEM_INVISIBLE;
|
|
|
|
}
|