123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602 |
- #ifndef __MAPMAKERIGC_H_
- #define __MAPMAKERIGC_H_
- typedef Slist_utl<ImapMakerIGC*> MapMakerListIGC;
- typedef Slink_utl<ImapMakerIGC*> MapMakerLinkIGC;
- const int c_MaxClustersPerMap = 50;
- const int c_NumClusterNames = 68;
- const int c_NumberOfPlanetPosters = 25;
- const int c_FriendlyAleph = 0;
- const int c_EnemyAleph = 1;
- const int c_PlayerToNeutralAleph = 2;
- const int c_NeutralToPlayerAleph = 3;
- const int c_NeutralAleph = 4;
- const int c_HiddenToPlayerAleph = 5;
- class CMapData
- {
- protected:
- static const char * smszClusterName[c_NumClusterNames];
- protected:
- ImissionIGC * mpMission;
- const MissionParams * mpMissionParams;
- Time mNow;
-
-
-
- SectorID mClusterNamesLeft[c_NumClusterNames];
- SectorID mcClusterNamesLeft;
-
-
-
-
- IclusterIGC * mpCluster[c_MaxClustersPerMap];
- SideID msideIDCluster[c_MaxClustersPerMap];
-
-
-
- SectorID mcTeamClustersPerTeam;
- SectorID mcNeutralClustersPerTeam;
- SectorID mcOtherClusters;
- WarpID mIDNextWarp;
- public:
- CMapData();
- ~CMapData();
-
-
-
- ImissionIGC * GetMission()
- { return(mpMission); }
- const MissionParams * GetMissionParams()
- { return(mpMissionParams); }
- Time GetTime()
- { return(mNow); }
- IclusterIGC * GetCluster(SectorID sID)
- { return(mpCluster[sID]); }
- SideID GetClusterSide(SectorID sID)
- { return(msideIDCluster[sID]); }
- SectorID GetTeamClustersPerTeam()
- { return(mcTeamClustersPerTeam); }
- SectorID GetNeutralClustersPerTeam()
- { return(mcNeutralClustersPerTeam); }
- SectorID GetClustersPerTeam()
- { return(mcTeamClustersPerTeam + mcNeutralClustersPerTeam); }
- SideID GetTeams()
- { return(mpMissionParams->nTeams); }
- SectorID GetTeamClusters()
- { return(GetTeamClustersPerTeam() * GetTeams()); }
- SectorID GetNeutralClusters()
- { return(GetNeutralClustersPerTeam() * GetTeams()); }
- SectorID GetTotalClusters()
- { return(GetClustersPerTeam() * GetTeams() + mcOtherClusters); }
- SectorID GetOtherClusters()
- { return(mcOtherClusters); }
- short GetPlayerClusterMineableAsteroids()
- { return(mpMissionParams->nPlayerSectorMineableAsteroids); }
- short GetPlayerClusterSpecialAsteroids()
- { return(mpMissionParams->nPlayerSectorSpecialAsteroids); }
- short GetPlayerClusterGenericAsteroids()
- { return(mpMissionParams->nPlayerSectorAsteroids); }
- short GetPlayerClusterTreasure()
- { return(mpMissionParams->nPlayerSectorTreasures); }
- short GetNeutralClusterMineableAsteroids()
- { return(mpMissionParams->nNeutralSectorMineableAsteroids); }
- short GetNeutralClusterSpecialAsteroids()
- { return(mpMissionParams->nNeutralSectorSpecialAsteroids); }
- short GetNeutralClusterGenericAsteroids()
- { return(mpMissionParams->nNeutralSectorAsteroids); }
- short GetNeutralClusterTreasure()
- { return(mpMissionParams->nNeutralSectorTreasures); }
- short GetMinableAsteroids(void)
- {
- return mpMissionParams->nPlayerSectorMineableAsteroids *
- GetTeamClusters() +
- mpMissionParams->nNeutralSectorMineableAsteroids *
- (GetOtherClusters() + GetNeutralClusters());
- }
- short GetPlayerStartTSI()
- { return mpMissionParams->tsiPlayerStart; }
- short GetNeutralStartTSI()
- { return mpMissionParams->tsiNeutralStart; }
- short GetMaxPlayersOnTeam()
- { return(mpMissionParams->nMaxPlayersPerTeam); }
- short GetMaxPlayersInMission()
- { return(GetMaxPlayersOnTeam() * GetTeams()); }
- CivID GetCivID(SideID sideID)
- { return(mpMissionParams->rgCivID[sideID]); }
- WarpID GetNextWarpID()
- { return(mIDNextWarp++); }
-
-
-
- VOID SetMission(ImissionIGC * pMission)
- { mpMission = pMission; }
- VOID SetMissionParams(const MissionParams * pMissionParams)
- { mpMissionParams = pMissionParams; }
- VOID SetTime(Time now)
- { mNow = now; }
- VOID SetTeamClustersPerTeam(SectorID sID)
- { mcTeamClustersPerTeam = sID; }
- VOID SetNeutralClustersPerTeam(SectorID sID)
- { mcNeutralClustersPerTeam = sID; }
- VOID SetOtherClusters(SectorID sID)
- { mcOtherClusters = sID; }
- VOID SetCluster(SectorID sID, IclusterIGC * pCluster, SideID sideID);
- VOID SetClusterSide(SectorID sID, SideID sideID)
- { msideIDCluster[sID] = sideID; }
-
-
-
- VOID GetNewClusterName(CHAR * szClusterName);
- } ;
- class CmapMakerIGC : public ImapMakerIGC
- {
- protected:
- static const char * smszPlanetName[c_NumberOfPlanetPosters];
- MapMakerID mMMID;
- char mszName[c_cbDescription + 4];
- public:
- static const char* IsValid(const MissionParams* pmp)
- {
- return NULL;
- }
- CmapMakerIGC();
- virtual ~CmapMakerIGC();
- virtual MapMakerID GetMapMakerID() const { return(mMMID); }
- virtual VOID SetMapMakerID(MapMakerID mmID) { mMMID = mmID; }
- virtual char const* GetName() const
- { return(mszName); }
- virtual VOID SetName(const char * newVal)
- { strcpy(mszName, newVal); }
- virtual VOID GenerateMission(Time now,
- const MissionParams * pmp,
- ImissionIGC * pMission);
-
-
-
-
- virtual VOID GenerateTeamClusterScreenPosition(
- CMapData * pMapData,
- DataClusterIGC * pdc,
- SectorID sID);
- virtual IclusterIGC * GenerateTeamCluster(CMapData * pMapData,
- SectorID sID);
- virtual VOID GenerateNeutralClusterScreenPosition(
- CMapData * pMapData,
- DataClusterIGC * pdc,
- SectorID sID);
- virtual IclusterIGC * GenerateNeutralCluster(CMapData * pMapData,
- SectorID sID);
- virtual VOID GenerateRingClusters(CMapData * pMapData);
- virtual VOID GenerateWarp(CMapData* pMapData,
- IclusterIGC* pCluster,
- DataWarpIGC* pdw);
- virtual VOID LinkClusters(CMapData* pMapData,
- SectorID sID1,
- SectorID sID2,
- int alephType = NA);
- virtual VOID CrossLinkClusters(CMapData * pMapData,
- SectorID sFirstID);
- virtual VOID LinkClusters(CMapData * pMapData);
- virtual VOID GenerateLayout(CMapData * pMapData);
- virtual VOID GenerateStarbase(CMapData * pMapData,
- IclusterIGC* pcluster);
- virtual VOID PopulateCluster(CMapData* pMapData,
- IclusterIGC* pcluster,
- float amountHe3);
- virtual VOID PopulateClusters(CMapData * pMapData);
- virtual VOID RevealHomeClusters(ImissionIGC * pMission);
- virtual VOID RevealMap(ImissionIGC * pMission);
- virtual VOID ActivateSides(ImissionIGC * pMission);
- } ;
- class CmapMakerSingleRingIGC : public CmapMakerIGC
- {
- public:
- static const char* IsValid(const MissionParams* pmp)
- {
- return NULL;
- }
- };
- class CmapMakerDoubleRingIGC : public CmapMakerIGC
- {
- public:
- static const char* IsValid(const MissionParams* pmp)
- {
- return NULL;
- }
- CmapMakerDoubleRingIGC();
- virtual VOID GenerateTeamClusterScreenPosition(
- CMapData * pMapData,
- DataClusterIGC * pdc,
- SectorID sID);
- virtual VOID GenerateNeutralClusterScreenPosition(
- CMapData * pMapData,
- DataClusterIGC * pdc,
- SectorID sID);
- virtual VOID LinkClusters(CMapData * pMapData);
- } ;
- class CmapMakerHiLoIGC : public CmapMakerIGC
- {
- public:
- static const char* IsValid(const MissionParams* pmp)
- {
- return NULL;
- }
- CmapMakerHiLoIGC();
- virtual VOID GenerateLayout(CMapData * pMapData);
- virtual VOID GenerateTeamClusterScreenPosition(
- CMapData * pMapData,
- DataClusterIGC * pdc,
- SectorID sID);
- virtual VOID GenerateNeutralClusterScreenPosition(
- CMapData * pMapData,
- DataClusterIGC * pdc,
- SectorID sID);
- virtual VOID LinkClusters(CMapData * pMapData);
- } ;
- class CmapMakerHiHigherIGC : public CmapMakerIGC
- {
- public:
- static const char* IsValid(const MissionParams* pmp)
- {
- return NULL;
- }
- CmapMakerHiHigherIGC();
- virtual VOID GenerateLayout(CMapData * pMapData);
- virtual VOID GenerateTeamClusterScreenPosition(
- CMapData * pMapData,
- DataClusterIGC * pdc,
- SectorID sID);
- virtual VOID GenerateNeutralClusterScreenPosition(
- CMapData * pMapData,
- DataClusterIGC * pdc,
- SectorID sID);
- virtual VOID LinkClusters(CMapData * pMapData);
- } ;
- class CmapMakerStarIGC : public CmapMakerIGC
- {
- public:
- static const char* IsValid(const MissionParams* pmp)
- {
- return NULL;
- }
- CmapMakerStarIGC();
- virtual VOID GenerateLayout(CMapData * pMapData);
- virtual VOID GenerateTeamClusterScreenPosition(
- CMapData * pMapData,
- DataClusterIGC * pdc,
- SectorID sID);
- virtual VOID GenerateNeutralClusterScreenPosition(
- CMapData * pMapData,
- DataClusterIGC * pdc,
- SectorID sID);
- virtual VOID LinkClusters(CMapData * pMapData);
- } ;
- class CmapMakerBigRingIGC : public CmapMakerIGC
- {
- public:
- static const char* IsValid(const MissionParams* pmp)
- {
- return NULL;
- }
- CmapMakerBigRingIGC();
- virtual VOID GenerateLayout(CMapData * pMapData);
- virtual VOID GenerateTeamClusterScreenPosition(
- CMapData * pMapData,
- DataClusterIGC * pdc,
- SectorID sID);
- virtual VOID GenerateNeutralClusterScreenPosition(
- CMapData * pMapData,
- DataClusterIGC * pdc,
- SectorID sID);
- virtual VOID LinkClusters(CMapData * pMapData);
- } ;
- class CmapMakerBrawlIGC : public CmapMakerIGC
- {
- public:
- static const char* IsValid(const MissionParams* pmp);
- CmapMakerBrawlIGC();
- virtual VOID GenerateLayout(CMapData * pMapData);
- virtual VOID GenerateNeutralClusterScreenPosition(
- CMapData * pMapData,
- DataClusterIGC * pdc,
- SectorID sID);
- virtual VOID LinkClusters(CMapData * pMapData);
- virtual VOID PopulateCluster(CMapData* pMapData,
- IclusterIGC* pcluster,
- float amountHe3);
- } ;
- class CmapMakerPinWheelIGC : public CmapMakerIGC
- {
- public:
- static const char* IsValid(const MissionParams* pmp);
- CmapMakerPinWheelIGC();
- virtual VOID GenerateLayout(CMapData * pMapData);
- virtual VOID GenerateNeutralClusterScreenPosition(
- CMapData * pMapData,
- DataClusterIGC * pdc,
- SectorID sID);
- virtual VOID LinkClusters(CMapData * pMapData);
- virtual VOID PopulateCluster(CMapData* pMapData,
- IclusterIGC* pcluster,
- float amountHe3);
- } ;
- class CmapMakerDiamondRingIGC : public CmapMakerIGC
- {
- public:
- static const char* IsValid(const MissionParams* pmp);
- CmapMakerDiamondRingIGC();
- virtual VOID GenerateLayout(CMapData * pMapData);
- virtual VOID GenerateTeamClusterScreenPosition(
- CMapData * pMapData,
- DataClusterIGC * pdc,
- SectorID sID);
- virtual VOID GenerateNeutralClusterScreenPosition(
- CMapData * pMapData,
- DataClusterIGC * pdc,
- SectorID sID);
- virtual VOID LinkClusters(CMapData * pMapData);
- } ;
- class CmapMakerSnowFlakeIGC : public CmapMakerIGC
- {
- public:
- static const char* IsValid(const MissionParams* pmp)
- {
- return NULL;
- }
- CmapMakerSnowFlakeIGC();
- virtual VOID GenerateLayout(CMapData * pMapData);
- virtual VOID GenerateTeamClusterScreenPosition(
- CMapData * pMapData,
- DataClusterIGC * pdc,
- SectorID sID);
- virtual VOID GenerateNeutralClusterScreenPosition(
- CMapData * pMapData,
- DataClusterIGC * pdc,
- SectorID sID);
- virtual VOID LinkClusters(CMapData * pMapData);
- } ;
- class CmapMakerLargeSplitIGC : public CmapMakerHiHigherIGC
- {
- public:
- static const char* IsValid(const MissionParams* pmp);
- CmapMakerLargeSplitIGC();
- };
- class CmapMakerInsideOutIGC : public CmapMakerHiHigherIGC
- {
- public:
- static const char* IsValid(const MissionParams* pmp)
- {
- return NULL;
- }
- CmapMakerInsideOutIGC();
- };
- class CmapMakerGridIGC : public CmapMakerIGC
- {
- public:
- static const char* IsValid(const MissionParams* pmp)
- {
- return NULL;
- }
- CmapMakerGridIGC();
- virtual VOID GenerateLayout(CMapData * pMapData);
- virtual VOID GenerateTeamClusterScreenPosition(
- CMapData * pMapData,
- DataClusterIGC * pdc,
- SectorID sID);
- virtual VOID GenerateNeutralClusterScreenPosition(
- CMapData * pMapData,
- DataClusterIGC * pdc,
- SectorID sID);
- virtual VOID LinkClusters(CMapData * pMapData);
- };
- class CmapMakerEastWestIGC : public CmapMakerIGC
- {
- public:
- static const char* IsValid(const MissionParams* pmp);
- CmapMakerEastWestIGC();
- virtual VOID GenerateLayout(CMapData * pMapData);
- virtual VOID GenerateTeamClusterScreenPosition(
- CMapData * pMapData,
- DataClusterIGC * pdc,
- SectorID sID);
- virtual VOID GenerateNeutralClusterScreenPosition(
- CMapData * pMapData,
- DataClusterIGC * pdc,
- SectorID sID);
- virtual VOID LinkClusters(CMapData * pMapData);
- virtual VOID PopulateCluster(CMapData* pMapData,
- IclusterIGC* pcluster,
- float amountHe3);
- };
- class CmapMakerSplitBaseIGC : public CmapMakerIGC
- {
- public:
- static const char* IsValid(const MissionParams* pmp);
- CmapMakerSplitBaseIGC();
- virtual VOID GenerateLayout(CMapData * pMapData);
- virtual VOID GenerateTeamClusterScreenPosition(
- CMapData * pMapData,
- DataClusterIGC * pdc,
- SectorID sID);
- virtual VOID GenerateNeutralClusterScreenPosition(
- CMapData * pMapData,
- DataClusterIGC * pdc,
- SectorID sID);
- virtual VOID LinkClusters(CMapData * pMapData);
- } ;
- #endif
|