]> icculus.org git repositories - btb/d2x.git/blob - arch/sdl/init.c
use the orientation parameter of g3_draw_bitmap
[btb/d2x.git] / arch / sdl / init.c
1 /*
2  *
3  * SDL architecture support
4  *
5  *
6  */
7
8 #ifdef HAVE_CONFIG_H
9 #include <conf.h>
10 #endif
11
12 #include <stdlib.h>
13 #include <stdio.h>
14
15 #include <SDL.h>
16
17 #include "text.h"
18 #include "event.h"
19 #include "dxxerror.h"
20 #include "args.h"
21 #include "digi.h"
22
23 extern void d_mouse_init(void);
24
25 void sdl_close()
26 {
27         SDL_Quit();
28 }
29
30 void arch_sdl_init()
31 {
32 #if defined(SDL_VIDEO) || defined(SDL_GL_VIDEO)
33         if (SDL_Init(SDL_INIT_VIDEO) < 0)
34         {
35                 Error("SDL library video initialisation failed: %s.",SDL_GetError());
36         }
37 #endif
38 #ifdef SDL_INPUT
39         if (!FindArg("-nomouse"))
40                 d_mouse_init();
41 #endif
42         if (!FindArg("-nosound"))
43                 digi_init();
44         atexit(sdl_close);
45 }