14 * You should have received a copy of the GNU General Public License |
14 * You should have received a copy of the GNU General Public License |
15 * along with this program; if not, write to the Free Software |
15 * along with this program; if not, write to the Free Software |
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA |
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA |
17 */ |
17 */ |
18 |
18 |
19 #include <stdio.h> |
19 #include "globals.h" |
20 #include <stdlib.h> |
|
21 #include "al.h" |
|
22 |
|
23 #ifndef _WIN32 |
|
24 #include <pthread.h> |
|
25 #include <stdint.h> |
|
26 #else |
|
27 #define WIN32_LEAN_AND_MEAN |
|
28 #include <process.h> |
|
29 #include "winstdint.h" |
|
30 #endif |
|
31 |
|
32 #ifndef _SLEEP_H |
|
33 #define _SLEEP_H |
|
34 /** 1.0 02/03/10 - Defines cross-platform sleep, usleep, etc. * By Wu Yongwei **/ |
|
35 #ifdef _WIN32 |
|
36 # if defined(_NEED_SLEEP_ONLY) && (defined(_MSC_VER) || defined(__MINGW32__)) |
|
37 # include <stdlib.h> |
|
38 # define sleep(t) _sleep((t) * 1000) |
|
39 # else |
|
40 # include <windows.h> |
|
41 # define sleep(t) Sleep((t) * 1000) |
|
42 # endif |
|
43 # ifndef _NEED_SLEEP_ONLY |
|
44 # define msleep(t) Sleep(t) |
|
45 # define usleep(t) Sleep((t) / 1000) |
|
46 # endif |
|
47 #else |
|
48 # include <unistd.h> |
|
49 # ifndef _NEED_SLEEP_ONLY |
|
50 # define msleep(t) usleep((t) * 1000) |
|
51 # endif |
|
52 #endif |
|
53 #endif /* _SLEEP_H */ |
|
54 |
20 |
55 #pragma once |
21 #pragma once |
56 |
|
57 typedef struct _fade_t { |
|
58 int index; |
|
59 unsigned int quantity; |
|
60 } fade_t; |
|
61 |
22 |
62 void *Malloc (size_t nbytes); |
23 void *Malloc (size_t nbytes); |
63 FILE *Fopen (const char *fname, char *mode); |
24 FILE *Fopen (const char *fname, char *mode); |
64 ALint AlGetError (const char *str); |
25 ALint AlGetError (const char *str); |
65 #ifndef _WIN32 |
26 #ifndef _WIN32 |