Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
CCmpMinimap Class Referencefinal
Inheritance diagram for CCmpMinimap:
Collaboration diagram for CCmpMinimap:

Public Member Functions

int GetComponentTypeId () const override
 
void Init (const CParamNode &paramNode) override
 
void Deinit () override
 
template<typename S >
void SerializeCommon (S &serialize)
 
void Serialize (ISerializer &serialize) override
 
void Deserialize (const CParamNode &paramNode, IDeserializer &deserialize) override
 
void HandleMessage (const CMessage &msg, bool global) override
 
bool GetRenderData (u8 &r, u8 &g, u8 &b, entity_pos_t &x, entity_pos_t &z) const override
 Gets the data for rendering this entity on the minimap. More...
 
bool CheckPing (double currentTime, double pingDuration) override
 Returns true if the entity is actively pinging based on the current time. More...
 
void UpdateColor () override
 Updates the entity's minimap color to match the player color. More...
 
bool HasIcon () override
 Returns true if a minimap should have icon of this entity. More...
 
std::string GetIconPath () override
 Returns a path to icon of this entity. More...
 
float GetIconSize () override
 
virtual bool GetRenderData (u8 &r, u8 &g, u8 &b, entity_pos_t &x, entity_pos_t &z) const =0
 Gets the data for rendering this entity on the minimap. More...
 
virtual bool CheckPing (double currentTime, double pingDuration)=0
 Returns true if the entity is actively pinging based on the current time. More...
 
virtual void UpdateColor ()=0
 Updates the entity's minimap color to match the player color. More...
 
virtual bool HasIcon ()=0
 Returns true if a minimap should have icon of this entity. More...
 
virtual std::string GetIconPath ()=0
 Returns a path to icon of this entity. More...
 
virtual float GetIconSize ()=0
 
- Public Member Functions inherited from IComponent
virtual ~IComponent ()
 
virtual void Init (const CParamNode &paramNode)=0
 
virtual void Deinit ()=0
 
virtual void HandleMessage (const CMessage &msg, bool global)
 
CEntityHandle GetEntityHandle () const
 
void SetEntityHandle (CEntityHandle ent)
 
entity_id_t GetEntityId () const
 
CEntityHandle GetSystemEntity () const
 
const CSimContextGetSimContext () const
 
void SetSimContext (const CSimContext &context)
 
virtual void Serialize (ISerializer &serialize)=0
 
virtual void Deserialize (const CParamNode &paramNode, IDeserializer &deserialize)=0
 
virtual bool NewJSObject (const ScriptInterface &scriptInterface, JS::MutableHandleObject out) const
 Returns false by default, indicating that a scripted wrapper of this IComponent is not supported. More...
 
virtual JS::Value GetJSInstance () const
 
virtual int GetComponentTypeId () const =0
 

Static Public Member Functions

static void ClassInit (CComponentManager &componentManager)
 
static IComponentAllocate (const ScriptInterface &, JS::HandleValue)
 
static void Deallocate (IComponent *cmp)
 
static std::string GetSchema ()
 
- Static Public Member Functions inherited from IComponent
static std::string GetSchema ()
 
static void RegisterComponentType (CComponentManager &mgr, EInterfaceId iid, EComponentTypeId cid, AllocFunc alloc, DeallocFunc dealloc, const char *name, const std::string &schema)
 
static void RegisterComponentTypeScriptWrapper (CComponentManager &mgr, EInterfaceId iid, EComponentTypeId cid, AllocFunc alloc, DeallocFunc dealloc, const char *name, const std::string &schema)
 
static u8 GetSerializationVersion ()
 

Public Attributes

bool m_UsePlayerColor
 
u8 m_R
 
u8 m_G
 
u8 m_B
 
bool m_Active
 
entity_pos_t m_X
 
entity_pos_t m_Z
 
double m_PingEndTime
 
bool m_IsPinging
 
bool m_HasIcon = false
 
std::string m_IconPath
 
float m_IconSize = 16.0f
 

