ROLAND  0.70
Amstrad Emulator based on Caprice Source rewritten in C++.
Public Member Functions | Static Public Member Functions | Protected Attributes | Static Protected Attributes | List of all members
Video Class Referenceabstract

Baseclass for all SDL Video drivers. More...

#include <video.h>

Inheritance diagram for Video:
VideoGL VideoStd

Public Member Functions

 Video (cpcx::Cpc *cpc)
 Constructs the video interface for the. More...
 
virtual ~Video () ROLAND_DEFAULT virtual int init()=0
 device dependant init for inheritance More...
 
virtual int init (uint width, uint height, uint depth, bool fullscreen, unsigned char scale)=0
 inits all More...
 
virtual CanvasgetCanvas ()=0
 
virtual void setup ()
 Things that needs to be done before update. More...
 
virtual void update ()=0
 Updates the Screen (flip or something) More...
 
virtual void quit ()=0
 Free all resources. More...
 
virtual void lock ()
 Locks the screen-surface. More...
 
virtual void unlock ()
 Unlocks the screen-surface. More...
 
uint bpp ()
 Things that needs to be done before update. More...
 
uint depth ()
 Returns the bytes per pixel inbetween (1 to 4) More...
 
Size size ()
 Returns the size of the video surface. More...
 
void setFullscreen (bool value)
 Set to fullscreen or not. More...
 
void setDoubling (bool value)
 Set line doubling on or off. More...
 
void setFilter (bool value)
 En-/disable bilinear texture filter. More...
 
void toggleFullscreen ()
 Toggles fullscreen. More...
 
void toggleDoubling ()
 Toggle line doubling. More...
 
void toggleFilter ()
 Toggle bilinear texture filter. More...
 
uintbufferStart ()
 Returns the start of the backbuffer. More...
 
uintbufferEnd ()
 Returns the end of the backbuffer. More...
 
SDL_Surface * buffer ()
 Returns the SDL_Surface of the backbuffer. More...
 
SDL_Surface * screen ()
 Returns the SDL_Surface of the screen. More...
 

Static Public Member Functions

static void setIcon (const String &icon)
 Sets an image as application icon. More...
 
static void setCaption (const String &caption)
 Sets a caption for the application. More...
 

Protected Attributes

cpcx::CpcmCpc
 
unsigned int mCpcWidth
 
unsigned int mCpcHeight
 
unsigned char mCpcScale
 
unsigned int * mBufferStart
 
unsigned int * mBufferEnd
 
SDL_Surface * mBuffer
 
SDL_Surface * mScreen
 
SDL_Rect mCanvasRect
 

Static Protected Attributes

static unsigned int mDesktopWidth = 0
 
static unsigned int mDesktopHeight = 0
 
static bool mFullscreen = false
 
static bool mDoubling = true
 
static bool mFilter = true
 

Detailed Description

Baseclass for all SDL Video drivers.

Author
Fred Klaus devel.nosp@m.opme.nosp@m.nt@fk.nosp@m.web..nosp@m.de

Constructor & Destructor Documentation

Video ( cpcx::Cpc cpc)

Constructs the video interface for the.

Parameters
Cpc

References cpc, IOUT, Video::mBuffer, Video::mCanvasRect, Video::mCpc, Video::mDesktopHeight, Video::mDesktopWidth, and Video::mScreen.

virtual ~Video ( )
pure virtual

device dependant init for inheritance

Member Function Documentation

uint bpp ( )
inline

Things that needs to be done before update.

Returns the bits per pixel (8 to 32)

References Video::mBuffer.

SDL_Surface* buffer ( )
inline

Returns the SDL_Surface of the backbuffer.

References Video::mBuffer.

uint* bufferEnd ( )
inline

Returns the end of the backbuffer.

References Video::mBufferEnd.

uint* bufferStart ( )
inline

Returns the start of the backbuffer.

References Video::mBufferStart.

Referenced by mainloop().

uint depth ( )
inline

Returns the bytes per pixel inbetween (1 to 4)

References Video::mBuffer.

virtual Canvas* getCanvas ( )
pure virtual

Implemented in VideoGL, and VideoStd.

Referenced by Gui::add(), and initGui().

virtual int init ( uint  width,
uint  height,
uint  depth,
bool  fullscreen,
unsigned char  scale 
)
pure virtual

inits all

Parameters
width= width
height= height

Implemented in VideoGL, and VideoStd.

Referenced by init(), mainloop(), Video::setFilter(), Video::setFullscreen(), Video::toggleDoubling(), Video::toggleFilter(), and Video::toggleFullscreen().

virtual void lock ( )
inlinevirtual

Locks the screen-surface.

Reimplemented in VideoGL, and VideoStd.

virtual void quit ( )
pure virtual

Free all resources.

Implemented in VideoGL, and VideoStd.

Referenced by Video::setup().

SDL_Surface* screen ( )
inline

Returns the SDL_Surface of the screen.

References Video::mScreen, and Video::setIcon().

Referenced by initGui().

static void setCaption ( const String caption)
inlinestatic

Sets a caption for the application.

Referenced by main().

void setDoubling ( bool  value)
inline

Set line doubling on or off.

References Video::mDoubling.

void setFilter ( bool  value)
inline

En-/disable bilinear texture filter.

References Video::init(), and Video::mFilter.

void setFullscreen ( bool  value)
inline

Set to fullscreen or not.

References Video::init(), and Video::mFullscreen.

void setIcon ( const String icon)
static

Sets an image as application icon.

References EOUT.

Referenced by main(), and Video::screen().

virtual void setup ( )
inlinevirtual

Things that needs to be done before update.

Reimplemented in VideoGL.

References Video::quit(), and Video::update().

Referenced by display().

Size size ( )
inline

Returns the size of the video surface.

References Video::mScreen.

Referenced by FileList::FileList().

void toggleDoubling ( )
inline

Toggle line doubling.

References Video::init(), and Video::mDoubling.

Referenced by mainloop().

void toggleFilter ( )
inline

Toggle bilinear texture filter.

References Video::init(), and Video::mFilter.

Referenced by mainloop().

void toggleFullscreen ( )
inline

Toggles fullscreen.

References Video::init(), and Video::mFullscreen.

Referenced by mainloop().

virtual void unlock ( )
inlinevirtual

Unlocks the screen-surface.

Reimplemented in VideoGL, and VideoStd.

virtual void update ( )
pure virtual

Updates the Screen (flip or something)

Implemented in VideoGL, and VideoStd.

Referenced by display(), and Video::setup().

Member Data Documentation

SDL_Surface* mBuffer
protected
unsigned int* mBufferEnd
protected
unsigned int* mBufferStart
protected
SDL_Rect mCanvasRect
protected
cpcx::Cpc* mCpc
protected
unsigned int mCpcHeight
protected
unsigned char mCpcScale
protected
unsigned int mCpcWidth
protected
uint mDesktopHeight = 0
staticprotected

Referenced by Video::Video().

uint mDesktopWidth = 0
staticprotected

Referenced by Video::Video().

bool mDoubling = true
staticprotected
bool mFilter = true
staticprotected
bool mFullscreen = false
staticprotected
SDL_Surface* mScreen
protected

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