Rev 2 | Go to most recent revision | Details | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 1 | pmbaty | 1 | /* |
| 2 | * src/system.h |
||
| 3 | * |
||
| 4 | * Copyright (C) 1998-2002 BigOrno (bigorno@bigorno.net). All rights reserved. |
||
| 5 | * |
||
| 6 | * The use and distribution terms for this software are contained in the file |
||
| 7 | * named README, which can be found in the root of this distribution. By |
||
| 8 | * using this software in any fashion, you are agreeing to be bound by the |
||
| 9 | * terms of this license. |
||
| 10 | * |
||
| 11 | * You must not remove this notice, or any other, from this software. |
||
| 12 | */ |
||
| 13 | |||
| 14 | #ifndef _SYSTEM_H |
||
| 15 | #define _SYSTEM_H |
||
| 16 | |||
| 17 | /* there are true at least on x86 platforms */ |
||
| 18 | typedef unsigned char U8; // 8 bits unsigned |
||
| 19 | typedef unsigned short U16; // 16 bits unsigned |
||
| 20 | typedef unsigned long U32; // 32 bits unsigned |
||
| 21 | typedef signed char S8; // 8 bits signed |
||
| 22 | typedef signed short S16; // 16 bits signed |
||
| 23 | typedef signed long S32; // 32 bits signed |
||
| 24 | |||
| 25 | /* this must be after typedefs because it relies on types defined above */ |
||
| 26 | #include "rects.h" |
||
| 27 | #include "img.h" |
||
| 28 | |||
| 29 | /* |
||
| 30 | * main section |
||
| 31 | */ |
||
| 32 | extern void sys_init (int, char **); |
||
| 33 | extern void sys_shutdown (void); |
||
| 34 | extern void sys_panic (char *, ...); |
||
| 35 | extern void sys_printf (char *, ...); |
||
| 36 | extern U32 sys_gettime (void); |
||
| 37 | extern void sys_sleep (int); |
||
| 38 | |||
| 39 | /* |
||
| 40 | * video section |
||
| 41 | */ |
||
| 42 | extern void sysvid_init (void); |
||
| 43 | extern void sysvid_shutdown (void); |
||
| 44 | extern void sysvid_clear (void); |
||
| 45 | extern void sysvid_paint (rect_t *); |
||
| 46 | |||
| 47 | /* |
||
| 48 | * events section |
||
| 49 | */ |
||
| 50 | extern void sysevt_poll (void); |
||
| 51 | extern void sysevt_wait (void); |
||
| 52 | |||
| 53 | /* |
||
| 54 | * sound section |
||
| 55 | */ |
||
| 56 | typedef struct |
||
| 57 | { |
||
| 58 | U8 *buf; |
||
| 59 | U32 len; |
||
| 60 | U8 dispose; |
||
| 61 | } sound_t; |
||
| 62 | |||
| 63 | extern void syssnd_init (void); |
||
| 64 | extern void syssnd_shutdown (void); |
||
| 65 | extern void syssnd_vol (S8); |
||
| 66 | extern void syssnd_toggleMute (void); |
||
| 67 | extern S8 syssnd_play (sound_t *, S8); |
||
| 68 | extern void syssnd_pause (U8, U8); |
||
| 69 | extern void syssnd_stopchan (S8); |
||
| 70 | extern void syssnd_stopsound (sound_t *); |
||
| 71 | extern void syssnd_stopall (void); |
||
| 72 | extern int syssnd_isplaying (sound_t *); |
||
| 73 | extern sound_t *syssnd_load (char *name); |
||
| 74 | extern void syssnd_free (sound_t *); |
||
| 75 | |||
| 76 | /* |
||
| 77 | * args section |
||
| 78 | */ |
||
| 79 | extern int sysarg_args_period; |
||
| 80 | extern int sysarg_args_map; |
||
| 81 | extern int sysarg_args_submap; |
||
| 82 | extern int sysarg_args_nosound; |
||
| 83 | extern int sysarg_args_vol; |
||
| 84 | |||
| 85 | extern void sysarg_init (int, char **); |
||
| 86 | |||
| 87 | /* |
||
| 88 | * joystick section |
||
| 89 | */ |
||
| 90 | extern void sysjoy_init (void); |
||
| 91 | extern void sysjoy_shutdown (void); |
||
| 92 | |||
| 93 | #endif |