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

color.cpp File Reference
#include "stratagus.h"
#include "color.h"
#include "script.h"
#include "SDL.h"

color.h - The A platform independent color.

SDL_Surface * TheScreen
 Internal screen. More...
 
IntColor InterpolateColor (IntColor color1, IntColor color2, float fraction)
 

Function Documentation

◆ InterpolateColor()

IntColor InterpolateColor ( IntColor  color1,
IntColor  color2,
float  fraction 
)

interpolate 2 RGB colors

Parameters
color1integer containing color as 0x00RRGGBB
color2integer containing color as 0x00RRGGBB
fractionhow much interpolation (0..1)
  • 0: full color 1
  • 1: full color 2
Returns
the new color after interpolation

Variable Documentation

◆ TheScreen

SDL_Surface* TheScreen

Internal screen.

(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.