multihud.h 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. /*
  2. ** Command & Conquer Renegade(tm)
  3. ** Copyright 2025 Electronic Arts Inc.
  4. **
  5. ** This program is free software: you can redistribute it and/or modify
  6. ** it under the terms of the GNU General Public License as published by
  7. ** the Free Software Foundation, either version 3 of the License, or
  8. ** (at your option) any later version.
  9. **
  10. ** This program is distributed in the hope that it will be useful,
  11. ** but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. ** GNU General Public License for more details.
  14. **
  15. ** You should have received a copy of the GNU General Public License
  16. ** along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. */
  18. /***********************************************************************************************
  19. *** Confidential - Westwood Studios ***
  20. ***********************************************************************************************
  21. * *
  22. * Project Name : Commando *
  23. * *
  24. * $Archive:: /Commando/Code/Commando/multihud.h $*
  25. * *
  26. * $Author:: Tom_s $*
  27. * *
  28. * $Modtime:: 1/24/02 8:38p $*
  29. * *
  30. * $Revision:: 50 $*
  31. * *
  32. *---------------------------------------------------------------------------------------------*
  33. * Functions: *
  34. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
  35. #ifndef MULTIHUD_H
  36. #define MULTIHUD_H
  37. #if defined(_MSV_VER)
  38. #pragma once
  39. #endif
  40. #include "always.h"
  41. #include "gamemode.h"
  42. #include "bittype.h"
  43. class SmartGameObj;
  44. class Render2DTextClass;
  45. class Render2DSentenceClass;
  46. class Font3DInstanceClass;
  47. class NetworkObjectClass;
  48. class WideStringClass;
  49. enum PlayerlistFormatEnum
  50. {
  51. PLAYERLIST_FORMAT_TINY,
  52. PLAYERLIST_FORMAT_MEDIUM,
  53. PLAYERLIST_FORMAT_FULL,
  54. };
  55. //-----------------------------------------------------------------------------
  56. class MultiHUDClass : public GameModeClass {
  57. public:
  58. static void Init(void);
  59. static void Shutdown(void);
  60. static void Think(void);
  61. static void Render(void);
  62. static void Toggle();
  63. static bool Is_On();
  64. static void Render_Text(WideStringClass & text, float x, float y, ULONG color = 0xFFFFFFFF);
  65. static void Show_Player_Names(void);
  66. #ifdef WWDEBUG
  67. static void Render_Debug_Text(LPCSTR text, float x, float y, ULONG color = 0xFFFFFFFF);
  68. static void Show_Import_State_Counts(NetworkObjectClass *object);
  69. static void Show_Distance_And_Priority(NetworkObjectClass *object);
  70. static void Show_Player_Rhost_Data(SmartGameObj * smart_obj);
  71. static void Show_Description(NetworkObjectClass * p_object, float height_offset, float max_distance);
  72. static void Show_Spawner_Data(void);
  73. static void Show_Client_Rhost_Data(void);
  74. #endif
  75. static void Set_Bottom_Text_Y_Pos(float y) {BottomTextYPos = y;}
  76. static float Get_Bottom_Text_Y_Pos(void) {return BottomTextYPos;}
  77. /*
  78. static void Set_Verbose_Lists(bool flag) {VerboseLists = flag;}
  79. static bool Get_Verbose_Lists(void) {return VerboseLists;}
  80. static bool Toggle_Verbose_Lists(void) {VerboseLists = !VerboseLists; return VerboseLists;}
  81. */
  82. static void Set_Playerlist_Format(PlayerlistFormatEnum playerlist_format) {PlayerlistFormat = playerlist_format;}
  83. static PlayerlistFormatEnum Get_Playerlist_Format(void) {return PlayerlistFormat;}
  84. //static void Next_Playerlist_Format(void) {PlayerlistFormat++;}
  85. static void Next_Playerlist_Format(void);
  86. private:
  87. static const float MAX_OVERLAY_DISTANCE_M;
  88. static const float Y_INCREMENT_FACTOR;
  89. static float BottomTextYPos;
  90. #ifdef WWDEBUG
  91. static Render2DTextClass * PTextRenderer;
  92. static Font3DInstanceClass * PFont;
  93. #endif // WWDEBUG
  94. static Render2DSentenceClass* NameRenderer;
  95. //static bool VerboseLists;
  96. static bool IsOn;
  97. static PlayerlistFormatEnum PlayerlistFormat;
  98. };
  99. //-----------------------------------------------------------------------------
  100. #endif // MULTIHUD_H