#include <Display.h>
Inherits SubsystemInterface.
Inherited by GUIEditDisplay, and W3DDisplay.
Public Types | |
| enum | DrawImageMode { DRAW_IMAGE_SOLID , DRAW_IMAGE_GRAYSCALE , DRAW_IMAGE_ALPHA , DRAW_IMAGE_ADDITIVE } |
| typedef void | DebugDisplayCallback(DebugDisplayInterface *debugDisplay, void *userData, FILE *fp=NULL) |
Public Member Functions | |
| 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 | doSmartAssetPurgeAndPreload (const char *usageFileName)=0 |
| virtual void | attachView (View *view) |
| Attach the given view to the world. | |
| virtual View * | getFirstView (void) |
| Return the first view of the world. | |
| virtual View * | getNextView (View *view) |
| virtual void | drawViews (void) |
| Render all views of the world. | |
| virtual void | updateViews (void) |
| Updates state of world views. | |
| virtual VideoBuffer * | createVideoBuffer (void)=0 |
| Create a video buffer that can be used for this display. | |
| virtual void | setClipRegion (IRegion2D *region)=0 |
| Set clip rectangle for 2D draw operations. | |
| virtual Bool | isClippingEnabled (void)=0 |
| virtual void | enableClipping (Bool onoff)=0 |
| virtual void | draw (void) |
| Redraw the entire display. | |
| virtual void | setTimeOfDay (TimeOfDay tod)=0 |
| 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)=0 |
| virtual void | drawLine (Int startX, Int startY, Int endX, Int endY, Real lineWidth, UnsignedInt lineColor)=0 |
| 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)=0 |
| 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)=0 |
| 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)=0 |
| 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)=0 |
| 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)=0 |
| virtual void | drawImage (const Image *image, Int startX, Int startY, Int endX, Int endY, Color color=0xFFFFFFFF, DrawImageMode mode=DRAW_IMAGE_ALPHA)=0 |
| draw an image fit within the screen coordinates | |
| virtual void | drawVideoBuffer (VideoBuffer *buffer, Int startX, Int startY, Int endX, Int endY)=0 |
| draw a video buffer fit within the screen coordinates | |
| 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 DebugDisplayCallback * | getDebugDisplayCallback () |
| virtual void | setShroudLevel (Int x, Int y, CellShroudStatus setting)=0 |
| set shroud | |
| virtual void | clearShroud ()=0 |
| empty the entire shroud | |
| virtual void | setBorderShroudLevel (UnsignedByte level)=0 |
| color that will appear in unused border terrain. | |
| virtual void | preloadModelAssets (AsciiString model)=0 |
| preload model asset | |
| virtual void | preloadTextureAssets (AsciiString texture)=0 |
| preload texture asset | |
| virtual void | takeScreenShot (void)=0 |
| saves screenshot to a file | |
| virtual void | toggleMovieCapture (void)=0 |
| starts saving frames to an avi or frame sequence | |
| virtual void | toggleLetterBox (void)=0 |
| enabled letter-boxed display | |
| virtual void | enableLetterBox (Bool enable)=0 |
| forces letter-boxed display on/off | |
| 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) |
| virtual Real | getAverageFPS (void)=0 |
| returns the average FPS. | |
| virtual Int | getLastFrameDrawCalls (void)=0 |
| returns the number of draw calls issued in the previous frame | |
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) |
Protected Member Functions | |
| virtual void | deleteViews (void) |
| delete all views | |
Protected Attributes | |
| 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. | |
| View * | m_viewList |
| All of the views into the world. | |
| AsciiString | m_cinematicText |
| string of the cinematic text that should be displayed | |
| GameFont * | m_cinematicFont |
| font for cinematic text | |
| Int | m_cinematicTextFrames |
| count of how long the cinematic text should be displayed | |
| VideoBuffer * | m_videoBuffer |
| Video playback buffer. | |
| VideoStreamInterface * | m_videoStream |
| Video stream;. | |
| AsciiString | m_currentlyPlayingMovie |
| The currently playing video. Used to notify TheScriptEngine of completed videos. | |
| DebugDisplayInterface * | m_debugDisplay |
| Actual debug display. | |
| DebugDisplayCallback * | m_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. | |
| DisplayString * | m_copyrightDisplayString |
| this'll hold the display string | |
Protected Attributes inherited from SubsystemInterface | |
| AsciiString | m_name |
| typedef void Display::DebugDisplayCallback(DebugDisplayInterface *debugDisplay, void *userData, FILE *fp=NULL) |
| Display::Display | ( | ) |
Definition at line 44 of file Display.cpp.
|
virtual |
Destructor for the Display. Destroy all views attached to it.
Definition at line 77 of file Display.cpp.
|
virtual |
Attach the given view to the world.
Attach the given view to the world
Definition at line 105 of file Display.cpp.
|
pure virtual |
empty the entire shroud
Implemented in GUIEditDisplay, and W3DDisplay.
|
pure virtual |
Implemented in GUIEditDisplay, and W3DDisplay.
|
pure virtual |
Create a video buffer that can be used for this display.
Implemented in GUIEditDisplay, and W3DDisplay.
|
protectedvirtual |
|
pure virtual |
Implemented in GUIEditDisplay, and W3DDisplay.
|
virtual |
Redraw the entire display.
Reimplemented from SubsystemInterface.
Reimplemented in GUIEditDisplay, and W3DDisplay.
Definition at line 135 of file Display.cpp.
|
pure virtual |
draw a filled rect on the display in pixel coords with the specified color
Implemented in GUIEditDisplay, and W3DDisplay.
|
pure virtual |
draw an image fit within the screen coordinates
Implemented in GUIEditDisplay, and W3DDisplay.
|
pure virtual |
draw a line on the display in pixel coordinates with the specified color
Implemented in GUIEditDisplay, and W3DDisplay.
|
pure virtual |
draw a line on the display in pixel coordinates with the specified 2 colors
Implemented in GUIEditDisplay, and W3DDisplay.
|
pure virtual |
draw a rect border on the display in pixel coordinates with the specified color
Implemented in GUIEditDisplay, and W3DDisplay.
|
pure virtual |
Draw a percentage of a rectange, much like a clock.
Implemented in GUIEditDisplay, and W3DDisplay.
|
pure virtual |
Implemented in GUIEditDisplay, and W3DDisplay.
|
pure virtual |
draw a video buffer fit within the screen coordinates
Implemented in GUIEditDisplay, and W3DDisplay.
|
virtual |
Render all views of the world.
Render all views of the world
Definition at line 114 of file Display.cpp.
|
pure virtual |
Implemented in GUIEditDisplay, and W3DDisplay.
|
pure virtual |
forces letter-boxed display on/off
Implemented in GUIEditDisplay, and W3DDisplay.
|
pure virtual |
returns the average FPS.
Implemented in GUIEditDisplay, and W3DDisplay.
|
inlinevirtual |
|
virtual |
Definition at line 382 of file Display.cpp.
|
inlinevirtual |
return number of display modes/resolutions supported by video card.
Reimplemented in W3DDisplay.
|
inlinevirtual |
|
inlinevirtual |
|
pure virtual |
returns the number of draw calls issued in the previous frame
Implemented in GUIEditDisplay, and W3DDisplay.
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
Implements SubsystemInterface.
Reimplemented in W3DDisplay.
|
pure virtual |
Implemented in GUIEditDisplay, and W3DDisplay.
|
inlinevirtual |
Reimplemented in W3DDisplay.
|
inlinevirtual |
returns true while letterbox fades in/out
Reimplemented in W3DDisplay.
|
virtual |
Definition at line 363 of file Display.cpp.
|
virtual |
FullScreen video playback.
Definition at line 203 of file Display.cpp.
|
virtual |
Definition at line 236 of file Display.cpp.
|
pure virtual |
preload model asset
Implemented in GUIEditDisplay, and W3DDisplay.
|
pure virtual |
preload texture asset
Implemented in GUIEditDisplay, and W3DDisplay.
|
virtual |
Initialize.
Reset system
Implements SubsystemInterface.
Reimplemented in W3DDisplay.
Definition at line 347 of file Display.cpp.
|
inlinevirtual |
|
pure virtual |
color that will appear in unused border terrain.
Implemented in GUIEditDisplay, and W3DDisplay.
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
pure virtual |
Set clip rectangle for 2D draw operations.
Implemented in GUIEditDisplay, and W3DDisplay.
|
virtual |
Register debug display callback.
Definition at line 372 of file Display.cpp.
|
virtual |
sets screen resolution/mode
Sets screen resolution/mode
Reimplemented in W3DDisplay.
Definition at line 146 of file Display.cpp.
|
inlinevirtual |
Reimplemented in W3DDisplay.
|
virtual |
Sets the height of the display.
Set the height of the display
Reimplemented in W3DDisplay.
Definition at line 185 of file Display.cpp.
|
pure virtual |
set shroud
Implemented in GUIEditDisplay, and W3DDisplay.
|
pure virtual |
Set the time of day for this display.
Implemented in GUIEditDisplay, and W3DDisplay.
|
virtual |
Sets the width of the display.
Set the width of the display
Reimplemented in W3DDisplay.
Definition at line 170 of file Display.cpp.
|
inlinevirtual |
|
virtual |
Definition at line 268 of file Display.cpp.
|
pure virtual |
saves screenshot to a file
Implemented in GUIEditDisplay, and W3DDisplay.
|
pure virtual |
enabled letter-boxed display
Implemented in GUIEditDisplay, and W3DDisplay.
|
pure virtual |
starts saving frames to an avi or frame sequence
Implemented in GUIEditDisplay, and W3DDisplay.
|
virtual |
|
virtual |
Updates state of world views.
Updates all views of the world. This forces state variables to refresh without actually drawing anything.
Definition at line 126 of file Display.cpp.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |