123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206 |
- #ifndef LOGISTICSMISSIONINFO_H
- #define LOGISTICSMISSIONINFO_H
- /*************************************************************************************************\
- LogisticsMissionInfo.h : Interface for the LogisticsMissionInfo component.
- //---------------------------------------------------------------------------//
- // Copyright (C) Microsoft Corporation. All rights reserved. //
- //===========================================================================//
- \*************************************************************************************************/
- #ifndef ELIST_H
- #include "EList.h"
- #endif
- #include "EString.h"
- #define MAX_PLAYER_NAME_LENGTH 64
- //*************************************************************************************************
- class FitIniFile;
- /**************************************************************************************************
- CLASS DESCRIPTION
- LogisticsMissionInfo:
- **************************************************************************************************/
- class LogisticsMissionInfo
- {
- public:
- LogisticsMissionInfo();
- ~LogisticsMissionInfo();
-
-
- long init( FitIniFile& file ); // init campaign
- void save( FitIniFile& file );
- long load( FitIniFile& file );// init previously saved stuff
- long getAvailableMissions( const char** missions, int& numberOfEm );
- long getCurrentMissions( const char** missions, int& numberOfEm );
- bool getMissionAvailable( const char* missionName );
- bool isMissionComplete( const char* missionName );
- bool isSingleMission() const;
- long setNextMission( const char* missionName );
- void setMissionComplete( );
- long getCurrentLogisticsTuneId();
- long getCurrentMissionId();
-
- const EString& getCurrentPurchaseFile() const;
- const EString& getCurrentMission() const { return currentMissionName; }
- const EString& getLastMission() const { return lastMissionName; }
- long getCurrentDropWeight() const;
- const char* getCurrentVideo() const;
- const char* getCurrentOperationFile() const;
- const char* getCurrentMissionDescription() const;
- const char* getCurrentMissionFriendlyName() const;
- const char* getMissionFriendlyName( const char* missionName ) const;
- const char* getCurrentABLScriptName() const;
- int getCurrentRP() const;
- int getCBills() const { return CBills; }
- void incrementCBills(int amount) { CBills += amount; }
- void decrementCBills(int amount) { CBills -= amount; }
- const EString& getCampaignName( ) const { return campaignName; }
- const EString& getCampaignDisplayName() const { return campaignDisplayName; }
- bool campaignOver() const;
- const char* getCurrentBigVideo() const;
- const char* getFinalVideo() const;
- void setMultiplayer();
- void setPurchaseFile( const char* fileName );
- // long getMaxTeams() const { return maxTeams; }
- // long getMaxPlayers() const { return maxPlayers; }
- int getAdditionalPurachaseFiles( const char** list, long& maxCount );
- void addBonusPurchaseFile( const char* fileName ); // extra bonus
- bool skipLogistics();
- bool showChooseMission();
- bool skipPilotReview();
- bool skipSalvageScreen();
- bool skipPurchasing();
- void setSingleMission( const char* pName );
- bool canHaveSalavageCraft();
- bool canHaveRepairTruck();
- bool canHaveScoutCopter();
- bool canHaveArtilleryPiece();
- bool canHaveAirStrike();
- bool canHaveSensorStrike();
- bool canHaveMineLayer();
- bool getVideoShown();
- void setVideoShown();
- long getCurrentMissionNumber()
- {
- return currentMission;
- }
- void setCurrentMissionNumber(long cMission)
- {
- currentMission = cMission;
- }
-
- private:
-
- class MissionInfo
- {
- public:
- ~MissionInfo();
- EString missionDescriptiveName;
- EString fileName;
- EString description;
- EString purchaseFileName;
- EString videoName;
- bool mandatory;
- bool completePrevious;
- bool completed;
- long resourcePoints;
- long additionalCBills;
- long dropWeight;
- bool playLogistics;
- bool playSalvage;
- bool playPilotPromotion;
- bool playPurchasing;
- bool playMissionSelection;
- bool hidden;
- bool enableSalavageCraft;
- bool enableRepairTruck;
- bool enableScoutCopter;
- bool enableArtilleryPiece;
- bool enableAirStrike;
- bool enableSensorStrike;
- bool enableMineLayer;
- };
- typedef EList<MissionInfo*, MissionInfo*> MISSION_LIST;
- typedef EList< char*, char* > FILE_LIST;
- class MissionGroup
- {
- public:
- long numberToBeCompleted;
- EString videoFileName;
- EString operationFileName;
- EString bigVideoName;
- EString ablBrainName;
- long logisticsTuneId;
- MISSION_LIST infos;
- bool bigVideoShown;
- bool videoShown;
- };
- // DATA
- EString campaignName;
- EString campaignDisplayName;
- EString playerName;
- EString currentMissionName;
- EString finalVideoName;
- long currentStage;
- long currentMission;
- long lastStage;
- long lastMission;
- EString lastMissionName;
- MissionGroup* groups;
- long groupCount;
- long CBills;
- void clear();
- bool bMultiplayer;
- FILE_LIST additionalPurchaseFiles;
- LogisticsMissionInfo::MissionInfo* getPreviousMission();
- void readMissionInfo( FitIniFile& file, LogisticsMissionInfo::MissionInfo* pInfo );
- // HELPER FUNCTIONS
- };
- //*************************************************************************************************
- #endif // end of file ( LogisticsMissionInfo.h )
|