/usr/include/crystalspace-2.0/cstool/csfxscr.h is in libcrystalspace-dev 2.0+dfsg-1build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 | /*
Copyright (C) 2001 by W.C.A. Wijngaards
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __CS_CSFXSCR_H__
#define __CS_CSFXSCR_H__
#include "csextern.h"
#include "ivideo/graph3d.h"
class csColor;
struct iGraphics2D;
struct iTextureManager;
/**\file
* Some full screen special effects.
* Most need to be called, either during 2d drawing phase - between
* the iGraphics2D::BeginDraw() and iGraphics2D::FinishDraw() calls, or they need
* to be called in the 3d drawing phase, between the iGraphics3D::BeginDraw()
* and iGraphics3D::FinishDraw() calls.
*/
/**
* 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.
*/
CS_CRYSTALSPACE_EXPORT void csfxInterference (iGraphics2D *g2d,
float amount, float anim, float length);
/**
* 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 iGraphics3D::BeginDraw() and
* iGraphics3D::FinishDraw() calls.
*/
CS_CRYSTALSPACE_EXPORT void csfxFadeOut (iGraphics3D *g3d, 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 iGraphics3D::BeginDraw() and
* iGraphics3D::FinishDraw() calls.
*/
CS_CRYSTALSPACE_EXPORT void csfxFadeTo (iGraphics3D *g3d, iTextureHandle *tex,
float fadevalue);
/**
* 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 iGraphics3D::BeginDraw() and
* iGraphics3D::FinishDraw() calls.
*/
CS_CRYSTALSPACE_EXPORT void csfxFadeToColor (iGraphics3D *g3d, float fadevalue,
const csColor& color);
/**
* 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 iGraphics3D::BeginDraw() and
* iGraphics3D::FinishDraw() calls.
*/
CS_CRYSTALSPACE_EXPORT void csfxGreenScreen (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 iGraphics3D::BeginDraw() and
* iGraphics3D::FinishDraw() calls.
*/
CS_CRYSTALSPACE_EXPORT void csfxRedScreen (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 iGraphics3D::BeginDraw() and
* iGraphics3D::FinishDraw() calls.
*/
CS_CRYSTALSPACE_EXPORT void csfxBlueScreen (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 iGraphics3D::BeginDraw() and
* iGraphics3D::FinishDraw() calls.
*/
CS_CRYSTALSPACE_EXPORT void csfxWhiteOut (iGraphics3D *g3d, float fadevalue);
/**
* 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 iGraphics3D::BeginDraw() and
* iGraphics3D::FinishDraw() calls.
*/
CS_CRYSTALSPACE_EXPORT void csfxShadeVert (iGraphics3D *g3d,
const csColor& topcolor, const csColor& bottomcolor,
uint mixmode = CS_FX_COPY);
/**
* 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 iGraphics3D::BeginDraw() and
* iGraphics3D::FinishDraw() calls.
* fa at 1 is solid colour.
*/
CS_CRYSTALSPACE_EXPORT void csfxScreenDPFX (iGraphics3D *g3d,
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.
*/
CS_CRYSTALSPACE_EXPORT void csfxScreenDPFXPartial(iGraphics3D *g3d,
int x, int y, int w, int h, iTextureHandle *tex, uint mixmode,
float r, float g, float b, float a);
#endif // __CS_CSFXSCR_H__
|