2010-08-25 06:22:41 -05:00
|
|
|
#ifndef DEFINE_H
|
|
|
|
#define DEFINE_H
|
|
|
|
|
2010-11-10 18:42:42 -06:00
|
|
|
#ifdef WIN32
|
2010-08-28 05:40:49 -05:00
|
|
|
#define PATH_SEP "\\"
|
|
|
|
#else
|
|
|
|
#define PATH_SEP "/"
|
|
|
|
#endif
|
|
|
|
|
2010-10-03 23:27:40 -05:00
|
|
|
#define SAVE_VERSION 43
|
2010-11-10 18:42:42 -06:00
|
|
|
#define MINOR_VERSION 1
|
2010-09-02 18:09:40 -05:00
|
|
|
#define IDENT_VERSION "G" //Change this if you're not Simon! It should be a single letter.
|
|
|
|
#define BETA
|
2010-08-29 07:10:58 -05:00
|
|
|
|
2010-08-25 06:22:41 -05:00
|
|
|
#define SERVER "powdertoy.co.uk"
|
|
|
|
|
|
|
|
#undef PLOSS
|
|
|
|
|
2010-08-29 07:10:58 -05:00
|
|
|
#define THUMB_CACHE_SIZE 256
|
|
|
|
|
|
|
|
#define IMGCONNS 3
|
|
|
|
#define TIMEOUT 100
|
|
|
|
#define HTTP_TIMEOUT 10
|
|
|
|
|
2010-08-25 06:22:41 -05:00
|
|
|
#define MENUSIZE 40
|
2010-10-28 18:18:06 -05:00
|
|
|
#define BARSIZE 17
|
2010-08-25 06:22:41 -05:00
|
|
|
#define XRES 612
|
|
|
|
#define YRES 384
|
|
|
|
#define NPART XRES*YRES
|
|
|
|
|
2010-08-27 07:01:20 -05:00
|
|
|
#define MAXSIGNS 16
|
2010-08-29 07:10:58 -05:00
|
|
|
#define TAG_MAX 256
|
2010-08-27 07:01:20 -05:00
|
|
|
|
2010-08-25 06:22:41 -05:00
|
|
|
#define ZSIZE_D 16
|
|
|
|
#define ZFACTOR_D 8
|
2010-09-01 05:40:29 -05:00
|
|
|
extern unsigned char ZFACTOR;
|
|
|
|
extern unsigned char ZSIZE;
|
2010-08-25 06:22:41 -05:00
|
|
|
|
|
|
|
#define CELL 4
|
|
|
|
#define ISTP (CELL/2)
|
|
|
|
#define CFDS (4.0f/CELL)
|
|
|
|
|
|
|
|
#define TSTEPP 0.3f
|
|
|
|
#define TSTEPV 0.4f
|
|
|
|
#define VADV 0.3f
|
|
|
|
#define VLOSS 0.999f
|
|
|
|
#define PLOSS 0.9999f
|
|
|
|
|
2010-08-28 05:40:49 -05:00
|
|
|
#define GRID_X 5
|
|
|
|
#define GRID_Y 4
|
|
|
|
#define GRID_P 3
|
|
|
|
#define GRID_S 6
|
|
|
|
#define GRID_Z 3
|
|
|
|
|
|
|
|
#define STAMP_X 4
|
|
|
|
#define STAMP_Y 4
|
|
|
|
#define STAMP_MAX 120
|
|
|
|
|
2010-11-09 00:04:59 -06:00
|
|
|
#define NGOL 13
|
|
|
|
|
2010-11-18 22:27:24 -06:00
|
|
|
#define CIRCLE_BRUSH 0
|
|
|
|
#define SQUARE_BRUSH 1
|
|
|
|
#define BRUSH_NUM 2
|
|
|
|
|
2010-08-28 05:40:49 -05:00
|
|
|
#ifdef PIX16
|
|
|
|
typedef unsigned short pixel;
|
|
|
|
#else
|
|
|
|
typedef unsigned int pixel;
|
|
|
|
#endif
|
|
|
|
|
2010-10-28 18:18:06 -05:00
|
|
|
#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
|
|
|
|
|
2010-08-25 06:22:41 -05:00
|
|
|
typedef unsigned char uint8;
|
|
|
|
|
2010-09-01 05:40:29 -05:00
|
|
|
extern int amd;
|
|
|
|
|
2010-09-06 21:41:51 -05:00
|
|
|
extern int FPSB;
|
|
|
|
|
2010-08-26 08:46:56 -05:00
|
|
|
extern int legacy_enable;
|
|
|
|
|
|
|
|
extern int sys_pause;
|
|
|
|
extern int framerender;
|
|
|
|
|
|
|
|
extern int mousex, mousey;
|
|
|
|
extern int death;
|
|
|
|
|
2010-08-27 07:01:20 -05:00
|
|
|
struct sign
|
|
|
|
{
|
2010-11-01 22:56:06 -05:00
|
|
|
int x,y,ju;
|
2010-08-27 07:01:20 -05:00
|
|
|
char text[256];
|
|
|
|
};
|
|
|
|
typedef struct sign sign;
|
|
|
|
|
2010-08-28 05:40:49 -05:00
|
|
|
struct stamp
|
|
|
|
{
|
|
|
|
char name[11];
|
|
|
|
pixel *thumb;
|
|
|
|
int thumb_w, thumb_h, dodelete;
|
|
|
|
};
|
|
|
|
typedef struct stamp stamp;
|
|
|
|
|
2010-11-01 22:56:06 -05:00
|
|
|
int MSIGN;
|
2010-11-04 21:12:51 -05:00
|
|
|
int CGOL;
|
2010-11-07 16:55:25 -06:00
|
|
|
int ISGOL;
|
2010-11-15 10:57:37 -06:00
|
|
|
int ISLOVE;
|
2010-11-05 00:22:43 -05:00
|
|
|
int GSPEED;
|
2010-11-15 10:57:37 -06:00
|
|
|
int love[XRES/9][YRES/9];
|
2010-11-04 21:12:51 -05:00
|
|
|
int gol[XRES][YRES];
|
2010-11-06 16:13:43 -05:00
|
|
|
int gol2[XRES][YRES][NGOL];
|
2010-11-17 23:01:46 -06:00
|
|
|
int SEC;
|
|
|
|
int SEC2;
|
2010-11-18 15:23:24 -06:00
|
|
|
int REPLACE_MODE;
|
2010-11-18 22:27:24 -06:00
|
|
|
int CURRENT_BRUSH;
|
2010-08-27 07:01:20 -05:00
|
|
|
extern sign signs[MAXSIGNS];
|
2010-08-28 05:40:49 -05:00
|
|
|
extern stamp stamps[STAMP_MAX];
|
|
|
|
extern int stamp_count;
|
|
|
|
extern int itc;
|
|
|
|
extern char itc_msg[64];
|
2010-08-27 07:01:20 -05:00
|
|
|
|
2010-08-29 07:10:58 -05:00
|
|
|
extern int do_open;
|
|
|
|
extern int sys_pause;
|
|
|
|
extern int legacy_enable; //Used to disable new features such as heat, will be set by commandline or save.
|
|
|
|
extern int death, framerender;
|
|
|
|
|
|
|
|
extern unsigned char last_major, last_minor, update_flag;
|
|
|
|
|
|
|
|
extern char http_proxy_string[256];
|
|
|
|
|
2010-09-01 05:40:29 -05:00
|
|
|
//Functions in main.c
|
|
|
|
void thumb_cache_inval(char *id);
|
|
|
|
void thumb_cache_add(char *id, void *thumb, int size);
|
|
|
|
int thumb_cache_find(char *id, void **thumb, int *size);
|
|
|
|
void *build_thumb(int *size, int bzip2);
|
|
|
|
void *build_save(int *size, int x0, int y0, int w, int h);
|
|
|
|
int parse_save(void *save, int size, int replace, int x0, int y0);
|
|
|
|
void del_stamp(int d);
|
|
|
|
void sdl_seticon(void);
|
2010-10-28 18:18:06 -05:00
|
|
|
#endif
|