Mercurial > sdl-ios-xcode
annotate test/nds-test-progs/sprite2/source/common.h @ 2686:e9f27fe4f2a1 gsoc2008_nds
Existing testsprite programs made into NDS projects
author | Darren Alton <dalton@stevens.edu> |
---|---|
date | Wed, 13 Aug 2008 00:49:03 +0000 |
parents | |
children |
rev | line source |
---|---|
2686
e9f27fe4f2a1
Existing testsprite programs made into NDS projects
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
1 |
e9f27fe4f2a1
Existing testsprite programs made into NDS projects
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
2 /* A simple test program framework */ |
e9f27fe4f2a1
Existing testsprite programs made into NDS projects
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
3 |
e9f27fe4f2a1
Existing testsprite programs made into NDS projects
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
4 #include <SDL/SDL.h> |
e9f27fe4f2a1
Existing testsprite programs made into NDS projects
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
5 |
e9f27fe4f2a1
Existing testsprite programs made into NDS projects
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
6 #define VERBOSE_VIDEO 0x00000001 |
e9f27fe4f2a1
Existing testsprite programs made into NDS projects
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
7 #define VERBOSE_MODES 0x00000002 |
e9f27fe4f2a1
Existing testsprite programs made into NDS projects
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
8 #define VERBOSE_RENDER 0x00000004 |
e9f27fe4f2a1
Existing testsprite programs made into NDS projects
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
9 #define VERBOSE_EVENT 0x00000008 |
e9f27fe4f2a1
Existing testsprite programs made into NDS projects
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
10 #define VERBOSE_AUDIO 0x00000010 |
e9f27fe4f2a1
Existing testsprite programs made into NDS projects
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
11 |
e9f27fe4f2a1
Existing testsprite programs made into NDS projects
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
12 typedef struct |
e9f27fe4f2a1
Existing testsprite programs made into NDS projects
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
13 { |
e9f27fe4f2a1
Existing testsprite programs made into NDS projects
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
14 /* SDL init flags */ |
e9f27fe4f2a1
Existing testsprite programs made into NDS projects
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
15 char **argv; |
e9f27fe4f2a1
Existing testsprite programs made into NDS projects
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
16 Uint32 flags; |
e9f27fe4f2a1
Existing testsprite programs made into NDS projects
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
17 Uint32 verbose; |
e9f27fe4f2a1
Existing testsprite programs made into NDS projects
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
18 |
e9f27fe4f2a1
Existing testsprite programs made into NDS projects
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
19 /* Video info */ |
e9f27fe4f2a1
Existing testsprite programs made into NDS projects
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
20 const char *videodriver; |
e9f27fe4f2a1
Existing testsprite programs made into NDS projects
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
21 int display; |
e9f27fe4f2a1
Existing testsprite programs made into NDS projects
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
22 const char *window_title; |
e9f27fe4f2a1
Existing testsprite programs made into NDS projects
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
23 Uint32 window_flags; |
e9f27fe4f2a1
Existing testsprite programs made into NDS projects
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
24 int window_x; |
e9f27fe4f2a1
Existing testsprite programs made into NDS projects
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
25 int window_y; |
e9f27fe4f2a1
Existing testsprite programs made into NDS projects
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
26 int window_w; |
e9f27fe4f2a1
Existing testsprite programs made into NDS projects
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
27 int window_h; |
e9f27fe4f2a1
Existing testsprite programs made into NDS projects
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
28 int depth; |
e9f27fe4f2a1
Existing testsprite programs made into NDS projects
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
29 int refresh_rate; |
e9f27fe4f2a1
Existing testsprite programs made into NDS projects
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
30 int num_windows; |
e9f27fe4f2a1
Existing testsprite programs made into NDS projects
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
31 SDL_WindowID *windows; |
e9f27fe4f2a1
Existing testsprite programs made into NDS projects
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
32 |
e9f27fe4f2a1
Existing testsprite programs made into NDS projects
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
33 /* Renderer info */ |
e9f27fe4f2a1
Existing testsprite programs made into NDS projects
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
34 const char *renderdriver; |
e9f27fe4f2a1
Existing testsprite programs made into NDS projects
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
35 Uint32 render_flags; |
e9f27fe4f2a1
Existing testsprite programs made into NDS projects
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
36 SDL_bool skip_renderer; |
e9f27fe4f2a1
Existing testsprite programs made into NDS projects
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
37 |
e9f27fe4f2a1
Existing testsprite programs made into NDS projects
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
38 /* Audio info */ |
e9f27fe4f2a1
Existing testsprite programs made into NDS projects
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
39 const char *audiodriver; |
e9f27fe4f2a1
Existing testsprite programs made into NDS projects
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
40 SDL_AudioSpec audiospec; |
e9f27fe4f2a1
Existing testsprite programs made into NDS projects
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
41 } CommonState; |
e9f27fe4f2a1
Existing testsprite programs made into NDS projects
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
42 |
e9f27fe4f2a1
Existing testsprite programs made into NDS projects
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
43 extern CommonState *CommonCreateState(char **argv, Uint32 flags); |
e9f27fe4f2a1
Existing testsprite programs made into NDS projects
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
44 extern int CommonArg(CommonState * state, int index); |
e9f27fe4f2a1
Existing testsprite programs made into NDS projects
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
45 extern const char *CommonUsage(CommonState * state); |
e9f27fe4f2a1
Existing testsprite programs made into NDS projects
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
46 extern SDL_bool CommonInit(CommonState * state); |
e9f27fe4f2a1
Existing testsprite programs made into NDS projects
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
47 extern void CommonEvent(CommonState * state, SDL_Event * event, int *done); |
e9f27fe4f2a1
Existing testsprite programs made into NDS projects
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
48 extern void CommonQuit(CommonState * state); |