trainingmission.h 3.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. /*
  2. ** Copyright (C) 1999 Microsoft Corporation. All Rights Reserved.
  3. **
  4. ** File: trainingmission.h
  5. **
  6. ** Author:
  7. **
  8. ** Description:
  9. ** Header file for the training library "trainingmission" interface.
  10. **
  11. ** History:
  12. */
  13. #ifndef _TRAINING_MISSION_H_
  14. #define _TRAINING_MISSION_H_
  15. #ifndef _GOAL_H_
  16. #include "Goal.h"
  17. #endif //_GOAL_H_
  18. namespace Training
  19. {
  20. //------------------------------------------------------------------------------
  21. // class definitions
  22. //------------------------------------------------------------------------------
  23. class TrainingMission
  24. {
  25. public:
  26. /* void */ TrainingMission (void);
  27. virtual /* void */ ~TrainingMission (void);
  28. virtual int GetMissionID (void) = 0;
  29. virtual SectorID GetStartSectorID (void) = 0;
  30. virtual void SetupShipAndCamera (void);
  31. void Start (void);
  32. bool Frame (void);
  33. void Terminate (void);
  34. void AddWaitCondition (Condition* pWaitCondition);
  35. virtual bool RecordKeyPress (TrekKey key);
  36. void AddKeyCondition (Condition* pKeyCondition);
  37. void RecordChat (ChatTarget recipient);
  38. void SetChatCondition (Condition* pChatCondition);
  39. virtual bool ShipLanded (void);
  40. virtual void ShipDied (ImodelIGC* pLauncher);
  41. virtual bool RestoreShip (void);
  42. IshipIGC* GetCommanderShip (void) const;
  43. void AddPartToShip (IshipIGC* pShip, PartID part, Mount mount, short ammo = 0);
  44. void AddPartToShip (PartID part, Mount mount, short ammo = 0);
  45. IshipIGC* CreateDrone (const ZString& name, ShipID shipID, HullID hullID, SideID sideID, PilotType pilotType);
  46. void SetSkipPostSlideshow (void);
  47. protected:
  48. virtual void CreateUniverse (void) = 0;
  49. virtual Condition* CreateMission (void) = 0;
  50. void LoadUniverse (const ZString& name, HullID hullID, StationID homeStationID);
  51. void DefaultLoadout (IshipIGC* pShip);
  52. void CreatePlayerInfo (IshipIGC* pShip, SideID side, ShipID shipID);
  53. Goal* CreatePlaySoundGoal (SoundID sound);
  54. Condition* CreateTooCloseCondition (TRef<ImodelIGC> place);
  55. Condition* CreateTooLongCondition (float fDelay, SoundID sound);
  56. protected:
  57. Condition* m_pCondition;
  58. Condition* m_pDeadCondition;
  59. std::list<Condition*> m_WaitConditionList;
  60. std::list<Condition*> m_KeyConditionList;
  61. Condition* m_pChatCondition;
  62. bool m_bMusicWasOn;
  63. float m_fHUDStyle;
  64. ObjectID m_commanderID;
  65. SectorID m_deadSectorID;
  66. TrekWindow::ViewMode m_deadViewMode;
  67. TrekWindow::CameraMode m_deadCameraMode;
  68. bool m_bSkipPostSlideShow;
  69. };
  70. //------------------------------------------------------------------------------
  71. }
  72. #endif //_TRAINING_MISSION_H_