CrystalSpace

Public API Reference

cstool/csfxscr.h File Reference

Some full screen special effects. More...

#include "csextern.h"
#include "ivideo/graph3d.h"

Go to the source code of this file.

Functions

void csfxBlueScreen (iGraphics3D *g3d, float fadevalue)
 Similar to csfxGreenScreen, but makes the screen show only blue fadevalue 0: no fading, fadevalue 1: only blue tints are visible.
void csfxFadeOut (iGraphics3D *g3d, float fadevalue)
 Fade the screen to black.
void csfxFadeTo (iGraphics3D *g3d, iTextureHandle *tex, float fadevalue)
 Fade to given pixmap (which must be prepared for 3D usage), fadevalue 0: no fading, fadevalue 1: only given texture is visible.
void csfxFadeToColor (iGraphics3D *g3d, float fadevalue, const csColor &color)
 Fade the screen to a specific color, passed as parameter.
void csfxGreenScreen (iGraphics3D *g3d, float fadevalue)
 Make the screen look like an old fashioned green-only monitor.
void csfxInterference (iGraphics2D *g2d, float amount, float anim, float length)
 Shows lines of interference on the screen.
void csfxRedScreen (iGraphics3D *g3d, float fadevalue)
 Similar to csfxGreenScreen, but makes the screen show only red.
void csfxScreenDPFX (iGraphics3D *g3d, iTextureHandle *tex, uint mixmode, float r, float g, float b, float a)
 Do a fullscreen drawpolygonFX draw, used by some other routines.
void csfxScreenDPFXPartial (iGraphics3D *g3d, int x, int y, int w, int h, iTextureHandle *tex, uint mixmode, float r, float g, float b, float a)
 Do a drawpolygonFX draw, but only part of the screen is covered.
void csfxShadeVert (iGraphics3D *g3d, const csColor &topcolor, const csColor &bottomcolor, uint mixmode=CS_FX_COPY)
 Create a vertical shading from topcolor to bottomcolor.
void csfxWhiteOut (iGraphics3D *g3d, float fadevalue)
 Increase the brightness of the image.


Detailed Description

Some full screen special effects.

Most need to be called, either during 2d drawing phase - between the g2d->BeginDraw and FinishDraw calls, or they need to be called in the 3d drawing phase, between the g3d->BeginDraw and FinishDraw calls.

Definition in file csfxscr.h.


Function Documentation

void csfxBlueScreen ( iGraphics3D g3d,
float  fadevalue 
)

Similar to csfxGreenScreen, but makes the screen show only blue fadevalue 0: no fading, fadevalue 1: only blue tints are visible.

This routine must only be used between g3d->BeginDraw and FinishDraw calls.

void csfxFadeOut ( iGraphics3D g3d,
float  fadevalue 
)

Fade the screen to black.

The fadevalue determines how much fading is done. fadevalue 0: no fading. fadevalue 1: all black. Hardware acceleration is used, if available. This routine must only be used between g3d->BeginDraw and FinishDraw calls.

void csfxFadeTo ( iGraphics3D g3d,
iTextureHandle tex,
float  fadevalue 
)

Fade to given pixmap (which must be prepared for 3D usage), fadevalue 0: no fading, fadevalue 1: only given texture is visible.

This routine must only be used between g3d->BeginDraw and FinishDraw calls.

void csfxFadeToColor ( iGraphics3D g3d,
float  fadevalue,
const csColor color 
)

Fade the screen to a specific color, passed as parameter.

fadevalue 0: no fading, fadevalue 1: screen filled with the given color. This routine must only be used between g3d->BeginDraw and FinishDraw calls.

void csfxGreenScreen ( iGraphics3D g3d,
float  fadevalue 
)

Make the screen look like an old fashioned green-only monitor.

fadevalue 0: no fading, fadevalue 1: only green tints are visible. This routine must only be used between g3d->BeginDraw and FinishDraw calls.

void csfxInterference ( iGraphics2D g2d,
float  amount,
float  anim,
float  length 
)

Shows lines of interference on the screen.

anim is an animation value. (0..1) change it a bit for animation. amount is the number of stripes, 0=almost none, 1=screen is mostly filled. amount must be >= 0; length is the maximum width in pixels for the stripes. On 3d hardware, drawing 2d lines is expensive (compared to drawing polygons). For good speed, use amount ~0.3, length >= 30 or so. Use this routine in 2D drawing mode.

void csfxRedScreen ( iGraphics3D g3d,
float  fadevalue 
)

Similar to csfxGreenScreen, but makes the screen show only red.

fadevalue 0: no fading, fadevalue 1: only red tints are visible. This routine must only be used between g3d->BeginDraw and FinishDraw calls.

void csfxScreenDPFX ( iGraphics3D g3d,
iTextureHandle tex,
uint  mixmode,
float  r,
float  g,
float  b,
float  a 
)

Do a fullscreen drawpolygonFX draw, used by some other routines.

With tex NULL it draws solid colour. pass colours between 0 and 1. This routine must only be used between g3d->BeginDraw and FinishDraw calls. fa at 1 is solid colour.

void csfxScreenDPFXPartial ( iGraphics3D g3d,
int  x,
int  y,
int  w,
int  h,
iTextureHandle tex,
uint  mixmode,
float  r,
float  g,
float  b,
float  a 
)

Do a drawpolygonFX draw, but only part of the screen is covered.

With tex NULL it draws solid colour. pass colours between 0 and 1. Rest the same as the fullscreen version. fa at 1 is solid colour.

void csfxShadeVert ( iGraphics3D g3d,
const csColor topcolor,
const csColor bottomcolor,
uint  mixmode = CS_FX_COPY 
)

Create a vertical shading from topcolor to bottomcolor.

default this is copied to the screen, overwriting the old contents, also other mixmodes can be used. This routine must only be used between g3d->BeginDraw and FinishDraw calls.

void csfxWhiteOut ( iGraphics3D g3d,
float  fadevalue 
)

Increase the brightness of the image.

fadevalue 0: no fading, fadevalue 1: full white. This routine must only be used between g3d->BeginDraw and FinishDraw calls.


Generated for Crystal Space by doxygen 1.4.7