DrawableInfo.h 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /*
  2. ** Command & Conquer Generals Zero Hour(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. // //
  20. // (c) 2001-2003 Electronic Arts Inc. //
  21. // //
  22. ////////////////////////////////////////////////////////////////////////////////
  23. // FILE: DrawableInfo.h ///////////////////////////////////////////////////////////////////////////////
  24. // Simple structure used to bind W3D renderObjects to our own Drawables.
  25. // Author: Mark Wilczynski, August 2002
  26. #pragma once
  27. #ifndef _DRAWABLEINFO_H_
  28. #define _DRAWABLEINFO_H_
  29. #include "Common/GameType.h"
  30. class Drawable;
  31. class GhostObject;
  32. class Object;
  33. struct DrawableInfo
  34. {
  35. enum ExtraRenderFlags
  36. { ERF_IS_NORMAL=0,
  37. ERF_IS_OCCLUDED= 0x00000001,
  38. ERF_POTENTIAL_OCCLUDER= 0x00000002,
  39. ERF_POTENTIAL_OCCLUDEE= 0x00000004,
  40. ERF_IS_TRANSLUCENT= 0x00000008,
  41. ERF_IS_NON_OCCLUDER_OR_OCCLUDEE = 0x00000010,
  42. ERF_DELAYED_RENDER = ERF_IS_TRANSLUCENT|ERF_POTENTIAL_OCCLUDEE,
  43. };
  44. DrawableInfo(void) : m_shroudStatusObjectID(INVALID_ID), m_drawable(NULL), m_ghostObject(NULL), m_flags(ERF_IS_NORMAL) {}
  45. ObjectID m_shroudStatusObjectID; ///<since we sometimes have drawables without objects, this points to a parent object from which we pull shroud status.
  46. Drawable *m_drawable; ///<pointer back to drawable containing this DrawableInfo
  47. GhostObject *m_ghostObject; ///<pointer to ghostObject for this drawable used for fogged versions.
  48. Int m_flags; ///<extra render settings flags that are tied to render objects with drawables.
  49. };
  50. #endif // _DRAWABLEINFO_H_