2
0

inventory.h 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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/Combat/inventory.h $*
  25. * *
  26. * $Author:: Byon_g $*
  27. * *
  28. * $Modtime:: 8/15/01 11:36a $*
  29. * *
  30. * $Revision:: 3 $*
  31. * *
  32. *---------------------------------------------------------------------------------------------*
  33. * Functions: *
  34. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
  35. #ifndef INVENTORY_H
  36. #define INVENTORY_H
  37. #ifndef ALWAYS_H
  38. #include "always.h"
  39. #endif
  40. #ifndef SIMPLEVEC_H
  41. #include "simplevec.h"
  42. #endif
  43. #ifndef DAMAGE_H
  44. #include "damage.h"
  45. #endif
  46. class SoldierGameObj;
  47. /*
  48. ** InventoryClass is a black box used to remember the inventory of a soldier across levels
  49. */
  50. class InventoryClass {
  51. public:
  52. InventoryClass( void );
  53. ~InventoryClass( void );
  54. void Reset( void );
  55. void Store_Inventory( SoldierGameObj * soldier );
  56. void Restore_Inventory( SoldierGameObj * soldier );
  57. void Add_Weapon( int id, int rounds, bool has_weapon );
  58. private:
  59. struct WeaponAmmo {
  60. int WeaponID;
  61. int AmmoCount;
  62. bool HasWeapon;
  63. };
  64. SimpleDynVecClass<WeaponAmmo> WeaponAmmoList;
  65. ArmorType ShieldType;
  66. float ShieldStrength;
  67. float ShieldStrengthMax;
  68. float Health;
  69. float HealthMax;
  70. };
  71. #endif