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

       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"

CPlayerColorGraphic Class Reference

#include <video.h>

Inheritance diagram for CPlayerColorGraphic:

CGraphic gcn::Image

List of all members.

Public Member Functions

void DrawPlayerColorFrameClipX (int player, unsigned frame, int x, int y)
void DrawPlayerColorFrameClip (int player, unsigned frame, int x, int y)

Static Public Member Functions

static CPlayerColorGraphicNew (const std::string &file, int w=0, int h=0)
static CPlayerColorGraphicForceNew (const std::string &file, int w=0, int h=0)

Public Attributes

GLuint * PlayerColorTextures [PlayerMax]
 Textures with player colors.

Protected Member Functions

 CPlayerColorGraphic ()


Detailed Description

Definition at line 119 of file video.h.


Constructor & Destructor Documentation

CPlayerColorGraphic::CPlayerColorGraphic (  )  [inline, protected]

Definition at line 122 of file video.h.

References PlayerColorTextures.


Member Function Documentation

void CPlayerColorGraphic::DrawPlayerColorFrameClipX ( int  player,
unsigned  frame,
int  x,
int  y 
)

Draw graphic object clipped, flipped, and with player colors.

Parameters:
player player number
frame number of frame (object index)
x x coordinate on the screen
y y coordinate on the screen

Definition at line 460 of file graphic.cpp.

References CGraphic::DoDrawFrameClipX(), CGraphic::DrawFrameClipX(), GraphicPlayerPixels(), MakePlayerColorTexture(), PlayerColorTextures, Players, and UseOpenGL.

Referenced by DrawConstruction(), and DrawUnitType().

void CPlayerColorGraphic::DrawPlayerColorFrameClip ( int  player,
unsigned  frame,
int  x,
int  y 
)

Draw graphic object clipped and with player colors.

Parameters:
player player number
frame number of frame (object index)
x x coordinate on the screen
y y coordinate on the screen

Definition at line 270 of file graphic.cpp.

References CGraphic::DoDrawFrameClip(), CGraphic::DrawFrameClip(), GraphicPlayerPixels(), MakePlayerColorTexture(), PlayerColorTextures, Players, and UseOpenGL.

Referenced by DrawConstruction(), CIcon::DrawIcon(), and DrawUnitType().

CPlayerColorGraphic * CPlayerColorGraphic::New ( const std::string &  file,
int  w = 0,
int  h = 0 
) [static]

Make a new player color graphic object.

Parameters:
file Filename
w Width of a frame (optional)
h Height of a frame (optional)
Returns:
New graphic object

Reimplemented from CGraphic.

Definition at line 523 of file graphic.cpp.

References Assert, ExitFatal(), CGraphic::File, GraphicHash, CGraphic::HashFile, CGraphic::Height, CGraphic::Refs, and CGraphic::Width.

Referenced by LoadConstructions(), LoadUnitTypeSprite(), and tolua_stratagus_CPlayerColorGraphic_New00().

CPlayerColorGraphic * CPlayerColorGraphic::ForceNew ( const std::string &  file,
int  w = 0,
int  h = 0 
) [static]

Make a new player color graphic object. Don't reuse a graphic from the hash table.

Parameters:
file Filename
w Width of a frame (optional)
h Height of a frame (optional)
Returns:
New graphic object

Reimplemented from CGraphic.

Definition at line 603 of file graphic.cpp.

References ExitFatal(), CGraphic::File, GraphicHash, HashCount, CGraphic::HashFile, CGraphic::Height, sprintf_s(), and CGraphic::Width.


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