2
0

hudinfo.h 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  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. *** C O N F I D E N T I A L --- W E S T W O O D S T U D I O S ***
  20. ***********************************************************************************************
  21. * *
  22. * Project Name : Commando *
  23. * *
  24. * $Archive:: /Commando/Code/Combat/hudinfo.h $*
  25. * *
  26. * $Author:: Byon_g $*
  27. * *
  28. * $Modtime:: 1/03/02 6:57p $*
  29. * *
  30. * $Revision:: 10 $*
  31. * *
  32. *---------------------------------------------------------------------------------------------*
  33. * Functions: *
  34. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
  35. #ifndef HUDINFO_H
  36. #define HUDINFO_H
  37. #ifndef ALWAYS_H
  38. #include "always.h"
  39. #endif
  40. #ifndef PHYSICALGAMEOBJ_H
  41. #include "physicalgameobj.h"
  42. #endif
  43. #ifndef VECTOR3_H
  44. #include "vector3.h"
  45. #endif
  46. /*
  47. **
  48. */
  49. class HUDInfo
  50. {
  51. public:
  52. // Where is the camera looking?
  53. static void Set_Camera_Target_Position( const Vector3 & pos ) { CameraTargetPosition = pos; }
  54. static const Vector3 & Get_Camera_Target_Position( void ) { return CameraTargetPosition; }
  55. // Where is the Star's weapon pointing?
  56. static void Set_Weapon_Target_Position( const Vector3 & pos ) { WeaponTargetPosition = pos; }
  57. static const Vector3 & Get_Weapon_Target_Position( void ) { return WeaponTargetPosition; }
  58. static void Set_Weapon_Target_Object( DamageableGameObj * obj );
  59. static DamageableGameObj * Get_Weapon_Target_Object( void ) { return (DamageableGameObj*)WeaponTargetObject.Get_Ptr(); }
  60. // What object and building should we be displaying information for?
  61. static void Set_Info_Object( DamageableGameObj * obj, bool is_mct = false );
  62. static DamageableGameObj * Get_Info_Object( void ) { return (DamageableGameObj*)InfoObject.Get_Ptr(); }
  63. static bool Get_Info_Object_Is_MCT( void ) { return IsMCT; }
  64. static void Clear_Info_Object( void ) { InfoObject = NULL; }
  65. static void Update_Info_Object( void );
  66. // Should we display the action statusbar, and what is it currently at?
  67. static void Display_Action_Status_Bar( bool onoff ) { DisplayActionBar = onoff; }
  68. static bool Display_Action_Status_Bar( void ) { return DisplayActionBar; }
  69. static float Get_Action_Status_Value( void ) { return ActionStatusValue; }
  70. static void Set_Action_Status_Value( float value ) { ActionStatusValue = value; }
  71. static void Set_HUD_Help_Text( const WCHAR *string, const Vector3 &color = Vector3 (1.0F, 1.0F, 1.0F)) { HUDHelpText = string; HUDHelpTextColor = color; IsHUDHelpTextDirty = true; }
  72. static void Set_Is_HUD_Help_Text_Dirty( bool onoff ) { IsHUDHelpTextDirty = onoff; }
  73. static bool Is_HUD_Help_Text_Dirty( void ) { return IsHUDHelpTextDirty; }
  74. static const WideStringClass &Get_HUD_Help_Text( void ) { return HUDHelpText; }
  75. static const Vector3 & Get_HUD_Help_Text_Color( void ) { return HUDHelpTextColor; }
  76. private:
  77. static Vector3 CameraTargetPosition;
  78. static GameObjReference WeaponTargetObject;
  79. static Vector3 WeaponTargetPosition;
  80. static GameObjReference InfoObject;
  81. static float InfoObjectTimer;
  82. static bool DisplayActionBar;
  83. static float ActionStatusValue;
  84. static WideStringClass HUDHelpText;
  85. static bool IsHUDHelpTextDirty;
  86. static Vector3 HUDHelpTextColor;
  87. static bool IsMCT;
  88. };
  89. #endif // HUDINFO_H