_________ __                 __
        /   _____//  |_____________ _/  |______     ____  __ __  ______
        \_____  \\   __\_  __ \__  \\   __\__  \   / ___\|  |  \/  ___/
        /        \|  |  |  | \// __ \|  |  / __ \_/ /_/  >  |  /\___ \
       /_______  /|__|  |__|  (____  /__| (____  /\___  /|____//____  >
               \/                  \/          \//_____/            \/
    ______________________                           ______________________
                          T H E   W A R   B E G I N S
                   Stratagus - A free fantasy real time strategy game engine

Public Member Functions | Public Attributes | List of all members
CVideo Class Reference

#include <video.h>

Public Member Functions

 CVideo ()
 
Uint32 MapRGB (SDL_PixelFormat *f, Uint8 r, Uint8 g, Uint8 b)
 
Uint32 MapRGB (SDL_PixelFormat *f, const CColor &color)
 
Uint32 MapRGBA (SDL_PixelFormat *f, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
 
Uint32 MapRGBA (SDL_PixelFormat *f, const CColor &color)
 
void GetRGB (Uint32 c, SDL_PixelFormat *f, Uint8 *r, Uint8 *g, Uint8 *b)
 
void GetRGBA (Uint32 c, SDL_PixelFormat *f, Uint8 *r, Uint8 *g, Uint8 *b, Uint8 *a)
 
video.cpp - The universal video functions.
void LockScreen ()
 
void UnlockScreen ()
 
void ClearScreen ()
 
bool ResizeScreen (int width, int height)
 
linedraw.cpp - The general linedraw functions.
void DrawPixelClip (Uint32 color, int x, int y)
 
void DrawTransPixelClip (Uint32 color, int x, int y, unsigned char alpha)
 
void DrawVLine (Uint32 color, int x, int y, int height)
 
void DrawTransVLine (Uint32 color, int x, int y, int height, unsigned char alpha)
 
void DrawVLineClip (Uint32 color, int x, int y, int height)
 
void DrawTransVLineClip (Uint32 color, int x, int y, int height, unsigned char alpha)
 
void DrawHLine (Uint32 color, int x, int y, int width)
 
void DrawTransHLine (Uint32 color, int x, int y, int width, unsigned char alpha)
 
void DrawHLineClip (Uint32 color, int x, int y, int width)
 
void DrawTransHLineClip (Uint32 color, int x, int y, int width, unsigned char alpha)
 
void DrawLine (Uint32 color, int sx, int sy, int dx, int dy)
 
void DrawTransLine (Uint32 color, int sx, int sy, int dx, int dy, unsigned char alpha)
 
void DrawLineClip (Uint32 color, const PixelPos &pos1, const PixelPos &pos2)
 
void DrawTransLineClip (Uint32 color, int sx, int sy, int dx, int dy, unsigned char alpha)
 
void DrawRectangle (Uint32 color, int x, int y, int w, int h)
 
void DrawTransRectangle (Uint32 color, int x, int y, int w, int h, unsigned char alpha)
 
void DrawRectangleClip (Uint32 color, int x, int y, int w, int h)
 
void DrawTransRectangleClip (Uint32 color, int x, int y, int w, int h, unsigned char alpha)
 
void FillRectangle (Uint32 color, int x, int y, int w, int h)
 
void FillTransRectangle (Uint32 color, int x, int y, int w, int h, unsigned char alpha)
 
void FillRectangleClip (Uint32 color, int x, int y, int w, int h)
 
void FillTransRectangleClip (Uint32 color, int x, int y, int w, int h, unsigned char alpha)
 
void DrawCircle (Uint32 color, int x, int y, int r)
 
void DrawTransCircle (Uint32 color, int x, int y, int r, unsigned char alpha)
 
void DrawCircleClip (Uint32 color, int x, int y, int r)
 
void DrawTransCircleClip (Uint32 color, int x, int y, int r, unsigned char alpha)
 
void DrawEllipseClip (Uint32 color, int x, int y, int rx, int ry)
 
void FillCircle (Uint32 color, int x, int y, int radius)
 
void FillTransCircle (Uint32 color, int x, int y, int radius, unsigned char alpha)
 
void FillCircleClip (Uint32 color, const PixelPos &screenPos, int radius)
 
void FillTransCircleClip (Uint32 color, int x, int y, int radius, unsigned char alpha)
 

Public Attributes

int Width
 
int Height
 
int WindowWidth
 
int WindowHeight
 
double VerticalPixelSize
 
SDL_Cursor * blankCursor
 
int Depth
 
bool FullScreen
 

Constructor & Destructor Documentation

◆ CVideo()

CVideo::CVideo ( )
inline

Member Function Documentation

◆ ClearScreen()

void CVideo::ClearScreen ( )

Clear the video screen.

◆ DrawCircle()

void CVideo::DrawCircle ( Uint32  color,
int  x,
int  y,
int  r 
)

◆ DrawCircleClip()

void CVideo::DrawCircleClip ( Uint32  color,
int  x,
int  y,
int  r 
)

◆ DrawEllipseClip()

void CVideo::DrawEllipseClip ( Uint32  color,
int  x,
int  y,
int  rx,
int  ry 
)

◆ DrawHLine()

void CVideo::DrawHLine ( Uint32  color,
int  x,
int  y,
int  width 
)

◆ DrawHLineClip()

void CVideo::DrawHLineClip ( Uint32  color,
int  x,
int  y,
int  width 
)

◆ DrawLine()

void CVideo::DrawLine ( Uint32  color,
int  sx,
int  sy,
int  dx,
int  dy 
)

◆ DrawLineClip()

void CVideo::DrawLineClip ( Uint32  color,
const PixelPos pos1,
const PixelPos pos2 
)

◆ DrawPixelClip()

void CVideo::DrawPixelClip ( Uint32  color,
int  x,
int  y 
)

◆ DrawRectangle()

void CVideo::DrawRectangle ( Uint32  color,
int  x,
int  y,
int  w,
int  h 
)

◆ DrawRectangleClip()

void CVideo::DrawRectangleClip ( Uint32  color,
int  x,
int  y,
int  w,
int  h 
)

◆ DrawTransCircle()

void CVideo::DrawTransCircle ( Uint32  color,
int  x,
int  y,
int  r,
unsigned char  alpha 
)

◆ DrawTransCircleClip()

void CVideo::DrawTransCircleClip ( Uint32  color,
int  x,
int  y,
int  r,
unsigned char  alpha 
)

◆ DrawTransHLine()

void CVideo::DrawTransHLine ( Uint32  color,
int  x,
int  y,
int  width,
unsigned char  alpha 
)

◆ DrawTransHLineClip()

void CVideo::DrawTransHLineClip ( Uint32  color,
int  x,
int  y,
int  width,
unsigned char  alpha 
)

◆ DrawTransLine()

void CVideo::DrawTransLine ( Uint32  color,
int  sx,
int  sy,
int  dx,
int  dy,
unsigned char  alpha 
)

◆ DrawTransLineClip()

void CVideo::DrawTransLineClip ( Uint32  color,
int  sx,
int  sy,
int  dx,
int  dy,
unsigned char  alpha 
)

◆ DrawTransPixelClip()

void CVideo::DrawTransPixelClip ( Uint32  color,
int  x,
int  y,
unsigned char  alpha 
)

◆ DrawTransRectangle()

void CVideo::DrawTransRectangle ( Uint32  color,
int  x,
int  y,
int  w,
int  h,
unsigned char  alpha 
)

◆ DrawTransRectangleClip()

void CVideo::DrawTransRectangleClip ( Uint32  color,
int  x,
int  y,
int  w,
int  h,
unsigned char  alpha 
)

◆ DrawTransVLine()

void CVideo::DrawTransVLine ( Uint32  color,
int  x,
int  y,
int  height,
unsigned char  alpha 
)

◆ DrawTransVLineClip()

void CVideo::DrawTransVLineClip ( Uint32  color,
int  x,
int  y,
int  height,
unsigned char  alpha 
)

◆ DrawVLine()

void CVideo::DrawVLine ( Uint32  color,
int  x,
int  y,
int  height 
)

◆ DrawVLineClip()

void CVideo::DrawVLineClip ( Uint32  color,
int  x,
int  y,
int  height 
)

◆ FillCircle()

void CVideo::FillCircle ( Uint32  color,
int  x,
int  y,
int  radius 
)

◆ FillCircleClip()

void CVideo::FillCircleClip ( Uint32  color,
const PixelPos screenPos,
int  radius 
)

◆ FillRectangle()

void CVideo::FillRectangle ( Uint32  color,
int  x,
int  y,
int  w,
int  h 
)

◆ FillRectangleClip()

void CVideo::FillRectangleClip ( Uint32  color,
int  x,
int  y,
int  w,
int  h 
)

◆ FillTransCircle()

void CVideo::FillTransCircle ( Uint32  color,
int  x,
int  y,
int  radius,
unsigned char  alpha 
)

◆ FillTransCircleClip()

void CVideo::FillTransCircleClip ( Uint32  color,
int  x,
int  y,
int  radius,
unsigned char  alpha 
)

◆ FillTransRectangle()

void CVideo::FillTransRectangle ( Uint32  color,
int  x,
int  y,
int  w,
int  h,
unsigned char  alpha 
)

◆ FillTransRectangleClip()

void CVideo::FillTransRectangleClip ( Uint32  color,
int  x,
int  y,
int  w,
int  h,
unsigned char  alpha 
)

◆ GetRGB()

void CVideo::GetRGB ( Uint32  c,
SDL_PixelFormat *  f,
Uint8 *  r,
Uint8 *  g,
Uint8 *  b 
)
inline

◆ GetRGBA()

void CVideo::GetRGBA ( Uint32  c,
SDL_PixelFormat *  f,
Uint8 *  r,
Uint8 *  g,
Uint8 *  b,
Uint8 *  a 
)
inline

◆ LockScreen()

void CVideo::LockScreen ( )

Lock the screen for write access.

◆ MapRGB() [1/2]

Uint32 CVideo::MapRGB ( SDL_PixelFormat *  f,
const CColor color 
)
inline

◆ MapRGB() [2/2]

Uint32 CVideo::MapRGB ( SDL_PixelFormat *  f,
Uint8  r,
Uint8  g,
Uint8  b 
)
inline

◆ MapRGBA() [1/2]

Uint32 CVideo::MapRGBA ( SDL_PixelFormat *  f,
const CColor color 
)
inline

◆ MapRGBA() [2/2]

Uint32 CVideo::MapRGBA ( SDL_PixelFormat *  f,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a 
)
inline

◆ ResizeScreen()

bool CVideo::ResizeScreen ( int  w,
int  h 
)

Resize the video screen.

Returns
True if the resolution changed, false otherwise

◆ UnlockScreen()

void CVideo::UnlockScreen ( )

Unlock the screen for write access.

Member Data Documentation

◆ blankCursor

SDL_Cursor* CVideo::blankCursor

◆ Depth

int CVideo::Depth

◆ FullScreen

bool CVideo::FullScreen

◆ Height

int CVideo::Height

◆ VerticalPixelSize

double CVideo::VerticalPixelSize

◆ Width

int CVideo::Width

◆ WindowHeight

int CVideo::WindowHeight

◆ WindowWidth

int CVideo::WindowWidth

The documentation for this class was generated from the following files:
(C) Copyright 1998-2012 by The Stratagus Project under the GNU General Public License.
All trademarks and copyrights on this page are owned by their respective owners.