GUIEditDisplay.h 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  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: GUIEditDisplay.h /////////////////////////////////////////////////////
  24. //-----------------------------------------------------------------------------
  25. //
  26. // Westwood Studios Pacific.
  27. //
  28. // Confidential Information
  29. // Copyright (C) 2001 - All Rights Reserved
  30. //
  31. //-----------------------------------------------------------------------------
  32. //
  33. // Project: RTS3
  34. //
  35. // File name: GUIEditDisplay.h
  36. //
  37. // Created: Colin Day, July 2001
  38. //
  39. // Desc: Display implementation for the GUI edit tool
  40. //
  41. //-----------------------------------------------------------------------------
  42. ///////////////////////////////////////////////////////////////////////////////
  43. #pragma once
  44. #ifndef __GUIEDITDISPLAY_H_
  45. #define __GUIEDITDISPLAY_H_
  46. // SYSTEM INCLUDES ////////////////////////////////////////////////////////////
  47. // USER INCLUDES //////////////////////////////////////////////////////////////
  48. #include "GameClient/Display.h"
  49. // FORWARD REFERENCES /////////////////////////////////////////////////////////
  50. class VideoBuffer;
  51. // TYPE DEFINES ///////////////////////////////////////////////////////////////
  52. // GUIEditDisplay -------------------------------------------------------------
  53. /** Stripped down display for the GUI tool editor */
  54. //-----------------------------------------------------------------------------
  55. class GUIEditDisplay : public Display
  56. {
  57. public:
  58. GUIEditDisplay( void );
  59. virtual ~GUIEditDisplay( void );
  60. virtual void draw( void ) { };
  61. /// draw a line on the display in pixel coordinates with the specified color
  62. virtual void drawLine( Int startX, Int startY, Int endX, Int endY,
  63. Real lineWidth, UnsignedInt lineColor );
  64. virtual void drawLine( Int startX, Int startY, Int endX, Int endY,
  65. Real lineWidth, UnsignedInt lineColor1, UnsignedInt lineColor2 ) { }
  66. /// draw a rect border on the display in pixel coordinates with the specified color
  67. virtual void drawOpenRect( Int startX, Int startY, Int width, Int height,
  68. Real lineWidth, UnsignedInt lineColor );
  69. /// draw a filled rect on the display in pixel coords with the specified color
  70. virtual void drawFillRect( Int startX, Int startY, Int width, Int height,
  71. UnsignedInt color );
  72. /// Draw a percentage of a rectange, much like a clock
  73. virtual void drawRectClock(Int startX, Int startY, Int width, Int height, Int percent, UnsignedInt color) { }
  74. virtual void drawRemainingRectClock(Int startX, Int startY, Int width, Int height, Int percent, UnsignedInt color) { }
  75. /// draw an image fit within the screen coordinates
  76. virtual void drawImage( const Image *image, Int startX, Int startY,
  77. Int endX, Int endY, Color color = 0xFFFFFFFF, DrawImageMode mode=DRAW_IMAGE_ALPHA);
  78. /// image clipping support
  79. virtual void setClipRegion( IRegion2D *region );
  80. virtual Bool isClippingEnabled( void );
  81. virtual void enableClipping( Bool onoff );
  82. // These are stub functions to allow compilation:
  83. /// Create a video buffer that can be used for this display
  84. virtual VideoBuffer* createVideoBuffer( void ) { return NULL; }
  85. /// draw a video buffer fit within the screen coordinates
  86. virtual void drawVideoBuffer( VideoBuffer *buffer, Int startX, Int startY,
  87. Int endX, Int endY ) { }
  88. virtual void takeScreenShot(void){ }
  89. virtual void toggleMovieCapture(void) {}
  90. // methods that we need to stub
  91. virtual void setTimeOfDay( TimeOfDay tod ) {}
  92. virtual void createLightPulse( const Coord3D *pos, const RGBColor *color, Real innerRadius, Real attenuationWidth,
  93. UnsignedInt increaseFrameTime, UnsignedInt decayFrameTime ) {}
  94. virtual void setShroudLevel(Int x, Int y, CellShroudStatus setting) {}
  95. void setBorderShroudLevel(UnsignedByte level){}
  96. virtual void clearShroud() {}
  97. virtual void preloadModelAssets( AsciiString model ) {}
  98. virtual void preloadTextureAssets( AsciiString texture ) {}
  99. virtual void toggleLetterBox(void) {}
  100. virtual void enableLetterBox(Bool enable) {}
  101. #if defined(_DEBUG) || defined(_INTERNAL)
  102. virtual void dumpModelAssets(const char *path) {}
  103. #endif
  104. virtual void doSmartAssetPurgeAndPreload(const char* usageFileName) {}
  105. #if defined(_DEBUG) || defined(_INTERNAL)
  106. virtual void dumpAssetUsage(const char* mapname) {}
  107. #endif
  108. virtual Real getAverageFPS(void) { return 0; }
  109. virtual Int getLastFrameDrawCalls( void ) { return 0; }
  110. protected:
  111. }; // end GUIEditDisplay
  112. // INLINING ///////////////////////////////////////////////////////////////////
  113. // EXTERNALS //////////////////////////////////////////////////////////////////
  114. #endif // __GUIEDITDISPLAY_H_