Mercurial > hg > dmlib
annotate dmengine.h @ 578:cf5d44b36851
Add some initial code for video setup screen.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Fri, 12 Apr 2013 04:44:25 +0300 |
parents | 14640d0688d3 |
children | 17bf1704d42e |
rev | line source |
---|---|
372 | 1 #ifndef DMENGINE_H |
2 #define DMENGINE_H | |
32
d1a6833a5d67
Added a simple demo engine core.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
3 |
d1a6833a5d67
Added a simple demo engine core.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
4 #include "dmlib.h" |
310
713c8018c3ce
Fix includes in the dmsimple engine.
Matti Hamalainen <ccr@tnsp.org>
parents:
288
diff
changeset
|
5 #include <SDL_events.h> |
713c8018c3ce
Fix includes in the dmsimple engine.
Matti Hamalainen <ccr@tnsp.org>
parents:
288
diff
changeset
|
6 #include <SDL_audio.h> |
32
d1a6833a5d67
Added a simple demo engine core.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
7 #include "dmres.h" |
368 | 8 #include "dmvecmat.h" |
32
d1a6833a5d67
Added a simple demo engine core.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
9 |
105
d5d27f262227
Beging merging of dmsimple2-fork into the main "engine".
Matti Hamalainen <ccr@tnsp.org>
parents:
94
diff
changeset
|
10 #ifdef DM_USE_JSS |
32
d1a6833a5d67
Added a simple demo engine core.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
11 #include "jss.h" |
d1a6833a5d67
Added a simple demo engine core.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
12 #include "jssmod.h" |
d1a6833a5d67
Added a simple demo engine core.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
13 #include "jssmix.h" |
d1a6833a5d67
Added a simple demo engine core.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
14 #include "jssplr.h" |
105
d5d27f262227
Beging merging of dmsimple2-fork into the main "engine".
Matti Hamalainen <ccr@tnsp.org>
parents:
94
diff
changeset
|
15 #endif |
32
d1a6833a5d67
Added a simple demo engine core.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
16 |
d1a6833a5d67
Added a simple demo engine core.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
17 |
317 | 18 #ifdef __cplusplus |
19 extern "C" { | |
20 #endif | |
21 | |
22 | |
368 | 23 #define DT_MAGIC_ID "SDMETLNE" |
24 #define DT_MAX_EFFECT_PARAMS 16 | |
25 #define DT_MAX_NAME_LENGTH 32 | |
26 #define DT_FLOAT_STORE_SIZE 16 | |
27 | |
28 | |
29 enum | |
30 { | |
31 EFIT_SET, // No interpolation, just "set" the value | |
32 EFIT_LINEAR, // Linear interpolation | |
33 EFIT_SMOOTH, // Smoothstep interpolation | |
34 }; | |
35 | |
36 enum | |
37 { | |
38 EFPT_INT, | |
39 EFPT_FLOAT, | |
40 EFPT_STRING, | |
41 EFPT_VECTOR, | |
42 EFPT_MATRIX, | |
43 }; | |
44 | |
45 | |
46 typedef struct | |
47 { | |
48 int type; // Interpolation type (EFIT_*) between this and next point | |
49 int time; // Offsets to event start, -1 == attach to event start, -2 = event end (if event) | |
50 | |
51 int vint; | |
52 DMFloat vfloat; | |
53 DMVector vector; | |
54 DMMatrix matrix; | |
55 } DMTimelinePoint; | |
56 | |
57 | |
58 typedef struct | |
59 { | |
60 int npoints, nallocated; | |
61 DMTimelinePoint *points; | |
62 } DMTimelinePoints; | |
63 | |
64 | |
65 typedef struct | |
66 { | |
67 char *name; // Name / description of the parameter | |
68 int type; // Type (EFPT_*) | |
69 | |
70 DMTimelinePoints pts; | |
71 char *vstr; | |
72 | |
73 // Current values (interpolated) | |
74 int vint; | |
75 DMFloat vfloat; | |
76 DMVector vvector; | |
77 DMMatrix vmatrix; | |
78 } DMTimelineEventParam; | |
79 | |
80 | |
81 typedef struct | |
82 { | |
83 char name[DT_MAX_NAME_LENGTH]; | |
84 Uint32 type; | |
85 } DMFTimelineEventParam; | |
86 | |
87 | |
88 struct DMEngineData; | |
89 | |
90 | |
91 typedef struct | |
92 { | |
93 char * name; | |
94 int type; | |
95 | |
96 int (*init)(struct DMEngineData *, void **data); | |
97 void (*shutdown)(struct DMEngineData *, void *data); | |
98 int (*render)(SDL_Surface *screen, void *data, const DMTimelineEventParam *params, const int time); | |
99 | |
100 int nparams; | |
101 DMTimelineEventParam params[DT_MAX_EFFECT_PARAMS]; | |
102 } DMEffect; | |
103 | |
104 | |
573
14640d0688d3
Make timeline stuff optional.
Matti Hamalainen <ccr@tnsp.org>
parents:
564
diff
changeset
|
105 #ifdef DM_USE_TIMELINE |
14640d0688d3
Make timeline stuff optional.
Matti Hamalainen <ccr@tnsp.org>
parents:
564
diff
changeset
|
106 |
14640d0688d3
Make timeline stuff optional.
Matti Hamalainen <ccr@tnsp.org>
parents:
564
diff
changeset
|
107 |
368 | 108 typedef struct |
109 { | |
110 Uint32 start, duration; | |
111 char effectName[DT_MAX_NAME_LENGTH]; | |
112 Uint32 nparams; | |
113 } DMFTimelineEvent; | |
114 | |
115 | |
116 typedef struct | |
117 { | |
118 int start, duration; | |
119 DMEffect *effect; | |
120 int nparams; | |
121 DMTimelineEventParam *params; | |
122 } DMTimelineEvent; | |
123 | |
124 | |
125 typedef struct | |
126 { | |
127 BOOL enabled; | |
128 DMTimelinePoints points; | |
129 } DMTimelineCurve; | |
130 | |
131 | |
132 typedef struct | |
133 { | |
134 char name[DT_MAX_NAME_LENGTH]; | |
135 Uint8 enabled; | |
136 Uint32 nevents; | |
137 } DMFTimelineTrack; | |
138 | |
139 | |
140 typedef struct | |
141 { | |
142 char *name; // Name of the timeline track | |
143 BOOL enabled; // Enabled? | |
144 | |
145 int nevents, nallocated; // Number of events | |
146 DMTimelineEvent **events; // Events | |
147 | |
148 DMTimelineCurve composite; // Composite curve (transparency of the "layer") | |
149 } DMTimelineTrack; | |
150 | |
151 | |
152 typedef struct | |
153 { | |
154 char magic[8]; | |
155 char name[DT_MAX_NAME_LENGTH]; | |
156 Uint32 ntracks; | |
157 Uint32 duration; | |
158 } DMFTimeline; | |
159 | |
160 | |
161 typedef struct | |
162 { | |
163 char *name; | |
164 int ntracks, nallocated, duration; | |
165 DMTimelineTrack **tracks; | |
166 } DMTimeline; | |
167 | |
168 | |
169 typedef struct | |
170 { | |
171 DMTimelineTrack *track; | |
172 DMTimelineEvent *event; | |
173 } DMPreparedEvent; | |
174 | |
175 | |
176 typedef struct _DMPreparedEventGroup | |
177 { | |
178 int start, end, nevents, nallocated; | |
179 DMPreparedEvent *events; | |
180 | |
181 struct _DMPreparedEventGroup *next, *prev; | |
182 } DMPreparedEventGroup; | |
183 | |
184 | |
185 typedef struct | |
186 { | |
187 int duration, ngroups, pos; | |
188 DMPreparedEventGroup **groups; | |
189 } DMPreparedTimeline; | |
190 | |
573
14640d0688d3
Make timeline stuff optional.
Matti Hamalainen <ccr@tnsp.org>
parents:
564
diff
changeset
|
191 #endif |
14640d0688d3
Make timeline stuff optional.
Matti Hamalainen <ccr@tnsp.org>
parents:
564
diff
changeset
|
192 |
368 | 193 |
367 | 194 typedef struct DMEngineData |
359
59045853853d
Make resource management re-entrant.
Matti Hamalainen <ccr@tnsp.org>
parents:
354
diff
changeset
|
195 { |
59045853853d
Make resource management re-entrant.
Matti Hamalainen <ccr@tnsp.org>
parents:
354
diff
changeset
|
196 DMResourceLib *resources; |
368 | 197 void **effectData; |
359
59045853853d
Make resource management re-entrant.
Matti Hamalainen <ccr@tnsp.org>
parents:
354
diff
changeset
|
198 |
573
14640d0688d3
Make timeline stuff optional.
Matti Hamalainen <ccr@tnsp.org>
parents:
564
diff
changeset
|
199 #ifdef DM_USE_TIMELINE |
354 | 200 DMResource *timeline; |
345
cac13f180169
Work towards timeline support.
Matti Hamalainen <ccr@tnsp.org>
parents:
342
diff
changeset
|
201 DMTimeline *tl; |
cac13f180169
Work towards timeline support.
Matti Hamalainen <ccr@tnsp.org>
parents:
342
diff
changeset
|
202 DMPreparedTimeline *ptl; |
573
14640d0688d3
Make timeline stuff optional.
Matti Hamalainen <ccr@tnsp.org>
parents:
564
diff
changeset
|
203 #endif |
345
cac13f180169
Work towards timeline support.
Matti Hamalainen <ccr@tnsp.org>
parents:
342
diff
changeset
|
204 |
361 | 205 int frameTime, frameCount, |
206 startTime, endTime, | |
390
a7ee3567f718
Remove adjustTime variable, it is not needed anymore.
Matti Hamalainen <ccr@tnsp.org>
parents:
382
diff
changeset
|
207 pauseTime; |
93
15fdd5573344
Add simple (and buggy / not really working) debug mode.
Matti Hamalainen <ccr@tnsp.org>
parents:
32
diff
changeset
|
208 |
15fdd5573344
Add simple (and buggy / not really working) debug mode.
Matti Hamalainen <ccr@tnsp.org>
parents:
32
diff
changeset
|
209 BOOL pauseFlag, paused, exitFlag; |
361 | 210 |
32
d1a6833a5d67
Added a simple demo engine core.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
211 SDL_Surface *screen; |
d1a6833a5d67
Added a simple demo engine core.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
212 SDL_Event event; |
105
d5d27f262227
Beging merging of dmsimple2-fork into the main "engine".
Matti Hamalainen <ccr@tnsp.org>
parents:
94
diff
changeset
|
213 SDL_AudioSpec optAfmt; |
578
cf5d44b36851
Add some initial code for video setup screen.
Matti Hamalainen <ccr@tnsp.org>
parents:
573
diff
changeset
|
214 |
cf5d44b36851
Add some initial code for video setup screen.
Matti Hamalainen <ccr@tnsp.org>
parents:
573
diff
changeset
|
215 int optScrWidth, optScrHeight, |
cf5d44b36851
Add some initial code for video setup screen.
Matti Hamalainen <ccr@tnsp.org>
parents:
573
diff
changeset
|
216 optScrDepth, optVFlags, optScrAspect; |
cf5d44b36851
Add some initial code for video setup screen.
Matti Hamalainen <ccr@tnsp.org>
parents:
573
diff
changeset
|
217 |
cf5d44b36851
Add some initial code for video setup screen.
Matti Hamalainen <ccr@tnsp.org>
parents:
573
diff
changeset
|
218 int optResFlags; |
105
d5d27f262227
Beging merging of dmsimple2-fork into the main "engine".
Matti Hamalainen <ccr@tnsp.org>
parents:
94
diff
changeset
|
219 char *optDataPath, *optPackFilename; |
32
d1a6833a5d67
Added a simple demo engine core.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
220 |
105
d5d27f262227
Beging merging of dmsimple2-fork into the main "engine".
Matti Hamalainen <ccr@tnsp.org>
parents:
94
diff
changeset
|
221 #ifdef DM_USE_JSS |
32
d1a6833a5d67
Added a simple demo engine core.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
222 JSSMixer *dev; |
d1a6833a5d67
Added a simple demo engine core.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
223 JSSPlayer *plr; |
110
8db49a23b393
Fixes to make the JSS audio subsystem support work again in the engine framework.
Matti Hamalainen <ccr@tnsp.org>
parents:
105
diff
changeset
|
224 int jss_format; |
105
d5d27f262227
Beging merging of dmsimple2-fork into the main "engine".
Matti Hamalainen <ccr@tnsp.org>
parents:
94
diff
changeset
|
225 #endif |
d5d27f262227
Beging merging of dmsimple2-fork into the main "engine".
Matti Hamalainen <ccr@tnsp.org>
parents:
94
diff
changeset
|
226 |
d5d27f262227
Beging merging of dmsimple2-fork into the main "engine".
Matti Hamalainen <ccr@tnsp.org>
parents:
94
diff
changeset
|
227 #ifdef DM_USE_TREMOR |
359
59045853853d
Make resource management re-entrant.
Matti Hamalainen <ccr@tnsp.org>
parents:
354
diff
changeset
|
228 DMResource *audioRes; |
113 | 229 size_t audioPos; |
105
d5d27f262227
Beging merging of dmsimple2-fork into the main "engine".
Matti Hamalainen <ccr@tnsp.org>
parents:
94
diff
changeset
|
230 #endif |
32
d1a6833a5d67
Added a simple demo engine core.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
231 |
366
38e10b5f4e09
Work towards base engine re-entrancy.
Matti Hamalainen <ccr@tnsp.org>
parents:
361
diff
changeset
|
232 int (*demoInit)(struct DMEngineData *); |
38e10b5f4e09
Work towards base engine re-entrancy.
Matti Hamalainen <ccr@tnsp.org>
parents:
361
diff
changeset
|
233 int (*demoInitPreVideo)(struct DMEngineData *); |
38e10b5f4e09
Work towards base engine re-entrancy.
Matti Hamalainen <ccr@tnsp.org>
parents:
361
diff
changeset
|
234 int (*demoInitPostVideo)(struct DMEngineData *); |
38e10b5f4e09
Work towards base engine re-entrancy.
Matti Hamalainen <ccr@tnsp.org>
parents:
361
diff
changeset
|
235 int (*demoRender)(struct DMEngineData *); |
38e10b5f4e09
Work towards base engine re-entrancy.
Matti Hamalainen <ccr@tnsp.org>
parents:
361
diff
changeset
|
236 void (*demoShutdown)(struct DMEngineData *); |
38e10b5f4e09
Work towards base engine re-entrancy.
Matti Hamalainen <ccr@tnsp.org>
parents:
361
diff
changeset
|
237 void (*demoQuit)(struct DMEngineData *); |
127
ab4086db7dad
Various improvements in modularity.
Matti Hamalainen <ccr@tnsp.org>
parents:
113
diff
changeset
|
238 |
32
d1a6833a5d67
Added a simple demo engine core.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
239 } DMEngineData; |
d1a6833a5d67
Added a simple demo engine core.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
240 |
d1a6833a5d67
Added a simple demo engine core.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
241 |
382
371edff7dc3d
Fix extern variables to match what are actually declared in dmengine.c
Matti Hamalainen <ccr@tnsp.org>
parents:
375
diff
changeset
|
242 extern DMEffect *engineEffects; |
371edff7dc3d
Fix extern variables to match what are actually declared in dmengine.c
Matti Hamalainen <ccr@tnsp.org>
parents:
375
diff
changeset
|
243 extern int nengineEffects, nengineEffectsAlloc; |
368 | 244 |
245 | |
246 // Effect registration | |
247 int engineRegisterEffect(const DMEffect *ef); | |
371
56bd2693472f
Oops, the function prototypes were incorrect.
Matti Hamalainen <ccr@tnsp.org>
parents:
368
diff
changeset
|
248 int engineInitializeEffects(DMEngineData *); |
56bd2693472f
Oops, the function prototypes were incorrect.
Matti Hamalainen <ccr@tnsp.org>
parents:
368
diff
changeset
|
249 void engineShutdownEffects(DMEngineData *); |
368 | 250 DMEffect *engineFindEffect(const char *name, const int nparams); |
251 DMEffect *engineFindEffectByName(const char *name); | |
252 | |
253 | |
573
14640d0688d3
Make timeline stuff optional.
Matti Hamalainen <ccr@tnsp.org>
parents:
564
diff
changeset
|
254 #ifdef DM_USE_TIMELINE |
368 | 255 // Basic timeline handling |
256 int dmLoadTimeline(DMResource *res, DMTimeline **tl); | |
257 void dmFreeTimeline(DMTimeline *tl); | |
258 | |
259 void dmFreeTimelinePoints(DMTimelinePoints *points); | |
260 void dmFreeTimelineEventParam(DMTimelineEventParam *param); | |
261 void dmFreeTimelineEvent(DMTimelineEvent *event); | |
262 void dmFreeTimelineTrack(DMTimelineTrack *track); | |
263 | |
264 | |
265 // Execution related | |
266 int dmPrepareTimeline(DMTimeline *tl, DMPreparedTimeline *ptl); | |
267 void dmFreePreparedTimelineData(DMPreparedTimeline *ptl); | |
268 | |
269 int dmSeekTimeline(DMPreparedTimeline *tl, int time); | |
270 int dmExecuteTimeline(DMPreparedTimeline *tl, SDL_Surface *screen, int time); | |
271 | |
272 | |
273 // Editing/saving related functions | |
395
530db8fa4569
Implement functions for copying timelines and timeline components.
Matti Hamalainen <ccr@tnsp.org>
parents:
390
diff
changeset
|
274 int dmCopyTimelinePoints(const DMTimelinePoints *src, DMTimelinePoints *dst); |
530db8fa4569
Implement functions for copying timelines and timeline components.
Matti Hamalainen <ccr@tnsp.org>
parents:
390
diff
changeset
|
275 int dmCopyTimelineEventParam(const DMTimelineEventParam *src, DMTimelineEventParam *dst); |
530db8fa4569
Implement functions for copying timelines and timeline components.
Matti Hamalainen <ccr@tnsp.org>
parents:
390
diff
changeset
|
276 int dmCopyTimelineEvent(const DMTimelineEvent *src, DMTimelineEvent **pdst); |
530db8fa4569
Implement functions for copying timelines and timeline components.
Matti Hamalainen <ccr@tnsp.org>
parents:
390
diff
changeset
|
277 int dmCopyTimelineCurve(const DMTimelineCurve *src, DMTimelineCurve *dst); |
530db8fa4569
Implement functions for copying timelines and timeline components.
Matti Hamalainen <ccr@tnsp.org>
parents:
390
diff
changeset
|
278 int dmCopyTimelineTrack(const DMTimelineTrack *src, DMTimelineTrack **pdst); |
530db8fa4569
Implement functions for copying timelines and timeline components.
Matti Hamalainen <ccr@tnsp.org>
parents:
390
diff
changeset
|
279 int dmCopyTimeline(const DMTimeline *src, DMTimeline **pdst); |
530db8fa4569
Implement functions for copying timelines and timeline components.
Matti Hamalainen <ccr@tnsp.org>
parents:
390
diff
changeset
|
280 |
368 | 281 int dmSaveTimeline(DMResource *res, DMTimeline *tl); |
282 | |
283 int dmTimelineNew(DMTimeline **tl, const char *name); | |
284 int dmTimelineAddTrack(DMTimeline *tl, DMTimelineTrack **track, const char *name); | |
285 int dmTimelineTrackAddEvent(DMTimelineTrack *track, int start, int duration, DMTimelineEvent **pev); | |
402
0f290af63fc1
Timeline event drawing prototype works.
Matti Hamalainen <ccr@tnsp.org>
parents:
395
diff
changeset
|
286 int dmTimelineEventSetEffect(DMTimelineEvent *event, DMEffect *ef); |
0f290af63fc1
Timeline event drawing prototype works.
Matti Hamalainen <ccr@tnsp.org>
parents:
395
diff
changeset
|
287 int dmTimelineEventSetEffectByIndex(DMTimelineEvent *event, const int index); |
0f290af63fc1
Timeline event drawing prototype works.
Matti Hamalainen <ccr@tnsp.org>
parents:
395
diff
changeset
|
288 int dmTimelineEventSetEffectByName(DMTimelineEvent *event, const char *name); |
368 | 289 |
573
14640d0688d3
Make timeline stuff optional.
Matti Hamalainen <ccr@tnsp.org>
parents:
564
diff
changeset
|
290 #endif // DM_USE_TIMELINE |
14640d0688d3
Make timeline stuff optional.
Matti Hamalainen <ccr@tnsp.org>
parents:
564
diff
changeset
|
291 |
368 | 292 |
293 // Resource helpers | |
366
38e10b5f4e09
Work towards base engine re-entrancy.
Matti Hamalainen <ccr@tnsp.org>
parents:
361
diff
changeset
|
294 #define engineGetResImage(eng, x, name) \ |
32
d1a6833a5d67
Added a simple demo engine core.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
295 do { \ |
366
38e10b5f4e09
Work towards base engine re-entrancy.
Matti Hamalainen <ccr@tnsp.org>
parents:
361
diff
changeset
|
296 if ((x = (SDL_Surface *) engineGetResource(eng, name)) == NULL) \ |
32
d1a6833a5d67
Added a simple demo engine core.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
297 return DMERR_INIT_FAIL; \ |
d1a6833a5d67
Added a simple demo engine core.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
298 } while (0) |
d1a6833a5d67
Added a simple demo engine core.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
299 |
366
38e10b5f4e09
Work towards base engine re-entrancy.
Matti Hamalainen <ccr@tnsp.org>
parents:
361
diff
changeset
|
300 #define engineGetResModule(eng, x, name) \ |
32
d1a6833a5d67
Added a simple demo engine core.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
301 do { \ |
366
38e10b5f4e09
Work towards base engine re-entrancy.
Matti Hamalainen <ccr@tnsp.org>
parents:
361
diff
changeset
|
302 if ((x = (JSSModule *) engineGetResource(eng, name)) == NULL) \ |
32
d1a6833a5d67
Added a simple demo engine core.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
303 return DMERR_INIT_FAIL; \ |
d1a6833a5d67
Added a simple demo engine core.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
304 } while (0) |
d1a6833a5d67
Added a simple demo engine core.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
305 |
367 | 306 #define engineFindResource(eng, name) dmres_find((eng)->resources, name) |
307 | |
32
d1a6833a5d67
Added a simple demo engine core.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
308 |
342
c6ec970dc3cf
Separate some demo engine parts to two different modules.
Matti Hamalainen <ccr@tnsp.org>
parents:
335
diff
changeset
|
309 int engineClassifier(DMResource *res); |
366
38e10b5f4e09
Work towards base engine re-entrancy.
Matti Hamalainen <ccr@tnsp.org>
parents:
361
diff
changeset
|
310 void * engineGetResource(DMEngineData *eng, const char *name); |
38e10b5f4e09
Work towards base engine re-entrancy.
Matti Hamalainen <ccr@tnsp.org>
parents:
361
diff
changeset
|
311 int engineGetTime(DMEngineData *eng, int t); |
38e10b5f4e09
Work towards base engine re-entrancy.
Matti Hamalainen <ccr@tnsp.org>
parents:
361
diff
changeset
|
312 int engineGetTimeDTi(DMEngineData *eng); |
38e10b5f4e09
Work towards base engine re-entrancy.
Matti Hamalainen <ccr@tnsp.org>
parents:
361
diff
changeset
|
313 int engineGetTick(DMEngineData *eng); |
38e10b5f4e09
Work towards base engine re-entrancy.
Matti Hamalainen <ccr@tnsp.org>
parents:
361
diff
changeset
|
314 float engineGetTimeDT(DMEngineData *eng); |
368 | 315 |
316 // Implemented in actual demo code | |
366
38e10b5f4e09
Work towards base engine re-entrancy.
Matti Hamalainen <ccr@tnsp.org>
parents:
361
diff
changeset
|
317 int demoPreInit(DMEngineData *eng); |
32
d1a6833a5d67
Added a simple demo engine core.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
318 |
317 | 319 |
320 #ifdef __cplusplus | |
321 } | |
322 #endif | |
323 | |
372 | 324 #endif // DMENGINE_H |