Spore ModAPI  2.4.0
API for creating C++ mods for Spore
Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
Simulator::cToolManager Class Reference

#include <ToolManager.h>

Inheritance diagram for Simulator::cToolManager:
Simulator::cStrategy App::IUnmanagedMessageListener Simulator::ISimulatorStrategy IVirtual

Public Types

enum  ToolFailText {
  kCantUseInThisSystem = 0, kMustUseOnPlanet = 1, kRanOutOfAmmo = 2, kRecharging = 3,
  kMustBeUsedOnEmpirePlanet = 4, kMustBeUsedOnAlienColony = 5, kMustBeUsedOnYourColony = 6, kCanOnlyHaveOnePerPlanet = 7,
  kNoRoomInFleet = 8, kAlreadyHaveMiniU = 9, kSystemMustHaveTradeRoute = 0x0A, kMustBeOnHighestTech = 0x0B,
  kAnimalMustBePresentOnPlanet = 0x0C, kCannotUseMonolith = 0x0D, kCantUseOnEmpireSystems = 0x0E, kCantUseOnWildlifeSanctuary = 0x0F,
  kMustBeOnWildPlanets = 0x10, kNeedHigherTerrascore = 0x11, kCantUseOnHomeworld = 0x12, kEnergyIsFull = 0x13,
  kHealthIsFull = 0x14, kCantUseOverWater = 0x15, kCantUseAboveACity = 0x16, kYouAreTooHighUp = 0x17,
  kStarSystemAlreadyHasSentient = 0x18, kCantPlaceMoreColoniesWithCurrentTScore = 0x19
}
 
enum  Messages { kMsgToolActivated = 0x61DAE5C, kMsgToolDeactivated = 0x61DAE65 }
 

Public Member Functions

bool LoadTool (const ResourceKey &id, intrusive_ptr< cSpaceToolData > &dst)
 
cToolStrategyGetStrategy (uint32_t strategyID)
 
void AddStrategy (cToolStrategy *pStrategy, uint32_t id)
 
const char16_t * GetToolFailText (ToolFailText index)
 
bool ActivateTool (cSpaceToolData *pTool)
 
bool DeactivateTool (cSpaceToolData *pTool)
 
bool OnMouseUp (cSpaceToolData *pTool)
 
- Public Member Functions inherited from Simulator::ISimulatorStrategy
virtual int AddRef ()=0
 
virtual int Release ()=0
 
virtual void Initialize ()=0
 
virtual void Dispose ()=0
 
virtual const char * GetName ()=0
 
virtual void OnModeExited (uint32_t previousModeID, uint32_t newModeID)=0
 
virtual void OnModeEntered (uint32_t previousModeID, uint32_t newModeID)=0
 
virtual int func1Ch ()=0
 
virtual int func20h ()=0
 
virtual bool func24h ()=0
 
virtual bool Write (void *)=0
 
virtual bool Read (void *)=0
 
virtual void func30h (int)=0
 
virtual bool func34h (int)=0
 
virtual void Update (int deltaTime, int deltaGameTime)=0
 
virtual void PostUpdate (int deltaTime, int deltaGameTime)=0
 
virtual void func40h (int)=0
 
virtual void func44h (int)=0
 
virtual void func48h ()=0
 
virtual void func4Ch ()=0
 
- Public Member Functions inherited from IVirtual
virtual ~IVirtual ()
 
- Public Member Functions inherited from App::IUnmanagedMessageListener
virtual ~IUnmanagedMessageListener ()
 
virtual bool HandleMessage (uint32_t messageID, void *pMessage)=0
 Called every time a message is received. More...
 

Static Public Member Functions

static cToolManagerGet ()
 Returns the active Simulator tool manager. More...
 

Protected Attributes

int field_20
 
int field_24
 
int field_28
 
Math::Vector3 field_2C
 
hash_map< uint32_t, intrusive_ptr< cToolStrategy > > mStrategies
 
map< int, int > field_58
 
LocalizedString mToolFailTexts [26]
 
int field_27C
 
int field_280
 
int field_284
 
int field_288
 
int field_28C
 
Math::Vector3 field_290
 
- Protected Attributes inherited from Simulator::cStrategy
int mnRefCount
 
int field_C
 
int field_10
 
int field_14
 
int field_18
 

Member Enumeration Documentation

◆ Messages

Enumerator
kMsgToolActivated 
kMsgToolDeactivated 

◆ ToolFailText

Enumerator
kCantUseInThisSystem 
kMustUseOnPlanet 
kRanOutOfAmmo 
kRecharging 
kMustBeUsedOnEmpirePlanet 
kMustBeUsedOnAlienColony 
kMustBeUsedOnYourColony 
kCanOnlyHaveOnePerPlanet 
kNoRoomInFleet 
kAlreadyHaveMiniU 
kSystemMustHaveTradeRoute 
kMustBeOnHighestTech 
kAnimalMustBePresentOnPlanet 
kCannotUseMonolith 
kCantUseOnEmpireSystems 
kCantUseOnWildlifeSanctuary 
kMustBeOnWildPlanets 
kNeedHigherTerrascore 
kCantUseOnHomeworld 
kEnergyIsFull 
kHealthIsFull 
kCantUseOverWater 
kCantUseAboveACity 
kYouAreTooHighUp 
kStarSystemAlreadyHasSentient 
kCantPlaceMoreColoniesWithCurrentTScore 

Member Function Documentation

◆ ActivateTool()

bool Simulator::cToolManager::ActivateTool ( cSpaceToolData pTool)

◆ AddStrategy()

void Simulator::cToolManager::AddStrategy ( cToolStrategy pStrategy,
uint32_t  id 
)

◆ DeactivateTool()

bool Simulator::cToolManager::DeactivateTool ( cSpaceToolData pTool)

◆ Get()

static cToolManager* Simulator::cToolManager::Get ( )
static

Returns the active Simulator tool manager.

Same as ToolManager().

◆ GetStrategy()

cToolStrategy* Simulator::cToolManager::GetStrategy ( uint32_t  strategyID)

◆ GetToolFailText()

const char16_t* Simulator::cToolManager::GetToolFailText ( ToolFailText  index)

◆ LoadTool()

bool Simulator::cToolManager::LoadTool ( const ResourceKey id,
intrusive_ptr< cSpaceToolData > &  dst 
)

◆ OnMouseUp()

bool Simulator::cToolManager::OnMouseUp ( cSpaceToolData pTool)

Member Data Documentation

◆ field_20

int Simulator::cToolManager::field_20
protected

◆ field_24

int Simulator::cToolManager::field_24
protected

◆ field_27C

int Simulator::cToolManager::field_27C
protected

◆ field_28

int Simulator::cToolManager::field_28
protected

◆ field_280

int Simulator::cToolManager::field_280
protected

◆ field_284

int Simulator::cToolManager::field_284
protected

◆ field_288

int Simulator::cToolManager::field_288
protected

◆ field_28C

int Simulator::cToolManager::field_28C
protected

◆ field_290

Math::Vector3 Simulator::cToolManager::field_290
protected

◆ field_2C

Math::Vector3 Simulator::cToolManager::field_2C
protected

◆ field_58

map<int, int> Simulator::cToolManager::field_58
protected

◆ mStrategies

hash_map<uint32_t, intrusive_ptr<cToolStrategy> > Simulator::cToolManager::mStrategies
protected

◆ mToolFailTexts

LocalizedString Simulator::cToolManager::mToolFailTexts[26]
protected

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