Team Fortress 2 Source Code as on 22/4/2020
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.

57 lines
1.8 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose: TF implementation of the IPresence interface
  4. //
  5. //=============================================================================
  6. #ifndef TF_TIPS_H
  7. #define TF_TIPS_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include "tf_shareddefs.h"
  12. struct CaptainCanteenAsset_t
  13. {
  14. char szImage[ MAX_PATH ];
  15. float flRarity;
  16. };
  17. //-----------------------------------------------------------------------------
  18. // Purpose: helper class for TF tips
  19. //-----------------------------------------------------------------------------
  20. class CTFTips : public CAutoGameSystem
  21. {
  22. public:
  23. CTFTips();
  24. virtual bool Init();
  25. virtual char const *Name() { return "CTFTips"; }
  26. const wchar_t *GetRandomTip( int &iClassUsed ); // iClassUsed will be filled in with the class that was selected
  27. const wchar_t *GetNextClassTip( int iClass );
  28. const wchar_t *GetArenaTip( void );
  29. const wchar_t *GetAbuseReportTip( void );
  30. const wchar_t *GetRandomMvMTip( int &iClassUsed ); // iClassUsed will be filled in with the class that was selected
  31. void GetRandomCaptainCanteenImages( const char **ppchBody, const char **ppchMisc, const char **ppchHat );
  32. private:
  33. const wchar_t *GetTip( int iClass, int iTip );
  34. const char *GetRandomCaptainCanteenAsset( CUtlVector< CaptainCanteenAsset_t > *pAssetBucket );
  35. int m_iTipCount[TF_LAST_NORMAL_CLASS+1]; // how many tips there are for each class
  36. int m_iTipCountAll; // how many tips there are total
  37. int m_iCurrentClassTip; // index of current per-class tip
  38. bool m_bInited; // have we been initialized
  39. int m_iArenaTipCount;
  40. int m_iMvMTipCount;
  41. CUtlVector< CaptainCanteenAsset_t > m_CaptainCanteenBody;
  42. CUtlVector< CaptainCanteenAsset_t > m_CaptainCanteenMisc;
  43. CUtlVector< CaptainCanteenAsset_t > m_CaptainCanteenHat;
  44. };
  45. extern CTFTips g_TFTips;
  46. #endif // TF_TIPS_H