1 /*************************************************************************** 2 * S3m/Mod player by Daniel Marks (dmarks@ais.net) 3 * GUS support by David Jeske (jeske@uiuc.edu) 4 * 5 * (C) 1994,1995 By Daniel Marks and David Jeske 6 * 7 * While we retain the copyright to this code, this source code is FREE. 8 * You may use it in any way you wish, in any product you wish. You may 9 * NOT steal the copyright for this code from us. 10 * 11 * We respectfully ask that you email one of us, if possible, if you 12 * produce something significant with this code, or if you have any bug 13 * fixes to contribute. We also request that you give credit where 14 * credit is due if you include part of this code in a program of your own. 15 * 16 * Email: s3mod@uiuc.edu 17 * jeske@uiuc.edu 18 * 19 * See the associated README file for Thanks 20 *************************************************************************** 21 * 22 * config.h - compile time configuration options and system specific defines 23 * 24 */ 25 26 #ifndef _CONFIG_H 27 #define _CONFIG_H 1 28 29 /***************************************************************************/ 30 /* The following parameters are compile time defaults */ 31 /***************************************************************************/ 32 33 /* For large amounts of printed debuging information */ 34 /* #define DEBUG /* */ 35 36 /* Default DSP mixing speed */ 37 #define DSP_SPEED 22000 38 39 40 /***************************************************************************/ 41 /* The following are system specific settings */ 42 /***************************************************************************/ 43 44 #if defined(SUN) 45 #define SIXTEEN_BIT_PLAY_ONLY 46 #define BIT_32 47 #define __BYTE_ORDER 4321 48 #define DSP 49 50 #elif defined(DEC) 51 #define SIXTEEN_BIT_PLAY_ONLY 52 #define DSP 53 54 #elif defined(__sgi) 55 #define BIT_32 56 #define __BYTE_ORDER 4321 57 #define DSP 58 59 #elif defined(LINUX) 60 #define BIT_32 61 #undef NEAR_FAR_PTR 62 #define DSP 63 #ifndef GUS 64 #define GUS 65 #endif /* GUS */ 66 67 #elif defined(__FreeBSD__) 68 #define BIT_32 69 #undef NEAR_FAR_PTR 70 #define DSP 71 72 #elif defined(MSDOS) 73 #define NEAR_FAR_PTR 74 #define DSP 75 76 #endif /* OS/MACH TYPE */ 77 78 /***************************************************************************/ 79 /* This should be left alone */ 80 /***************************************************************************/ 81 82 #define VERSION "v1.09" 83 #define ROT_BUF_SIZE 10240 84 85 /***************************************************************************/ 86 /* 16/32 Bit and Byte Order hacks 87 /***************************************************************************/ 88 89 #ifdef BIT_32 90 typedef short int int16; 91 typedef unsigned short int uint16; 92 typedef int int32; 93 typedef unsigned int uint32; 94 typedef char int8; 95 typedef unsigned char uint8; 96 #else 97 typedef int int16; 98 typedef unsigned int uint16; 99 typedef long int int32; 100 typedef unsigned long int uint32; 101 typedef char int8; 102 typedef unsigned char uint8; 103 #endif 104 105 #define endian_switch(x) (((((uint16)(x)) & 0xFF00) >> 8) | \ 106 ((((uint16)(x)) & 0xFF) << 8)) 107 108 #define long_endian_switch(x) ( ((((uint32)(x)) & 0xFF00) << 8) | \ 109 ((((uint32)(x)) & 0xFF) << 24) | \ 110 ((((uint32)(x)) & 0xFF0000) >> 8) | \ 111 ((((uint32)(x)) & 0xFF000000) >> 24)) 112 113 #if __BYTE_ORDER == 4321 114 #define big_endian(x) (x) 115 #define long_big_endian(x) (x) 116 #define little_endian(x) (endian_switch(x)) 117 #define long_little_endian(x) (long_endian_switch(x)) 118 #else 119 #define big_endian(x) (endian_switch(x)) 120 #define long_big_endian(x) (long_endian_switch(x)) 121 #define little_endian(x) (x) 122 #define long_little_endian(x) (x) 123 #endif 124 125 126 #endif /* _CONFIG_H */ 127