Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
GUIEditDisplay Class Reference

#include <GUIEditDisplay.h>

Inherits Display.

Public Member Functions

 GUIEditDisplay (void)
 
virtual ~GUIEditDisplay (void)
 
virtual void draw (void)
 Redraw the entire display.
 
virtual void drawLine (Int startX, Int startY, Int endX, Int endY, Real lineWidth, UnsignedInt lineColor)
 draw a line on the display in pixel coordinates with the specified color
 
virtual void drawLine (Int startX, Int startY, Int endX, Int endY, Real lineWidth, UnsignedInt lineColor1, UnsignedInt lineColor2)
 draw a line on the display in pixel coordinates with the specified 2 colors
 
virtual void drawOpenRect (Int startX, Int startY, Int width, Int height, Real lineWidth, UnsignedInt lineColor)
 draw a rect border on the display in pixel coordinates with the specified color
 
virtual void drawFillRect (Int startX, Int startY, Int width, Int height, UnsignedInt color)
 draw a filled rect on the display in pixel coords with the specified color
 
virtual void drawRectClock (Int startX, Int startY, Int width, Int height, Int percent, UnsignedInt color)
 Draw a percentage of a rectange, much like a clock.
 
virtual void drawRemainingRectClock (Int startX, Int startY, Int width, Int height, Int percent, UnsignedInt color)
 
virtual void drawImage (const Image *image, Int startX, Int startY, Int endX, Int endY, Color color=0xFFFFFFFF, DrawImageMode mode=DRAW_IMAGE_ALPHA)
 draw an image fit within the screen coordinates
 
virtual void setClipRegion (IRegion2D *region)
 image clipping support
 
virtual Bool isClippingEnabled (void)
 
virtual void enableClipping (Bool onoff)
 
virtual VideoBuffercreateVideoBuffer (void)
 Create a video buffer that can be used for this display.
 
virtual void drawVideoBuffer (VideoBuffer *buffer, Int startX, Int startY, Int endX, Int endY)
 draw a video buffer fit within the screen coordinates
 
virtual void takeScreenShot (void)
 saves screenshot to a file
 
virtual void toggleMovieCapture (void)
 starts saving frames to an avi or frame sequence
 
virtual void setTimeOfDay (TimeOfDay tod)
 Set the time of day for this display.
 
virtual void createLightPulse (const Coord3D *pos, const RGBColor *color, Real innerRadius, Real attenuationWidth, UnsignedInt increaseFrameTime, UnsignedInt decayFrameTime)
 
virtual void setShroudLevel (Int x, Int y, CellShroudStatus setting)
 set shroud
 
void setBorderShroudLevel (UnsignedByte level)
 color that will appear in unused border terrain.
 
virtual void clearShroud ()
 empty the entire shroud
 
virtual void preloadModelAssets (AsciiString model)
 preload model asset
 
virtual void preloadTextureAssets (AsciiString texture)
 preload texture asset
 
virtual void toggleLetterBox (void)
 enabled letter-boxed display
 
virtual void enableLetterBox (Bool enable)
 forces letter-boxed display on/off
 
virtual void doSmartAssetPurgeAndPreload (const char *usageFileName)
 
virtual Real getAverageFPS (void)
 returns the average FPS.
 
virtual Int getLastFrameDrawCalls (void)
 returns the number of draw calls issued in the previous frame
 
- Public Member Functions inherited from Display
 Display ()
 
virtual ~Display ()
 
virtual void init (void)
 
virtual void reset (void)
 Initialize.
 
virtual void update (void)
 Update system.
 
virtual void setWidth (UnsignedInt width)
 Sets the width of the display.
 
virtual void setHeight (UnsignedInt height)
 Sets the height of the display.
 
virtual UnsignedInt getWidth (void)
 Returns the width of the display.
 
virtual UnsignedInt getHeight (void)
 Returns the height of the display.
 
virtual void setBitDepth (UnsignedInt bitDepth)
 
virtual UnsignedInt getBitDepth (void)
 
virtual void setWindowed (Bool windowed)
 set windowd/fullscreen flag
 
virtual Bool getWindowed (void)
 return widowed/fullscreen flag
 
