2022-01-23 08:54:49 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <stddef.h>
|
|
|
|
#include <stdint.h>
|
|
|
|
|
2022-02-13 09:44:39 +00:00
|
|
|
#include "maptypes.h"
|
2022-01-23 08:54:49 +00:00
|
|
|
#include "dobject.h"
|
|
|
|
#include "m_fixed.h"
|
|
|
|
#include "m_random.h"
|
|
|
|
|
|
|
|
class FScanner;
|
|
|
|
class FInternalLightAssociation;
|
|
|
|
|
2022-01-23 18:03:14 +00:00
|
|
|
enum EDefaultFlags
|
|
|
|
{
|
|
|
|
DEFF_PICNUM = 1,
|
|
|
|
DEFF_STATNUM = 2,
|
|
|
|
};
|
|
|
|
|
2022-01-23 08:54:49 +00:00
|
|
|
struct FActorInfo
|
|
|
|
{
|
|
|
|
TArray<FInternalLightAssociation *> LightAssociations;
|
2022-01-25 23:36:34 +00:00
|
|
|
TArray<int> SpriteSet;
|
2022-01-23 08:54:49 +00:00
|
|
|
PClassActor *Replacement = nullptr;
|
|
|
|
PClassActor *Replacee = nullptr;
|
|
|
|
int TypeNum = -1;
|
2022-01-23 18:03:14 +00:00
|
|
|
int DefaultFlags = 0;
|
|
|
|
int DefaultCstat = 0;
|
2022-11-17 17:38:25 +00:00
|
|
|
int Health = 0; // not used yet - this will stand in if no CON defines a health value for Duke.
|
2022-01-23 08:54:49 +00:00
|
|
|
|
2022-01-16 23:51:40 +00:00
|
|
|
// these are temporary. Due to how Build games handle their tiles, we cannot look up the textures when scripts are being parsed.
|
|
|
|
TArray<FString> SpriteSetNames;
|
|
|
|
|
2022-01-23 08:54:49 +00:00
|
|
|
FActorInfo() = default;
|
2022-11-14 17:15:58 +00:00
|
|
|
FActorInfo(const FActorInfo& other)
|
|
|
|
{
|
|
|
|
// only copy the fields that get inherited
|
|
|
|
TypeNum = other.TypeNum;
|
|
|
|
DefaultFlags = other.DefaultFlags;
|
|
|
|
DefaultCstat = other.DefaultCstat;
|
|
|
|
SpriteSetNames = other.SpriteSetNames;
|
|
|
|
}
|
|
|
|
|
2022-11-19 09:58:35 +00:00
|
|
|
void ResolveTextures(const char* clsname, DCoreActor *defaults);
|
2022-01-23 08:54:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
// No objects of this type will be created ever - its only use is to static_cast
|
|
|
|
// PClass to it.
|
|
|
|
class PClassActor : public PClass
|
|
|
|
{
|
|
|
|
protected:
|
|
|
|
public:
|
|
|
|
static void StaticInit ();
|
|
|
|
|
|
|
|
void BuildDefaults();
|
|
|
|
void ApplyDefaults(uint8_t *defaults);
|
|
|
|
bool SetReplacement(FName replaceName);
|
|
|
|
void InitializeDefaults();
|
|
|
|
|
|
|
|
FActorInfo *ActorInfo() const
|
|
|
|
{
|
|
|
|
return (FActorInfo*)Meta;
|
|
|
|
}
|
|
|
|
|
|
|
|
PClassActor *GetReplacement();
|
|
|
|
PClassActor *GetReplacee();
|
|
|
|
|
|
|
|
// For those times when being able to scan every kind of actor is convenient
|
|
|
|
inline static TArray<PClassActor *> AllActorClasses;
|
|
|
|
};
|
|
|
|
|