annotate Xcode/TemplatesForXcodeTiger/SDL OpenGL Application/main.c @ 4914:cc7ac6aaac5d

Code style updates.
author Daniel Wyatt <Daniel.Wyatt@gmail.com>
date Tue, 23 Nov 2010 20:29:45 -0500
parents 232e5e00e398
children
rev   line source
3329
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
1
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
2 /* Simple program: Create a blank window, wait for keypress, quit.
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
3
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
4 Please see the SDL documentation for details on using the SDL API:
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
5 /Developer/Documentation/SDL/docs.html
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
6 */
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
7
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
8 #include <stdio.h>
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
9 #include <stdlib.h>
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
10 #include <string.h>
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
11 #include <math.h>
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
12
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
13 #include "SDL.h"
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
14
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
15 extern void Atlantis_Init ();
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
16 extern void Atlantis_Reshape (int w, int h);
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
17 extern void Atlantis_Animate ();
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
18 extern void Atlantis_Display ();
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
19
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
20 static SDL_Surface *gScreen;
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
21
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
22 static void initAttributes ()
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
23 {
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
24 // Setup attributes we want for the OpenGL context
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
25
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
26 int value;
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
27
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
28 // Don't set color bit sizes (SDL_GL_RED_SIZE, etc)
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
29 // Mac OS X will always use 8-8-8-8 ARGB for 32-bit screens and
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
30 // 5-5-5 RGB for 16-bit screens
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
31
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
32 // Request a 16-bit depth buffer (without this, there is no depth buffer)
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
33 value = 16;
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
34 SDL_GL_SetAttribute (SDL_GL_DEPTH_SIZE, value);
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
35
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
36
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
37 // Request double-buffered OpenGL
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
38 // The fact that windows are double-buffered on Mac OS X has no effect
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
39 // on OpenGL double buffering.
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
40 value = 1;
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
41 SDL_GL_SetAttribute (SDL_GL_DOUBLEBUFFER, value);
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
42 }
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
43
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
44 static void printAttributes ()
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
45 {
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
46 // Print out attributes of the context we created
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
47 int nAttr;
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
48 int i;
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
49
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
50 int attr[] = { SDL_GL_RED_SIZE, SDL_GL_BLUE_SIZE, SDL_GL_GREEN_SIZE,
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
51 SDL_GL_ALPHA_SIZE, SDL_GL_BUFFER_SIZE, SDL_GL_DEPTH_SIZE };
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
52
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
53 char *desc[] = { "Red size: %d bits\n", "Blue size: %d bits\n", "Green size: %d bits\n",
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
54 "Alpha size: %d bits\n", "Color buffer size: %d bits\n",
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
55 "Depth bufer size: %d bits\n" };
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
56
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
57 nAttr = sizeof(attr) / sizeof(int);
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
58
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
59 for (i = 0; i < nAttr; i++) {
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
60
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
61 int value;
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
62 SDL_GL_GetAttribute (attr[i], &value);
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
63 printf (desc[i], value);
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
64 }
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
65 }
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
66
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
67 static void createSurface (int fullscreen)
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
68 {
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
69 Uint32 flags = 0;
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
70
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
71 flags = SDL_OPENGL;
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
72 if (fullscreen)
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
73 flags |= SDL_FULLSCREEN;
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
74
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
75 // Create window
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
76 gScreen = SDL_SetVideoMode (640, 480, 0, flags);
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
77 if (gScreen == NULL) {
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
78
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
79 fprintf (stderr, "Couldn't set 640x480 OpenGL video mode: %s\n",
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
80 SDL_GetError());
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
81 SDL_Quit();
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
82 exit(2);
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
83 }
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
84 }
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
85
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
86 static void initGL ()
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
87 {
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
88 Atlantis_Init ();
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
89 Atlantis_Reshape (gScreen->w, gScreen->h);
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
90 }
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
91
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
92 static void drawGL ()
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
93 {
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
94 Atlantis_Animate ();
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
95 Atlantis_Display ();
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
96 }
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
97
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
98 static void mainLoop ()
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
99 {
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
100 SDL_Event event;
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
101 int done = 0;
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
102 int fps = 24;
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
103 int delay = 1000/fps;
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
104 int thenTicks = -1;
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
105 int nowTicks;
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
106
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
107 while ( !done ) {
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
108
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
109 /* Check for events */
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
110 while ( SDL_PollEvent (&event) ) {
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
111 switch (event.type) {
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
112
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
113 case SDL_MOUSEMOTION:
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
114 break;
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
115 case SDL_MOUSEBUTTONDOWN:
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
116 break;
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
117 case SDL_KEYDOWN:
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
118 /* Any keypress quits the app... */
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
119 case SDL_QUIT:
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
120 done = 1;
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
121 break;
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
122 default:
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
123 break;
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
124 }
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
125 }
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
126
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
127 // Draw at 24 hz
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
128 // This approach is not normally recommended - it is better to
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
129 // use time-based animation and run as fast as possible
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
130 drawGL ();
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
131 SDL_GL_SwapBuffers ();
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
132
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
133 // Time how long each draw-swap-delay cycle takes
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
134 // and adjust delay to get closer to target framerate
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
135 if (thenTicks > 0) {
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
136 nowTicks = SDL_GetTicks ();
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
137 delay += (1000/fps - (nowTicks-thenTicks));
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
138 thenTicks = nowTicks;
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
139 if (delay < 0)
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
140 delay = 1000/fps;
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
141 }
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
142 else {
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
143 thenTicks = SDL_GetTicks ();
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
144 }
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
145
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
146 SDL_Delay (delay);
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
147 }
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
148 }
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
149
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
150 int main(int argc, char *argv[])
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
151 {
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
152 // Init SDL video subsystem
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
153 if ( SDL_Init (SDL_INIT_VIDEO) < 0 ) {
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
154
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
155 fprintf(stderr, "Couldn't initialize SDL: %s\n",
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
156 SDL_GetError());
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
157 exit(1);
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
158 }
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
159
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
160 // Set GL context attributes
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
161 initAttributes ();
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
162
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
163 // Create GL context
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
164 createSurface (0);
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
165
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
166 // Get GL context attributes
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
167 printAttributes ();
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
168
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
169 // Init GL state
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
170 initGL ();
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
171
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
172 // Draw, get events...
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
173 mainLoop ();
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
174
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
175 // Cleanup
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
176 SDL_Quit();
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
177
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
178 return 0;
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
179 }