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

Public Member Functions | List of all members
CEasedTexture Class Reference

#include <fow_utils.h>

Public Member Functions

bool isFullyEased () const
 
void Ease ()
 
uint8_t * GetCurrent ()
 
uint8_t * GetNext ()
 
uint16_t GetWidth () const
 
uint16_t GetHeight () const
 
fow_utils.h - The utilities for fog of war headerfile.
uint8_t GetPixel (const uint16_t x, const uint16_t y)
 returns pixel value for current frame More...
 

fow_utils.cpp - The utilities for fog of war .

void Init (const uint16_t width, const uint16_t height, const uint8_t numOfSteps)
 
void Clean ()
 
void SetNumOfSteps (const uint8_t num)
 
void PushNext (const bool forcedShowNext=false)
 
void DrawRegion (uint8_t *target, const uint16_t trgWidth, const uint16_t x0, const uint16_t y0, const SDL_Rect &srcRect)
 

Member Function Documentation

◆ Clean()

void CEasedTexture::Clean ( )

Clean the texture

◆ DrawRegion()

void CEasedTexture::DrawRegion ( uint8_t *  target,
const uint16_t  trgWidth,
const uint16_t  x0,
const uint16_t  y0,
const SDL_Rect &  srcRect 
)

Draw a rectangle of the texture into the target

Parameters
targettarget where draw texture to
trgWidthtarget width in pixels
x0left coordinate in the target (where to draw)
y0upper coordinate in the target (where to draw)
srcRectrectangle of the texture to draw

◆ Ease()

void CEasedTexture::Ease ( )
inline

◆ GetCurrent()

uint8_t* CEasedTexture::GetCurrent ( )
inline

◆ GetHeight()

uint16_t CEasedTexture::GetHeight ( ) const
inline

◆ GetNext()

uint8_t* CEasedTexture::GetNext ( )
inline

◆ GetPixel()

uint8_t CEasedTexture::GetPixel ( const uint16_t  x,
const uint16_t  y 
)
inline

returns pixel value for current frame

◆ GetWidth()

uint16_t CEasedTexture::GetWidth ( ) const
inline

◆ Init()

void CEasedTexture::Init ( const uint16_t  width,
const uint16_t  height,
const uint8_t  numOfSteps 
)

Init eased texture

Parameters
widthwidth of the texture
heightheight of the texture
numOfStepsnumber easing steps

◆ isFullyEased()

bool CEasedTexture::isFullyEased ( ) const
inline

◆ PushNext()

void CEasedTexture::PushNext ( const bool  forcedShowNext = false)

Switch easing to the new frame of the texture

Parameters
forcedShowNextcmd to immediately show next frame without easing

◆ SetNumOfSteps()

void CEasedTexture::SetNumOfSteps ( const uint8_t  num)

Change number of easing steps

Parameters
widthwidth of the texture
heightheight of the texture
numOfStepsnumber of the texture easing steps

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.