ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

Implements a specialised surface that represents the screen. More...

#include <screen.h>

Inheritance diagram for Graphics::Screen:
Collaboration diagram for Graphics::Screen:

List of all members.

Public Member Functions

 Screen ()
 Screen (int width, int height)
 Screen (int width, int height, PixelFormat pixelFormat)
bool isDirty () const
 Returns true if there are any pending screen updates (dirty areas).
void makeAllDirty ()
 Marks the whole screen as dirty.
virtual void clearDirtyRects ()
 Clear the current dirty rects list.
virtual void update ()
 Updates the screen by copying any affected areas to the system.
void getPalette (byte palette[PALETTE_SIZE])
 Return the currently active palette.
void getPalette (byte *palette, uint start, uint num)
 Return a portion of the currently active palette.
void setPalette (const byte palette[PALETTE_SIZE])
 Set the palette.
void setPalette (const byte *palette, uint start, uint num)
 Set a subsection of the palette.
void clearPalette ()
 Clears the current palette, setting all entries to black.

Protected Member Functions

virtual void addDirtyRect (const Common::Rect &r)
 Adds a rectangle to the list of modified areas of the screen during the current frame.

Private Member Functions

void mergeDirtyRects ()
 Merges together overlapping dirty areas of the screen.
bool unionRectangle (Common::Rect &destRect, const Common::Rect &src1, const Common::Rect &src2)
 Returns the union of two dirty area rectangles.

Private Attributes

Common::List< Common::Rect_dirtyRects
 List of affected areas of the screen.

Detailed Description

Implements a specialised surface that represents the screen.

It keeps track of any areas of itself that are updated by drawing calls, and provides an update that method that blits the affected areas to the physical screen

Definition at line 42 of file graphics/screen.h.


Constructor & Destructor Documentation

Graphics::Screen::Screen (  ) 

Definition at line 30 of file screen.cpp.

Graphics::Screen::Screen ( int  width,
int  height 
)

Definition at line 34 of file screen.cpp.

Graphics::Screen::Screen ( int  width,
int  height,
PixelFormat  pixelFormat 
)

Definition at line 38 of file screen.cpp.


Member Function Documentation

void Graphics::Screen::addDirtyRect ( const Common::Rect r  )  [protected, virtual]

Adds a rectangle to the list of modified areas of the screen during the current frame.

Reimplemented from Graphics::ManagedSurface.

Definition at line 61 of file screen.cpp.

virtual void Graphics::Screen::clearDirtyRects (  )  [inline, virtual]

Clear the current dirty rects list.

Reimplemented from Graphics::ManagedSurface.

Definition at line 83 of file graphics/screen.h.

void Graphics::Screen::clearPalette (  ) 

Clears the current palette, setting all entries to black.

Definition at line 123 of file screen.cpp.

void Graphics::Screen::getPalette ( byte  palette[PALETTE_SIZE]  ) 

Return the currently active palette.

Definition at line 103 of file screen.cpp.

void Graphics::Screen::getPalette ( byte palette,
uint  start,
uint  num 
)

Return a portion of the currently active palette.

Definition at line 108 of file screen.cpp.

bool Graphics::Screen::isDirty (  )  const [inline]

Returns true if there are any pending screen updates (dirty areas).

Definition at line 72 of file graphics/screen.h.

void Graphics::Screen::makeAllDirty (  ) 

Marks the whole screen as dirty.

This forces the next call to update to copy the entire screen contents

Definition at line 70 of file screen.cpp.

void Graphics::Screen::mergeDirtyRects (  )  [private]

Merges together overlapping dirty areas of the screen.

Definition at line 74 of file screen.cpp.

void Graphics::Screen::setPalette ( const byte  palette[PALETTE_SIZE]  ) 

Set the palette.

Definition at line 113 of file screen.cpp.

void Graphics::Screen::setPalette ( const byte palette,
uint  start,
uint  num 
)

Set a subsection of the palette.

Definition at line 118 of file screen.cpp.

bool Graphics::Screen::unionRectangle ( Common::Rect destRect,
const Common::Rect src1,
const Common::Rect src2 
) [private]

Returns the union of two dirty area rectangles.

Definition at line 96 of file screen.cpp.

void Graphics::Screen::update (  )  [virtual]

Updates the screen by copying any affected areas to the system.

Definition at line 42 of file screen.cpp.


Member Data Documentation

List of affected areas of the screen.

Definition at line 47 of file graphics/screen.h.


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


Generated on Sat Jan 12 2019 05:04:19 for ResidualVM by doxygen 1.7.1
curved edge   curved edge