1 // ============================================================================
2 // Artsoft Retro-Game Library
3 // ----------------------------------------------------------------------------
4 // (c) 1995-2014 by Artsoft Entertainment
7 // http://www.artsoft.org/
8 // ----------------------------------------------------------------------------
10 // ============================================================================
19 #include <sys/types.h>
23 #if !defined(PLATFORM_WIN32)
24 typedef unsigned char byte;
44 #define MIN(a,b) ((a) < (b) ? (a) : (b))
48 #define MAX(a,b) ((a) > (b) ? (a) : (b))
52 #define ABS(a) ((a) < 0 ? -(a) : (a))
56 #define SIGN(a) ((a) < 0 ? -1 : ((a) > 0 ? 1 : 0))
60 #define ODD(a) (((a) & 1) == 1)
64 #define EVEN(a) (((a) & 1) == 0)
67 #define SIZEOF_ARRAY(array, type) (sizeof(array) / sizeof(type))
68 #define SIZEOF_ARRAY_INT(array) SIZEOF_ARRAY(array, int)
75 struct ListNode *prev;
76 struct ListNode *next;
78 typedef struct ListNode ListNode;