2 THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
3 SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO
4 END-USERS, AND SUBJECT TO ALL OF THE TERMS AND CONDITIONS HEREIN, GRANTS A
5 ROYALTY-FREE, PERPETUAL LICENSE TO SUCH END-USERS FOR USE BY SUCH END-USERS
6 IN USING, DISPLAYING, AND CREATING DERIVATIVE WORKS THEREOF, SO LONG AS
7 SUCH USE, DISPLAY OR CREATION IS FOR NON-COMMERCIAL, ROYALTY OR REVENUE
8 FREE PURPOSES. IN NO EVENT SHALL THE END-USER USE THE COMPUTER CODE
9 CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES. THE END-USER UNDERSTANDS
10 AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE.
11 COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
16 * Common types for use in Miner
23 //define a signed byte
24 typedef signed char sbyte;
26 //define unsigned types;
27 typedef unsigned char ubyte;
28 #if defined(_WIN32) || defined(macintosh)
29 typedef unsigned short ushort;
30 typedef unsigned int uint;
33 #if defined(_WIN32) || defined(__sun__) // platforms missing (u)int??_t
34 # include <SDL_types.h>
35 #elif defined(macintosh) // misses (u)int??_t and does not like SDL_types.h
36 # include <MacTypes.h>
37 typedef SInt16 int16_t;
38 typedef SInt32 int32_t;
39 typedef SInt64 int64_t;
40 typedef UInt16 uint16_t;
41 typedef UInt32 uint32_t;
42 typedef UInt64 uint64_t;
44 #if defined(_WIN32) // platforms missing int??_t
45 typedef Sint16 int16_t;
46 typedef Sint32 int32_t;
47 typedef Sint64 int64_t;
48 #endif // defined(_WIN32)
49 #if defined(_WIN32) || defined(__sun__) // platforms missing uint??_t
50 typedef Uint16 uint16_t;
51 typedef Uint32 uint32_t;
52 typedef Uint64 uint64_t;
53 #endif // defined(_WIN32) || defined(__sun__)
56 # include <stdlib.h> // this is where min and max are defined
59 #define min(a,b) (((a)>(b))?(b):(a))
62 #define max(a,b) (((a)<(b))?(b):(a))
67 # define PATH_MAX _MAX_PATH
69 # define FNAME_MAX 256
70 #elif defined(__unix__) || (defined(__APPLE__) && defined(__MACH__))
71 # include <sys/types.h>
73 # define PATH_MAX 1024
75 # define FNAME_MAX 256
76 #elif defined __DJGPP__
77 # include <sys/types.h>
78 # define FNAME_MAX 9 // excluding extension
79 #elif defined(macintosh)
93 // the following stuff has nothing to do with types but needed everywhere,
94 // and since this file is included everywhere, it's here.
96 # define __pack__ __attribute__((packed))
97 #elif defined(_MSC_VER)
98 # pragma pack(push, packing)
101 #elif defined(macintosh)
102 # pragma options align=packed
105 # error d2x will not work without packed structures
109 # define inline __inline
112 #ifndef PACKAGE_STRING
113 # define PACKAGE_STRING "d2x"