1
0
forked from 0ad/0ad
0ad/source/simulation/FormationCollection.h
Matei 8d06d8601b A few organization changes:
- Removed "Base" from the Technology and Formation class names (it
doesn't make sense because these don't use inheritance).
- Modified the tech methods a little so a player ID is passed to
applyEffects, not getTechnology.

Also added a game startup script which will eventually set up player
resource pools and give them their civ techs.

This was SVN commit r3996.
2006-06-09 23:07:11 +00:00

38 lines
1.0 KiB
C++

//FormationCollection.h
//Andrew aka pyrolink: ajdecker1022@msn.com
//Nearly identical to BaseEntityCollection and associates i.e. BaseEntity, 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( 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