summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip <philip@philip-linuxlaptop.(none)>2010-10-04 04:27:40 (GMT)
committer Philip <philip@philip-linuxlaptop.(none)>2010-10-04 04:29:37 (GMT)
commite4f9f77de906d65264c7d09635761dd05940e1aa (patch)
tree6506a2c66d8c923136caba7274145c20106b73f0
parentebb784de700240d0f8c2f2c5ffe3d2ab783c6557 (diff)
downloadpowder-e4f9f77de906d65264c7d09635761dd05940e1aa.zip
powder-e4f9f77de906d65264c7d09635761dd05940e1aa.tar.gz
Updating
-rwxr-xr-xMakefile12
-rwxr-xr-xhmap.h24
-rw-r--r--includes/air.h (renamed from air.h)0
-rw-r--r--includes/defines.h (renamed from defines.h)7
-rw-r--r--includes/font.h (renamed from font.h)4
-rw-r--r--includes/graphics.h (renamed from graphics.h)0
-rwxr-xr-xincludes/hmap.h34
-rwxr-xr-xincludes/http.h (renamed from http.h)0
-rwxr-xr-xincludes/icon.h (renamed from icon.h)0
-rw-r--r--includes/interface.h (renamed from interface.h)2
-rw-r--r--includes/md5.h (renamed from md5.h)0
-rw-r--r--includes/misc.h (renamed from misc.h)4
-rw-r--r--includes/powder.h (renamed from powder.h)271
-rwxr-xr-xincludes/update.h (renamed from update.h)0
-rwxr-xr-xincludes/version.h (renamed from version.h)0
-rwxr-xr-xscript.sh11
-rw-r--r--src/Resources/Font-Data (renamed from Resources/Font-Data)bin4442 -> 4442 bytes
-rw-r--r--src/Resources/Font-Pointers (renamed from Resources/Font-Pointers)bin512 -> 512 bytes
-rwxr-xr-xsrc/Resources/Icon-16.png (renamed from Resources/Icon-16.png)bin3161 -> 3161 bytes
-rwxr-xr-xsrc/Resources/Icon-32.png (renamed from Resources/Icon-32.png)bin3896 -> 3896 bytes
-rw-r--r--src/Resources/powder-res.rc (renamed from Resources/powder-res.rc)0
-rwxr-xr-xsrc/Resources/powder.icns (renamed from Resources/powder.icns)bin98761 -> 98761 bytes
-rwxr-xr-xsrc/Resources/powder.ico (renamed from Resources/powder.ico)bin90174 -> 90174 bytes
-rw-r--r--src/air.c (renamed from air.c)32
-rw-r--r--src/graphics.c (renamed from graphics.c)534
-rw-r--r--src/http.c (renamed from http.c)6
-rw-r--r--src/interface.c (renamed from interface.c)355
-rwxr-xr-x[-rw-r--r--]src/main.c (renamed from main.c)335
-rw-r--r--src/md5.c (renamed from md5.c)2
-rw-r--r--src/misc.c (renamed from misc.c)14
-rw-r--r--src/powder.c (renamed from powder.c)1481
-rw-r--r--src/update.c (renamed from update.c)2
32 files changed, 1909 insertions, 1221 deletions
diff --git a/Makefile b/Makefile
index 72e2617..8a25f40 100755
--- a/Makefile
+++ b/Makefile
@@ -1,11 +1,11 @@
-SOURCES := *.c
+SOURCES := src/*.c
-CFLAGS := -Wall -std=c99 -D_POSIX_C_SOURCE=200112L
+CFLAGS := -Wall -std=c99 -D_POSIX_C_SOURCE=200112L -Iincludes/
OFLAGS := -O3 -ffast-math -ftree-vectorize -funsafe-math-optimizations
LFLAGS := -lSDL -lm -lbz2
-MFLAGS_SSE3 := -march=k8 -DX86 -DX86_SSE3 -msse3
-MFLAGS_SSE2 := -march=k8 -DX86 -DX86_SSE2 -msse2
-MFLAGS_SSE := -march=pentium3 -DX86 -DX86_SSE
+MFLAGS_SSE3 := -march=native -DX86 -DX86_SSE3 -msse3
+MFLAGS_SSE2 := -march=native-DX86 -DX86_SSE2 -msse2
+MFLAGS_SSE := -march=native -DX86 -DX86_SSE
FLAGS_DBUG := -Wall -std=c99 -D_POSIX_C_SOURCE=200112L -pg -O2 -march=k8 -DX86 -DX86_SSE3 -msse3 -lSDL -lm -lbz2
COMPILER := gcc
LINUX_TARG := powder-64-sse2 powder-sse powder-sse2
@@ -19,6 +19,7 @@ powder-debug: $(SOURCES)
powder-sse3: $(SOURCES)
$(COMPILER) -m32 -o$@ $(CFLAGS) $(OFLAGS) $(LFLAGS) $(MFLAGS_SSE3) $(SOURCES) -DLIN32
strip $@
+ mv $@ build
powder-sse2: $(SOURCES)
$(COMPILER) -m32 -o$@ $(CFLAGS) $(OFLAGS) $(LFLAGS) $(MFLAGS_SSE2) $(SOURCES) -DLIN32
strip $@
@@ -31,6 +32,7 @@ powder-64-sse3-opengl: $(SOURCES)
powder-64-sse3: $(SOURCES)
$(COMPILER) -m64 -o$@ $(CFLAGS) $(OFLAGS) $(LFLAGS) $(MFLAGS_SSE3) $(SOURCES) -DLIN64
strip $@
+ mv $@ build
powder-64-sse2: $(SOURCES)
$(COMPILER) -m64 -o$@ $(CFLAGS) $(OFLAGS) $(LFLAGS) $(MFLAGS_SSE2) $(SOURCES) -DLIN64
strip $@
diff --git a/hmap.h b/hmap.h
deleted file mode 100755
index 8af6e71..0000000
--- a/hmap.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Powder Toy - Heatmap Data
- *
- * Copyright (c) 2010 Simon Robertshaw
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
- */
-#ifndef HMAP_H
-#define HMAP_H
-static char color_data[] = {0xD9,0xFF,0xFE,0xD4,0xFB,0xFC,0xCF,0xF6,0xF9,0xC9,0xF1,0xF6,0xC2,0xEB,0xF4,0xBB,0xE5,0xF0,0xB3,0xDE,0xED,0xAA,0xD6,0xE9,0xA1,0xCF,0xE5,0x98,0xC7,0xE2,0x8E,0xBF,0xDD,0x85,0xB6,0xD9,0x7B,0xAD,0xD5,0x71,0xA5,0xD0,0x67,0x9C,0xCC,0x5D,0x93,0xC7,0x53,0x8A,0xC3,0x4A,0x82,0xBE,0x41,0x79,0xB9,0x38,0x71,0xB5,0x30,0x69,0xB0,0x28,0x61,0xAC,0x21,0x5A,0xA8,0x1B,0x53,0xA3,0x16,0x4D,0x9F,0x12,0x47,0x9B,0x0F,0x42,0x98,0x0F,0x3D,0x94,0x0F,0x39,0x90,0x0F,0x34,0x8C,0x0F,0x30,0x89,0x0F,0x2C,0x85,0x0F,0x28,0x81,0x0F,0x24,0x7D,0x0F,0x20,0x7A,0x0F,0x1D,0x76,0x0F,0x1A,0x72,0x0F,0x16,0x6F,0x0F,0x13,0x6B,0x0F,0x11,0x67,0x10,0x0E,0x64,0x12,0x0C,0x60,0x15,0x0A,0x5D,0x18,0x08,0x59,0x1B,0x06,0x56,0x1D,0x04,0x53,0x20,0x03,0x4F,0x23,0x02,0x4C,0x26,0x01,0x49,0x29,0x01,0x46,0x2C,0x00,0x43,0x2F,0x00,0x40,0x30,0x00,0x3F,0x31,0x00,0x3F,0x31,0x00,0x3E,0x32,0x00,0x3E,0x32,0x00,0x3D,0x33,0x00,0x3D,0x33,0x00,0x3C,0x34,0x00,0x3C,0x34,0x00,0x3B,0x35,0x01,0x3B,0x36,0x01,0x3B,0x36,0x01,0x3A,0x37,0x01,0x3A,0x37,0x01,0x39,0x38,0x01,0x39,0x39,0x01,0x38,0x39,0x02,0x38,0x3A,0x02,0x37,0x3B,0x02,0x37,0x3B,0x02,0x36,0x3C,0x02,0x36,0x3C,0x03,0x35,0x3D,0x03,0x35,0x3E,0x03,0x34,0x3F,0x03,0x34,0x3F,0x04,0x34,0x40,0x04,0x33,0x41,0x04,0x33,0x41,0x04,0x32,0x42,0x05,0x32,0x43,0x05,0x31,0x43,0x05,0x31,0x44,0x06,0x30,0x45,0x06,0x30,0x46,0x06,0x30,0x46,0x07,0x2F,0x47,0x07,0x2F,0x48,0x08,0x2E,0x49,0x08,0x2E,0x49,0x08,0x2E,0x4A,0x09,0x2D,0x4B,0x09,0x2D,0x4C,0x09,0x2C,0x4C,0x0A,0x2C,0x4D,0x0A,0x2B,0x4E,0x0B,0x2B,0x4F,0x0B,0x2B,0x4F,0x0C,0x2A,0x50,0x0C,0x2A,0x51,0x0D,0x29,0x52,0x0D,0x29,0x53,0x0D,0x29,0x53,0x0E,0x28,0x54,0x0E,0x28,0x55,0x0F,0x27,0x56,0x0F,0x27,0x57,0x10,0x27,0x58,0x10,0x26,0x58,0x11,0x26,0x59,0x11,0x26,0x5A,0x12,0x25,0x5B,0x13,0x25,0x5C,0x13,0x24,0x5D,0x14,0x24,0x5D,0x14,0x24,0x5E,0x15,0x23,0x5F,0x15,0x23,0x60,0x16,0x23,0x61,0x16,0x22,0x62,0x17,0x22,0x62,0x18,0x22,0x63,0x18,0x21,0x64,0x19,0x21,0x65,0x19,0x21,0x66,0x1A,0x20,0x67,0x1B,0x20,0x67,0x1B,0x20,0x68,0x1C,0x1F,0x69,0x1C,0x1F,0x6A,0x1D,0x1F,0x6B,0x1E,0x1E,0x6C,0x1E,0x1E,0x6D,0x1F,0x1E,0x6D,0x1F,0x1D,0x6E,0x20,0x1D,0x6F,0x21,0x1D,0x70,0x21,0x1C,0x71,0x22,0x1C,0x72,0x23,0x1C,0x73,0x23,0x1B,0x73,0x24,0x1B,0x74,0x25,0x1B,0x75,0x25,0x1A,0x76,0x26,0x1A,0x77,0x27,0x1A,0x78,0x27,0x1A,0x78,0x28,0x19,0x79,0x29,0x19,0x7A,0x29,0x19,0x7B,0x2A,0x18,0x7C,0x2B,0x18,0x7D,0x2B,0x18,0x7E,0x2C,0x18,0x7E,0x2D,0x17,0x7F,0x2D,0x17,0x80,0x2E,0x17,0x81,0x2F,0x16,0x82,0x2F,0x16,0x82,0x30,0x16,0x83,0x31,0x16,0x84,0x31,0x15,0x85,0x32,0x15,0x86,0x33,0x15,0x87,0x33,0x15,0x87,0x34,0x14,0x88,0x35,0x14,0x89,0x36,0x14,0x8A,0x36,0x14,0x8A,0x37,0x13,0x8B,0x38,0x13,0x8C,0x38,0x13,0x8D,0x39,0x13,0x8E,0x3A,0x13,0x8E,0x3A,0x12,0x8F,0x3B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x00,0x00,0x55,0x00,0x02,0x55,0x02,0x03,0x55,0x03,0x06,0x55,0x03,0x07,0x55,0x05,0x09,0x55,0x06,0x0C,0x55,0x06,0x0F,0x55,0x07,0x10,0x55,0x09,0x13,0x55,0x0A,0x16,0x55,0x0C,0x1A,0x55,0x0C,0x1D,0x54,0x0E,0x20,0x53,0x10,0x23,0x54,0x11,0x26,0x53,0x13,0x2A,0x52,0x14,0x2E,0x51,0x15,0x31,0x50,0x17,0x35,0x50,0x19,0x38,0x4E,0x1A,0x3D,0x4D,0x1C,0x40,0x4D,0x1D,0x44,0x4C,0x1F,0x47,0x4B,0x21,0x4C,0x4A,0x23,0x4F,0x49,0x24,0x54,0x48,0x25,0x57,0x47,0x28,0x5B,0x46,0x29,0x5F,0x45,0x2B,0x62,0x44,0x2D,0x66,0x44,0x2E,0x6A,0x43,0x30,0x6E,0x42,0x32,0x72,0x41,0x33,0x76,0x40,0x35,0x79,0x3F,0x38,0x7C,0x3F,0x39,0x7F,0x3E,0x3B,0x83,0x3D,0x3D,0x86,0x3C,0x3F,0x8A,0x3B,0x40,0x8C,0x3B,0x43,0x8F,0x3B,0x44,0x92,0x3A,0x46,0x95,0x39,0x48,0x98,0x39,0x4A,0x9B,0x39,0x4C,0x9C,0x39,0x4E,0x9F,0x3A,0x4F,0xA1,0x39,0x51,0xA3,0x39,0x52,0xA4,0x39,0x54,0xA6,0x39,0x56,0xA7,0x39,0x57,0xA8,0x39,0x58,0xA8,0x3A,0x5A,0xA9,0x3A,0x5C,0xA8,0x3A,0x5D,0xA8,0x3B,0x5F,0xA8,0x3C,0x61,0xA8,0x3D,0x62,0xA8,0x3D,0x64,0xA9,0x3E,0x66,0xA8,0x3E,0x67,0xA9,0x3F,0x68,0xA8,0x40,0x6A,0xA8,0x41,0x6C,0xA8,0x42,0x6E,0xA8,0x42,0x70,0xA8,0x43,0x71,0xA8,0x44,0x73,0xA8,0x45,0x74,0xA9,0x46,0x76,0xA8,0x48,0x79,0xA8,0x49,0x7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0xA8,0xC4,0xA5,0xA9,0xC5,0xA6,0xAA,0xC5,0xA8,0xAB,0xC4,0xA9,0xAC,0xC4,0xAA,0xAE,0xC4,0xAC,0xAF,0xC4,0xAD,0xB0,0xC4,0xAE,0xB2,0xC4,0xB0,0xB3,0xC4,0xB1,0xB4,0xC4,0xB3,0xB5,0xC5,0xB4,0xB6,0xC4,0xB6,0xB7,0xC4,0xB7,0xB8,0xC4,0xB7,0xBA,0xC4,0xB9,0xBA,0xC4,0xBA,0xBC,0xC4,0xBB,0xBC,0xC4,0xBC,0xBE,0xC4,0xBD,0xBF,0xC4,0xBE,0xBF,0xC4,0xBF,0xC0,0xC4,0xC0,0xC1,0xC4,0xC1,0xC2,0xC4,0xC2,0xC2,0xC4,0xC3,0xC4,0xC4,0xC3,0xC4,0xC4,0xC4};
-#endif \ No newline at end of file
diff --git a/air.h b/includes/air.h
index d9e04f6..d9e04f6 100644
--- a/air.h
+++ b/includes/air.h
diff --git a/defines.h b/includes/defines.h
index d6642c1..a324e9f 100644
--- a/defines.h
+++ b/includes/defines.h
@@ -7,8 +7,8 @@
#define PATH_SEP "/"
#endif
-#define SAVE_VERSION 42
-#define MINOR_VERSION 1
+#define SAVE_VERSION 43
+#define MINOR_VERSION 0
#define IDENT_VERSION "G" //Change this if you're not Simon! It should be a single letter.
#define BETA
@@ -66,9 +66,6 @@ typedef unsigned char uint8;
extern int amd;
-unsigned int PSR;
-unsigned int SEC;
-
extern int FPSB;
extern int legacy_enable;
diff --git a/font.h b/includes/font.h
index f8f9a58..38448d1 100644
--- a/font.h
+++ b/includes/font.h
@@ -21,6 +21,7 @@
#ifndef FONT_H_CHECK
#define FONT_H_CHECK
#define FONT_H 10
+#ifdef INCLUDE_FONTDATA
static char font_data[] =
{
0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xc7, 0x31, 0x0c, 0x02, 0x70, 0x04, 0x00, 0x00, 0x05, 0xcc, 0x74, 0x23, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x80, 0x19, 0xcc, 0xe0, 0x3f, 0xcc, 0xf0, 0x2f, 0xcc, 0x90, 0x09, 0x00, 0x00, 0x00, 0x06, 0x30, 0xd0, 0x3f, 0x33, 0xe1, 0x07, 0xf4, 0x12, 0x33, 0xff, 0x00, 0x03, 0x00, 0x00, 0x00, 0x07, 0x2d, 0xce, 0xcc, 0xe1, 0x1d, 0xc0, 0x03, 0x74, 0x4b, 0x33, 0xb3, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x7d, 0x30, 0x0c, 0x13, 0xd0, 0x32, 0xb3, 0x33, 0x1c, 0x7d, 0x07, 0x00, 0x00, 0x00, 0x00, 0x03, 0x4c, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x34, 0x1d, 0x07, 0x03, 0x07, 0x1d, 0x34, 0x00, 0x00, 0x00, 0x04, 0x07, 0x1d, 0x34, 0x30, 0x34, 0x1d, 0x07, 0x00, 0x00, 0x00, 0x06, 0x44, 0xd0, 0x1c, 0x64, 0xf0, 0x3f, 0x64, 0xd0, 0x1c, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x02, 0x30, 0xe0, 0x2f, 0x30, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x0d, 0x03, 0x00, 0x05, 0x00, 0x00, 0x00, 0xc0, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x40, 0x70, 0x00, 0x00, 0x00, 0x06, 0x80, 0x02, 0x0c, 0xa0, 0x00, 0x03, 0x28, 0xc0, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0xf8, 0xe0, 0x39, 0x07, 0x33, 0x32, 0x03, 0xb3, 0x38, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x30, 0xf0, 0x60, 0x03, 0x0c, 0x30, 0xc0, 0x40, 0x07, 0x00, 0x00, 0x00, 0x00, 0x06, 0xfc, 0xb1, 0x34, 0x41, 0x03, 0x0a, 0x2c, 0x70, 0x00, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x06, 0xfc, 0x71, 0x34, 0x01, 0x03, 0x1e, 0x00, 0x33, 0x34, 0xfe, 0x01, 0x00, 0x00, 0x00, 0x00, 0x06, 0xc0, 0x03, 0x37, 0x1c, 0x73, 0x34, 0xbf, 0x03, 0x30, 0x40, 0x03, 0x00, 0x00, 0x00, 0x00, 0x06, 0xff, 0x33, 0x00, 0x57, 0xe0, 0x2f, 0x00, 0x13, 0x30, 0xfe, 0x01, 0x00, 0x00, 0x00, 0x00, 0x06, 0xf4, 0xd3, 0x00, 0x07, 0xf0, 0x1f, 0x03, 0x33, 0x34, 0xfd, 0x01, 0x00, 0x00, 0x00, 0x00, 0x06, 0xff, 0x07, 0x34, 0x80, 0x03, 0x0e, 0x38, 0xd0, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0xfc, 0xb1, 0x34, 0x03, 0xd3, 0x1f, 0x03, 0x73, 0x34, 0xfd, 0x01, 0x00, 0x00, 0x00, 0x00, 0x06, 0xfc, 0xb1, 0x34, 0x03, 0xc3, 0x3f, 0x40, 0x23, 0x30, 0xfd, 0x01, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x70, 0x04, 0x40, 0x70, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x1c, 0x04, 0x00, 0x0c, 0x0d, 0x03, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0xc0, 0xc3, 0x0b, 0x1b, 0xc0, 0x0b, 0xc0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x3f, 0x00, 0xf0, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0f, 0x80, 0x0f, 0x90, 0x83, 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0xfd, 0x71, 0x30, 0x81, 0x03, 0x0e, 0x34, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0xf8, 0x0f, 0x1d, 0x30, 0xe7, 0x37, 0x73, 0x1c, 0xe3, 0x2f, 0x07, 0x00, 0xfd, 0x1b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x74, 0xd0, 0x1d, 0x47, 0x33, 0x30, 0xff, 0x33, 0x30, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x06, 0xbf, 0x30, 0x38, 0x43, 0xf3, 0x1f, 0x43, 0x33, 0x34, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x06, 0xf4, 0xd1, 0x34, 0x03, 0x31, 0x00, 0x03, 0x70, 0x34, 0xfd, 0x01, 0x00, 0x00, 0x00, 0x00, 0x06, 0x7f, 0x30, 0x1d, 0x43, 0x33, 0x30, 0x03, 0x33, 0x34, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x06, 0xff, 0x32, 0x00, 0x03, 0xf0, 0x0b, 0x03, 0x30, 0x10, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x06, 0xff, 0x33, 0x10, 0x03, 0xf0, 0x0b, 0x03, 0x30, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0xf4, 0xd1, 0x34, 0x03, 0x30, 0x3e, 0x03, 0x73, 0x34, 0xfd, 0x01, 0x00, 0x00, 0x00, 0x00, 0x06, 0x47, 0x33, 0x30, 0x03, 0xf3, 0x3f, 0x03, 0x33, 0x30, 0x47, 0x03, 0x00, 0x00, 0x00, 0x00, 0x04, 0x1d, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x1d, 0x00, 0x00, 0x00, 0x06, 0xd0, 0x01, 0x0c, 0xc0, 0x00, 0x0c, 0xc0, 0x10, 0x0d, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x47, 0xc3, 0x34, 0x70, 0x03, 0xbc, 0x00, 0xb3, 0xc0, 0xb0, 0x70, 0xb4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x07, 0x30, 0x00, 0x03, 0x30, 0x00, 0x03, 0x30, 0x10, 0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x08, 0x03, 0x30, 0x1f, 0x3d, 0x7b, 0x3b, 0xe3, 0x32, 0x83, 0x30, 0x03, 0x30, 0x03, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x07, 0xcd, 0x03, 0x73, 0xc3, 0x8c, 0x32, 0xc3, 0xcd, 0xc0, 0x33, 0xd0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xf4, 0x41, 0xc7, 0x71, 0xd0, 0x0c, 0x30, 0x03, 0xcd, 0xd1, 0xd1, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x7f, 0x30, 0x1d, 0x43, 0x73, 0x34, 0xff, 0x31, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xf4, 0x41, 0xd3, 0x71, 0xd0, 0x0c, 0x30, 0xc3, 0xcd, 0xd1, 0xd1, 0xdf, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0xff, 0x31, 0x34, 0x03, 0xf3, 0x0f, 0xd7, 0x30, 0x34, 0x07, 0x07, 0x00, 0x00, 0x00, 0x00, 0x06, 0xfc, 0xb1, 0x31, 0x07, 0xd0, 0x0f, 0x90, 0x23, 0x34, 0xfe, 0x01, 0x00, 0x00, 0x00, 0x00, 0x06, 0xff, 0x13, 0x13, 0x30, 0x00, 0x03, 0x30, 0x00, 0x03, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x03, 0xcc, 0x00, 0x33, 0xc0, 0x0c, 0x30, 0x03, 0xcd, 0xd2, 0xd1, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x03, 0x33, 0x30, 0x03, 0xb3, 0x38, 0xcd, 0xc1, 0x0d, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x03, 0x30, 0x43, 0x30, 0xc7, 0x34, 0xcd, 0x1c, 0xed, 0x1e, 0x2c, 0x0e, 0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x03, 0x4c, 0xc3, 0x81, 0x3b, 0xd0, 0x03, 0xdc, 0x42, 0xc3, 0x31, 0xc0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x03, 0xb3, 0x38, 0xdc, 0x40, 0x07, 0x30, 0x00, 0x03, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xff, 0x0f, 0xd0, 0x02, 0x2c, 0xc0, 0x02, 0x2d, 0xc0, 0x06, 0xf0, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x2f, 0x03, 0x03, 0x03, 0x03, 0x03, 0x2f, 0x00, 0x00, 0x00, 0x05, 0x03, 0x28, 0xc0, 0x00, 0x0a, 0x30, 0x80, 0x02, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x04, 0x3e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x3e, 0x00, 0x00, 0x00, 0x04, 0x1d, 0x37, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x03, 0x83, 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0xd0, 0x47, 0x30, 0xfc, 0x0c, 0xd3, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x05, 0x07, 0x0c, 0xf0, 0xc7, 0x35, 0xc3, 0x0c, 0xf3, 0x07, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0xd0, 0xc3, 0x25, 0x03, 0x4c, 0xd2, 0x03, 0x00, 0x00, 0x00, 0x00, 0x05, 0xd0, 0x00, 0x83, 0x8f, 0x33, 0xc3, 0x1c, 0xd3, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0xd0, 0xc7, 0x30, 0xbf, 0x0c, 0xd0, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x04, 0x3d, 0x07, 0x03, 0x2f, 0x03, 0x03, 0x07, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0xc0, 0xcb, 0x32, 0xc3, 0xf4, 0x03, 0x4c, 0x30, 0x7e, 0x00, 0x00, 0x05, 0x03, 0x0c, 0xf0, 0xc7, 0x39, 0xc3, 0x0c, 0x73, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x1c, 0x00, 0x0d, 0x0c, 0x0c, 0x1d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x30, 0x00, 0x34, 0x30, 0x30, 0x30, 0x30, 0x1e, 0x00, 0x05, 0x03, 0x0c, 0x31, 0xce, 0x0e, 0x1f, 0xcc, 0x31, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x04, 0x03, 0x03, 0x03, 0x03, 0x03, 0x47, 0x3d, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x9b, 0x71, 0x37, 0x33, 0x33, 0x32, 0x43, 0x03, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0xf0, 0xc7, 0x31, 0xc3, 0x0c, 0x33, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0xd0, 0xc7, 0x31, 0xc3, 0x4c, 0xd3, 0x07, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0xf0, 0xc7, 0x31, 0xc3, 0x4c, 0xf3, 0xc7, 0x00, 0x03, 0x00, 0x00, 0x05, 0x00, 0x00, 0xd0, 0xdf, 0x31, 0xc3, 0x4c, 0xd3, 0x0f, 0x30, 0xc0, 0x00, 0x05, 0x03, 0x00, 0x30, 0x7f, 0xc7, 0x30, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0xc0, 0xc7, 0x10, 0x3c, 0x04, 0xf3, 0x03, 0x00, 0x00, 0x00, 0x00, 0x04, 0x0c, 0x0c, 0x3f, 0x0c, 0x0c, 0x1c, 0x74, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x70, 0xdc, 0x30, 0xc3, 0x4c, 0xd3, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x30, 0xcc, 0x30, 0xd3, 0xdc, 0xc2, 0x02, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x47, 0x33, 0x32, 0x33, 0x73, 0x37, 0xcd, 0x01, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x30, 0xcd, 0x32, 0x7d, 0x8c, 0x73, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x30, 0xcc, 0x30, 0xc7, 0x74, 0x43, 0x07, 0x0c, 0x1f, 0x00, 0x00, 0x05, 0x00, 0x00, 0xf0, 0x4f, 0x2c, 0x2c, 0x2c, 0xf1, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x04, 0x38, 0x0c, 0x0c, 0x03, 0x0c, 0x0c, 0x38, 0x00, 0x00, 0x00, 0x02, 0x32, 0x33, 0x33, 0x13, 0x00, 0x04, 0x0b, 0x0c, 0x0c, 0x30, 0x0c, 0x0c, 0x0b, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x1d, 0x72, 0x37, 0xd2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x07, 0x00, 0x1f, 0x00, 0x7f, 0x00, 0xff, 0x01, 0xff, 0x07, 0xff, 0x1f, 0xff, 0x7f, 0xff, 0x1b, 0xbf, 0x01, 0x1b, 0x00, 0x0c, 0x00, 0x40, 0xff, 0x00, 0x00, 0xf8, 0xf0, 0x3f, 0xee, 0x2c, 0x30, 0xcb, 0x0b, 0x30, 0x42, 0xc3, 0x33, 0x00, 0x03, 0x30, 0x00, 0xf3, 0x33, 0x00, 0x03, 0x30, 0x00, 0xff, 0x3f, 0x00, 0x0c, 0xc2, 0x00, 0x00, 0xcb, 0x00, 0x00, 0xee, 0xc0, 0xff, 0xf8, 0xb0, 0xc0, 0xff, 0x2c, 0xc0, 0x00, 0x0c, 0xcf, 0x00, 0x0c, 0xc0, 0x00, 0xcc, 0xcf, 0x00, 0x0c, 0xc0, 0x00, 0xfc, 0xff, 0x0a, 0x00, 0x00, 0x0d, 0x00, 0x70, 0x00, 0x00, 0xf3, 0xff, 0xd3, 0x03, 0xe0, 0x3c, 0x3f, 0x38, 0x03, 0xd0, 0x33, 0xff, 0x38, 0x03, 0xe0, 0xf0, 0xff, 0x03, 0x0c, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x8b, 0xf7, 0x0c, 0x13, 0x9f, 0x3b, 0x37, 0x00, 0xc0, 0x23, 0xff, 0xff, 0x8b, 0x03, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0xd0, 0x7f, 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c, 0x00, 0x00, 0xfc, 0xff, 0x0f, 0xfc, 0xff, 0x3f, 0xfc, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0xb8, 0xe0, 0x2f, 0xff, 0xe3, 0x2f, 0xb8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0xd0, 0x7f, 0x80, 0xff, 0x2f, 0xfd, 0xff, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xdf, 0xff, 0x7f, 0xf8, 0xff, 0x02, 0xfd, 0x07, 0x0a, 0x40, 0x01, 0x00, 0x02, 0x00, 0xc8, 0x07, 0x10, 0xc3, 0x00, 0x31, 0x0d, 0x00, 0xfd, 0x01, 0x00, 0x74, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0xf0, 0xf0, 0x00, 0x0f, 0x0f, 0xf0, 0xf0, 0x00, 0x0f, 0x0f, 0xf0, 0xf0, 0x00, 0x0f, 0x0f, 0xf0, 0xf0, 0x00, 0x00, 0x00, 0x0a, 0x40, 0x05, 0x80, 0xff, 0x8b, 0x1e, 0xd0, 0x2e, 0x00, 0xf0, 0x00, 0xe0, 0xff, 0x0b, 0x00, 0x0f, 0x00, 0xb8, 0x03, 0xb0, 0xe2, 0xff, 0x02, 0x50, 0x01, 0x08, 0xff, 0x07, 0x03, 0x1e, 0x03, 0x73, 0x03, 0xef, 0x03, 0xc0, 0x03, 0xc0, 0x03, 0xc0, 0x03, 0xc0, 0x03, 0xc0, 0xff, 0xff, 0x0b, 0x00, 0x00, 0x00, 0xe4, 0x2f, 0xe0, 0x1b, 0x0c, 0x1d, 0x00, 0xff, 0x03, 0xbe, 0xf0, 0xc1, 0x01, 0xad, 0x34, 0xc0, 0x36, 0x0b, 0x30, 0xdc, 0xe4, 0x07, 0xfd, 0x1b, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x02, 0xa0, 0xaa, 0x00, 0xa8, 0xc2, 0x0f, 0x2a, 0xff, 0x03, 0xca, 0x3f, 0x80, 0xfc, 0x0f, 0x20, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0xc0, 0x01, 0x00, 0xc0, 0x07, 0xaa, 0xea, 0x1f, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xaa, 0xea, 0x1f, 0x00, 0xc0, 0x07, 0x00, 0xc0, 0x01, 0x00, 0x00, 0x00, 0x0c, 0x40, 0x03, 0x00, 0xd0, 0x03, 0x00, 0xf4, 0xab, 0xaa, 0xfd, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfd, 0xff, 0xff, 0xf4, 0xab, 0xaa, 0xd0, 0x03, 0x00, 0x40, 0x03, 0x00, 0x00, 0x00, 0x00, 0x09, 0xfe, 0xff, 0xe3, 0xff, 0x0f, 0xaa, 0x3e, 0x0a, 0xf8, 0x2e, 0xe0, 0xbf, 0x80, 0xff, 0xaa, 0xfe, 0xff, 0xe2, 0xff, 0x02, 0x02, 0x00, 0x00, 0x09, 0x00, 0x80, 0x04, 0xd0, 0xe2, 0xff, 0x02, 0x00, 0x00, 0xff, 0x6f, 0x00, 0x40, 0xe6, 0xaf, 0x50, 0x00, 0x09, 0x00, 0x20, 0x00, 0x64, 0x00, 0x09, 0xe0, 0x3f, 0x70, 0x60, 0x63, 0xc0, 0xe4, 0x80, 0xc2, 0x03, 0x07, 0x0f, 0x1e, 0x6c, 0xff, 0x27, 0xff, 0x3f, 0xe0, 0x2f, 0x00, 0x00, 0x00, 0x09, 0x44, 0x44, 0x00, 0x12, 0x41, 0x88, 0x04, 0x21, 0x21, 0x84, 0x48, 0x20, 0x23, 0xc2, 0xcc, 0x08, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x1d, 0x00, 0x1d, 0x00, 0x78, 0x00, 0xb4, 0x07, 0xf0, 0x2f, 0xc0, 0xfb, 0x00, 0xbe, 0x02, 0xf4, 0x07, 0xfd, 0xff, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x40, 0x01, 0x00, 0x19, 0x00, 0xa8, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x3f, 0x00, 0x00, 0xf0, 0x03, 0x00, 0x00, 0x00, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0xfc, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x3f, 0x00, 0x00, 0x00, 0xf0, 0x03, 0x00, 0x00, 0xf0, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0xfc, 0xff, 0x3f, 0x00, 0xf0, 0xdc, 0xcb, 0x03, 0x00, 0xff, 0xff, 0x4f, 0x07, 0x40, 0x07, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0x0f, 0xff, 0x3f, 0xfc, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0xff, 0xff, 0x3f, 0x00, 0xc0, 0x07, 0x00, 0xbd, 0x02, 0xe8, 0xb3, 0xe0, 0x3c, 0xac, 0xc3, 0x03, 0x0f, 0x3c, 0x00, 0xc0, 0x03, 0x00, 0xfc, 0xff, 0xff, 0x0b, 0xc0, 0xc8, 0xc0, 0x91, 0x1b, 0xcd, 0x36, 0xe7, 0x00, 0x47, 0x03, 0xa7, 0x80, 0x36, 0xfd, 0xff, 0xc1, 0x9b, 0xf9, 0xb8, 0xb8, 0xb8, 0xb7, 0x99, 0xf7, 0xff, 0xff, 0x0f, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0xf0, 0x03, 0x00, 0xfc, 0x00, 0xc0, 0xff, 0x00, 0xf0, 0x3f, 0x00, 0xff, 0x3f, 0xf0, 0xff, 0x3f, 0xfc, 0xff, 0xcf, 0xff, 0xff, 0x0f, 0x08, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x1f, 0xcb, 0x30, 0xc3, 0x3f, 0xc7, 0x00, 0x7e, 0x2f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0xfc, 0xff, 0xc3, 0xff, 0x3f, 0x0c, 0x00, 0xc3, 0xfc, 0x33, 0x0c, 0x24, 0xc3, 0xc0, 0x31, 0x0c, 0x06, 0xc3, 0x30, 0x30, 0x0c, 0x00, 0xc3, 0xff, 0x3f, 0x0a, 0xff, 0x3f, 0x30, 0x00, 0x03, 0xc3, 0x30, 0x30, 0x3f, 0xff, 0xff, 0x3f, 0x3c, 0x00, 0xff, 0xff, 0xff, 0x0c, 0x0c, 0xc3, 0xc0, 0x00, 0x0c, 0xfc, 0xff, 0x0a, 0x00, 0x00, 0xc0, 0xff, 0x00, 0xfc, 0x0f, 0xc0, 0xff, 0x00, 0xfc, 0x0f, 0xc0, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x3c, 0x00, 0xc0, 0x03, 0xf0, 0x3f, 0x00, 0xff, 0x03, 0x00, 0x00, 0x09, 0xe0, 0x2f, 0xf0, 0xff, 0xe3, 0xb8, 0xec, 0x9b, 0xf9, 0xbf, 0xf8, 0xbf, 0x99, 0xef, 0xb8, 0x2c, 0xff, 0x3f, 0xe0, 0x2f, 0x00, 0x00, 0x00, 0x04, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x03, 0x87, 0x87, 0xc3, 0x30, 0x0c, 0xe3, 0xde, 0x01, 0x03, 0x74, 0xbb, 0x0c, 0xc3, 0x30, 0x2c, 0x2d, 0x0d, 0x05, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x0f, 0x05, 0x00, 0x00, 0xd0, 0xc7, 0x34, 0xc3, 0x0c, 0x73, 0x4c, 0x1f, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x03, 0x0f, 0x39, 0xc0, 0x00, 0x43, 0x2f, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0xd0, 0x87, 0x30, 0x60, 0x60, 0x60, 0xc0, 0x3f, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0xd0, 0x87, 0x30, 0xb8, 0x00, 0x23, 0x4c, 0x1f, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x0e, 0x36, 0xc6, 0xfc, 0x03, 0x0c, 0x30, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0xf0, 0xcb, 0x00, 0x7f, 0x40, 0x13, 0x8c, 0x1f, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0xd0, 0xcb, 0x10, 0x2f, 0x4c, 0x33, 0x4c, 0x1f, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0xf0, 0x0f, 0x30, 0x60, 0x60, 0xc0, 0x00, 0x03, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0xd0, 0xc7, 0x30, 0x7d, 0x4c, 0x33, 0x4c, 0x1f, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0xd0, 0xc7, 0x30, 0xc6, 0xe0, 0x03, 0x8c, 0x1f, 0x00, 0x00, 0x00, 0x04, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x03, 0xc0, 0xf0, 0x3c, 0xcf, 0xf3, 0x3c, 0x03, 0x00, 0x03, 0x00, 0xcc, 0xf3, 0x3c, 0xcf, 0xf3, 0x30, 0x00, 0x05, 0x00, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0x00, 0x06, 0x74, 0xc0, 0x0c, 0xdc, 0xc0, 0x0c, 0xdc, 0xc0, 0x0c, 0x99, 0x31, 0x30, 0x89, 0x41, 0x07, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x03, 0x30, 0xc0, 0x0f, 0x30, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x00, 0xd0, 0x7f, 0x40, 0xff, 0x1f, 0xfc, 0xff, 0x43, 0xff, 0x1f, 0x40, 0x15, 0x00, 0x00, 0x00, 0x0a, 0xe4, 0x06, 0x90, 0x91, 0x01, 0x06, 0x24, 0x30, 0x90, 0x1b, 0x46, 0x6e, 0x96, 0xb9, 0x91, 0xe4, 0x06, 0x0c, 0x18, 0x90, 0x40, 0x46, 0x06, 0x90, 0x1b, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x3f, 0x02, 0xc2, 0xab, 0xaa, 0x3e, 0x20, 0xe0, 0xab, 0xaa, 0x3e, 0x02, 0xc2, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x08, 0x02, 0xc0, 0x30, 0x00, 0x0c, 0x03, 0xf0, 0xff, 0x00, 0xfe, 0x0b, 0xd0, 0x7f, 0x00, 0xa4, 0x01, 0x00, 0x0a, 0x00, 0xa0, 0x00, 0x0a, 0x00, 0x80, 0x00, 0x81, 0x24, 0x10, 0x85, 0x00, 0x20, 0x66, 0x40, 0x15, 0x45, 0x62, 0x90, 0x4d, 0xd0, 0xf1, 0x23, 0x01, 0xfd, 0x41, 0x41, 0x07, 0x00, 0x0a, 0x00, 0x05, 0x00, 0xa0, 0x00, 0x40, 0x1f, 0x00, 0xf8, 0x02, 0xd0, 0x7f, 0x00, 0xfe, 0x0b, 0xf0, 0xff, 0x00, 0xff, 0x0f, 0xd0, 0x7f, 0x00, 0xf4, 0x01, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x34, 0x00, 0xd4, 0x01, 0xd0, 0x06, 0x40, 0x7f, 0x00, 0xfd, 0x01, 0xf4, 0x07, 0xd0, 0x1f, 0x00, 0x7f, 0x00, 0xd0, 0x01, 0x00, 0x0a, 0x40, 0x15, 0x00, 0xfe, 0x0b, 0x88, 0x2f, 0x52, 0xf0, 0x50, 0x01, 0x0a, 0xd4, 0xaf, 0x7f, 0xfd, 0xf5, 0xc7, 0x0b, 0x3e, 0x70, 0xd0, 0x00, 0xa4, 0x01, 0x0a, 0x80, 0x2f, 0x80, 0x5f, 0x2f, 0x0c, 0x00, 0xc3, 0x00, 0x30, 0x0c, 0x00, 0xc3, 0x01, 0x34, 0x34, 0xc0, 0x01, 0x07, 0x0d, 0xd0, 0x75, 0x00, 0xf4, 0x01, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0xf4, 0x01, 0xc0, 0x3f, 0x00, 0xf0, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0xf0, 0x00, 0xe0, 0xef, 0x00, 0xbb, 0x0b, 0xa0, 0xaa, 0x00, 0xaa, 0x0a, 0x80, 0x19, 0x00, 0x64, 0x02, 0x00, 0x05, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x10, 0x2d, 0x80, 0xe7, 0x0b, 0xbe, 0xf8, 0xfa, 0x02, 0xfe, 0x0b, 0x80, 0x2f, 0x00, 0x50, 0x00, 0x0a, 0x00, 0x05, 0x00, 0xf8, 0x02, 0xe0, 0xbf, 0x80, 0xaf, 0x2f, 0xbe, 0xe0, 0xdb, 0x02, 0x78, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x05, 0x00, 0xa0, 0x00, 0x40, 0x1f, 0x50, 0xfe, 0x5b, 0xfd, 0xff, 0x47, 0xff, 0x1f, 0xe0, 0xbf, 0x00, 0xfe, 0x0b, 0xf0, 0xf5, 0x40, 0x01, 0x14, 0x0a, 0x40, 0x1a, 0x00, 0x09, 0x06, 0x20, 0x80, 0x00, 0x02, 0x08, 0xfc, 0xff, 0xc3, 0x00, 0x30, 0x0c, 0x00, 0xc3, 0x00, 0x30, 0x0c, 0x00, 0xc3, 0xff, 0x3f, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xaa, 0x0a, 0xf0, 0xff, 0x00, 0xaa, 0x0a, 0xf0, 0xff, 0x00, 0x00, 0x00, 0x09, 0xe0, 0x2f, 0xf0, 0xff, 0xe3, 0xff, 0xed, 0xff, 0xe1, 0xdf, 0xe1, 0x2f, 0xe1, 0xef, 0xe2, 0x2f, 0xef, 0x3f, 0xe0, 0x2f, 0x00, 0x00, 0x00, 0x0a, 0xc0, 0x31, 0x00, 0x30, 0x01, 0x40, 0x34, 0x00, 0xcc, 0x00, 0x00, 0x0a, 0x00, 0xf8, 0x02, 0xe0, 0xbf, 0x80, 0xff, 0x2f, 0xfe, 0xff, 0xfb, 0xff, 0xff, 0x0a, 0x00, 0x00, 0x80, 0xff, 0x2f, 0xfc, 0xff, 0xc3, 0x07, 0x3d, 0x3c, 0xc0, 0xc3, 0x03, 0x3c, 0x7c, 0xd0, 0xc3, 0xff, 0x3f, 0xf8, 0xff,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x31, 0x30, 0x89, 0x41, 0x07, 0x06, 0x74, 0xc0, 0x0c, 0xdc, 0xc0, 0x0c, 0xdc, 0xc0, 0x0c, 0x99, 0x31, 0x30, 0x89, 0x41, 0x07, 0x06, 0x74, 0xc0, 0x0c, 0xdc, 0xc0, 0x0c, 0xdc, 0xc0, 0x0c, 0x99, 0x31, 0x30, 0x89, 0x41, 0x07, 0x06, 0x74, 0xc0, 0x0c, 0xdc, 0xc0, 0x0c, 0xdc, 0xc0, 0x0c, 0x99, 0x31, 0x30, 0x89, 0x41, 0x07, 0x06, 0x74, 0xc0, 0x0c, 0xdc, 0xc0, 0x0c, 0xdc, 0xc0, 0x0c, 0x99, 0x31, 0x30, 0x89, 0x41, 0x07, 0x06, 0x74, 0xc0, 0x0c, 0xdc, 0xc0, 0x0c, 0xdc, 0xc0, 0x0c, 0x99, 0x31, 0x30, 0x89, 0x41, 0x07, 0x06, 0x74, 0xc0, 0x0c, 0xdc, 0xc0, 0x0c, 0xdc, 0xc0, 0x0c, 0x99, 0x31, 0x30, 0x89, 0x41, 0x07, 0x06, 0x74, 0xc0, 0x0c, 0xdc, 0xc0, 0x0c, 0xdc, 0xc0, 0x0c, 0x99, 0x31, 0x30, 0x89, 0x41, 0x07, 0x06, 0x74, 0xc0, 0x0c, 0xdc, 0xc0, 0x0c, 0xdc, 0xc0, 0x0c, 0x99, 0x31, 0x30, 0x89, 0x41, 0x07, 0x06, 0x74, 0xc0, 0x0c, 0xdc, 0xc0, 0x0c, 0xdc, 0xc0, 0x0c, 0x99, 0x31, 0x30, 0x89, 0x41, 0x07, 0x06, 0x74, 0xc0, 0x0c, 0xdc, 0xc0, 0x0c, 0xdc, 0xc0, 0x0c, 0x99, 0x31, 0x30, 0x89, 0x41, 0x07, 0x06, 0x74, 0xc0, 0x0c, 0xdc, 0xc0, 0x0c, 0xdc, 0xc0, 0x0c, 0x99, 0x31, 0x30, 0x89, 0x41, 0x07,
@@ -29,4 +30,5 @@ static short font_ptrs[] =
{
0x0000, 0x000e, 0x001c, 0x002a, 0x0038, 0x0046, 0x0054, 0x0062, 0x0070, 0x007e, 0x008c, 0x009a, 0x00a8, 0x00b6, 0x00c4, 0x00d2, 0x00e0, 0x00ee, 0x00fc, 0x010a, 0x0118, 0x0126, 0x0134, 0x0142, 0x0150, 0x015e, 0x016c, 0x017a, 0x0188, 0x0196, 0x01a4, 0x01b2, 0x01c0, 0x01ce, 0x01d7, 0x01e5, 0x01f5, 0x0205, 0x0218, 0x0228, 0x0231, 0x023c, 0x0247, 0x0257, 0x0267, 0x0272, 0x0280, 0x0289, 0x0299, 0x02a9, 0x02b7, 0x02c7, 0x02d7, 0x02e7, 0x02f7, 0x0307, 0x0317, 0x0327, 0x0337, 0x0340, 0x034b, 0x035b, 0x036b, 0x037b, 0x038b, 0x03a0, 0x03b0, 0x03c0, 0x03d0, 0x03e0, 0x03f0, 0x0400, 0x0410, 0x0420, 0x042b, 0x043b, 0x044e, 0x045e, 0x0473, 0x0486, 0x0499, 0x04a9, 0x04bc, 0x04cc, 0x04dc, 0x04ec, 0x04ff, 0x050f, 0x0524, 0x0537, 0x0547, 0x055a, 0x0565, 0x0573, 0x057e, 0x0589, 0x0599, 0x05a2, 0x05b0, 0x05be, 0x05cc, 0x05da, 0x05e8, 0x05f3, 0x0601, 0x060f, 0x061a, 0x0625, 0x0633, 0x063e, 0x064e, 0x065c, 0x066a, 0x0678, 0x0686, 0x068f, 0x069d, 0x06a8, 0x06b6, 0x06c4, 0x06d4, 0x06e2, 0x06f0, 0x06fe, 0x0709, 0x070f, 0x071a, 0x072a, 0x0735, 0x074a, 0x0769, 0x0788, 0x07a2, 0x07c1, 0x07db, 0x07f5, 0x080f, 0x0829, 0x0843, 0x085d, 0x0877, 0x0896, 0x08a6, 0x08c0, 0x08da, 0x08f4, 0x090e, 0x0923, 0x0940, 0x095d, 0x097c, 0x099b, 0x09b3, 0x09cb, 0x09e3, 0x09fb, 0x0a13, 0x0a2b, 0x0a43, 0x0a5b, 0x0a73, 0x0a8b, 0x0aa3, 0x0abd, 0x0ada, 0x0af7, 0x0b0c, 0x0b26, 0x0b40, 0x0b5a, 0x0b74, 0x0b8c, 0x0b97, 0x0ba0, 0x0ba9, 0x0bb7, 0x0bc5, 0x0bd3, 0x0be1, 0x0bef, 0x0bfd, 0x0c0b, 0x0c19, 0x0c27, 0x0c35, 0x0c43, 0x0c4e, 0x0c57, 0x0c60, 0x0c6e, 0x0c7e, 0x0c8e, 0x0ca8, 0x0cc2, 0x0cdc, 0x0cf6, 0x0d10, 0x0d2a, 0x0d44, 0x0d5e, 0x0d78, 0x0d92, 0x0dac, 0x0dc6, 0x0de0, 0x0dfa, 0x0e14, 0x0e2e, 0x0e46, 0x0e60, 0x0e7a, 0x0e8a, 0x0e9a, 0x0eaa, 0x0eba, 0x0eca, 0x0eda, 0x0eea, 0x0efa, 0x0f0a, 0x0f1a, 0x0f2a, 0x0f3a, 0x0f4a, 0x0f5a, 0x0f6a, 0x0f7a, 0x0f8a, 0x0f9a, 0x0faa, 0x0fba, 0x0fca, 0x0fda, 0x0fea, 0x0ffa, 0x100a, 0x101a, 0x102a, 0x103a, 0x104a, 0x105a, 0x106a, 0x107a, 0x108a, 0x109a, 0x10aa, 0x10ba, 0x10ca, 0x10da, 0x10ea, 0x10fa, 0x110a, 0x111a, 0x112a, 0x113a, 0x114a,
};
-#endif \ No newline at end of file
+#endif
+#endif
diff --git a/graphics.h b/includes/graphics.h
index 6a1507e..6a1507e 100644
--- a/graphics.h
+++ b/includes/graphics.h
diff --git a/includes/hmap.h b/includes/hmap.h
new file mode 100755
index 0000000..de18061
--- /dev/null
+++ b/includes/hmap.h
@@ -0,0 +1,34 @@
+/**
+ * Powder Toy - Heatmap Data
+ *
+ * Copyright (c) 2010 Simon Robertshaw
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
+ */
+#ifndef HMAP_H
+#define HMAP_H
+//Original Heat Scale
+//static char color_data[] = {0xD9,0xFF,0xFE,0xD4,0xFB,0xFC,0xCF,0xF6,0xF9,0xC9,0xF1,0xF6,0xC2,0xEB,0xF4,0xBB,0xE5,0xF0,0xB3,0xDE,0xED,0xAA,0xD6,0xE9,0xA1,0xCF,0xE5,0x98,0xC7,0xE2,0x8E,0xBF,0xDD,0x85,0xB6,0xD9,0x7B,0xAD,0xD5,0x71,0xA5,0xD0,0x67,0x9C,0xCC,0x5D,0x93,0xC7,0x53,0x8A,0xC3,0x4A,0x82,0xBE,0x41,0x79,0xB9,0x38,0x71,0xB5,0x30,0x69,0xB0,0x28,0x61,0xAC,0x21,0x5A,0xA8,0x1B,0x53,0xA3,0x16,0x4D,0x9F,0x12,0x47,0x9B,0x0F,0x42,0x98,0x0F,0x3D,0x94,0x0F,0x39,0x90,0x0F,0x34,0x8C,0x0F,0x30,0x89,0x0F,0x2C,0x85,0x0F,0x28,0x81,0x0F,0x24,0x7D,0x0F,0x20,0x7A,0x0F,0x1D,0x76,0x0F,0x1A,0x72,0x0F,0x16,0x6F,0x0F,0x13,0x6B,0x0F,0x11,0x67,0x10,0x0E,0x64,0x12,0x0C,0x60,0x15,0x0A,0x5D,0x18,0x08,0x59,0x1B,0x06,0x56,0x1D,0x04,0x53,0x20,0x03,0x4F,0x23,0x02,0x4C,0x26,0x01,0x49,0x29,0x01,0x46,0x2C,0x00,0x43,0x2F,0x00,0x40,0x30,0x00,0x3F,0x31,0x00,0x3F,0x31,0x00,0x3E,0x32,0x00,0x3E,0x32,0x00,0x3D,0x33,0x00,0x3D,0x33,0x00,0x3C,0x34,0x00,0x3C,0x34,0x00,0x3B,0x35,0x01,0x3B,0x36,0x01,0x3B,0x36,0x01,0x3A,0x37,0x01,0x3A,0x37,0x01,0x39,0x38,0x01,0x39,0x39,0x01,0x38,0x39,0x02,0x38,0x3A,0x02,0x37,0x3B,0x02,0x37,0x3B,0x02,0x36,0x3C,0x02,0x36,0x3C,0x03,0x35,0x3D,0x03,0x35,0x3E,0x03,0x34,0x3F,0x03,0x34,0x3F,0x04,0x34,0x40,0x04,0x33,0x41,0x04,0x33,0x41,0x04,0x32,0x42,0x05,0x32,0x43,0x05,0x31,0x43,0x05,0x31,0x44,0x06,0x30,0x45,0x06,0x30,0x46,0x06,0x30,0x46,0x07,0x2F,0x47,0x07,0x2F,0x48,0x08,0x2E,0x49,0x08,0x2E,0x49,0x08,0x2E,0x4A,0x09,0x2D,0x4B,0x09,0x2D,0x4C,0x09,0x2C,0x4C,0x0A,0x2C,0x4D,0x0A,0x2B,0x4E,0x0B,0x2B,0x4F,0x0B,0x2B,0x4F,0x0C,0x2A,0x50,0x0C,0x2A,0x51,0x0D,0x29,0x52,0x0D,0x29,0x53,0x0D,0x29,0x53,0x0E,0x28,0x54,0x0E,0x28,0x55,0x0F,0x27,0x56,0x0F,0x27,0x57,0x10,0x27,0x58,0x10,0x26,0x58,0x11,0x26,0x59,0x11,0x26,0x5A,0x12,0x25,0x5B,0x13,0x25,0x5C,0x13,0x24,0x5D,0x14,0x24,0x5D,0x14,0x24,0x5E,0x15,0x23,0x5F,0x15,0x23,0x60,0x16,0x23,0x61,0x16,0x22,0x62,0x17,0x22,0x62,0x18,0x22,0x63,0x18,0x21,0x64,0x19,0x21,0x65,0x19,0x21,0x66,0x1A,0x20,0x67,0x1B,0x20,0x67,0x1B,0x20,0x68,0x1C,0x1F,0x69,0x1C,0x1F,0x6A,0x1D,0x1F,0x6B,0x1E,0x1E,0x6C,0x1E,0x1E,0x6D,0x1F,0x1E,0x6D,0x1F,0x1D,0x6E,0x20,0x1D,0x6F,0x21,0x1D,0x70,0x21,0x1C,0x71,0x22,0x1C,0x72,0x23,0x1C,0x73,0x23,0x1B,0x73,0x24,0x1B,0x74,0x25,0x1B,0x75,0x25,0x1A,0x76,0x26,0x1A,0x77,0x27,0x1A,0x78,0x27,0x1A,0x78,0x28,0x19,0x79,0x29,0x19,0x7A,0x29,0x19,0x7B,0x2A,0x18,0x7C,0x2B,0x18,0x7D,0x2B,0x18,0x7E,0x2C,0x18,0x7E,0x2D,0x17,0x7F,0x2D,0x17,0x80,0x2E,0x17,0x81,0x2F,0x16,0x82,0x2F,0x16,0x82,0x30,0x16,0x83,0x31,0x16,0x84,0x31,0x15,0x85,0x32,0x15,0x86,0x33,0x15,0x87,0x33,0x15,0x87,0x34,0x14,0x88,0x35,0x14,0x89,0x36,0x14,0x8A,0x36,0x14,0x8A,0x37,0x13,0x8B,0x38,0x13,0x8C,0x38,0x13,0x8D,0x39,0x13,0x8E,0x3A,0x13,0x8E,0x3A,0x12,0x8F,0x3B,0x12,0x90,0x3C,0x12,0x91,0x3C,0x12,0x91,0x3D,0x11,0x92,0x3E,0x11,0x93,0x3E,0x11,0x94,0x3F,0x11,0x94,0x40,0x11,0x95,0x40,0x10,0x96,0x41,0x10,0x97,0x42,0x10,0x97,0x42,0x10,0x98,0x43,0x10,0x99,0x44,0x0F,0x99,0x44,0x0F,0x9A,0x45,0x0F,0x9A,0x45,0x0F,0x9B,0x46,0x0F,0x9C,0x47,0x0F,0x9C,0x47,0x0E,0x9D,0x48,0x0E,0x9D,0x48,0x0E,0x9E,0x49,0x0E,0x9E,0x49,0x0E,0x9F,0x4A,0x0D,0xA0,0x4B,0x0D,0xA0,0x4B,0x0D,0xA1,0x4C,0x0D,0xA1,0x4C,0x0D,0xA2,0x4D,0x0C,0xA2,0x4E,0x0C,0xA3,0x4E,0x0C,0xA4,0x4F,0x0C,0xA4,0x4F,0x0C,0xA5,0x50,0x0C,0xA5,0x51,0x0C,0xA6,0x51,0x0C,0xA7,0x52,0x0C,0xA7,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ED,0xFE,0xFB,0xEF,0xFE,0xFB,0xF0,0xFE,0xFB,0xF1,0xFE,0xFC,0xF2,0xFF,0xFC,0xF3,0xFF,0xFC,0xF5,0xFF,0xFC,0xF6,0xFF,0xFD,0xF7,0xFF,0xFD,0xF8,0xFF,0xFD,0xF9,0xFF,0xFE,0xFA,0xFF,0xFE,0xFB,0xFF,0xFE,0xFC,0xFF,0xFE,0xFC,0xFF,0xFF,0xFD,0xFF,0xFF,0xFE};
+//Modified Hue Scale
+//static char color_data[] = {0x00,0x00,0x00,0x02,0x00,0x02,0x04,0x00,0x04,0x06,0x00,0x06,0x09,0x00,0x08,0x0B,0x00,0x0B,0x0E,0x00,0x0D,0x11,0x00,0x10,0x14,0x00,0x13,0x17,0x00,0x16,0x1B,0x00,0x19,0x1E,0x00,0x1C,0x22,0x00,0x1F,0x26,0x00,0x22,0x29,0x00,0x26,0x2D,0x00,0x29,0x32,0x00,0x2D,0x36,0x00,0x30,0x3A,0x00,0x34,0x3E,0x00,0x38,0x43,0x00,0x3C,0x47,0x00,0x40,0x4C,0x00,0x44,0x51,0x00,0x48,0x55,0x00,0x4C,0x5A,0x00,0x50,0x5F,0x00,0x54,0x64,0x00,0x59,0x69,0x00,0x5D,0x6E,0x00,0x61,0x73,0x00,0x66,0x77,0x00,0x6A,0x7C,0x00,0x6E,0x81,0x00,0x73,0x86,0x00,0x77,0x8B,0x00,0x7C,0x90,0x00,0x80,0x95,0x00,0x85,0x9A,0x00,0x89,0x9F,0x00,0x8D,0xA3,0x00,0x92,0xA8,0x00,0x96,0xAD,0x00,0x9B,0xB1,0x00,0x9F,0xB6,0x00,0xA3,0xBA,0x00,0xA8,0xBF,0x00,0xAC,0xC3,0x00,0xB0,0xC7,0x00,0xB4,0xCB,0x00,0xB8,0xCF,0x00,0xBD,0xD3,0x00,0xC1,0xD7,0x00,0xC4,0xDB,0x00,0xC8,0xDE,0x00,0xCC,0xE1,0x00,0xD0,0xE5,0x00,0xD4,0xE8,0x00,0xD7,0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,0xFF,0x2B,0x00,0xFF,0x28,0x00,0xFF,0x24,0x00,0xFF,0x21,0x00,0xFF,0x1D,0x00,0xFF,0x1A,0x00,0xFF,0x17,0x00,0xFF,0x14,0x00,0xFF,0x11,0x00,0xFF,0x0E,0x00,0xFF,0x0C,0x00,0xFF,0x09,0x00,0xFF,0x07,0x00,0xFF,0x05,0x00,0xFF,0x03,0x00,0xFF,0x01,0x00,0xFF,0x00,0x01,0xFF,0x00,0x03,0xFF,0x00,0x05,0xFF,0x00,0x07,0xFF,0x00,0x09,0xFF,0x00,0x0C,0xFF,0x00,0x0F,0xFF,0x00,0x11,0xFF,0x00,0x14,0xFF,0x00,0x17,0xFF,0x00,0x1A,0xFF,0x00,0x1D,0xFF,0x00,0x20,0xFF,0x00,0x24,0xFF,0x00,0x27,0xFF,0x00,0x2B,0xFF,0x00,0x2E,0xFF,0x00,0x32,0xFF,0x00,0x36,0xFF,0x00,0x3A,0xFF,0x00,0x3E,0xFF,0x00,0x42,0xFF,0x00,0x46,0xFF,0x00,0x4A,0xFF,0x00,0x4E,0xFF,0x00,0x52,0xFF,0x00,0x56,0xFF,0x00,0x5B,0xFF,0x00,0x5F,0xFF,0x00,0x63,0xFF,0x00,0x68,0xFF,0x00,0x6C,0xFF,0x00,0x71,0xFF,0x00,0x75,0xFF,0x00,0x79,0xFF,0x00,0x7E,0xFF,0x00,0x82,0xFF,0x00,0x87,0xFF,0x00,0x8B,0xFF,0x00,0x90,0xFF,0x00,0x94,0xFF,0x00,0x98,0xFF,0x00,0x9D,0xFF,0x00,0xA1,0xFF,0x00,0xA6,0xFF,0x00,0xAA,0xFF,0x00,0xAE,0xFF,0x00,0xB2,0xFF,0x00,0xB6,0xFF,0x00,0xBA,0xFF,0x00,0xBF,0xFF,0x00,0xC2,0xFF,0x00,0xC6,0xFF,0x00,0xCA,0xFF,0x00,0xCE,0xFF,0x00,0xD2,0xFF,0x00,0xD5,0xFF,0x00,0xD9,0xFF,0x00,0xDC,0xFF,0x00,0x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,0xFF,0x15,0x00,0xFF,0x12,0x00,0xFF,0x10,0x00,0xFF,0x0D,0x00,0xFF,0x0A,0x00,0xFF,0x08,0x00,0xFF,0x06,0x00,0xFF,0x04,0x00,0xFF,0x02,0x00,0xFF,0x00,0x02,0xFD,0x00,0x04,0xFB,0x00,0x06,0xF9,0x00,0x09,0xF6,0x00,0x0B,0xF3,0x00,0x0E,0xF1,0x00,0x10,0xEE,0x00,0x13,0xEB,0x00,0x16,0xE7,0x00,0x19,0xE4,0x00,0x1C,0xE0,0x00,0x1F,0xDD,0x00,0x23,0xD9,0x00,0x26,0xD5,0x00,0x29,0xD1,0x00,0x2D,0xCD,0x00,0x31,0xC9,0x00,0x35,0xC4,0x00,0x38,0xC0,0x00,0x3C,0xBC,0x00,0x40,0xB7,0x00,0x44,0xB2,0x00,0x48,0xAE,0x00,0x4C,0xA9,0x00,0x51,0xA4,0x00,0x55,0x9F,0x00,0x59,0x9B,0x00,0x5D,0x96,0x00,0x62,0x91,0x00,0x66,0x8C,0x00,0x6A,0x87,0x00,0x6F,0x82,0x00,0x73,0x7D,0x00,0x78,0x78,0x00,0x7C,0x73,0x00,0x81,0x6E,0x00,0x85,0x69,0x00,0x8A,0x65,0x00,0x8E,0x60,0x00,0x92,0x5B,0x00,0x97,0x56,0x00,0x9B,0x52,0x00,0xA0,0x4D,0x00,0xA4,0x49,0x00,0xA8,0x44,0x00,0xAC,0x40,0x00,0xB1,0x3B,0x00,0xB5,0x37,0x00,0xB9,0x33,0x00,0xBD,0x2F,0x00,0xC1,0x2B,0x00,0xC5,0x28,0x00,0xC9,0x24,0x00,0xCD,0x21,0x00,0xD0,0x1D,0x00,0xD4,0x1A,0x00,0xD8,0x17,0x00,0xDB,0x14,0x00,0xDE,0x11,0x00,0xE2,0x0F,0x00,0xE5,0x0D,0x00,0xE8,0x0A,0x00,0xEB,0x08,0x00,0xEE,0x07,0x00,0xF0,0x05,0x00,0xF3,0x04,0x00,0xF6,0x02,0x00,0xF8,0x01,0x00,0xFA,0x01,0x00,0xFC,0x00,0x00,0xFE,0x00,0x00,0xFF,0x00,0x00,0xFF,0x00,0x00,0xFF,0x01,0x00,0xFF,0x01,0x00,0xFF,0x02,0x00,0xFF,0x03,0x00,0xFF,0x04,0x00,0xFF,0x06,0x00,0xFF,0x07,0x00,0xFF,0x09,0x00,0xFF,0x0B,0x00,0xFF,0x0D,0x00,0xFF,0x0F,0x00,0xFF,0x12,0x00,0xFF,0x14,0x00,0xFF,0x17,0x00,0xFF,0x1A,0x00,0xFF,0x1C,0x00,0xFF,0x1F,0x00,0xFF,0x23,0x00,0xFF,0x26,0x00,0xFF,0x29,0x00,0xFF,0x2D,0x00,0xFF,0x31,0x00,0xFF,0x34,0x00,0xFF,0x38,0x00,0xFF,0x3C,0x00,0xFF,0x40,0x00,0xFF,0x44,0x00,0xFF,0x48,0x00,0xFF,0x4C,0x00,0xFF,0x51,0x00,0xFF,0x55,0x00,0xFF,0x59,0x00,0xFF,0x5E,0x00,0xFF,0x62,0x00,0xFF,0x67,0x00,0xFF,0x6B,0x00,0xFF,0x70,0x00,0xFF,0x74,0x00,0xFF,0x79,0x00,0xFF,0x7D,0x00,0xFF,0x82,0x00,0xFF,0x87,0x00,0xFF,0x8B,0x00,0xFF,0x90,0x00,0xFF,0x94,0x00,0xFF,0x99,0x00,0xFF,0x9D,0x00,0xFF,0xA2,0x00,0xFF,0xA6,0x00,0xFF,0xAB,0x00,0xFF,0xAF,0x00,0xFF,0xB4,0x00,0xFF,0xB8,0x00,0xFF,0xBC,0x00,0xFF,0xC0,0x00,0xFF,0xC4,0x00,0xFF,0xC8,0x00,0xFF,0xCC,0x00,0xFF,0xD0,0x00,0xFF,0xD4,0x00,0xFF,0xD8,0x00,0xFF,0xDB,0x00,0xFF,0xDF,0x00,0xFF,0xE2,0x00,0xFF,0xE5,0x00,0xFF,0xE9,0x00,0xFF,0xEC,0x00,0xFF,0xEE,0x00,0xFF,0xF1,0x00,0xFF,0xF4,0x00,0xFF,0xF6,0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xFF,0xFF,0xF4,0xFF,0xFF,0xF7,0xFF,0xFF,0xF9,0xFF,0xFF,0xFB,0xFF,0xFF,0xFD};
+//Hue Scale
+//static char color_data[] = {0xFF,0x00,0xFF,0xFE,0x00,0xFF,0xFC,0x00,0xFF,0xFB,0x00,0xFF,0xF9,0x00,0xFF,0xF8,0x00,0xFF,0xF6,0x00,0xFF,0xF4,0x00,0xFF,0xF2,0x00,0xFF,0xF0,0x00,0xFF,0xEE,0x00,0xFF,0xEC,0x00,0xFF,0xEA,0x00,0xFF,0xE8,0x00,0xFF,0xE5,0x00,0xFF,0xE3,0x00,0xFF,0xE1,0x00,0xFF,0xDE,0x00,0xFF,0xDC,0x00,0xFF,0xD9,0x00,0xFF,0xD6,0x00,0xFF,0xD4,0x00,0xFF,0xD1,0x00,0xFF,0xCE,0x00,0xFF,0xCC,0x00,0xFF,0xC9,0x00,0xFF,0xC6,0x00,0xFF,0xC3,0x00,0xFF,0xC1,0x00,0xFF,0xBE,0x00,0xFF,0xBB,0x00,0xFF,0xB8,0x00,0xFF,0xB5,0x00,0xFF,0xB2,0x00,0xFF,0xAF,0x00,0xFF,0xAC,0x00,0xFF,0xA9,0x00,0xFF,0xA7,0x00,0xFF,0xA4,0x00,0xFF,0xA1,0x00,0xFF,0x9E,0x00,0xFF,0x9B,0x00,0xFF,0x98,0x00,0xFF,0x95,0x00,0xFF,0x93,0x00,0xFF,0x90,0x00,0xFF,0x8D,0x00,0xFF,0x8A,0x00,0xFF,0x88,0x00,0xFF,0x85,0x00,0xFF,0x83,0x00,0xFF,0x80,0x00,0xFF,0x7E,0x00,0xFF,0x7B,0x00,0xFF,0x78,0x00,0xFF,0x76,0x00,0xFF,0x73,0x00,0xFF,0x70,0x00,0xFF,0x6E,0x00,0xFF,0x6B,0x00,0xFF,0x68,0x00,0xFF,0x65,0x00,0xFF,0x63,0x00,0xFF,0x60,0x00,0xFF,0x5D,0x00,0xFF,0x5A,0x00,0xFF,0x57,0x00,0xFF,0x54,0x00,0xFF,0x51,0x00,0xFF,0x4E,0x00,0xFF,0x4B,0x00,0xFF,0x49,0x00,0xFF,0x46,0x00,0xFF,0x43,0x00,0xFF,0x40,0x00,0xFF,0x3D,0x00,0xFF,0x3A,0x00,0xFF,0x37,0x00,0xFF,0x35,0x00,0xFF,0x32,0x00,0xFF,0x2F,0x00,0xFF,0x2C,0x00,0xFF,0x2A,0x00,0xFF,0x27,0x00,0xFF,0x25,0x00,0xFF,0x22,0x00,0xFF,0x20,0x00,0xFF,0x1D,0x00,0xFF,0x1B,0x00,0xFF,0x18,0x00,0xFF,0x16,0x00,0xFF,0x14,0x00,0xFF,0x12,0x00,0xFF,0x10,0x00,0xFF,0x0E,0x00,0xFF,0x0C,0x00,0xFF,0x0A,0x00,0xFF,0x08,0x00,0xFF,0x06,0x00,0xFF,0x05,0x00,0xFF,0x03,0x00,0xFF,0x02,0x00,0xFF,0x00,0x00,0xFF,0x00,0x01,0xFF,0x00,0x02,0xFF,0x00,0x04,0xFF,0x00,0x05,0xFF,0x00,0x07,0xFF,0x00,0x08,0xFF,0x00,0x0A,0xFF,0x00,0x0C,0xFF,0x00,0x0E,0xFF,0x00,0x10,0xFF,0x00,0x12,0xFF,0x00,0x14,0xFF,0x00,0x16,0xFF,0x00,0x19,0xFF,0x00,0x1B,0xFF,0x00,0x1D,0xFF,0x00,0x20,0xFF,0x00,0x22,0xFF,0x00,0x25,0xFF,0x00,0x28,0xFF,0x00,0x2A,0xFF,0x00,0x2D,0xFF,0x00,0x30,0xFF,0x00,0x32,0xFF,0x00,0x35,0xFF,0x00,0x38,0xFF,0x00,0x3B,0xFF,0x00,0x3D,0xFF,0x00,0x40,0xFF,0x00,0x43,0xFF,0x00,0x46,0xFF,0x00,0x49,0xFF,0x00,0x4C,0xFF,0x00,0x4F,0xFF,0x00,0x52,0xFF,0x00,0x55,0xFF,0x00,0x57,0xFF,0x00,0x5A,0xFF,0x00,0x5D,0xFF,0x00,0x60,0xFF,0x00,0x63,0xFF,0x00,0x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,0xE7,0x00,0xFF,0xE5,0x00,0xFF,0xE2,0x00,0xFF,0xE0,0x00,0xFF,0xDE,0x00,0xFF,0xDB,0x00,0xFF,0xD8,0x00,0xFF,0xD6,0x00,0xFF,0xD3,0x00,0xFF,0xD1,0x00,0xFF,0xCE,0x00,0xFF,0xCB,0x00,0xFF,0xC8,0x00,0xFF,0xC5,0x00,0xFF,0xC3,0x00,0xFF,0xC0,0x00,0xFF,0xBD,0x00,0xFF,0xBA,0x00,0xFF,0xB7,0x00,0xFF,0xB4,0x00,0xFF,0xB1,0x00,0xFF,0xAE,0x00,0xFF,0xAC,0x00,0xFF,0xA9,0x00,0xFF,0xA6,0x00,0xFF,0xA3,0x00,0xFF,0xA0,0x00,0xFF,0x9D,0x00,0xFF,0x9A,0x00,0xFF,0x98,0x00,0xFF,0x95,0x00,0xFF,0x92,0x00,0xFF,0x8F,0x00,0xFF,0x8C,0x00,0xFF,0x8A,0x00,0xFF,0x87,0x00,0xFF,0x85,0x00,0xFF,0x82,0x00,0xFF,0x80,0x00,0xFF,0x7D,0x00,0xFF,0x7A,0x00,0xFF,0x78,0x00,0xFF,0x75,0x00,0xFF,0x73,0x00,0xFF,0x70,0x00,0xFF,0x6D,0x00,0xFF,0x6A,0x00,0xFF,0x67,0x00,0xFF,0x65,0x00,0xFF,0x62,0x00,0xFF,0x5F,0x00,0xFF,0x5C,0x00,0xFF,0x59,0x00,0xFF,0x56,0x00,0xFF,0x53,0x00,0xFF,0x51,0x00,0xFF,0x4E,0x00,0xFF,0x4B,0x00,0xFF,0x48,0x00,0xFF,0x45,0x00,0xFF,0x42,0x00,0xFF,0x3F,0x00,0xFF,0x3C,0x00,0xFF,0x3A,0x00,0xFF,0x37,0x00,0xFF,0x34,0x00,0xFF,0x31,0x00,0xFF,0x2E,0x00,0xFF,0x2C,0x00,0xFF,0x29,0x00,0xFF,0x27,0x00,0xFF,0x24,0x00,0xFF,0x21,0x00,0xFF,0x1F,0x00,0xFF,0x1D,0x00,0xFF,0x1A,0x00,0xFF,0x18,0x00,0xFF,0x16,0x00,0xFF,0x13,0x00,0xFF,0x11,0x00,0xFF,0x0F,0x00,0xFF,0x0D,0x00,0xFF,0x0B,0x00,0xFF,0x0A,0x00,0xFF,0x08,0x00,0xFF,0x06,0x00,0xFF,0x05,0x00,0xFF,0x03,0x00,0xFF,0x02,0x00,0xFF,0x00,0x01,0xFF,0x00,0x02,0xFF,0x00,0x04,0xFF,0x00,0x05,0xFF,0x00,0x07,0xFF,0x00,0x09,0xFF,0x00,0x0A,0xFF,0x00,0x0C,0xFF,0x00,0x0E,0xFF,0x00,0x10,0xFF,0x00,0x12,0xFF,0x00,0x15,0xFF,0x00,0x17,0xFF,0x00,0x19,0xFF,0x00,0x1B,0xFF,0x00,0x1E,0xFF,0x00,0x20,0xFF,0x00,0x23,0xFF,0x00,0x25,0xFF,0x00,0x28,0xFF,0x00,0x2A,0xFF,0x00,0x2D,0xFF,0x00,0x30,0xFF,0x00,0x33,0xFF,0x00,0x35,0xFF,0x00,0x38,0xFF,0x00,0x3B,0xFF,0x00,0x3E,0xFF,0x00,0x41,0xFF,0x00,0x44,0xFF,0x00,0x46,0xFF,0x00,0x49,0xFF,0x00,0x4C,0xFF,0x00,0x4F,0xFF,0x00,0x52,0xFF,0x00,0x55,0xFF,0x00,0x58,0xFF,0x00,0x5B,0xFF,0x00,0x5E,0xFF,0x00,0x61,0xFF,0x00,0x63,0xFF,0x00,0x66,0xFF,0x00,0x69,0xFF,0x00,0x6C,0xFF,0x00,0x6F,0xFF,0x00,0x71,0xFF,0x00,0x74,0xFF,0x00,0x77,0xFF,0x00,0x79,0xFF,0x00,0x7C,0xFF,0x00,0x7F,0xFF,0x00,0x81,0xFF,0x00,0x84,0xFF,0x00,0x86,0xFF,0x00,0x89,0xFF,0x00,0x8B,0xFF,0x00,0x8E,0xFF,0x00,0x91,0xFF,0x00,0x94,0xFF,0x00,0x96,0xFF,0x00,0x99,0xFF,0x00,0x9C,0xFF,0x00,0x9F,0xF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00,0xFF,0xAE,0x00,0xFF,0xAB,0x00,0xFF,0xA8,0x00,0xFF,0xA5,0x00,0xFF,0xA2,0x00,0xFF,0x9F,0x00,0xFF,0x9D,0x00,0xFF,0x9A,0x00,0xFF,0x97,0x00,0xFF,0x94,0x00,0xFF,0x91,0x00,0xFF,0x8F,0x00,0xFF,0x8C,0x00,0xFF,0x89,0x00,0xFF,0x87,0x00,0xFF,0x84,0x00,0xFF,0x81,0x00,0xFF,0x7F,0x00,0xFF,0x7C,0x00,0xFF,0x7A,0x00,0xFF,0x77,0x00,0xFF,0x75,0x00,0xFF,0x72,0x00,0xFF,0x6F,0x00,0xFF,0x6C,0x00,0xFF,0x6A,0x00,0xFF,0x67,0x00,0xFF,0x64,0x00,0xFF,0x61,0x00,0xFF,0x5E,0x00,0xFF,0x5B,0x00,0xFF,0x58,0x00,0xFF,0x56,0x00,0xFF,0x53,0x00,0xFF,0x50,0x00,0xFF,0x4D,0x00,0xFF,0x4A,0x00,0xFF,0x47,0x00,0xFF,0x44,0x00,0xFF,0x41,0x00,0xFF,0x3E,0x00,0xFF,0x3C,0x00,0xFF,0x39,0x00,0xFF,0x36,0x00,0xFF,0x33,0x00,0xFF,0x31,0x00,0xFF,0x2E,0x00,0xFF,0x2B,0x00,0xFF,0x29,0x00,0xFF,0x26,0x00,0xFF,0x23,0x00,0xFF,0x21,0x00,0xFF,0x1E,0x00,0xFF,0x1C,0x00,0xFF,0x1A,0x00,0xFF,0x17,0x00,0xFF,0x15,0x00,0xFF,0x13,0x00,0xFF,0x11,0x00,0xFF,0x0F,0x00,0xFF,0x0D,0x00,0xFF,0x0B,0x00,0xFF,0x09,0x00,0xFF,0x07,0x00,0xFF,0x06,0x00,0xFF,0x04,0x00,0xFF,0x03,0x00,0xFF,0x01,0x00};
+//Scaled Hue Scale
+static char color_data[] = {0x2B,0x00,0xFF,0x2B,0x00,0xFF,0x28,0x04,0xFF,0x24,0x08,0xFF,0x20,0x0D,0xFF,0x1C,0x12,0xFF,0x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00,0xFF,0x57,0x00,0xFF,0x56,0x00,0xFF,0x54,0x00,0xFF,0x51,0x00,0xFF,0x4F,0x00,0xFF,0x4E,0x00,0xFF,0x4C,0x00,0xFF,0x4A,0x00,0xFF,0x48,0x00,0xFF,0x46,0x00,0xFF,0x45,0x00,0xFF,0x43,0x00,0xFF,0x40,0x00,0xFF,0x3F,0x00,0xFF,0x3C,0x00,0xFF,0x3B,0x00,0xFF,0x39,0x00,0xFF,0x37,0x00,0xFF,0x35,0x00,0xFF,0x33,0x00,0xFF,0x32,0x00,0xFF,0x30,0x00,0xFF,0x2F,0x00,0xFF,0x2D,0x00,0xFF,0x2B,0x00,0xFF,0x2A,0x00,0xFF,0x28,0x00,0xFF,0x27,0x00,0xFF,0x25,0x00,0xFF,0x23,0x00,0xFF,0x22,0x00,0xFF,0x21,0x00,0xFF,0x1F,0x00,0xFF,0x1E,0x00,0xFF,0x1C,0x00,0xFF,0x1B,0x00,0xFF,0x1A,0x00,0xFF,0x19,0x00,0xFF,0x18,0x00,0xFF,0x16,0x00,0xFF,0x16,0x01,0xFF,0x15,0x02,0xFF,0x14,0x02,0xFF,0x12,0x02,0xFF,0x12,0x03,0xFF,0x12,0x04,0xFF,0x10,0x05,0xFF,0x10,0x06,0xFF,0x0F,0x06,0xFF,0x0F,0x07,0xFF,0x0D,0x08,0xFF,0x0D,0x09,0xFF,0x0C,0x0A,0xFF,0x0C,0x0B,0xFF,0x0C,0x0C,0xFF,0x0B,0x0C,0xFF,0x0B,0x0E,0xFF,0x0A,0x0F,0xFF,0x09,0x10,0xFF,0x09,0x11,0xFF,0x08,0x12,0xFF,0x08,0x13,0xFF,0x08,0x14,0xFF,0x07,0x15,0xFF,0x07,0x16,0xFF,0x06,0x18,0xFF,0x06,0x19,0xFF,0x06,0x1A,0xFF,0x06,0x1C,0xFF,0x06,0x1D,0xFF,0x06,0x1E,0xFF,0x05,0x1F,0xFF,0x05,0x20,0xFF,0x05,0x21,0xFF,0x05,0x23,0xFF,0x04,0x24,0xFF,0x04,0x25,0xFF,0x04,0x26,0xFF,0x04,0x28,0xFF,0x03,0x29,0xFF,0x03,0x2B,0xFF,0x03,0x2B,0xFF,0x03,0x2D,0xFF,0x03,0x2E,0xFF,0x03,0x30,0xFF,0x03,0x31,0xFF,0x02,0x32,0xFF,0x03,0x34,0xFF,0x03,0x35,0xFF,0x02,0x37,0xFF,0x03,0x39,0xFF,0x02,0x3A,0xFF,0x02,0x3B,0xFF,0x01,0x3C,0xFF,0x01,0x3E,0xFF,0x01,0x3F,0xFF,0x01,0x40,0xFF,0x02,0x42,0xFF,0x02,0x44,0xFF,0x01,0x45,0xFF,0x01,0x46,0xFF,0x01,0x48,0xFF,0x01,0x49,0xFF,0x01,0x4A,0xFF,0x01,0x4C,0xFF,0x00,0x4E,0xFF,0x01,0x4E,0xFF,0x00,0x50,0xFF,0x01,0x52,0xFF,0x01,0x52,0xFF,0x00,0x54,0xFF,0x00,0x55,0xFF,0x00,0x56,0xFF,0x00,0x58,0xFF,0x00,0x58,0xFF,0x00,0x59,0xFF,0x00,0x5A,0xFF,0x00,0x5B,0xFF,0x00,0x5C,0xFF,0x00,0x5D,0xFF,0x00,0x5E,0xFF,0x00,0x5F,0xFF,0x00,0x60,0xFF,0x00,0x61,0xFF,0x00,0x62,0xFF,0x00,0x63,0xFF,0x00,0x64,0xFF,0x00,0x65,0xFF,0x00,0x66,0xFF,0x00,0x67,0xFF,0x00,0x69,0xFF,0x00,0x6A,0xFF,0x00,0x6A,0xFF,0x00,0x6B,0xFF,0x00,0x6C,0xFF,0x00,0x6E,0xFF,0x00,0x6F,0xFF,0x00,0x70,0xFF,0x00,0x71,0xFF,0x00,0x72,0xFF,0x00,0x73,0xFF,0x00,0x74,0xFF,0x00,0x75,0xFF,0x00,0x76,0xFF,0x00,0x77,0xFF,0x00,0x79,0xFF,0x00,0x7A,0xFF,0x00,0x7B,0xFF,0x00,0x7B,0xFF,0x00,0x7D,0xFF,0x00,0x7E,0xFF,0x00,0x7F,0x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,0x00,0xFF,0xA6,0x00,0xFF,0xA6,0x00,0xFF,0xA5,0x00,0xFF,0xA4,0x00,0xFF,0xA3,0x00,0xFF,0xA2,0x00,0xFF,0xA1,0x00,0xFF,0xA0,0x00,0xFF,0x9F,0x00,0xFF,0x9E,0x00,0xFF,0x9D,0x00,0xFF,0x9D,0x00,0xFF,0x9B,0x00,0xFF,0x9B,0x00,0xFF,0x99,0x00,0xFF,0x98,0x00,0xFF,0x98,0x00,0xFF,0x97,0x00,0xFF,0x95,0x00,0xFF,0x94,0x00,0xFF,0x93,0x00,0xFF,0x93,0x00,0xFF,0x92,0x00,0xFF,0x91,0x00,0xFF,0x90,0x00,0xFF,0x8F,0x00,0xFF,0x8E,0x00,0xFF,0x8D,0x00,0xFF,0x8C,0x00,0xFF,0x8B,0x00,0xFF,0x8A,0x00,0xFF,0x89,0x00,0xFF,0x89,0x00,0xFF,0x88,0x00,0xFF,0x87,0x00,0xFF,0x86,0x00,0xFF,0x84,0x00,0xFF,0x84,0x00,0xFF,0x82,0x00,0xFF,0x82,0x00,0xFF,0x81,0x00,0xFF,0x80,0x00,0xFF,0x7F,0x00,0xFF,0x7E,0x00,0xFF,0x7D,0x00,0xFF,0x7C,0x00,0xFF,0x7B,0x00,0xFF,0x7B,0x00,0xFF,0x7A,0x00,0xFF,0x78,0x00,0xFF,0x78,0x00,0xFF,0x77,0x00,0xFF,0x76,0x00,0xFF,0x74,0x00,0xFF,0x74,0x00,0xFF,0x73,0x00,0xFF,0x72,0x00,0xFF,0x71,0x00,0xFF,0x70,0x00,0xFF,0x70,0x00,0xFF,0x6E,0x00,0xFF,0x6D,0x00,0xFF,0x6C,0x00,0xFF,0x6C,0x00,0xFF,0x6B,0x00,0xFF,0x6A,0x00,0xFF,0x6A,0x00,0xFF,0x68,0x00,0xFF,0x67,0x00,0xFF,0x66,0x00,0xFF,0x66,0x00,0xFF,0x65,0x00,0xFF,0x64,0x00,0xFF,0x64,0x00,0xFF,0x62,0x00,0xFF,0x62,0x00,0xFF,0x61,0x00,0xFF,0x60,0x00,0xFF,0x5F,0x00,0xFF,0x5E,0x00,0xFF,0x5D,0x00,0xFF,0x5D,0x00,0xFF,0x5C,0x00,0xFF,0x5A,0x00,0xFF,0x5A,0x00,0xFF,0x59,0x00,0xFF,0x58,0x00,0xFF,0x57,0x00,0xFF,0x56,0x00,0xFF,0x55,0x00,0xFF,0x54,0x00,0xFF,0x54,0x00,0xFF,0x53,0x00,0xFF,0x52,0x00,0xFF,0x51,0x00,0xFF,0x50,0x00,0xFF,0x4F,0x00,0xFF,0x4E,0x00,0xFF,0x4D,0x00,0xFF,0x4D,0x00,0xFF,0x4C,0x00,0xFF,0x4A,0x00,0xFF,0x4A,0x00,0xFF,0x48,0x00,0xFF,0x47,0x00,0xFF,0x47,0x00,0xFF,0x45,0x00,0xFF,0x45,0x00,0xFF,0x44,0x00,0xFF,0x43,0x00,0xFF,0x43,0x00,0xFF,0x41,0x00,0xFF,0x40,0x00,0xFF,0x40,0x00,0xFF,0x3F,0x00,0xFF,0x3E,0x00,0xFF,0x3C,0x00,0xFF,0x3C,0x00,0xFF,0x3B,0x00,0xFF,0x3A,0x00,0xFF,0x38,0x00,0xFF,0x38,0x00,0xFF,0x37,0x00,0xFF,0x36,0x00,0xFF,0x35,0x00,0xFF,0x34,0x00,0xFF,0x34,0x00,0xFF,0x33,0x00,0xFF,0x31,0x00,0xFF,0x31,0x00,0xFF,0x2F,0x00,0xFF,0x2F,0x00,0xFF,0x2E,0x00,0xFF,0x2C,0x00,0xFF,0x2C,0x00,0xFF,0x2B,0x00,0xFF,0x2A,0x00,0xFF,0x29,0x00,0xFF,0x28,0x00,0xFF,0x27,0x00,0xFF,0x26,0x00,0xFF,0x26,0x00,0xFF,0x25,0x00,0xFF,0x25,0x00,0xFF,0x23,0x00,0xFF,0x23,0x00,0xFF,0x22,0x00,0xFF,0x21,0x00,0xFF,0x20,0x00,0xFF,0x1F,0x00,0xFF,0x1E,0x00,0xFF,0x1D,0x00,0xFF,0x1D,0x00,0xFF,0x1C,0x00,0xFF,0x1B,0x00,0xFF,0x1A,0x00,0xFF,0x19,0x00,0xFF,0x19,0x00,0xFF,0x18,0x00,0xFF,0x17,0x00,0xFF,0x16,0x00,0xFF,0x15,0x00,0xFF,0x15,0x00,0xFF,0x14,0x00,0xFF,0x14,0x00,0xFF,0x12,0x00,0xFF,0x12,0x00,0xFF,0x12,0x00,0xFF,0x10,0x00,0xFF,0x10,0x00,0xFF,0x0F,0x00,0xFF,0x0E,0x00,0xFF,0x0E,0x00,0xFF,0x0D,0x00,0xFF,0x0C,0x00,0xFF,0x0B,0x00,0xFF,0x0B,0x00,0xFF,0x0B,0x00,0xFF,0x0A,0x00,0xFF,0x09,0x00,0xFF,0x09,0x00,0xFF,0x08,0x00,0xFF,0x07,0x00,0xFF,0x07,0x00,0xFF,0x06,0x00,0xFF,0x06,0x00,0xFF,0x05,0x00,0xFF,0x04,0x00,0xFF,0x04,0x00,0xFF,0x04,0x00,0xFF,0x04,0x00,0xFF,0x03,0x00,0xFF,0x03,0x00,0xFF,0x02,0x00,0xFF,0x01,0x00,0xFF,0x01,0x00,0xFF,0x01,0x00,0xFF,0x00,0x00,0xFF,0x00,0x00,0xFF,0x00,0x01,0xFF,0x00,0x01,0xFF,0x00,0x02,0xFF,0x00,0x01,0xFF,0x00,0x02,0xFF,0x00,0x03,0xFF,0x00,0x03,0xFF,0x00,0x03,0xFF,0x00,0x04,0xFF,0x00,0x05,0xFF,0x00,0x05,0xFF,0x00,0x05,0xFF,0x00,0x06,0xFF,0x00,0x07,0xFF,0x00,0x06,0xFF,0x00,0x07,0xFF,0x00,0x08,0xFF,0x00,0x09,0xFF,0x00,0x09,0xFF,0x00,0x09,0xFF,0x00,0x0B,0xFF,0x00,0x0B,0xFF,0x00,0x0C,0xFF,0x00,0x0B,0xFF,0x00,0x0C,0xFF,0x00,0x0E,0xFF,0x00,0x0D,0xFF,0x00,0x0E,0xFF,0x00,0x0F,0xFF,0x00,0x0F,0xFF,0x00,0x10,0xFF,0x00,0x11,0xFF,0x00,0x11,0xFF,0x00,0x12,0xFF,0x00,0x13,0xFF,0x00,0x14,0xFF,0x00,0x14,0xFF,0x00,0x15,0xFF,0x00,0x16,0xFF,0x00,0x16,0xFF,0x00,0x17,0xFF,0x00,0x17,0xFF,0x00,0x18,0xFF,0x00,0x19,0xFF,0x00,0x1A,0xFF,0x00,0x1A,0xFF,0x00,0x1B,0xFF,0x00,0x1C,0xFF,0x00,0x1D,0xFF,0x00,0x1E,0xFF,0x00,0x1E,0xFF,0x00,0x1F,0xFF,0x00,0x20,0xFF,0x00,0x21,0xFF,0x00,0x22,0xFF,0x00,0x22,0xFF,0x00,0x22,0xFF,0x00,0x24,0xFF,0x00,0x25,0xFF,0x00,0x26,0xFF,0x00,0x26,0xFF,0x00,0x27,0xFF,0x00,0x27,0xFF,0x00,0x28,0xFF,0x00,0x2A,0xFF,0x00,0x2A,0xFF,0x00,0x2B,0xFF,0x00,0x2C,0xFF,0x00,0x2C,0xFF,0x00,0x2E,0xFF,0x00,0x2E,0xFF,0x00,0x2F,0xFF,0x00,0x30,0xFF,0x00,0x31,0xFF,0x00,0x31,0xFF,0x00,0x32,0xFF,0x00,0x33,0xFF,0x00,0x34,0xFF,0x00,0x35,0xFF,0x00,0x36,0xFF,0x00,0x37,0xFF,0x00,0x37,0xFF,0x00,0x39,0xFF,0x00,0x3A,0xFF,0x00,0x3A,0xFF,0x00,0x3B,0xFF,0x00,0x3C,0xFF,0x00,0x3D,0xFF,0x00,0x3E,0xFF,0x00,0x3E,0xFF,0x00,0x3F,0xFF,0x00,0x40,0xFF,0x00,0x41,0xFF,0x00,0x42,0xFF,0x00,0x43,0xFF,0x00,0x43,0xFF,0x00,0x45,0xFF,0x00,0x46,0xFF,0x00,0x46,0xFF,0x00,0x47,0xFF,0x00,0x48,0xFF,0x00,0x49,0xFF,0x00,0x4A,0xFF,0x00,0x4B,0xFF,0x00,0x4C,0xFF,0x00,0x4C,0xFF,0x00,0x4D,0xFF,0x00,0x4E,0xFF,0x00,0x4F,0xFF,0x00,0x50,0xFF,0x00,0x51,0xFF,0x00,0x51,0xFF,0x00,0x52,0xFF,0x00,0x53,0xFF,0x00,0x54,0xFF,0x00,0x54,0xFF,0x00,0x56,0xFF,0x00,0x56,0xFF,0x00,0x57,0xFF,0x00,0x59,0xFF,0x00,0x59,0xFF,0x00,0x5A,0xFF,0x00,0x5A,0xFF,0x00,0x5C,0xFF,0x00,0x5D,0xFF,0x00,0x5D,0xFF,0x00,0x5E,0xFF,0x00,0x5F,0xFF,0x00,0x60,0xFF,0x00,0x61,0xFF,0x00,0x61,0xFF,0x00,0x62,0xFF,0x00,0x63,0xFF,0x00,0x64,0xFF,0x00,0x64,0xFF,0x00,0x65,0xFF,0x00,0x66,0xFF,0x00,0x67,0xFF,0x00,0x67,0xFF,0x00,0x68,0xFF,0x00,0x69,0xFF,0x00,0x6A,0xFF,0x00,0x6B,0xFF,0x00,0x6B,0xFF,0x00,0x6C,0xFF,0x00,0x6C,0xFF,0x00,0x6D,0xFF,0x00,0x6E,0xFF,0x00,0x6F,0xFF,0x00,0x6F,0xFF,0x00,0x70,0xFF,0x00,0x71,0xFF,0x00,0x72,0xFF,0x00,0x72,0xFF,0x00,0x73,0xFF,0x00,0x74,0xFF,0x00,0x74,0xFF,0x00,0x75,0xFF,0x00,0x76,0xFF,0x00,0x77,0xFF,0x00,0x78,0xFF,0x00,0x78,0xFF,0x00,0x79,0xFF,0x00,0x7A,0xFF,0x00,0x7A,0xFF,0x00,0x7B,0xFF,0x00,0x7C,0xFF,0x00,0x7D,0xFF,0x00,0x7E,0xFF,0x00,0x7E,0xFF,0x00,0x80,0xFF,0x00,0x80,0xFF,0x00,0x81,0xFF,0x00,0x82,0xFF,0x00,0x82,0xFF,0x00,0x83,0xFF,0x00,0x84,0xFF,0x00,0x85,0xFF,0x00,0x85,0xFF,0x00,0x87,0xFF,0x00,0x87,0xFF,0x00,0x88,0xFF,0x00,0x89,0xFF,0x00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0xC1,0xFF,0x00,0xC2,0xFF,0x00,0xC2,0xFF,0x00,0xC4,0xFF,0x00,0xC4,0xFF,0x00,0xC5,0xFF,0x00,0xC5,0xFF,0x00,0xC6,0xFF,0x00,0xC7,0xFF,0x00,0xC7,0xFF,0x00,0xC7,0xFF,0x00,0xC8,0xFF,0x00,0xC9,0xFF,0x00,0xC9,0xFF,0x00,0xCA,0xFF,0x00,0xCA,0xFF,0x00,0xCB,0xFF,0x00,0xCC,0xFF,0x00,0xCC,0xFF,0x00,0xCC,0xFF,0x00,0xCD,0xFF,0x00,0xCD,0xFF,0x00,0xCE,0xFF,0x00,0xCE,0xFF,0x00,0xCF,0xFF,0x00,0xCF,0xFF,0x00,0xD0,0xFF,0x00,0xD0,0xFF,0x00,0xD1,0xFF,0x00,0xD1,0xFF,0x00,0xD1,0xFF,0x00,0xD2,0xFF,0x00,0xD2,0xFF,0x00,0xD3,0xFF,0x00,0xD3,0xFF,0x00,0xD4,0xFF,0x00,0xD3,0xFF,0x00,0xD4,0xFF,0x00,0xD4}; //1024 Pixels
+static char plasma_data[] = {0x00,0x00,0x00,0x03,0x00,0x00,0x05,0x00,0x00,0x09,0x00,0x00,0x0E,0x00,0x00,0x12,0x00,0x00,0x17,0x00,0x00,0x1C,0x00,0x00,0x22,0x00,0x00,0x27,0x00,0x00,0x2C,0x00,0x00,0x32,0x00,0x00,0x37,0x00,0x00,0x3C,0x00,0x00,0x41,0x00,0x00,0x45,0x00,0x00,0x4A,0x00,0x00,0x4D,0x00,0x00,0x51,0x00,0x00,0x53,0x00,0x00,0x55,0x00,0x00,0x55,0x00,0x02,0x55,0x02,0x03,0x55,0x03,0x06,0x55,0x03,0x07,0x55,0x05,0x09,0x55,0x06,0x0C,0x55,0x06,0x0F,0x55,0x07,0x10,0x55,0x09,0x13,0x55,0x0A,0x16,0x55,0x0C,0x1A,0x55,0x0C,0x1D,0x54,0x0E,0x20,0x53,0x10,0x23,0x54,0x11,0x26,0x53,0x13,0x2A,0x52,0x14,0x2E,0x51,0x15,0x31,0x50,0x17,0x35,0x50,0x19,0x38,0x4E,0x1A,0x3D,0x4D,0x1C,0x40,0x4D,0x1D,0x44,0x4C,0x1F,0x47,0x4B,0x21,0x4C,0x4A,0x23,0x4F,0x49,0x24,0x54,0x48,0x25,0x57,0x47,0x28,0x5B,0x46,0x29,0x5F,0x45,0x2B,0x62,0x44,0x2D,0x66,0x44,0x2E,0x6A,0x43,0x30,0x6E,0x42,0x32,0x72,0x41,0x33,0x76,0x40,0x35,0x79,0x3F,0x38,0x7C,0x3F,0x39,0x7F,0x3E,0x3B,0x83,0x3D,0x3D,0x86,0x3C,0x3F,0x8A,0x3B,0x40,0x8C,0x3B,0x43,0x8F,0x3B,0x44,0x92,0x3A,0x46,0x95,0x39,0x48,0x98,0x39,0x4A,0x9B,0x39,0x4C,0x9C,0x39,0x4E,0x9F,0x3A,0x4F,0xA1,0x39,0x51,0xA3,0x39,0x52,0xA4,0x39,0x54,0xA6,0x39,0x56,0xA7,0x39,0x57,0xA8,0x39,0x58,0xA8,0x3A,0x5A,0xA9,0x3A,0x5C,0xA8,0x3A,0x5D,0xA8,0x3B,0x5F,0xA8,0x3C,0x61,0xA8,0x3D,0x62,0xA8,0x3D,0x64,0xA9,0x3E,0x66,0xA8,0x3E,0x67,0xA9,0x3F,0x68,0xA8,0x40,0x6A,0xA8,0x41,0x6C,0xA8,0x42,0x6E,0xA8,0x42,0x70,0xA8,0x43,0x71,0xA8,0x44,0x73,0xA8,0x45,0x74,0xA9,0x46,0x76,0xA8,0x48,0x79,0xA8,0x49,0x7A,0xA7,0x4A,0x7C,0xA6,0x4A,0x7D,0xA5,0x4C,0x7F,0xA4,0x4D,0x81,0xA3,0x4E,0x83,0xA2,0x4E,0x85,0xA1,0x50,0x86,0xA0,0x51,0x88,0x9F,0x52,0x8A,0x9D,0x53,0x8B,0x9D,0x55,0x8D,0x9B,0x56,0x8F,0x9A,0x57,0x91,0x98,0x58,0x92,0x98,0x5A,0x94,0x97,0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,0xC4,0xB7,0xBA,0xC4,0xB9,0xBA,0xC4,0xBA,0xBC,0xC4,0xBB,0xBC,0xC4,0xBC,0xBE,0xC4,0xBD,0xBF,0xC4,0xBE,0xBF,0xC4,0xBF,0xC0,0xC4,0xC0,0xC1,0xC4,0xC1,0xC2,0xC4,0xC2,0xC2,0xC4,0xC3,0xC4,0xC4,0xC3,0xC4,0xC4,0xC4}; //200 Pixels
+static char hflm_data[] = {0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x02,0x01,0x01,0x02,0x02,0x01,0x04,0x02,0x01,0x04,0x02,0x03,0x05,0x03,0x03,0x07,0x04,0x04,0x08,0x04,0x03,0x09,0x04,0x04,0x0B,0x05,0x04,0x0C,0x05,0x05,0x0D,0x06,0x05,0x0E,0x07,0x06,0x10,0x07,0x07,0x11,0x08,0x07,0x12,0x09,0x08,0x14,0x09,0x08,0x15,0x0A,0x09,0x17,0x0A,0x09,0x19,0x0B,0x0A,0x1A,0x0C,0x0A,0x1C,0x0D,0x0B,0x1D,0x0D,0x0B,0x1F,0x0D,0x0C,0x22,0x0F,0x0D,0x23,0x0F,0x0E,0x25,0x10,0x0E,0x26,0x11,0x0F,0x28,0x12,0x10,0x2A,0x13,0x10,0x2C,0x13,0x11,0x2E,0x14,0x12,0x2F,0x15,0x12,0x31,0x15,0x13,0x33,0x16,0x14,0x35,0x17,0x15,0x36,0x18,0x15,0x39,0x19,0x16,0x3B,0x19,0x17,0x3D,0x1B,0x17,0x3E,0x1B,0x18,0x40,0x1C,0x19,0x42,0x1D,0x1A,0x43,0x1D,0x1B,0x45,0x1E,0x1C,0x47,0x1F,0x1C,0x49,0x20,0x1D,0x4B,0x21,0x1F,0x4C,0x21,0x1F,0x4E,0x22,0x20,0x50,0x23,0x21,0x52,0x23,0x22,0x53,0x24,0x23,0x55,0x25,0x23,0x56,0x26,0x24,0x59,0x26,0x25,0x5A,0x27,0x26,0x5B,0x28,0x27,0x5D,0x28,0x28,0x5E,0x29,0x29,0x60,0x29,0x2A,0x62,0x2A,0x2B,0x63,0x2B,0x2C,0x64,0x2C,0x2E,0x65,0x2C,0x2E,0x66,0x2C,0x2F,0x68,0x2D,0x31,0x69,0x2E,0x32,0x6A,0x2F,0x32,0x6B,0x2F,0x34,0x6C,0x30,0x34,0x6D,0x30,0x35,0x6F,0x31,0x37,0x70,0x31,0x38,0x71,0x32,0x39,0x72,0x33,0x3B,0x73,0x33,0x3C,0x74,0x34,0x3D,0x75,0x35,0x3E,0x76,0x35,0x3F,0x78,0x36,0x41,0x78,0x36,0x42,0x79,0x36,0x43,0x7A,0x37,0x44,0x7B,0x37,0x46,0x7C,0x38,0x48,0x7D,0x39,0x48,0x7E,0x3A,0x49,0x7F,0x39,0x4B,0x80,0x3A,0x4C,0x81,0x3B,0x4E,0x82,0x3C,0x4F,0x83,0x3C,0x51,0x84,0x3C,0x52,0x84,0x3D,0x54,0x86,0x3E,0x55,0x87,0x3E,0x56,0x88,0x3F,0x57,0x89,0x40,0x59,0x8A,0x40,0x5A,0x8A,0x41,0x5C,0x8B,0x41,0x5D,0x8C,0x42,0x5F,0x8D,0x41,0x60,0x8E,0x42,0x62,0x8E,0x42,0x62,0x8F,0x44,0x65,0x90,0x43,0x65,0x91,0x45,0x67,0x91,0x44,0x69,0x92,0x45,0x6A,0x93,0x46,0x6B,0x94,0x46,0x6C,0x94,0x46,0x6E,0x96,0x47,0x70,0x96,0x48,0x70,0x97,0x48,0x72,0x98,0x48,0x73,0x99,0x49,0x74,0x99,0x49,0x76,0x9A,0x4A,0x77,0x9A,0x4B,0x78,0x9B,0x4B,0x7A,0x9C,0x4B,0x7B,0x9D,0x4B,0x7C,0x9E,0x4C,0x7D,0x9F,0x4C,0x7E,0x9F,0x4D,0x7F,0xA0,0x4E,0x80,0xA0,0x4E,0x82,0xA1,0x4E,0x83,0xA2,0x4F,0x84,0xA3,0x4F,0x85,0xA3,0x4F,0x86,0xA4,0x4F,0x88,0xA5,0x50,0x89,0xA5,0x50,0x89,0xA6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0x04,0x0A,0x06,0x05,0x0B,0x07,0x05,0x0C,0x08,0x06,0x0E,0x08,0x06,0x0E,0x09,0x07,0x0F,0x0A,0x07,0x11,0x0B,0x08,0x12,0x0C,0x09,0x13,0x0C,0x09,0x14,0x0D,0x09,0x16,0x0D,0x0A,0x18,0x0E,0x0B,0x19,0x10,0x0C,0x1B,0x11,0x0C,0x1C,0x11,0x0D,0x1D,0x12,0x0D,0x1F,0x13,0x0E,0x20,0x14,0x0E,0x22,0x15,0x0F,0x23,0x15,0x10,0x25,0x16,0x10,0x26,0x17,0x11,0x28,0x19,0x12,0x29,0x19,0x13,0x2B,0x1A,0x14,0x2C,0x1B,0x14,0x2E,0x1C,0x15,0x30,0x1D,0x16,0x31,0x1F,0x17,0x33,0x1F,0x17,0x35,0x21,0x18,0x36,0x22,0x19,0x38,0x22,0x19,0x39,0x24,0x1A,0x3B,0x25,0x1B,0x3D,0x26,0x1B,0x3F,0x27,0x1D,0x40,0x27,0x1D,0x42,0x29,0x1E,0x44,0x2A,0x1F,0x46,0x2C,0x1F,0x47,0x2D,0x20,0x49,0x2D,0x21,0x4B,0x2F,0x22,0x4C,0x30,0x23,0x4E,0x30,0x23,0x50,0x31,0x24,0x52,0x33,0x25,0x53,0x34,0x26,0x55,0x35,0x27,0x57,0x36,0x27,0x58,0x37,0x28,0x5A,0x38,0x29,0x5C,0x3A,0x2A,0x5D,0x3A,0x2A,0x5F,0x3C,0x2B,0x61,0x3D,0x2C,0x63,0x3E,0x2C,0x64,0x3F,0x2D,0x65,0x41,0x2F,0x67,0x41,0x2F,0x69,0x43,0x30,0x6A,0x43,0x30,0x6C,0x45,0x31,0x6E,0x46,0x32,0x6F,0x47,0x33,0x71,0x48,0x33,0x72,0x49,0x34,0x74,0x4A,0x35,0x76,0x4C,0x35,0x77,0x4D,0x36,0x79,0x4E,0x36,0x7A,0x4E,0x37,0x7B,0x50,0x39,0x7D,0x51,0x39,0x7E,0x51,0x39,0x7F,0x53,0x3A,0x80,0x54,0x3A,0x82,0x55,0x3B,0x83,0x56,0x3C,0x84,0x57,0x3C,0x85,0x58,0x3D,0x87,0x5A,0x3D,0x88,0x5B,0x3E,0x89,0x5B,0x3F,0x8A,0x5C,0x3F,0x8B,0x5E,0x3F,0x8C,0x5F,0x40,0x8D,0x5F,0x41,0x8E,0x60,0x41,0x90,0x61,0x41,0x90,0x63,0x42,0x92,0x63,0x43,0x92,0x64,0x43,0x93,0x65,0x43,0x94,0x66,0x44,0x95,0x67,0x45,0x96,0x68,0x44,0x97,0x69,0x45,0x97,0x6B,0x45,0x99,0x6B,0x46,0x99,0x6D,0x47,0x9A,0x6D,0x47,0x9B,0x6F,0x48,0x9C,0x70,0x48,0x9D,0x71,0x48,0x9D,0x72,0x48,0x9F,0x73,0x48,0x9E,0x74,0x4A,0xA0,0x76,0x49,0xA0,0x77,0x4A,0xA1,0x78,0x4A,0xA1,0x79,0x4B,0xA2,0x7A,0x4B,0xA3,0x7B,0x4B,0xA4,0x7C,0x4C,0xA5,0x7D,0x4D,0xA6,0x7F,0x4D,0xA6,0x80,0x4D,0xA7,0x81,0x4D,0xA7,0x81,0x4E,0xA8,0x83,0x4E,0xA9,0x84,0x4F,0xA9,0x85,0x4F,0xAA,0x86,0x4F,0xAA,0x87,0x4F,0xAB,0x89,0x50,0xAC,0x8A,0x50,0xAC,0x8B,0x50,0xAD,0x8C,0x51,0xAD,0x8D,0x51,0xAE,0x8E,0x52,0xAF,0x8F,0x52,0xB0,0x91,0x52,0xB0,0x92,0x52,0xB0,0x93,0x52,0xB1,0x94,0x53,0xB1,0x95,0x53,0xB1,0x96,0x53,0xB3,0x97,0x53,0xB3,0x99,0x54,0xB3,0x99,0x54,0xB4,0x9A,0x55,0xB4,0x9C,0x55,0xB4,0x9D,0x55,0xB5,0x9E,0x55,0xB6,0x9F,0x56,0xB6,0x9F,0x56,0xB7,0xA0,0x56,0xB7,0xA2,0x57,0xB7,0xA2,0x57,0xB7,0xA4,0x57,0xB8,0xA5,0x58,0xB9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FF,0x19,0x00,0xFF,0x14,0x00,0xFF,0x0F,0x00,0xFF,0x0A,0x00,0xFF,0x06,0x00,0xFF,0x01,0x00,0xFF,0x00,0x01,0xFF,0x00,0x05,0xFF,0x00,0x09,0xFF,0x00,0x0E,0xFF,0x00,0x13,0xFF,0x00,0x18,0xFF,0x00,0x1E,0xFF,0x00,0x24,0xFF,0x00,0x2A,0xFF,0x00,0x30,0xFF,0x00,0x37,0xFF,0x00,0x3E,0xFF,0x00,0x45,0xFF,0x00,0x4D,0xFF,0x00,0x55,0xFF,0x00,0x5C,0xFF,0x00,0x64,0xFF,0x00,0x6C,0xFF,0x00,0x74,0xFF,0x00,0x7C,0xFF,0x00,0x84,0xFF,0x00,0x8D,0xFF,0x00,0x95,0xFF,0x00,0x9D,0xFF,0x00,0xA4,0xFF,0x00,0xAC,0xFF,0x00,0xB3,0xFF,0x00,0xBB,0xFF,0x00,0xC2,0xFF,0x00,0xC9,0xFF,0x00,0xD0,0xFF,0x00,0xD7,0xFF,0x00,0xDD,0xFF,0x00,0xE3,0xFF,0x00,0xE9,0xFF,0x00,0xED,0xFF,0x00,0xF2,0xFF,0x00,0xF6,0xFF,0x00,0xFB,0xFF,0x00,0xFE,0xFF,0x00,0xFF,0xFC,0x00,0xFF,0xF8,0x00,0xFF,0xF4,0x00,0xFF,0xF0,0x00,0xFF,0xEA,0x00,0xFF,0xE5,0x00,0xFF,0xDF,0x00,0xFF,0xD9,0x00,0xFF,0xD3,0x00,0xFF,0xCC,0x00,0xFF,0xC5,0x00,0xFF,0xBD,0x00,0xFF,0xB7,0x00,0xFF,0xAF,0x00,0xFF,0xA7,0x00,0xFF,0xA0,0x00,0xFF,0x97,0x00,0xFF,0x8F,0x00,0xFF,0x88,0x00,0xFF,0x80,0x00,0xFF,0x77,0x00,0xFF,0x6F,0x00,0xFF,0x68,0x00,0xFF,0x5F,0x00,0xFF,0x57,0x00,0xFF,0x50,0x00,0xFF,0x48,0x00,0xFF,0x41,0x00,0xFF,0x3A,0x00,0xFF,0x33,0x00,0xFF,0x2D,0x00,0xFF,0x26,0x00,0xFF,0x20,0x00,0xFF,0x1A,0x00,0xFF,0x15,0x00,0xFF,0x10,0x00,0xFF,0x0B,0x00,0xFF,0x07,0x00,0xFF,0x03,0x00,0xFF,0x00,0x04,0xFF,0x00,0x08,0xFF,0x00,0x0D,0xFF,0x00,0x11,0xFF,0x00,0x17,0xFF,0x00,0x1D,0xFF,0x00,0x23,0xFF,0x00,0x28,0xFF,0x00,0x2F,0xFF,0x00,0x36,0xFF,0x00,0x3D,0xFF,0x00,0x44,0xFF,0x00,0x4B,0xFF,0x00,0x53,0xFF,0x00,0x5A,0xFF,0x00,0x62,0xFF,0x00,0x6B,0xFF,0x00,0x72,0xFF,0x00,0x7B,0xFF,0x00,0x82,0xFF,0x00,0x8A,0xFF,0x00,0x92,0xFF,0x00,0x9A,0xFF,0x00,0xA3,0xFF,0x00,0xAA,0xFF,0x00,0xB1,0xFF,0x00,0xBA,0xFF,0x00,0xC1,0xFF,0x00,0xC8,0xFF,0x00,0xCF,0xFF,0x00,0xD5,0xFF,0x00,0xDB,0xFF,0x00,0xE1,0xFF,0x00,0xE7,0xFF,0x00,0xEC,0xFF,0x00,0xF1,0xFF,0x00,0xF6,0xFF,0x00,0xFA,0xFF,0x00,0xFE,0xFF,0x00,0xFF,0xFD,0x00,0xFF,0xF9,0x00,0xFF,0xF5,0x00,0xFF,0xF1,0x00,0xFF,0xEB,0x00,0xFF,0xE6,0x00,0xFF,0xE0,0x00,0xFF,0xDB,0x00,0xFF,0xD4,0x00,0xFF,0xCE,0x00,0xFF,0xC7,0x00,0xFF,0xBF,0x00,0xFF,0xB8,0x00,0xFF,0xB1,0x00,0xFF,0xA9,0x00,0xFF,0xA1,0x00,0xFF,0x99,0x00,0xFF,0x91,0x00,0xFF,0x89,0x00,0xFF,0x82,0x00,0xFF,0x79,0x00,0xFF,0x71,0x00,0xFF,0x6A,0x00,0xFF,0x61,0x00,0xFF,0x59,0x00,0xFF,0x52,0x00,0xFF,0x4A,0x00,0xFF,0x43,0x00,0xFF,0x3C,0x00,0xFF,0x34,0x00,0xFF,0x2E,0x00,0xFF,0x28,0x00,0xFF,0x22,0x00,0xFF,0x1B,0x00,0xFF,0x16,0x00,0xFF,0x10,0x00,0xFF,0x0C,0x00,0xFF,0x08,0x00,0xFF,0x04,0x00,0xFF,0x00,0x00,}; //200 Pixels
+#endif \ No newline at end of file
diff --git a/http.h b/includes/http.h
index 2ad7ccc..2ad7ccc 100755
--- a/http.h
+++ b/includes/http.h
diff --git a/icon.h b/includes/icon.h
index 89b2c7f..89b2c7f 100755
--- a/icon.h
+++ b/includes/icon.h
diff --git a/interface.h b/includes/interface.h
index 4afa7a2..7f13064 100644
--- a/interface.h
+++ b/includes/interface.h
@@ -159,7 +159,7 @@ int save_name_ui(pixel *vid_buf);
void menu_ui(pixel *vid_buf, int i, int *sl, int *sr);
-void menu_ui_v3(pixel *vid_buf, int i, int *sl, int *sr,int *psr,int b, int bq, int mx, int my);
+void menu_ui_v3(pixel *vid_buf, int i, int *sl, int *sr, int b, int bq, int mx, int my);
int sdl_poll(void);
diff --git a/md5.h b/includes/md5.h
index 2ae3ae8..2ae3ae8 100644
--- a/md5.h
+++ b/includes/md5.h
diff --git a/misc.h b/includes/misc.h
index 106d216..9a92a71 100644
--- a/misc.h
+++ b/includes/misc.h
@@ -3,7 +3,7 @@
#include <stdio.h>
#include <stdlib.h>
-#ifdef WIN32
+#if defined(WIN32) && !defined(__GNUC__)
#define x86_cpuid(func,af,bf,cf,df) \
do {\
__asm mov eax, func\
@@ -63,6 +63,8 @@ int load_string(FILE *f, char *str, int max);
void strcaturl(char *dst, char *src);
+void strappend(char *dst, char *src);
+
void *file_load(char *fn, int *size);
int cpu_check(void);
diff --git a/powder.h b/includes/powder.h
index af3d4ff..3b5e2f0 100644
--- a/powder.h
+++ b/includes/powder.h
@@ -49,7 +49,7 @@
#define PT_NITR 8
#define PT_CLNE 9
#define PT_GAS 10
-#define PT_C4 11
+#define PT_PLEX 11
#define PT_GOO 12
#define PT_ICEI 13
#define PT_METL 14
@@ -106,10 +106,15 @@
#define PT_THRM 65
#define PT_GLOW 66
#define PT_BRCK 67
-#define PT_FWRK 68
-#define PT_PWPO 69
-#define PT_PWNE 70
-#define PT_NUM 71
+#define PT_HFLM 68
+#define PT_FIRW 69
+#define PT_FUSE 70
+#define PT_FSEP 71
+#define PT_AMTR 72
+#define PT_BCOL 73
+#define PT_PCLN 74
+#define PT_HSWC 75
+#define PT_NUM 76
#define R_TEMP 22
#define MAX_TEMP 9999
@@ -140,7 +145,7 @@ struct particle
float temp;
float pavg[2];
int flags;
- int tmp;
+ int tmp;
};
typedef struct particle particle;
@@ -190,7 +195,7 @@ static const part_type ptypes[PT_NUM] =
{"", PIXPACK(0x000000), 0.0f, 0.00f * CFDS, 1.00f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, SC_SPECIAL, R_TEMP+0.0f +273.15f, 251, "Erases particles."},
{"DUST", PIXPACK(0xFFE0A0), 0.7f, 0.02f * CFDS, 0.96f, 0.80f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 1, 10, 0, 0, 30, 1, SC_POWDERS, R_TEMP+0.0f +273.15f, 70, "Very light dust. Flammable."},
{"WATR", PIXPACK(0x2030D0), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 0, 0, 0, 20, 1, SC_LIQUID, R_TEMP+-2.0f+273.15f, 29, "Liquid. Conducts electricity. Freezes. Extinguishes fires."},
- {"OIL", PIXPACK(0x404010), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 20, 0, 0, 5, 1, SC_LIQUID, R_TEMP+0.0f +273.15f, 42, "Liquid. Flammable. Solidifies under pressure"},
+ {"OIL", PIXPACK(0x404010), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 20, 0, 0, 5, 1, SC_LIQUID, R_TEMP+0.0f +273.15f, 42, "Liquid. Flammable."},
{"FIRE", PIXPACK(0xFF1000), 0.9f, 0.04f * CFDS, 0.97f, 0.20f, 0.0f, -0.1f, 0.00f, 0.001f * CFDS, 1, 0, 0, 0, 1, 1, SC_EXPLOSIVE, R_TEMP+400.0f+273.15f, 88, "Ignites flammable materials. Heats air."},
{"STNE", PIXPACK(0xA0A0A0), 0.4f, 0.04f * CFDS, 0.94f, 0.95f, -0.1f, 0.3f, 0.00f, 0.000f * CFDS, 1, 0, 0, 5, 1, 1, SC_POWDERS, R_TEMP+0.0f +273.15f, 150, "Heavy particles. Meltable."},
{"LAVA", PIXPACK(0xE05010), 0.3f, 0.02f * CFDS, 0.95f, 0.80f, 0.0f, 0.15f, 0.00f, 0.0003f * CFDS, 2, 0, 0, 0, 2, 1, SC_LIQUID, R_TEMP+1500.0f+273.15f, 60, "Heavy liquid. Ignites flammable materials. Solidifies when cold."},
@@ -200,10 +205,10 @@ static const part_type ptypes[PT_NUM] =
{"GAS", PIXPACK(0xE0FF20), 1.0f, 0.01f * CFDS, 0.99f, 0.30f, -0.1f, 0.0f, 0.75f, 0.001f * CFDS, 0, 600, 0, 0, 1, 1, SC_GAS, R_TEMP+2.0f +273.15f, 42, "Gas. Diffuses. Flammable. Liquifies under pressure."},
{"C-4", PIXPACK(0xD080E0), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 1000, 2, 50, 1, 1, SC_EXPLOSIVE, R_TEMP+0.0f +273.15f, 88, "Solid. Pressure sensitive explosive."},
{"GOO", PIXPACK(0x804000), 0.1f, 0.00f * CFDS, 0.97f, 0.50f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 12, 1, SC_SOLIDS, R_TEMP+0.0f +273.15f, 75, "Solid. Deforms and disappears under pressure."},
- {"ICE", PIXPACK(0xA0C0FF), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, -0.0003f* CFDS, 1, 0, 0, 0, 20, 1, SC_SOLIDS, R_TEMP+-50.0f+273.15f, 46, "Solid. Freezes water. Crushes under pressure. Cools down air."},
+ {"ICE", PIXPACK(0xA0C0FF), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, -0.0003f* CFDS, 0, 0, 0, 0, 20, 1, SC_SOLIDS, R_TEMP+-50.0f+273.15f, 46, "Solid. Freezes water. Crushes under pressure. Cools down air."},
{"METL", PIXPACK(0x404060), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Solid. Conducts electricity. Meltable."},
{"SPRK", PIXPACK(0xFFFF80), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.001f * CFDS, 0, 0, 0, 0, 1, 1, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Electricity. Conducted by metal and water."},
- {"SNOW", PIXPACK(0xC0E0FF), 0.7f, 0.01f * CFDS, 0.96f, 0.90f, -0.1f, 0.05f, 0.01f,-0.00005f * CFDS, 1, 0, 0, 0, 20, 1, SC_POWDERS, R_TEMP+-30.0f+273.15f, 46, "Light particles."},
+ {"SNOW", PIXPACK(0xC0E0FF), 0.7f, 0.01f * CFDS, 0.96f, 0.90f, -0.1f, 0.05f, 0.01f, -0.00005f* CFDS,1, 0, 0, 0, 20, 1, SC_POWDERS, R_TEMP+-30.0f+273.15f, 46, "Light particles."},
{"WOOD", PIXPACK(0xC0A040), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 20, 0, 0, 15, 1, SC_SOLIDS, R_TEMP+0.0f +273.15f, 164, "Solid. Flammable. Can be pressurised into COAL"},
{"NEUT", PIXPACK(0x20E0FF), 0.0f, 0.00f * CFDS, 1.00f, 1.00f, -0.99f, 0.0f, 0.01f, 0.002f * CFDS, 0, 0, 0, 0, 0, 1, SC_NUCLEAR, R_TEMP+4.0f +273.15f, 60, "Neutrons. Interact with matter in odd ways."},
{"PLUT", PIXPACK(0x407020), 0.4f, 0.01f * CFDS, 0.99f, 0.95f, 0.0f, 0.4f, 0.00f, 0.000f * CFDS, 1, 0, 0, 0, 0, 1, SC_NUCLEAR, R_TEMP+4.0f +273.15f, 251, "Heavy particles. Fissile. Generates neutrons under pressure."},
@@ -224,41 +229,46 @@ static const part_type ptypes[PT_NUM] =
{"MWAX", PIXPACK(0xE0E0AA), 0.3f, 0.02f * CFDS, 0.95f, 0.80f, 0.0f, 0.15f, 0.00f, 0.000001f* CFDS,2, 5, 0, 0, 2, 1, SC_LIQUID, R_TEMP+28.0f+273.15f, 44, "Liquid Wax."},
{"PSCN", PIXPACK(0x805050), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "P-Type Silicon, Will transfer current to any conductor."},
{"NSCN", PIXPACK(0x505080), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "N-Type Silicon, Will only transfer current to P-Type Silicon."},
- {"LN2", PIXPACK(0x80A0DF), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 0, 0, 0, 0, 1, SC_LIQUID, 70.15f, 70, "Liquid Nitrogen. Very cold."},
- {"INSL", PIXPACK(0x9EA3B6), 0.0f, 0.00f * CFDS, 0.95f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 7, 0, 0, 10, 1, SC_SPECIAL, R_TEMP+0.0f +273.15f, 0, "Insulator, does not conduct heat or electricity."},
+ {"LN2", PIXPACK(0x80A0DF), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 0, 0, 0, 0, 1, SC_LIQUID, 70.15f, 70, "Liquid Nitrogen. Very cold."},
+ {"INSL", PIXPACK(0x9EA3B6), 0.0f, 0.00f * CFDS, 0.95f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 7, 0, 0, 10, 1, SC_SPECIAL, R_TEMP+0.0f +273.15f, 0, "Insulator, does not conduct heat or electricity."},
{"BHOL", PIXPACK(0x202020), 0.0f, 0.00f * CFDS, 0.95f, 0.00f, 0.0f, 0.0f, 0.00f, -0.01f * CFDS, 0, 0, 0, 0, 0, 1, SC_SPECIAL, R_TEMP+70.0f+273.15f, 255, "Black hole, sucks in other particles and heats up."},
- {"WHOL", PIXPACK(0xEFEFEF), 0.0f, 0.00f * CFDS, 0.95f, 0.00f, 0.0f, 0.0f, 0.00f, 0.010f * CFDS, 0, 0, 0, 0, 0, 1, SC_SPECIAL, R_TEMP+-16.0f+273.15f, 255, "White hole, pushes other particles away."},
- {"RBDM", PIXPACK(0xCCCCCC), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 1000, 1, 50, 1, 1, SC_EXPLOSIVE, R_TEMP+0.0f +273.15f, 240, "Rubidium, explosive, especially on contact with water, low melting point"},
+ {"WHOL", PIXPACK(0xEFEFEF), 0.0f, 0.00f * CFDS, 0.95f, 0.00f, 0.0f, 0.0f, 0.00f, 0.010f * CFDS, 0, 0, 0, 0, 0, 1, SC_SPECIAL, R_TEMP-16.0f+273.15f, 255, "White hole, pushes other particles away."},
+ {"RBDM", PIXPACK(0xCCCCCC), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 1000, 1, 50, 1, 1, SC_EXPLOSIVE, R_TEMP+0.0f +273.15f, 240, "Rubidium, explosive, especially on contact with water, low melting point"},
{"LRBD", PIXPACK(0xAAAAAA), 0.3f, 0.02f * CFDS, 0.95f, 0.80f, 0.0f, 0.15f, 0.00f, 0.000001f* CFDS,2, 1000, 1, 0, 2, 1, SC_EXPLOSIVE, R_TEMP+45.0f+273.15f, 170, "Liquid Rubidium."},
{"NTCT", PIXPACK(0x505040), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Semi-conductor. Only conducts electricity when hot (More than 100C)"},
{"SAND", PIXPACK(0xFFD090), 0.4f, 0.04f * CFDS, 0.94f, 0.95f, -0.1f, 0.3f, 0.00f, 0.000f * CFDS, 1, 0, 0, 5, 1, 1, SC_POWDERS, R_TEMP+0.0f +273.15f, 150, "Sand, Heavy particles. Meltable."},
{"GLAS", PIXPACK(0x404040), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, SC_SOLIDS, R_TEMP+0.0f +273.15f, 150, "Solid. Meltable. Shatters under pressure"},
{"PTCT", PIXPACK(0x405050), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Semi-conductor. Only conducts electricity when cold (Less than 120C)"},
{"BGLA", PIXPACK(0x606060), 0.4f, 0.04f * CFDS, 0.94f, 0.95f, -0.1f, 0.3f, 0.00f, 0.000f * CFDS, 1, 0, 0, 5, 2, 1, SC_POWDERS, R_TEMP+0.0f +273.15f, 150, "Broken Glass, Heavy particles. Meltable. Bagels."},
- {"THDR", PIXPACK(0xFFFFA0), 0.0f, 0.00f * CFDS, 1.0f, 0.30f, -0.99f, 0.6f, 0.62f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, SC_ELEC, 9000.0f, 251, "Lightning! Very hot, inflicts damage upon most materials, transfers current to metals."},
- {"PLSM", PIXPACK(0xBB99FF), 0.9f, 0.04f * CFDS, 0.97f, 0.20f, 0.0f, -0.1f, 0.30f, 0.001f * CFDS, 0, 0, 0, 0, 0, 1, SC_GAS, 9000.0f, 115, "Plasma, extremely hot."},
+ {"THDR", PIXPACK(0xFFFFA0), 0.0f, 0.00f * CFDS, 1.0f, 0.30f, -0.99f, 0.6f, 0.62f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, SC_ELEC, 9000.0f +273.15f, 251, "Lightning! Very hot, inflicts damage upon most materials, transfers current to metals."},
+ {"PLSM", PIXPACK(0xBB99FF), 0.9f, 0.04f * CFDS, 0.97f, 0.20f, 0.0f, -0.1f, 0.30f, 0.001f * CFDS, 0, 0, 0, 0, 0, 1, SC_GAS, 9000.0f +273.15f, 115, "Plasma, extremely hot."},
{"ETRD", PIXPACK(0x404040), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Electrode. Creates a surface that allows Plasma arcs. (Use sparingly)"},
- {"NICE", PIXPACK(0xC0E0FF), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, -0.0005f* CFDS, 0, 0, 0, 0, 20, 1, SC_SOLIDS, 35.0f, 46, "Nitrogen Ice."},
+ {"NICE", PIXPACK(0xC0E0FF), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, -0.0005f* CFDS, 0, 0, 0, 0, 20, 1, SC_SOLIDS, 35.0f, 46, "Nitrogen Ice."},
{"NBLE", PIXPACK(0xEB4917), 1.0f, 0.01f * CFDS, 0.99f, 0.30f, -0.1f, 0.0f, 0.75f, 0.001f * CFDS, 0, 0, 0, 0, 1, 1, SC_GAS, R_TEMP+2.0f +273.15f, 106, "Noble Gas. Diffuses. Conductive. Ionizes into plasma when intruduced to electricity"},
{"BTRY", PIXPACK(0x858505), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Solid. Generates Electricity."},
{"LCRY", PIXPACK(0x505050), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Liquid Crystal. Changes colour when charged. (PSCN Charges, NSCN Discharges)"},
{"STKM", PIXPACK(0x000000), 0.5f, 0.00f * CFDS, 0.2f, 1.0f, 0.0f, 0.0f, 0.0f, 0.00f * CFDS, 0, 0, 0, 0, 0, 1, SC_SPECIAL, R_TEMP+14.6f+273.15f, 0, "Stickman. Don't kill him!"},
{"SWCH", PIXPACK(0x103B11), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Solid. Only conducts when switched on. (PSCN switches on, NSCN switches off)"},
- {"SMKE", PIXPACK(0x222222), 0.9f, 0.04f * CFDS, 0.97f, 0.20f, 0.0f, -0.1f, 0.00f, 0.001f * CFDS, 1, 0, 0, 0, 1, 1, SC_GAS, R_TEMP+400.0f+273.15f, 88, "Smoke"},
+ {"SMKE", PIXPACK(0x222222), 0.9f, 0.04f * CFDS, 0.97f, 0.20f, 0.0f, -0.1f, 0.00f, 0.001f * CFDS, 1, 0, 0, 0, 1, 1, SC_GAS, R_TEMP+320.0f+273.15f, 88, "Smoke"},
{"DESL", PIXPACK(0x440000), 1.0f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.0f, 0.0f * CFDS, 2, 2, 0, 0, 5, 1, SC_LIQUID, R_TEMP+0.0f +273.15f, 42, "Liquid. Vaporises under low pressure, explodes under high pressure and temperatures"},
- {"COAL", PIXPACK(0x222222), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.0f, 0.0f * CFDS, 0, 10, 0, 0, 20, 1, SC_SOLIDS, R_TEMP+0.0f +273.15f, 200, "Solid. Burns slowly."},
- {"LO2", PIXPACK(0x80A0EF), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 5000, 0, 0, 0, 1, SC_LIQUID, -80.0f, 70, "Liquid Oxygen. Very cold. Reacts with fire"},
- {"O2", PIXPACK(0x80A0FF), 2.0f, 0.00f * CFDS, 0.99f, 0.30f, -0.1f, 0.0f, 3.0f, 0.000f * CFDS, 0, 1000, 0, 0, 0, 1, SC_GAS, R_TEMP+0.0f +273.15f, 70, "Gas. Ignites easily."},
- {"INWR", PIXPACK(0x544141), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Insulated Wire. Doesn't conduct to metal or semiconductors."},
- {"YEST", PIXPACK(0xEEE0C0), 0.7f, 0.02f * CFDS, 0.96f, 0.80f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 1, 15, 0, 0, 30, 1, SC_POWDERS, R_TEMP+0.0f +273.15f, 70, "Yeast, grows when warm (~37C)."},
- {"DYST", PIXPACK(0xBBB0A0), 0.7f, 0.02f * CFDS, 0.96f, 0.80f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 1, 20, 0, 0, 30, 0, SC_POWDERS, R_TEMP+0.0f +273.15f, 70, "Deat Yeast."},
- {"THRM", PIXPACK(0xA08090), 0.4f, 0.04f * CFDS, 0.94f, 0.95f, -0.1f, 0.3f, 0.00f, 0.000f * CFDS, 1, 0, 0, 2, 2, 1, SC_POWDERS, R_TEMP+0.0f +273.15f, 211, "Thermite."},
- {"GLOW", PIXPACK(0x445544), 0.3f, 0.02f * CFDS, 0.95f, 0.80f, 0.0f, 0.15f, 0.00f, 0.000f * CFDS, 2, 0, 0, 0, 2, 1, SC_LIQUID, R_TEMP+20.0f+273.15f, 44, "Glow."},
- {"BRCK", PIXPACK(0x808080), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, SC_SOLIDS, R_TEMP+0.0f +273.15f, 251, "Brick, breakable building material."},
- {"FWRK", PIXPACK(0x666666), 0.4f, 0.01f * CFDS, 0.99f, 0.95f, 0.0f, 0.4f, 0.00f, 0.000f * CFDS, 1, 0, 0, 0, 0, 1, SC_EXPLOSIVE, R_TEMP+0.0f+273.15f, 100, "Fireworks!! Glows in fancy"},
- {"PWPO", PIXPACK(0x555080), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Pressure sensitive wire, turns on when high pressure"},
- {"PWNE", PIXPACK(0x585080), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Pressure sensitive wire, turns on when low pressure"},
- //Name Colour Advec Airdrag Airloss Loss Collid Grav Diffus Hotair Fal Burn Exp Mel Hrd M Section H Ins(real world, by triclops200) Description
+ {"COAL", PIXPACK(0x222222), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.0f, 0.0f * CFDS, 0, 0, 0, 0, 20, 1, SC_SOLIDS, R_TEMP+0.0f +273.15f, 200, "Solid. Burns slowly."},
+ {"LO2", PIXPACK(0x80A0EF), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 5000, 0, 0, 0, 1, SC_LIQUID, 80.0f, 70, "Liquid Oxygen. Very cold. Reacts with fire"},
+ {"O2", PIXPACK(0x80A0FF), 2.0f, 0.00f * CFDS, 0.99f, 0.30f, -0.1f, 0.0f, 3.0f, 0.000f * CFDS, 0, 1000, 0, 0, 0, 1, SC_GAS, R_TEMP+0.0f +273.15f, 70, "Gas. Ignites easily."},
+ {"INWR", PIXPACK(0x544141), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Insulated Wire. Doesn't conduct to metal or semiconductors."},
+ {"YEST", PIXPACK(0xEEE0C0), 0.7f, 0.02f * CFDS, 0.96f, 0.80f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 1, 15, 0, 0, 30, 1, SC_POWDERS, R_TEMP+0.0f +273.15f, 70, "Yeast, grows when warm (~37C)."},
+ {"DYST", PIXPACK(0xBBB0A0), 0.7f, 0.02f * CFDS, 0.96f, 0.80f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 1, 20, 0, 0, 30, 0, SC_POWDERS, R_TEMP+0.0f +273.15f, 70, "Deat Yeast."},
+ {"THRM", PIXPACK(0xA08090), 0.4f, 0.04f * CFDS, 0.94f, 0.95f, -0.1f, 0.3f, 0.00f, 0.000f * CFDS, 1, 0, 0, 2, 2, 1, SC_EXPLOSIVE, R_TEMP+0.0f +273.15f, 211, "Thermite. Burns at extremly high temperature."},
+ {"GLOW", PIXPACK(0x445544), 0.3f, 0.02f * CFDS, 0.95f, 0.80f, 0.0f, 0.15f, 0.00f, 0.000f * CFDS, 2, 0, 0, 0, 2, 1, SC_LIQUID, R_TEMP+20.0f+273.15f, 44, "Glow, Glows under pressure"},
+ {"BRCK", PIXPACK(0x808080), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, SC_SOLIDS, R_TEMP+0.0f +273.15f, 251, "Brick, breakable building material."},
+ {"CFLM", PIXPACK(0x8080FF), 0.9f, 0.04f * CFDS, 0.97f, 0.20f, 0.0f, -0.1f, 0.00f, 0.0005f * CFDS, 1, 0, 0, 0, 1, 1, SC_SPECIAL, 0.0f, 88, "Sub-zero flame."},
+ {"FIRW", PIXPACK(0xFFA040), 0.7f, 0.02f * CFDS, 0.96f, 0.80f, -0.99f, 0.1f, 0.00f, 0.000f * CFDS, 1, 0, 0, 0, 30, 1, SC_EXPLOSIVE, R_TEMP+0.0f +273.15f, 70, "Fireworks!"},
+ {"FUSE", PIXPACK(0x0A5706), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.0f, 0.0f * CFDS, 0, 0, 0, 0, 20, 1, SC_SOLIDS, R_TEMP+0.0f +273.15f, 200, "Solid. Burns slowly. Ignites at somewhat high temperatures and electricity."},
+ {"FSEP", PIXPACK(0x63AD5F), 0.7f, 0.02f * CFDS, 0.96f, 0.80f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 1, 0, 0, 0, 30, 1, SC_POWDERS, R_TEMP+0.0f +273.15f, 70, "Fuse Powder. See FUSE."},
+ {"AMTR", PIXPACK(0x808080), 0.7f, 0.02f * CFDS, 0.96f, 0.80f, 0.00f, 0.10f, 1.00f, 0.0000f * CFDS, 0, 0, 0, 0, 0, 1, SC_NUCLEAR, R_TEMP+0.0f +273.15f, 70, "Anti-Matter, Destroys a majority of particles"},
+ {"BCOL", PIXPACK(0x333333), 0.4f, 0.04f * CFDS, 0.94f, 0.95f, -0.1f, 0.3f, 0.00f, 0.000f * CFDS, 1, 0, 0, 5, 2, 1, SC_POWDERS, R_TEMP+0.0f +273.15f, 150, "Broken Coal. Heavy particles. See COAL"},
+ {"PCLN", PIXPACK(0x3B3B10), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Solid. When actived, duplicates any particles it touches."},
+ {"HSWC", PIXPACK(0x3B1010), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Heat switch. Conducts Heat only when activated"},
+ //Name Colour Advec Airdrag Airloss Loss Collid Grav Diffus Hotair Fal Burn Exp Mel Hrd M Section H Ins(real world, by triclops200) Description
};
static part_state pstates[PT_NUM] =
@@ -287,11 +297,11 @@ static part_state pstates[PT_NUM] =
/* PLNT */ {ST_SOLID, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_FIRE, 573.0f},
/* ACID */ {ST_LIQUID, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f},
/* VOID */ {ST_SOLID, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f},
- /* WTRV */ {ST_GAS, PT_NONE, 0.0f, PT_DSTW, 371.0f, PT_NONE, 0.0f, PT_NONE, 0.0f},
+ /* WTRV */ {ST_GAS, PT_ICEI, 273.0f, PT_DSTW, 371.0f, PT_NONE, 373.0f, PT_NONE, 0.0f},
/* CNCT */ {ST_SOLID, PT_NONE, 0.0f, PT_LAVA, 1123.0f, PT_NONE, 0.0f, PT_NONE, 0.0f},
/* DSTW */ {ST_LIQUID, PT_ICEI, 273.15f, PT_NONE, 0.0f, PT_WTRV, 373.0f, PT_NONE, 0.0f},
/* SALT */ {ST_SOLID, PT_NONE, 0.0f, PT_LAVA, 1173.0f, PT_NONE, 0.0f, PT_NONE, 0.0f},
- /* SLTW */ {ST_LIQUID, PT_ICEI, 233.0f, PT_NONE, 0.0f, PT_WTRV, 383.0f, PT_NONE, 0.0f},
+ /* SLTW */ {ST_LIQUID, PT_ICEI, 233.0f, PT_NONE, 0.0f, PT_WTRV, 483.0f, PT_NONE, 0.0f},
/* DMND */ {ST_SOLID, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f},
/* BMTL */ {ST_SOLID, PT_NONE, 0.0f, PT_LAVA, 1273.0f, PT_NONE, 0.0f, PT_NONE, 0.0f},
/* BRMT */ {ST_SOLID, PT_NONE, 0.0f, PT_LAVA, 1273.0f, PT_NONE, 0.0f, PT_NONE, 0.0f},
@@ -321,106 +331,117 @@ static part_state pstates[PT_NUM] =
/* LCRY */ {ST_SOLID, PT_NONE, 0.0f, PT_BGLA, 1273.0f, PT_NONE, 0.0f, PT_NONE, 0.0f},
/* STKM */ {ST_NONE, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_FIRE, 620.0f},
/* SWCH */ {ST_SOLID, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f},
- /* SMKE */ {ST_SOLID, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f},
+ /* SMKE */ {ST_SOLID, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_FIRE, 625.0f},
/* DESL */ {ST_LIQUID, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_FIRE, 335.0f},
/* COAL */ {ST_SOLID, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f},
- /* LO2 */ {ST_LIQUID, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_O2, 90.1f, PT_NONE, 0.0f},
+ /* LO2 */ {ST_LIQUID, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_O2, 90.1f, PT_NONE, 0.0f},
/* O2 */ {ST_GAS, PT_NONE, 0.0f, PT_LO2, 90.0f, PT_NONE, 0.0f, PT_NONE, 0.0f},
- /* INWR */ {ST_SOLID, PT_NONE, 0.0f, PT_LAVA, 1687.0f, PT_NONE, 0.0f, PT_NONE, 0.0f},
- /* YEST */ {ST_SOLID, PT_NONE, 0.0f, PT_DYST, 353.0f, PT_NONE, 0.0f, PT_NONE, 0.0f},
- /* DYST */ {ST_SOLID, PT_NONE, 0.0f, PT_DUST, 473.0f, PT_NONE, 0.0f, PT_NONE, 0.0f},
- /* THRM */ {ST_SOLID, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f},
- /* GLOW */ {ST_LIQUID, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f},
+ /* INWR */ {ST_SOLID, PT_NONE, 0.0f, PT_LAVA, 1687.0f, PT_NONE, 0.0f, PT_NONE, 0.0f},
+ /* YEST */ {ST_SOLID, PT_NONE, 0.0f, PT_DYST, 373.0f, PT_NONE, 0.0f, PT_NONE, 0.0f},
+ /* DYST */ {ST_SOLID, PT_NONE, 0.0f, PT_DUST, 473.0f, PT_NONE, 0.0f, PT_NONE, 0.0f},
+ /* THRM */ {ST_SOLID, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f},
+ /* GLOW */ {ST_LIQUID, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f},
/* BRCK */ {ST_SOLID, PT_NONE, 0.0f, PT_LAVA, 1223.0f, PT_NONE, 0.0f, PT_NONE, 0.0f},
- /* FWRK */ {ST_SOLID, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f},
- /* PWPO */ {ST_SOLID, PT_NONE, 0.0f, PT_LAVA, 1687.0f, PT_NONE, 0.0f, PT_NONE, 0.0f},
- /* PWNE */ {ST_SOLID, PT_NONE, 0.0f, PT_LAVA, 1687.0f, PT_NONE, 0.0f, PT_NONE, 0.0f},
+ /* HFLM */ {ST_GAS, PT_NONE, 0.0f, PT_NONE,0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f},
+ /* FIRW */ {ST_SOLID, PT_NONE, 0.0f, PT_NONE,0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f},
+ /* FUSE */ {ST_SOLID, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f},
+ /* FSEP */ {ST_SOLID, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f},
+ /* AMtr */ {ST_NONE, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f},
+ /* BCOL */ {ST_SOLID, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f},
+ /* PCLN */ {ST_NONE, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f},
+ /* HSWC */ {ST_NONE, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f},
};
+
static unsigned char can_move[PT_NUM][PT_NUM] =
{
- /* A B */
- /* A 0 1 | B ligher than A */
- /* B 1 0 | A heavier than B */
-
-/* N D W O F M L G N C G C G I W S S W N P P A V W C D S S D B B P U W M P N L I B W R L H S G C B T P E N N B L S S S D C L O I Y D T G B F P P*/
-/* o u a i i e a u i l a 4 o c i p n o e l l c o t n s a l m m r h r a W S S N n H H b R S a l s G h l t i B t C T W M e o O 2 N E Y H L R W W W*/
-/* n s t l r t v n t n s o e r r o o u u n i i r c t l t n t m o a x a c c 2 s o o d b C n a c l d s r c L r r K C K s a 2 W S S R O C R P N*/
-/* e t r l e l a p r e s i e k w d t t t d d v t w t w d l t t n x n n u l l m d N d s n a r m d e E y y M H E l l R T T M W K K O E*/
-/* NONE */ {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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N L I B W R L H S G C B T P E N N B L S S S D C L O I Y D T G B F P P*/
-/* o u a i i e a u i l a 4 o c i p n o e l l c o t n s a l m m r h r a W S S N n H H b R S a l s G h l t i B t C T W M e o O 2 N E Y H L R W W W*/
-/* n s t l r t v n t n s o e r r o o u u n i i r c t l t n t m o a x a c c 2 s o o d b C n a c l d s r c L r r K C K s a 2 W S S R O C R P N*/
-/* e t r l e l a p r e s i e k w d t t t d d v t w t w d l t t n x n n u l l m d N d s n a r m d e E y y M H E l l R T T M W K K O E*/
+ /* Water | Oil */
+ /* Water 0 | 1 | Water displaces oil */
+ /* Oil 0 | 0 | Oil doesn't displace water */
+
+ /* N D W O F S L G N C G P D I M S S W N P P A V W C D S S D B B P U W M P N L I B W R L H S G C B T P E N N B L S S S D C L O I Y D T G B H F F F A B P H */
+ /* o u a i i t a u i l a l f c e p n o e l l c o t n s a l m m r h r a W S S N N H H b R S a l s G h l t i B t C T W M e o O 2 N E Y H L R F I U S M C C S */
+ /* n s t l r n v n t n s e r e t r o o u u n i i r c t l t n t m o a x a c c 2 S o o d b C n a c l d s r c L r r K C K s a X W S S R O C L R S E T O L W */
+ /* e t r l e e a p r e s x m i l k w d t t t d d v t w t w d l t t n x n n U l l m d N d s n a r m d e E y y M H E l l R T T M W K M W E P R L N C */
+ /* NONE */ {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, /* None */
+ /* DUST */ {0,0,1,1,1,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0}, /* Dust */
+ /* WATR */ {0,0,0,1,1,0,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0}, /* BCOL */
+ /* PCLN */ {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, /* PCLN */
+ /* HSWC */ {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, /* HSWC */
+ /* N D W O F S L G N C G P D I M S S W N P P A V W C D S S D B B P U W M P N L I B W R L H S G C B T P E N N B L S S S D C L O I Y D T G B H F F F A B P H */
+ /* o u a i i t a u i l a l f c e p n o e l l c o t n s a l m m r h r a W S S N N H H b R S a l s G h l t i B t C T W M e o O 2 N E Y H L R F I U S M C C S */
+ /* n s t l r n v n t n s e r e t r o o u u n i i r c t l t n t m o a x a c c 2 S o o d b C n a c l d s r c L r r K C K s a X W S S R O C L R S E T O L W */
+ /* e t r l e e a p r e s x m i l k w d t t t d d v t w t w d l t t n x n n U l l m d N d s n a r m d e E y y M H E l l R T T M W K M W E P R L N C */
};
extern int isplayer;
diff --git a/update.h b/includes/update.h
index 6398d4d..6398d4d 100755
--- a/update.h
+++ b/includes/update.h
diff --git a/version.h b/includes/version.h
index 41e9672..41e9672 100755
--- a/version.h
+++ b/includes/version.h
diff --git a/script.sh b/script.sh
new file mode 100755
index 0000000..682a4ae
--- /dev/null
+++ b/script.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+git pull
+make powder-64-sse3
+make powder-64-sse2
+make powder-sse3
+make powder-debug
+make powder-sse2
+make powder
+make powder-sse
+tar czf PowderToyGit.tar.gz ./
+
diff --git a/Resources/Font-Data b/src/Resources/Font-Data
index a384152..a384152 100644
--- a/Resources/Font-Data
+++ b/src/Resources/Font-Data
Binary files differ
diff --git a/Resources/Font-Pointers b/src/Resources/Font-Pointers
index 621258b..621258b 100644
--- a/Resources/Font-Pointers
+++ b/src/Resources/Font-Pointers
Binary files differ
diff --git a/Resources/Icon-16.png b/src/Resources/Icon-16.png
index 5e1e1fb..5e1e1fb 100755
--- a/Resources/Icon-16.png
+++ b/src/Resources/Icon-16.png
Binary files differ
diff --git a/Resources/Icon-32.png b/src/Resources/Icon-32.png
index 1f056bd..1f056bd 100755
--- a/Resources/Icon-32.png
+++ b/src/Resources/Icon-32.png
Binary files differ
diff --git a/Resources/powder-res.rc b/src/Resources/powder-res.rc
index 569b629..569b629 100644
--- a/Resources/powder-res.rc
+++ b/src/Resources/powder-res.rc
diff --git a/Resources/powder.icns b/src/Resources/powder.icns
index 56df7eb..56df7eb 100755
--- a/Resources/powder.icns
+++ b/src/Resources/powder.icns
Binary files differ
diff --git a/Resources/powder.ico b/src/Resources/powder.ico
index cd3f6e0..cd3f6e0 100755
--- a/Resources/powder.ico
+++ b/src/Resources/powder.ico
Binary files differ
diff --git a/air.c b/src/air.c
index 9415bbf..dd98a12 100644
--- a/air.c
+++ b/src/air.c
@@ -1,7 +1,7 @@
#include <math.h>
-#include "air.h"
-#include "powder.h"
-#include "defines.h"
+#include <air.h>
+#include <powder.h>
+#include <defines.h>
float kernel[9];
float vx[YRES/CELL][XRES/CELL], ovx[YRES/CELL][XRES/CELL];
@@ -54,15 +54,15 @@ void update_air(void)
vy[y][x] *= VLOSS;
vx[y][x] += dx*TSTEPV;
vy[y][x] += dy*TSTEPV;
- if(bmap[y][x]==11 || bmap[y][x+1]==11 ||
- bmap[y][x]==2 || bmap[y][x+1]==2 ||
- (bmap[y][x]==3 && !emap[y][x]) ||
- (bmap[y][x+1]==3 && !emap[y][x+1]))
+ if(bmap[y][x]==1 || bmap[y][x+1]==1 ||
+ bmap[y][x]==8 || bmap[y][x+1]==8 ||
+ (bmap[y][x]==7 && !emap[y][x]) ||
+ (bmap[y][x+1]==7 && !emap[y][x+1]))
vx[y][x] = 0;
- if(bmap[y][x]==11 || bmap[y+1][x]==11 ||
- bmap[y][x]==2 || bmap[y+1][x]==2 ||
- (bmap[y][x]==3 && !emap[y][x]) ||
- (bmap[y+1][x]==3 && !emap[y+1][x]))
+ if(bmap[y][x]==1 || bmap[y+1][x]==1 ||
+ bmap[y][x]==8 || bmap[y+1][x]==8 ||
+ (bmap[y][x]==7 && !emap[y][x]) ||
+ (bmap[y+1][x]==7 && !emap[y+1][x]))
vy[y][x] = 0;
}
@@ -76,9 +76,9 @@ void update_air(void)
for(i=-1; i<2; i++)
if(y+j>0 && y+j<YRES/CELL-1 &&
x+i>0 && x+i<XRES/CELL-1 &&
- bmap[y+j][x+i]!=11 &&
- bmap[y+j][x+i]!=2 &&
- (bmap[y+j][x+i]!=8 || emap[y+j][x+i]))
+ bmap[y+j][x+i]!=1 &&
+ bmap[y+j][x+i]!=8 &&
+ (bmap[y+j][x+i]!=7 || emap[y+j][x+i]))
{
f = kernel[i+1+(j+1)*3];
dx += vx[y+j][x+i]*f;
@@ -118,7 +118,7 @@ void update_air(void)
dy += VADV*tx*ty*vy[j+1][i+1];
}
- if(bmap[y][x] == 7)
+ if(bmap[y][x] == 4)
{
dx += fvx[y][x];
dy += fvy[y][x];
@@ -138,4 +138,4 @@ void update_air(void)
memcpy(vx, ovx, sizeof(vx));
memcpy(vy, ovy, sizeof(vy));
memcpy(pv, opv, sizeof(pv));
-} \ No newline at end of file
+}
diff --git a/graphics.c b/src/graphics.c
index f52f504..2c9a686 100644
--- a/graphics.c
+++ b/src/graphics.c
@@ -12,12 +12,13 @@
#endif
#endif
-#include "defines.h"
-#include "air.h"
-#include "powder.h"
-#include "graphics.h"
-#include "font.h"
-#include "misc.h"
+#include <defines.h>
+#include <air.h>
+#include <powder.h>
+#include <graphics.h>
+#define INCLUDE_FONTDATA
+#include <font.h>
+#include <misc.h>
unsigned cmode = 3;
@@ -117,7 +118,7 @@ void sdl_blit_2(int x, int y, int w, int h, pixel *src, int pitch)
void sdl_blit(int x, int y, int w, int h, pixel *src, int pitch)
{
#ifdef OpenGL
- RenderScene();
+ RenderScene();
#else
if(sdl_scale == 2)
sdl_blit_2(x, y, w, h, src, pitch);
@@ -708,7 +709,7 @@ int draw_tool_xy(pixel *vid_buf, int x, int y, int b, unsigned pc)
//x = 2+32*(b/2);
//y = YRES+2+20*(b%2);
#ifdef OpenGL
- fillrect(vid_buf, x, y, 28, 16, PIXR(pc), PIXG(pc), PIXB(pc), 255);
+ fillrect(vid_buf, x, y, 28, 16, PIXR(pc), PIXG(pc), PIXB(pc), 255);
#else
for(j=1; j<15; j++)
{
@@ -744,11 +745,7 @@ int draw_tool_xy(pixel *vid_buf, int x, int y, int b, unsigned pc)
void draw_menu(pixel *vid_buf, int i, int hover)
{
- if(i==SEC&&SEC!=0)
- drawrect(vid_buf, XRES-2, (i*16)+YRES+MENUSIZE-16-(SC_TOTAL*16), 14, 14, 0, 255, 255, 255);
- else
- drawrect(vid_buf, XRES-2, (i*16)+YRES+MENUSIZE-16-(SC_TOTAL*16), 14, 14, 255, 255, 255, 255);
-
+ drawrect(vid_buf, XRES-2, (i*16)+YRES+MENUSIZE-16-(SC_TOTAL*16), 14, 14, 255, 255, 255, 255);
if(hover==i)
{
fillrect(vid_buf, XRES-2, (i*16)+YRES+MENUSIZE-16-(SC_TOTAL*16), 14, 14, 255, 255, 255, 255);
@@ -851,13 +848,13 @@ int drawtext(pixel *vid, int x, int y, const char *s, int r, int g, int b, int a
void drawrect(pixel *vid, int x, int y, int w, int h, int r, int g, int b, int a)
{
#ifdef OpenGL
- glBegin(GL_LINE_LOOP);
- glColor4ub(r, g, b, a);
- glVertex2i(x, y);
- glVertex2i(x+w, y);
- glVertex2i(x+w, y+h);
- glVertex2i(x, y+h);
- glEnd();
+ glBegin(GL_LINE_LOOP);
+ glColor4ub(r, g, b, a);
+ glVertex2i(x, y);
+ glVertex2i(x+w, y);
+ glVertex2i(x+w, y+h);
+ glVertex2i(x, y+h);
+ glEnd();
#else
int i;
for(i=0; i<=w; i++)
@@ -876,13 +873,13 @@ void drawrect(pixel *vid, int x, int y, int w, int h, int r, int g, int b, int a
void fillrect(pixel *vid, int x, int y, int w, int h, int r, int g, int b, int a)
{
#ifdef OpenGL
- glBegin(GL_QUADS);
- glColor4ub(r, g, b, a);
- glVertex2i(x, y);
- glVertex2i(x+w, y);
- glVertex2i(x+w, y+h);
- glVertex2i(x, y+h);
- glEnd();
+ glBegin(GL_QUADS);
+ glColor4ub(r, g, b, a);
+ glVertex2i(x, y);
+ glVertex2i(x+w, y);
+ glVertex2i(x+w, y+h);
+ glVertex2i(x, y+h);
+ glEnd();
#else
int i,j;
for(j=1; j<h; j++)
@@ -900,12 +897,12 @@ void clearrect(pixel *vid, int x, int y, int w, int h)
void drawdots(pixel *vid, int x, int y, int h, int r, int g, int b, int a)
{
#ifdef OpenGL
- int i;
+ int i;
glBegin(GL_QUADS);
- glColor4ub(r, g, b, a);
- for(i = 0; i <= h; i +=2)
+ glColor4ub(r, g, b, a);
+ for(i = 0; i <= h; i +=2)
glVertex2i(x, y+i);
- glEnd();
+ glEnd();
#else
int i;
for(i=0; i<=h; i+=2)
@@ -975,7 +972,7 @@ inline void blendpixel(pixel *vid, int x, int y, int r, int g, int b, int a)
return;
if(a!=255)
{
- glBegin (GL_QUADS);
+ glBegin (GL_QUADS);
glColor4ub(r,g,b,a);
glVertex2i(x, y);
}
@@ -1173,12 +1170,12 @@ void xor_rect(pixel *vid, int x, int y, int w, int h)
}
void draw_parts(pixel *vid)
-{
- int i, x, y, t, nx, ny, r, s;
- int cr, cg, cb;
- float fr, fg, fb;
+{
+ int i, x, y, t, nx, ny, r, s;
+ int cr, cg, cb;
+ float fr, fg, fb;
float pt = R_TEMP;
- for(i = 0; i<NPART; i++){
+ for(i = 0; i<NPART; i++) {
#ifdef OpenGL
if(cmode == 6) //If fire mode
{
@@ -1189,18 +1186,18 @@ void draw_parts(pixel *vid)
{
for(y=-1; y<=1; y++)
{
- if ((abs(x) == 0) && (abs(y) == 0))
+ if ((abs(x) == 0) && (abs(y) == 0))
blendpixel(vid,x+nx,y+ny,224,224,170,255);
else if (abs(y) != 0 && abs(x) != 0)
blendpixel(vid,x+nx,y+ny,224,224,170,20);
else
blendpixel(vid,x+nx,y+ny,224,224,170,40);
- }
+ }
}
}
- else if(t==PT_PLUT)
+ else if(t==PT_PLUT)
{
int tempx;
int tempy;
@@ -1212,7 +1209,7 @@ void draw_parts(pixel *vid)
blendpixel(vid, nx-1, ny, cr, cg, cb, 96);
blendpixel(vid, nx, ny+1, cr, cg, cb, 96);
blendpixel(vid, nx, ny-1, cr, cg, cb, 96);
- for(tempx = 2; tempx < 10; tempx++) {
+ for(tempx = 2; tempx < 10; tempx++) {
for(tempy = 2; tempy < 10; tempy++) {
blendpixel(vid, nx+tempx, ny-tempy, cr, cg, cb, 5);
blendpixel(vid, nx-tempx, ny+tempy, cr, cg, cb, 5);
@@ -1220,23 +1217,23 @@ void draw_parts(pixel *vid)
blendpixel(vid, nx-tempx, ny-tempy, cr, cg, cb, 5);
}
}
- }
+ }
}
- if(parts[i].type){
- //Do nothing
- t = parts[i].type;
- nx = (int)(parts[i].x+0.5f);
+ if(parts[i].type) {
+ //Do nothing
+ t = parts[i].type;
+ nx = (int)(parts[i].x+0.5f);
ny = (int)(parts[i].y+0.5f);
- glBegin (GL_POINTS);
- glColor3ub (PIXR(ptypes[t].pcolors), PIXG(ptypes[t].pcolors), PIXB(ptypes[t].pcolors));
- glVertex2d (nx, ny);
- glEnd ();
- }
+ glBegin (GL_POINTS);
+ glColor3ub (PIXR(ptypes[t].pcolors), PIXG(ptypes[t].pcolors), PIXB(ptypes[t].pcolors));
+ glVertex2d (nx, ny);
+ glEnd ();
+ }
#else
- if(parts[i].type){
- t = parts[i].type;
+ if(parts[i].type) {
+ t = parts[i].type;
- nx = (int)(parts[i].x+0.5f);
+ nx = (int)(parts[i].x+0.5f);
ny = (int)(parts[i].y+0.5f);
if(cmode!=CM_HEAT)
@@ -1291,20 +1288,20 @@ void draw_parts(pixel *vid)
cr = PIXR(ptypes[t].pcolors)/s;
cg = PIXG(ptypes[t].pcolors)/s;
cb = PIXB(ptypes[t].pcolors)/s;
- if(cmode==6){
- for(x=-1; x<=1; x++)
- {
- for(y=-1; y<=1; y++)
- {
- if ((abs(x) == 0) && (abs(y) == 0))
- blendpixel(vid,x+nx,y+ny,cr,cg,cb,100);
- else if (abs(y) != 0 || abs(x) != 0)
- blendpixel(vid,x+nx,y+ny,cr,cg,cb,40);
- }
- }
- } else {
- blendpixel(vid, nx, ny, cr, cg, cb, 255);
- }
+ if(cmode==6) {
+ for(x=-1; x<=1; x++)
+ {
+ for(y=-1; y<=1; y++)
+ {
+ if ((abs(x) == 0) && (abs(y) == 0))
+ blendpixel(vid,x+nx,y+ny,cr,cg,cb,100);
+ else if (abs(y) != 0 || abs(x) != 0)
+ blendpixel(vid,x+nx,y+ny,cr,cg,cb,40);
+ }
+ }
+ } else {
+ blendpixel(vid, nx, ny, cr, cg, cb, 255);
+ }
if(cmode==4)
{
@@ -1420,10 +1417,23 @@ void draw_parts(pixel *vid)
{
if(cmode == 3||cmode==4 || cmode==6)
{
- vid[ny*(XRES+BARSIZE)+nx] = ptypes[t].pcolors;
- cg = 12;
- cb = 12;
- cr = 12;
+ cg = 0;
+ cb = 0;
+ cr = 0;
+ for(x=0; x<12; x++) {
+ cr += (parts[i].ctype >> (x+18)) & 1;
+ cb += (parts[i].ctype >> x) & 1;
+ }
+ for(x=0; x<14; x++)
+ cg += (parts[i].ctype >> (x+9)) & 1;
+ x = 624/(cr+cg+cb+1);
+ cr *= x;
+ cg *= x;
+ cb *= x;
+ vid[ny*(XRES+BARSIZE)+nx] = PIXRGB(cr>255?255:cr,cg>255?255:cg,cb>255?255:cb);
+ cr >>= 4;
+ cg >>= 4;
+ cb >>= 4;
x = nx/CELL;
y = ny/CELL;
cg += fire_g[y][x];
@@ -1458,52 +1468,6 @@ void draw_parts(pixel *vid)
y = ny;
blendpixel(vid,x,y,17,217,24,255);
}
- else if((t==PT_FWRK && parts[i].life >= 1)&&(cmode == 3||cmode==4 || cmode==6))
- {
- x = nx;
- y = ny;
- vid[ny*(XRES+BARSIZE)+nx] = ptypes[t].pcolors;
- cg = 10;
- cb = 10;
- cr = 10;
- x = nx/CELL;
- y = ny/CELL;
- cg += fire_g[y][x];
- if(cg > 255) cg = 255;
- fire_g[y][x] = cg;
- cb += fire_b[y][x];
- if(cb > 255) cb = 255;
- fire_b[y][x] = cb;
- cr += fire_r[y][x];
- if(cr > 255) cr = 255;
- fire_r[y][x] = cr;
- }
-
- else if(t==PT_DUST && parts[i].life >= 1)
- {
- x = nx;
- y = ny;
- if(cmode == 3||cmode==4 || cmode==6)
- {
- vid[ny*(XRES+BARSIZE)+nx] = PIXRGB(parts[i].tmp,parts[i].ctype,parts[i].flags);
- cg = parts[i].tmp/4;
- cb = parts[i].ctype/4;
- cr = parts[i].flags/4;
- x = nx/CELL;
- y = ny/CELL;
- cg += fire_g[y][x];
- if(cg > 255) cg = 255;
- fire_g[y][x] = cg;
- cb += fire_b[y][x];
- if(cb > 255) cb = 255;
- fire_b[y][x] = cb;
- cr += fire_r[y][x];
- if(cr > 255) cr = 255;
- fire_r[y][x] = cr;
- }
- else
- blendpixel(vid,x,y,parts[i].tmp,parts[i].ctype,parts[i].flags,255);
- }
else if(t==PT_LNTG&&cmode == 6)
{
for(x=-1; x<=1; x++)
@@ -1710,17 +1674,17 @@ void draw_parts(pixel *vid)
blendpixel(vid, nx-1, ny-1, cr, cg, cb, 32);
}
}
- else if(t==PT_GLOW)
+ else if(t==PT_GLOW)
{
- fg = 0;
- fb = 0;
- fr = 0;
- if(pv[ny/CELL][nx/CELL]>0){
- fg = 6 * pv[ny/CELL][nx/CELL];
- fb = 4 * pv[ny/CELL][nx/CELL];
- fr = 2 * pv[ny/CELL][nx/CELL];
- }
- vid[ny*(XRES+BARSIZE)+nx] = PIXRGB((int)restrict_flt(0x44 + fr*8, 0, 255), (int)restrict_flt(0x88 + fg*8, 0, 255), (int)restrict_flt(0x44 + fb*8, 0, 255));
+ fg = 0;
+ fb = 0;
+ fr = 0;
+ if(pv[ny/CELL][nx/CELL]>0) {
+ fg = 6 * pv[ny/CELL][nx/CELL];
+ fb = 4 * pv[ny/CELL][nx/CELL];
+ fr = 2 * pv[ny/CELL][nx/CELL];
+ }
+ vid[ny*(XRES+BARSIZE)+nx] = PIXRGB((int)restrict_flt(0x44 + fr*8, 0, 255), (int)restrict_flt(0x88 + fg*8, 0, 255), (int)restrict_flt(0x44 + fb*8, 0, 255));
if(cmode == 3||cmode==4 || cmode==6)
{
x = nx/CELL;
@@ -1735,38 +1699,71 @@ void draw_parts(pixel *vid)
if(fr > 255) fr = 255;
fire_r[y][x] = fr;
}
- if(cmode == 4){
- uint8 R = (int)restrict_flt(0x44 + fr*8, 0, 255);
- uint8 G = (int)restrict_flt(0x88 + fg*8, 0, 255);
- uint8 B = (int)restrict_flt(0x44 + fb*8, 0, 255);
-
- blendpixel(vid, nx+1, ny, R, G, B, 223);
- blendpixel(vid, nx-1, ny, R, G, B, 223);
- blendpixel(vid, nx, ny+1, R, G, B, 223);
- blendpixel(vid, nx, ny-1, R, G, B, 223);
-
- blendpixel(vid, nx+1, ny-1, R, G, B, 112);
- blendpixel(vid, nx-1, ny-1, R, G, B, 112);
- blendpixel(vid, nx+1, ny+1, R, G, B, 112);
- blendpixel(vid, nx-1, ny+1, R, G, B, 112);
- }
+ if(cmode == 4) {
+ uint8 R = (int)restrict_flt(0x44 + fr*8, 0, 255);
+ uint8 G = (int)restrict_flt(0x88 + fg*8, 0, 255);
+ uint8 B = (int)restrict_flt(0x44 + fb*8, 0, 255);
+
+ blendpixel(vid, nx+1, ny, R, G, B, 223);
+ blendpixel(vid, nx-1, ny, R, G, B, 223);
+ blendpixel(vid, nx, ny+1, R, G, B, 223);
+ blendpixel(vid, nx, ny-1, R, G, B, 223);
+
+ blendpixel(vid, nx+1, ny-1, R, G, B, 112);
+ blendpixel(vid, nx-1, ny-1, R, G, B, 112);
+ blendpixel(vid, nx+1, ny+1, R, G, B, 112);
+ blendpixel(vid, nx-1, ny+1, R, G, B, 112);
+ }
}
else if(t==PT_LCRY)
{
- uint8 GR = 0x50+(parts[i].life*10);
- vid[ny*(XRES+BARSIZE)+nx] = PIXRGB(GR, GR, GR);
- if(cmode == 4){
- blendpixel(vid, nx+1, ny, GR, GR, GR, 223);
- blendpixel(vid, nx-1, ny, GR, GR, GR, 223);
- blendpixel(vid, nx, ny+1, GR, GR, GR, 223);
- blendpixel(vid, nx, ny-1, GR, GR, GR, 223);
-
- blendpixel(vid, nx+1, ny-1, GR, GR, GR, 112);
- blendpixel(vid, nx-1, ny-1, GR, GR, GR, 112);
- blendpixel(vid, nx+1, ny+1, GR, GR, GR, 112);
- blendpixel(vid, nx-1, ny+1, GR, GR, GR, 112);
- }
- } else if(t==PT_PLSM)
+ uint8 GR = 0x50+(parts[i].life*10);
+ vid[ny*(XRES+BARSIZE)+nx] = PIXRGB(GR, GR, GR);
+ if(cmode == 4) {
+ blendpixel(vid, nx+1, ny, GR, GR, GR, 223);
+ blendpixel(vid, nx-1, ny, GR, GR, GR, 223);
+ blendpixel(vid, nx, ny+1, GR, GR, GR, 223);
+ blendpixel(vid, nx, ny-1, GR, GR, GR, 223);
+
+ blendpixel(vid, nx+1, ny-1, GR, GR, GR, 112);
+ blendpixel(vid, nx-1, ny-1, GR, GR, GR, 112);
+ blendpixel(vid, nx+1, ny+1, GR, GR, GR, 112);
+ blendpixel(vid, nx-1, ny+1, GR, GR, GR, 112);
+ }
+ }
+ else if(t==PT_PCLN)
+ {
+ uint8 GR = 0x3B+(parts[i].life*19);
+ vid[ny*(XRES+BARSIZE)+nx] = PIXRGB(GR, GR, 10);
+ if(cmode == 4) {
+ blendpixel(vid, nx+1, ny, GR, GR, 10, 223);
+ blendpixel(vid, nx-1, ny, GR, GR, 10, 223);
+ blendpixel(vid, nx, ny+1, GR, GR, 10, 223);
+ blendpixel(vid, nx, ny-1, GR, GR, 10, 223);
+
+ blendpixel(vid, nx+1, ny-1, GR, GR, 10, 112);
+ blendpixel(vid, nx-1, ny-1, GR, GR, 10, 112);
+ blendpixel(vid, nx+1, ny+1, GR, GR, 10, 112);
+ blendpixel(vid, nx-1, ny+1, GR, GR, 10, 112);
+ }
+ }
+ else if(t==PT_HSWC)
+ {
+ uint8 GR = 0x3B+(parts[i].life*19);
+ vid[ny*(XRES+BARSIZE)+nx] = PIXRGB(GR, 10, 10);
+ if(cmode == 4) {
+ blendpixel(vid, nx+1, ny, GR, 10, 10, 223);
+ blendpixel(vid, nx-1, ny, GR, 10, 10, 223);
+ blendpixel(vid, nx, ny+1, GR, 10, 10, 223);
+ blendpixel(vid, nx, ny-1, GR, 10, 10, 223);
+
+ blendpixel(vid, nx+1, ny-1, GR, 10, 10, 112);
+ blendpixel(vid, nx-1, ny-1, GR, 10, 10, 112);
+ blendpixel(vid, nx+1, ny+1, GR, 10, 10, 112);
+ blendpixel(vid, nx-1, ny+1, GR, 10, 10, 112);
+ }
+ }
+ else if(t==PT_PLSM)
{
float ttemp = (float)parts[i].life;
int caddress = restrict_flt(restrict_flt(ttemp, 0.0f, 200.0f)*3, 0.0f, (200.0f*3)-3);
@@ -1805,10 +1802,126 @@ void draw_parts(pixel *vid)
blendpixel(vid, nx+1, ny+1, cr, cg, cb, 32);
blendpixel(vid, nx-1, ny-1, cr, cg, cb, 32);
}
+ } else if(t==PT_HFLM)
+ {
+ float ttemp = (float)parts[i].life;
+ int caddress = restrict_flt(restrict_flt(ttemp, 0.0f, 200.0f)*3, 0.0f, (200.0f*3)-3);
+ uint8 R = hflm_data[caddress];
+ uint8 G = hflm_data[caddress+1];
+ uint8 B = hflm_data[caddress+2];
+ if(cmode == 3||cmode==4 || cmode==6)
+ {
+ cr = R/8;
+ cg = G/8;
+ cb = B/8;
+ x = nx/CELL;
+ y = ny/CELL;
+ cg += fire_g[y][x];
+ if(cg > 255) cg = 255;
+ fire_g[y][x] = cg;
+ cb += fire_b[y][x];
+ if(cb > 255) cb = 255;
+ fire_b[y][x] = cb;
+ cr += fire_r[y][x];
+ if(cr > 255) cr = 255;
+ fire_r[y][x] = cr;
+ }
+ else
+ {
+ cr = R;
+ cg = G;
+ cb = B;
+ blendpixel(vid, nx, ny, cr, cg, cb, 192);
+ blendpixel(vid, nx+1, ny, cr, cg, cb, 96);
+ blendpixel(vid, nx-1, ny, cr, cg, cb, 96);
+ blendpixel(vid, nx, ny+1, cr, cg, cb, 96);
+ blendpixel(vid, nx, ny-1, cr, cg, cb, 96);
+ blendpixel(vid, nx+1, ny-1, cr, cg, cb, 32);
+ blendpixel(vid, nx-1, ny+1, cr, cg, cb, 32);
+ blendpixel(vid, nx+1, ny+1, cr, cg, cb, 32);
+ blendpixel(vid, nx-1, ny-1, cr, cg, cb, 32);
+ }
+ } else if(t==PT_FIRW&&parts[i].tmp>=3)
+ {
+ float ttemp = (float)parts[i].tmp-4;
+ int caddress = restrict_flt(restrict_flt(ttemp, 0.0f, 200.0f)*3, 0.0f, (200.0f*3)-3);
+ uint8 R = firw_data[caddress];
+ uint8 G = firw_data[caddress+1];
+ uint8 B = firw_data[caddress+2];
+ if(cmode == 3||cmode==4 || cmode==6)
+ {
+ cr = R/2;
+ cg = G/2;
+ cb = B/2;
+ x = nx/CELL;
+ y = ny/CELL;
+ cg += fire_g[y][x];
+ if(cg > 255) cg = 255;
+ fire_g[y][x] = cg;
+ cb += fire_b[y][x];
+ if(cb > 255) cb = 255;
+ fire_b[y][x] = cb;
+ cr += fire_r[y][x];
+ if(cr > 255) cr = 255;
+ fire_r[y][x] = cr;
+ }
+ else
+ {
+ cr = R;
+ cg = G;
+ cb = B;
+ blendpixel(vid, nx, ny, cr, cg, cb, 192);
+ blendpixel(vid, nx+1, ny, cr, cg, cb, 96);
+ blendpixel(vid, nx-1, ny, cr, cg, cb, 96);
+ blendpixel(vid, nx, ny+1, cr, cg, cb, 96);
+ blendpixel(vid, nx, ny-1, cr, cg, cb, 96);
+ blendpixel(vid, nx+1, ny-1, cr, cg, cb, 32);
+ blendpixel(vid, nx-1, ny+1, cr, cg, cb, 32);
+ blendpixel(vid, nx+1, ny+1, cr, cg, cb, 32);
+ blendpixel(vid, nx-1, ny-1, cr, cg, cb, 32);
+ }
}
else if(t==PT_FIRE && parts[i].life)
{
- if(cmode == 3||cmode==4 || cmode==6)
+ float ttemp = (float)parts[i].life;
+ int caddress = restrict_flt(restrict_flt(ttemp, 0.0f, 200.0f)*3, 0.0f, (200.0f*3)-3);
+ uint8 R = flm_data[caddress];
+ uint8 G = flm_data[caddress+1];
+ uint8 B = flm_data[caddress+2];
+ if(cmode == 3||cmode==4 || cmode==6)
+ {
+ cr = R/8;
+ cg = G/8;
+ cb = B/8;
+ x = nx/CELL;
+ y = ny/CELL;
+ cg += fire_g[y][x];
+ if(cg > 255) cg = 255;
+ fire_g[y][x] = cg;
+ cb += fire_b[y][x];
+ if(cb > 255) cb = 255;
+ fire_b[y][x] = cb;
+ cr += fire_r[y][x];
+ if(cr > 255) cr = 255;
+ fire_r[y][x] = cr;
+ }
+ else
+ {
+ cr = R;
+ cg = G;
+ cb = B;
+ blendpixel(vid, nx, ny, cr, cg, cb, 192);
+ blendpixel(vid, nx+1, ny, cr, cg, cb, 96);
+ blendpixel(vid, nx-1, ny, cr, cg, cb, 96);
+ blendpixel(vid, nx, ny+1, cr, cg, cb, 96);
+ blendpixel(vid, nx, ny-1, cr, cg, cb, 96);
+ blendpixel(vid, nx+1, ny-1, cr, cg, cb, 32);
+ blendpixel(vid, nx-1, ny+1, cr, cg, cb, 32);
+ blendpixel(vid, nx+1, ny+1, cr, cg, cb, 32);
+ blendpixel(vid, nx-1, ny-1, cr, cg, cb, 32);
+ }
+ // Older Code
+ /*if(cmode == 3||cmode==4 || cmode==6)
{
cr = parts[i].life / 4;
cg = parts[i].life / 16;
@@ -1845,7 +1958,7 @@ void draw_parts(pixel *vid)
blendpixel(vid, nx-1, ny+1, cr, cg, cb, 32);
blendpixel(vid, nx+1, ny+1, cr, cg, cb, 32);
blendpixel(vid, nx-1, ny-1, cr, cg, cb, 32);
- }
+ }*/
}
else if(t==PT_LAVA && parts[i].life)
{
@@ -1914,7 +2027,7 @@ void draw_parts(pixel *vid)
else
{
float ttemp = parts[i].temp+(-MIN_TEMP);
- int caddress = restrict_flt((int)( restrict_flt(ttemp, 0.0f, MAX_TEMP+(-MIN_TEMP)) / ((MAX_TEMP+(-MIN_TEMP))/512) ) *3, 0.0f, (512.0f*3)-3);
+ int caddress = restrict_flt((int)( restrict_flt(ttemp, 0.0f, MAX_TEMP+(-MIN_TEMP)) / ((MAX_TEMP+(-MIN_TEMP))/1024) ) *3, 0.0f, (1024.0f*3)-3);
uint8 R = color_data[caddress];
uint8 G = color_data[caddress+1];
uint8 B = color_data[caddress+2];
@@ -1942,7 +2055,7 @@ void draw_parts(pixel *vid)
draw_line(vid , nx, ny+3, player[11], player[12], R, G, B, s);
draw_line(vid , player[11], player[12], player[15], player[16], R, G, B, s);
- isplayer = 1; //It's a secret. Tssss...
+ isplayer = 1; //It's a secret. Tssss...
}
else
{
@@ -1950,7 +2063,7 @@ void draw_parts(pixel *vid)
//blendpixel(vid, nx+1, ny, R, G, B, 255);
}
}
- if(cmode == 4&&t!=PT_FIRE&&t!=PT_PLSM&&t!=PT_NONE&&t!=PT_ACID&&t!=PT_LCRY&&t!=PT_GLOW&&t!=PT_SWCH)
+ if(cmode == 4&&t!=PT_FIRE&&t!=PT_PLSM&&t!=PT_HFLM&&t!=PT_NONE&&t!=PT_ACID&&t!=PT_LCRY&&t!=PT_GLOW&&t!=PT_SWCH&&t!=PT_SMKE&&t!=PT_WTRV&&!(t==PT_FIRW&&parts[i].tmp==3))
{
uint8 R = PIXR(ptypes[t].pcolors);
uint8 G = PIXG(ptypes[t].pcolors);
@@ -1970,11 +2083,11 @@ void draw_parts(pixel *vid)
blendpixel(vid, nx+1, ny+1, R, G, B, 112);
blendpixel(vid, nx-1, ny+1, R, G, B, 112);
}
- }
+ }
#endif
- }
+ }
#ifdef OpenGL
- glFlush ();
+ glFlush ();
#endif
}
@@ -2000,9 +2113,9 @@ void render_signs(pixel *vid_buf)
if(strcmp(signs[i].text, "{t}")==0)
{
if((pmap[signs[i].y][signs[i].x]>>8)>0 && (pmap[signs[i].y][signs[i].x]>>8)<NPART)
- sprintf(buff, "Temp: %4.2f", parts[pmap[signs[i].y][signs[i].x]>>8].temp-273.15f); //...tempirature
+ sprintf(buff, "Temp: %4.2f", parts[pmap[signs[i].y][signs[i].x]>>8].temp-273.15); //...tempirature
else
- sprintf(buff, "Temp: N/A"); //...tempirature
+ sprintf(buff, "Temp: 0.00"); //...tempirature
drawtext(vid_buf, x+3, y+3, buff, 255, 255, 255, 255);
}
@@ -2069,33 +2182,33 @@ void prepare_alpha(void)
pixel *render_packed_rgb(void *image, int width, int height, int cmp_size)
{
- unsigned char *tmp;
- pixel *res;
- int i;
-
- tmp = malloc(width*height*3);
- if(!tmp)
- return NULL;
- res = malloc(width*height*PIXELSIZE);
- if(!res)
- {
- free(tmp);
- return NULL;
- }
-
- i = width*height*3;
- if(BZ2_bzBuffToBuffDecompress((char *)tmp, (unsigned *)&i, (char *)image, cmp_size, 0, 0))
- {
- free(res);
- free(tmp);
- return NULL;
- }
-
- for(i=0; i<width*height; i++)
- res[i] = PIXRGB(tmp[3*i], tmp[3*i+1], tmp[3*i+2]);
-
- free(tmp);
- return res;
+ unsigned char *tmp;
+ pixel *res;
+ int i;
+
+ tmp = malloc(width*height*3);
+ if(!tmp)
+ return NULL;
+ res = malloc(width*height*PIXELSIZE);
+ if(!res)
+ {
+ free(tmp);
+ return NULL;
+ }
+
+ i = width*height*3;
+ if(BZ2_bzBuffToBuffDecompress((char *)tmp, (unsigned *)&i, (char *)image, cmp_size, 0, 0))
+ {
+ free(res);
+ free(tmp);
+ return NULL;
+ }
+
+ for(i=0; i<width*height; i++)
+ res[i] = PIXRGB(tmp[3*i], tmp[3*i+1], tmp[3*i+2]);
+
+ free(tmp);
+ return res;
}
void draw_image(pixel *vid, pixel *img, int x, int y, int w, int h, int a)
@@ -2171,11 +2284,12 @@ pixel *prerender_save(void *save, int size, int *width, int *height)
return NULL;
if(!(c[2]==0x43 && c[1]==0x75 && c[0]==0x66) && !(c[2]==0x76 && c[1]==0x53 && c[0]==0x50))
return NULL;
+ if(c[2]==0x43 && c[1]==0x75 && c[0]==0x66) {
+ new_format = 1;
+ }
if(c[4]>SAVE_VERSION)
return NULL;
- if(c[2]==0x43 && c[1]==0x75 && c[0]==0x66){
- new_format = 1;
- }
+
bw = c[6];
bh = c[7];
w = bw*CELL;
@@ -2442,14 +2556,14 @@ void sdl_open(void)
}
atexit(SDL_Quit);
#ifdef OpenGL
- sdl_scrn=SDL_SetVideoMode(XRES*sdl_scale + BARSIZE*sdl_scale,YRES*sdl_scale + MENUSIZE*sdl_scale,32,SDL_OPENGL);
- SDL_GL_SetAttribute (SDL_GL_DOUBLEBUFFER, 1);
- Enable2D ();
- // glBegin(GL_TRIANGLES);
- // glColor3ub (255, 0, 0);
- // glVertex2d (0, 0);
- // glColor3ub (0, 255, 0);
- // glVertex2d (640,0);
+ sdl_scrn=SDL_SetVideoMode(XRES*sdl_scale + BARSIZE*sdl_scale,YRES*sdl_scale + MENUSIZE*sdl_scale,32,SDL_OPENGL);
+ SDL_GL_SetAttribute (SDL_GL_DOUBLEBUFFER, 1);
+ Enable2D ();
+ // glBegin(GL_TRIANGLES);
+ // glColor3ub (255, 0, 0);
+ // glVertex2d (0, 0);
+ // glColor3ub (0, 255, 0);
+ // glVertex2d (640,0);
// glColor3ub (0, 0, 255);
// glVertex2d (50, 50);
//glEnd ();
@@ -2488,11 +2602,11 @@ void Enable2D ()
glPushMatrix ();
glLoadIdentity ();
- glEnable (GL_BLEND);
- glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+ glEnable (GL_BLEND);
+ glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
- glHint( GL_LINE_SMOOTH_HINT, GL_NICEST);
- glHint( GL_POINT_SMOOTH_HINT, GL_NICEST);
+ glHint( GL_LINE_SMOOTH_HINT, GL_NICEST);
+ glHint( GL_POINT_SMOOTH_HINT, GL_NICEST);
}
void RenderScene ()
{
@@ -2500,6 +2614,6 @@ void RenderScene ()
}
void ClearScreen()
{
- glClear(GL_COLOR_BUFFER_BIT);
+ glClear(GL_COLOR_BUFFER_BIT);
}
#endif
diff --git a/http.c b/src/http.c
index 4713b37..cc056c7 100644
--- a/http.c
+++ b/src/http.c
@@ -42,9 +42,9 @@
#include <netdb.h>
#endif
-#include "defines.h"
-#include "http.h"
-#include "md5.h"
+#include <defines.h>
+#include <http.h>
+#include <md5.h>
#ifdef WIN32
#define PERROR SOCKET_ERROR
diff --git a/interface.c b/src/interface.c
index fa6c373..bdec111 100644
--- a/interface.c
+++ b/src/interface.c
@@ -4,13 +4,13 @@
#include <bzlib.h>
#include <math.h>
#include <time.h>
-#include "http.h"
-#include "md5.h"
-#include "font.h"
-#include "defines.h"
-#include "powder.h"
-#include "interface.h"
-#include "misc.h"
+#include <http.h>
+#include <md5.h>
+#include <font.h>
+#include <defines.h>
+#include <powder.h>
+#include <interface.h>
+#include <misc.h>
SDLMod sdl_mod;
int sdl_key, sdl_wheel, sdl_caps=0, sdl_ascii, sdl_zoom_trig=0;
@@ -1292,7 +1292,7 @@ void menu_ui(pixel *vid_buf, int i, int *sl, int *sr)
else if(n==*sr)
{
drawrect(vid_buf, x+30, y-1, 29, 17, 0, 0, 255, 255);
- }
+ }
}
}
for(n = 0; n<PT_NUM; n++)
@@ -1401,9 +1401,9 @@ void menu_ui(pixel *vid_buf, int i, int *sl, int *sr)
//drawtext(vid_buf, XRES+2, (12*i)+2, msections[i].icon, 255, 255, 255, 255);
}
-void menu_ui_v3(pixel *vid_buf, int i, int *sl, int *sr, int *psr,int b, int bq, int mx, int my)
+void menu_ui_v3(pixel *vid_buf, int i, int *sl, int *sr, int b, int bq, int mx, int my)
{
- int h,x,y,n=0,height,width,sy,rows=0,sec=-1;
+ int h,x,y,n=0,height,width,sy,rows=0;
mx /= sdl_scale;
my /= sdl_scale;
rows = ceil((float)msections[i].itemcount/16.0f);
@@ -1425,12 +1425,7 @@ void menu_ui_v3(pixel *vid_buf, int i, int *sl, int *sr, int *psr,int b, int bq,
y += 19;
}
x -= draw_tool_xy(vid_buf, x, y, n, mwalls[n-122].colour)+5;
- if(!bq && mx>=x+32 && mx<x+58 && my>=y && my< y+15&&(sdl_mod & (KMOD_LALT|KMOD_RALT)))
- {
- drawrect(vid_buf, x+30, y-1, 29, 17, 0, 255, 255, 255);
- h = n;
- }
- else if(!bq && mx>=x+32 && mx<x+58 && my>=y && my< y+15)
+ if(!bq && mx>=x+32 && mx<x+58 && my>=y && my< y+15)
{
drawrect(vid_buf, x+30, y-1, 29, 17, 255, 0, 0, 255);
h = n;
@@ -1443,10 +1438,6 @@ void menu_ui_v3(pixel *vid_buf, int i, int *sl, int *sr, int *psr,int b, int bq,
{
drawrect(vid_buf, x+30, y-1, 29, 17, 0, 0, 255, 255);
}
- else if(n==*psr)
- {
- drawrect(vid_buf, x+30, y-1, 29, 17, 0, 255, 255, 255);
- }
}
}
}
@@ -1462,12 +1453,7 @@ void menu_ui_v3(pixel *vid_buf, int i, int *sl, int *sr, int *psr,int b, int bq,
y += 19;
}
x -= draw_tool_xy(vid_buf, x, y, n, mwalls[n-122].colour)+5;
- if(!bq && mx>=x+32 && mx<x+58 && my>=y && my< y+15&&(sdl_mod & (KMOD_LALT|KMOD_RALT)))
- {
- drawrect(vid_buf, x+30, y-1, 29, 17, 0, 255, 255, 255);
- h = n;
- }
- else if(!bq && mx>=x+32 && mx<x+58 && my>=y && my< y+15)
+ if(!bq && mx>=x+32 && mx<x+58 && my>=y && my< y+15)
{
drawrect(vid_buf, x+30, y-1, 29, 17, 255, 0, 0, 255);
h = n;
@@ -1480,10 +1466,6 @@ void menu_ui_v3(pixel *vid_buf, int i, int *sl, int *sr, int *psr,int b, int bq,
{
drawrect(vid_buf, x+30, y-1, 29, 17, 0, 0, 255, 255);
}
- else if(n==*psr)
- {
- drawrect(vid_buf, x+30, y-1, 29, 17, 0, 255, 255, 255);
- }
}
}
for(n = 0; n<PT_NUM; n++)
@@ -1496,12 +1478,7 @@ void menu_ui_v3(pixel *vid_buf, int i, int *sl, int *sr, int *psr,int b, int bq,
y += 19;
}
x -= draw_tool_xy(vid_buf, x, y, n, ptypes[n].pcolors)+5;
- if(!bq && mx>=x+32 && mx<x+58 && my>=y && my< y+15&&(sdl_mod & (KMOD_LALT|KMOD_RALT)))
- {
- drawrect(vid_buf, x+30, y-1, 29, 17, 0, 255, 255, 255);
- h = n;
- }
- else if(!bq && mx>=x+32 && mx<x+58 && my>=y && my< y+15)
+ if(!bq && mx>=x+32 && mx<x+58 && my>=y && my< y+15)
{
drawrect(vid_buf, x+30, y-1, 29, 17, 255, 0, 0, 255);
h = n;
@@ -1514,10 +1491,6 @@ void menu_ui_v3(pixel *vid_buf, int i, int *sl, int *sr, int *psr,int b, int bq,
{
drawrect(vid_buf, x+30, y-1, 29, 17, 0, 0, 255, 255);
}
- else if(n==*psr)
- {
- drawrect(vid_buf, x+30, y-1, 29, 17, 0, 255, 255, 255);
- }
}
}
}
@@ -1533,12 +1506,7 @@ void menu_ui_v3(pixel *vid_buf, int i, int *sl, int *sr, int *psr,int b, int bq,
y += 19;
}
x -= draw_tool_xy(vid_buf, x, y, n, ptypes[n].pcolors)+5;
- if(!bq && mx>=x+32 && mx<x+58 && my>=y && my< y+15&&(sdl_mod & (KMOD_LALT|KMOD_RALT)))
- {
- drawrect(vid_buf, x+30, y-1, 29, 17, 0, 255, 255, 255);
- h = n;
- }
- else if(!bq && mx>=x+32 && mx<x+58 && my>=y && my< y+15)
+ if(!bq && mx>=x+32 && mx<x+58 && my>=y && my< y+15)
{
drawrect(vid_buf, x+30, y-1, 29, 17, 255, 0, 0, 255);
h = n;
@@ -1551,18 +1519,10 @@ void menu_ui_v3(pixel *vid_buf, int i, int *sl, int *sr, int *psr,int b, int bq,
{
drawrect(vid_buf, x+30, y-1, 29, 17, 0, 0, 255, 255);
}
- else if(n==*psr)
- {
- drawrect(vid_buf, x+30, y-1, 29, 17, 0, 255, 255, 255);
- }
}
}
}
- if(!bq&&mx>=sdl_scale*(XRES-2) && mx<sdl_scale*(XRES+BARSIZE-1) &&my>= sdl_scale*((i*16)+YRES+MENUSIZE-16-(SC_TOTAL*16)) && my<sdl_scale*((i*16)+YRES+MENUSIZE-16-(SC_TOTAL*16)+15))
- {
- if(i>=0&&i<SC_TOTAL)
- sec = i;
- }
+
if(h==-1)
{
drawtext(vid_buf, XRES-textwidth((char *)msections[i].name)-BARSIZE, sy-10, (char *)msections[i].name, 255, 255, 255, 255);
@@ -1578,39 +1538,12 @@ void menu_ui_v3(pixel *vid_buf, int i, int *sl, int *sr, int *psr,int b, int bq,
if(b==1&&h!=-1)
{
- if(sdl_mod & (KMOD_LALT|KMOD_RALT))
- {
- PSR=h;
- *psr=h;
- SEC=-1;
- }
- else
*sl = h;
}
- else if((b==1&&sec>0)&&(sdl_mod & (KMOD_LALT|KMOD_RALT)))
- {
- SEC = sec;
- PSR=-1;
- *psr=-1;
- }
if(b==4&&h!=-1)
{
- if(sdl_mod & (KMOD_LALT|KMOD_RALT))
- {
- PSR=h;
- *psr=h;
- SEC=-1;
- }
- else
*sr = h;
}
- else if((b==4&&sec>0)&&(sdl_mod & (KMOD_LALT|KMOD_RALT)))
- {
- SEC = sec;
- PSR=-1;
- *psr=-1;
- }
-
}
int sdl_poll(void)
@@ -1826,7 +1759,7 @@ corrupt:
int search_ui(pixel *vid_buf)
{
- int uih=0,nyu,nyd,b=1,bq,mx=0,my=0,mxq=0,myq=0,mmt=0,gi,gj,gx,gy,pos,i,mp,dp,own,last_own=search_own,page_count=0,last_page=0,last_date=0,j,w,h,st=0,lv;
+ int uih=0,nyu,nyd,b=1,bq,mx=0,my=0,mxq=0,myq=0,mmt=0,gi,gj,gx,gy,pos,i,mp,dp,dap,own,last_own=search_own,page_count=0,last_page=0,last_date=0,j,w,h,st=0,lv;
int is_p1=0, exp_res=GRID_X*GRID_Y, tp, view_own=0;
int thumb_drawn[GRID_X*GRID_Y];
pixel *v_buf = (pixel *)malloc(((YRES+MENUSIZE)*(XRES+BARSIZE))*PIXELSIZE);
@@ -1856,7 +1789,7 @@ int search_ui(pixel *vid_buf)
memset(img_id, 0, sizeof(img_id));
memset(search_ids, 0, sizeof(search_ids));
- memset(search_dates, 0, sizeof(search_dates));
+ memset(search_dates, 0, sizeof(search_dates));
memset(search_names, 0, sizeof(search_names));
memset(search_scoreup, 0, sizeof(search_scoreup));
memset(search_scoredown, 0, sizeof(search_scoredown));
@@ -2019,6 +1952,7 @@ int search_ui(pixel *vid_buf)
}
mp = dp = -1;
+ dap = -1;
st = 0;
for(gj=0; gj<GRID_Y; gj++)
for(gi=0; gi<GRID_X; gi++)
@@ -2031,7 +1965,7 @@ int search_ui(pixel *vid_buf)
}
else
pos = gi+GRID_X*gj;
- if(!search_dates[pos])
+ if(!search_ids[pos])
break;
gx = ((XRES/GRID_X)*gi) + (XRES/GRID_X-XRES/GRID_S)/2;
gy = ((((YRES-(MENUSIZE-20))+15)/GRID_Y)*gj) + ((YRES-(MENUSIZE-20))/GRID_Y-(YRES-(MENUSIZE-20))/GRID_S+10)/2 + 18;
@@ -2070,10 +2004,16 @@ int search_ui(pixel *vid_buf)
mp = -1;
dp = pos;
}
+ if(!search_dates[pos] && mx>=gx-6 && mx<=gx+4 && my>=gy+YRES/GRID_S-4 && my<=gy+YRES/GRID_S+6)
+ {
+ mp = -1;
+ dap = pos;
+ }
}
- drawrect(vid_buf, gx-2+(XRES/GRID_S)+5, gy-2, 6, YRES/GRID_S+3, 128, 128, 128, 255);
- fillrect(vid_buf, gx-2+(XRES/GRID_S)+5, gy-2, 6, 1+(YRES/GRID_S+3)/2, 0, 107, 10, 255);
- fillrect(vid_buf, gx-2+(XRES/GRID_S)+5, gy-2+((YRES/GRID_S+3)/2), 6, 1+(YRES/GRID_S+3)/2, 107, 10, 0, 255);
+ drawrect(vid_buf, gx-2+(XRES/GRID_S)+5, gy-2, 6, YRES/GRID_S+3, 128, 128, 128, 255);
+ fillrect(vid_buf, gx-2+(XRES/GRID_S)+5, gy-2, 6, 1+(YRES/GRID_S+3)/2, 0, 107, 10, 255);
+ fillrect(vid_buf, gx-2+(XRES/GRID_S)+5, gy-2+((YRES/GRID_S+3)/2), 6, 1+(YRES/GRID_S+3)/2, 107, 10, 0, 255);
+
if(mp==pos && !st)
drawrect(vid_buf, gx-2, gy-2, XRES/GRID_S+3, YRES/GRID_S+3, 160, 160, 192, 255);
else
@@ -2091,6 +2031,16 @@ int search_ui(pixel *vid_buf)
drawtext(vid_buf, gx-6, gy-6, "\xCD", 255, 255, 255, 255);
drawtext(vid_buf, gx-6, gy-6, "\xCE", 212, 151, 81, 255);
}
+ if(!search_dates[pos] && own)
+ {
+ fillrect(vid_buf, gx-5, gy+YRES/GRID_S-3, 7, 8, 255, 255, 255, 255);
+ if(dap == pos) {
+ drawtext(vid_buf, gx-6, gy+YRES/GRID_S-4, "\xA6", 200, 100, 80, 255);
+ } else {
+ drawtext(vid_buf, gx-6, gy+YRES/GRID_S-4, "\xA6", 160, 70, 50, 255);
+ }
+ //drawtext(vid_buf, gx-6, gy-6, "\xCE", 212, 151, 81, 255);
+ }
if(view_own || svf_admin || svf_mod)
{
sprintf(ts+1, "%d", search_votes[pos]);
@@ -2132,10 +2082,11 @@ int search_ui(pixel *vid_buf)
nyd = search_scoredown[pos]/ry;
}
- fillrect(vid_buf, gx-1+(XRES/GRID_S)+5, gy-1+((YRES/GRID_S+3)/2)-nyu, 4, nyu, 57, 187, 57, 255);
+
+ fillrect(vid_buf, gx-1+(XRES/GRID_S)+5, gy-1+((YRES/GRID_S+3)/2)-nyu, 4, nyu, 57, 187, 57, 255);
fillrect(vid_buf, gx-1+(XRES/GRID_S)+5, gy-2+((YRES/GRID_S+3)/2), 4, nyd, 187, 57, 57, 255);
- //drawrect(vid_buf, gx-2+(XRES/GRID_S)+5, gy-2+((YRES/GRID_S+3)/2)-nyu, 4, nyu, 0, 107, 10, 255);
- // drawrect(vid_buf, gx-2+(XRES/GRID_S)+5, gy-2+((YRES/GRID_S+3)/2)+1, 4, nyd, 107, 10, 0, 255);
+ //drawrect(vid_buf, gx-2+(XRES/GRID_S)+5, gy-2+((YRES/GRID_S+3)/2)-nyu, 4, nyu, 0, 107, 10, 255);
+ //drawrect(vid_buf, gx-2+(XRES/GRID_S)+5, gy-2+((YRES/GRID_S+3)/2)+1, 4, nyd, 107, 10, 0, 255);
}
}
@@ -2204,6 +2155,11 @@ int search_ui(pixel *vid_buf)
last = NULL;
}
}
+ if(b && !bq && dap!=-1)
+ {
+ sprintf(ed.str, "history:%s", search_ids[dap]);
+ lasttime = TIMEOUT;
+ }
if(b && !bq && tp!=-1)
{
@@ -2227,17 +2183,17 @@ int search_ui(pixel *vid_buf)
fillrect(vid_buf, 0, 0, XRES+BARSIZE, YRES+MENUSIZE, 0, 0, 0, 255);
info_box(vid_buf, "Loading...");
- if(search_dates[mp]){
- uri = malloc(strlen(search_ids[mp])*3+strlen(search_dates[mp])*3+strlen(SERVER)+71);
- strcpy(uri, "http://" SERVER "/Get.api?Op=save&ID=");
- strcaturl(uri, search_ids[mp]);
- strcaturl(uri, "&Date=");
- strcaturl(uri, search_dates[mp]);
- } else {
- uri = malloc(strlen(search_ids[mp])*3+strlen(SERVER)+64);
- strcpy(uri, "http://" SERVER "/Get.api?Op=save&ID=");
- strcaturl(uri, search_ids[mp]);
- }
+ if(search_dates[mp]) {
+ uri = malloc(strlen(search_ids[mp])*3+strlen(search_dates[mp])*3+strlen(SERVER)+71);
+ strcpy(uri, "http://" SERVER "/Get.api?Op=save&ID=");
+ strcaturl(uri, search_ids[mp]);
+ strappend(uri, "&Date=");
+ strcaturl(uri, search_dates[mp]);
+ } else {
+ uri = malloc(strlen(search_ids[mp])*3+strlen(SERVER)+64);
+ strcpy(uri, "http://" SERVER "/Get.api?Op=save&ID=");
+ strcaturl(uri, search_ids[mp]);
+ }
data = http_simple_get(uri, &status, &dlen);
free(uri);
@@ -2449,9 +2405,22 @@ int search_ui(pixel *vid_buf)
thlen = 4;
}
thumb_cache_add(img_id[i], thumb, thlen);
- for(pos=0; pos<GRID_X*GRID_Y; pos++)
- if(search_ids[pos] && !strcmp(search_ids[pos], img_id[i]))
- break;
+ for(pos=0; pos<GRID_X*GRID_Y; pos++) {
+ if(search_dates[pos]) {
+ char *id_d_temp = malloc(strlen(search_ids[pos])+strlen(search_dates[pos])+1);
+ strcpy(id_d_temp, search_ids[pos]);
+ strappend(id_d_temp, "_");
+ strappend(id_d_temp, search_dates[pos]);
+ //img_id[i] = mystrdup(id_d_temp);
+ if(id_d_temp && !strcmp(id_d_temp, img_id[i])) {
+ break;
+ }
+ } else {
+ if(search_ids[pos] && !strcmp(search_ids[pos], img_id[i])) {
+ break;
+ }
+ }
+ }
if(pos<GRID_X*GRID_Y)
{
search_thumbs[pos] = thumb;
@@ -2476,10 +2445,25 @@ int search_ui(pixel *vid_buf)
}
if(pos<GRID_X*GRID_Y)
{
- uri = malloc(strlen(search_ids[pos])*3+strlen(SERVER)+64);
- strcpy(uri, "http://" SERVER "/Get.api?Op=thumb&ID=");
- strcaturl(uri, search_ids[pos]);
- img_id[i] = mystrdup(search_ids[pos]);
+ if(search_dates[pos]) {
+ char *id_d_temp = malloc(strlen(search_ids[pos])+strlen(search_dates[pos])+1);
+ uri = malloc(strlen(search_ids[pos])*3+strlen(search_dates[pos])*3+strlen(SERVER)+71);
+ strcpy(uri, "http://" SERVER "/Get.api?Op=thumb&ID=");
+ strcaturl(uri, search_ids[pos]);
+ strappend(uri, "&Date=");
+ strcaturl(uri, search_dates[pos]);
+
+ strcpy(id_d_temp, search_ids[pos]);
+ strappend(id_d_temp, "_");
+ strappend(id_d_temp, search_dates[pos]);
+ img_id[i] = mystrdup(id_d_temp);
+ } else {
+ uri = malloc(strlen(search_ids[pos])*3+strlen(SERVER)+64);
+ strcpy(uri, "http://" SERVER "/Get.api?Op=thumb&ID=");
+ strcaturl(uri, search_ids[pos]);
+ img_id[i] = mystrdup(search_ids[pos]);
+ }
+
img_http[i] = http_async_req_start(img_http[i], uri, NULL, 0, 1);
free(uri);
}
@@ -2528,9 +2512,9 @@ int search_results(char *str, int votes)
free(search_names[i]);
search_names[i] = NULL;
}
- if(search_dates[i])
- {
- free(search_dates[i]);
+ if(search_dates[i])
+ {
+ free(search_dates[i]);
search_dates[i] = NULL;
}
if(search_owners[i])
@@ -2625,77 +2609,80 @@ int search_results(char *str, int votes)
search_owners[i] = mystrdup(q);
search_names[i] = mystrdup(r);
- if(s)
- search_votes[i] = atoi(s);
- thumb_cache_find(str+5, search_thumbs+i, search_thsizes+i);
- i++;
- }
- else if(!strncmp(str, "HISTORY ", 8))
- {
- if(i>=GRID_X*GRID_Y)
- break;
- if(votes)
- {
- sd = strchr(str+8, ' ');
- if(!sd)
- return i;
- *(sd++) = 0;
- pu = strchr(sd, ' ');
- if(!pu)
- return i;
- *(pu++) = 0;
- s = strchr(pu, ' ');
- if(!s)
- return i;
- *(s++) = 0;
- vu = strchr(s, ' ');
- if(!vu)
- return i;
- *(vu++) = 0;
- vd = strchr(vu, ' ');
- if(!vd)
- return i;
- *(vd++) = 0;
- q = strchr(vd, ' ');
- }
- else
- {
- sd = strchr(str+8, ' ');
- if(!sd)
- return i;
- *(sd++) = 0;
- pu = strchr(sd, ' ');
- if(!pu)
- return i;
- *(pu++) = 0;
- vu = strchr(pu, ' ');
- if(!vu)
- return i;
- *(vu++) = 0;
- vd = strchr(vu, ' ');
- if(!vd)
- return i;
- *(vd++) = 0;
- q = strchr(vd, ' ');
- }
- if(!q)
- return i;
- *(q++) = 0;
- r = strchr(q, ' ');
- if(!r)
- return i;
- *(r++) = 0;
- search_ids[i] = mystrdup(str+8);
- search_dates[i] = mystrdup(sd);
- search_publish[i] = atoi(pu);
- search_scoreup[i] = atoi(vu);
- search_scoredown[i] = atoi(vd);
- search_owners[i] = mystrdup(q);
- search_names[i] = mystrdup(r);
-
- if(s)
- search_votes[i] = atoi(s);
- thumb_cache_find(str+8, search_thumbs+i, search_thsizes+i);
+ if(s)
+ search_votes[i] = atoi(s);
+ thumb_cache_find(str+5, search_thumbs+i, search_thsizes+i);
+ i++;
+ }
+ else if(!strncmp(str, "HISTORY ", 8))
+ {
+ if(i>=GRID_X*GRID_Y)
+ break;
+ if(votes)
+ {
+ sd = strchr(str+8, ' ');
+ if(!sd)
+ return i;
+ *(sd++) = 0;
+ pu = strchr(sd, ' ');
+ if(!pu)
+ return i;
+ *(pu++) = 0;
+ s = strchr(pu, ' ');
+ if(!s)
+ return i;
+ *(s++) = 0;
+ vu = strchr(s, ' ');
+ if(!vu)
+ return i;
+ *(vu++) = 0;
+ vd = strchr(vu, ' ');
+ if(!vd)
+ return i;
+ *(vd++) = 0;
+ q = strchr(vd, ' ');
+ }
+ else
+ {
+ sd = strchr(str+8, ' ');
+ if(!sd)
+ return i;
+ *(sd++) = 0;
+ pu = strchr(sd, ' ');
+ if(!pu)
+ return i;
+ *(pu++) = 0;
+ vu = strchr(pu, ' ');
+ if(!vu)
+ return i;
+ *(vu++) = 0;
+ vd = strchr(vu, ' ');
+ if(!vd)
+ return i;
+ *(vd++) = 0;
+ q = strchr(vd, ' ');
+ }
+ if(!q)
+ return i;
+ *(q++) = 0;
+ r = strchr(q, ' ');
+ if(!r)
+ return i;
+ *(r++) = 0;
+ search_ids[i] = mystrdup(str+8);
+
+ search_dates[i] = mystrdup(sd);
+
+ search_publish[i] = atoi(pu);
+ search_scoreup[i] = atoi(vu);
+ search_scoredown[i] = atoi(vd);
+
+ search_owners[i] = mystrdup(q);
+ search_names[i] = mystrdup(r);
+
+ if(s)
+ search_votes[i] = atoi(s);
+ thumb_cache_find(str+8, search_thumbs+i, search_thsizes+i);
i++;
}
else if(!strncmp(str, "TAG ", 4))
@@ -2971,4 +2958,4 @@ int execute_vote(pixel *vid_buf, char *id, char *action)
if(result)
free(result);
return 1;
-} \ No newline at end of file
+}
diff --git a/main.c b/src/main.c
index 6c8f0e2..d88b972 100644..100755
--- a/main.c
+++ b/src/main.c
@@ -37,18 +37,18 @@
#include <unistd.h>
#endif
-#include "misc.h"
-#include "font.h"
-#include "defines.h"
-#include "powder.h"
-#include "graphics.h"
-#include "version.h"
-#include "http.h"
-#include "md5.h"
-#include "update.h"
-#include "hmap.h"
-#include "air.h"
-#include "icon.h"
+#include <misc.h>
+#include <font.h>
+#include <defines.h>
+#include <powder.h>
+#include <graphics.h>
+#include <version.h>
+#include <http.h>
+#include <md5.h>
+#include <update.h>
+#include <hmap.h>
+#include <air.h>
+#include <icon.h>
static const char *it_msg =
"\brThe Powder Toy\n"
@@ -101,7 +101,6 @@ int legacy_enable = 0; //Used to disable new features such as heat, will be set
int death = 0, framerender = 0;
int amd = 1;
int FPSB = 0;
-int cracker = 1;
sign signs[MAXSIGNS];
@@ -248,7 +247,7 @@ void *build_save(int *size, int x0, int y0, int w, int h)
d[p++] = bmap[y][x];
for(y=by0; y<by0+bh; y++)
for(x=bx0; x<bx0+bw; x++)
- if(bmap[y][x]==7)
+ if(bmap[y][x]==4)
{
i = (int)(fvx[y][x]*64.0f+127.5f);
if(i<0) i=0;
@@ -257,7 +256,7 @@ void *build_save(int *size, int x0, int y0, int w, int h)
}
for(y=by0; y<by0+bh; y++)
for(x=bx0; x<bx0+bw; x++)
- if(bmap[y][x]==7)
+ if(bmap[y][x]==4)
{
i = (int)(fvy[y][x]*64.0f+127.5f);
if(i<0) i=0;
@@ -311,10 +310,10 @@ void *build_save(int *size, int x0, int y0, int w, int h)
i = m[j];
if(i)
{
- //New Temperature saving uses a 16bit unsigned int for temperatures, giving a precision of 1 degree versus 36 for the old format
- int tttemp = (int)parts[i-1].temp;
- d[p++] = ((tttemp&0xFF00)>>8);
- d[p++] = (tttemp&0x00FF);
+ //New Temperature saving uses a 16bit unsigned int for temperatures, giving a precision of 1 degree versus 36 for the old format
+ int tttemp = (int)parts[i-1].temp;
+ d[p++] = ((tttemp&0xFF00)>>8);
+ d[p++] = (tttemp&0x00FF);
}
}
for(j=0; j<w*h; j++)
@@ -348,12 +347,14 @@ void *build_save(int *size, int x0, int y0, int w, int h)
}
i = (p*101+99)/100 + 612;
- c = malloc(i);
- //New file header uses PSv, replacing fuC. This is to detect if the client uses a new save format for temperatures
- //This creates a problem for old clients, that display and "corrupt" error instead of a "newer version" error
- c[0] = 0x50; //0x66;
- c[1] = 0x53; //0x75;
- c[2] = 0x76; //0x43;
+ c = malloc(i);
+
+ //New file header uses PSv, replacing fuC. This is to detect if the client uses a new save format for temperatures
+ //This creates a problem for old clients, that display and "corrupt" error instead of a "newer version" error
+
+ c[0] = 0x50; //0x66;
+ c[1] = 0x53; //0x75;
+ c[2] = 0x76; //0x43;
c[3] = legacy_enable;
c[4] = SAVE_VERSION;
c[5] = CELL;
@@ -364,7 +365,6 @@ void *build_save(int *size, int x0, int y0, int w, int h)
c[10] = p >> 16;
c[11] = p >> 24;
-
i -= 12;
if(BZ2_bzBuffToBuffCompress((char *)(c+12), (unsigned *)&i, (char *)d, p, 9, 0, 0) != BZ_OK)
@@ -385,22 +385,23 @@ int parse_save(void *save, int size, int replace, int x0, int y0)
int i,j,k,x,y,p=0,*m=calloc(XRES*YRES, sizeof(int)), ver, pty, ty, legacy_beta=0;
int bx0=x0/CELL, by0=y0/CELL, bw, bh, w, h;
int fp[NPART], nf=0, new_format = 0, ttv = 0;
- //New file header uses PSv, replacing fuC. This is to detect if the client uses a new save format for temperatures
- //This creates a problem for old clients, that display and "corrupt" error instead of a "newer version" error
-
- if(size<16)
- return 1;
- if(!(c[2]==0x43 && c[1]==0x75 && c[0]==0x66) && !(c[2]==0x76 && c[1]==0x53 && c[0]==0x50))
- return 1;
- if(c[2]==0x76 && c[1]==0x53 && c[0]==0x50){
- new_format = 1;
- }
- if(c[4]>SAVE_VERSION)
- return 2;
- ver = c[4];
-
- if(ver<34)
- {
+
+ //New file header uses PSv, replacing fuC. This is to detect if the client uses a new save format for temperatures
+ //This creates a problem for old clients, that display and "corrupt" error instead of a "newer version" error
+
+ if(size<16)
+ return 1;
+ if(!(c[2]==0x43 && c[1]==0x75 && c[0]==0x66) && !(c[2]==0x76 && c[1]==0x53 && c[0]==0x50))
+ return 1;
+ if(c[2]==0x76 && c[1]==0x53 && c[0]==0x50) {
+ new_format = 1;
+ }
+ if(c[4]>SAVE_VERSION)
+ return 2;
+ ver = c[4];
+
+ if(ver<34)
+ {
legacy_enable = 1;
}
else
@@ -474,38 +475,7 @@ int parse_save(void *save, int size, int replace, int x0, int y0)
for(x=bx0; x<bx0+bw; x++)
{
if(d[p])
- {
bmap[y][x] = d[p];
- if(!cracker)
- {
- if(bmap[y][x]==1)
- bmap[y][x]=11;
- else if(bmap[y][x]==2)
- bmap[y][x]=9;
- else if(bmap[y][x]==3)
- bmap[y][x]=8;
- else if(bmap[y][x]==4)
- bmap[y][x]=7;
- else if(bmap[y][x]==5)
- bmap[y][x]=5;
- else if(bmap[y][x]==6)
- bmap[y][x]=4;
- else if(bmap[y][x]==7)
- bmap[y][x]=3;
- else if(bmap[y][x]==8)
- bmap[y][x]=2;
- else if(bmap[y][x]==9)
- bmap[y][x]=12;
- else if(bmap[y][x]==10)
- bmap[y][x]=13;
- else if(bmap[y][x]==11)
- bmap[y][x]=14;
- else if(bmap[y][x]==12)
- bmap[y][x]=15;
- else if(bmap[y][x]==13)
- bmap[y][x]=20;
- }
- }
p++;
}
for(y=by0; y<by0+bh; y++)
@@ -536,7 +506,7 @@ int parse_save(void *save, int size, int replace, int x0, int y0)
j=d[p++];
if(j >= PT_NUM)
goto corrupt;
- if(j && !(isplayer == 1 && j==PT_STKM))
+ if(j)// && !(isplayer == 1 && j==PT_STKM))
{
if(pmap[y][x])
{
@@ -623,34 +593,32 @@ int parse_save(void *save, int size, int replace, int x0, int y0)
{
if(ver>=34&&legacy_beta==0)
{
- if(p >= size)
- {
- goto corrupt;
- }
- if(i <= NPART)
- {
- if(ver>=42){
- if(new_format){
- ttv = (d[p++])<<8;
- ttv |= (d[p++]);
- parts[i-1].temp = ttv;
- } else {
-
- parts[i-1].temp = (d[p++]*((MAX_TEMP+(-MIN_TEMP))/255))+MIN_TEMP;
- }
- }
- else {
- parts[i-1].temp = ((d[p++]*((O_MAX_TEMP+(-O_MIN_TEMP))/255))+O_MIN_TEMP)+273.15;
- }
- }
- else
- {
- p ++;
- if(new_format){
- p++;
- }
- }
- }
+ if(p >= size)
+ {
+ goto corrupt;
+ }
+ if(i <= NPART)
+ {
+ if(ver>=42) {
+ if(new_format) {
+ ttv = (d[p++])<<8;
+ ttv |= (d[p++]);
+ parts[i-1].temp = ttv;
+ } else {
+ parts[i-1].temp = (d[p++]*((MAX_TEMP+(-MIN_TEMP))/255))+MIN_TEMP;
+ }
+ } else {
+ parts[i-1].temp = ((d[p++]*((O_MAX_TEMP+(-O_MIN_TEMP))/255))+O_MIN_TEMP)+273;
+ }
+ }
+ else
+ {
+ p++;
+ if(new_format) {
+ p++;
+ }
+ }
+ }
else
{
parts[i-1].temp = ptypes[parts[i-1].type].heat;
@@ -716,7 +684,6 @@ corrupt:
memset(signs, 0, sizeof(signs));
memset(parts, 0, sizeof(particle)*NPART);
memset(bmap, 0, sizeof(bmap));
-
}
return 1;
}
@@ -1010,7 +977,7 @@ int main(int argc, char *argv[])
#ifdef INTERNAL
int vs = 0;
#endif
- int x, y, b = 0, sl=1, sr=0,su=0,psr=-1, c, lb = 0, lx = 0, ly = 0, lm = 0;//, tx, ty;
+ int x, y, b = 0, sl=1, sr=0, su=0, c, lb = 0, lx = 0, ly = 0, lm = 0;//, tx, ty;
int da = 0, db = 0, it = 2047, mx, my, bs = 2;
float nfvx, nfvy;
int load_mode=0, load_w=0, load_h=0, load_x=0, load_y=0, load_size=0;
@@ -1126,7 +1093,7 @@ int main(int argc, char *argv[])
{
for(i=1; i<XRES/CELL; i++)
{
- if(bmap[j][i]==11 || bmap[j][i]==2 || (bmap[j][i]==3 && !emap[j][i]))
+ if(bmap[j][i]==1 || bmap[j][i]==8 || (bmap[j][i]==7 && !emap[j][i]))
{
vx[j][i] = 0.0f;
vx[j][i-1] = 0.0f;
@@ -1141,7 +1108,7 @@ int main(int argc, char *argv[])
update_air();
}
#ifdef OpenGL
- ClearScreen();
+ ClearScreen();
#else
if(cmode==0 || cmode==1)
{
@@ -1158,7 +1125,7 @@ int main(int argc, char *argv[])
}
#endif
update_particles(vid_buf);
- draw_parts(vid_buf);
+ draw_parts(vid_buf);
if(cmode==2)
{
@@ -1212,15 +1179,15 @@ int main(int argc, char *argv[])
break;
}
}
- if(sdl_key=='d' && isplayer)
- {
- death = 1;
- //death = !(death);
- }
- if(sdl_key=='f')
- {
- framerender = 1;
- }
+ if(sdl_key=='d' && isplayer)
+ {
+ death = 1;
+ //death = !(death);
+ }
+ if(sdl_key=='f')
+ {
+ framerender = 1;
+ }
if((sdl_key=='l' || sdl_key=='k') && stamps[0].name[0])
{
if(load_mode)
@@ -1282,60 +1249,60 @@ int main(int argc, char *argv[])
{
set_cmode(5);
}
- if(sdl_key=='7')
- {
- set_cmode(6);
- }
- if(sdl_key==SDLK_LEFTBRACKET){
- if(sdl_zoom_trig==1)
- {
- ZSIZE -= 1;
- if(ZSIZE>32)
- ZSIZE = 32;
- if(ZSIZE<2)
- ZSIZE = 2;
- ZFACTOR = 256/ZSIZE;
- }
- else
- {
- if(sdl_mod & (KMOD_LCTRL|KMOD_RCTRL))
- bs -= 1;
- else
- bs -= ceil((bs/5)+0.5f);
- if(bs>1224)
- bs = 1224;
- if(bs<0)
- bs = 0;
- }
- }
- if(sdl_key==SDLK_RIGHTBRACKET){
- if(sdl_zoom_trig==1)
- {
- ZSIZE += 1;
- if(ZSIZE>32)
- ZSIZE = 32;
- if(ZSIZE<2)
- ZSIZE = 2;
- ZFACTOR = 256/ZSIZE;
- }
- else
- {
- if(sdl_mod & (KMOD_LCTRL|KMOD_RCTRL))
- bs += 1;
- else
- bs += ceil((bs/5)+0.5f);
- if(bs>1224)
- bs = 1224;
- if(bs<0)
- bs = 0;
- }
- }
- if(sdl_key==SDLK_SPACE)
- sys_pause = !sys_pause;
- if(sdl_key=='h')
+ if(sdl_key=='7')
+ {
+ set_cmode(6);
+ }
+ if(sdl_key==SDLK_LEFTBRACKET) {
+ if(sdl_zoom_trig==1)
+ {
+ ZSIZE -= 1;
+ if(ZSIZE>32)
+ ZSIZE = 32;
+ if(ZSIZE<2)
+ ZSIZE = 2;
+ ZFACTOR = 256/ZSIZE;
+ }
+ else
+ {
+ if(sdl_mod & (KMOD_LCTRL|KMOD_RCTRL))
+ bs -= 1;
+ else
+ bs -= ceil((bs/5)+0.5f);
+ if(bs>1224)
+ bs = 1224;
+ if(bs<0)
+ bs = 0;
+ }
+ }
+ if(sdl_key==SDLK_RIGHTBRACKET) {
+ if(sdl_zoom_trig==1)
+ {
+ ZSIZE += 1;
+ if(ZSIZE>32)
+ ZSIZE = 32;
+ if(ZSIZE<2)
+ ZSIZE = 2;
+ ZFACTOR = 256/ZSIZE;
+ }
+ else
+ {
+ if(sdl_mod & (KMOD_LCTRL|KMOD_RCTRL))
+ bs += 1;
+ else
+ bs += ceil((bs/5)+0.5f);
+ if(bs>1224)
+ bs = 1224;
+ if(bs<0)
+ bs = 0;
+ }
+ }
+ if(sdl_key==SDLK_SPACE)
+ sys_pause = !sys_pause;
+ if(sdl_key=='h')
hud_enable = !hud_enable;
if(sdl_key=='p')
- dump_frame(vid_buf, XRES, YRES, XRES);
+ dump_frame(vid_buf, XRES, YRES, XRES+BARSIZE);
if(sdl_key=='v'&&(sdl_mod & (KMOD_LCTRL|KMOD_RCTRL)))
{
if(clipboard_ready==1)
@@ -1394,7 +1361,7 @@ int main(int argc, char *argv[])
if(sdl_key=='v')
vs = !vs;
if(vs)
- dump_frame(vid_buf, XRES, YRES, XRES);
+ dump_frame(vid_buf, XRES, YRES, XRES+BARSIZE);
#endif
if(sdl_wheel)
@@ -1441,7 +1408,7 @@ int main(int argc, char *argv[])
active_menu = i;
}
}
- menu_ui_v3(vid_buf, active_menu, &sl, &sr, &psr, b, bq, x, y);
+ menu_ui_v3(vid_buf, active_menu, &sl, &sr, b, bq, x, y);
if(zoom_en && x>=sdl_scale*zoom_wx && y>=sdl_scale*zoom_wy
&& x<sdl_scale*(zoom_wx+ZFACTOR*ZSIZE)
@@ -1797,7 +1764,7 @@ int main(int argc, char *argv[])
memset(fire_g, 0, sizeof(fire_g));
memset(fire_b, 0, sizeof(fire_b));
}
- if(x>=19 && x<=35 && svf_last && svf_open)
+ if(x>=19 && x<=35 && svf_last && svf_open && !bq)
parse_save(svf_last, svf_lsize, 1, 0, 0);
if(x>=(XRES+BARSIZE-(510-476)) && x<=(XRES+BARSIZE-(510-491)) && !bq)
{
@@ -1826,7 +1793,7 @@ int main(int argc, char *argv[])
if(lm == 1)
{
xor_line(lx, ly, x, y, vid_buf);
- if(c==127 && lx>=0 && ly>=0 && lx<XRES && ly<YRES && bmap[ly/CELL][lx/CELL]==7)
+ if(c==127 && lx>=0 && ly>=0 && lx<XRES && ly<YRES && bmap[ly/CELL][lx/CELL]==4)
{
nfvx = (x-lx)*0.005f;
nfvy = (y-ly)*0.005f;
@@ -1837,7 +1804,7 @@ int main(int argc, char *argv[])
{
fvx[j][i] = nfvx;
fvy[j][i] = nfvy;
- bmap[j][i] = 7;
+ bmap[j][i] = 4;
}
}
}
@@ -1941,7 +1908,7 @@ int main(int argc, char *argv[])
su = c;
if(lm == 1)
{
- if(c!=127 || lx<0 || ly<0 || lx>=XRES || ly>=YRES || bmap[ly/CELL][lx/CELL]!=7)
+ if(c!=127 || lx<0 || ly<0 || lx>=XRES || ly>=YRES || bmap[ly/CELL][lx/CELL]!=4)
create_line(lx, ly, x, y, bs, c);
}
else
@@ -2081,7 +2048,7 @@ int main(int argc, char *argv[])
{
#ifdef BETA
sprintf(uitext, "Version %d (Beta %d) FPS:%d", SAVE_VERSION, MINOR_VERSION, FPS);
- //printf("%s\n", uitext);
+ //printf("%s\n", uitext);
#else
sprintf(uitext, "Version %d.%d FPS:%d", SAVE_VERSION, MINOR_VERSION, FPS);
#endif
@@ -2110,16 +2077,16 @@ int main(int argc, char *argv[])
fillrect(vid_buf, 12, 12, textwidth(uitext)+8, 15, 0, 0, 0, 140);
drawtext(vid_buf, 16, 16, uitext, 32, 216, 255, 200);
}
- sdl_blit(0, 0, XRES+BARSIZE, YRES+MENUSIZE, vid_buf, XRES+BARSIZE);
+ sdl_blit(0, 0, XRES+BARSIZE, YRES+MENUSIZE, vid_buf, XRES+BARSIZE);
- //Setting an element for the stick man
- if(isplayer==0)
- {
- if(ptypes[sr].falldown>0 || sr == PT_NEUT || sr == PT_PHOT)
- player[2] = sr;
- else
- player[2] = PT_DUST;
- }
+ //Setting an element for the stick man
+ if(isplayer==0)
+ {
+ if(ptypes[sr].falldown>0 || sr == PT_NEUT || sr == PT_PHOT)
+ player[2] = sr;
+ else
+ player[2] = PT_DUST;
+ }
}
diff --git a/md5.c b/src/md5.c
index 2e348e6..a51f4fe 100644
--- a/md5.c
+++ b/src/md5.c
@@ -1,6 +1,6 @@
// based on public-domain code from Colin Plumb (1993)
#include <string.h>
-#include "md5.h"
+#include <md5.h>
static unsigned getu32(const unsigned char *addr)
{
diff --git a/misc.c b/src/misc.c
index e32ec7e..7c551e2 100644
--- a/misc.c
+++ b/src/misc.c
@@ -219,6 +219,20 @@ void strcaturl(char *dst, char *src)
*d = 0;
}
+void strappend(char *dst, char *src)
+{
+ char *d;
+ unsigned char *s;
+
+ for(d=dst; *d; d++) ;
+
+ for(s=(unsigned char *)src; *s; s++)
+ {
+ *(d++) = *s;
+ }
+ *d = 0;
+}
+
void *file_load(char *fn, int *size)
{
FILE *f = fopen(fn, "rb");
diff --git a/powder.c b/src/powder.c
index 51b8409..f578e28 100644
--- a/powder.c
+++ b/src/powder.c
@@ -1,8 +1,9 @@
+#include <stdint.h>
#include <math.h>
-#include "defines.h"
-#include "powder.h"
-#include "air.h"
-#include "misc.h"
+#include <defines.h>
+#include <powder.h>
+#include <air.h>
+#include <misc.h>
int isplayer = 0;
float player[27]; //[0] is a command cell, [3]-[18] are legs positions, [19] is index, [19]-[26] are accelerations
@@ -21,21 +22,109 @@ int pfree;
unsigned pmap[YRES][XRES];
unsigned cb_pmap[YRES][XRES];
-int try_move(int i, int x, int y, int nx, int ny)
+static int pn_junction_sprk(int x, int y, int pt)
{
- unsigned r;
+ unsigned r = pmap[y][x];
+ if((r & 0xFF) != pt)
+ return 0;
+ r >>= 8;
+ if(parts[r].type != pt)
+ return 0;
+
+ parts[r].ctype = pt;
+ parts[r].type = PT_SPRK;
+ parts[r].life = 4;
+ return 1;
+}
+static void photoelectric_effect(int nx, int ny)
+{
+ unsigned r = pmap[ny][nx];
+
+ if((r&0xFF) == PT_PSCN) {
+ if((pmap[ny][nx-1] & 0xFF) == PT_NSCN ||
+ (pmap[ny][nx+1] & 0xFF) == PT_NSCN ||
+ (pmap[ny-1][nx] & 0xFF) == PT_NSCN ||
+ (pmap[ny+1][nx] & 0xFF) == PT_NSCN)
+ pn_junction_sprk(nx, ny, PT_PSCN);
+ }
+}
+
+static int eval_move(int pt, int nx, int ny, unsigned *rr)
+{
+ unsigned r;
if(nx<0 || ny<0 || nx>=XRES || ny>=YRES)
return 0;
- if(x==nx && y==ny)
- return 1;
+
r = pmap[ny][nx];
if(r && (r>>8)<NPART)
r = (r&~0xFF) | parts[r>>8].type;
+ if(rr)
+ *rr = r;
- if(parts[i].type==PT_PHOT&&((r&0xFF)==PT_GLAS||(r&0xFF)==PT_PHOT||(r&0xFF)==PT_CLNE||((r&0xFF)==PT_LCRY&&parts[r>>8].life > 5)))
- {
+ if((r&0xFF)==PT_VOID || (r&0xFF)==PT_BHOL)
+ return 1;
+
+ if(pt==PT_NEUT && (r&0xFF)==PT_GLAS)
+ return 2;
+
+ if(pt==PT_PHOT&&(
+ (r&0xFF)==PT_GLAS || (r&0xFF)==PT_PHOT ||
+ (r&0xFF)==PT_CLNE || (r&0xFF)==PT_PCLN ||
+ (r&0xFF)==PT_WATR || (r&0xFF)==PT_DSTW || (r&0xFF)==PT_SLTW ||
+ ((r&0xFF)==PT_LCRY&&parts[r>>8].life > 5)))
+ return 2;
+
+ if(pt==PT_STKM) //Stick man's head shouldn't collide
+ return 2;
+
+ if(bmap[ny/CELL][nx/CELL]==13 && ptypes[pt].falldown!=0 && pt!=PT_FIRE && pt!=PT_SMKE)
+ return 0;
+ if(ptypes[pt].falldown!=2 && bmap[ny/CELL][nx/CELL]==3)
+ return 0;
+ if((pt==PT_NEUT ||pt==PT_PHOT) && bmap[ny/CELL][nx/CELL]==7 && !emap[ny/CELL][nx/CELL])
+ return 0;
+
+ if(bmap[ny/CELL][nx/CELL]==9)
+ return 0;
+
+ if(ptypes[pt].falldown!=1 && bmap[ny/CELL][nx/CELL]==10)
+ return 0;
+
+ if (r && ((r&0xFF) >= PT_NUM || !can_move[pt][(r&0xFF)]))
+ return 0;
+
+ if(pt == PT_PHOT)
+ return 2;
+ return 1;
+}
+
+static void create_cherenkov_photon(int pp);
+
+int try_move(int i, int x, int y, int nx, int ny)
+{
+ unsigned r, e;
+
+ if(x==nx && y==ny)
+ return 1;
+
+ e = eval_move(parts[i].type, nx, ny, &r);
+ if(!e) {
+ if(!legacy_enable && parts[i].type==PT_PHOT) {
+ if((r & 0xFF) == PT_COAL || (r & 0xFF) == PT_BCOL)
+ parts[r>>8].temp = parts[i].temp;
+ if((r & 0xFF) < PT_NUM)
+ parts[i].temp = parts[r>>8].temp =
+ restrict_flt((parts[r>>8].temp+parts[i].temp)/2, MIN_TEMP, MAX_TEMP);
+ }
+ return 0;
+ }
+ if(e == 2) {
+ if(parts[i].type == PT_NEUT && (r&0xFF)==PT_GLAS) {
+ if(rand() < RAND_MAX/10)
+ create_cherenkov_photon(i);
+ }
return 1;
}
@@ -51,60 +140,177 @@ int try_move(int i, int x, int y, int nx, int ny)
{
parts[r>>8].temp = restrict_flt(parts[r>>8].temp+parts[i].temp/2, MIN_TEMP, MAX_TEMP);//3.0f;
}
+
return 0;
}
+ if(parts[i].type==PT_CNCT && y<ny && (pmap[y+1][x]&0xFF)==PT_CNCT)
+ return 0;
- if(parts[i].type==PT_STKM) //Stick man's head shouldn't collide
- {
+ if(bmap[ny/CELL][nx/CELL]==12 && !emap[y/CELL][x/CELL])
return 1;
- }
+ if((bmap[y/CELL][x/CELL]==12 && !emap[y/CELL][x/CELL]) && (bmap[ny/CELL][nx/CELL]!=12 && !emap[ny/CELL][nx/CELL]))
+ return 0;
- if(bmap[ny/CELL][nx/CELL]==15 && !emap[y/CELL][x/CELL])
- {
- return 1;
- }
- if(bmap[ny/CELL][nx/CELL]==20 && ptypes[parts[i].type].falldown!=0 && parts[i].type!=PT_FIRE && parts[i].type!=PT_SMKE)
- {
+ if(r && (r>>8)<NPART && ptypes[r&0xFF].falldown!=2 && bmap[y/CELL][x/CELL]==3)
return 0;
- }
- if((bmap[y/CELL][x/CELL]==15 && !emap[y/CELL][x/CELL]) && (bmap[ny/CELL][nx/CELL]!=15 && !emap[ny/CELL][nx/CELL]))
+
+ pmap[ny][nx] = (i<<8)|parts[i].type;
+ pmap[y][x] = r;
+
+ if(r && (r>>8)<NPART)
{
+ r >>= 8;
+ parts[r].x += x-nx;
+ parts[r].y += y-ny;
+ }
+
+ return 1;
+}
+#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
+
+static unsigned direction_to_map(float dx, float dy)
+{
+ return (dx >= 0) |
+ (((dx + dy) >= 0) << 1) | /* 567 */
+ ((dy >= 0) << 2) | /* 4+0 */
+ (((dy - dx) >= 0) << 3) | /* 321 */
+ ((dx <= 0) << 4) |
+ (((dx + dy) <= 0) << 5) |
+ ((dy <= 0) << 6) |
+ (((dy - dx) <= 0) << 7);
+}
+
+static int is_blocking(int t, int x, int y)
+{
+ if(t & REFRACT) {
+ if(x<0 || y<0 || x>=XRES || y>=YRES)
+ return 0;
+ if((pmap[y][x] & 0xFF) == PT_GLAS)
+ return 1;
return 0;
}
- if(ptypes[parts[i].type].falldown!=2 && bmap[ny/CELL][nx/CELL]==8)
+ return !eval_move(t, x, y, NULL);
+}
+
+static int is_boundary(int pt, int x, int y)
+{
+ if(!is_blocking(pt,x,y))
return 0;
- if((parts[i].type==PT_NEUT ||parts[i].type==PT_PHOT) && bmap[ny/CELL][nx/CELL]==3 && !emap[ny/CELL][nx/CELL])
+ if(is_blocking(pt,x,y-1) && is_blocking(pt,x,y+1) && is_blocking(pt,x-1,y) && is_blocking(pt,x+1,y))
return 0;
- if(r && (r>>8)<NPART && ptypes[r&0xFF].falldown!=2 && bmap[y/CELL][x/CELL]==8)
+ return 1;
+}
+
+static int find_next_boundary(int pt, int *x, int *y, int dm, int *em)
+{
+ static int dx[8] = {1,1,0,-1,-1,-1,0,1};
+ static int dy[8] = {0,1,1,1,0,-1,-1,-1};
+ static int de[8] = {0x83,0x07,0x0E,0x1C,0x38,0x70,0xE0,0xC1};
+ int i, ii, i0;
+
+ if(*x <= 0 || *x >= XRES-1 || *y <= 0 || *y >= YRES-1)
return 0;
- if(bmap[ny/CELL][nx/CELL]==12)
+ if(*em != -1) {
+ i0 = *em;
+ dm &= de[i0];
+ } else
+ i0 = 0;
+
+ for(ii=0; ii<8; ii++) {
+ i = (ii + i0) & 7;
+ if((dm & (1 << i)) && is_boundary(pt, *x+dx[i], *y+dy[i])) {
+ *x += dx[i];
+ *y += dy[i];
+ *em = i;
+ return 1;
+ }
+ }
+
+ return 0;
+}
+
+int get_normal(int pt, int x, int y, float dx, float dy, float *nx, float *ny)
+{
+ int ldm, rdm, lm, rm;
+ int lx, ly, lv, rx, ry, rv;
+ int i, j;
+ float r, ex, ey;
+
+ if(!dx && !dy)
return 0;
- if(ptypes[parts[i].type].falldown!=1 && bmap[ny/CELL][nx/CELL]==13)
+ if(!is_boundary(pt, x, y))
return 0;
- if (r && ((r&0xFF) >= PT_NUM || !can_move[parts[i].type][(r&0xFF)]))
+ ldm = direction_to_map(-dy, dx);
+ rdm = direction_to_map(dy, -dx);
+ lx = rx = x;
+ ly = ry = y;
+ lv = rv = 1;
+ lm = rm = -1;
+
+ j = 0;
+ for(i=0; i<SURF_RANGE; i++) {
+ if(lv)
+ lv = find_next_boundary(pt, &lx, &ly, ldm, &lm);
+ if(rv)
+ rv = find_next_boundary(pt, &rx, &ry, rdm, &rm);
+ j += lv + rv;
+ if(!lv && !rv)
+ break;
+ }
+
+ if(j < NORMAL_MIN_EST)
return 0;
- if(parts[i].type==PT_CNCT && y<ny && (pmap[y+1][x]&0xFF)==PT_CNCT)
- {
+ if((lx == rx) && (ly == ry))
return 0;
- }
- pmap[ny][nx] = (i<<8)|parts[i].type;
- pmap[y][x] = r;
- if(r && (r>>8)<NPART)
- {
- r >>= 8;
- parts[r].x += x-nx;
- parts[r].y += y-ny;
- }
+ ex = rx - lx;
+ ey = ry - ly;
+ r = 1.0f/hypot(ex, ey);
+ *nx = ey * r;
+ *ny = -ex * r;
return 1;
}
+int get_normal_interp(int pt, float x0, float y0, float dx, float dy, float *nx, float *ny)
+{
+ int x, y, i;
+
+ dx /= NORMAL_FRAC;
+ dy /= NORMAL_FRAC;
+
+ for(i=0; i<NORMAL_INTERP; i++) {
+ x = (int)(x0 + 0.5f);
+ y = (int)(y0 + 0.5f);
+ if(is_boundary(pt, x, y))
+ break;
+ x0 += dx;
+ y0 += dy;
+ }
+ if(i >= NORMAL_INTERP)
+ return 0;
+
+ if(pt == PT_PHOT)
+ photoelectric_effect(x, y);
+
+ return get_normal(pt, x, y, dx, dy, nx, ny);
+}
+
void kill_part(int i)
{
int x, y;
@@ -120,7 +326,7 @@ void kill_part(int i)
pfree = i;
}
-#ifdef WIN32
+#if defined(WIN32) && !defined(__MINGW32__)
_inline int create_part(int p, int x, int y, int t)
#else
inline int create_part(int p, int x, int y, int t)
@@ -192,9 +398,7 @@ inline int create_part(int p, int x, int y, int t)
(pmap[y][x]&0xFF)!=PT_ETRD &&
(pmap[y][x]&0xFF)!=PT_BRMT &&
(pmap[y][x]&0xFF)!=PT_NBLE &&
- (pmap[y][x]&0xFF)!=PT_INWR &&
- (pmap[y][x]&0xFF)!=PT_PWPO &&
- (pmap[y][x]&0xFF)!=PT_PWNE)
+ (pmap[y][x]&0xFF)!=PT_INWR)
return -1;
parts[pmap[y][x]>>8].type = PT_SPRK;
parts[pmap[y][x]>>8].life = 4;
@@ -229,6 +433,7 @@ inline int create_part(int p, int x, int y, int t)
parts[i].life = 0;
parts[i].ctype = 0;
parts[i].temp = ptypes[t].heat;
+ parts[i].tmp = 0;
}
if(t==PT_ACID)
{
@@ -239,16 +444,30 @@ inline int create_part(int p, int x, int y, int t)
parts[i].life = 150;
}
End Testing*/
+ if(t==PT_FUSE) {
+ parts[i].life = 50;
+ parts[i].tmp = 50;
+ }
+ if(t==PT_FSEP)
+ parts[i].life = 50;
+ if(t==PT_COAL) {
+ parts[i].life = 110;
+ parts[i].tmp = 50;
+ }
+ if(t==PT_BCOL)
+ parts[i].life = 110;
if(t==PT_FIRE)
parts[i].life = rand()%50+120;
if(t==PT_PLSM)
parts[i].life = rand()%150+50;
+ if(t==PT_HFLM)
+ parts[i].life = rand()%150+50;
if(t==PT_LAVA)
parts[i].life = rand()%120+240;
if(t==PT_NBLE)
parts[i].life = 0;
if(t==PT_ICEI)
- parts[i].ctype = PT_WATR;
+ parts[i].ctype = PT_WATR;
if(t==PT_NEUT)
{
float r = (rand()%128+128)/127.0f;
@@ -259,29 +478,16 @@ inline int create_part(int p, int x, int y, int t)
}
if(t==PT_PHOT)
{
- float r = (rand()%3-1)*3;
- float a = (rand()%3-1)*3;
+ float a = (rand()%8) * 0.78540f;
parts[i].life = 680;
- if(a==0.0f&&r==0.0f)
- {
- parts[i].life = 0;
- parts[i].type = PT_NONE;
- return -1;
- }
- else
- {
- parts[i].vx = a;
- parts[i].vy = r;
- }
- //} else {
- // parts[i].life = 0;
- // parts[i].type = PT_NONE;
- //}/
+ parts[i].ctype = 0x3FFFFFFF;
+ parts[i].vx = 3.0f*cosf(a);
+ parts[i].vy = 3.0f*sinf(a);
}
- if(t!=PT_STKM)
+ if(t!=PT_STKM && t!=PT_PHOT && t!=PT_NEUT)
pmap[y][x] = t|(i<<8);
- else
+ else if(t==PT_STKM)
{
if(isplayer==0)
{
@@ -293,10 +499,10 @@ inline int create_part(int p, int x, int y, int t)
parts[i].life = 100;
parts[i].ctype = 0;
parts[i].temp = ptypes[t].heat;
-
-
- player[3] = x-1; //Setting legs positions
+
+
+ player[3] = x-1; //Setting legs positions
player[4] = y+6;
player[5] = x-1;
player[6] = y+6;
@@ -323,50 +529,108 @@ inline int create_part(int p, int x, int y, int t)
return i;
}
-#ifdef WIN32
+static void create_cherenkov_photon(int pp)
+{
+ int i, lr, nx, ny;
+ float r, eff_ior;
+
+ if(pfree == -1)
+ return;
+ i = pfree;
+
+ nx = (int)(parts[pp].x + 0.5f);
+ ny = (int)(parts[pp].y + 0.5f);
+ if((pmap[ny][nx] & 0xFF) != PT_GLAS)
+ return;
+
+ if(hypotf(parts[pp].vx, parts[pp].vy) < 1.44f)
+ return;
+
+ pfree = parts[i].life;
+
+ lr = rand() % 2;
+
+ parts[i].type = PT_PHOT;
+ parts[i].ctype = 0x00000F80;
+ parts[i].life = 680;
+ parts[i].x = parts[pp].x;
+ parts[i].y = parts[pp].y;
+ parts[i].temp = parts[pmap[ny][nx] >> 8].temp;
+ parts[i].tmp = 0;
+
+ if(lr) {
+ parts[i].vx = parts[pp].vx - 2.5f*parts[pp].vy;
+ parts[i].vy = parts[pp].vy + 2.5f*parts[pp].vx;
+ } else {
+ parts[i].vx = parts[pp].vx + 2.5f*parts[pp].vy;
+ parts[i].vy = parts[pp].vy - 2.5f*parts[pp].vx;
+ }
+
+ /* photons have speed of light. no discussion. */
+ r = 1.269 / hypotf(parts[i].vx, parts[i].vy);
+ parts[i].vx *= r;
+ parts[i].vy *= r;
+}
+
+#if defined(WIN32) && !defined(__MINGW32__)
_inline void delete_part(int x, int y)
#else
inline void delete_part(int x, int y)
#endif
{
unsigned i;
+
if(x<0 || y<0 || x>=XRES || y>=YRES)
return;
i = pmap[y][x];
if(!i || (i>>8)>=NPART)
return;
- if((parts[i>>8].type==PSR)||PSR==0||PSR==130)
- {
- kill_part(i>>8);
- pmap[y][x] = 0;
- }
- else if(ptypes[parts[i>>8].type].menusection==SEC)
- {
- kill_part(i>>8);
- pmap[y][x] = 0;
- }
- else
- {
- return;
- }
+
+ kill_part(i>>8);
+ pmap[y][x] = 0; // just in case
}
-#ifdef WIN32
+#if defined(WIN32) && !defined(__MINGW32__)
_inline int is_wire(int x, int y)
#else
inline int is_wire(int x, int y)
#endif
{
- return bmap[y][x]==4 || bmap[y][x]==3 || bmap[y][x]==8 || bmap[y][x]==2 || bmap[y][x]==14 || bmap[y][x]==15;
+ return bmap[y][x]==6 || bmap[y][x]==7 || bmap[y][x]==3 || bmap[y][x]==8 || bmap[y][x]==11 || bmap[y][x]==12;
}
-#ifdef WIN32
+#if defined(WIN32) && !defined(__MINGW32__)
_inline int is_wire_off(int x, int y)
#else
inline int is_wire_off(int x, int y)
#endif
{
- return (bmap[y][x]==4 || bmap[y][x]==3 || bmap[y][x]==8 || bmap[y][x]==2 || bmap[y][x]==14 || bmap[y][x]==15) && emap[y][x]<8;
+ return (bmap[y][x]==6 || bmap[y][x]==7 || bmap[y][x]==3 || bmap[y][x]==8 || bmap[y][x]==11 || bmap[y][x]==12) && emap[y][x]<8;
+}
+
+int get_wavelength_bin(int *wm)
+{
+ int i, w0=30, wM=0;
+
+ if(!*wm)
+ return -1;
+
+ for(i=0; i<30; i++)
+ if(*wm & (1<<i)) {
+ if(i < w0)
+ w0 = i;
+ if(i > wM)
+ wM = i;
+ }
+
+ if(wM-w0 < 5)
+ return (wM+w0)/2;
+
+ i = rand() % (wM-w0-3);
+ i += w0;
+
+ *wm &= 0x1F << i;
+ return i + 2;
}
void set_emap(int x, int y)
@@ -426,14 +690,14 @@ void set_emap(int x, int y)
}
}
-#ifdef WIN32
+#if defined(WIN32) && !defined(__MINGW32__)
_inline int parts_avg(int ci, int ni)
#else
inline int parts_avg(int ci, int ni)
#endif
{
int pmr = pmap[(int)((parts[ci].y + parts[ni].y)/2)][(int)((parts[ci].x + parts[ni].x)/2)];
- if((pmr>>8) < NPART && (pmr>>8) >= 0)
+ if((pmr>>8) < NPART && (pmr>>8) >= 1)
{
return parts[pmr>>8].type;
}
@@ -443,6 +707,7 @@ inline int parts_avg(int ci, int ni)
}
}
+
int nearest_part(int ci, int t)
{
int distance = sqrt(pow(XRES, 2)+pow(YRES, 2));
@@ -468,29 +733,33 @@ int nearest_part(int ci, int t)
void update_particles_i(pixel *vid, int start, int inc)
{
- int i, j, x, y, t, nx, ny, r, a, s, rt, fe, nt, lpv, nearp, pavg;
- float mv, dx, dy, ix, iy, lx, ly, d, pp;
- float pt = R_TEMP + 273.15f;
+ int i, j, x, y, t, nx, ny, r, a, s, lt, rt, fe, nt, lpv, nearp, pavg;
+ uint16_t tempu1, tempu2;
+ int16_t temps1, temps2;
+ float tempf1, tempf2;
+ float mv, dx, dy, ix, iy, lx, ly, d, pp, nrx, nry, dp;
+ float nn, ct1, ct2;
+ float pt = R_TEMP;
float c_heat = 0.0f;
int h_count = 0;
int starti = (start*-1);
for(i=start; i<(NPART-starti); i+=inc)
if(parts[i].type)
{
- //printf("parts[%d].type: %d\n", i, parts[i].type);
+ //printf("parts[%d].type: %d\n", i, parts[i].type);
lx = parts[i].x;
ly = parts[i].y;
t = parts[i].type;
if(sys_pause&&!framerender)
- return;
+ return;
- if(parts[i].life && t!=PT_ACID && t!=PT_WOOD && t!=PT_NBLE && t!=PT_SWCH && t!=PT_STKM)
+ if(parts[i].life && t!=PT_ACID && t!=PT_COAL && t!=PT_WOOD && t!=PT_NBLE && t!=PT_SWCH && t!=PT_STKM && t!=PT_FUSE && t!=PT_FSEP && t!=PT_BCOL)
{
- if(!(parts[i].life==10&&parts[i].type==PT_LCRY))
+ if(!(parts[i].life==10&&(parts[i].type==PT_LCRY||parts[i].type==PT_PCLN||parts[i].type==PT_HSWC)))
parts[i].life--;
- if(parts[i].life<=0 && t!=PT_METL && t!=PT_WATR && t!=PT_RBDM && t!=PT_LRBD && t!=PT_SLTW && t!=PT_BRMT && t!=PT_PSCN && t!=PT_NSCN && t!=PT_NTCT && t!=PT_PTCT && t!=PT_BMTL && t!=PT_SPRK && t!=PT_LAVA && t!=PT_ETRD&&t!=PT_LCRY && t!=PT_INWR && t!=PT_PWPO && t!=PT_PWNE)
+ if(parts[i].life<=0 && t!=PT_METL && t!=PT_FIRW && t!=PT_PCLN && t!=PT_HSWC && t!=PT_WATR && t!=PT_RBDM && t!=PT_LRBD && t!=PT_SLTW && t!=PT_BRMT && t!=PT_PSCN && t!=PT_NSCN && t!=PT_NTCT && t!=PT_PTCT && t!=PT_BMTL && t!=PT_SPRK && t!=PT_LAVA && t!=PT_ETRD&&t!=PT_LCRY && t!=PT_INWR)
{
kill_part(i);
continue;
@@ -522,15 +791,15 @@ void update_particles_i(pixel *vid, int start, int inc)
if(x<0 || y<0 || x>=XRES || y>=YRES ||
- ((bmap[y/CELL][x/CELL]==11 ||
- bmap[y/CELL][x/CELL]==2 ||
- bmap[y/CELL][x/CELL]==12 ||
- (bmap[y/CELL][x/CELL]==9) ||
- (bmap[y/CELL][x/CELL]==8 && ptypes[t].falldown!=2) ||
- (bmap[y/CELL][x/CELL]==13 && ptypes[t].falldown!=1) ||
- (bmap[y/CELL][x/CELL]==13 && ptypes[t].falldown!=0 && parts[i].type!=PT_FIRE && parts[i].type!=PT_SMKE) ||
- (bmap[y/CELL][x/CELL]==4 && (t==PT_METL || t==PT_SPRK)) ||
- (bmap[y/CELL][x/CELL]==3 && !emap[y/CELL][x/CELL])) && (t!=PT_STKM)))
+ ((bmap[y/CELL][x/CELL]==1 ||
+ bmap[y/CELL][x/CELL]==8 ||
+ bmap[y/CELL][x/CELL]==9 ||
+ (bmap[y/CELL][x/CELL]==2) ||
+ (bmap[y/CELL][x/CELL]==3 && ptypes[t].falldown!=2) ||
+ (bmap[y/CELL][x/CELL]==10 && ptypes[t].falldown!=1) ||
+ (bmap[y/CELL][x/CELL]==13 && ptypes[t].falldown!=0 && parts[i].type!=PT_FIRE && parts[i].type!=PT_SMKE) ||
+ (bmap[y/CELL][x/CELL]==6 && (t==PT_METL || t==PT_SPRK)) ||
+ (bmap[y/CELL][x/CELL]==7 && !emap[y/CELL][x/CELL])) && (t!=PT_STKM)))
{
kill_part(i);
continue;
@@ -589,8 +858,8 @@ void update_particles_i(pixel *vid, int start, int inc)
}
else
{
- parts[i].vx += ptypes[t].advection*vx[y/CELL][x/CELL];
- parts[i].vy += ptypes[t].advection*vy[y/CELL][x/CELL] + ptypes[t].gravity;
+ parts[i].vx += ptypes[t].advection*vx[y/CELL][x/CELL];
+ parts[i].vy += ptypes[t].advection*vy[y/CELL][x/CELL] + ptypes[t].gravity;
}
if(ptypes[t].diffusion)
@@ -600,7 +869,7 @@ void update_particles_i(pixel *vid, int start, int inc)
}
// interpolator
-#ifdef WIN32
+#if defined(WIN32) && !defined(__MINGW32__)
mv = max(fabsf(parts[i].vx), fabsf(parts[i].vy));
#else
mv = fmaxf(fabsf(parts[i].vx), fabsf(parts[i].vy));
@@ -668,13 +937,13 @@ void update_particles_i(pixel *vid, int start, int inc)
}
if(t==PT_GAS && pv[y/CELL][x/CELL]<-6.0f)
t = parts[i].type = PT_OIL;
- if(t==PT_DESL && pv[y/CELL][x/CELL]>12.0f) // Only way I know to make it
+ if(t==PT_DESL && pv[y/CELL][x/CELL]>5.0f) // Only way I know to make it
t = parts[i].type = PT_FIRE; // combust under pressure.
if(t==PT_GAS && pv[y/CELL][x/CELL]>6.0f)
t = parts[i].type = PT_OIL;
if(t==PT_BMTL && pv[y/CELL][x/CELL]>2.5f)
t = parts[i].type = PT_BRMT;
- if(t==PT_BRCK && pv[y/CELL][x/CELL]>2.8f)
+ if(t==PT_BRCK && pv[y/CELL][x/CELL]>2.8f)
t = parts[i].type = PT_STNE;
//if(t==PT_GLAS && pv[y/CELL][x/CELL]>4.0f)
// t = parts[i].type = PT_BGLA;
@@ -698,7 +967,7 @@ void update_particles_i(pixel *vid, int start, int inc)
if(t==PT_SPRK&&parts[i].ctype==PT_ETRD&&parts[i].life==1)
{
nearp = nearest_part(i, PT_ETRD);
- if(nearp!=-1)
+ if(nearp!=-1&&parts_avg(i, nearp)!=PT_INSL)
{
create_line((int)parts[i].x, (int)parts[i].y, (int)parts[nearp].x, (int)parts[nearp].y, 0, PT_PLSM);
t = parts[i].type = PT_ETRD;
@@ -715,9 +984,9 @@ void update_particles_i(pixel *vid, int start, int inc)
int ctemp = pv[y/CELL][x/CELL]*2;
c_heat = 0.0f;
h_count = 0;
- if(t==PT_ICEI && !parts[i].ctype)
- parts[i].ctype = PT_WATR;
- if(ptypes[t].hconduct>(rand()%250))
+ if(t==PT_ICEI && !parts[i].ctype)
+ parts[i].ctype = PT_WATR;
+ if(ptypes[t].hconduct>(rand()%250)&&!(parts[i].type==PT_HSWC&&parts[i].life!=10))
{
for(nx=-1; nx<2; nx++)
{
@@ -728,7 +997,7 @@ void update_particles_i(pixel *vid, int start, int inc)
r = pmap[y+ny][x+nx];
if((r>>8)>=NPART || !r)
continue;
- if(parts[r>>8].type!=PT_NONE&&parts[i].type!=PT_NONE&&ptypes[parts[r>>8].type].hconduct>0)
+ if(parts[r>>8].type!=PT_NONE&&parts[i].type!=PT_NONE&&ptypes[parts[r>>8].type].hconduct>0&&!(parts[r>>8].type==PT_HSWC&&parts[r>>8].life!=10))
{
h_count++;
c_heat += parts[r>>8].temp;
@@ -746,7 +1015,7 @@ void update_particles_i(pixel *vid, int start, int inc)
r = pmap[y+ny][x+nx];
if((r>>8)>=NPART || !r)
continue;
- if(parts[r>>8].type!=PT_NONE&&parts[i].type!=PT_NONE&&ptypes[parts[r>>8].type].hconduct>0)
+ if(parts[r>>8].type!=PT_NONE&&parts[i].type!=PT_NONE&&ptypes[parts[r>>8].type].hconduct>0&&!(parts[r>>8].type==PT_HSWC&&parts[r>>8].life!=10))
{
parts[r>>8].temp = parts[i].temp;
}
@@ -764,11 +1033,11 @@ void update_particles_i(pixel *vid, int start, int inc)
if(t==PT_LAVA&&parts[i].ctype)
{
parts[i].life = 0;
- if(parts[i].ctype==PT_THRM)
- {
- parts[i].tmp = 0;
- parts[i].ctype = PT_BMTL;
- }
+ if(parts[i].ctype==PT_THRM)
+ {
+ parts[i].tmp = 0;
+ parts[i].ctype = PT_BMTL;
+ }
t = parts[i].type = parts[i].ctype;
parts[i].ctype = PT_NONE;
}
@@ -783,7 +1052,7 @@ void update_particles_i(pixel *vid, int start, int inc)
t = parts[i].type = pstates[t].solid;
}
}
- else if((pt>=pstates[t].ltemp&&(pt<=pstates[t].gtemp||!pstates[t].gas)&&pstates[t].state==ST_SOLID&&pstates[t].liquid)||(t==PT_ICEI&&pt<pstates[parts[i].ctype].ltemp))
+ else if((pt>=pstates[t].ltemp&&(pt<=pstates[t].gtemp||!pstates[t].gas)&&pstates[t].state==ST_SOLID&&pstates[t].liquid)||(t==PT_ICEI&&pt>pstates[parts[i].ctype].stemp))
{
if(pstates[t].liquid==PT_LAVA)
{
@@ -819,6 +1088,8 @@ void update_particles_i(pixel *vid, int start, int inc)
pv[y/CELL][x/CELL] += 0.50f;
if(t==PT_FIRE)
parts[i].life = rand()%50+120;
+ if(t==PT_HFLM)
+ parts[i].life = rand()%50+120;
}
}
if(t==PT_URAN && pv[y/CELL][x/CELL]>0.0f)
@@ -829,11 +1100,11 @@ void update_particles_i(pixel *vid, int start, int inc)
if(t==PT_LAVA)
{
parts[i].life = restrict_flt((pt-700)/7, 0.0f, 400.0f);
- if(parts[i].ctype==PT_THRM&&parts[i].tmp>0)
- {
- parts[i].tmp--;
- parts[i].temp = 3500;
- }
+ if(parts[i].ctype==PT_THRM&&parts[i].tmp>0)
+ {
+ parts[i].tmp--;
+ parts[i].temp = 3500;
+ }
}
pt = parts[i].temp = restrict_flt(parts[i].temp, MIN_TEMP, MAX_TEMP);
}
@@ -847,7 +1118,7 @@ void update_particles_i(pixel *vid, int start, int inc)
pt = parts[i].temp -= 2.5f;
}
- if(t==PT_WATR || t==PT_ETRD || t==PT_SLTW || t==PT_METL || t==PT_RBDM || t==PT_LRBD || t==PT_BRMT || t==PT_PSCN || t==PT_NSCN || t==PT_NTCT || t==PT_PTCT || t==PT_BMTL || t==PT_SPRK|| t == PT_NBLE || t==PT_INWR || t==PT_PWPO || t==PT_PWNE)
+ if(t==PT_WATR || t==PT_ETRD || t==PT_SLTW || t==PT_METL || t==PT_RBDM || t==PT_LRBD || t==PT_BRMT || t==PT_PSCN || t==PT_NSCN || t==PT_NTCT || t==PT_PTCT || t==PT_BMTL || t==PT_SPRK|| t == PT_NBLE || t==PT_INWR)
{
nx = x % CELL;
if(nx == 0)
@@ -865,7 +1136,7 @@ void update_particles_i(pixel *vid, int start, int inc)
ny = y/CELL;
if(nx>=0 && ny>=0 && nx<XRES/CELL && ny<YRES/CELL)
{
- if(t==PT_WATR || t==PT_ETRD || t==PT_SLTW || t==PT_METL || t==PT_RBDM || t==PT_LRBD || t==PT_NSCN || t==PT_NTCT || t==PT_PTCT || t==PT_PSCN || t==PT_BRMT || t==PT_BMTL||t==PT_NBLE || t==PT_INWR || t==PT_PWPO || t==PT_PWNE)
+ if(t==PT_WATR || t==PT_ETRD || t==PT_SLTW || t==PT_METL || t==PT_RBDM || t==PT_LRBD || t==PT_NSCN || t==PT_NTCT || t==PT_PTCT || t==PT_PSCN || t==PT_BRMT || t==PT_BMTL||t==PT_NBLE || t==PT_INWR)
{
if(emap[ny][nx]==12 && !parts[i].life)
{
@@ -875,14 +1146,14 @@ void update_particles_i(pixel *vid, int start, int inc)
t = PT_SPRK;
}
}
- else if(bmap[ny][nx]==4 || bmap[ny][nx]==3 || bmap[ny][nx]==8 || bmap[ny][nx]==2 || bmap[ny][nx]==14 || bmap[ny][nx]==15)
+ else if(bmap[ny][nx]==6 || bmap[ny][nx]==7 || bmap[ny][nx]==3 || bmap[ny][nx]==8 || bmap[ny][nx]==11 || bmap[ny][nx]==12)
set_emap(nx, ny);
}
}
nx = x/CELL;
ny = y/CELL;
- if(bmap[ny][nx]==4 && emap[ny][nx]<8)
+ if(bmap[ny][nx]==6 && emap[ny][nx]<8)
set_emap(nx, ny);
fe = 0;
@@ -896,7 +1167,8 @@ void update_particles_i(pixel *vid, int start, int inc)
r = pmap[y+ny][x+nx];
if((r>>8)>=NPART || !r)
continue;
- if(((r&0xFF)==PT_METL || (r&0xFF)==PT_ETRD || (r&0xFF)==PT_PSCN || (r&0xFF)==PT_NSCN || (r&0xFF)==PT_NTCT || (r&0xFF)==PT_PTCT || (r&0xFF)==PT_BMTL || (r&0xFF)==PT_RBDM || (r&0xFF)==PT_LRBD || (r&0xFF)==PT_BRMT||(r&0xFF)==PT_NBLE||(r&0xFF)==PT_PWPO||(r&0xFF)==PT_PWNE)|| (r&0xFF)==PT_INWR && parts[r>>8].ctype!=PT_SPRK )
+ if(((r&0xFF)==PT_METL || (r&0xFF)==PT_ETRD || (r&0xFF)==PT_PSCN || (r&0xFF)==PT_NSCN || (r&0xFF)==PT_NTCT || (r&0xFF)==PT_PTCT || (r&0xFF)==PT_BMTL || (r&0xFF)==PT_RBDM || (r&0xFF)==PT_LRBD || (r&0xFF)==PT_BRMT||(r&0xFF)==PT_NBLE) || (r&0xFF)==PT_INWR && parts[r>>8].ctype!=PT_SPRK)
+
{
t = parts[i].type = PT_NONE;
parts[r>>8].ctype = parts[r>>8].type;
@@ -945,6 +1217,143 @@ void update_particles_i(pixel *vid, int start, int inc)
}
}
}
+ else if(t==PT_COAL)
+ {
+ if(parts[i].life<=0) {
+ t = PT_NONE;
+ kill_part(i);
+ create_part(-1, x, y, PT_FIRE);
+ goto killed;
+ } else if(parts[i].life < 100) {
+ parts[i].life--;
+ create_part(-1, x+rand()%3-1, y+rand()%3-1, PT_FIRE);
+ }
+ if((pv[y/CELL][x/CELL] > 4.3f)&&parts[i].tmp>40)
+ parts[i].tmp=39;
+ else if(parts[i].tmp<40&&parts[i].tmp>0)
+ parts[i].tmp--;
+ else if(parts[i].tmp<=0) {
+ t = PT_NONE;
+ kill_part(i);
+ r = create_part(-1, x, y, PT_BCOL);
+ goto killed;
+ }
+ for(nx=-2; nx<3; nx++)
+ for(ny=-2; ny<3; ny++)
+ if(x+nx>=0 && y+ny>0 &&
+ x+nx<XRES && y+ny<YRES && (nx || ny))
+ {
+ r = pmap[y+ny][x+nx];
+ if((r>>8)>=NPART || !r)
+ continue;
+ if(((r&0xFF)==PT_FIRE || (r&0xFF)==PT_PLSM) && 1>(rand()%500))
+ {
+ if(parts[i].life>100) {
+ parts[i].life = 99;
+ }
+ }
+ }
+ }
+ else if(t==PT_BCOL)
+ {
+ if(parts[i].life<=0) {
+ t = PT_NONE;
+ kill_part(i);
+ create_part(-1, x, y, PT_FIRE);
+ goto killed;
+ } else if(parts[i].life < 100) {
+ parts[i].life--;
+ create_part(-1, x+rand()%3-1, y+rand()%3-1, PT_FIRE);
+ }
+
+ for(nx=-2; nx<3; nx++)
+ for(ny=-2; ny<3; ny++)
+ if(x+nx>=0 && y+ny>0 &&
+ x+nx<XRES && y+ny<YRES && (nx || ny))
+ {
+ r = pmap[y+ny][x+nx];
+ if((r>>8)>=NPART || !r)
+ continue;
+ if(((r&0xFF)==PT_FIRE || (r&0xFF)==PT_PLSM) && 1>(rand()%500))
+ {
+ if(parts[i].life>100) {
+ parts[i].life = 99;
+ }
+ }
+ }
+ }
+ else if(t==PT_FUSE)
+ {
+ if(parts[i].life<=0) {
+ t = PT_NONE;
+ kill_part(i);
+ r = create_part(-1, x, y, PT_PLSM);
+ parts[r].life = 50;
+ goto killed;
+ } else if (parts[i].life < 40) {
+ parts[i].life--;
+ if((rand()%100)==0) {
+ r = create_part(-1, (nx=x+rand()%3-1), (ny=y+rand()%3-1), PT_PLSM);
+ parts[r].life = 50;
+ }
+ }
+ if((pv[y/CELL][x/CELL] > 2.7f)&&parts[i].tmp>40)
+ parts[i].tmp=39;
+ else if(parts[i].tmp<40&&parts[i].tmp>0)
+ parts[i].tmp--;
+ else if(parts[i].tmp<=0) {
+ t = PT_NONE;
+ kill_part(i);
+ r = create_part(-1, x, y, PT_FSEP);
+ goto killed;
+ }
+ for(nx=-2; nx<3; nx++)
+ for(ny=-2; ny<3; ny++)
+ if(x+nx>=0 && y+ny>0 &&
+ x+nx<XRES && y+ny<YRES && (nx || ny))
+ {
+ r = pmap[y+ny][x+nx];
+ if((r>>8)>=NPART || !r)
+ continue;
+ if((r&0xFF)==PT_SPRK || ((parts[i].temp>=(273.15+700.0f)) && 1>(rand()%20)))
+ {
+ if(parts[i].life>40) {
+ parts[i].life = 39;
+ }
+ }
+ }
+ }
+ else if(t==PT_FSEP)
+ {
+ if(parts[i].life<=0) {
+ t = PT_NONE;
+ kill_part(i);
+ r = create_part(-1, x, y, PT_PLSM);
+ parts[r].life = 50;
+ goto killed;
+ } else if (parts[i].life < 40) {
+ parts[i].life--;
+ if((rand()%10)==0) {
+ r = create_part(-1, (nx=x+rand()%3-1), (ny=y+rand()%3-1), PT_PLSM);
+ parts[r].life = 50;
+ }
+ }
+ for(nx=-2; nx<3; nx++)
+ for(ny=-2; ny<3; ny++)
+ if(x+nx>=0 && y+ny>0 &&
+ x+nx<XRES && y+ny<YRES && (nx || ny))
+ {
+ r = pmap[y+ny][x+nx];
+ if((r>>8)>=NPART || !r)
+ continue;
+ if((r&0xFF)==PT_SPRK || (parts[i].temp>=(273.15+400.0f)) && 1>(rand()%15))
+ {
+ if(parts[i].life>40) {
+ parts[i].life = 39;
+ }
+ }
+ }
+ }
else if(t==PT_NTCT||t==PT_PTCT||t==PT_INWR)
{
for(nx=-2; nx<3; nx++)
@@ -985,7 +1394,7 @@ void update_particles_i(pixel *vid, int start, int inc)
//t = parts[i].type = PT_WATR;
}
}
- else if(t==PT_THRM)
+ else if(t==PT_THRM)
{
for(nx=-2; nx<3; nx++)
for(ny=-2; ny<3; ny++)
@@ -996,18 +1405,18 @@ void update_particles_i(pixel *vid, int start, int inc)
continue;
if(((r&0xFF)==PT_FIRE || (r&0xFF)==PT_PLSM || (r&0xFF)==PT_LAVA))
{
- if(1>(rand()%500)){
- t = parts[i].type = PT_LAVA;
- parts[i].ctype = PT_BMTL;
- pt = parts[i].temp = 3500.0f;
- pv[y/CELL][x/CELL] += 50.0f;
- } else {
- t = parts[i].type = PT_LAVA;
- parts[i].life = 400;
- parts[i].ctype = PT_THRM;
- pt = parts[i].temp = 3500.0f;
- parts[i].tmp = 20;
- }
+ if(1>(rand()%500)) {
+ t = parts[i].type = PT_LAVA;
+ parts[i].ctype = PT_BMTL;
+ pt = parts[i].temp = 3500.0f;
+ pv[y/CELL][x/CELL] += 50.0f;
+ } else {
+ t = parts[i].type = PT_LAVA;
+ parts[i].life = 400;
+ parts[i].ctype = PT_THRM;
+ pt = parts[i].temp = 3500.0f;
+ parts[i].tmp = 20;
+ }
}
//if(t==PT_SNOW && (r&0xFF)==PT_WATR && 15>(rand()%1000))
//t = parts[i].type = PT_WATR;
@@ -1132,7 +1541,7 @@ void update_particles_i(pixel *vid, int start, int inc)
continue;
if((r&0xFF)!=PT_ACID)
{
- if ((r&0xFF)==PT_C4 || (r&0xFF)==PT_NITR || (r&0xFF)==PT_GUNP || (r&0xFF)==PT_RBDM || (r&0xFF)==PT_LRBD)
+ if ((r&0xFF)==PT_PLEX || (r&0xFF)==PT_NITR || (r&0xFF)==PT_GUNP || (r&0xFF)==PT_RBDM || (r&0xFF)==PT_LRBD)
{
t = parts[i].type = PT_FIRE;
parts[i].life = 4;
@@ -1187,16 +1596,16 @@ void update_particles_i(pixel *vid, int start, int inc)
parts[r>>8].type = PT_DUST;
if((r&0xFF)==PT_DYST && 15>(rand()%1000))
parts[r>>8].type = PT_YEST;
- if((r&0xFF)==PT_YEST){
- if(15>(rand()%100000)&&isplayer==0)
- parts[r>>8].type = PT_STKM;
- else
- parts[r>>8].type = PT_DYST;
- }
-
+ if((r&0xFF)==PT_YEST) {
+ if(15>(rand()%100000)&&isplayer==0)
+ parts[r>>8].type = PT_STKM;
+ else
+ parts[r>>8].type = PT_DYST;
+ }
+
if((r&0xFF)==PT_WATR && 15>(rand()%100))
parts[r>>8].type = PT_DSTW;
- if((r&0xFF)==PT_C4&& 15>(rand()%1000))
+ if((r&0xFF)==PT_PLEX && 15>(rand()%1000))
parts[r>>8].type = PT_GOO;
if((r&0xFF)==PT_NITR && 15>(rand()%1000))
parts[r>>8].type = PT_DESL;
@@ -1206,16 +1615,12 @@ void update_particles_i(pixel *vid, int start, int inc)
parts[r>>8].type = PT_GAS;
if((r&0xFF)==PT_COAL && 5>(rand()%100))
parts[r>>8].type = PT_WOOD;
- if((r&0xFF)==PT_DUST && 5>(rand()%100))
- parts[r>>8].type = PT_FWRK;
- if((r&0xFF)==PT_FWRK && 5>(rand()%100))
- parts[r>>8].ctype = PT_DUST;
- /*if(parts[r>>8].type>1 && parts[r>>8].type!=PT_NEUT && parts[r>>8].type-1!=PT_NEUT && parts[r>>8].type-1!=PT_STKM &&
- (ptypes[parts[r>>8].type-1].menusection==SC_LIQUID||
- ptypes[parts[r>>8].type-1].menusection==SC_EXPLOSIVE||
- ptypes[parts[r>>8].type-1].menusection==SC_GAS||
- ptypes[parts[r>>8].type-1].menusection==SC_POWDERS) && 15>(rand()%1000))
- parts[r>>8].type--;*/
+ /*if(parts[r>>8].type>1 && parts[r>>8].type!=PT_NEUT && parts[r>>8].type-1!=PT_NEUT && parts[r>>8].type-1!=PT_STKM &&
+ (ptypes[parts[r>>8].type-1].menusection==SC_LIQUID||
+ ptypes[parts[r>>8].type-1].menusection==SC_EXPLOSIVE||
+ ptypes[parts[r>>8].type-1].menusection==SC_GAS||
+ ptypes[parts[r>>8].type-1].menusection==SC_POWDERS) && 15>(rand()%1000))
+ parts[r>>8].type--;*/
}
}
else if(t==PT_PHOT)
@@ -1271,13 +1676,172 @@ void update_particles_i(pixel *vid, int start, int inc)
}
}
}
+ else if(t==PT_PCLN)
+ {
+ for(nx=-2; nx<3; nx++)
+ for(ny=-2; ny<3; ny++)
+ if(x+nx>=0 && y+ny>0 &&
+ x+nx<XRES && y+ny<YRES && (nx || ny))
+ {
+ r = pmap[y+ny][x+nx];
+ if((r>>8)>=NPART || !r)
+ continue;
+ rt = parts[r>>8].type;
+ if(rt==PT_SPRK)
+ {
+ if(parts[r>>8].ctype==PT_PSCN)
+ {
+ parts[i].life = 10;
+ }
+ else if(parts[r>>8].ctype==PT_NSCN)
+ {
+ parts[i].life = 9;
+ }
+ }
+ if(rt==PT_PCLN)
+ {
+ if(parts[i].life==10&&parts[r>>8].life<10&&parts[r>>8].life>0)
+ {
+ parts[i].life = 9;
+ }
+ else if(parts[i].life==0&&parts[r>>8].life==10)
+ {
+ parts[i].life = 10;
+ }
+ }
+ }
+ }
+ else if(t==PT_HSWC)
+ {
+ for(nx=-2; nx<3; nx++)
+ for(ny=-2; ny<3; ny++)
+ if(x+nx>=0 && y+ny>0 &&
+ x+nx<XRES && y+ny<YRES && (nx || ny))
+ {
+ r = pmap[y+ny][x+nx];
+ if((r>>8)>=NPART || !r)
+ continue;
+ rt = parts[r>>8].type;
+ if(rt==PT_SPRK)
+ {
+ if(parts[r>>8].ctype==PT_PSCN)
+ {
+ parts[i].life = 10;
+ }
+ else if(parts[r>>8].ctype==PT_NSCN)
+ {
+ parts[i].life = 9;
+ }
+ }
+ if(rt==PT_HSWC)
+ {
+ if(parts[i].life==10&&parts[r>>8].life<10&&parts[r>>8].life>0)
+ {
+ parts[i].life = 9;
+ }
+ else if(parts[i].life==0&&parts[r>>8].life==10)
+ {
+ parts[i].life = 10;
+ }
+ }
+ }
+ }
+ else if(t==PT_AMTR)
+ {
+ for(nx=-1; nx<2; nx++)
+ for(ny=-1; ny<2; ny++)
+ if(x+nx>=0 && y+ny>0 &&
+ x+nx<XRES && y+ny<YRES && (nx || ny))
+ {
+ r = pmap[y+ny][x+nx];
+ if((r>>8)>=NPART || !r)
+ continue;
+ rt = parts[r>>8].type;
+ if((r&0xFF)!=PT_AMTR && (r&0xFF)!=PT_DMND && (r&0xFF)!=PT_CLNE && (r&0xFF)!=PT_PCLN && (r&0xFF)!=PT_NONE && (r&0xFF)!=PT_PHOT && (r&0xFF)!=PT_VOID && (r&0xFF)!=PT_BHOL)
+ {
+ t = parts[i].life++;
+ if(parts[i].life==3)
+ {
+ parts[i].type = PT_NONE;
+ kill_part(i);
+ }
+ parts[r>>8].life = 0;
+ parts[r>>8].type = PT_NONE;
+ kill_part(r>>8);
+ if(2>(rand()/(RAND_MAX/100)))
+ create_part(r>>8, x+nx, y+ny, PT_PHOT);
+ pv[y/CELL][x/CELL] -= 5.0f;
+ continue;
+ }
+ }
+ }
+ else if(t==PT_FIRW) {
+ if(parts[i].tmp==0) {
+ for(nx=-1; nx<2; nx++)
+ for(ny=-1; ny<2; ny++)
+ if(x+nx>=0 && y+ny>0 &&
+ x+nx<XRES && y+ny<YRES && (nx || ny))
+ {
+ r = pmap[y+ny][x+nx];
+ if((r>>8)>=NPART || !r)
+ continue;
+ rt = parts[r>>8].type;
+ if(rt==PT_FIRE||rt==PT_PLSM||rt==PT_THDR)
+ {
+ parts[i].tmp = 1;
+ parts[i].life = rand()%50+60;
+ }
+ }
+ }
+ else if(parts[i].tmp==1) {
+ if(parts[i].life==0) {
+ parts[i].tmp=2;
+ } else {
+ float newVel = parts[i].life/25;
+ parts[i].flags = parts[i].flags&0xFFFFFFFE;
+ if((pmap[(int)(ly-newVel)][(int)lx]&0xFF)==PT_NONE) {
+ parts[i].vy = -newVel;
+ ly-=newVel;
+ iy-=newVel;
+ }
+ }
+ }
+ else if(parts[i].tmp==2) {
+ int col = rand()%200+4;
+ for(nx=-2; nx<3; nx++) {
+ for(ny=-2; ny<3; ny++) {
+ if(x+nx>=0 && y+ny>0 && x+nx<XRES && y+ny<YRES && (nx || ny))
+ {
+ int tmul = rand()%7;
+ create_part(-1, x+nx, y+ny, PT_FIRW);
+ r = pmap[y+ny][x+nx];
+ if((r>>8)>=NPART || !r)
+ continue;
+ if(parts[r>>8].type==PT_FIRW) {
+ parts[r>>8].vx = (rand()%3-1)*tmul;
+ parts[r>>8].vy = (rand()%3-1)*tmul;
+ parts[r>>8].tmp = col;
+ parts[r>>8].life = rand()%100+100;
+ parts[r>>8].temp = 6000.0f;
+ }
+ }
+ }
+ }
+ pv[y/CELL][x/CELL] += 20;
+ kill_part(i);
+ } else if(parts[i].tmp>=3) {
+ if(parts[i].life<=0) {
+ kill_part(i);
+ }
+ }
+ }
else if(t==PT_BTRY)
{
rt = 3 + (int)pv[y/CELL][x/CELL];
for(nx=-2; nx<3; nx++)
for(ny=-2; ny<3; ny++)
if(x+nx>=0 && y+ny>0 &&
- x+nx<XRES && y+ny<YRES && (nx || ny))
+ x+nx<XRES && y+ny<YRES && (nx || ny))
{
r = pmap[y+ny][x+nx];
if((r>>8)>=NPART || !r)
@@ -1293,36 +1857,36 @@ void update_particles_i(pixel *vid, int start, int inc)
}
}
}
- }else if(t==PT_SWCH)
+ } else if(t==PT_SWCH)
{
rt = 3 + (int)pv[y/CELL][x/CELL];
for(nx=-2; nx<3; nx++)
for(ny=-2; ny<3; ny++)
if(x+nx>=0 && y+ny>0 &&
- x+nx<XRES && y+ny<YRES && (nx || ny))
+ x+nx<XRES && y+ny<YRES && (nx || ny))
{
r = pmap[y+ny][x+nx];
if((r>>8)>=NPART || !r)
continue;
rt = parts[r>>8].type;
- if(parts[r>>8].type == PT_SWCH&&parts_avg(i,r>>8)!=PT_INSL)
- {
- if(parts[i].life==10&&parts[r>>8].life<10&&parts[r>>8].life>0)
- {
- parts[i].life = 9;
- }
- else if(parts[i].life==0&&parts[r>>8].life==10)
- {
- parts[i].life = 10;
- }
- }
- }
+ if(parts[r>>8].type == PT_SWCH&&parts_avg(i,r>>8)!=PT_INSL)
+ {
+ if(parts[i].life==10&&parts[r>>8].life<10&&parts[r>>8].life>0)
+ {
+ parts[i].life = 9;
+ }
+ else if(parts[i].life==0&&parts[r>>8].life==10)
+ {
+ parts[i].life = 10;
+ }
+ }
+ }
}
- if(t==PT_SWCH)
- if((parts[i].life>0&&parts[i].life<10)|| parts[i].life == 11)
- {
- parts[i].life--;
- }
+ if(t==PT_SWCH)
+ if((parts[i].life>0&&parts[i].life<10)|| parts[i].life == 11)
+ {
+ parts[i].life--;
+ }
if(t==PT_FIRE || t==PT_PLSM || t==PT_LAVA || t==PT_SPRK || fe || (t==PT_PHOT&&(1>rand()%10)))
{
for(nx=-2; nx<3; nx++)
@@ -1426,7 +1990,6 @@ void update_particles_i(pixel *vid, int start, int inc)
if(t==PT_SPRK && (rt==PT_METL||rt==PT_ETRD||rt==PT_BMTL||rt==PT_BRMT||rt==PT_LRBD||rt==PT_RBDM||rt==PT_PSCN||rt==PT_NSCN||rt==PT_NBLE) && parts[r>>8].life==0 &&
(parts[i].life<3 || ((r>>8)<i && parts[i].life<4)) && abs(nx)+abs(ny)<4)
{
-
if(!(rt==PT_PSCN&&parts[i].ctype==PT_NSCN)&&!(rt!=PT_PSCN&&!(rt==PT_NSCN&&parts[i].temp>=373.0f)&&parts[i].ctype==PT_NTCT)&&!(rt!=PT_PSCN&&!(rt==PT_NSCN&&parts[i].temp<=373.0f)&&parts[i].ctype==PT_PTCT)&&!(rt!=PT_PSCN&&!(rt==PT_NSCN)&&parts[i].ctype==PT_INWR) && pavg != PT_INSL &&!(parts[i].ctype==PT_SWCH&&(rt==PT_PSCN||rt==PT_NSCN)) )
{
parts[r>>8].type = PT_SPRK;
@@ -1434,10 +1997,8 @@ void update_particles_i(pixel *vid, int start, int inc)
parts[r>>8].ctype = rt;
if(parts[r>>8].temp+10.0f<673.0f&&!legacy_enable&&!(rt==PT_LRBD||rt==PT_RBDM||rt==PT_NTCT||rt==PT_PTCT||rt==PT_INWR))
parts[r>>8].temp = parts[r>>8].temp+10.0f;
-
}
}
-
if(t==PT_SPRK && rt==PT_NTCT && parts[r>>8].life==0 &&
(parts[i].life<3 || ((r>>8)<i && parts[i].life<4)) && abs(nx)+abs(ny)<4)
{
@@ -1468,27 +2029,7 @@ void update_particles_i(pixel *vid, int start, int inc)
parts[r>>8].ctype = rt;
}
}
- if(t==PT_SPRK && rt==PT_PWPO && parts[r>>8].life==0 &&
- (parts[i].life<3 || ((r>>8)<i && parts[i].life<4)) && abs(nx)+abs(ny)<4)
- {
- if((parts[i].ctype==PT_METL||parts[i].ctype==PT_NSCN||parts[i].ctype==PT_PSCN||parts[i].ctype==PT_PWPO)&&pavg != PT_INSL&&pv[y/CELL][x/CELL]>1.0f)
- {
- parts[r>>8].type = PT_SPRK;
- parts[r>>8].life = 4;
- parts[r>>8].ctype = rt;
- }
- }
- if(t==PT_SPRK && rt==PT_PWNE && parts[r>>8].life==0 &&
- (parts[i].life<3 || ((r>>8)<i && parts[i].life<4)) && abs(nx)+abs(ny)<4)
- {
- if((parts[i].ctype==PT_METL||parts[i].ctype==PT_NSCN||parts[i].ctype==PT_PSCN||parts[i].ctype==PT_PWNE)&&pavg != PT_INSL&&pv[y/CELL][x/CELL]<-1.0f)
- {
- parts[r>>8].type = PT_SPRK;
- parts[r>>8].life = 4;
- parts[r>>8].ctype = rt;
- }
- }
- if(t==PT_SPRK && rt==PT_WATR && parts[r>>8].life==0 &&
+ if(t==PT_SPRK && rt==PT_WATR && parts[r>>8].life==0 &&
(parts[i].life<2 || ((r>>8)<i && parts[i].life<3)) && abs(nx)+abs(ny)<4)
{
parts[r>>8].type = PT_SPRK;
@@ -1536,7 +2077,7 @@ killed:
}
if(t==PT_STKM)
{
- float dt = 0.9;///(FPSB*FPSB); //Delta time in square
+ float dt = 0.9;///(FPSB*FPSB); //Delta time in square
//Tempirature handling
if(parts[i].temp<243)
parts[i].life -= 1;
@@ -1546,7 +2087,7 @@ killed:
//Death
if(parts[i].life<1 || death == 1 || (pv[y/CELL][x/CELL]>=4.5f && player[2] != SPC_AIR) ) //If his HP is less that 0 or there is very big wind...
{
- death = 0;
+ death = 0;
for(r=-2; r<=1; r++)
{
create_part(-1, x+r, y-2, player[2]);
@@ -1558,7 +2099,7 @@ killed:
goto killed;
}
- parts[i].vy += -0.7*dt; //Head up!
+ parts[i].vy += -0.7*dt; //Head up!
//Verlet integration
pp = 2*player[3]-player[5]+player[19]*dt*dt;;
@@ -1589,18 +2130,18 @@ killed:
player[18] = player[16];
player[16] = pp;
- //Setting acceleration to 0
- player[19] = 0;
- player[20] = 0;
+ //Setting acceleration to 0
+ player[19] = 0;
+ player[20] = 0;
- player[21] = 0;
- player[22] = 0;
+ player[21] = 0;
+ player[22] = 0;
- player[23] = 0;
- player[24] = 0;
+ player[23] = 0;
+ player[24] = 0;
- player[25] = 0;
- player[26] = 0;
+ player[25] = 0;
+ player[26] = 0;
//Go left
if (((int)(player[0])&0x01) == 0x01 && pstates[pmap[(int)(parts[i].y+10)][(int)(parts[i].x)]&0xFF].state != ST_GAS)
@@ -1610,32 +2151,32 @@ killed:
{
if (pmap[(int)(player[8]-1)][(int)(player[7])])
{
- player[21] = -3;
- player[22] = -2;
- player[19] = -2;
+ player[21] = -3;
+ player[22] = -2;
+ player[19] = -2;
}
if (pmap[(int)(player[16]-1)][(int)(player[15])])
{
player[25] = -3;
- player[26] = -2;
- player[23] = -2;
+ player[26] = -2;
+ player[23] = -2;
}
}
else
{
if (pmap[(int)(player[8]-1)][(int)(player[7])]) //It should move another way in liquids
{
- player[21] = -1;
- player[22] = -1;
- player[19] = -1;
+ player[21] = -1;
+ player[22] = -1;
+ player[19] = -1;
}
if (pmap[(int)(player[16]-1)][(int)(player[15])])
{
- player[25] = -1;
- player[26] = -1;
- player[23] = -1;
+ player[25] = -1;
+ player[26] = -1;
+ player[23] = -1;
}
}
}
@@ -1648,52 +2189,52 @@ killed:
{
if (pmap[(int)(player[8]-1)][(int)(player[7])])
{
-player[21] = 3;
-player[22] = -2;
-player[19] = 2;
+ player[21] = 3;
+ player[22] = -2;
+ player[19] = 2;
}
if (pmap[(int)(player[16]-1)][(int)(player[15])])
{
-player[25] = 3;
-player[26] = -2;
-player[23] = 2;
+ player[25] = 3;
+ player[26] = -2;
+ player[23] = 2;
}
}
else
{
if (pmap[(int)(player[8]-1)][(int)(player[7])])
{
-player[21] = 1;
-player[22] = -1;
-player[19] = 1;
+ player[21] = 1;
+ player[22] = -1;
+ player[19] = 1;
}
if (pmap[(int)(player[16]-1)][(int)(player[15])])
{
-player[25] = 1;
-player[26] = -1;
-player[23] = 1;
+ player[25] = 1;
+ player[26] = -1;
+ player[23] = 1;
}
}
}
- //Jump
- if (((int)(player[0])&0x04) == 0x04 && (pstates[pmap[(int)(player[8]-0.5)][(int)(player[7])]&0xFF].state != ST_GAS || pstates[pmap[(int)(player[16]-0.5)][(int)(player[15])]&0xFF].state != ST_GAS))
- {
- if (pmap[(int)(player[8]-0.5)][(int)(player[7])] || pmap[(int)(player[16]-0.5)][(int)(player[15])])
- {
- parts[i].vy = -5;
- player[22] -= 1;
- player[26] -= 1;
- }
- }
+ //Jump
+ if (((int)(player[0])&0x04) == 0x04 && (pstates[pmap[(int)(player[8]-0.5)][(int)(player[7])]&0xFF].state != ST_GAS || pstates[pmap[(int)(player[16]-0.5)][(int)(player[15])]&0xFF].state != ST_GAS))
+ {
+ if (pmap[(int)(player[8]-0.5)][(int)(player[7])] || pmap[(int)(player[16]-0.5)][(int)(player[15])])
+ {
+ parts[i].vy = -5;
+ player[22] -= 1;
+ player[26] -= 1;
+ }
+ }
//Charge detector wall if foot inside
- if(bmap[(int)(player[8]+0.5)/CELL][(int)(player[7]+0.5)/CELL]==4)
+ if(bmap[(int)(player[8]+0.5)/CELL][(int)(player[7]+0.5)/CELL]==6)
set_emap((int)player[7]/CELL, (int)player[8]/CELL);
- if(bmap[(int)(player[16]+0.5)/CELL][(int)(player[15]+0.5)/CELL]==4)
+ if(bmap[(int)(player[16]+0.5)/CELL][(int)(player[15]+0.5)/CELL]==6)
set_emap((int)(player[15]+0.5)/CELL, (int)(player[16]+0.5)/CELL);
//Searching for particles near head
@@ -1703,9 +2244,9 @@ player[23] = 1;
if(!pmap[ny+y][nx+x] || (pmap[ny+y][nx+x]>>8)>=NPART)
continue;
if(ptypes[pmap[ny+y][nx+x]&0xFF].falldown!=0 || (pmap[ny+y][nx+x]&0xFF) == PT_NEUT || (pmap[ny+y][nx+x]&0xFF) == PT_PHOT)
- {
- player[2] = pmap[ny+y][nx+x]&0xFF; //Current element
- }
+ {
+ player[2] = pmap[ny+y][nx+x]&0xFF; //Current element
+ }
if((pmap[ny+y][nx+x]&0xFF) == PT_PLNT && parts[i].life<100) //Plant gives him 5 HP
{
if(parts[i].life<=95)
@@ -1720,8 +2261,8 @@ player[23] = 1;
parts[i].life -= (102-parts[i].life)/2;
kill_part(pmap[ny+y][nx+x]>>8);
}
- if(bmap[(ny+y)/CELL][(nx+x)/CELL]==7)
- player[2] = SPC_AIR;
+ if(bmap[(ny+y)/CELL][(nx+x)/CELL]==4)
+ player[2] = SPC_AIR;
}
//Head position
@@ -1741,10 +2282,10 @@ player[23] = 1;
}
else
{
- if(player[2] == SPC_AIR)
- create_parts(nx + 3*((((int)player[1])&0x02) == 0x02) - 3*((((int)player[1])&0x01) == 0x01), ny, 4, SPC_AIR);
- else
- create_part(-1, nx, ny, player[2]);
+ if(player[2] == SPC_AIR)
+ create_parts(nx + 3*((((int)player[1])&0x02) == 0x02) - 3*((((int)player[1])&0x01) == 0x01), ny, 4, SPC_AIR);
+ else
+ create_part(-1, nx, ny, player[2]);
r = pmap[ny][nx];
if( ((r>>8) < NPART) && (r>>8)>=0 && player[2] != PT_PHOT && player[2] != SPC_AIR)
@@ -1797,11 +2338,11 @@ player[23] = 1;
for(nx = -3; nx <= 3; nx++)
{
r = pmap[(int)(player[16]-2)][(int)(player[15]+nx)];
- if(r && pstates[r&0xFF].state != ST_GAS && pstates[r&0xFF].state != ST_LIQUID)
+ if(r && pstates[r&0xFF].state != ST_GAS && pstates[r&0xFF].state != ST_LIQUID)
player[15] -= nx;
r = pmap[(int)(player[8]-2)][(int)(player[7]+nx)];
- if(r && pstates[r&0xFF].state != ST_GAS && pstates[r&0xFF].state != ST_LIQUID)
+ if(r && pstates[r&0xFF].state != ST_GAS && pstates[r&0xFF].state != ST_LIQUID)
player[7] -= nx;
}
@@ -1824,11 +2365,11 @@ player[23] = 1;
}
else
{
- if(pstates[r&0xFF].state != ST_GAS)
- {
- player[8] += ny-1;
- parts[i].vy -= 0.5*parts[i].vy*dt;
- }
+ if(pstates[r&0xFF].state != ST_GAS)
+ {
+ player[8] += ny-1;
+ parts[i].vy -= 0.5*parts[i].vy*dt;
+ }
}
player[9] = player[7];
}
@@ -1850,10 +2391,10 @@ player[23] = 1;
else
{
if(pstates[r&0xFF].state != ST_GAS)
- {
- player[16] += ny-1;
- parts[i].vy -= 0.5*parts[i].vy*dt;
- }
+ {
+ player[16] += ny-1;
+ parts[i].vy -= 0.5*parts[i].vy*dt;
+ }
}
player[17] = player[15];
}
@@ -1870,14 +2411,14 @@ player[23] = 1;
//Keeping legs distance
if (pow((player[7] - player[15]), 2)<16 && pow((player[8]-player[16]), 2)<1)
{
- player[21] -= 0.2;
- player[25] += 0.2;
+ player[21] -= 0.2;
+ player[25] += 0.2;
}
if (pow((player[3] - player[11]), 2)<16 && pow((player[4]-player[12]), 2)<1)
{
player[19] -= 0.2;
- player[23] += 0.2;
+ player[23] += 0.2;
}
//If legs touch something
@@ -1942,83 +2483,37 @@ player[23] = 1;
else
create_part(-1, x+rand()%3-1, y+rand()%3-1, parts[i].ctype);
}
+ if(parts[i].type==PT_PCLN)
+ {
+ if(!parts[i].ctype)
+ for(nx=-1; nx<2; nx++)
+ for(ny=-1; ny<2; ny++)
+ if(x+nx>=0 && y+ny>0 &&
+ x+nx<XRES && y+ny<YRES &&
+ pmap[y+ny][x+nx] &&
+ (pmap[y+ny][x+nx]&0xFF)!=PT_CLNE &&
+ (pmap[y+ny][x+nx]&0xFF)!=PT_PCLN &&
+ (pmap[y+ny][x+nx]&0xFF)!=PT_SPRK &&
+ (pmap[y+ny][x+nx]&0xFF)!=PT_NSCN &&
+ (pmap[y+ny][x+nx]&0xFF)!=PT_PSCN &&
+ (pmap[y+ny][x+nx]&0xFF)!=PT_STKM &&
+ (pmap[y+ny][x+nx]&0xFF)!=0xFF)
+ parts[i].ctype = pmap[y+ny][x+nx]&0xFF;
+ if(parts[i].ctype && parts[i].life==10)
+ create_part(-1, x+rand()%3-1, y+rand()%3-1, parts[i].ctype);
+ }
if(t==PT_YEST)
{
- if(parts[i].temp>303&&parts[i].temp<317){
- create_part(-1, x+rand()%3-1, y+rand()%3-1, PT_YEST);
- }
- }
- if(t==PT_FWRK)
- {
- if((parts[i].temp>400&&(9+parts[i].temp/40)>rand()%100000&&parts[i].life==0&&!pmap[y-1][x])||parts[i].ctype==PT_DUST)
- {
-
- create_part(-1, x , y-1 , PT_FWRK);
- r = pmap[y-1][x];
- if(parts[r>>8].type==PT_FWRK)
- {
- parts[r>>8].vy = rand()%8-22;
- parts[r>>8].vx = rand()%20-rand()%20;
- parts[r>>8].life=rand()%30+50;
- parts[i].type=PT_NONE;
- }
- }
- if(parts[i].life>1)
- {
- parts[i].life--;
- if(parts[i].life>=90&&parts[i].type==PT_FWRK)
- parts[i].life=0;
- }
- if((parts[i].life<3&&parts[i].life>0)||parts[i].vy>6&&parts[i].life>0)
- {
- int q = (rand()%255+1);
- int w = (rand()%255+1);
- int e = (rand()%255+1);
- for(nx=-1; nx<2; nx++)
- for(ny=-2; ny<3; ny++)
- if(x+nx>=0 && y+ny>0 &&
- x+nx<XRES && y+ny<YRES)
- {
- if(5>=rand()%8)
- {
- if(!pmap[y+ny][x+nx])
- {
- create_part(-1, x+nx, y+ny , PT_DUST);
- pv[y/CELL][x/CELL] += 2.00f*CFDS;
- a= pmap[y+ny][x+nx];
- if(parts[a>>8].type==PT_DUST)
- {
- parts[a>>8].vy = -(rand()%10-1);
- parts[a>>8].vx = ((rand()%2)*2-1)*rand()%(5+5)+(parts[i].vx)*2 ;
- parts[a>>8].life= rand()%75+35;
- parts[a>>8].tmp=q;
- parts[a>>8].flags=w;
- parts[a>>8].ctype=e;
- parts[a>>8].temp= rand()%20+600;
- }
- }
- }
-
- }
- parts[i].type=PT_NONE;
- }
- }
- if(t==PT_DUST&&!parts[i].life==0)
- {
- if(parts[i].life>=0)
- {
- parts[i].life--;
- if(parts[i].life<1)
- parts[i].type=PT_NONE;
- }
-
- }
+ if(parts[i].temp>303&&parts[i].temp<317) {
+ create_part(-1, x+rand()%3-1, y+rand()%3-1, PT_YEST);
+ }
+ }
if(t==PT_PLSM&&parts[i].ctype == PT_NBLE&&parts[i].life <=1)
{
parts[i].type = PT_NBLE;
parts[i].life = 0;
}
- if (t==PT_FIRE && parts[i].life <=1 && parts[i].temp<673)
+ if (t==PT_FIRE && parts[i].life <=1 && parts[i].temp<625)
{
t = parts[i].type = PT_SMKE;
parts[i].life = rand()%20+250;
@@ -2036,6 +2531,55 @@ player[23] = 1;
continue;
}
+ if(parts[i].type == PT_PHOT) {
+ rt = pmap[ny][nx] & 0xFF;
+
+ if(rt==PT_CLNE) {
+ lt = pmap[ny][nx] >> 8;
+ if(!parts[lt].ctype)
+ parts[lt].ctype = PT_PHOT;
+ }
+
+ lt = pmap[y][x] & 0xFF;
+
+ r = eval_move(PT_PHOT, nx, ny, NULL);
+
+ if(((rt==PT_GLAS && lt!=PT_GLAS) || (rt!=PT_GLAS && lt==PT_GLAS)) && r) {
+ if(!get_normal_interp(REFRACT|parts[i].type, x, y, parts[i].vx, parts[i].vy, &nrx, &nry)) {
+ kill_part(i);
+ continue;
+ }
+
+ r = get_wavelength_bin(&parts[i].ctype);
+ if(r == -1) {
+ kill_part(i);
+ continue;
+ }
+ nn = GLASS_IOR - GLASS_DISP*(r-15)/15.0f;
+ nn *= nn;
+
+ nrx = -nrx;
+ nry = -nry;
+ if(rt==PT_GLAS && lt!=PT_GLAS)
+ nn = 1.0f/nn;
+ ct1 = parts[i].vx*nrx + parts[i].vy*nry;
+ ct2 = 1.0f - (nn*nn)*(1.0f-(ct1*ct1));
+ if(ct2 < 0.0f) {
+ parts[i].vx -= 2.0f*ct1*nrx;
+ parts[i].vy -= 2.0f*ct1*nry;
+ parts[i].x = lx;
+ parts[i].y = ly;
+ nx = (int)(lx + 0.5f);
+ ny = (int)(ly + 0.5f);
+ } else {
+ ct2 = sqrtf(ct2);
+ ct2 = ct2 - nn*ct1;
+ parts[i].vx = nn*parts[i].vx + ct2*nrx;
+ parts[i].vy = nn*parts[i].vy + ct2*nry;
+ }
+ }
+ }
+
rt = parts[i].flags & FLAG_STAGNANT;
parts[i].flags &= ~FLAG_STAGNANT;
if(!try_move(i, x, y, nx, ny))
@@ -2149,44 +2693,92 @@ player[23] = 1;
else
{
parts[i].flags |= FLAG_STAGNANT;
- if(nx>x+ISTP) nx=x+ISTP;
- if(nx<x-ISTP) nx=x-ISTP;
- if(ny>y+ISTP) ny=y+ISTP;
- if(ny<y-ISTP) ny=y-ISTP;
if(t==PT_NEUT && 100>(rand()%1000))
{
kill_part(i);
continue;
}
- else if(try_move(i, x, y, 2*x-nx, ny))
- {
- parts[i].x = (float)(2*x-nx);
- parts[i].y = (float)iy;
- parts[i].vx *= ptypes[t].collision;
- }
- else if(try_move(i, x, y, nx, 2*y-ny))
+ else if(t==PT_NEUT || t==PT_PHOT)
{
- parts[i].x = (float)ix;
- parts[i].y = (float)(2*y-ny);
- parts[i].vy *= ptypes[t].collision;
+ r = pmap[ny][nx];
+
+ /* this should be replaced with a particle type attribute ("photwl" or something) */
+ if((r & 0xFF) == PT_PSCN) parts[i].ctype = 0x00000000;
+ if((r & 0xFF) == PT_NSCN) parts[i].ctype = 0x00000000;
+ if((r & 0xFF) == PT_COAL) parts[i].ctype = 0x00000000;
+ if((r & 0xFF) == PT_BCOL) parts[i].ctype = 0x00000000;
+ if((r & 0xFF) == PT_PLEX) parts[i].ctype &= 0x1F00003E;
+ if((r & 0xFF) == PT_NITR) parts[i].ctype &= 0x0007C000;
+ if((r & 0xFF) == PT_NBLE) parts[i].ctype &= 0x3FFF8000;
+ if((r & 0xFF) == PT_LAVA) parts[i].ctype &= 0x3FF00000;
+ if((r & 0xFF) == PT_ACID) parts[i].ctype &= 0x1FE001FE;
+ if((r & 0xFF) == PT_DUST) parts[i].ctype &= 0x3FFFFFC0;
+ if((r & 0xFF) == PT_SNOW) parts[i].ctype &= 0x03FFFFFF;
+ if((r & 0xFF) == PT_GOO) parts[i].ctype &= 0x3FFAAA00;
+ if((r & 0xFF) == PT_PLNT) parts[i].ctype &= 0x0007C000;
+ if((r & 0xFF) == PT_PLUT) parts[i].ctype &= 0x001FCE00;
+ if((r & 0xFF) == PT_URAN) parts[i].ctype &= 0x003FC000;
+
+ if(get_normal_interp(t, lx, ly, parts[i].vx, parts[i].vy, &nrx, &nry)) {
+ dp = nrx*parts[i].vx + nry*parts[i].vy;
+ parts[i].vx -= 2.0f*dp*nrx;
+ parts[i].vy -= 2.0f*dp*nry;
+ nx = (int)(parts[i].x + parts[i].vx + 0.5f);
+ ny = (int)(parts[i].y + parts[i].vy + 0.5f);
+ if(try_move(i, x, y, nx, ny)) {
+ parts[i].x = (float)nx;
+ parts[i].y = (float)ny;
+ } else {
+ kill_part(i);
+ continue;
+ }
+ } else {
+ kill_part(i);
+ continue;
+ }
+
+ if(!parts[i].ctype) {
+ kill_part(i);
+ continue;
+ }
}
+
else
{
- parts[i].vx *= ptypes[t].collision;
- parts[i].vy *= ptypes[t].collision;
+ if(nx>x+ISTP) nx=x+ISTP;
+ if(nx<x-ISTP) nx=x-ISTP;
+ if(ny>y+ISTP) ny=y+ISTP;
+ if(ny<y-ISTP) ny=y-ISTP;
+ if(try_move(i, x, y, 2*x-nx, ny))
+ {
+ parts[i].x = (float)(2*x-nx);
+ parts[i].y = (float)iy;
+ parts[i].vx *= ptypes[t].collision;
+ }
+ else if(try_move(i, x, y, nx, 2*y-ny))
+ {
+ parts[i].x = (float)ix;
+ parts[i].y = (float)(2*y-ny);
+ parts[i].vy *= ptypes[t].collision;
+ }
+ else
+ {
+ parts[i].vx *= ptypes[t].collision;
+ parts[i].vy *= ptypes[t].collision;
+ }
}
}
}
- if(nx<CELL || nx>=XRES-CELL || ny<CELL || ny>=YRES-CELL)
- {
+ if(nx<CELL || nx>=XRES-CELL || ny<CELL || ny>=YRES-CELL)
+ {
kill_part(i);
continue;
}
}
- if(framerender){
- framerender = 0;
- sys_pause = 1;
- }
+ if(framerender) {
+ framerender = 0;
+ sys_pause = 1;
+ }
}
void update_particles(pixel *vid)
@@ -2209,8 +2801,10 @@ void update_particles(pixel *vid)
t = parts[i].type;
x = (int)(parts[i].x+0.5f);
y = (int)(parts[i].y+0.5f);
- if(x>=0 && y>=0 && x<XRES && y<YRES)
- pmap[y][x] = t|(i<<8);
+ if(x>=0 && y>=0 && x<XRES && y<YRES && parts[i].type!=PT_PHOT) {
+ if(parts[i].type!=PT_NEUT || (pmap[y][x]&0xFF)!=PT_GLAS)
+ pmap[y][x] = t|(i<<8);
+ }
}
else
{
@@ -2225,7 +2819,7 @@ void update_particles(pixel *vid)
{
for(x=0; x<XRES/CELL; x++)
{
- if(bmap[y][x]==11)
+ if(bmap[y][x]==1)
for(j=0; j<CELL; j++)
for(i=0; i<CELL; i++)
{
@@ -2234,14 +2828,14 @@ void update_particles(pixel *vid)
drawblob(vid, (x*CELL+i), (y*CELL+j), 0x80, 0x80, 0x80);
}
- if(bmap[y][x]==9)
+ if(bmap[y][x]==2)
for(j=0; j<CELL; j+=2)
for(i=(j>>1)&1; i<CELL; i+=2)
{
vid[(y*CELL+j)*(XRES+BARSIZE)+(x*CELL+i)] = PIXPACK(0x808080);
drawblob(vid, (x*CELL+i), (y*CELL+j), 0x80, 0x80, 0x80);
}
- if(bmap[y][x]==8)
+ if(bmap[y][x]==3)
{
for(j=0; j<CELL; j++)
for(i=0; i<CELL; i++)
@@ -2271,7 +2865,7 @@ void update_particles(pixel *vid)
vid[(y*CELL+j)*(XRES+BARSIZE)+(x*CELL+i)] = PIXPACK(0x8080FF);
drawblob(vid, (x*CELL+i), (y*CELL+j), 0x80, 0x80, 0xFF);
}
- if(bmap[y][x]==7)
+ if(bmap[y][x]==6)
{
for(j=0; j<CELL; j+=2)
for(i=(j>>1)&1; i<CELL; i+=2)
@@ -2295,7 +2889,7 @@ void update_particles(pixel *vid)
fire_b[y][x] = cb;
}
}
- if(bmap[y][x]==3)
+ if(bmap[y][x]==7)
{
if(emap[y][x])
{
@@ -2331,7 +2925,7 @@ void update_particles(pixel *vid)
}
}
}
- if(bmap[y][x]==2)
+ if(bmap[y][x]==8)
{
for(j=0; j<CELL; j++)
for(i=0; i<CELL; i++)
@@ -2362,7 +2956,7 @@ void update_particles(pixel *vid)
fire_b[y][x] = cb;
}
}
- if(bmap[y][x]==14)
+ if(bmap[y][x]==11)
{
for(j=0; j<CELL; j++)
for(i=0; i<CELL; i++)
@@ -2389,7 +2983,7 @@ void update_particles(pixel *vid)
fire_b[y][x] = cb;
}
}
- if(bmap[y][x]==20)
+ if(bmap[y][x]==13)
{
for(j=0; j<CELL; j+=2)
{
@@ -2400,7 +2994,7 @@ void update_particles(pixel *vid)
}
}
}
- if(bmap[y][x]==12)
+ if(bmap[y][x]==9)
{
for(j=0; j<CELL; j+=2)
{
@@ -2411,7 +3005,7 @@ void update_particles(pixel *vid)
}
}
}
- if(bmap[y][x]==13)
+ if(bmap[y][x]==10)
{
for(j=0; j<CELL; j+=2)
{
@@ -2422,7 +3016,7 @@ void update_particles(pixel *vid)
}
}
}
- if(bmap[y][x]==15)
+ if(bmap[y][x]==12)
{
if(emap[y][x])
{
@@ -2478,23 +3072,23 @@ void update_particles(pixel *vid)
{
for(x=0; x<XRES/CELL; x++)
{
- if(bmap[y][x]==11)
+ if(bmap[y][x]==1)
for(j=0; j<CELL; j++)
for(i=0; i<CELL; i++)
{
pmap[y*CELL+j][x*CELL+i] = 0x7FFFFFFF;
vid[(y*CELL+j)*(XRES+BARSIZE)+(x*CELL+i)] = PIXPACK(0x808080);
}
- if(bmap[y][x]==9)
+ if(bmap[y][x]==2)
for(j=0; j<CELL; j+=2)
for(i=(j>>1)&1; i<CELL; i+=2)
vid[(y*CELL+j)*(XRES+BARSIZE)+(x*CELL+i)] = PIXPACK(0x808080);
- if(bmap[y][x]==8)
- {
- for(j=0; j<CELL; j++)
- for(i=0; i<CELL; i++)
- if(!((y*CELL+j)%2) && !((x*CELL+i)%2))
- vid[(y*CELL+j)*(XRES+BARSIZE)+(x*CELL+i)] = PIXPACK(0xC0C0C0);
+ if(bmap[y][x]==3)
+ {
+ for(j=0; j<CELL; j++)
+ for(i=0; i<CELL; i++)
+ if(!((y*CELL+j)%2) && !((x*CELL+i)%2))
+ vid[(y*CELL+j)*(XRES+BARSIZE)+(x*CELL+i)] = PIXPACK(0xC0C0C0);
if(emap[y][x])
{
cr = cg = cb = 16;
@@ -2509,11 +3103,11 @@ void update_particles(pixel *vid)
fire_b[y][x] = cb;
}
}
- if(bmap[y][x]==7)
+ if(bmap[y][x]==4)
for(j=0; j<CELL; j+=2)
for(i=(j>>1)&1; i<CELL; i+=2)
vid[(y*CELL+j)*(XRES+BARSIZE)+(x*CELL+i)] = PIXPACK(0x8080FF);
- if(bmap[y][x]==4)
+ if(bmap[y][x]==6)
{
for(j=0; j<CELL; j+=2)
for(i=(j>>1)&1; i<CELL; i+=2)
@@ -2534,7 +3128,7 @@ void update_particles(pixel *vid)
fire_b[y][x] = cb;
}
}
- if(bmap[y][x]==3)
+ if(bmap[y][x]==7)
{
if(emap[y][x])
{
@@ -2564,7 +3158,7 @@ void update_particles(pixel *vid)
vid[(y*CELL+j)*(XRES+BARSIZE)+(x*CELL+i)] = PIXPACK(0x808080);
}
}
- if(bmap[y][x]==2)
+ if(bmap[y][x]==8)
{
for(j=0; j<CELL; j++)
for(i=0; i<CELL; i++)
@@ -2589,7 +3183,7 @@ void update_particles(pixel *vid)
fire_b[y][x] = cb;
}
}
- if(bmap[y][x]==14)
+ if(bmap[y][x]==11)
{
for(j=0; j<CELL; j++)
for(i=0; i<CELL; i++)
@@ -2613,7 +3207,7 @@ void update_particles(pixel *vid)
fire_b[y][x] = cb;
}
}
- if(bmap[y][x]==12)
+ if(bmap[y][x]==9)
{
for(j=0; j<CELL; j+=2)
{
@@ -2623,7 +3217,7 @@ void update_particles(pixel *vid)
}
}
}
- if(bmap[y][x]==20)
+ if(bmap[y][x]==13)
{
for(j=0; j<CELL; j+=2)
{
@@ -2633,7 +3227,7 @@ void update_particles(pixel *vid)
}
}
}
- if(bmap[y][x]==13)
+ if(bmap[y][x]==10)
{
for(j=0; j<CELL; j+=2)
{
@@ -2643,7 +3237,7 @@ void update_particles(pixel *vid)
}
}
}
- if(bmap[y][x]==15)
+ if(bmap[y][x]==12)
{
if(emap[y][x])
{
@@ -2825,8 +3419,8 @@ int flood_parts(int x, int y, int c, int cm, int bm)
int create_parts(int x, int y, int r, int c)
{
- int i, j, f = 0, u, v, oy, ox, b = 0, dw = 0, q=0; //n;
-
+ int i, j, f = 0, u, v, oy, ox, b = 0, dw = 0; //n;
+
if(c == 125)
{
i = x / CELL;
@@ -2841,64 +3435,69 @@ int create_parts(int x, int y, int r, int c)
return 1;
}
//LOLOLOLOLLOLOLOLO
- if(c == 122)
+ if(c == 127)
{
- b = 2;
+ b = 4;
dw = 1;
}
- if(c == 123)
+ if(c == 122)
{
- b = 3;
+ b = 8;
dw = 1;
}
- if(c == 124)
+ if(c == 123)
{
- b = 4;
+ b = 7;
dw = 1;
}
- if(c == 127)
+ if(c == 124)
{
- b = 7;
+ b = 6;
dw = 1;
}
if(c == 128)
{
- b = 8;
+ b = 3;
dw = 1;
}
if(c == 129)
{
- b = 9;
+ b = 2;
+ dw = 1;
+ }
+ if(c == 130)
+ {
+ b = 0;
dw = 1;
}
if(c == 131)
{
- b = 11;
+ b = 1;
dw = 1;
}
if(c == 132)
{
- b = 12;
+ b = 9;
dw = 1;
}
if(c == 133)
{
- b = 13;
+ b = 10;
dw = 1;
}
if(c == 134)
{
- b = 14;
+ b = 11;
dw = 1;
}
if(c == 135)
{
- b = 15;
+ b = 12;
dw = 1;
}
if(c == 140)
{
- b = 20;
+ b = 13;
dw = 1;
}
if(c == 255)
@@ -2906,42 +3505,6 @@ int create_parts(int x, int y, int r, int c)
b = 255;
dw = 1;
}
- if(c==130)
- {
- if(PSR!=130&&(PSR>121&&PSR<141))
- {
- r = r/CELL;
- x = x/CELL;
- y = y/CELL;
- x -= r/2;
- y -= r/2;
- for (ox=x; ox<=x+r; ox++)
- {
- for (oy=y; oy<=y+r; oy++)
- {
- if(ox>=0&&ox<XRES/CELL&&oy>=0&&oy<YRES/CELL)
- {
- i = ox;
- j = oy;
- q = bmap[j][i]+120;
- {
- if(q==PSR)
- {
- bmap[j][i]=0;
- return 1;
- }
- }
- }
- }
- }
- return 1;
- }
- else
- {
- b=0;
- dw=1;
- }
- }
if(dw==1)
{
r = r/CELL;
@@ -2957,34 +3520,32 @@ int create_parts(int x, int y, int r, int c)
{
i = ox;
j = oy;
- if(b==7)
+ if(b==4)
{
fvx[j][i] = 0.0f;
fvy[j][i] = 0.0f;
}
-
bmap[j][i] = b;
}
}
}
return 1;
- }
-
- if(c == 0||((sdl_mod & (KMOD_LALT|KMOD_RALT))&&(PSR>0||SEC>0)))
+ }
+ if(c == SPC_AIR || c == SPC_HEAT || c == SPC_COOL || c == SPC_VACUUM)
{
for(j=-r; j<=r; j++)
for(i=-r; i<=r; i++)
if(i*i+j*j<=r*r)
- delete_part(x+i, y+j);
+ create_part(-1, x+i, y+j, c);
return 1;
}
- if(c == SPC_AIR || c == SPC_HEAT || c == SPC_COOL || c == SPC_VACUUM)
+ if(c == 0)
{
for(j=-r; j<=r; j++)
for(i=-r; i<=r; i++)
if(i*i+j*j<=r*r)
- create_part(-1, x+i, y+j, c);
+ delete_part(x+i, y+j);
return 1;
}
diff --git a/update.c b/src/update.c
index ba32b54..99b9d1b 100644
--- a/update.c
+++ b/src/update.c
@@ -37,7 +37,7 @@
#include <sys/param.h>
#endif
-#include "update.h"
+#include <update.h>
static char *exe_name(void)
{