summaryrefslogtreecommitdiffhomepage
path: root/Magic2/AlphaPalette.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Magic2/AlphaPalette.cpp')
-rw-r--r--Magic2/AlphaPalette.cpp293
1 files changed, 293 insertions, 0 deletions
diff --git a/Magic2/AlphaPalette.cpp b/Magic2/AlphaPalette.cpp
new file mode 100644
index 0000000..7142de0
--- /dev/null
+++ b/Magic2/AlphaPalette.cpp
@@ -0,0 +1,293 @@
+/* Starshatter OpenSource Distribution
+ Copyright (c) 1997-2004, Destroyer Studios LLC.
+ All Rights Reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+ * Neither the name "Destroyer Studios" nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+
+ SUBSYSTEM: Magic.exe
+ FILE: AlphaPalette.cpp
+ AUTHOR: John DiCamillo
+*/
+
+#include "stdafx.h"
+
+PALETTEENTRY standard_palette[256] = {
+ { 0, 0, 0, 0 },
+ { 128, 0, 0, 0 },
+ { 0, 128, 0, 0 },
+ { 128, 128, 0, 0 },
+ { 0, 0, 128, 0 },
+ { 128, 0, 128, 0 },
+ { 0, 128, 128, 0 },
+ { 192, 192, 192, 0 },
+ { 192, 220, 192, 0 },
+ { 166, 202, 240, 0 },
+ { 186, 172, 189, 0 },
+ { 167, 147, 172, 0 },
+ { 143, 129, 148, 0 },
+ { 122, 107, 126, 0 },
+ { 100, 87, 104, 0 },
+ { 55, 49, 57, 0 },
+ { 247, 247, 247, 0 },
+ { 240, 240, 240, 0 },
+ { 232, 232, 232, 0 },
+ { 225, 225, 225, 0 },
+ { 217, 217, 217, 0 },
+ { 210, 210, 210, 0 },
+ { 202, 202, 202, 0 },
+ { 195, 195, 195, 0 },
+ { 188, 188, 188, 0 },
+ { 180, 180, 180, 0 },
+ { 173, 173, 173, 0 },
+ { 165, 165, 165, 0 },
+ { 158, 158, 158, 0 },
+ { 150, 150, 150, 0 },
+ { 143, 143, 143, 0 },
+ { 136, 136, 136, 0 },
+ { 128, 128, 128, 0 },
+ { 121, 121, 121, 0 },
+ { 113, 113, 113, 0 },
+ { 106, 106, 106, 0 },
+ { 98, 98, 98, 0 },
+ { 91, 91, 91, 0 },
+ { 83, 83, 83, 0 },
+ { 76, 76, 76, 0 },
+ { 69, 69, 69, 0 },
+ { 61, 61, 61, 0 },
+ { 54, 54, 54, 0 },
+ { 42, 42, 42, 0 },
+ { 31, 31, 31, 0 },
+ { 21, 21, 21, 0 },
+ { 10, 10, 10, 0 },
+ { 5, 5, 5, 0 },
+ { 149, 149, 234, 0 },
+ { 134, 134, 227, 0 },
+ { 117, 117, 223, 0 },
+ { 104, 104, 215, 0 },
+ { 87, 87, 210, 0 },
+ { 70, 70, 206, 0 },
+ { 49, 49, 185, 0 },
+ { 45, 45, 168, 0 },
+ { 36, 36, 134, 0 },
+ { 31, 31, 118, 0 },
+ { 27, 27, 101, 0 },
+ { 22, 22, 84, 0 },
+ { 18, 18, 67, 0 },
+ { 13, 13, 51, 0 },
+ { 9, 9, 34, 0 },
+ { 4, 4, 17, 0 },
+ { 159, 191, 223, 0 },
+ { 143, 181, 218, 0 },
+ { 128, 170, 213, 0 },
+ { 112, 159, 207, 0 },
+ { 96, 149, 202, 0 },
+ { 85, 138, 191, 0 },
+ { 69, 128, 186, 0 },
+ { 68, 117, 166, 0 },
+ { 62, 106, 151, 0 },
+ { 55, 96, 136, 0 },
+ { 53, 85, 117, 0 },
+ { 47, 74, 102, 0 },
+ { 43, 64, 85, 0 },
+ { 35, 53, 71, 0 },
+ { 29, 43, 56, 0 },
+ { 21, 32, 43, 0 },
+ { 184, 190, 199, 0 },
+ { 171, 182, 190, 0 },
+ { 159, 169, 181, 0 },
+ { 148, 162, 171, 0 },
+ { 136, 150, 162, 0 },
+ { 123, 138, 153, 0 },
+ { 112, 128, 143, 0 },
+ { 102, 118, 132, 0 },
+ { 92, 105, 120, 0 },
+ { 86, 97, 105, 0 },
+ { 77, 85, 94, 0 },
+ { 67, 74, 82, 0 },
+ { 57, 66, 70, 0 },
+ { 48, 53, 58, 0 },
+ { 38, 44, 47, 0 },
+ { 29, 32, 35, 0 },
+ { 154, 228, 154, 0 },
+ { 137, 224, 137, 0 },
+ { 120, 220, 120, 0 },
+ { 112, 207, 112, 0 },
+ { 96, 202, 96, 0 },
+ { 80, 197, 80, 0 },
+ { 64, 191, 64, 0 },
+ { 58, 175, 77, 0 },
+ { 53, 159, 67, 0 },
+ { 48, 143, 63, 0 },
+ { 43, 128, 64, 0 },
+ { 37, 112, 56, 0 },
+ { 32, 96, 50, 0 },
+ { 27, 80, 43, 0 },
+ { 21, 64, 33, 0 },
+ { 16, 48, 27, 0 },
+ { 186, 204, 179, 0 },
+ { 175, 194, 167, 0 },
+ { 164, 184, 156, 0 },
+ { 152, 174, 145, 0 },
+ { 140, 167, 131, 0 },
+ { 130, 157, 119, 0 },
+ { 119, 148, 107, 0 },
+ { 111, 136, 98, 0 },
+ { 99, 124, 88, 0 },
+ { 88, 112, 80, 0 },
+ { 81, 97, 73, 0 },
+ { 70, 84, 65, 0 },
+ { 61, 73, 54, 0 },
+ { 51, 61, 46, 0 },
+ { 40, 48, 37, 0 },
+ { 30, 36, 28, 0 },
+ { 209, 191, 173, 0 },
+ { 202, 181, 159, 0 },
+ { 191, 170, 149, 0 },
+ { 183, 159, 136, 0 },
+ { 175, 149, 122, 0 },
+ { 167, 138, 109, 0 },
+ { 159, 128, 96, 0 },
+ { 147, 117, 87, 0 },
+ { 129, 106, 84, 0 },
+ { 116, 96, 75, 0 },
+ { 103, 85, 67, 0 },
+ { 90, 73, 58, 0 },
+ { 78, 64, 50, 0 },
+ { 64, 53, 43, 0 },
+ { 51, 43, 34, 0 },
+ { 38, 32, 26, 0 },
+ { 209, 196, 173, 0 },
+ { 202, 186, 159, 0 },
+ { 191, 175, 149, 0 },
+ { 183, 169, 136, 0 },
+ { 175, 159, 122, 0 },
+ { 167, 150, 109, 0 },
+ { 159, 140, 96, 0 },
+ { 143, 128, 90, 0 },
+ { 131, 119, 82, 0 },
+ { 116, 106, 75, 0 },
+ { 103, 95, 67, 0 },
+ { 90, 83, 58, 0 },
+ { 78, 70, 50, 0 },
+ { 64, 60, 43, 0 },
+ { 51, 48, 34, 0 },
+ { 38, 36, 26, 0 },
+ { 255, 255, 170, 0 },
+ { 255, 255, 128, 0 },
+ { 255, 244, 106, 0 },
+ { 249, 232, 113, 0 },
+ { 255, 213, 43, 0 },
+ { 255, 197, 21, 0 },
+ { 255, 186, 43, 0 },
+ { 255, 175, 43, 0 },
+ { 255, 150, 21, 0 },
+ { 255, 143, 32, 0 },
+ { 244, 111, 11, 0 },
+ { 215, 92, 19, 0 },
+ { 190, 72, 22, 0 },
+ { 168, 60, 23, 0 },
+ { 146, 39, 24, 0 },
+ { 128, 27, 21, 0 },
+ { 244, 244, 138, 0 },
+ { 242, 242, 119, 0 },
+ { 248, 248, 92, 0 },
+ { 240, 240, 100, 0 },
+ { 247, 247, 72, 0 },
+ { 239, 239, 80, 0 },
+ { 237, 237, 61, 0 },
+ { 236, 236, 40, 0 },
+ { 235, 235, 20, 0 },
+ { 215, 215, 19, 0 },
+ { 194, 194, 18, 0 },
+ { 175, 175, 16, 0 },
+ { 156, 156, 14, 0 },
+ { 136, 136, 13, 0 },
+ { 117, 117, 11, 0 },
+ { 98, 98, 9, 0 },
+ { 215, 183, 168, 0 },
+ { 211, 170, 150, 0 },
+ { 205, 157, 135, 0 },
+ { 199, 148, 120, 0 },
+ { 193, 135, 104, 0 },
+ { 187, 123, 89, 0 },
+ { 174, 109, 70, 0 },
+ { 151, 96, 62, 0 },
+ { 128, 83, 53, 0 },
+ { 105, 68, 44, 0 },
+ { 143, 239, 239, 0 },
+ { 124, 237, 237, 0 },
+ { 106, 234, 234, 0 },
+ { 87, 232, 232, 0 },
+ { 70, 227, 227, 0 },
+ { 47, 230, 230, 0 },
+ { 32, 223, 223, 0 },
+ { 29, 205, 205, 0 },
+ { 26, 176, 176, 0 },
+ { 20, 150, 150, 0 },
+ { 17, 121, 121, 0 },
+ { 13, 94, 94, 0 },
+ { 223, 32, 223, 0 },
+ { 204, 30, 204, 0 },
+ { 186, 27, 186, 0 },
+ { 168, 23, 168, 0 },
+ { 149, 21, 149, 0 },
+ { 131, 18, 131, 0 },
+ { 112, 16, 112, 0 },
+ { 94, 13, 94, 0 },
+ { 74, 11, 74, 0 },
+ { 56, 7, 56, 0 },
+ { 249, 91, 91, 0 },
+ { 248, 80, 80, 0 },
+ { 247, 68, 68, 0 },
+ { 247, 55, 55, 0 },
+ { 247, 43, 43, 0 },
+ { 245, 31, 31, 0 },
+ { 244, 19, 19, 0 },
+ { 240, 11, 11, 0 },
+ { 228, 10, 10, 0 },
+ { 217, 9, 9, 0 },
+ { 204, 9, 9, 0 },
+ { 192, 7, 7, 0 },
+ { 180, 7, 7, 0 },
+ { 168, 6, 6, 0 },
+ { 156, 5, 5, 0 },
+ { 145, 4, 4, 0 },
+ { 131, 5, 5, 0 },
+ { 118, 5, 5, 0 },
+ { 106, 4, 4, 0 },
+ { 94, 4, 4, 0 },
+ { 80, 5, 5, 0 },
+ { 66, 6, 6, 0 },
+ { 53, 6, 6, 0 },
+ { 41, 5, 5, 0 },
+ { 128, 128, 128, 0 },
+ { 255, 0, 0, 0 },
+ { 0, 255, 0, 0 },
+ { 255, 255, 0, 0 },
+ { 0, 0, 255, 0 },
+ { 255, 0, 255, 0 },
+ { 0, 255, 255, 0 },
+ { 255, 255, 255, 0 },
+};