diff --git a/data/hmap.cpp b/data/hmap.cpp deleted file mode 100644 index 1f24c651d..000000000 --- a/data/hmap.cpp +++ /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 - */ -#include "hmap.h" -extern const unsigned char color_data[] = {0x2B,0x00,0xFF,0x2B,0x00,0xFF,0x28,0x04,0xFF,0x24,0x08,0xFF,0x20,0x0D,0xFF,0x1C,0x12,0xFF,0x17,0x18,0xFF,0x12,0x1E,0xFF,0x0D,0x25,0xFF,0x07,0x2D,0xFF,0x03,0x35,0xFF,0x01,0x3E,0xFF,0x00,0x42,0xFF,0x00,0x44,0xFF,0x00,0x48,0xFF,0x00,0x4A,0xFF,0x00,0x4D,0xFF,0x00,0x51,0xFF,0x00,0x54,0xFF,0x00,0x58,0xFF,0x00,0x5C,0xFF,0x00,0x5E,0xFF,0x00,0x62,0xFF,0x00,0x66,0xFF,0x00,0x6A,0xFF,0x00,0x6D,0xFF,0x00,0x71,0xFF,0x00,0x75,0xFF,0x00,0x79,0xFF,0x00,0x7C,0xFF,0x00,0x7F,0xFF,0x00,0x83,0xFF,0x00,0x87,0xFF,0x00,0x8B,0xFF,0x00,0x8F,0xFF,0x00,0x92,0xFF,0x00,0x96,0xFF,0x00,0x99,0xFF,0x00,0x9C,0xFF,0x00,0xA0,0xFF,0x00,0xA3,0xFF,0x00,0xA7,0xFF,0x00,0xAA,0xFF,0x00,0xAD,0xFF,0x00,0xAE,0xFE,0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0xFF,0xA3,0x00,0xFF,0xA1,0x00,0xFF,0x9F,0x00,0xFF,0x9C,0x00,0xFF,0x99,0x00,0xFF,0x97,0x00,0xFF,0x95,0x00,0xFF,0x93,0x00,0xFF,0x90,0x00,0xFF,0x8F,0x00,0xFF,0x8C,0x00,0xFF,0x8A,0x00,0xFF,0x88,0x00,0xFF,0x86,0x00,0xFF,0x83,0x00,0xFF,0x81,0x00,0xFF,0x7F,0x00,0xFF,0x7D,0x00,0xFF,0x7C,0x00,0xFF,0x7A,0x00,0xFF,0x78,0x00,0xFF,0x76,0x00,0xFF,0x74,0x00,0xFF,0x72,0x00,0xFF,0x71,0x00,0xFF,0x6F,0x00,0xFF,0x6D,0x00,0xFF,0x6A,0x00,0xFF,0x69,0x00,0xFF,0x67,0x00,0xFF,0x65,0x00,0xFF,0x64,0x00,0xFF,0x61,0x00,0xFF,0x5F,0x00,0xFF,0x5D,0x00,0xFF,0x5B,0x00,0xFF,0x5A,0x00,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,0xFF,0x00,0x80,0xFF,0x00,0x82,0xFF,0x00,0x83,0xFF,0x00,0x83,0xFF,0x00,0x84,0xFF,0x00,0x86,0xFF,0x00,0x87,0xFF,0x00,0x88,0xFF,0x00,0x89,0xFF,0x00,0x8A,0xFF,0x00,0x8C,0xFF,0x00,0x8D,0xFF,0x00,0x8E,0xFF,0x00,0x8F,0xFF,0x00,0x90,0xFF,0x00,0x92,0xFF,0x00,0x93,0xFF,0x00,0x93,0xFF,0x00,0x94,0xFF,0x00,0x96,0xFF,0x00,0x97,0xFF,0x00,0x98,0xFF,0x00,0x99,0xFF,0x00,0x9A,0xFF,0x00,0x9B,0xFF,0x00,0x9C,0xFF,0x00,0x9E,0xFF,0x00,0x9E,0xFF,0x00,0x9F,0xFF,0x00,0xA0,0xFF,0x00,0xA1,0xFF,0x00,0xA3,0xFF,0x00,0xA4,0xFF,0x00,0xA4,0xFF,0x00,0xA6,0xFF,0x00,0xA7,0xFF,0x00,0xA7,0xFF,0x00,0xA9,0xFF,0x00,0xAA,0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,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,0x8A,0xFF,0x00,0x8A,0xFF,0x00,0x8B,0xFF,0x00,0x8C,0xFF,0x00,0x8D,0xFF,0x00,0x8E,0xFF,0x00,0x8F,0xFF,0x00,0x90,0xFF,0x00,0x90,0xFF,0x00,0x91,0xFF,0x00,0x92,0xFF,0x00,0x92,0xFF,0x00,0x94,0xFF,0x00,0x94,0xFF,0x00,0x95,0xFF,0x00,0x95,0xFF,0x00,0x97,0xFF,0x00,0x98,0xFF,0x00,0x98,0xFF,0x00,0x99,0xFF,0x00,0x9A,0xFF,0x00,0x9B,0xFF,0x00,0x9B,0xFF,0x00,0x9C,0xFF,0x00,0x9D,0xFF,0x00,0x9E,0xFF,0x00,0x9F,0xFF,0x00,0x9F,0xFF,0x00,0xA0,0xFF,0x00,0xA1,0xFF,0x00,0xA2,0xFF,0x00,0xA2,0xFF,0x00,0xA3,0xFF,0x00,0xA4,0xFF,0x00,0xA5,0xFF,0x00,0xA6,0xFF,0x00,0xA6,0xFF,0x00,0xA7,0xFF,0x00,0xA8,0x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,0x00,0xD4}; //1024 Pixels -//extern const 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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,0x8B,0xC0,0x8C,0x8D,0xC1,0x8D,0x8F,0xC1,0x8E,0x90,0xC2,0x8F,0x91,0xC1,0x90,0x92,0xC2,0x91,0x94,0xC3,0x93,0x95,0xC3,0x93,0x97,0xC3,0x95,0x98,0xC3,0x96,0x99,0xC3,0x98,0x9B,0xC4,0x99,0x9C,0xC3,0x9A,0x9E,0xC4,0x9B,0x9F,0xC4,0x9D,0xA0,0xC4,0x9E,0xA2,0xC4,0x9F,0xA4,0xC4,0xA0,0xA5,0xC4,0xA2,0xA6,0xC4,0xA4,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}; //200 Pixels -extern const unsigned 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,0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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,0x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08,0x00,0xFF,0x04,0x00,0xFF,0x00,0x00,}; //200 Pixels diff --git a/data/hmap.h b/data/hmap.h deleted file mode 100644 index 6eb7dd73d..000000000 --- a/data/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 - */ -#pragma once -extern const unsigned char color_data[]; -//extern const char plasma_data[]; -extern const unsigned char hflm_data[]; -extern const unsigned char firw_data[]; diff --git a/data/meson.build b/data/meson.build index c55266c9f..a089c85fb 100644 --- a/data/meson.build +++ b/data/meson.build @@ -1,4 +1 @@ -data_files += files( - 'hmap.cpp', -) data_files += to_array.process('font.bz2', extra_args: 'compressed_font_data') diff --git a/src/client/GameSave.cpp b/src/client/GameSave.cpp index a37e0c7c1..cf46f626c 100644 --- a/src/client/GameSave.cpp +++ b/src/client/GameSave.cpp @@ -10,7 +10,6 @@ #include "bzip2/bz2wrap.h" #include "Config.h" #include "Format.h" -#include "hmap.h" #include "simulation/Simulation.h" #include "simulation/ElementClasses.h" @@ -18,6 +17,7 @@ #include "common/tpt-minmax.h" #include "common/tpt-compat.h" #include "bson/BSON.h" +#include "graphics/Renderer.h" static void ConvertJsonToBson(bson *b, Json::Value j, int depth = 0); static void ConvertBsonToJson(bson_iterator *b, Json::Value *j, int depth = 0); @@ -404,6 +404,7 @@ static void CheckBsonFieldFloat(bson_iterator iter, const char *field, float *se void GameSave::readOPS(const std::vector &data) { + Renderer::PopulateTables(); unsigned char *inputData = (unsigned char*)&data[0], *partsData = NULL, *partsPosData = NULL, *fanData = NULL, *wallData = NULL, *soapLinkData = NULL; unsigned char *pressData = NULL, *vxData = NULL, *vyData = NULL, *ambientData = NULL; @@ -1078,10 +1079,9 @@ void GameSave::readOPS(const std::vector &data) case PT_FIRW: if (particles[newIndex].tmp>=2 && savedVersion < 81) { - auto caddress = int(restrict_flt(float(particles[newIndex].tmp-4), 0.0f, 199.0f)) * 3; particles[newIndex].type = PT_EMBR; + particles[newIndex].ctype = Renderer::firwTableAt(particles[newIndex].tmp - 4); particles[newIndex].tmp = 1; - particles[newIndex].ctype = (((firw_data[caddress]))<<16) | (((firw_data[caddress+1]))<<8) | ((firw_data[caddress+2])); } break; case PT_PSTN: @@ -1243,6 +1243,8 @@ void GameSave::readOPS(const std::vector &data) void GameSave::readPSv(const std::vector &dataVec) { + Renderer::PopulateTables(); + unsigned char * saveData = (unsigned char *)&dataVec[0]; auto dataLength = int(dataVec.size()); int q,j,k,x,y,p=0, ver, pty, ty, legacy_beta=0; @@ -1800,10 +1802,9 @@ void GameSave::readPSv(const std::vector &dataVec) } if (particles[i-1].type==PT_FIRW && particles[i-1].tmp>=2) { - auto caddress = int(restrict_flt(float(particles[i-1].tmp-4), 0.0f, 199.0f))*3; particles[i-1].type = PT_EMBR; + particles[i-1].ctype = Renderer::firwTableAt(particles[i-1].tmp-4); particles[i-1].tmp = 1; - particles[i-1].ctype = (((firw_data[caddress]))<<16) | (((firw_data[caddress+1]))<<8) | ((firw_data[caddress+2])); } } if (ver < 89) diff --git a/src/graphics/Graphics.cpp b/src/graphics/Graphics.cpp index 5c4752fe8..96909c147 100644 --- a/src/graphics/Graphics.cpp +++ b/src/graphics/Graphics.cpp @@ -137,58 +137,6 @@ VideoBuffer::~VideoBuffer() delete[] Buffer; } -/** - * Common graphics functions, mostly static methods that provide - * encoding/decoding of different formats and font metrics - */ - -char * Graphics::GenerateGradient(pixel * colours, float * points, int pointcount, int size) -{ - int cp, i, j; - pixel ptemp; - char * newdata = (char*)malloc(size * 3); - float poss, pose, temp; - memset(newdata, 0, size*3); - //Sort the Colours and Points - for (i = (pointcount - 1); i > 0; i--) - { - for (j = 1; j <= i; j++) - { - if (points[j-1] > points[j]) - { - temp = points[j-1]; - points[j-1] = points[j]; - points[j] = temp; - - ptemp = colours[j-1]; - colours[j-1] = colours[j]; - colours[j] = ptemp; - } - } - } - i = 0; - j = 1; - poss = points[i]; - pose = points[j]; - for (cp = 0; cp < size; cp++) - { - float cpos = (float)cp / (float)size, ccpos, cccpos; - if(cpos > pose && j+1 < pointcount) - { - poss = points[++i]; - pose = points[++j]; - } - ccpos = cpos - poss; - cccpos = ccpos / (pose - poss); - if(cccpos > 1.0f) - cccpos = 1.0f; - newdata[(cp*3) ] = char(PIXR(colours[i])*(1.0f-cccpos) + PIXR(colours[j])*(cccpos)); - newdata[(cp*3)+1] = char(PIXG(colours[i])*(1.0f-cccpos) + PIXG(colours[j])*(cccpos)); - newdata[(cp*3)+2] = char(PIXB(colours[i])*(1.0f-cccpos) + PIXB(colours[j])*(cccpos)); - } - return newdata; -} - pixel *Graphics::resample_img_nn(pixel * src, int sw, int sh, int rw, int rh) { int y, x; @@ -965,3 +913,39 @@ bool PngDataToPixels(std::vector &imageData, int &imgw, int &imgh, const png_destroy_read_struct(&png, &info, (png_infopp)NULL); return true; } + +bool Graphics::GradientStop::operator <(const GradientStop &other) const +{ + return point < other.point; +} + +std::vector Graphics::Gradient(std::vector stops, int resolution) +{ + std::vector table(resolution, 0); + if (stops.size() >= 2) + { + std::sort(stops.begin(), stops.end()); + auto stop = -1; + for (auto i = 0; i < resolution; ++i) + { + auto point = i / (float)resolution; + while (stop < (int)stops.size() - 1 && stops[stop + 1].point <= point) + { + ++stop; + } + if (stop < 0 || stop >= (int)stops.size() - 1) + { + continue; + } + auto &left = stops[stop]; + auto &right = stops[stop + 1]; + auto f = (point - left.point) / (right.point - left.point); + table[i] = PIXRGB( + int(PIXR(left.color) + (PIXR(right.color) - PIXR(left.color)) * f), + int(PIXG(left.color) + (PIXG(right.color) - PIXG(left.color)) * f), + int(PIXB(left.color) + (PIXB(right.color) - PIXB(left.color)) * f) + ); + } + } + return table; +} diff --git a/src/graphics/Graphics.h b/src/graphics/Graphics.h index 5139e9bc4..b12c2bbfd 100644 --- a/src/graphics/Graphics.h +++ b/src/graphics/Graphics.h @@ -80,8 +80,14 @@ public: pixel *vid; int sdl_scale; - //Common graphics methods in Graphics.cpp - static char * GenerateGradient(pixel * colours, float * points, int pointcount, int size); + struct GradientStop + { + pixel color; + float point; + + bool operator <(const GradientStop &other) const; + }; + static std::vector Gradient(std::vector stops, int resolution); //PTIF methods static pixel *resample_img_nn(pixel *src, int sw, int sh, int rw, int rh); diff --git a/src/graphics/Renderer.cpp b/src/graphics/Renderer.cpp index 20de1d7e2..f158ccf9d 100644 --- a/src/graphics/Renderer.cpp +++ b/src/graphics/Renderer.cpp @@ -25,7 +25,6 @@ #include "lua/LuaScriptHelper.h" #include "lua/LuaSmartRef.h" #endif -#include "hmap.h" #define VIDXRES WINDOWW #define VIDYRES WINDOWH @@ -701,7 +700,7 @@ void Renderer::prepare_alpha(int size, float intensity) #ifndef FONTEDITOR void Renderer::render_parts() { - int deca, decr, decg, decb, cola, colr, colg, colb, firea, firer, fireg, fireb, pixel_mode, q, i, t, nx, ny, x, y, caddress; + int deca, decr, decg, decb, cola, colr, colg, colb, firea, firer, fireg, fireb, pixel_mode, q, i, t, nx, ny, x, y; int orbd[4] = {0, 0, 0, 0}, orbl[4] = {0, 0, 0, 0}; float gradv, flicker; Particle * parts; @@ -790,7 +789,7 @@ void Renderer::render_parts() if((elements[t].Properties & PROP_HOT_GLOW) && sim->parts[i].temp>(elements[t].HighTemperature-800.0f)) { gradv = 3.1415/(2*elements[t].HighTemperature-(elements[t].HighTemperature-800.0f)); - caddress = int((sim->parts[i].temp>elements[t].HighTemperature)?elements[t].HighTemperature-(elements[t].HighTemperature-800.0f):sim->parts[i].temp-(elements[t].HighTemperature-800.0f)); + auto caddress = int((sim->parts[i].temp>elements[t].HighTemperature)?elements[t].HighTemperature-(elements[t].HighTemperature-800.0f):sim->parts[i].temp-(elements[t].HighTemperature-800.0f)); colr += int(sin(gradv*caddress) * 226); colg += int(sin(gradv*caddress*4.55 +3.14) * 34); colb += int(sin(gradv*caddress*2.22 +3.14) * 64); @@ -814,11 +813,11 @@ void Renderer::render_parts() { constexpr float min_temp = MIN_TEMP; constexpr float max_temp = MAX_TEMP; - caddress = int(restrict_flt((sim->parts[i].temp - min_temp) / (max_temp - min_temp) * 1024, 0, 1023)) * 3; firea = 255; - firer = colr = color_data[caddress]; - fireg = colg = color_data[caddress+1]; - fireb = colb = color_data[caddress+2]; + auto color = heatTableAt(int((sim->parts[i].temp - min_temp) / (max_temp - min_temp) * 1024)); + firer = colr = PIXR(color); + fireg = colg = PIXG(color); + fireb = colb = PIXB(color); cola = 255; if(pixel_mode & (FIREMODE | PMODE_GLOW)) pixel_mode = (pixel_mode & ~(FIREMODE|PMODE_GLOW)) | PMODE_BLUR; @@ -1322,8 +1321,8 @@ int HeatToColour(float temp) { constexpr float min_temp = MIN_TEMP; constexpr float max_temp = MAX_TEMP; - int caddress = int(restrict_flt((temp - min_temp) / (max_temp - min_temp) * 1024, 0, 1023)) * 3; - return PIXRGB((int)(color_data[caddress]*0.7f), (int)(color_data[caddress+1]*0.7f), (int)(color_data[caddress+2]*0.7f)); + auto color = Renderer::heatTableAt(int((temp - min_temp) / (max_temp - min_temp) * 1024)); + return PIXRGB((int)(PIXR(color)*0.7f), (int)(PIXG(color)*0.7f), (int)(PIXB(color)*0.7f)); } void Renderer::draw_air() @@ -1444,6 +1443,65 @@ pixel Renderer::GetPixel(int x, int y) return vid[(y*VIDXRES)+x]; } +std::vector Renderer::flameTable; +std::vector Renderer::plasmaTable; +std::vector Renderer::heatTable; +std::vector Renderer::clfmTable; +std::vector Renderer::firwTable; +static bool tablesPopulated = false; +static std::mutex tablesPopulatedMx; +void Renderer::PopulateTables() +{ + std::lock_guard g(tablesPopulatedMx); + if (!tablesPopulated) + { + tablesPopulated = true; + flameTable = Graphics::Gradient({ + { 0x000000, 0.00f }, + { 0x60300F, 0.50f }, + { 0xDFBF6F, 0.90f }, + { 0xAF9F0F, 1.00f }, + }, 200); + plasmaTable = Graphics::Gradient({ + { 0x000000, 0.00f }, + { 0x301040, 0.25f }, + { 0x301060, 0.50f }, + { 0xAFFFFF, 0.90f }, + { 0xAFFFFF, 1.00f }, + }, 200); + heatTable = Graphics::Gradient({ + { 0x2B00FF, 0.00f }, + { 0x003CFF, 0.01f }, + { 0x00C0FF, 0.05f }, + { 0x00FFEB, 0.08f }, + { 0x00FF14, 0.19f }, + { 0x4BFF00, 0.25f }, + { 0xC8FF00, 0.37f }, + { 0xFFDC00, 0.45f }, + { 0xFF0000, 0.71f }, + { 0xFF00DC, 1.00f }, + }, 1024); + clfmTable = Graphics::Gradient({ + { 0x000000, 0.00f }, + { 0x0A0917, 0.10f }, + { 0x19163C, 0.20f }, + { 0x28285E, 0.30f }, + { 0x343E77, 0.40f }, + { 0x49769A, 0.60f }, + { 0x57A0B4, 0.80f }, + { 0x5EC4C6, 1.00f }, + }, 200); + firwTable = Graphics::Gradient({ + { 0xFF00FF, 0.00f }, + { 0x0000FF, 0.20f }, + { 0x00FFFF, 0.40f }, + { 0x00FF00, 0.60f }, + { 0xFFFF00, 0.80f }, + { 0xFF0000, 1.00f }, + }, 200); + } +} + Renderer::Renderer(Graphics * g, Simulation * sim): sim(NULL), g(NULL), @@ -1466,6 +1524,8 @@ Renderer::Renderer(Graphics * g, Simulation * sim): ZFACTOR(8), gridSize(0) { + PopulateTables(); + this->g = g; this->sim = sim; vid = g->vid; @@ -1551,17 +1611,6 @@ Renderer::Renderer(Graphics * g, Simulation * sim): graphicscache = new gcache_item[PT_NUM]; std::fill(&graphicscache[0], &graphicscache[PT_NUM], gcache_item()); - int fireColoursCount = 4; - pixel fireColours[] = {PIXPACK(0xAF9F0F), PIXPACK(0xDFBF6F), PIXPACK(0x60300F), PIXPACK(0x000000)}; - float fireColoursPoints[] = {1.0f, 0.9f, 0.5f, 0.0f}; - - int plasmaColoursCount = 5; - pixel plasmaColours[] = {PIXPACK(0xAFFFFF), PIXPACK(0xAFFFFF), PIXPACK(0x301060), PIXPACK(0x301040), PIXPACK(0x000000)}; - float plasmaColoursPoints[] = {1.0f, 0.9f, 0.5f, 0.25, 0.0f}; - - flm_data = Graphics::GenerateGradient(fireColours, fireColoursPoints, fireColoursCount, 200); - plasma_data = Graphics::GenerateGradient(plasmaColours, plasmaColoursPoints, plasmaColoursCount, 200); - prepare_alpha(CELL, 1.0f); } @@ -1709,8 +1758,6 @@ Renderer::~Renderer() delete[] persistentVid; delete[] warpVid; delete[] graphicscache; - free(flm_data); - free(plasma_data); } #define PIXELMETHODS_CLASS Renderer diff --git a/src/graphics/Renderer.h b/src/graphics/Renderer.h index 56a7db9cd..51957ce29 100644 --- a/src/graphics/Renderer.h +++ b/src/graphics/Renderer.h @@ -50,8 +50,6 @@ public: unsigned char fire_g[YRES/CELL][XRES/CELL]; unsigned char fire_b[YRES/CELL][XRES/CELL]; unsigned int fire_alpha[CELL*3][CELL*3]; - char * flm_data; - char * plasma_data; // bool gravityZonesEnabled; bool gravityFieldEnabled; @@ -153,6 +151,23 @@ public: Renderer(Graphics * g, Simulation * sim); ~Renderer(); +#define RENDERER_TABLE(name) \ + static std::vector name; \ + static inline pixel name ## At(int index) \ + { \ + auto size = int(name.size()); \ + if (index < 0) index = 0; \ + if (index > size - 1) index = size - 1; \ + return name[index]; \ + } + RENDERER_TABLE(flameTable) + RENDERER_TABLE(plasmaTable) + RENDERER_TABLE(heatTable) + RENDERER_TABLE(clfmTable) + RENDERER_TABLE(firwTable) +#undef RENDERER_TABLE + static void PopulateTables(); + private: int gridSize; }; diff --git a/src/gui/interface/Slider.cpp b/src/gui/interface/Slider.cpp index 24fcdfc84..791244669 100644 --- a/src/gui/interface/Slider.cpp +++ b/src/gui/interface/Slider.cpp @@ -9,7 +9,6 @@ Slider::Slider(Point position, Point size, int steps): sliderSteps(steps), sliderPosition(0), isMouseDown(false), - bgGradient(NULL), col1(0, 0, 0, 0), col2(0, 0, 0, 0) { @@ -66,12 +65,12 @@ void Slider::OnMouseUp(int x, int y, unsigned button) void Slider::SetColour(Colour col1, Colour col2) { - pixel pix[2] = {(pixel)PIXRGB(col1.Red, col1.Green, col1.Blue), (pixel)PIXRGB(col2.Red, col2.Green, col2.Blue)}; - float fl[2] = {0.0f, 1.0f}; - free(bgGradient); this->col1 = col1; this->col2 = col2; - bgGradient = (unsigned char*)Graphics::GenerateGradient(pix, fl, 2, Size.X-7); + bgGradient = Graphics::Gradient({ + { pixel(PIXRGB(col1.Red, col1.Green, col1.Blue)), 0.f }, + { pixel(PIXRGB(col2.Red, col2.Green, col2.Blue)), 1.f }, + }, Size.X-7); } int Slider::GetValue() @@ -107,11 +106,16 @@ void Slider::Draw(const Point& screenPos) Graphics * g = GetGraphics(); //g->drawrect(screenPos.X, screenPos.Y, Size.X, Size.Y, 255, 255, 255, 255); - if(bgGradient) + if (bgGradient.size()) { for (int j = 3; j < Size.Y-7; j++) - for (int i = 3; i < Size.X-7; i++) - g->blendpixel(screenPos.X+i+2, screenPos.Y+j+2, bgGradient[(i-3)*3], bgGradient[(i-3)*3+1], bgGradient[(i-3)*3+2], 255); + { + for (int i = 3; i < Size.X-7; i++) + { + auto color = bgGradient[i - 3]; + g->blendpixel(screenPos.X+i+2, screenPos.Y+j+2, PIXR(color), PIXG(color), PIXB(color), 255); + } + } } g->drawrect(screenPos.X+3, screenPos.Y+3, Size.X-6, Size.Y-6, 255, 255, 255, 255); diff --git a/src/gui/interface/Slider.h b/src/gui/interface/Slider.h index fea0f30c6..bd8b20338 100644 --- a/src/gui/interface/Slider.h +++ b/src/gui/interface/Slider.h @@ -3,6 +3,7 @@ #include "Component.h" #include "Colour.h" +#include "graphics/Pixel.h" #include @@ -12,7 +13,7 @@ class Slider : public ui::Component int sliderSteps; int sliderPosition; bool isMouseDown; - unsigned char * bgGradient; + std::vector bgGradient; struct SliderAction { diff --git a/src/simulation/elements/CFLM.cpp b/src/simulation/elements/CFLM.cpp index d11216da3..cbc465af4 100644 --- a/src/simulation/elements/CFLM.cpp +++ b/src/simulation/elements/CFLM.cpp @@ -1,5 +1,4 @@ #include "simulation/ElementCommon.h" -#include "hmap.h" static int graphics(GRAPHICS_FUNC_ARGS); static void create(ELEMENT_CREATE_FUNC_ARGS); @@ -51,10 +50,10 @@ void Element::Element_CFLM() static int graphics(GRAPHICS_FUNC_ARGS) { - int caddress = int(restrict_flt(float(cpart->life / 2), 0, 199)) * 3; - *colr = hflm_data[caddress]; - *colg = hflm_data[caddress+1]; - *colb = hflm_data[caddress+2]; + auto color = Renderer::clfmTableAt(cpart->life / 2); + *colr = PIXR(color); + *colg = PIXG(color); + *colb = PIXB(color); *firea = 255; *firer = *colr; diff --git a/src/simulation/elements/FIRE.cpp b/src/simulation/elements/FIRE.cpp index 7e5585801..8e62a1c2a 100644 --- a/src/simulation/elements/FIRE.cpp +++ b/src/simulation/elements/FIRE.cpp @@ -353,10 +353,10 @@ static int updateLegacy(UPDATE_FUNC_ARGS) static int graphics(GRAPHICS_FUNC_ARGS) { - int caddress = int(restrict_flt(float(cpart->life), 0, 199)) * 3; - *colr = (unsigned char)ren->flm_data[caddress]; - *colg = (unsigned char)ren->flm_data[caddress+1]; - *colb = (unsigned char)ren->flm_data[caddress+2]; + auto color = Renderer::flameTableAt(cpart->life); + *colr = PIXR(color); + *colg = PIXG(color); + *colb = PIXB(color); *firea = 255; *firer = *colr; diff --git a/src/simulation/elements/FIRW.cpp b/src/simulation/elements/FIRW.cpp index 642f0ebcb..f818a8208 100644 --- a/src/simulation/elements/FIRW.cpp +++ b/src/simulation/elements/FIRW.cpp @@ -1,5 +1,4 @@ #include "simulation/ElementCommon.h" -#include "hmap.h" static int update(UPDATE_FUNC_ARGS); static int graphics(GRAPHICS_FUNC_ARGS); @@ -88,17 +87,14 @@ static int update(UPDATE_FUNC_ARGS) } else //if (parts[i].tmp>=2) { - float angle, magnitude; - int caddress = RNG::Ref().between(0, 199) * 3; - int n; - unsigned col = (((firw_data[caddress]))<<16) | (((firw_data[caddress+1]))<<8) | ((firw_data[caddress+2])); - for (n=0; n<40; n++) + unsigned col = Renderer::firwTableAt(RNG::Ref().between(0, 199)); + for (int n=0; n<40; n++) { np = sim->create_part(-3, x, y, PT_EMBR); if (np>-1) { - magnitude = RNG::Ref().between(40, 99) * 0.05f; - angle = RNG::Ref().between(0, 6283) * 0.001f;//(in radians, between 0 and 2*pi) + auto magnitude = RNG::Ref().between(40, 99) * 0.05f; + auto angle = RNG::Ref().between(0, 6283) * 0.001f;//(in radians, between 0 and 2*pi) parts[np].vx = parts[i].vx*0.5f + cosf(angle)*magnitude; parts[np].vy = parts[i].vy*0.5f + sinf(angle)*magnitude; parts[np].ctype = col; diff --git a/src/simulation/elements/PLSM.cpp b/src/simulation/elements/PLSM.cpp index dd95bb874..e9519e49e 100644 --- a/src/simulation/elements/PLSM.cpp +++ b/src/simulation/elements/PLSM.cpp @@ -52,10 +52,10 @@ void Element::Element_PLSM() static int graphics(GRAPHICS_FUNC_ARGS) { - int caddress = int(restrict_flt(float(cpart->life), 0, 199)) * 3; - *colr = (unsigned char)ren->plasma_data[caddress]; - *colg = (unsigned char)ren->plasma_data[caddress+1]; - *colb = (unsigned char)ren->plasma_data[caddress+2]; + auto color = Renderer::plasmaTableAt(cpart->life); + *colr = PIXR(color); + *colg = PIXG(color); + *colb = PIXB(color); *firea = 255; *firer = *colr;