logistics.h 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. //******************************************************************************************
  2. // logistics.h - This file contains the logistics class header
  3. //
  4. // MechCommander 2
  5. //
  6. //---------------------------------------------------------------------------//
  7. // Copyright (C) Microsoft Corporation. All rights reserved. //
  8. //===========================================================================//
  9. #ifndef LOGISTICS_H
  10. #define LOGISTICS_H
  11. //----------------------------------------------------------------------------------
  12. // Include Files
  13. #ifndef MCLIB_H
  14. #include "mclib.h"
  15. #endif
  16. #ifndef MC2movie_H
  17. #include "mc2movie.h"
  18. #endif
  19. #include "LogisticsData.h"
  20. //----------------------------------------------------------------------------------
  21. // Macro Definitions
  22. #define log_DONE 0
  23. #define log_STARTMISSIONFROMCMDLINE 1
  24. #define log_SPLASH 2
  25. #define log_RESULTS 3
  26. #define log_ZONE 4
  27. class MissionResults;
  28. class MissionBegin;
  29. //----------------------------------------------------------------------------------
  30. class Logistics
  31. {
  32. protected:
  33. bool active; //Am I currently in control?
  34. long logisticsState;
  35. long prevState; //Used to cleanup previous state
  36. LogisticsData logisticsData;
  37. MissionResults* missionResults;
  38. MissionBegin* missionBegin;
  39. public:
  40. Logistics (void)
  41. {
  42. init();
  43. }
  44. ~Logistics (void)
  45. {
  46. destroy();
  47. }
  48. void init (void)
  49. {
  50. active = FALSE;
  51. missionResults = 0;
  52. missionBegin = 0;
  53. logisticsState = log_SPLASH;
  54. bMovie = NULL;
  55. }
  56. void destroy (void);
  57. void initSplashScreen (char *screenFile, char *artFile);
  58. void destroySplashScreen (void);
  59. void start (long logState); //Actually Starts execution of logistics in state Specified
  60. void stop (void); //Guess what this does!
  61. long update (void);
  62. void render (void);
  63. void setResultsHostLeftDlg( const char* pName );
  64. void setLogisticsState (long state)
  65. {
  66. prevState = logisticsState;
  67. logisticsState = state;
  68. }
  69. MissionBegin *getMissionBegin (void)
  70. {
  71. return missionBegin;
  72. }
  73. static int _stdcall beginMission( void*, int, void*[] );
  74. int DoBeginMission();
  75. void playFullScreenVideo( const char* fileName );
  76. MC2MoviePtr bMovie;
  77. private:
  78. void initializeLogData();
  79. bool bMissionLoaded;
  80. long lastMissionResult;
  81. };
  82. extern Logistics *logistics;
  83. //----------------------------------------------------------------------------------
  84. #endif