|
SDLGameEngine
|
00001 #ifndef _SGEFADEEFFECTS_H 00002 #define _SGEFADEEFFECTS_H 00003 00004 #ifdef __cplusplus 00005 extern "C" { 00006 #endif 00007 00012 /* 00013 * Copyright (c) 2007 Heiko Irrgang 00014 * 00015 * The license and distribution terms for this file may be 00016 * found in the file COPYING in this distribution or at 00017 * http://93-interactive.com/cms/products/software/sdl-game-engine/license/ 00018 */ 00019 00028 enum SGEFADEFX_TYPES { 00029 SGEFADEFX_FADE, 00030 SGEFADEFX_WIPE_LEFT, 00031 SGEFADEFX_WIPE_RIGHT, 00032 SGEFADEFX_WIPE_TOP, 00033 SGEFADEFX_WIPE_BOTTOM, 00034 SGEFADEFX_SCROLL_LEFT, 00035 SGEFADEFX_SCROLL_RIGHT, 00036 SGEFADEFX_SCROLL_TOP, 00037 SGEFADEFX_SCROLL_BOTTOM 00038 }; 00039 00040 typedef struct { 00042 Uint8 finished; 00044 void (*updateFunction)(void *); 00046 Uint32 type; 00047 Uint32 runTime; 00048 Uint32 startTime; 00049 Uint32 realStartTime; 00050 Uint32 current; 00051 SDL_Surface *src; 00052 SDL_Surface *dst; 00053 SGESPRITE *srcSprite; 00054 SGESPRITE *dstSprite; 00055 Uint32 preDelay; 00056 Uint32 postDelay; 00057 Uint8 deleteSurfaces; 00058 SDL_Surface *surface; 00059 } SGEFADEFX; 00060 00070 SGEFADEFX *sgeFadeFXNew(Uint32 type, Uint32 runTime, SGESPRITE *source, SGESPRITE *destination); 00071 00081 SGEFADEFX *sgeFadeFXNewSDLSurface(Uint32 type, Uint32 runTime, SDL_Surface *source, SDL_Surface *destination); 00082 00087 void sgeFadeFXDestroy(SGEFADEFX *fx); 00088 00096 void sgeFadeFXDeleteSurfaces(SGEFADEFX *fx, Uint8 yesno); 00097 00105 #define sgeFadeFXDeleteSprites(fx, yesno) sgeFadeFXDeleteSurfaces(fx, yesno) 00106 00112 void sgeFadeFXPreDelay(SGEFADEFX *fx, Uint32 delay); 00113 00119 void sgeFadeFXPostDelay(SGEFADEFX *fx, Uint32 delay); 00120 00129 void sgeFadeFXSetTarget(SGEFADEFX *fx, SDL_Surface *surface); 00130 00135 void sgeFadeFXDraw(SGEFADEFX *fx); 00136 00142 int sgeFadeFXFinished(SGEFADEFX *fx); 00143 00147 void sgeFadeFXFadeUpdate(void *fxdata); 00148 void sgeFadeFXWipeScrollUpdate(void *fxdata); 00149 00150 // }@ 00151 00152 #ifdef __cplusplus 00153 } 00154 #endif 00155 00156 #endif