0ad/source/simulation/BaseFormationCollection.h
pyrolink 3408b078b7 #Unit formations and rank textures
-Added functionality for "casting" and creating net messages (without
JS)
-Rank textures-specified in XML
-Formations-currently don't attack correctly (i.e. travel like mobs) and
don't switch to their movement formations when tasked to go somewhere
(the pathfinder doesn't give any heads up about destination reached, so
there's no way to change back to the original).  Also, base switching is
untested so no garuntees for next and prior formation things.

This was SVN commit r3710.
2006-03-31 03:30:34 +00:00

38 lines
1.1 KiB
C++

//BaseFormationCollection.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 BASEFORM_COLLECTION_INCLUDED
#define BASEFORM_COLLECTION_INCLUDED
#include <vector>
#include "CStr.h"
#include "Singleton.h"
#include "BaseFormation.h"
#define g_EntityFormationCollection CBaseFormationCollection::GetSingleton()
class CBaseFormationCollection : public Singleton<CBaseFormationCollection>
{
typedef std::map<CStrW, CBaseFormation*> templateMap;
typedef std::map<CStrW, CStr> templateFilenameMap;
templateMap m_templates;
templateFilenameMap m_templateFilenames;
public:
~CBaseFormationCollection();
CBaseFormation* 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 getBaseFormationNames( std::vector<CStrW>& names );
};
#endif