1 /*************************************************************************** 2 sidtypes.h - type definition file 3 ------------------- 4 begin : Mon Jul 3 2000 5 copyright : (C) 2000 by Simon White 6 email : s_a_white@email.com 7 ***************************************************************************/ 8 9 /*************************************************************************** 10 * * 11 * This program is free software; you can redistribute it and/or modify * 12 * it under the terms of the GNU General Public License as published by * 13 * the Free Software Foundation; either version 2 of the License, or * 14 * (at your option) any later version. * 15 * * 16 ***************************************************************************/ 17 18 #ifndef _sidtypes_h_ 19 #define _sidtypes_h_ 20 21 #include "sidint.h" 22 #include "sidconfig.h" 23 24 #if SID_SIZEOF_CHAR == 1 25 # if (SID_SIZEOF_SHORT_INT == 2) || (SID_SIZEOF_INT == 2) 26 # if (SID_SIZEOF_INT == 4) || (SID_SIZEOF_LONG_INT == 4) 27 //# define SID_OPTIMISE_MEMORY_ACCESS 28 # endif 29 # endif 30 #endif 31 32 #if SID_SIZEOF_CHAR != 1 33 # error Code cannot work correctly on this platform as no real 8 bit data type supported! 34 #endif 35 36 #ifndef SID_HAVE_BOOL 37 # ifdef SID_HAVE_STDBOOL_H 38 # include <stdbool.h> 39 # else 40 typedef int bool; 41 # define true 1 42 # define false 0 43 # endif /* SID_HAVE_STDBOOL_H */ 44 #endif /* HAVE_BOOL */ 45 46 /* Custom types */ 47 typedef int sid_fc_t[2]; 48 typedef struct 49 { 50 sid_fc_t cutoff[0x800]; 51 uint_least16_t points; 52 } sid_filter_t; 53 #define sid_filter_t sid_filter_t 54 55 typedef unsigned int uint; 56 typedef float float32_t; 57 typedef double float64_t; 58 59 #define SID_FOREVER for(;;) 60 #define SID_SWAP(x,y) ((x)^=(y)^=(x)^=(y)) 61 62 #endif /* _sidtypes_h_ */ 63