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.

75 lines
1.6 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //
  7. //=============================================================================//
  8. #ifndef C_SLIDESHOW_DISPLAY_H
  9. #define C_SLIDESHOW_DISPLAY_H
  10. #include "cbase.h"
  11. #include "utlvector.h"
  12. struct SlideMaterialList_t
  13. {
  14. char szSlideKeyword[64];
  15. CUtlVector<int> iSlideMaterials;
  16. CUtlVector<int> iSlideIndex;
  17. };
  18. class C_SlideshowDisplay : public C_BaseEntity
  19. {
  20. public:
  21. DECLARE_CLASS( C_SlideshowDisplay, CBaseEntity );
  22. DECLARE_CLIENTCLASS();
  23. C_SlideshowDisplay();
  24. virtual ~C_SlideshowDisplay();
  25. void Spawn( void );
  26. virtual void OnDataChanged( DataUpdateType_t updateType );
  27. void ClientThink( void );
  28. bool IsEnabled( void ) { return m_bEnabled; }
  29. void GetDisplayText( char *pchText ) { Q_strcpy( pchText, m_szDisplayText ); }
  30. int CurrentMaterialIndex( void ) { return m_iCurrentMaterialIndex; }
  31. int GetMaterialIndex( int iSlideIndex );
  32. int NumMaterials( void );
  33. int CurrentSlideIndex( void ) { return m_iCurrentSlideIndex; }
  34. private:
  35. void BuildSlideShowImagesList( void );
  36. private:
  37. bool m_bEnabled;
  38. char m_szDisplayText[ 128 ];
  39. char m_szSlideshowDirectory[ 128 ];
  40. CUtlVector<SlideMaterialList_t*> m_SlideMaterialLists;
  41. unsigned char m_chCurrentSlideLists[ 16 ];
  42. int m_iCurrentMaterialIndex;
  43. int m_iCurrentSlideIndex;
  44. float m_fMinSlideTime;
  45. float m_fMaxSlideTime;
  46. float m_NextSlideTime;
  47. int m_iCycleType;
  48. bool m_bNoListRepeats;
  49. int m_iCurrentSlideList;
  50. int m_iCurrentSlide;
  51. };
  52. extern CUtlVector< C_SlideshowDisplay* > g_SlideshowDisplays;
  53. #endif //C_SLIDESHOW_STATS_DISPLAY_H