virtual Bool setDisplayMode (UnsignedInt xres, UnsignedInt yres, UnsignedInt bitdepth, Bool windowed)
 sets screen resolution/mode
 
virtual Int getDisplayModeCount (void)
 return number of display modes/resolutions supported by video card.
 
virtual void getDisplayModeDescription (Int modeIndex, Int *xres, Int *yres, Int *bitDepth)
 return description of mode
 
virtual void setGamma (Real gamma, Real bright, Real contrast, Bool calibrate)
 
virtual Bool testMinSpecRequirements (Bool *videoPassed, Bool *cpuPassed, Bool *memPassed, StaticGameLODLevel *idealVideoLevel=NULL, Real *cpuTime=NULL)
 
virtual void attachView (View *view)
 Attach the given view to the world.
 
virtual ViewgetFirstView (void)
 Return the first view of the world.
 
virtual ViewgetNextView (View *view)
 
virtual void drawViews (void)
 Render all views of the world.
 
virtual void updateViews (void)
 Updates state of world views.
 
virtual void playLogoMovie (AsciiString movieName, Int minMovieLength, Int minCopyrightLength)
 FullScreen video playback.
 
virtual void playMovie (AsciiString movieName)
 
virtual void stopMovie (void)
 
virtual Bool isMoviePlaying (void)
 
virtual void setDebugDisplayCallback (DebugDisplayCallback *callback, void *userData=NULL)
 Register debug display callback.
 
virtual DebugDisplayCallbackgetDebugDisplayCallback ()
 
virtual Bool isLetterBoxFading (void)
 returns true while letterbox fades in/out
 
virtual Bool isLetterBoxed (void)
 
virtual void setCinematicText (AsciiString string)
 
virtual void setCinematicFont (GameFont *font)
 
virtual void setCinematicTextFrames (Int frames)
 
- Public Member Functions inherited from SubsystemInterface
 SubsystemInterface ()
 
virtual ~SubsystemInterface ()
 
virtual void postProcessLoad ()
 
void UPDATE (void)
 
void DRAW (void)
 
AsciiString getName (void)
 
void setName (AsciiString name)
 

Additional Inherited Members

- Public Types inherited from Display
enum  DrawImageMode { DRAW_IMAGE_SOLID , DRAW_IMAGE_GRAYSCALE , DRAW_IMAGE_ALPHA , DRAW_IMAGE_ADDITIVE }
 
typedef void DebugDisplayCallback(DebugDisplayInterface *debugDisplay, void *userData, FILE *fp=NULL)
 
- Protected Member Functions inherited from Display
virtual void deleteViews (void)
 delete all views
 
- Protected Attributes inherited from Display
UnsignedInt m_width
 
UnsignedInt m_height
 Dimensions of the display.
 
UnsignedInt m_bitDepth
 bit depth of the display
 
Bool m_windowed
 TRUE when windowed, FALSE when fullscreen.
 
Viewm_viewList
 All of the views into the world.
 
AsciiString m_cinematicText
 string of the cinematic text that should be displayed
 
GameFontm_cinematicFont
 font for cinematic text
 
Int m_cinematicTextFrames
 count of how long the cinematic text should be displayed
 
VideoBufferm_videoBuffer
 Video playback buffer.
 
VideoStreamInterfacem_videoStream
 Video stream;.
 
AsciiString m_currentlyPlayingMovie
 The currently playing video. Used to notify TheScriptEngine of completed videos.
 
DebugDisplayInterfacem_debugDisplay
 Actual debug display.
 
DebugDisplayCallbackm_debugDisplayCallback
 Code to update the debug display.
 
void * m_debugDisplayUserData
 Data for debug display update handler.
 
Real m_letterBoxFadeLevel
 tracks the current alpha level for fading letter-boxed mode in/out.
 
Bool m_letterBoxEnabled
 current state of letterbox
 
UnsignedInt m_letterBoxFadeStartTime
 time of letterbox fade start
 
Int m_movieHoldTime
 time that we hold on the last frame of the movie
 
Int m_copyrightHoldTime
 time that the copyright must be on the screen
 
UnsignedInt m_elapsedMovieTime
 used to make sure we show the stuff long enough
 
