HoverRace  2.0
Classes | Public Types | Public Member Functions | Protected Member Functions | Private Attributes | List of all members
HoverRace::VideoServices::VideoBuffer Class Referenceabstract

Video framebuffer for legacy (8-bit, palettized) rendering. More...

#include <VideoBuffer.h>

+ Inheritance diagram for HoverRace::VideoServices::VideoBuffer:

Classes

class  Lock
 

Public Types

typedef boost::signals2::signal< void()> paletteChangedSignal_t
 
typedef std::pair< int, int > pixelMeter_t
 

Public Member Functions

 VideoBuffer (Display::Display &display)
 Constructor. More...
 
virtual ~VideoBuffer ()
 
void AssignPalette ()
 
void Clear (MR_UInt8 color=0)
 
void CreatePalette ()
 
void DrawHorizontalLine (int pY, int pX0, int pX1, MR_UInt8 pColor)
 
void DrawLine (int pX0, int pY0, int pX1, int pY1, MR_UInt8 pColor)
 
void DrawPoint (int pX, int pY, MR_UInt8 pColor)
 
MR_UInt8GetBuffer () const
 
int GetHeight () const
 
const ColorPalette::paletteEntry_tGetPalette () const
 
paletteChangedSignal_tGetPaletteChangedSignal ()
 
int GetPitch () const
 
pixelMeter_t GetPixelMeter () const
 
int GetWidth () const
 
MR_UInt16GetZBuffer () const
 
int GetZPitch () const
 
void OnDesktopModeChange (int width, int height)
 Notify the video buffer that the desktop resolution has changed. More...
 
void SetBackgroundPalette (std::unique_ptr< MR_UInt8[]> &palette)
 

Protected Member Functions

virtual void Flip ()=0
 
SDL_Surface * GetLegacySurface () const
 
void LockLegacySurface ()
 
virtual void OnWindowResChange ()
 Notify the video buffer that the window size has changed. More...
 
void UnlockLegacySurface ()
 

Private Attributes

std::unique_ptr< MR_UInt8[]> bgPalette
 
int desktopHeight
 
int desktopWidth
 
bool fullscreen
 
int height
 
SDL_Surface * legacySurface
 
ColorPalette::paletteEntry_t palette [256]
 
paletteChangedSignal_t paletteChangedSignal
 
int pitch
 
MR_UInt8vbuf
 
int width
 
MR_UInt16zbuf
 

Detailed Description

Video framebuffer for legacy (8-bit, palettized) rendering.

Author
Michael Imamura

Member Typedef Documentation

typedef boost::signals2::signal<void()> HoverRace::VideoServices::VideoBuffer::paletteChangedSignal_t

Constructor & Destructor Documentation

HoverRace::VideoServices::VideoBuffer::VideoBuffer ( Display::Display display)

Constructor.

Parameters
displayThe display this is connected to.
HoverRace::VideoServices::VideoBuffer::~VideoBuffer ( )
virtual

Member Function Documentation

void HoverRace::VideoServices::VideoBuffer::AssignPalette ( )
void HoverRace::VideoServices::VideoBuffer::Clear ( MR_UInt8  color = 0)
void HoverRace::VideoServices::VideoBuffer::CreatePalette ( )
void HoverRace::VideoServices::VideoBuffer::DrawHorizontalLine ( int  pY,
int  pX0,
int  pX1,
MR_UInt8  pColor 
)
void HoverRace::VideoServices::VideoBuffer::DrawLine ( int  pX0,
int  pY0,
int  pX1,
int  pY1,
MR_UInt8  pColor 
)
void HoverRace::VideoServices::VideoBuffer::DrawPoint ( int  pX,
int  pY,
MR_UInt8  pColor 
)
virtual void HoverRace::VideoServices::VideoBuffer::Flip ( )
protectedpure virtual
MR_UInt8* HoverRace::VideoServices::VideoBuffer::GetBuffer ( ) const
inline
int HoverRace::VideoServices::VideoBuffer::GetHeight ( ) const
inline
SDL_Surface* HoverRace::VideoServices::VideoBuffer::GetLegacySurface ( ) const
inlineprotected
const ColorPalette::paletteEntry_t* HoverRace::VideoServices::VideoBuffer::GetPalette ( ) const
inline
paletteChangedSignal_t& HoverRace::VideoServices::VideoBuffer::GetPaletteChangedSignal ( )
inline
int HoverRace::VideoServices::VideoBuffer::GetPitch ( ) const
inline
VideoBuffer::pixelMeter_t HoverRace::VideoServices::VideoBuffer::GetPixelMeter ( ) const
int HoverRace::VideoServices::VideoBuffer::GetWidth ( ) const
inline
MR_UInt16* HoverRace::VideoServices::VideoBuffer::GetZBuffer ( ) const
inline
int HoverRace::VideoServices::VideoBuffer::GetZPitch ( ) const
inline
void HoverRace::VideoServices::VideoBuffer::LockLegacySurface ( )
protected
void HoverRace::VideoServices::VideoBuffer::OnDesktopModeChange ( int  width,
int  height 
)

Notify the video buffer that the desktop resolution has changed.

This should be called immediately after the video buffer instance is created and every time the desktop resolution changes.

Parameters
widthThe desktop resolution width.
heightThe desktop resolution height.
void HoverRace::VideoServices::VideoBuffer::OnWindowResChange ( )
protectedvirtual

Notify the video buffer that the window size has changed.

Reimplemented in HoverRace::Display::SDL::SdlLegacyDisplay.

void HoverRace::VideoServices::VideoBuffer::SetBackgroundPalette ( std::unique_ptr< MR_UInt8[]> &  palette)
void HoverRace::VideoServices::VideoBuffer::UnlockLegacySurface ( )
protected

Member Data Documentation

std::unique_ptr<MR_UInt8[]> HoverRace::VideoServices::VideoBuffer::bgPalette
private
int HoverRace::VideoServices::VideoBuffer::desktopHeight
private
int HoverRace::VideoServices::VideoBuffer::desktopWidth
private
bool HoverRace::VideoServices::VideoBuffer::fullscreen
private
int HoverRace::VideoServices::VideoBuffer::height
private
SDL_Surface* HoverRace::VideoServices::VideoBuffer::legacySurface
private
ColorPalette::paletteEntry_t HoverRace::VideoServices::VideoBuffer::palette[256]
private
paletteChangedSignal_t HoverRace::VideoServices::VideoBuffer::paletteChangedSignal
private
int HoverRace::VideoServices::VideoBuffer::pitch
private
MR_UInt8* HoverRace::VideoServices::VideoBuffer::vbuf
private
int HoverRace::VideoServices::VideoBuffer::width
private
MR_UInt16* HoverRace::VideoServices::VideoBuffer::zbuf
private

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