2006-04-24 01:14:18 +02:00
|
|
|
//Andrew aka pyrolink
|
|
|
|
//ajdecker1022@msn.com
|
|
|
|
//This class loads all the formation data needs to create an instance of a particular formation.
|
|
|
|
|
2006-06-10 01:07:11 +02:00
|
|
|
#ifndef FORMATION_INCLUDED
|
|
|
|
#define FORMATION_INCLUDED
|
2006-04-24 01:14:18 +02:00
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
#include <map>
|
2006-06-02 04:10:27 +02:00
|
|
|
#include "ps/XML/Xeromyces.h"
|
2006-04-24 01:14:18 +02:00
|
|
|
|
|
|
|
class CStr;
|
|
|
|
|
2006-06-10 01:07:11 +02:00
|
|
|
class CFormation
|
2006-04-24 01:14:18 +02:00
|
|
|
{
|
|
|
|
friend class CFormationManager;
|
2006-06-10 01:07:11 +02:00
|
|
|
friend class CFormationCollection;
|
2006-04-24 01:14:18 +02:00
|
|
|
friend class CEntityFormation;
|
|
|
|
|
|
|
|
struct FormationSlot
|
|
|
|
{
|
|
|
|
float fileOff; //Distance between files of this slot and the formation's center
|
|
|
|
float rankOff;
|
|
|
|
std::vector<CStr> category;
|
|
|
|
};
|
|
|
|
|
|
|
|
public:
|
2006-06-10 01:07:11 +02:00
|
|
|
CFormation();
|
|
|
|
~CFormation(){}
|
2006-04-24 01:14:18 +02:00
|
|
|
|
|
|
|
CStr GetBonus(){ return m_bonus; }
|
2006-05-04 06:14:48 +02:00
|
|
|
CStr GetBonusBase(){ return m_bonusBase; }
|
2006-04-24 01:14:18 +02:00
|
|
|
CStr GetBonusType(){ return m_bonusType; }
|
|
|
|
float GetBonusVal(){ return m_bonusVal; }
|
|
|
|
|
|
|
|
CStr GetPenalty(){ return m_penalty; }
|
2006-05-04 06:14:48 +02:00
|
|
|
CStr GetPenaltyBase(){ return m_penaltyBase; }
|
2006-04-24 01:14:18 +02:00
|
|
|
CStr GetPenaltyType(){ return m_penaltyType; }
|
|
|
|
float GetPenaltyVal(){ return m_penaltyVal; }
|
|
|
|
|
|
|
|
CStr GetAnglePenalty(){ return m_anglePenalty; }
|
|
|
|
CStr GetAnglePenaltyType(){ return m_anglePenaltyType; }
|
|
|
|
int GetAnglePenaltyDivs(){ return m_anglePenaltyDivs; }
|
|
|
|
float GetAnglePenaltyVal(){ return m_anglePenaltyVal; }
|
|
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
CStr m_tag;
|
|
|
|
CStr m_bonus;
|
2006-05-04 06:14:48 +02:00
|
|
|
CStr m_bonusBase;
|
2006-04-24 01:14:18 +02:00
|
|
|
CStr m_bonusType;
|
|
|
|
float m_bonusVal;
|
|
|
|
|
|
|
|
CStr m_penalty;
|
2006-05-04 06:14:48 +02:00
|
|
|
CStr m_penaltyBase;
|
2006-04-24 01:14:18 +02:00
|
|
|
CStr m_penaltyType;
|
|
|
|
float m_penaltyVal;
|
|
|
|
|
|
|
|
CStr m_anglePenalty;
|
|
|
|
int m_anglePenaltyDivs;
|
|
|
|
CStr m_anglePenaltyType;
|
|
|
|
float m_anglePenaltyVal;
|
|
|
|
|
|
|
|
int m_required;
|
|
|
|
CStr m_next;
|
|
|
|
CStr m_prior;
|
|
|
|
CStr m_movement;
|
|
|
|
float m_fileSpacing;
|
|
|
|
float m_rankSpacing;
|
|
|
|
|
|
|
|
int m_numSlots; //how many possible slots in this formation
|
|
|
|
int m_numRanks;
|
|
|
|
int m_numFiles;
|
|
|
|
|
|
|
|
//The key is the "order" of the slot
|
|
|
|
std::map<int, FormationSlot> m_slots;
|
|
|
|
|
|
|
|
bool loadXML(CStr filename);
|
|
|
|
void AssignCategory(int order, CStr category); //takes care of formatting strings
|
|
|
|
};
|
|
|
|
#endif
|
2006-05-04 06:14:48 +02:00
|
|
|
|