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

Classes | Macros | Functions | Variables
intern_video.h File Reference
#include "SDL.h"
#include <vector>

Go to the source code of this file.

Classes

class  ColorIndexRange
 

Macros

#define CLIP_RECTANGLE(x, y, width, height)
 current clipping bottom right More...
 
#define CLIP_RECTANGLE_OFS(x, y, width, height, ofsx, ofsy, endx)
 

Functions

void ColorCycleSurface (SDL_Surface &surface)
 
void LazilyMakeColorCyclingTextures (CGraphic *g, std::vector< ColorIndexRange > ranges)
 Make OpenGL textures for color cycling. More...
 
void MakeColorCyclingTextures (CGraphic *g, int count)
 

Variables

int ClipX1
 Profile, frames out of sync. More...
 
int ClipY1
 current clipping top left More...
 
int ClipX2
 current clipping top left More...
 
int ClipY2
 current clipping bottom right More...
 

Detailed Description

THIS HEADER FILE SHOULD ONLY BE INCLUDED BY SOURCE-FILES IN VIDEO !!!

This delivers an interface to basic video operations in video.c, while keeping these detailed operations out of the main include-file video.h

Todo:
FIXME: Currently some interfaces listed in video.h should be moved in here, this includes possible "extern" declarations in source-files themselves. The doxygen docs looks not good, but now contains all info.

Macro Definition Documentation

◆ CLIP_RECTANGLE

#define CLIP_RECTANGLE (   x,
  y,
  width,
  height 
)

current clipping bottom right

Clip rectangle area to clipping rectangle. This means given arguments can be changed to take the clipping rectangle into account.

Todo:
FIXME: not easy to debug, but making it a function needs:
  • pointers to be able to alter given arguments
  • special return value to denote 'outside' clipping region (which is now handled by a simple return in caller function)
Parameters
xint X screen pixel position
yint Y screen pixel position (return value of X and Y can be made larger)
widthunsigned int width to display
heightunsigned int height to display (return value of width and height can be made smaller)

◆ CLIP_RECTANGLE_OFS

#define CLIP_RECTANGLE_OFS (   x,
  y,
  width,
  height,
  ofsx,
  ofsy,
  endx 
)

Clip rectangle area (just like CLIP_RECTANGLE), but also return offsets (these offsets can be used to skip data when used for sprites and such)

Todo:
FIXME: not easy to debug, but making it a function needs:
  • pointers to be able to alter given arguments
  • special return value to denote 'outside' clipping region (which is now handled by a simple return in caller function)
Parameters
xint X screen position
yint Y screen position (return value of X and Y can be made larger)
widthint width to display
heightint height to display (return value of width and height can be made smaller) returns:
ofsxint offset X from start of sprite data
ofsyint offset Y from start of sprite data
endxint offset to skip the remaining data at the end of each horizontal line of the sprite.
Note
there was no need for 'endy', as it isn't used to draw sprites..

Function Documentation

◆ ColorCycleSurface()

void ColorCycleSurface ( SDL_Surface &  surface)

Color Cycle for particular surface

◆ LazilyMakeColorCyclingTextures()

void LazilyMakeColorCyclingTextures ( CGraphic g,
std::vector< ColorIndexRange ranges 
)

Make OpenGL textures for color cycling.

◆ MakeColorCyclingTextures()

void MakeColorCyclingTextures ( CGraphic g,
int  count 
)

Variable Documentation

◆ ClipX1

int ClipX1

Profile, frames out of sync.

◆ ClipX2

int ClipX2

current clipping top left

◆ ClipY1

int ClipY1

current clipping top left

◆ ClipY2

int ClipY2

current clipping bottom right

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