Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

70 lines
3.3 KiB

  1. #ifndef _INCLUDED_IASW_MISSION_CHOOSER_SOURCE_H
  2. #define _INCLUDED_IASW_MISSION_CHOOSER_SOURCE_H
  3. #ifdef _WIN32
  4. #pragma once
  5. #endif
  6. #include "tier0/platform.h"
  7. struct ASW_Mission_Chooser_Mission
  8. {
  9. char m_szMissionName[64];
  10. };
  11. struct ASW_Mission_Chooser_Saved_Campaign
  12. {
  13. char m_szSaveName[64];
  14. char m_szCampaignName[64];
  15. char m_szDateTime[64];
  16. int m_iMissionsComplete;
  17. char m_szPlayerNames[256];
  18. char m_szPlayerIDs[512];
  19. bool m_bMultiplayer;
  20. };
  21. #define ASW_MISSIONS_PER_PAGE 8
  22. #define ASW_CAMPAIGNS_PER_PAGE 3
  23. #define ASW_SAVES_PER_PAGE 8
  24. abstract_class IASW_Mission_Chooser_Source
  25. {
  26. public:
  27. virtual void Think() = 0;
  28. virtual void IdleThink() = 0;
  29. virtual void FindMissions(int nMissionOffset, int iNumSlots, bool bRequireOverview) = 0;
  30. virtual ASW_Mission_Chooser_Mission* GetMissions() = 0; // pass an array of mission names back
  31. virtual ASW_Mission_Chooser_Mission* GetMission( int nIndex, bool bRequireOverview ) = 0; // may return NULL if asking for a mission outside of the found range
  32. virtual int GetNumMissions(bool bRequireOverview) = 0;
  33. virtual void FindCampaigns(int nCampaignOffset, int iNumSlots) = 0;
  34. virtual ASW_Mission_Chooser_Mission* GetCampaigns() = 0; // Passes an array of campaign names back
  35. virtual ASW_Mission_Chooser_Mission* GetCampaign( int nIndex ) = 0; // may return NULL when requesting a campaign outside the found range
  36. virtual int GetNumCampaigns() = 0;
  37. virtual void FindSavedCampaigns(int page, int iNumSlots, bool bMultiplayer, const char *szFilterID) = 0;
  38. virtual ASW_Mission_Chooser_Saved_Campaign* GetSavedCampaigns() = 0; // passes an array of summary data for each save
  39. virtual ASW_Mission_Chooser_Saved_Campaign* GetSavedCampaign( int nIndex, bool bMultiplayer, const char *szFilterID ) = 0; // may return NULL when requesting a save outside the found range
  40. virtual int GetNumSavedCampaigns(bool bMultiplayer, const char *szFilterID) = 0;
  41. virtual void RefreshSavedCampaigns() = 0; // call when the saved campaigns list is dirty and should be refreshed
  42. virtual int GetNumMissionsCompleted(const char *szSaveName) = 0;
  43. virtual void OnSaveDeleted(const char *szSaveName) = 0; // call when a particular save has been deleted
  44. virtual void OnSaveUpdated(const char *szSaveName) = 0; // call when a particular save has been updated
  45. // following only supporter by the local mission source
  46. virtual bool MissionExists(const char *szMapName, bool bRequireOverview) = 0;
  47. virtual bool CampaignExists(const char *szCampaignName) = 0;
  48. virtual bool SavedCampaignExists(const char *szSaveName) = 0;
  49. virtual bool ASW_Campaign_CreateNewSaveGame(char *szFileName, int iFileNameMaxLen, const char *szCampaignName, bool bMultiplayerGame) = 0;
  50. virtual void NotifySaveDeleted(const char *szSaveName) = 0;
  51. virtual const char* GetCampaignSaveIntroMap(const char* szSaveName) = 0; // returns the intro map for the campaign that this save uses
  52. // returns nice version of the filenames (i.e. title from the overview.txt or from the campaign txt)
  53. virtual const char* GetPrettyMissionName(const char *szMapName) = 0;
  54. virtual const char* GetPrettyCampaignName(const char *szCampaignName) = 0;
  55. virtual const char* GetPrettySavedCampaignName(const char *szSaveName) = 0;
  56. // needed by network source
  57. virtual void ResetCurrentPage() = 0;
  58. };
  59. #endif // _INCLUDED_IASW_MISSION_CHOOSER_SOURCE_H