2012-01-08 11:39:03 -06:00
|
|
|
//#ifndef CONFIG_H_
|
|
|
|
//#define CONFIG_H_
|
|
|
|
|
|
|
|
|
2012-07-29 11:14:14 -05:00
|
|
|
#ifdef WIN
|
2012-01-08 11:39:03 -06:00
|
|
|
#define PATH_SEP "\\"
|
2012-11-18 12:02:28 -06:00
|
|
|
#define PATH_SEP_CHAR '\\'
|
2012-01-08 11:39:03 -06:00
|
|
|
#else
|
|
|
|
#define PATH_SEP "/"
|
2012-11-18 12:02:28 -06:00
|
|
|
#define PATH_SEP_CHAR '/'
|
2012-01-08 11:39:03 -06:00
|
|
|
#endif
|
|
|
|
|
2013-01-19 16:00:56 -06:00
|
|
|
//VersionInfoStart
|
|
|
|
#ifndef SAVE_VERSION
|
2013-09-14 10:15:52 -05:00
|
|
|
#define SAVE_VERSION 89
|
2013-01-19 16:00:56 -06:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef MINOR_VERSION
|
2013-12-08 13:10:06 -06:00
|
|
|
#define MINOR_VERSION 1
|
2013-01-19 16:00:56 -06:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef BUILD_NUM
|
2013-12-08 13:10:06 -06:00
|
|
|
#define BUILD_NUM 278
|
2013-01-19 16:00:56 -06:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef SNAPSHOT_ID
|
|
|
|
#define SNAPSHOT_ID 0
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef STABLE
|
|
|
|
#ifndef BETA
|
|
|
|
#define BETA
|
|
|
|
#define SNAPSHOT
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
//VersionInfoEnd
|
|
|
|
|
|
|
|
//#define IGNORE_UPDATES //uncomment this for mods, to not get any update notifications
|
|
|
|
|
2012-12-14 19:04:17 -06:00
|
|
|
#if defined(DEBUG) || defined(RENDERER) || defined(X86_SSE2)
|
|
|
|
#define HIGH_QUALITY_RESAMPLE //High quality image resampling, slower but much higher quality than my terribad linear interpolation
|
|
|
|
#endif
|
|
|
|
|
2013-01-19 16:00:56 -06:00
|
|
|
#if defined(SNAPSHOT)
|
|
|
|
#define IDENT_RELTYPE "S"
|
|
|
|
#elif defined(BETA)
|
|
|
|
#define IDENT_RELTYPE "B"
|
|
|
|
#else
|
|
|
|
#define IDENT_RELTYPE "R"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(WIN)
|
|
|
|
#if defined(_64BIT)
|
|
|
|
#define IDENT_PLATFORM "WIN64"
|
|
|
|
#else
|
|
|
|
#define IDENT_PLATFORM "WIN32"
|
|
|
|
#endif
|
|
|
|
#elif defined(LIN)
|
|
|
|
#if defined(_64BIT)
|
|
|
|
#define IDENT_PLATFORM "LIN64"
|
|
|
|
#else
|
|
|
|
#define IDENT_PLATFORM "LIN32"
|
|
|
|
#endif
|
|
|
|
#elif defined(MACOSX)
|
|
|
|
#define IDENT_PLATFORM "MACOSX"
|
|
|
|
#else
|
|
|
|
#define IDENT_PLATFORM "UNKNOWN"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(X86_SSE3)
|
|
|
|
#define IDENT_BUILD "SSE3"
|
|
|
|
#elif defined(X86_SSE2)
|
|
|
|
#define IDENT_BUILD "SSE2"
|
|
|
|
#elif defined(X86_SSE)
|
|
|
|
#define IDENT_BUILD "SSE"
|
|
|
|
#else
|
|
|
|
#define IDENT_BUILD "NO"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define IDENT_VERSION "G" //Change this if you're not Simon! It should be a single letter
|
|
|
|
|
2012-01-08 11:39:03 -06:00
|
|
|
#define MTOS_EXPAND(str) #str
|
|
|
|
#define MTOS(str) MTOS_EXPAND(str)
|
|
|
|
|
|
|
|
#define SERVER "powdertoy.co.uk"
|
|
|
|
#define SCRIPTSERVER "powdertoy.co.uk"
|
2012-01-26 10:18:43 -06:00
|
|
|
#define STATICSERVER "static.powdertoy.co.uk"
|
2012-01-08 11:39:03 -06:00
|
|
|
|
|
|
|
#define LOCAL_SAVE_DIR "Saves"
|
|
|
|
|
2012-04-02 11:01:28 -05:00
|
|
|
#define STAMPS_DIR "stamps"
|
|
|
|
|
2012-11-18 12:02:28 -06:00
|
|
|
#define BRUSH_DIR "Brushes"
|
|
|
|
|
2012-01-19 11:59:00 -06:00
|
|
|
//Number of unique thumbnails to have in cache at one time
|
2012-01-08 11:39:03 -06:00
|
|
|
#define THUMB_CACHE_SIZE 256
|
|
|
|
|
|
|
|
#ifndef M_PI
|
|
|
|
#define M_PI 3.14159265f
|
|
|
|
#endif
|
|
|
|
#ifndef M_GRAV
|
|
|
|
#define M_GRAV 6.67300e-1
|
|
|
|
#endif
|
|
|
|
|
2013-03-06 11:05:59 -06:00
|
|
|
//Number of asynchronous connections used to retrieve thumbnails
|
2012-01-19 11:59:00 -06:00
|
|
|
#define IMGCONNS 5
|
|
|
|
//Not sure
|
2012-01-08 11:39:03 -06:00
|
|
|
#define TIMEOUT 100
|
2012-01-19 11:59:00 -06:00
|
|
|
//HTTP request timeout in seconds
|
2012-01-08 11:39:03 -06:00
|
|
|
#define HTTP_TIMEOUT 10
|
|
|
|
|
|
|
|
#ifdef RENDERER
|
|
|
|
#define MENUSIZE 0
|
|
|
|
#define BARSIZE 0
|
|
|
|
#else
|
|
|
|
#define MENUSIZE 40
|
2012-02-01 12:45:59 -06:00
|
|
|
//#define MENUSIZE 20
|
|
|
|
//#define BARSIZE 50
|
2012-01-08 11:39:03 -06:00
|
|
|
#define BARSIZE 17
|
|
|
|
#endif
|
|
|
|
#define XRES 612
|
|
|
|
#define YRES 384
|
|
|
|
#define NPART XRES*YRES
|
|
|
|
|
|
|
|
#define XCNTR 306
|
|
|
|
#define YCNTR 192
|
|
|
|
|
2012-04-26 07:10:47 -05:00
|
|
|
#define MAX_DISTANCE sqrt(pow((float)XRES, 2)+pow((float)YRES, 2))
|
2012-01-08 11:39:03 -06:00
|
|
|
|
|
|
|
#define GRAV_DIFF
|
|
|
|
|
|
|
|
#define MAXSIGNS 16
|
|
|
|
|
|
|
|
#define ZSIZE_D 16
|
|
|
|
#define ZFACTOR_D 8
|
|
|
|
extern unsigned char ZFACTOR;
|
|
|
|
extern unsigned char ZSIZE;
|
|
|
|
|
2013-03-06 11:05:59 -06:00
|
|
|
#define CELL 4
|
|
|
|
#define ISTP (CELL/2)
|
2012-01-08 11:39:03 -06:00
|
|
|
#define CFDS (4.0f/CELL)
|
|
|
|
|
|
|
|
#define AIR_TSTEPP 0.3f
|
|
|
|
#define AIR_TSTEPV 0.4f
|
|
|
|
#define AIR_VADV 0.3f
|
|
|
|
#define AIR_VLOSS 0.999f
|
|
|
|
#define AIR_PLOSS 0.9999f
|
|
|
|
|
2012-02-01 18:33:10 -06:00
|
|
|
#define NGOL 24
|
2012-01-08 11:39:03 -06:00
|
|
|
|
|
|
|
#define CIRCLE_BRUSH 0
|
|
|
|
#define SQUARE_BRUSH 1
|
|
|
|
#define TRI_BRUSH 2
|
|
|
|
#define BRUSH_NUM 3
|
|
|
|
|
2013-03-06 11:05:59 -06:00
|
|
|
#define SURF_RANGE 10
|
|
|
|
#define NORMAL_MIN_EST 3
|
|
|
|
#define NORMAL_INTERP 20
|
|
|
|
#define NORMAL_FRAC 16
|
2012-01-08 11:39:03 -06:00
|
|
|
|
2013-03-06 11:05:59 -06:00
|
|
|
#define REFRACT 0x80000000
|
2012-01-08 11:39:03 -06:00
|
|
|
|
|
|
|
/* heavy flint glass, for awesome refraction/dispersion
|
|
|
|
this way you can make roof prisms easily */
|
2013-03-06 11:05:59 -06:00
|
|
|
#define GLASS_IOR 1.9
|
|
|
|
#define GLASS_DISP 0.07
|
2012-01-08 11:39:03 -06:00
|
|
|
|
2013-10-30 14:46:34 -05:00
|
|
|
#if defined(WIN) && !defined(strcasecmp)
|
2012-01-08 11:39:03 -06:00
|
|
|
#define strcasecmp stricmp
|
2012-09-03 19:21:55 -05:00
|
|
|
#endif
|
2012-09-03 19:09:53 -05:00
|
|
|
#if defined(_MSC_VER)
|
2013-09-27 16:39:16 -05:00
|
|
|
#if _MSC_VER < 1800
|
2012-09-06 18:49:50 -05:00
|
|
|
#define fmin min
|
|
|
|
#define fminf min
|
|
|
|
#define fmax max
|
|
|
|
#define fmaxf max
|
2013-09-27 16:39:16 -05:00
|
|
|
#else
|
|
|
|
#include <algorithm>
|
|
|
|
#endif
|
2012-01-08 11:39:03 -06:00
|
|
|
#endif
|
|
|
|
|
2012-09-03 19:09:53 -05:00
|
|
|
#if defined(_MSC_VER)
|
2012-01-08 11:39:03 -06:00
|
|
|
#define TPT_INLINE _inline
|
2012-09-25 11:53:48 -05:00
|
|
|
#elif defined(__llvm__)
|
|
|
|
#define TPT_INLINE
|
2012-01-08 11:39:03 -06:00
|
|
|
#else
|
|
|
|
#define TPT_INLINE inline
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define SDEUT
|
|
|
|
//#define REALHEAT
|
|
|
|
|
|
|
|
//#endif /* CONFIG_H_ */
|