UnsignedInt m_elapsedCopywriteTime
 Hold on the last frame until both have expired.
 
DisplayStringm_copyrightDisplayString
 this'll hold the display string
 
- Protected Attributes inherited from SubsystemInterface
AsciiString m_name
 

Detailed Description

Stripped down display for the GUI tool editor

Definition at line 64 of file GUIEditDisplay.h.

Constructor & Destructor Documentation

◆ GUIEditDisplay()

GUIEditDisplay::GUIEditDisplay ( void )

Definition at line 72 of file GUIEditDisplay.cpp.

◆ ~GUIEditDisplay()

GUIEditDisplay::~GUIEditDisplay ( void )
virtual

Definition at line 80 of file GUIEditDisplay.cpp.

Member Function Documentation

◆ clearShroud()

virtual void GUIEditDisplay::clearShroud ( )
inlinevirtual

empty the entire shroud

Implements Display.

Definition at line 115 of file GUIEditDisplay.h.

◆ createLightPulse()

virtual void GUIEditDisplay::createLightPulse ( const Coord3D * pos,
const RGBColor * color,
Real innerRadius,
Real attenuationWidth,
UnsignedInt increaseFrameTime,
UnsignedInt decayFrameTime )
inlinevirtual

Implements Display.

Definition at line 111 of file GUIEditDisplay.h.

◆ createVideoBuffer()

virtual VideoBuffer * GUIEditDisplay::createVideoBuffer ( void )
inlinevirtual

Create a video buffer that can be used for this display.

Implements Display.

Definition at line 101 of file GUIEditDisplay.h.

◆ doSmartAssetPurgeAndPreload()

virtual void GUIEditDisplay::doSmartAssetPurgeAndPreload ( const char * usageFileName)
inlinevirtual

Implements Display.

Definition at line 123 of file GUIEditDisplay.h.

◆ draw()

virtual void GUIEditDisplay::draw ( void )
inlinevirtual

Redraw the entire display.

Todo
Switch between in-game and shell interfaces

Reimplemented from Display.

Definition at line 72 of file GUIEditDisplay.h.

◆ drawFillRect()

void GUIEditDisplay::drawFillRect ( Int startX,
Int startY,
Int width,
Int height,
UnsignedInt color )
virtual

draw a filled rect on the display in pixel coords with the specified color

draw a filled rect on the display in pixel coords with the specified color

Implements Display.

Definition at line 115 of file GUIEditDisplay.cpp.

◆ drawImage()

void GUIEditDisplay::drawImage ( const Image * image,
Int startX,
Int startY,
Int endX,
Int endY,
Color color = 0xFFFFFFFF,
DrawImageMode mode = DRAW_IMAGE_ALPHA )
virtual

draw an image fit within the screen coordinates

draw an image fit within the screen coordinates

Implements Display.

Definition at line 129 of file GUIEditDisplay.cpp.

◆ drawLine() [1/2]

void GUIEditDisplay::drawLine ( Int startX,
Int startY,
Int endX,
Int endY,
Real lineWidth,
UnsignedInt lineColor )
virtual

draw a line on the display in pixel coordinates with the specified color

draw a line on the display in pixel coordinates with the specified color

Implements Display.

Definition at line 88 of file GUIEditDisplay.cpp.

◆ drawLine() [2/2]

virtual void GUIEditDisplay::drawLine ( Int startX,
Int startY,
Int endX,
Int endY,
Real lineWidth,
UnsignedInt lineColor1,
UnsignedInt lineColor2 )
inlinevirtual

draw a line on the display in pixel coordinates with the specified 2 colors

Implements Display.

Definition at line 77 of file GUIEditDisplay.h.

◆ drawOpenRect()

void GUIEditDisplay::drawOpenRect ( Int startX,
Int startY,
Int width,
Int height,
Real lineWidth,
UnsignedInt lineColor )
virtual

draw a rect border on the display in pixel coordinates with the specified color

draw a rect border on the display in pixel coordinates with the specified color

Implements Display.

Definition at line 101 of file GUIEditDisplay.cpp.

◆ drawRectClock()

virtual void GUIEditDisplay::drawRectClock ( Int startX,
Int startY,
Int width,
Int height,
Int percent,
UnsignedInt color )
inlinevirtual

