2006-06-10 01:07:11 +02:00
|
|
|
//FormationCollection.h
|
2006-04-24 01:14:18 +02:00
|
|
|
//Andrew aka pyrolink: ajdecker1022@msn.com
|
|
|
|
|
2006-07-13 05:29:33 +02:00
|
|
|
//Nearly identical to EntityTemplateCollection and associates i.e. EntityTemplate, Entity.
|
2006-04-24 01:14:18 +02:00
|
|
|
//This is the manager of the entity formation "templates"
|
|
|
|
|
|
|
|
|
2006-06-10 01:07:11 +02:00
|
|
|
#ifndef FORMATION_COLLECTION_INCLUDED
|
|
|
|
#define FORMATION_COLLECTION_INCLUDED
|
2006-04-24 01:14:18 +02:00
|
|
|
|
|
|
|
#include <vector>
|
2006-06-02 04:10:27 +02:00
|
|
|
#include "ps/CStr.h"
|
|
|
|
#include "ps/Singleton.h"
|
2006-06-10 01:07:11 +02:00
|
|
|
#include "Formation.h"
|
2006-04-24 01:14:18 +02:00
|
|
|
|
2006-06-10 01:07:11 +02:00
|
|
|
#define g_EntityFormationCollection CFormationCollection::GetSingleton()
|
2006-04-24 01:14:18 +02:00
|
|
|
|
|
|
|
|
2006-06-10 01:07:11 +02:00
|
|
|
class CFormationCollection : public Singleton<CFormationCollection>
|
2006-04-24 01:14:18 +02:00
|
|
|
{
|
|
|
|
|
2006-06-10 01:07:11 +02:00
|
|
|
typedef std::map<CStrW, CFormation*> templateMap;
|
2006-04-24 01:14:18 +02:00
|
|
|
typedef std::map<CStrW, CStr> templateFilenameMap;
|
|
|
|
templateMap m_templates;
|
|
|
|
templateFilenameMap m_templateFilenames;
|
|
|
|
public:
|
2006-06-10 01:07:11 +02:00
|
|
|
~CFormationCollection();
|
2006-07-20 16:37:58 +02:00
|
|
|
CFormation* getTemplate( const CStrW& formationType );
|
2006-04-24 01:14:18 +02:00
|
|
|
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.
|
2006-06-10 01:07:11 +02:00
|
|
|
void getFormationNames( std::vector<CStrW>& names );
|
2006-04-24 01:14:18 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|