|
SDLGameEngine
|
Effects for fading between screens. More...
Data Structures | |
| struct | SGEFADEFX |
Defines | |
| #define | sgeFadeFXDeleteSprites(fx, yesno) sgeFadeFXDeleteSurfaces(fx, yesno) |
| when destroying the effect, should the image resources be destroyed too? | |
Enumerations | |
| enum | SGEFADEFX_TYPES { SGEFADEFX_FADE, SGEFADEFX_WIPE_LEFT, SGEFADEFX_WIPE_RIGHT, SGEFADEFX_WIPE_TOP, SGEFADEFX_WIPE_BOTTOM, SGEFADEFX_SCROLL_LEFT, SGEFADEFX_SCROLL_RIGHT, SGEFADEFX_SCROLL_TOP, SGEFADEFX_SCROLL_BOTTOM } |
Functions | |
| SGEFADEFX * | sgeFadeFXNew (Uint32 type, Uint32 runTime, SGESPRITE *source, SGESPRITE *destination) |
| create a new fade effect from between two sprites | |
| SGEFADEFX * | sgeFadeFXNewSDLSurface (Uint32 type, Uint32 runTime, SDL_Surface *source, SDL_Surface *destination) |
| create a new fade effect from between two SDL_Surface images | |
| void | sgeFadeFXDestroy (SGEFADEFX *fx) |
| destroy the SGEFADEFX and free resources | |
| void | sgeFadeFXDeleteSurfaces (SGEFADEFX *fx, Uint8 yesno) |
| when destroying the effect, should the image resources be destroyed too? | |
| void | sgeFadeFXPreDelay (SGEFADEFX *fx, Uint32 delay) |
| set a delay before starting the fade | |
| void | sgeFadeFXPostDelay (SGEFADEFX *fx, Uint32 delay) |
| set a delay between the actual fade beeing finished and sgeFadeFXFinished returning true | |
| void | sgeFadeFXSetTarget (SGEFADEFX *fx, SDL_Surface *surface) |
| set the render target of the effect | |
| void | sgeFadeFXDraw (SGEFADEFX *fx) |
| draw the effect | |
| int | sgeFadeFXFinished (SGEFADEFX *fx) |
| check if the effect is finished | |
Variables | |
| void(* | SGEFADEFX::updateFunction )(void *) |
| a pointer to the update function | |
Effects for fading between screens.
Functions to automatically blend between two images.
| #define sgeFadeFXDeleteSprites | ( | fx, | |
| yesno | |||
| ) | sgeFadeFXDeleteSurfaces(fx, yesno) |
when destroying the effect, should the image resources be destroyed too?
| fx | a pointer to a SGEFADEFX |
| yesno | YES/NO to destroy or not destroy the images |
default behaviour is NOT to free the image resources
Definition at line 105 of file sgefadefx.h.
| enum SGEFADEFX_TYPES |
Definition at line 28 of file sgefadefx.h.
| void sgeFadeFXDeleteSurfaces | ( | SGEFADEFX * | fx, |
| Uint8 | yesno | ||
| ) |
when destroying the effect, should the image resources be destroyed too?
| fx | a pointer to a SGEFADEFX |
| yesno | YES/NO to destroy or not destroy the images |
default behaviour is NOT to free the image resources
Definition at line 99 of file sgefadefx.c.
| void sgeFadeFXDestroy | ( | SGEFADEFX * | fx | ) |
destroy the SGEFADEFX and free resources
| fx | a pointer to a SGEFADEFX |
Definition at line 63 of file sgefadefx.c.
| void sgeFadeFXDraw | ( | SGEFADEFX * | fx | ) |
| int sgeFadeFXFinished | ( | SGEFADEFX * | fx | ) |
check if the effect is finished
| fx | a pointer to a SGEFADEFX |
Definition at line 103 of file sgefadefx.c.
| SGEFADEFX* sgeFadeFXNew | ( | Uint32 | type, |
| Uint32 | runTime, | ||
| SGESPRITE * | source, | ||
| SGESPRITE * | destination | ||
| ) |
create a new fade effect from between two sprites
| type | the type of the effect ( SGEFADEFX_TYPES ) |
| runTime | the time the fade should take place in miliseconds |
| source | the source SGESPRITE |
| destination | the destination SGEPRITE |
Definition at line 43 of file sgefadefx.c.
| SGEFADEFX* sgeFadeFXNewSDLSurface | ( | Uint32 | type, |
| Uint32 | runTime, | ||
| SDL_Surface * | source, | ||
| SDL_Surface * | destination | ||
| ) |
create a new fade effect from between two SDL_Surface images
| type | the type of the effect ( SGEFADEFX_TYPES ) |
| runTime | the time the fade should take place in miliseconds |
| source | the source, as SDL_Surface |
| destination | the destinatio, as SDL_Surface |
Definition at line 53 of file sgefadefx.c.
| void sgeFadeFXPostDelay | ( | SGEFADEFX * | fx, |
| Uint32 | delay | ||
| ) |
set a delay between the actual fade beeing finished and sgeFadeFXFinished returning true
| fx | a pointer to a SGEFADEFX |
| delay | the delay in miliseconds |
Definition at line 111 of file sgefadefx.c.
| void sgeFadeFXPreDelay | ( | SGEFADEFX * | fx, |
| Uint32 | delay | ||
| ) |
set a delay before starting the fade
| fx | a pointer to a SGEFADEFX |
| delay | the delay in miliseconds |
Definition at line 107 of file sgefadefx.c.
| void sgeFadeFXSetTarget | ( | SGEFADEFX * | fx, |
| SDL_Surface * | surface | ||
| ) |
set the render target of the effect
| fx | a pointer to a SGEFADEFX |
| surface | the target SDL_Surface |
By default the effect is rendered to screen, but can be rendered to any SDL_Surface
Definition at line 115 of file sgefadefx.c.