Mercurial > hg > dmlib
view dmsimple.h @ 77:c6cdaa675801
Add the file mode parameter to dmf_create_stdio() calls, and throw in some
cleanups.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 02 Oct 2012 05:52:35 +0300 |
parents | d1a6833a5d67 |
children | 15fdd5573344 |
line wrap: on
line source
#ifndef DMSIMPLE_H #define DMSIMPLE_H #include "dmlib.h" #include "dmargs.h" #include "dmres.h" #include "dmimage.h" #include "jss.h" #include "jssmod.h" #include "jssmix.h" #include "jssplr.h" typedef struct { int currFrame, endTime, startTime, totalFrameTime, debugTime; BOOL pauseFlag, exitFlag; SDL_Surface *screen; SDL_Event event; int optScrWidth, optScrHeight, optVFlags, optBitDepth; JSSMixer *dev; JSSPlayer *plr; } 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 demoGlobalInit(); int demoPreInit(); int demoMainTick(); void demoFinish(); #endif // DMSIMPLE_H