Draw a percentage of a rectange, much like a clock.

Implements Display.

Definition at line 87 of file GUIEditDisplay.h.

◆ drawRemainingRectClock()

virtual void GUIEditDisplay::drawRemainingRectClock ( Int startX,
Int startY,
Int width,
Int height,
Int percent,
UnsignedInt color )
inlinevirtual

Implements Display.

Definition at line 88 of file GUIEditDisplay.h.

◆ drawVideoBuffer()

virtual void GUIEditDisplay::drawVideoBuffer ( VideoBuffer * buffer,
Int startX,
Int startY,
Int endX,
Int endY )
inlinevirtual

draw a video buffer fit within the screen coordinates

Implements Display.

Definition at line 104 of file GUIEditDisplay.h.

◆ enableClipping()

void GUIEditDisplay::enableClipping ( Bool onoff)
virtual

returns current state of 2D image clipping

Implements Display.

Definition at line 162 of file GUIEditDisplay.cpp.

◆ enableLetterBox()

virtual void GUIEditDisplay::enableLetterBox ( Bool enable)
inlinevirtual

forces letter-boxed display on/off

Implements Display.

Definition at line 119 of file GUIEditDisplay.h.

◆ getAverageFPS()

virtual Real GUIEditDisplay::getAverageFPS ( void )
inlinevirtual

returns the average FPS.

Implements Display.

Definition at line 128 of file GUIEditDisplay.h.

◆ getLastFrameDrawCalls()

virtual Int GUIEditDisplay::getLastFrameDrawCalls ( void )
inlinevirtual

returns the number of draw calls issued in the previous frame

Implements Display.

Definition at line 129 of file GUIEditDisplay.h.

◆ isClippingEnabled()

Bool GUIEditDisplay::isClippingEnabled ( void )
virtual

returns current state of 2D image clipping

Implements Display.

Definition at line 154 of file GUIEditDisplay.cpp.

◆ preloadModelAssets()

virtual void GUIEditDisplay::preloadModelAssets ( AsciiString model)
inlinevirtual

preload model asset

Implements Display.

Definition at line 116 of file GUIEditDisplay.h.

◆ preloadTextureAssets()

virtual void GUIEditDisplay::preloadTextureAssets ( AsciiString texture)
inlinevirtual

preload texture asset

Implements Display.

Definition at line 117 of file GUIEditDisplay.h.

◆ setBorderShroudLevel()

void GUIEditDisplay::setBorderShroudLevel ( UnsignedByte level)
inlinevirtual

color that will appear in unused border terrain.

Implements Display.

Definition at line 114 of file GUIEditDisplay.h.

◆ setClipRegion()

void GUIEditDisplay::setClipRegion ( IRegion2D * region)
virtual

image clipping support

sets clipping rectangle for 2D drawing operations

Implements Display.

Definition at line 146 of file GUIEditDisplay.cpp.

◆ setShroudLevel()

virtual void GUIEditDisplay::setShroudLevel ( Int x,
Int y,
CellShroudStatus setting )
inlinevirtual

set shroud

Implements Display.

Definition at line 113 of file GUIEditDisplay.h.

◆ setTimeOfDay()

virtual void GUIEditDisplay::setTimeOfDay ( TimeOfDay tod)
inlinevirtual

Set the time of day for this display.

Implements Display.

Definition at line 110 of file GUIEditDisplay.h.

◆ takeScreenShot()

virtual void GUIEditDisplay::takeScreenShot ( void )
inlinevirtual

saves screenshot to a file

Implements Display.

Definition at line 106 of file GUIEditDisplay.h.

◆ toggleLetterBox()

virtual void GUIEditDisplay::toggleLetterBox ( void )
inlinevirtual

enabled letter-boxed display

Implements Display.

Definition at line 118 of file GUIEditDisplay.h.

◆ toggleMovieCapture()

virtual void GUIEditDisplay::toggleMovieCapture ( void )
inlinevirtual

starts saving frames to an avi or frame sequence

Implements Display.

Definition at line 107 of file GUIEditDisplay.h.


The documentation for this class was generated from the following files: