2020-12-21 13:16:29 -03:00
|
|
|
#pragma once
|
2021-08-28 13:27:58 +02:00
|
|
|
|
2020-12-21 13:16:29 -03:00
|
|
|
#include "objectslist.h"
|
2021-08-28 13:27:58 +02:00
|
|
|
#include "phd_global.h"
|
|
|
|
struct ITEM_INFO;
|
|
|
|
struct COLL_INFO;
|
2021-08-28 12:16:03 +02:00
|
|
|
enum ZoneType : char;
|
2021-09-10 13:49:45 +03:00
|
|
|
|
2020-12-21 13:16:29 -03:00
|
|
|
enum HitEffectEnum
|
|
|
|
{
|
|
|
|
HIT_NONE,
|
|
|
|
HIT_BLOOD,
|
|
|
|
HIT_SMOKE,
|
2021-05-07 06:06:30 +02:00
|
|
|
HIT_RICOCHET,
|
2020-12-21 13:16:29 -03:00
|
|
|
HIT_SPECIAL,
|
|
|
|
MAX_HIT_EFFECT
|
|
|
|
};
|
|
|
|
|
2021-09-10 13:49:45 +03:00
|
|
|
enum ShatterType
|
|
|
|
{
|
|
|
|
SHT_NONE,
|
|
|
|
SHT_FRAGMENT,
|
|
|
|
SHT_EXPLODE
|
|
|
|
};
|
|
|
|
|
2020-12-21 13:16:29 -03:00
|
|
|
struct OBJECT_INFO
|
|
|
|
{
|
|
|
|
short nmeshes;
|
|
|
|
short meshIndex;
|
|
|
|
int boneIndex;
|
|
|
|
int frameBase;
|
|
|
|
std::function<void(short itemNumber)> initialise;
|
|
|
|
std::function<void(short itemNumber)> control;
|
2021-01-06 17:53:13 -03:00
|
|
|
std::function<std::optional<int>(short itemNumber, int x, int y, int z)> floor;
|
|
|
|
std::function<std::optional<int>(short itemNumber, int x, int y, int z)> ceiling;
|
2021-01-27 01:04:31 -03:00
|
|
|
std::function<int(short itemNumber)> floorBorder;
|
|
|
|
std::function<int(short itemNumber)> ceilingBorder;
|
2020-12-21 13:16:29 -03:00
|
|
|
std::function<void(ITEM_INFO* item)> drawRoutine;
|
|
|
|
std::function<void(ITEM_INFO* item)> drawRoutineExtra;
|
|
|
|
std::function<void(short item_num, ITEM_INFO* laraitem, COLL_INFO* coll)> collision;
|
|
|
|
ZoneType zoneType;
|
|
|
|
short animIndex;
|
|
|
|
short hitPoints;
|
|
|
|
short pivotLength;
|
|
|
|
short radius;
|
|
|
|
short shadowSize;
|
|
|
|
short biteOffset;
|
|
|
|
bool loaded;
|
|
|
|
bool intelligent;
|
|
|
|
bool nonLot;
|
|
|
|
bool savePosition;
|
|
|
|
bool saveHitpoints;
|
|
|
|
bool saveFlags;
|
|
|
|
bool saveAnim;
|
|
|
|
bool semiTransparent;
|
|
|
|
bool waterCreature;
|
|
|
|
bool usingDrawAnimatingItem;
|
|
|
|
HitEffectEnum hitEffect;
|
|
|
|
bool undead;
|
|
|
|
bool saveMesh;
|
|
|
|
bool friendly;
|
|
|
|
bool castShadows;
|
|
|
|
bool isPickup;
|
|
|
|
bool isPuzzleHole;
|
|
|
|
int meshSwapSlot;
|
|
|
|
DWORD explodableMeshbits;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct STATIC_INFO
|
|
|
|
{
|
|
|
|
int meshNumber;
|
|
|
|
int flags;
|
|
|
|
BOUNDING_BOX visibilityBox;
|
|
|
|
BOUNDING_BOX collisionBox;
|
|
|
|
int shatterType;
|
|
|
|
int shatterSound;
|
|
|
|
};
|
|
|
|
|
|
|
|
#define MAX_STATICS 1000
|
|
|
|
constexpr auto SF_NO_COLLISION = 0x01;
|
|
|
|
constexpr auto SF_SHATTERABLE = 0x02;
|
|
|
|
constexpr auto GRAVITY = 6;
|
|
|
|
constexpr auto SWAMP_GRAVITY = 2;
|
|
|
|
|
|
|
|
extern OBJECT_INFO Objects[ID_NUMBER_OBJECTS];
|
|
|
|
extern STATIC_INFO StaticObjects[MAX_STATICS];
|
|
|
|
|
|
|
|
void InitialiseGameFlags();
|
|
|
|
void InitialiseSpecialEffects();
|
|
|
|
void InitialiseHair();
|
2020-05-27 19:07:34 +02:00
|
|
|
void InitialiseObjects();
|