2012-01-08 11:39:03 -06:00
|
|
|
/*
|
|
|
|
* Config.h
|
|
|
|
*
|
|
|
|
* Created on: Jan 5, 2012
|
|
|
|
* Author: Simon
|
|
|
|
*/
|
|
|
|
|
|
|
|
//#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 "\\"
|
|
|
|
#else
|
|
|
|
#define PATH_SEP "/"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
//VersionInfoStart
|
2012-07-22 13:33:56 -05:00
|
|
|
#ifndef SAVE_VERSION
|
2012-08-28 12:42:36 -05:00
|
|
|
#define SAVE_VERSION 83
|
2012-07-22 13:33:56 -05:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef MINOR_VERSION
|
2012-08-20 12:43:51 -05:00
|
|
|
#define MINOR_VERSION 0
|
2012-07-22 13:33:56 -05:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef BUILD_NUM
|
2012-04-18 15:39:33 -05:00
|
|
|
#define BUILD_NUM 155
|
2012-07-22 13:33:56 -05:00
|
|
|
#endif
|
2012-07-22 12:51:05 -05:00
|
|
|
|
|
|
|
#ifndef SNAPSHOT_ID
|
|
|
|
#define SNAPSHOT_ID 0
|
|
|
|
#endif
|
2012-07-22 13:33:56 -05:00
|
|
|
|
2012-08-27 10:14:13 -05:00
|
|
|
#ifndef BETA
|
2012-07-22 13:33:56 -05:00
|
|
|
#define BETA
|
|
|
|
#define SNAPSHOT
|
2012-08-27 10:14:13 -05:00
|
|
|
#endif
|
2012-01-08 11:39:03 -06:00
|
|
|
//VersionInfoEnd
|
|
|
|
|
2012-06-22 13:04:38 -05:00
|
|
|
#if defined(SNAPSHOT)
|
|
|
|
#define IDENT_RELTYPE "S"
|
|
|
|
#elif defined(BETA)
|
2012-02-01 15:20:27 -06:00
|
|
|
#define IDENT_RELTYPE "B"
|
|
|
|
#else
|
2012-06-22 13:04:38 -05:00
|
|
|
#define IDENT_RELTYPE "R"
|
2012-02-01 15:20:27 -06:00
|
|
|
#endif
|
|
|
|
|
2012-07-29 11:14:14 -05:00
|
|
|
#if defined(WIN)
|
2012-07-29 12:33:01 -05:00
|
|
|
#if defined(_64BIT)
|
|
|
|
#define IDENT_PLATFORM "WIN64"
|
|
|
|
#else
|
2012-02-01 15:20:27 -06:00
|
|
|
#define IDENT_PLATFORM "WIN32"
|
2012-07-29 12:33:01 -05:00
|
|
|
#endif
|
2012-07-29 10:55:26 -05:00
|
|
|
#elif defined(LIN)
|
|
|
|
#if defined(_64BIT)
|
2012-02-01 15:20:27 -06:00
|
|
|
#define IDENT_PLATFORM "LIN64"
|
|
|
|
#else
|
2012-07-29 10:55:26 -05:00
|
|
|
#define IDENT_PLATFORM "LIN32"
|
|
|
|
#endif
|
2012-07-29 12:33:01 -05:00
|
|
|
#elif defined(MACOSX)
|
|
|
|
#define IDENT_PLATFORM "MACOSX"
|
2012-07-29 10:55:26 -05:00
|
|
|
#else
|
2012-02-01 15:20:27 -06:00
|
|
|
#define IDENT_PLATFORM "UNKNOWN"
|
|
|
|
#endif
|
|
|
|
|
2012-06-22 13:04:38 -05:00
|
|
|
#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
|
|
|
|
|
2012-01-08 11:39:03 -06:00
|
|
|
#define IDENT_VERSION "G" //Change this if you're not Simon! It should be a single letter
|
|
|
|
|
|
|
|
#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-01-08 11:39:03 -06:00
|
|
|
#define APPDATA_SUBDIR "\\HardWIRED"
|
|
|
|
|
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
|
|
|
|
|
2012-01-19 11:59:00 -06:00
|
|
|
//Number of asynchronous connections used to retrieve thumnails
|
|
|
|
#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 TAG_MAX 256
|
|
|
|
|
|
|
|
#define ZSIZE_D 16
|
|
|
|
#define ZFACTOR_D 8
|
|
|
|
extern unsigned char ZFACTOR;
|
|
|
|
extern unsigned char ZSIZE;
|
|
|
|
|
|
|
|
#define CELL 4
|
|
|
|
#define ISTP (CELL/2)
|
|
|
|
#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
|
|
|
|
|
|
|
|
#define GRID_X 5
|
|
|
|
#define GRID_Y 4
|
|
|
|
#define GRID_P 3
|
|
|
|
#define GRID_S 6
|
|
|
|
#define GRID_Z 3
|
|
|
|
|
|
|
|
#define CATALOGUE_X 4
|
|
|
|
#define CATALOGUE_Y 3
|
|
|
|
#define CATALOGUE_S 6
|
|
|
|
#define CATALOGUE_Z 3
|
|
|
|
|
|
|
|
#define STAMP_MAX 240
|
|
|
|
|
|
|
|
#define SAVE_OPS
|
|
|
|
|
2012-02-01 18:33:10 -06:00
|
|
|
#define NGOL 24
|
2012-01-08 11:39:03 -06:00
|
|
|
#define NGOLALT 24 //NGOL should be 24, but use this var until I find out why
|
|
|
|
|
|
|
|
#define CIRCLE_BRUSH 0
|
|
|
|
#define SQUARE_BRUSH 1
|
|
|
|
#define TRI_BRUSH 2
|
|
|
|
#define BRUSH_NUM 3
|
|
|
|
|
|
|
|
#define SURF_RANGE 10
|
|
|
|
#define NORMAL_MIN_EST 3
|
|
|
|
#define NORMAL_INTERP 20
|
|
|
|
#define NORMAL_FRAC 16
|
|
|
|
|
|
|
|
#define REFRACT 0x80000000
|
|
|
|
|
|
|
|
/* heavy flint glass, for awesome refraction/dispersion
|
|
|
|
this way you can make roof prisms easily */
|
|
|
|
#define GLASS_IOR 1.9
|
|
|
|
#define GLASS_DISP 0.07
|
|
|
|
|
2012-07-29 11:14:14 -05:00
|
|
|
#ifdef WIN
|
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)
|
2012-09-06 18:49:50 -05:00
|
|
|
#define fmin min
|
|
|
|
#define fminf min
|
|
|
|
#define fmax max
|
|
|
|
#define fmaxf max
|
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-03 19:09:53 -05:00
|
|
|
#define TPT_NO_INLINE //Remove inlines in visual studio, but only the ones that don't work
|
2012-01-08 11:39:03 -06:00
|
|
|
#else
|
|
|
|
#define TPT_INLINE inline
|
2012-09-03 19:09:53 -05:00
|
|
|
#define TPT_NO_INLINE inline
|
2012-01-08 11:39:03 -06:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#define SDEUT
|
|
|
|
//#define REALHEAT
|
|
|
|
|
|
|
|
#define DEBUG_PARTS 0x0001
|
|
|
|
#define DEBUG_PARTCOUNT 0x0002
|
|
|
|
#define DEBUG_DRAWTOOL 0x0004
|
|
|
|
#define DEBUG_PERFORMANCE_CALC 0x0008
|
|
|
|
#define DEBUG_PERFORMANCE_FRAME 0x0010
|
|
|
|
|
|
|
|
//#endif /* CONFIG_H_ */
|