cepoly.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. //---------------------------------------------------------------------------
  2. //
  3. // cepoly.h - This file contains the class declarations for the polygon element
  4. //
  5. //---------------------------------------------------------------------------//
  6. // Copyright (C) Microsoft Corporation. All rights reserved. //
  7. //===========================================================================//
  8. #ifndef CEPOLY_H
  9. #define CEPOLY_H
  10. //---------------------------------------------------------------------------
  11. // Include files
  12. #ifndef CELEMENT_H
  13. #include "celement.h"
  14. #endif
  15. #ifndef VFX_H
  16. #include "vfx.h"
  17. #endif
  18. //---------------------------------------------------------------------------
  19. struct PolyElementData
  20. {
  21. long numVertices; //Actually num_vertices + extras for clipping
  22. SCRNVERTEX vertices[6]; //Draw Vertices
  23. bool correctTexture; //Should we Correctly Texture?
  24. bool isClipped; //Set by zclip to let me know
  25. bool drawTranslucent; //Used for FX
  26. bool StatusBar; //Is this a status bar?
  27. long BarWidth; //Width of status bar
  28. int BarColor; //Color of status bar
  29. MemoryPtr textureMap; //Pointer to Bitmap for Texture
  30. long width; //Width of texture
  31. long height; //Height of texture
  32. char *hazePalette; //Translucency/haze table
  33. void init (void)
  34. {
  35. numVertices = 0;
  36. correctTexture = FALSE;
  37. isClipped = FALSE;
  38. StatusBar=FALSE;
  39. textureMap = 0;
  40. width = 0;
  41. height = 0;
  42. hazePalette = NULL;
  43. drawTranslucent = FALSE;
  44. }
  45. PolyElementData (void)
  46. {
  47. init();
  48. }
  49. };
  50. typedef PolyElementData *PolyElementDataPtr;
  51. //---------------------------------------------------------------------------
  52. class PolygonElement : public Element
  53. {
  54. public:
  55. PolyElementData polyData;
  56. PolygonElement (void)
  57. {
  58. polyData.init();
  59. }
  60. PolygonElement (PolyElementDataPtr pData, long depth);
  61. virtual void draw (void);
  62. };
  63. //---------------------------------------------------------------------------
  64. #endif