ObjectAppearance.h 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. #ifndef OBJECTAPPEARANCE_H
  2. #define OBJECTAPPEARANCE_H
  3. /*************************************************************************************************\
  4. ObjectAppearance.h : Interface for the ObjectAppearance component, building and tree appearance
  5. keep their common elements here
  6. //---------------------------------------------------------------------------//
  7. // Copyright (C) Microsoft Corporation. All rights reserved. //
  8. //===========================================================================//
  9. \*************************************************************************************************/
  10. #ifndef APPEARANCE_H
  11. #include "Appear.h"
  12. #endif
  13. #ifndef DSTD_H
  14. #include "dstd.h"
  15. #endif
  16. #ifndef OBJSTATUS_H
  17. #include "objstatus.h"
  18. #endif
  19. //*************************************************************************************************
  20. // WEAPON TYPES
  21. #define MECH3D_WEAPONTYPE_NONE -1
  22. #define MECH3D_WEAPONTYPE_ANY 0
  23. #define MECH3D_WEAPONTYPE_MISSILE 1
  24. #define MECH3D_WEAPONTYPE_BALLISTIC 2
  25. #define MECH3D_WEAPONTYPE_NONENERGY 3
  26. #define MECH3D_WEAPONTYPE_ENERGY 4
  27. #define MECH3D_WEAPONTYPE_DIRECT 5
  28. // NOTES:
  29. // Each mech MUST have a place for each kind of weapon to fire.
  30. // I.e. There must be at least one zero OR at least a 3 and 4 OR at least a 1, 2 and 4 or its an ERROR!!!!!!!!
  31. typedef struct _NodeData
  32. {
  33. char *nodeId; //Used to determine where jumpjets, smoke and weapon fire come from.
  34. long weaponType; //What kind of weapon can use this node
  35. bool isRArmNode; //Used to stop firing from node when RArm is gone.
  36. bool isLArmNode; //Used to stop firing from node when LArm is gone.
  37. } NodeData;
  38. /**************************************************************************************************
  39. CLASS DESCRIPTION
  40. ObjectAppearance:
  41. **************************************************************************************************/
  42. class ObjectAppearance: public Appearance
  43. {
  44. public:
  45. float lightIntensity;
  46. Stuff::Vector2DOf<long> shapeMin;
  47. Stuff::Vector2DOf<long> shapeMax;
  48. Stuff::Vector3D position;
  49. float rotation;
  50. long selected; // actually a bit field...
  51. long teamId;
  52. long homeTeamRelationship;
  53. float actualRotation;
  54. long objectNameId;
  55. long damage;
  56. long pilotNameID;
  57. char pilotName[32];
  58. long paintScheme;
  59. MemoryPtr fadeTable;
  60. void setDamage( int Damage ) // editor uses this... nobody else should
  61. {
  62. damage = Damage;
  63. barStatus = Damage ? 0 : 1;
  64. if (Damage)
  65. setObjStatus(OBJECT_STATUS_DESTROYED); //Change the shape!!
  66. else
  67. setObjStatus(OBJECT_STATUS_NORMAL); //Change the shape!!
  68. }
  69. virtual void setHighlightColor( long argb )
  70. {
  71. highlightColor = argb;
  72. }
  73. virtual long getObjectNameId ()
  74. {
  75. return objectNameId;
  76. }
  77. virtual ~ObjectAppearance(){}
  78. protected:
  79. long highlightColor;
  80. ObjectAppearance(){ highlightColor = 0; damage = 0; lightIntensity = rotation = 0.0; selected = 0; pilotName[0] = 0;}
  81. /*
  82. private:
  83. ObjectAppearance( const ObjectAppearance& bjectAppearance );
  84. ObjectAppearance& operator=( const ObjectAppearance& bjectAppearance );
  85. */
  86. };
  87. //*************************************************************************************************
  88. #endif // end of file ( ObjectAppearance.h )