forked from 0ad/0ad
janwas
73683b6109
. the massive renaming undertaking: camelCase functions -> PascalCase. . add some cppdoc. . minor additional renaming improvements: e.g. GetIsClosed -> IsClosed . in entity code, replace constructs like "pvec = new vector; return pvec; use *pvec; delete pvec" with a simple stack variable passed as output parameter (avoid unnecessary dynamic allocs) . timer: simpler handling of raw ticks vs normal timer (less #if) This was SVN commit r5017.
38 lines
1.0 KiB
C++
38 lines
1.0 KiB
C++
//FormationCollection.h
|
|
//Andrew aka pyrolink: ajdecker1022@msn.com
|
|
|
|
//Nearly identical to EntityTemplateCollection and associates i.e. EntityTemplate, Entity.
|
|
//This is the manager of the entity formation "templates"
|
|
|
|
|
|
#ifndef FORMATION_COLLECTION_INCLUDED
|
|
#define FORMATION_COLLECTION_INCLUDED
|
|
|
|
#include <vector>
|
|
#include "ps/CStr.h"
|
|
#include "ps/Singleton.h"
|
|
#include "Formation.h"
|
|
|
|
#define g_EntityFormationCollection CFormationCollection::GetSingleton()
|
|
|
|
|
|
class CFormationCollection : public Singleton<CFormationCollection>
|
|
{
|
|
|
|
typedef std::map<CStrW, CFormation*> templateMap;
|
|
typedef std::map<CStrW, CStr> templateFilenameMap;
|
|
templateMap m_templates;
|
|
templateFilenameMap m_templateFilenames;
|
|
public:
|
|
~CFormationCollection();
|
|
CFormation* GetTemplate( const CStrW& formationType );
|
|
int LoadTemplates();
|
|
void LoadFile( const char* path );
|
|
|
|
// Create a list of the names of all base entities, excluding template_*,
|
|
// for display in ScEd's entity-selection box.
|
|
void GetFormationNames( std::vector<CStrW>& names );
|
|
};
|
|
|
|
#endif
|