mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-05-08 03:28:03 +03:00
66 lines
1.7 KiB
C++
66 lines
1.7 KiB
C++
#pragma once
|
|
#include "Specific\phd_global.h"
|
|
#include "item.h"
|
|
#include <vector>
|
|
|
|
enum AIObjectType
|
|
{
|
|
NO_AI = 0x0000,
|
|
GUARD = 0x0001,
|
|
AMBUSH = 0x0002,
|
|
PATROL1 = 0x0004,
|
|
MODIFY = 0x0008,
|
|
FOLLOW = 0x0010,
|
|
PATROL2 = 0x0020,
|
|
ALL_AIOBJ = (GUARD | AMBUSH | PATROL1 | MODIFY | FOLLOW | PATROL2)
|
|
};
|
|
|
|
enum ItemStatus
|
|
{
|
|
ITEM_NOT_ACTIVE = 0,
|
|
ITEM_ACTIVE = 1,
|
|
ITEM_DEACTIVATED = 2,
|
|
ITEM_INVISIBLE = 3
|
|
};
|
|
|
|
enum ItemFlags
|
|
{
|
|
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
|
|
};
|
|
|
|
|
|
|
|
|
|
// 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);
|
|
void UpdateItemRoom(ITEM_INFO* item, int height);
|
|
std::vector<int> FindAllItems(short objectNumber);
|
|
ITEM_INFO* FindItem(int object_number);
|
|
int FindItem(ITEM_INFO* item);
|