____                _       __
    / __ )____  _____   | |     / /___ ___________
   / __  / __ \/ ___/   | | /| / / __ `/ ___/ ___/
  / /_/ / /_/ (__  )    | |/ |/ / /_/ / /  (__  )
 /_____/\____/____/     |__/|__/\__,_/_/  /____/

       A futuristic real-time strategy game.
          This file is part of Bos Wars.
(C) Copyright 2001-2007 by the Bos Wars and Stratagus Project. Distributed under the "GNU General Public License"

CVideo Class Reference

#include <video.h>

List of all members.

Public Member Functions

 CVideo ()
void LockScreen ()
void UnlockScreen ()
void ClearScreen ()
bool ResizeScreen (int x, int y)
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, int sx, int sy, int dx, int dy)
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 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, int x, int y, int radius)
void FillTransCircleClip (Uint32 color, int x, int y, int radius, unsigned char alpha)
Uint32 MapRGB (SDL_PixelFormat *f, Uint8 r, Uint8 g, Uint8 b)
Uint32 MapRGBA (SDL_PixelFormat *f, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
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)

Public Attributes

int Width
int Height
int Depth
bool FullScreen


Detailed Description

Definition at line 211 of file video.h.


Constructor & Destructor Documentation

CVideo::CVideo (  )  [inline]

Definition at line 214 of file video.h.


Member Function Documentation

void CVideo::LockScreen ( void   ) 

void CVideo::UnlockScreen ( void   ) 

void CVideo::ClearScreen ( void   ) 

Clear the video screen.

Definition at line 227 of file video.cpp.

References ColorBlack, FillRectangle(), Height, and Width.

Referenced by CreateGame(), EditorMainLoop(), main1(), MenuLoop(), ShowTitleScreens(), StartEditor(), StartMap(), and WaitEventsOneFrame().

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

Resize the video screen.

Returns:
True if the resolution changed, false otherwise

Definition at line 237 of file video.cpp.

References CMinimap::FreeOpenGL(), FreeOpenGLFonts(), FreeOpenGLGraphics(), Height, CUserInterface::Minimap, ReloadOpenGL(), SetClipping(), TheScreen, UI, UseOpenGL, VideoValidResolution(), and Width.

Referenced by SdlDoEvent().

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

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

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

Definition at line 1944 of file linedraw.cpp.

References linedraw_sdl::DrawVLine(), linedraw_gl::DrawVLine(), and UseOpenGL.

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

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

Definition at line 1960 of file linedraw.cpp.

References linedraw_sdl::DrawVLineClip(), linedraw_gl::DrawVLineClip(), and UseOpenGL.

Referenced by DrawGrids(), and DrawSelection().

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

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

Definition at line 1977 of file linedraw.cpp.

References linedraw_sdl::DrawHLine(), linedraw_gl::DrawHLine(), and UseOpenGL.

Referenced by DrawPopup().

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

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

Definition at line 1993 of file linedraw.cpp.

References linedraw_sdl::DrawHLineClip(), linedraw_gl::DrawHLineClip(), and UseOpenGL.

Referenced by DrawGrids(), and DrawSelection().

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

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

Definition at line 2010 of file linedraw.cpp.

References linedraw_sdl::DrawLine(), linedraw_gl::DrawLine(), and UseOpenGL.

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

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

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

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

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

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

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

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

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

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

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

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

Definition at line 2109 of file linedraw.cpp.

References linedraw_sdl::DrawCircle(), linedraw_gl::DrawCircle(), and UseOpenGL.

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

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

Definition at line 2125 of file linedraw.cpp.

References linedraw_sdl::DrawCircleClip(), linedraw_gl::DrawCircleClip(), and UseOpenGL.

Referenced by DrawInformations().

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

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

Definition at line 2142 of file linedraw.cpp.

References linedraw_sdl::FillCircle(), linedraw_gl::FillCircle(), and UseOpenGL.

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

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

Definition at line 2158 of file linedraw.cpp.

References linedraw_sdl::FillCircleClip(), linedraw_gl::FillCircleClip(), and UseOpenGL.

Referenced by ShowSingleOrder().

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

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

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

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

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


Member Data Documentation


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

Generated on Sat Feb 21 00:28:24 2009 for Bos Wars by  doxygen 1.5.6