2020-12-21 13:16:29 -03:00
|
|
|
#pragma once
|
2021-09-08 18:31:35 +03:00
|
|
|
#include "Specific\phd_global.h"
|
2021-08-28 12:16:03 +02:00
|
|
|
#include "item.h"
|
2021-08-28 13:27:58 +02:00
|
|
|
#include <vector>
|
2020-12-21 13:16:29 -03:00
|
|
|
|
2021-07-18 15:22:15 +01:00
|
|
|
enum AIObjectType
|
2020-12-21 13:16:29 -03:00
|
|
|
{
|
|
|
|
NO_AI = 0x0000,
|
|
|
|
GUARD = 0x0001,
|
|
|
|
AMBUSH = 0x0002,
|
|
|
|
PATROL1 = 0x0004,
|
|
|
|
MODIFY = 0x0008,
|
|
|
|
FOLLOW = 0x0010,
|
|
|
|
PATROL2 = 0x0020,
|
|
|
|
ALL_AIOBJ = (GUARD | AMBUSH | PATROL1 | MODIFY | FOLLOW | PATROL2)
|
|
|
|
};
|
|
|
|
|
2021-07-18 15:22:15 +01:00
|
|
|
enum ItemStatus
|
2020-12-21 13:16:29 -03:00
|
|
|
{
|
2021-05-13 10:11:22 +02:00
|
|
|
ITEM_NOT_ACTIVE = 0,
|
|
|
|
ITEM_ACTIVE = 1,
|
|
|
|
ITEM_DEACTIVATED = 2,
|
|
|
|
ITEM_INVISIBLE = 3
|
2020-12-21 13:16:29 -03:00
|
|
|
};
|
|
|
|
|
2021-07-18 15:22:15 +01:00
|
|
|
enum ItemFlags
|
2020-12-21 13:16:29 -03:00
|
|
|
{
|
|
|
|
IFLAG_CLEAR_BODY = (1 << 7), // 0x0080
|
|
|
|
IFLAG_INVISIBLE = (1 << 8), // 0x0100
|
|
|
|
IFLAG_REVERSE = (1 << 14), // 0x4000
|
|
|
|
IFLAG_KILLED = (1 << 15), // 0x8000
|
|
|
|
IFLAG_ACTIVATION_MASK = 0x3E00 // bits 9-13
|
|
|
|
};
|
|
|
|
|
2021-01-07 11:16:21 -03:00
|
|
|
|
2021-08-28 12:16:03 +02:00
|
|
|
|
2020-12-21 13:16:29 -03:00
|
|
|
|
|
|
|
// used by fx->shade !
|
|
|
|
#define RGB555(r, g, b) ((r << 7) & 0x7C00 | (g << 2) & 0x3E0 | (b >> 3) & 0x1F)
|
|
|
|
#define WHITE555 RGB555(255, 255, 255)
|
|
|
|
#define GRAY555 RGB555(128, 128, 128)
|
|
|
|
#define BLACK555 RGB555( 0, 0, 0)
|
|
|
|
|
|
|
|
constexpr auto NO_ITEM = -1;
|
|
|
|
constexpr auto ALL_MESHBITS = -1;
|
|
|
|
constexpr auto NOT_TARGETABLE = -16384;
|
|
|
|
#define NUM_ITEMS 1024
|
|
|
|
|
|
|
|
void EffectNewRoom(short fxNumber, short roomNumber);
|
|
|
|
void ItemNewRoom(short itemNum, short roomNumber);
|
|
|
|
void AddActiveItem(short itemNumber);
|
|
|
|
void ClearItem(short itemNum);
|
|
|
|
short CreateItem();
|
|
|
|
void RemoveAllItemsInRoom(short roomNumber, short objectNumber);
|
|
|
|
void RemoveActiveItem(short itemNum);
|
|
|
|
void RemoveDrawnItem(short itemNum);
|
|
|
|
void InitialiseFXArray(int allocmem);
|
|
|
|
short CreateNewEffect(short roomNum);
|
|
|
|
void KillEffect(short fxNumber);
|
|
|
|
void InitialiseItem(short itemNum);
|
|
|
|
void InitialiseItemArray(int numItems);
|
|
|
|
void KillItem(short itemNum);
|
2021-09-17 15:32:55 +03:00
|
|
|
void UpdateItemRoom(ITEM_INFO* item, int height);
|
2021-09-15 14:24:03 +03:00
|
|
|
std::vector<int> FindAllItems(short objectNumber);
|
2021-09-17 15:32:55 +03:00
|
|
|
ITEM_INFO* FindItem(int object_number);
|
|
|
|
int FindItem(ITEM_INFO* item);
|