Additional Inherited Members

- Public Types inherited from IComponent
using AllocFunc = IComponent *(*)(const ScriptInterface &scriptInterface, JS::HandleValue ctor)
 
using DeallocFunc = void(*)(IComponent *)
 

Member Function Documentation

◆ Allocate()

static IComponent * CCmpMinimap::Allocate ( const ScriptInterface ,
JS::HandleValue   
)
inlinestatic

◆ CheckPing()

bool CCmpMinimap::CheckPing ( double  currentTime,
double  pingDuration 
)
inlineoverridevirtual

Returns true if the entity is actively pinging based on the current time.

Implements ICmpMinimap.

◆ ClassInit()

static void CCmpMinimap::ClassInit ( CComponentManager componentManager)
inlinestatic

◆ Deallocate()

static void CCmpMinimap::Deallocate ( IComponent cmp)
inlinestatic

◆ Deinit()

void CCmpMinimap::Deinit ( )
inlineoverridevirtual

Implements IComponent.

◆ Deserialize()

void CCmpMinimap::Deserialize ( const CParamNode paramNode,
IDeserializer deserialize 
)
inlineoverridevirtual

Implements IComponent.

◆ GetComponentTypeId()

int CCmpMinimap::GetComponentTypeId ( ) const
inlineoverridevirtual

Implements IComponent.

◆ GetIconPath()

std::string CCmpMinimap::GetIconPath ( )
inlineoverridevirtual

Returns a path to icon of this entity.

Implements ICmpMinimap.

◆ GetIconSize()

float CCmpMinimap::GetIconSize ( )
inlineoverridevirtual

Implements ICmpMinimap.

◆ GetRenderData()

bool CCmpMinimap::GetRenderData ( u8 r,
u8 g,
u8 b,
entity_pos_t x,
entity_pos_t z 
) const
inlineoverridevirtual

Gets the data for rendering this entity on the minimap.

If it should not be drawn, returns false; otherwise the arguments are set to the color and world position.

Implements ICmpMinimap.

◆ GetSchema()

static std::string CCmpMinimap::GetSchema ( )
inlinestatic

◆ HandleMessage()

void CCmpMinimap::HandleMessage ( const CMessage msg,
bool  global 
)
inlineoverridevirtual

Reimplemented from IComponent.

◆ HasIcon()

bool CCmpMinimap::HasIcon ( )
inlineoverridevirtual

Returns true if a minimap should have icon of this entity.

Implements ICmpMinimap.

◆ Init()

void CCmpMinimap::Init ( const CParamNode paramNode)
inlineoverridevirtual

Implements IComponent.

◆ Serialize()

void CCmpMinimap::Serialize ( ISerializer serialize)
inlineoverridevirtual

Implements IComponent.

◆ SerializeCommon()

template<typename S >
void CCmpMinimap::SerializeCommon ( S &  serialize)
inline

◆ UpdateColor()

void CCmpMinimap::UpdateColor ( )
inlineoverridevirtual

Updates the entity's minimap color to match the player color.

Implements ICmpMinimap.

Member Data Documentation

◆ m_Active

bool CCmpMinimap::m_Active

◆ m_B

u8 CCmpMinimap::m_B

◆ m_G

u8 CCmpMinimap::m_G

◆ m_HasIcon

bool CCmpMinimap::m_HasIcon = false

◆ m_IconPath

std::string CCmpMinimap::m_IconPath

◆ m_IconSize

float CCmpMinimap::m_IconSize = 16.0f

◆ m_IsPinging

bool CCmpMinimap::m_IsPinging

◆ m_PingEndTime

double CCmpMinimap::m_PingEndTime

◆ m_R

u8 CCmpMinimap::m_R

◆ m_UsePlayerColor

bool CCmpMinimap::m_UsePlayerColor

◆ m_X

entity_pos_t CCmpMinimap::m_X

◆ m_Z

entity_pos_t CCmpMinimap::m_Z

The documentation for this class was generated from the following file: