LoadScreen.h 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. #ifndef LOADSCREEN_H
  2. #define LOADSCREEN_H
  3. /*************************************************************************************************\
  4. LoadScreen.h : Interface for the LoadScreen component.
  5. //---------------------------------------------------------------------------//
  6. // Copyright (C) Microsoft Corporation. All rights reserved. //
  7. //===========================================================================//
  8. \*************************************************************************************************/
  9. #ifndef LOGISTICSSCREEN_H
  10. #include "LogisticsScreen.h"
  11. #endif
  12. #ifndef AANIM_H
  13. #include "aAnim.h"
  14. #endif
  15. struct TGAFileHeader;
  16. class FitIniFile;
  17. struct tagRECT;
  18. struct _DDSURFACEDESC2;
  19. //*************************************************************************************************
  20. class LoadScreen;
  21. /**************************************************************************************************
  22. CLASS DESCRIPTION
  23. LoadScreen:
  24. **************************************************************************************************/
  25. class LoadScreenWrapper : public LogisticsScreen
  26. {
  27. public:
  28. LoadScreenWrapper();
  29. virtual ~LoadScreenWrapper();
  30. void init( FitIniFile& file );
  31. virtual void update();
  32. virtual void render( int xOffset, int yOffset );
  33. virtual void begin();
  34. static LoadScreen* enterScreen;
  35. static LoadScreen* exitScreen;
  36. static void changeRes();
  37. bool waitForResChange;
  38. bool bFirstTime;
  39. };
  40. class LoadScreen: public LogisticsScreen
  41. {
  42. public:
  43. LoadScreen();
  44. virtual ~LoadScreen();
  45. void init( FitIniFile& file, DWORD neverFlush = 0 );
  46. virtual void update();
  47. virtual void render( int xOffset, int yOffset );
  48. virtual void begin();
  49. void resetExitAnims();
  50. void setupOutAnims();
  51. static void changeRes(FitIniFile& file);
  52. private:
  53. LoadScreen( const LoadScreen& src );
  54. LoadScreen& operator=( const LoadScreen& oadScreen );
  55. static TGAFileHeader* progressTextureMemory;
  56. static TGAFileHeader* progressBackground;
  57. static TGAFileHeader* mergedTexture;
  58. static TGAFileHeader* waitingForPlayersMemory;
  59. static long xProgressLoc;
  60. static long yProgressLoc;
  61. static long xWaitLoc;
  62. static long yWaitLoc;
  63. friend void ProgressTimer( tagRECT& WinRect, _DDSURFACEDESC2& );
  64. friend class Mission;
  65. //Must needs be static cause we create a new one when the res changes!!
  66. // This will erase the hardmouse status and we always use async mouse then!
  67. static bool turnOffAsyncMouse;
  68. aAnimation outAnims[5];
  69. aAnimation inAnims[5];
  70. aText text;
  71. int* animIndices;
  72. };
  73. //*************************************************************************************************
  74. #endif // end of file ( LoadScreen.h )