Mercurial > hg > dmlib
view dmsimple.h @ 310:713c8018c3ce
Fix includes in the dmsimple engine.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Fri, 12 Oct 2012 11:38:40 +0300 |
parents | e2f286781180 |
children | f7b449811403 |
line wrap: on
line source
#ifndef DMSIMPLE_H #define DMSIMPLE_H #include "dmlib.h" #include <SDL_events.h> #include <SDL_audio.h> #include "dmres.h" #ifdef DM_USE_JSS #include "jss.h" #include "jssmod.h" #include "jssmix.h" #include "jssplr.h" #endif typedef struct { int currFrame, endTime, startTime, totalFrameTime, adjustTime, pauseTime; BOOL pauseFlag, paused, exitFlag; SDL_Surface *screen; SDL_Event event; SDL_AudioSpec optAfmt; int optScrWidth, optScrHeight, optVFlags, optBitDepth, optResFlags; char *optDataPath, *optPackFilename; #ifdef DM_USE_JSS JSSMixer *dev; JSSPlayer *plr; int jss_format; #endif #ifdef DM_USE_TREMOR DMResource *audio; size_t audioPos; #endif #ifdef DM_DEBUG BOOL optDebug; Uint8 *audioBuf; int audioBufSize; int audioSamples; int demoDuration; #endif int (*demoInit)(); int (*demoInitPreVideo)(); int (*demoInitPostVideo)(); int (*demoRender)(); void (*demoShutdown)(); void (*demoQuit)(); } DMEngineData; typedef struct { int currFrame, endTime, startTime; } DMFrameData; extern DMEngineData engine; extern DMFrameData frame; #define engineGetResImage(x, name) \ do { \ if ((x = (SDL_Surface *) engineGetResource(name)) == NULL) \ return DMERR_INIT_FAIL; \ } while (0) #define engineGetResModule(x, name) \ do { \ if ((x = (JSSModule *) engineGetResource(name)) == NULL) \ return DMERR_INIT_FAIL; \ } while (0) void * engineGetResource(const char *name); int engineGetTime(int t); int engineGetTimeDTi(); int engineGetTick(); float engineGetTimeDT(); int demoPreInit(); #endif // DMSIMPLE_H