From 0d357adb5206279146416663c97d80af2d944c77 Mon Sep 17 00:00:00 2001 From: Sryder13 Date: Thu, 23 Jul 2015 00:03:31 +0100 Subject: [PATCH 01/27] Base colour changes Default colours before new colours are potentially added. Rosewood is the same as orange and will likely be removed. --- src/r_draw.c | 191 ++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 134 insertions(+), 57 deletions(-) diff --git a/src/r_draw.c b/src/r_draw.c index cd219c15f..a8f48bbeb 100644 --- a/src/r_draw.c +++ b/src/r_draw.c @@ -236,27 +236,27 @@ static void R_GenerateTranslationColormap(UINT8 *dest_colormap, INT32 skinnum, U 0x03, // SKINCOLOR_SILVER 0x08, // SKINCOLOR_GREY 0x18, // SKINCOLOR_BLACK - 0xd0, // SKINCOLOR_CYAN - 0xdc, // SKINCOLOR_TEAL - 0xc8, // SKINCOLOR_STEELBLUE - 0xe2, // SKINCOLOR_BLUE - 0x40, // SKINCOLOR_PEACH - 0x48, // SKINCOLOR_TAN - 0x90, // SKINCOLOR_PINK - 0xf8, // SKINCOLOR_LAVENDER - 0xc0, // SKINCOLOR_PURPLE - 0x52, // SKINCOLOR_ORANGE - 0x5c, // SKINCOLOR_ROSEWOOD - 0x20, // SKINCOLOR_BEIGE - 0x30, // SKINCOLOR_BROWN - 0x7d, // SKINCOLOR_RED - 0x85, // SKINCOLOR_DARKRED - 0xb8, // SKINCOLOR_NEONGREEN - 0xa0, // SKINCOLOR_GREEN - 0xb0, // SKINCOLOR_ZIM - 0x69, // SKINCOLOR_OLIVE - 0x67, // SKINCOLOR_YELLOW - 0x70, // SKINCOLOR_GOLD + 0x70, // SKINCOLOR_CYAN + 0x7c, // SKINCOLOR_TEAL + 0x9a, // SKINCOLOR_STEELBLUE + 0x80, // SKINCOLOR_BLUE + 0xc8, // SKINCOLOR_PEACH + 0x54, // SKINCOLOR_TAN + 0xc0, // SKINCOLOR_PINK + 0xb0, // SKINCOLOR_LAVENDER + 0xa0, // SKINCOLOR_PURPLE + 0x30, // SKINCOLOR_ORANGE + 0x30, // SKINCOLOR_ROSEWOOD + 0xe0, // SKINCOLOR_BEIGE + 0xd0, // SKINCOLOR_BROWN + 0x20, // SKINCOLOR_RED + 0x28, // SKINCOLOR_DARKRED + 0xf0, // SKINCOLOR_NEONGREEN + 0x60, // SKINCOLOR_GREEN + 0x58, // SKINCOLOR_ZIM + 0x49, // SKINCOLOR_OLIVE + 0x48, // SKINCOLOR_YELLOW + 0x40, // SKINCOLOR_GOLD }; INT32 i; INT32 starttranscolor; @@ -293,25 +293,18 @@ static void R_GenerateTranslationColormap(UINT8 *dest_colormap, INT32 skinnum, U { case SKINCOLOR_SILVER: case SKINCOLOR_GREY: - case SKINCOLOR_PEACH: - case SKINCOLOR_BEIGE: case SKINCOLOR_BROWN: case SKINCOLOR_RED: case SKINCOLOR_GREEN: case SKINCOLOR_BLUE: + + case SKINCOLOR_ORANGE: + case SKINCOLOR_ROSEWOOD: // 16 color ramp for (i = 0; i < SKIN_RAMP_LENGTH; i++) dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + i); break; - case SKINCOLOR_ORANGE: - // 14 colors of orange + brown - for (i = 0; i < SKIN_RAMP_LENGTH-2; i++) - dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + i); - for (i = 0; i < 2; i++) - dest_colormap[starttranscolor + (i+SKIN_RAMP_LENGTH-2)] = (UINT8)(152 + i); - break; - case SKINCOLOR_CYAN: // 12 color ramp for (i = 0; i < SKIN_RAMP_LENGTH; i++) @@ -320,57 +313,141 @@ static void R_GenerateTranslationColormap(UINT8 *dest_colormap, INT32 skinnum, U case SKINCOLOR_WHITE: case SKINCOLOR_BLACK: - case SKINCOLOR_STEELBLUE: case SKINCOLOR_PINK: - case SKINCOLOR_LAVENDER: - case SKINCOLOR_PURPLE: case SKINCOLOR_DARKRED: case SKINCOLOR_ZIM: - case SKINCOLOR_YELLOW: - case SKINCOLOR_GOLD: // 8 color ramp for (i = 0; i < SKIN_RAMP_LENGTH; i++) dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (i >> 1)); break; case SKINCOLOR_TEAL: - // 5 color ramp + // 5 color ramp, from 2 colour ranges for (i = 0; i < SKIN_RAMP_LENGTH; i++) { if (5*i/16 == 0) - dest_colormap[starttranscolor + i] = 0xf7; + dest_colormap[starttranscolor + i] = 0xf8; else dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (5*i/SKIN_RAMP_LENGTH) - 1); } break; + case SKINCOLOR_PEACH: + // 10 color rame, from 2 color ranges + for (i = 0; i < SKIN_RAMP_LENGTH; i++) + { + if (10*i/16 == 0) + dest_colormap[starttranscolor + i] = 0xC0; // Lightest + else if (10*i/16 == 1) + dest_colormap[starttranscolor + i] = 0x30; // Second + else + dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (10*i/SKIN_RAMP_LENGTH) - 2); // main + } + break; + + case SKINCOLOR_TAN: + // 8 color rame, from 3 color ranges + for (i = 0; i < SKIN_RAMP_LENGTH; i++) + { + if (8*i/16 == 0) + dest_colormap[starttranscolor + i] = 0x51; // Lightest 1 + else if (8*i/16 == 5) + dest_colormap[starttranscolor + i] = 0xE5; // Darkest 1 + else if (8*i/16 == 6) + dest_colormap[starttranscolor + i] = 0xE9; // Darkest 2 + else if (8*i/16 == 7) + dest_colormap[starttranscolor + i] = 0xDD; // Darkest 3 + else + dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (8*i/SKIN_RAMP_LENGTH) - 1); // main + } + break; + + case SKINCOLOR_BEIGE: + // 13 color range, from 2 color ranges + for (i = 0; i < SKIN_RAMP_LENGTH; i++) + { + if (13*i/16 == 12) + dest_colormap[starttranscolor + i] = 0xDD; // darkest + else + dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (13*i/SKIN_RAMP_LENGTH)); // Neon green + } + break; + + case SKINCOLOR_STEELBLUE: + // 8 color range, from 2 color ranges + for (i = 0; i < SKIN_RAMP_LENGTH; i++) + { + if (8*i/16 <= 1) + dest_colormap[starttranscolor + i] = 0x80 + 8*i/16; // Lightest + else + dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (8*i/SKIN_RAMP_LENGTH) - 2); // main + } + break; + + case SKINCOLOR_LAVENDER: + // 10 color range, from 2 color ranges + for (i = 0; i < SKIN_RAMP_LENGTH; i++) + { + if (10*i/16 <= 1) + dest_colormap[starttranscolor + i] = 0xEC + 10*i/16; // Lightest + else + dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (10*i/SKIN_RAMP_LENGTH) - 2); // main + } + break; + + case SKINCOLOR_PURPLE: + // 12 color range, from 2 color ranges + for (i = 0; i < SKIN_RAMP_LENGTH; i++) + { + if (12*i/16 == 0) + dest_colormap[starttranscolor + i] = 0xEC; // Lightest + else + dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (12*i/SKIN_RAMP_LENGTH) - 1); // main + } + break; + + case SKINCOLOR_YELLOW: + // 13 color range, from 2 color ranges + // actually magenta + for (i = 0; i < SKIN_RAMP_LENGTH; i++) + { + if (12*i/16 <= 3) + dest_colormap[starttranscolor + i] = 0x50 + 12*i/16; // Lightest + else + dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (12*i/SKIN_RAMP_LENGTH) - 4); // main + } + break; + + case SKINCOLOR_GOLD: + // 10 color rame, from 2 color ranges + for (i = 0; i < SKIN_RAMP_LENGTH; i++) + { + if (10*i/16 == 0) + dest_colormap[starttranscolor + i] = 0x50; // Lightest + else if (10*i/16 == 1) + dest_colormap[starttranscolor + i] = 0x53; // Second + else + dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (10*i/SKIN_RAMP_LENGTH) - 2); // main + } + break; + case SKINCOLOR_OLIVE: // 7 color ramp for (i = 0; i < SKIN_RAMP_LENGTH; i++) dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (7*i/SKIN_RAMP_LENGTH)); break; - case SKINCOLOR_TAN: - // 16 color ramp, from two color ranges - for (i = 0; i < SKIN_RAMP_LENGTH/2; i++) // Peach half - dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + i); - for (i = 0; i < SKIN_RAMP_LENGTH/2; i++) // Brown half - dest_colormap[starttranscolor + (i+8)] = (UINT8)(48 + i); - break; - - case SKINCOLOR_ROSEWOOD: - // 12 color ramp, from two color ranges! - for (i = 0; i < 6; i++) // Orange ...third? - dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (12*i/SKIN_RAMP_LENGTH)); - for (i = 0; i < 10; i++) // Rosewood two-thirds-ish - dest_colormap[starttranscolor + (i+6)] = (UINT8)(152 + (12*i/SKIN_RAMP_LENGTH)); - break; - case SKINCOLOR_NEONGREEN: // Multi-color ramp - dest_colormap[starttranscolor] = 0xA0; // Brighter green - for (i = 0; i < SKIN_RAMP_LENGTH-1; i++) // Neon Green - dest_colormap[starttranscolor + (i+1)] = (UINT8)(skinbasecolors[color - 1] + (6*i/(SKIN_RAMP_LENGTH-1))); + for (i = 0; i < SKIN_RAMP_LENGTH; i++) + { + if (10*i/16 <= 1) + dest_colormap[starttranscolor + i] = 0x60 + 10*i/16; // Brighter green + else if (10*i/16 < 9) + dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (10*i/SKIN_RAMP_LENGTH) - 2); // Neon green + else + dest_colormap[starttranscolor + i] = 0x6F; + } break; // Super colors, from lightest to darkest! From 70d0595817ddd20c8519911cdc7e5bea72a87c90 Mon Sep 17 00:00:00 2001 From: Sryder13 Date: Thu, 23 Jul 2015 17:58:52 +0100 Subject: [PATCH 02/27] Update colour changes More correct colour ranges. Added Rosewood. Added Super Sonic Colours (No Super Tails or Knuckles, at least not yet). --- src/r_draw.c | 278 ++++++++++++++++++++++++++++++++------------------- 1 file changed, 174 insertions(+), 104 deletions(-) diff --git a/src/r_draw.c b/src/r_draw.c index a8f48bbeb..6689e6c29 100644 --- a/src/r_draw.c +++ b/src/r_draw.c @@ -239,17 +239,17 @@ static void R_GenerateTranslationColormap(UINT8 *dest_colormap, INT32 skinnum, U 0x70, // SKINCOLOR_CYAN 0x7c, // SKINCOLOR_TEAL 0x9a, // SKINCOLOR_STEELBLUE - 0x80, // SKINCOLOR_BLUE + 0x82, // SKINCOLOR_BLUE 0xc8, // SKINCOLOR_PEACH 0x54, // SKINCOLOR_TAN 0xc0, // SKINCOLOR_PINK 0xb0, // SKINCOLOR_LAVENDER - 0xa0, // SKINCOLOR_PURPLE - 0x30, // SKINCOLOR_ORANGE - 0x30, // SKINCOLOR_ROSEWOOD + 0xa3, // SKINCOLOR_PURPLE + 0x31, // SKINCOLOR_ORANGE + 0x3a, // SKINCOLOR_ROSEWOOD 0xe0, // SKINCOLOR_BEIGE 0xd0, // SKINCOLOR_BROWN - 0x20, // SKINCOLOR_RED + 0x21, // SKINCOLOR_RED 0x28, // SKINCOLOR_DARKRED 0xf0, // SKINCOLOR_NEONGREEN 0x60, // SKINCOLOR_GREEN @@ -294,12 +294,7 @@ static void R_GenerateTranslationColormap(UINT8 *dest_colormap, INT32 skinnum, U case SKINCOLOR_SILVER: case SKINCOLOR_GREY: case SKINCOLOR_BROWN: - case SKINCOLOR_RED: case SKINCOLOR_GREEN: - case SKINCOLOR_BLUE: - - case SKINCOLOR_ORANGE: - case SKINCOLOR_ROSEWOOD: // 16 color ramp for (i = 0; i < SKIN_RAMP_LENGTH; i++) dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + i); @@ -311,24 +306,43 @@ static void R_GenerateTranslationColormap(UINT8 *dest_colormap, INT32 skinnum, U dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (12*i/SKIN_RAMP_LENGTH)); break; + case SKINCOLOR_PURPLE: + // 9 color ramp + for (i = 0; i < SKIN_RAMP_LENGTH; i++) + dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (9*i/SKIN_RAMP_LENGTH)); + break; + case SKINCOLOR_WHITE: case SKINCOLOR_BLACK: case SKINCOLOR_PINK: - case SKINCOLOR_DARKRED: case SKINCOLOR_ZIM: // 8 color ramp for (i = 0; i < SKIN_RAMP_LENGTH; i++) dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (i >> 1)); break; - case SKINCOLOR_TEAL: - // 5 color ramp, from 2 colour ranges + case SKINCOLOR_RED: for (i = 0; i < SKIN_RAMP_LENGTH; i++) { - if (5*i/16 == 0) - dest_colormap[starttranscolor + i] = 0xf8; + if (i == 13) + dest_colormap[starttranscolor + i] = 0x47; + else if (i > 13) + dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + i - 1); else - dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (5*i/SKIN_RAMP_LENGTH) - 1); + dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + i); + } + break; + + case SKINCOLOR_DARKRED: + // 9 colors + for (i = 0; i < SKIN_RAMP_LENGTH; i++) + { + if (9*i/16 == 6) + dest_colormap[starttranscolor + i] = 0x47; + else if (9*i/16 > 6) + dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (9*i/SKIN_RAMP_LENGTH) - 1); + else + dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (9*i/SKIN_RAMP_LENGTH)); } break; @@ -345,8 +359,57 @@ static void R_GenerateTranslationColormap(UINT8 *dest_colormap, INT32 skinnum, U } break; + case SKINCOLOR_BEIGE: + // 13 color range, from 2 color ranges + for (i = 0; i < SKIN_RAMP_LENGTH; i++) + { + if (13*i/16 == 12) + dest_colormap[starttranscolor + i] = 0xDD; // darkest + else + dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (13*i/SKIN_RAMP_LENGTH)); // Neon green + } + break; + + case SKINCOLOR_ORANGE: + for (i = 0; i < SKIN_RAMP_LENGTH; i++) + { + if (i == 15) + dest_colormap[starttranscolor + i] = 0xEE; + else + dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + i); + } + break; + + case SKINCOLOR_ROSEWOOD: + // 9 colors + for (i = 0; i < SKIN_RAMP_LENGTH; i++) + { + if (9*i/16 == 6) + dest_colormap[starttranscolor + i] = 0xEE; + else if (9*i/16 == 7) + dest_colormap[starttranscolor + i] = 0xEF; + else if (9*i/16 == 8) + dest_colormap[starttranscolor + i] = 0x47; + else + dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (9*i/SKIN_RAMP_LENGTH)); + } + break; + + case SKINCOLOR_GOLD: + // 10 color range, from 2 color ranges + for (i = 0; i < SKIN_RAMP_LENGTH; i++) + { + if (10*i/16 == 0) + dest_colormap[starttranscolor + i] = 0x50; // Lightest + else if (10*i/16 == 1) + dest_colormap[starttranscolor + i] = 0x53; // Second + else + dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (10*i/SKIN_RAMP_LENGTH) - 2); // main + } + break; + case SKINCOLOR_TAN: - // 8 color rame, from 3 color ranges + // 8 color range, from 3 color ranges for (i = 0; i < SKIN_RAMP_LENGTH; i++) { if (8*i/16 == 0) @@ -362,14 +425,60 @@ static void R_GenerateTranslationColormap(UINT8 *dest_colormap, INT32 skinnum, U } break; - case SKINCOLOR_BEIGE: - // 13 color range, from 2 color ranges + case SKINCOLOR_OLIVE: + // 7 color ramp + for (i = 0; i < SKIN_RAMP_LENGTH; i++) + dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (7*i/SKIN_RAMP_LENGTH)); + break; + + case SKINCOLOR_YELLOW: + // 10 color range, from 2 color ranges for (i = 0; i < SKIN_RAMP_LENGTH; i++) { - if (13*i/16 == 12) - dest_colormap[starttranscolor + i] = 0xDD; // darkest + if (10*i/16 == 0) + dest_colormap[starttranscolor + i] = 0x53; // Lightest + else if (10*i/16 == 9) + dest_colormap[starttranscolor + i] = 0xDD; // Darkest else - dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (13*i/SKIN_RAMP_LENGTH)); // Neon green + dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (10*i/SKIN_RAMP_LENGTH) - 1); // main + } + break; + + case SKINCOLOR_NEONGREEN: + // Multi-color ramp + for (i = 0; i < SKIN_RAMP_LENGTH; i++) + { + if (10*i/16 <= 1) + dest_colormap[starttranscolor + i] = 0x60 + 10*i/16; // Brighter green + else if (10*i/16 < 9) + dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (10*i/SKIN_RAMP_LENGTH) - 2); // Neon green + else + dest_colormap[starttranscolor + i] = 0x6F; + } + break; + + case SKINCOLOR_TEAL: + // 6 color ramp + for (i = 0; i < SKIN_RAMP_LENGTH; i++) + { + if (6*i/16 == 0) + dest_colormap[starttranscolor + i] = 0xf8; // Lightest + else if (6*i/16 == 5) + dest_colormap[starttranscolor + i] = 0x7a; // Darkest + else + dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (6*i/SKIN_RAMP_LENGTH) - 1); + } + break; + + case SKINCOLOR_BLUE: + for (i = 0; i < SKIN_RAMP_LENGTH; i++) + { + if (i == 14) + dest_colormap[starttranscolor + i] = 0x9F; + else if (i == 15) + dest_colormap[starttranscolor + i] = 0x1F; + else + dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + i); } break; @@ -379,6 +488,8 @@ static void R_GenerateTranslationColormap(UINT8 *dest_colormap, INT32 skinnum, U { if (8*i/16 <= 1) dest_colormap[starttranscolor + i] = 0x80 + 8*i/16; // Lightest + else if (8*i/16 == 7) + dest_colormap[starttranscolor + i] = 0x7B; // Darkest else dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (8*i/SKIN_RAMP_LENGTH) - 2); // main } @@ -395,108 +506,67 @@ static void R_GenerateTranslationColormap(UINT8 *dest_colormap, INT32 skinnum, U } break; - case SKINCOLOR_PURPLE: - // 12 color range, from 2 color ranges - for (i = 0; i < SKIN_RAMP_LENGTH; i++) - { - if (12*i/16 == 0) - dest_colormap[starttranscolor + i] = 0xEC; // Lightest - else - dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (12*i/SKIN_RAMP_LENGTH) - 1); // main - } - break; - - case SKINCOLOR_YELLOW: - // 13 color range, from 2 color ranges - // actually magenta - for (i = 0; i < SKIN_RAMP_LENGTH; i++) - { - if (12*i/16 <= 3) - dest_colormap[starttranscolor + i] = 0x50 + 12*i/16; // Lightest - else - dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (12*i/SKIN_RAMP_LENGTH) - 4); // main - } - break; - - case SKINCOLOR_GOLD: - // 10 color rame, from 2 color ranges - for (i = 0; i < SKIN_RAMP_LENGTH; i++) - { - if (10*i/16 == 0) - dest_colormap[starttranscolor + i] = 0x50; // Lightest - else if (10*i/16 == 1) - dest_colormap[starttranscolor + i] = 0x53; // Second - else - dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (10*i/SKIN_RAMP_LENGTH) - 2); // main - } - break; - - case SKINCOLOR_OLIVE: - // 7 color ramp - for (i = 0; i < SKIN_RAMP_LENGTH; i++) - dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (7*i/SKIN_RAMP_LENGTH)); - break; - - case SKINCOLOR_NEONGREEN: - // Multi-color ramp - for (i = 0; i < SKIN_RAMP_LENGTH; i++) - { - if (10*i/16 <= 1) - dest_colormap[starttranscolor + i] = 0x60 + 10*i/16; // Brighter green - else if (10*i/16 < 9) - dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (10*i/SKIN_RAMP_LENGTH) - 2); // Neon green - else - dest_colormap[starttranscolor + i] = 0x6F; - } - break; - // Super colors, from lightest to darkest! case SKINCOLOR_SUPER1: // Super White for (i = 0; i < 10; i++) - dest_colormap[starttranscolor + i] = 120; // True white - for (; i < SKIN_RAMP_LENGTH; i++) // White-yellow fade - dest_colormap[starttranscolor + i] = (UINT8)(96 + (i-10)); + dest_colormap[starttranscolor + i] = (UINT8)0; // True white + for (; i < 12; i++) // White-yellow fade + dest_colormap[starttranscolor + i] = (UINT8)(80); + for (; i < 15; i++) // White-yellow fade + dest_colormap[starttranscolor + i] = (UINT8)(81 + (i-12)); + dest_colormap[starttranscolor + 15] = (UINT8)(72); break; case SKINCOLOR_SUPER2: // Super Bright - for (i = 0; i < 5; i++) // White-yellow fade - dest_colormap[starttranscolor + i] = (UINT8)(96 + i); - dest_colormap[starttranscolor + 5] = 112; // Golden shine - for (i = 0; i < 8; i++) // Yellow - dest_colormap[starttranscolor + (i+6)] = (UINT8)(101 + (i>>1)); - for (i = 0; i < 2; i++) // With a fine golden finish! :3 - dest_colormap[starttranscolor + (i+14)] = (UINT8)(113 + i); + dest_colormap[starttranscolor] = (UINT8)(0); + for (i = 1; i < 4; i++) // White-yellow fade + dest_colormap[starttranscolor + i] = (UINT8)(80 + (i-1)); + for (; i < 6; i++) // Yellow + dest_colormap[starttranscolor + i] = (UINT8)(83); + for (; i < 8; i++) // Yellow + dest_colormap[starttranscolor + i] = (UINT8)(72); + for (; i < 14; i++) // Yellow + dest_colormap[starttranscolor + i] = (UINT8)(73); + for (; i < 16; i++) // With a fine golden finish! :3 + dest_colormap[starttranscolor + i] = (UINT8)(64 + (i-14)); break; case SKINCOLOR_SUPER3: // Super Yellow - for (i = 0; i < 3; i++) // White-yellow fade - dest_colormap[starttranscolor + i] = (UINT8)(98 + i); - dest_colormap[starttranscolor + 3] = 112; // Golden shine - for (i = 0; i < 8; i++) // Yellow - dest_colormap[starttranscolor + (i+4)] = (UINT8)(101 + (i>>1)); - for (i = 0; i < 4; i++) // With a fine golden finish! :3 - dest_colormap[starttranscolor + (i+12)] = (UINT8)(113 + i); + for (i = 0; i < 2; i++) // White-yellow fade + dest_colormap[starttranscolor + i] = (UINT8)(81 + i); + for (; i < 4; i++) + dest_colormap[starttranscolor + i] = (UINT8)(83); + for (; i < 6; i++) // Yellow + dest_colormap[starttranscolor + i] = (UINT8)(72); + for (; i < 12; i++) // Yellow + dest_colormap[starttranscolor + i] = (UINT8)(73); + for (; i < 16; i++) // With a fine golden finish! :3 + dest_colormap[starttranscolor + i] = (UINT8)(64 + (i-12)); break; case SKINCOLOR_SUPER4: // "The SSNTails" - dest_colormap[starttranscolor] = 112; // Golden shine - for (i = 0; i < 8; i++) // Yellow - dest_colormap[starttranscolor + (i+1)] = (UINT8)(101 + (i>>1)); - for (i = 0; i < 7; i++) // With a fine golden finish! :3 - dest_colormap[starttranscolor + (i+9)] = (UINT8)(113 + i); + dest_colormap[starttranscolor] = 83; // Golden shine + for (i = 1; i < 3; i++) // Yellow + dest_colormap[starttranscolor + i] = (UINT8)(72); + for (; i < 9; i++) // Yellow + dest_colormap[starttranscolor + i] = (UINT8)(73); + for (; i < 16; i++) // With a fine golden finish! :3 + dest_colormap[starttranscolor + i] = (UINT8)(64 + (i-9)); break; case SKINCOLOR_SUPER5: // Golden Delicious - for (i = 0; i < 8; i++) // Yellow - dest_colormap[starttranscolor + i] = (UINT8)(101 + (i>>1)); - for (i = 0; i < 7; i++) // With a fine golden finish! :3 - dest_colormap[starttranscolor + (i+8)] = (UINT8)(113 + i); - dest_colormap[starttranscolor + 15] = 155; + for (i = 0; i < 2; i++) // Yellow + dest_colormap[starttranscolor + i] = (UINT8)(72); + for (; i < 8; i++) // Yellow + dest_colormap[starttranscolor + i] = (UINT8)(73); + for (; i < 15; i++) // With a fine golden finish! :3 + dest_colormap[starttranscolor + i] = (UINT8)(64 + (i-8)); + dest_colormap[starttranscolor + 15] = (UINT8)63; break; // Super Tails From e054f4b6c6703ca6a11369107c9d2510ea988ecc Mon Sep 17 00:00:00 2001 From: Sryder13 Date: Thu, 23 Jul 2015 18:56:05 +0100 Subject: [PATCH 03/27] Drawfills and Console All relevant DrawFills had colours changed. Console background colour changed. Text colourmapping changed. --- src/console.c | 40 ++++++++++++++++++++-------------------- src/d_clisrv.c | 6 +++--- src/m_menu.c | 2 +- src/r_main.c | 2 +- 4 files changed, 25 insertions(+), 25 deletions(-) diff --git a/src/console.c b/src/console.c index e77c400b3..1c8640396 100644 --- a/src/console.c +++ b/src/console.c @@ -248,11 +248,11 @@ void CON_ReSetupBackColormap(UINT16 num) { j = pal[i] + pal[i+1] + pal[i+2]; cwhitemap[k] = (UINT8)(15 - (j>>6)); - corangemap[k] = (UINT8)(95 - (j>>6)); - cbluemap[k] = (UINT8)(239 - (j>>6)); - cgreenmap[k] = (UINT8)(175 - (j>>6)); + corangemap[k] = (UINT8)(63 - (j>>6)); + cbluemap[k] = (UINT8)(143 - (j>>6)); + cgreenmap[k] = (UINT8)(111 - (j>>6)); cgraymap[k] = (UINT8)(31 - (j>>6)); - credmap[k] = (UINT8)(143 - (j>>6)); + credmap[k] = (UINT8)(47 - (j>>6)); } } @@ -283,11 +283,11 @@ static void CON_SetupBackColormap(void) { j = pal[i] + pal[i+1] + pal[i+2]; cwhitemap[k] = (UINT8)(15 - (j>>6)); - corangemap[k] = (UINT8)(95 - (j>>6)); - cbluemap[k] = (UINT8)(239 - (j>>6)); - cgreenmap[k] = (UINT8)(175 - (j>>6)); + corangemap[k] = (UINT8)(63 - (j>>6)); + cbluemap[k] = (UINT8)(143 - (j>>6)); + cgreenmap[k] = (UINT8)(111 - (j>>6)); cgraymap[k] = (UINT8)(31 - (j>>6)); - credmap[k] = (UINT8)(143 - (j>>6)); + credmap[k] = (UINT8)(47 - (j>>6)); } // setup the other colormaps, for console text @@ -306,20 +306,20 @@ static void CON_SetupBackColormap(void) orangemap[i] = (UINT8)i; } - yellowmap[3] = (UINT8)103; - yellowmap[9] = (UINT8)115; - purplemap[3] = (UINT8)195; - purplemap[9] = (UINT8)198; - lgreenmap[3] = (UINT8)162; - lgreenmap[9] = (UINT8)170; - bluemap[3] = (UINT8)228; - bluemap[9] = (UINT8)238; + yellowmap[3] = (UINT8)73; + yellowmap[9] = (UINT8)66; + purplemap[3] = (UINT8)168; + purplemap[9] = (UINT8)170; + lgreenmap[3] = (UINT8)102; + lgreenmap[9] = (UINT8)106; + bluemap[3] = (UINT8)131; + bluemap[9] = (UINT8)142; graymap[3] = (UINT8)10; graymap[9] = (UINT8)15; - redmap[3] = (UINT8)124; - redmap[9] = (UINT8)127; - orangemap[3] = (UINT8)85; - orangemap[9] = (UINT8)90; + redmap[3] = (UINT8)194; + redmap[9] = (UINT8)32; + orangemap[3] = (UINT8)52; + orangemap[9] = (UINT8)57; } // Setup the console text buffer diff --git a/src/d_clisrv.c b/src/d_clisrv.c index c0179ca1b..31738e9b2 100644 --- a/src/d_clisrv.c +++ b/src/d_clisrv.c @@ -1101,7 +1101,7 @@ static inline void CL_DrawConnectionStatus(void) if (cl_mode != cl_downloadfiles) { INT32 i, animtime = ((ccstime / 4) & 15) + 16; - UINT8 palstart = (cl_mode == cl_searching) ? 128 : 160; + UINT8 palstart = (cl_mode == cl_searching) ? 32 : 96; // 15 pal entries total. const char *cltext; @@ -1139,8 +1139,8 @@ static inline void CL_DrawConnectionStatus(void) dldlength = (INT32)((fileneeded[lastfilenum].currentsize/(double)fileneeded[lastfilenum].totalsize) * 256); if (dldlength > 256) dldlength = 256; - V_DrawFill(BASEVIDWIDTH/2-128, BASEVIDHEIGHT-24, 256, 8, 175); - V_DrawFill(BASEVIDWIDTH/2-128, BASEVIDHEIGHT-24, dldlength, 8, 160); + V_DrawFill(BASEVIDWIDTH/2-128, BASEVIDHEIGHT-24, 256, 8, 111); + V_DrawFill(BASEVIDWIDTH/2-128, BASEVIDHEIGHT-24, dldlength, 8, 96); memset(tempname, 0, sizeof(tempname)); nameonly(strncpy(tempname, fileneeded[lastfilenum].filename, 31)); diff --git a/src/m_menu.c b/src/m_menu.c index 06aaac0ef..111be9479 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -2820,7 +2820,7 @@ static void M_DrawSlider(INT32 x, INT32 y, const consvar_t *cv) void M_DrawTextBox(INT32 x, INT32 y, INT32 width, INT32 boxlines) { // Solid color textbox. - V_DrawFill(x+5, y+5, width*8+6, boxlines*8+6, 239); + V_DrawFill(x+5, y+5, width*8+6, boxlines*8+6, 143); //V_DrawFill(x+8, y+8, width*8, boxlines*8, 31); /* patch_t *p; diff --git a/src/r_main.c b/src/r_main.c index ffd4d5d50..77d6a456c 100644 --- a/src/r_main.c +++ b/src/r_main.c @@ -1282,7 +1282,7 @@ void R_RenderPlayerView(player_t *player) if (cv_homremoval.value == 1) V_DrawFill(0, 0, vid.width, vid.height, 31); // No HOM effect! else //'development' HOM removal -- makes it blindingly obvious if HOM is spotted. - V_DrawFill(0, 0, vid.width, vid.height, 128+(timeinmap&15)); + V_DrawFill(0, 0, vid.width, vid.height, 32+(timeinmap&15)); } portalrender = 0; From 721a5f9b4b57fd1c4237cde298b665e2b91f93ca Mon Sep 17 00:00:00 2001 From: Sryder13 Date: Thu, 23 Jul 2015 21:43:30 +0100 Subject: [PATCH 04/27] Default Translation color + Neon Green change --- src/r_draw.c | 30 ++++++++++++++---------------- src/r_things.c | 2 +- 2 files changed, 15 insertions(+), 17 deletions(-) diff --git a/src/r_draw.c b/src/r_draw.c index 6689e6c29..5f4f28cfc 100644 --- a/src/r_draw.c +++ b/src/r_draw.c @@ -121,7 +121,7 @@ UINT32 nflatxshift, nflatyshift, nflatshiftup, nflatmask; #define METALSONIC_TT_CACHE_INDEX (MAXSKINS + 2) #define ALLWHITE_TT_CACHE_INDEX (MAXSKINS + 3) #define SKIN_RAMP_LENGTH 16 -#define DEFAULT_STARTTRANSCOLOR 160 +#define DEFAULT_STARTTRANSCOLOR 96 #define NUM_PALETTE_ENTRIES 256 static UINT8** translationtablecache[MAXSKINS + 4] = {NULL}; @@ -347,7 +347,7 @@ static void R_GenerateTranslationColormap(UINT8 *dest_colormap, INT32 skinnum, U break; case SKINCOLOR_PEACH: - // 10 color rame, from 2 color ranges + // 10 colors for (i = 0; i < SKIN_RAMP_LENGTH; i++) { if (10*i/16 == 0) @@ -360,7 +360,7 @@ static void R_GenerateTranslationColormap(UINT8 *dest_colormap, INT32 skinnum, U break; case SKINCOLOR_BEIGE: - // 13 color range, from 2 color ranges + // 13 colors for (i = 0; i < SKIN_RAMP_LENGTH; i++) { if (13*i/16 == 12) @@ -396,7 +396,7 @@ static void R_GenerateTranslationColormap(UINT8 *dest_colormap, INT32 skinnum, U break; case SKINCOLOR_GOLD: - // 10 color range, from 2 color ranges + // 10 colors for (i = 0; i < SKIN_RAMP_LENGTH; i++) { if (10*i/16 == 0) @@ -409,7 +409,7 @@ static void R_GenerateTranslationColormap(UINT8 *dest_colormap, INT32 skinnum, U break; case SKINCOLOR_TAN: - // 8 color range, from 3 color ranges + // 8 colors for (i = 0; i < SKIN_RAMP_LENGTH; i++) { if (8*i/16 == 0) @@ -426,13 +426,13 @@ static void R_GenerateTranslationColormap(UINT8 *dest_colormap, INT32 skinnum, U break; case SKINCOLOR_OLIVE: - // 7 color ramp + // 7 colors for (i = 0; i < SKIN_RAMP_LENGTH; i++) dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (7*i/SKIN_RAMP_LENGTH)); break; case SKINCOLOR_YELLOW: - // 10 color range, from 2 color ranges + // 10 colors for (i = 0; i < SKIN_RAMP_LENGTH; i++) { if (10*i/16 == 0) @@ -445,20 +445,18 @@ static void R_GenerateTranslationColormap(UINT8 *dest_colormap, INT32 skinnum, U break; case SKINCOLOR_NEONGREEN: - // Multi-color ramp + // 8 colors for (i = 0; i < SKIN_RAMP_LENGTH; i++) { - if (10*i/16 <= 1) - dest_colormap[starttranscolor + i] = 0x60 + 10*i/16; // Brighter green - else if (10*i/16 < 9) - dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (10*i/SKIN_RAMP_LENGTH) - 2); // Neon green + if (8*i/16 == 7) + dest_colormap[starttranscolor + i] = 0x6E; // Darkest else - dest_colormap[starttranscolor + i] = 0x6F; + dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (8*i/SKIN_RAMP_LENGTH)); // Neon green } break; case SKINCOLOR_TEAL: - // 6 color ramp + // 6 colors for (i = 0; i < SKIN_RAMP_LENGTH; i++) { if (6*i/16 == 0) @@ -483,7 +481,7 @@ static void R_GenerateTranslationColormap(UINT8 *dest_colormap, INT32 skinnum, U break; case SKINCOLOR_STEELBLUE: - // 8 color range, from 2 color ranges + // 8 colors for (i = 0; i < SKIN_RAMP_LENGTH; i++) { if (8*i/16 <= 1) @@ -496,7 +494,7 @@ static void R_GenerateTranslationColormap(UINT8 *dest_colormap, INT32 skinnum, U break; case SKINCOLOR_LAVENDER: - // 10 color range, from 2 color ranges + // 10 colors for (i = 0; i < SKIN_RAMP_LENGTH; i++) { if (10*i/16 <= 1) diff --git a/src/r_things.c b/src/r_things.c index 9a8b1319b..3b46d4d3d 100644 --- a/src/r_things.c +++ b/src/r_things.c @@ -2235,7 +2235,7 @@ static void Sk_SetDefaultValue(skin_t *skin) strncpy(skin->face, "MISSING", 8); strncpy(skin->superface, "MISSING", 8); - skin->starttranscolor = 160; + skin->starttranscolor = 96; skin->prefcolor = SKINCOLOR_GREEN; skin->normalspeed = 36< Date: Thu, 23 Jul 2015 22:57:54 +0100 Subject: [PATCH 05/27] Rearange colours to be in more correct order --- src/r_draw.c | 174 +++++++++++++++++++++++++-------------------------- 1 file changed, 87 insertions(+), 87 deletions(-) diff --git a/src/r_draw.c b/src/r_draw.c index 5f4f28cfc..50c449624 100644 --- a/src/r_draw.c +++ b/src/r_draw.c @@ -321,28 +321,41 @@ static void R_GenerateTranslationColormap(UINT8 *dest_colormap, INT32 skinnum, U dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (i >> 1)); break; - case SKINCOLOR_RED: + case SKINCOLOR_TEAL: + // 6 colors for (i = 0; i < SKIN_RAMP_LENGTH; i++) { - if (i == 13) - dest_colormap[starttranscolor + i] = 0x47; - else if (i > 13) - dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + i - 1); + if (6*i/16 == 0) + dest_colormap[starttranscolor + i] = 0xf8; // Lightest + else if (6*i/16 == 5) + dest_colormap[starttranscolor + i] = 0x7a; // Darkest else - dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + i); + dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (6*i/SKIN_RAMP_LENGTH) - 1); } break; - case SKINCOLOR_DARKRED: - // 9 colors + case SKINCOLOR_STEELBLUE: + // 8 colors for (i = 0; i < SKIN_RAMP_LENGTH; i++) { - if (9*i/16 == 6) - dest_colormap[starttranscolor + i] = 0x47; - else if (9*i/16 > 6) - dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (9*i/SKIN_RAMP_LENGTH) - 1); + if (8*i/16 <= 1) + dest_colormap[starttranscolor + i] = 0x80 + 8*i/16; // Lightest + else if (8*i/16 == 7) + dest_colormap[starttranscolor + i] = 0x7B; // Darkest else - dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (9*i/SKIN_RAMP_LENGTH)); + dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (8*i/SKIN_RAMP_LENGTH) - 2); // main + } + break; + + case SKINCOLOR_BLUE: + for (i = 0; i < SKIN_RAMP_LENGTH; i++) + { + if (i == 14) + dest_colormap[starttranscolor + i] = 0x9F; + else if (i == 15) + dest_colormap[starttranscolor + i] = 0x1F; + else + dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + i); } break; @@ -359,14 +372,31 @@ static void R_GenerateTranslationColormap(UINT8 *dest_colormap, INT32 skinnum, U } break; - case SKINCOLOR_BEIGE: - // 13 colors + case SKINCOLOR_TAN: + // 8 colors for (i = 0; i < SKIN_RAMP_LENGTH; i++) { - if (13*i/16 == 12) - dest_colormap[starttranscolor + i] = 0xDD; // darkest + if (8*i/16 == 0) + dest_colormap[starttranscolor + i] = 0x51; // Lightest 1 + else if (8*i/16 == 5) + dest_colormap[starttranscolor + i] = 0xE5; // Darkest 1 + else if (8*i/16 == 6) + dest_colormap[starttranscolor + i] = 0xE9; // Darkest 2 + else if (8*i/16 == 7) + dest_colormap[starttranscolor + i] = 0xDD; // Darkest 3 else - dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (13*i/SKIN_RAMP_LENGTH)); // Neon green + dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (8*i/SKIN_RAMP_LENGTH) - 1); // main + } + break; + + case SKINCOLOR_LAVENDER: + // 10 colors + for (i = 0; i < SKIN_RAMP_LENGTH; i++) + { + if (10*i/16 <= 1) + dest_colormap[starttranscolor + i] = 0xEC + 10*i/16; // Lightest + else + dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (10*i/SKIN_RAMP_LENGTH) - 2); // main } break; @@ -395,33 +425,50 @@ static void R_GenerateTranslationColormap(UINT8 *dest_colormap, INT32 skinnum, U } break; - case SKINCOLOR_GOLD: - // 10 colors + case SKINCOLOR_BEIGE: + // 13 colors for (i = 0; i < SKIN_RAMP_LENGTH; i++) { - if (10*i/16 == 0) - dest_colormap[starttranscolor + i] = 0x50; // Lightest - else if (10*i/16 == 1) - dest_colormap[starttranscolor + i] = 0x53; // Second + if (13*i/16 == 12) + dest_colormap[starttranscolor + i] = 0xDD; // darkest else - dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (10*i/SKIN_RAMP_LENGTH) - 2); // main + dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (13*i/SKIN_RAMP_LENGTH)); // Neon green } break; - case SKINCOLOR_TAN: + case SKINCOLOR_RED: + for (i = 0; i < SKIN_RAMP_LENGTH; i++) + { + if (i == 13) + dest_colormap[starttranscolor + i] = 0x47; + else if (i > 13) + dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + i - 1); + else + dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + i); + } + break; + + case SKINCOLOR_DARKRED: + // 9 colors + for (i = 0; i < SKIN_RAMP_LENGTH; i++) + { + if (9*i/16 == 6) + dest_colormap[starttranscolor + i] = 0x47; + else if (9*i/16 > 6) + dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (9*i/SKIN_RAMP_LENGTH) - 1); + else + dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (9*i/SKIN_RAMP_LENGTH)); + } + break; + + case SKINCOLOR_NEONGREEN: // 8 colors for (i = 0; i < SKIN_RAMP_LENGTH; i++) { - if (8*i/16 == 0) - dest_colormap[starttranscolor + i] = 0x51; // Lightest 1 - else if (8*i/16 == 5) - dest_colormap[starttranscolor + i] = 0xE5; // Darkest 1 - else if (8*i/16 == 6) - dest_colormap[starttranscolor + i] = 0xE9; // Darkest 2 - else if (8*i/16 == 7) - dest_colormap[starttranscolor + i] = 0xDD; // Darkest 3 + if (8*i/16 == 7) + dest_colormap[starttranscolor + i] = 0x6E; // Darkest else - dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (8*i/SKIN_RAMP_LENGTH) - 1); // main + dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (8*i/SKIN_RAMP_LENGTH)); // Neon green } break; @@ -444,61 +491,14 @@ static void R_GenerateTranslationColormap(UINT8 *dest_colormap, INT32 skinnum, U } break; - case SKINCOLOR_NEONGREEN: - // 8 colors - for (i = 0; i < SKIN_RAMP_LENGTH; i++) - { - if (8*i/16 == 7) - dest_colormap[starttranscolor + i] = 0x6E; // Darkest - else - dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (8*i/SKIN_RAMP_LENGTH)); // Neon green - } - break; - - case SKINCOLOR_TEAL: - // 6 colors - for (i = 0; i < SKIN_RAMP_LENGTH; i++) - { - if (6*i/16 == 0) - dest_colormap[starttranscolor + i] = 0xf8; // Lightest - else if (6*i/16 == 5) - dest_colormap[starttranscolor + i] = 0x7a; // Darkest - else - dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (6*i/SKIN_RAMP_LENGTH) - 1); - } - break; - - case SKINCOLOR_BLUE: - for (i = 0; i < SKIN_RAMP_LENGTH; i++) - { - if (i == 14) - dest_colormap[starttranscolor + i] = 0x9F; - else if (i == 15) - dest_colormap[starttranscolor + i] = 0x1F; - else - dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + i); - } - break; - - case SKINCOLOR_STEELBLUE: - // 8 colors - for (i = 0; i < SKIN_RAMP_LENGTH; i++) - { - if (8*i/16 <= 1) - dest_colormap[starttranscolor + i] = 0x80 + 8*i/16; // Lightest - else if (8*i/16 == 7) - dest_colormap[starttranscolor + i] = 0x7B; // Darkest - else - dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (8*i/SKIN_RAMP_LENGTH) - 2); // main - } - break; - - case SKINCOLOR_LAVENDER: + case SKINCOLOR_GOLD: // 10 colors for (i = 0; i < SKIN_RAMP_LENGTH; i++) { - if (10*i/16 <= 1) - dest_colormap[starttranscolor + i] = 0xEC + 10*i/16; // Lightest + if (10*i/16 == 0) + dest_colormap[starttranscolor + i] = 0x50; // Lightest + else if (10*i/16 == 1) + dest_colormap[starttranscolor + i] = 0x53; // Second else dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (10*i/SKIN_RAMP_LENGTH) - 2); // main } From 9847668863bbd6bcc8d8db097a48e5785ec32a9a Mon Sep 17 00:00:00 2001 From: Sryder13 Date: Fri, 24 Jul 2015 23:39:53 +0100 Subject: [PATCH 06/27] New Colours --- src/dehacked.c | 5 ++- src/doomdef.h | 5 ++- src/r_draw.c | 82 +++++++++++++++++++++++++++++++++++++++++--------- src/st_stuff.c | 2 +- 4 files changed, 76 insertions(+), 18 deletions(-) diff --git a/src/dehacked.c b/src/dehacked.c index a332da5df..2f50afaa7 100644 --- a/src/dehacked.c +++ b/src/dehacked.c @@ -7310,14 +7310,17 @@ static const char *COLOR_ENUMS[] = { "GREY", // SKINCOLOR_GREY "BLACK", // SKINCOLOR_BLACK "CYAN", // SKINCOLOR_CYAN + "AQUAMARINE", // SKINCOLOR_AQUAMARINE "TEAL", // SKINCOLOR_TEAL "STEELBLUE", // SKINCOLOR_STEELBLUE "BLUE", // SKINCOLOR_BLUE "PEACH", // SKINCOLOR_PEACH "TAN", // SKINCOLOR_TAN "PINK", // SKINCOLOR_PINK + "ROSY", // SKINCOLOR_ROSY "LAVENDER", // SKINCOLOR_LAVENDER "PURPLE", // SKINCOLOR_PURPLE + "MAGENTA", // SKINCOLOR_MAGENTA "ORANGE", // SKINCOLOR_ORANGE "ROSEWOOD", // SKINCOLOR_ROSEWOOD "BEIGE", // SKINCOLOR_BEIGE @@ -7327,7 +7330,7 @@ static const char *COLOR_ENUMS[] = { "NEONGREEN", // SKINCOLOR_NEONGREEN "GREEN", // SKINCOLOR_GREEN "ZIM", // SKINCOLOR_ZIM - "OLIVE", // SKINCOLOR_OLIVE + "PERIDOT", // SKINCOLOR_PERIDOT "YELLOW", // SKINCOLOR_YELLOW "GOLD" // SKINCOLOR_GOLD }; diff --git a/src/doomdef.h b/src/doomdef.h index 4a6d6e576..1e7edd207 100644 --- a/src/doomdef.h +++ b/src/doomdef.h @@ -231,14 +231,17 @@ typedef enum SKINCOLOR_GREY, SKINCOLOR_BLACK, SKINCOLOR_CYAN, + SKINCOLOR_AQUAMARINE, SKINCOLOR_TEAL, SKINCOLOR_STEELBLUE, SKINCOLOR_BLUE, SKINCOLOR_PEACH, SKINCOLOR_TAN, SKINCOLOR_PINK, + SKINCOLOR_ROSY, SKINCOLOR_LAVENDER, SKINCOLOR_PURPLE, + SKINCOLOR_MAGENTA, SKINCOLOR_ORANGE, SKINCOLOR_ROSEWOOD, SKINCOLOR_BEIGE, @@ -248,7 +251,7 @@ typedef enum SKINCOLOR_NEONGREEN, SKINCOLOR_GREEN, SKINCOLOR_ZIM, - SKINCOLOR_OLIVE, + SKINCOLOR_PERIDOT, SKINCOLOR_YELLOW, SKINCOLOR_GOLD, diff --git a/src/r_draw.c b/src/r_draw.c index 50c449624..f1955c6c0 100644 --- a/src/r_draw.c +++ b/src/r_draw.c @@ -137,14 +137,17 @@ const char *Color_Names[MAXSKINCOLORS] = "Grey", // SKINCOLOR_GREY "Black", // SKINCOLOR_BLACK "Cyan", // SKINCOLOR_CYAN + "Aquamarine",// SKINCOLOR_AQUAMARINE "Teal", // SKINCOLOR_TEAL "Steel_Blue",// SKINCOLOR_STEELBLUE "Blue", // SKINCOLOR_BLUE "Peach", // SKINCOLOR_PEACH "Tan", // SKINCOLOR_TAN "Pink", // SKINCOLOR_PINK + "Rosy", // SKINCOLOR_ROSY "Lavender", // SKINCOLOR_LAVENDER "Purple", // SKINCOLOR_PURPLE + "Magenta", // SKINCOLOR_MAGENTA "Orange", // SKINCOLOR_ORANGE "Rosewood", // SKINCOLOR_ROSEWOOD "Beige", // SKINCOLOR_BEIGE @@ -154,7 +157,7 @@ const char *Color_Names[MAXSKINCOLORS] = "Neon_Green",// SKINCOLOR_NEONGREEN "Green", // SKINCOLOR_GREEN "Zim", // SKINCOLOR_ZIM - "Olive", // SKINCOLOR_OLIVE + "Peridot", // SKINCOLOR_PERIDOT "Yellow", // SKINCOLOR_YELLOW "Gold" // SKINCOLOR_GOLD }; @@ -167,14 +170,17 @@ const UINT8 Color_Opposite[MAXSKINCOLORS*2] = SKINCOLOR_SILVER,12,// SKINCOLOR_GREY SKINCOLOR_WHITE,8, // SKINCOLOR_BLACK SKINCOLOR_NONE,8, // SKINCOLOR_CYAN + SKINCOLOR_NONE,8, // SKINCOLOR_AQUAMARINE SKINCOLOR_NONE,8, // SKINCOLOR_TEAL SKINCOLOR_NONE,8, // SKINCOLOR_STEELBLUE SKINCOLOR_ORANGE,9, // SKINCOLOR_BLUE SKINCOLOR_NONE,8, // SKINCOLOR_PEACH SKINCOLOR_NONE,8, // SKINCOLOR_TAN SKINCOLOR_NONE,8, // SKINCOLOR_PINK + SKINCOLOR_NONE,8, // SKINCOLOR_ROSY SKINCOLOR_NONE,8, // SKINCOLOR_LAVENDER SKINCOLOR_NONE,8, // SKINCOLOR_PURPLE + SKINCOLOR_NONE,8, // SKINCOLOR_MAGENTA SKINCOLOR_BLUE,12, // SKINCOLOR_ORANGE SKINCOLOR_NONE,8, // SKINCOLOR_ROSEWOOD SKINCOLOR_NONE,8, // SKINCOLOR_BEIGE @@ -183,8 +189,8 @@ const UINT8 Color_Opposite[MAXSKINCOLORS*2] = SKINCOLOR_NONE,8, // SKINCOLOR_DARKRED SKINCOLOR_NONE,8, // SKINCOLOR_NEONGREEN SKINCOLOR_RED,11, // SKINCOLOR_GREEN - SKINCOLOR_PURPLE,3, // SKINCOLOR_ZIM - SKINCOLOR_NONE,8, // SKINCOLOR_OLIVE + SKINCOLOR_MAGENTA,3, // SKINCOLOR_ZIM + SKINCOLOR_NONE,8, // SKINCOLOR_PERIDOT SKINCOLOR_NONE,8, // SKINCOLOR_YELLOW SKINCOLOR_NONE,8 // SKINCOLOR_GOLD }; @@ -237,14 +243,17 @@ static void R_GenerateTranslationColormap(UINT8 *dest_colormap, INT32 skinnum, U 0x08, // SKINCOLOR_GREY 0x18, // SKINCOLOR_BLACK 0x70, // SKINCOLOR_CYAN + 0xf8, // SKINCOLOR_AQUAMARINE 0x7c, // SKINCOLOR_TEAL 0x9a, // SKINCOLOR_STEELBLUE 0x82, // SKINCOLOR_BLUE 0xc8, // SKINCOLOR_PEACH 0x54, // SKINCOLOR_TAN 0xc0, // SKINCOLOR_PINK + 0xb8, // SKINCOLOR_ROSY 0xb0, // SKINCOLOR_LAVENDER - 0xa3, // SKINCOLOR_PURPLE + 0x90, // SKINCOLOR_PURPLE + 0xa3, // SKINCOLOR_MAGENTA 0x31, // SKINCOLOR_ORANGE 0x3a, // SKINCOLOR_ROSEWOOD 0xe0, // SKINCOLOR_BEIGE @@ -254,7 +263,7 @@ static void R_GenerateTranslationColormap(UINT8 *dest_colormap, INT32 skinnum, U 0xf0, // SKINCOLOR_NEONGREEN 0x60, // SKINCOLOR_GREEN 0x58, // SKINCOLOR_ZIM - 0x49, // SKINCOLOR_OLIVE + 0xac, // SKINCOLOR_PERIDOT 0x48, // SKINCOLOR_YELLOW 0x40, // SKINCOLOR_GOLD }; @@ -307,6 +316,12 @@ static void R_GenerateTranslationColormap(UINT8 *dest_colormap, INT32 skinnum, U break; case SKINCOLOR_PURPLE: + // 10 color ramp + for (i = 0; i < SKIN_RAMP_LENGTH; i++) + dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (10*i/SKIN_RAMP_LENGTH)); + break; + + case SKINCOLOR_MAGENTA: // 9 color ramp for (i = 0; i < SKIN_RAMP_LENGTH; i++) dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (9*i/SKIN_RAMP_LENGTH)); @@ -321,6 +336,17 @@ static void R_GenerateTranslationColormap(UINT8 *dest_colormap, INT32 skinnum, U dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (i >> 1)); break; + case SKINCOLOR_AQUAMARINE: + // 10 colors + for (i = 0; i < SKIN_RAMP_LENGTH; i++) + { + if (10*i/16 >= 8) + dest_colormap[starttranscolor + i] = (UINT8)(0x6C + (10*i/SKIN_RAMP_LENGTH) - 8); // Darkest + else + dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (10*i/SKIN_RAMP_LENGTH)); + } + break; + case SKINCOLOR_TEAL: // 6 colors for (i = 0; i < SKIN_RAMP_LENGTH; i++) @@ -339,7 +365,7 @@ static void R_GenerateTranslationColormap(UINT8 *dest_colormap, INT32 skinnum, U for (i = 0; i < SKIN_RAMP_LENGTH; i++) { if (8*i/16 <= 1) - dest_colormap[starttranscolor + i] = 0x80 + 8*i/16; // Lightest + dest_colormap[starttranscolor + i] = (UINT8)(0x80 + 8*i/16); // Lightest else if (8*i/16 == 7) dest_colormap[starttranscolor + i] = 0x7B; // Darkest else @@ -389,12 +415,29 @@ static void R_GenerateTranslationColormap(UINT8 *dest_colormap, INT32 skinnum, U } break; + case SKINCOLOR_ROSY: + // 15 colors + for (i = 0; i < SKIN_RAMP_LENGTH; i++) + { + if (15*i/16 == 0) + dest_colormap[starttranscolor + i] = 0xEC; // Lightest + else if (15*i/16 == 12) + dest_colormap[starttranscolor + i] = 0x47; // Dark Shade + else if (15*i/16 >= 13) + dest_colormap[starttranscolor + i] = (UINT8)(0x2E + (15*i/SKIN_RAMP_LENGTH) - 13); // Darkest + else if (15*i/16 >= 9) + dest_colormap[starttranscolor + i] = (UINT8)(0x2B + (15*i/SKIN_RAMP_LENGTH) - 9); // Darkish + else + dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (15*i/SKIN_RAMP_LENGTH) - 1); // main + } + break; + case SKINCOLOR_LAVENDER: // 10 colors for (i = 0; i < SKIN_RAMP_LENGTH; i++) { if (10*i/16 <= 1) - dest_colormap[starttranscolor + i] = 0xEC + 10*i/16; // Lightest + dest_colormap[starttranscolor + i] = (UINT8)(0xEC + 10*i/16); // Lightest else dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (10*i/SKIN_RAMP_LENGTH) - 2); // main } @@ -472,22 +515,31 @@ static void R_GenerateTranslationColormap(UINT8 *dest_colormap, INT32 skinnum, U } break; - case SKINCOLOR_OLIVE: - // 7 colors + case SKINCOLOR_PERIDOT: + // 8 colors for (i = 0; i < SKIN_RAMP_LENGTH; i++) - dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (7*i/SKIN_RAMP_LENGTH)); + { + if (8*i/16 == 0) + dest_colormap[starttranscolor + i] = 0x48; // Lightest + else if (8*i/16 == 7) + dest_colormap[starttranscolor + i] = 0x6D; // Darkest + else if (8*i/16 >= 5) + dest_colormap[starttranscolor + i] = (UINT8)(0x5E + (8*i/SKIN_RAMP_LENGTH) - 5); // Darkish + else + dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (8*i/SKIN_RAMP_LENGTH) - 1); // main + } break; case SKINCOLOR_YELLOW: - // 10 colors + // 9 colors for (i = 0; i < SKIN_RAMP_LENGTH; i++) { - if (10*i/16 == 0) - dest_colormap[starttranscolor + i] = 0x53; // Lightest - else if (10*i/16 == 9) + if (i == 0) + dest_colormap[starttranscolor + i] = 0x48; // Lightest + else if (i == 15) dest_colormap[starttranscolor + i] = 0xDD; // Darkest else - dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (10*i/SKIN_RAMP_LENGTH) - 1); // main + dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (8*(i-1)/SKIN_RAMP_LENGTH)); } break; diff --git a/src/st_stuff.c b/src/st_stuff.c index a9bdacf71..58992bea4 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -889,7 +889,7 @@ static void ST_drawFirstPersonHUD(void) // [21:42] <+Rob> Beige - Lavender - Steel Blue - Peach - Orange - Purple - Silver - Yellow - Pink - Red - Blue - Green - Cyan - Gold static skincolors_t linkColor[14] = {SKINCOLOR_BEIGE, SKINCOLOR_LAVENDER, SKINCOLOR_STEELBLUE, SKINCOLOR_PEACH, SKINCOLOR_ORANGE, - SKINCOLOR_PURPLE, SKINCOLOR_SILVER, SKINCOLOR_SUPER4, SKINCOLOR_PINK, SKINCOLOR_RED, + SKINCOLOR_MAGENTA, SKINCOLOR_SILVER, SKINCOLOR_SUPER4, SKINCOLOR_PINK, SKINCOLOR_RED, SKINCOLOR_BLUE, SKINCOLOR_GREEN, SKINCOLOR_CYAN, SKINCOLOR_GOLD}; static void ST_drawNightsRecords(void) From c6c67d45b0d4dcb8f3486e9c094406c825eb1da1 Mon Sep 17 00:00:00 2001 From: Sryder13 Date: Sat, 25 Jul 2015 00:14:50 +0100 Subject: [PATCH 07/27] Fix Purple --- src/r_draw.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/r_draw.c b/src/r_draw.c index f1955c6c0..f54d2f171 100644 --- a/src/r_draw.c +++ b/src/r_draw.c @@ -315,12 +315,6 @@ static void R_GenerateTranslationColormap(UINT8 *dest_colormap, INT32 skinnum, U dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (12*i/SKIN_RAMP_LENGTH)); break; - case SKINCOLOR_PURPLE: - // 10 color ramp - for (i = 0; i < SKIN_RAMP_LENGTH; i++) - dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (10*i/SKIN_RAMP_LENGTH)); - break; - case SKINCOLOR_MAGENTA: // 9 color ramp for (i = 0; i < SKIN_RAMP_LENGTH; i++) @@ -443,6 +437,17 @@ static void R_GenerateTranslationColormap(UINT8 *dest_colormap, INT32 skinnum, U } break; + case SKINCOLOR_PURPLE: + // 10 colors + for (i = 0; i < SKIN_RAMP_LENGTH; i++) + { + if (i <= 3) + dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + i); // Lightest + else + dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (8*i/SKIN_RAMP_LENGTH) + 2); // main + } + break; + case SKINCOLOR_ORANGE: for (i = 0; i < SKIN_RAMP_LENGTH; i++) { From 14b157b98d532c7a5f8dbf3b6a5afefeb4936835 Mon Sep 17 00:00:00 2001 From: Sryder13 Date: Sat, 25 Jul 2015 13:35:11 +0100 Subject: [PATCH 08/27] Fix yellow --- src/r_draw.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/r_draw.c b/src/r_draw.c index f54d2f171..808b3cc6e 100644 --- a/src/r_draw.c +++ b/src/r_draw.c @@ -536,15 +536,15 @@ static void R_GenerateTranslationColormap(UINT8 *dest_colormap, INT32 skinnum, U break; case SKINCOLOR_YELLOW: - // 9 colors + // 10 colors for (i = 0; i < SKIN_RAMP_LENGTH; i++) { if (i == 0) - dest_colormap[starttranscolor + i] = 0x48; // Lightest + dest_colormap[starttranscolor + i] = 0x53; // Lightest else if (i == 15) dest_colormap[starttranscolor + i] = 0xDD; // Darkest else - dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (8*(i-1)/SKIN_RAMP_LENGTH)); + dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (8*i/SKIN_RAMP_LENGTH)); } break; From 5209787ebd32dce34de130ac4ad92bceb66bc068 Mon Sep 17 00:00:00 2001 From: Sryder13 Date: Sat, 25 Jul 2015 14:07:05 +0100 Subject: [PATCH 09/27] Rename Colours --- src/dehacked.c | 10 +++++----- src/doomdef.h | 10 +++++----- src/g_game.c | 2 +- src/m_cond.c | 52 +++++++++++++++++++++++++------------------------- src/r_draw.c | 40 +++++++++++++++++++------------------- src/st_stuff.c | 6 +++--- 6 files changed, 60 insertions(+), 60 deletions(-) diff --git a/src/dehacked.c b/src/dehacked.c index 2f50afaa7..760ae84b3 100644 --- a/src/dehacked.c +++ b/src/dehacked.c @@ -7310,9 +7310,9 @@ static const char *COLOR_ENUMS[] = { "GREY", // SKINCOLOR_GREY "BLACK", // SKINCOLOR_BLACK "CYAN", // SKINCOLOR_CYAN - "AQUAMARINE", // SKINCOLOR_AQUAMARINE + "AQUA", // SKINCOLOR_AQUA "TEAL", // SKINCOLOR_TEAL - "STEELBLUE", // SKINCOLOR_STEELBLUE + "AZURE", // SKINCOLOR_AZURE "BLUE", // SKINCOLOR_BLUE "PEACH", // SKINCOLOR_PEACH "TAN", // SKINCOLOR_TAN @@ -7322,12 +7322,12 @@ static const char *COLOR_ENUMS[] = { "PURPLE", // SKINCOLOR_PURPLE "MAGENTA", // SKINCOLOR_MAGENTA "ORANGE", // SKINCOLOR_ORANGE - "ROSEWOOD", // SKINCOLOR_ROSEWOOD + "RUST", // SKINCOLOR_RUST "BEIGE", // SKINCOLOR_BEIGE "BROWN", // SKINCOLOR_BROWN "RED", // SKINCOLOR_RED - "DARKRED", // SKINCOLOR_DARKRED - "NEONGREEN", // SKINCOLOR_NEONGREEN + "CRIMSON", // SKINCOLOR_CRIMSON + "EMERALD", // SKINCOLOR_EMERALD "GREEN", // SKINCOLOR_GREEN "ZIM", // SKINCOLOR_ZIM "PERIDOT", // SKINCOLOR_PERIDOT diff --git a/src/doomdef.h b/src/doomdef.h index 1e7edd207..d6af0f1a0 100644 --- a/src/doomdef.h +++ b/src/doomdef.h @@ -231,9 +231,9 @@ typedef enum SKINCOLOR_GREY, SKINCOLOR_BLACK, SKINCOLOR_CYAN, - SKINCOLOR_AQUAMARINE, + SKINCOLOR_AQUA, SKINCOLOR_TEAL, - SKINCOLOR_STEELBLUE, + SKINCOLOR_AZURE, SKINCOLOR_BLUE, SKINCOLOR_PEACH, SKINCOLOR_TAN, @@ -243,12 +243,12 @@ typedef enum SKINCOLOR_PURPLE, SKINCOLOR_MAGENTA, SKINCOLOR_ORANGE, - SKINCOLOR_ROSEWOOD, + SKINCOLOR_RUST, SKINCOLOR_BEIGE, SKINCOLOR_BROWN, SKINCOLOR_RED, - SKINCOLOR_DARKRED, - SKINCOLOR_NEONGREEN, + SKINCOLOR_CRIMSON, + SKINCOLOR_EMERALD, SKINCOLOR_GREEN, SKINCOLOR_ZIM, SKINCOLOR_PERIDOT, diff --git a/src/g_game.c b/src/g_game.c index c59f23c07..17734da64 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -123,7 +123,7 @@ boolean useNightsSS = false; UINT8 skincolor_redteam = SKINCOLOR_RED; UINT8 skincolor_blueteam = SKINCOLOR_BLUE; UINT8 skincolor_redring = SKINCOLOR_RED; -UINT8 skincolor_bluering = SKINCOLOR_STEELBLUE; +UINT8 skincolor_bluering = SKINCOLOR_AZURE; tic_t countdowntimer = 0; boolean countdowntimeup = false; diff --git a/src/m_cond.c b/src/m_cond.c index 17f755120..7ef192f7b 100644 --- a/src/m_cond.c +++ b/src/m_cond.c @@ -49,7 +49,7 @@ emblem_t emblemlocations[MAXEMBLEMS] = "Streams come to an end\n" "where they can no longer fall.\n" "But if you went up...", 0}, - {0, -336, 2064, 195, 1, 'E', SKINCOLOR_NEONGREEN, 0, + {0, -336, 2064, 195, 1, 'E', SKINCOLOR_EMERALD, 0, "This one's in plain sight.\n" "Why haven't you claimed it?\n" "Surely you saw it.", 0}, @@ -77,7 +77,7 @@ emblem_t emblemlocations[MAXEMBLEMS] = "Near the level's end,\n" "another bridge spans a lake.\n" "What could be under...?", 0}, - {0, -170, 491, 3821, 2, 'E', SKINCOLOR_NEONGREEN, 0, + {0, -170, 491, 3821, 2, 'E', SKINCOLOR_EMERALD, 0, "An ivied tunnel\n" "has a corner that's sunlit.\n" "Go reach for the sky!", 0}, @@ -110,7 +110,7 @@ emblem_t emblemlocations[MAXEMBLEMS] = "Spinning through small gaps\n" "can slip you into a cave.\n" "In that cave's first stretch...", 0}, - {0, 2848, -9088, 488, 4, 'E', SKINCOLOR_NEONGREEN, 0, + {0, 2848, -9088, 488, 4, 'E', SKINCOLOR_EMERALD, 0, "The slime lake is deep,\n" "but reaching the floor takes height.\n" "Scream \"Geronimo!\"...", 0}, @@ -138,7 +138,7 @@ emblem_t emblemlocations[MAXEMBLEMS] = "There is a hallway\n" "that a button floods with slime.\n" "Go through it again!", 0}, - {0, -2468,-12128, 1312, 5, 'E', SKINCOLOR_NEONGREEN, 0, + {0, -2468,-12128, 1312, 5, 'E', SKINCOLOR_EMERALD, 0, "Jumping on turtles\n" "will send you springing skyward.\n" "Now, do that six times...", 0}, @@ -171,7 +171,7 @@ emblem_t emblemlocations[MAXEMBLEMS] = "A caved-in hallway?\n" "The floor falls; the path goes down.\n" "But those rocks looked weak...", 0}, - {0, 12576, 16096, -992, 7, 'E', SKINCOLOR_NEONGREEN, 0, + {0, 12576, 16096, -992, 7, 'E', SKINCOLOR_EMERALD, 0, "The end is quite dry.\n" "Some rocks dam the water in.\n" "Knuckles can fix that...", 0}, @@ -199,7 +199,7 @@ emblem_t emblemlocations[MAXEMBLEMS] = "In the current maze\n" "hides a dark room of columns.\n" "Find it, then look up.", 0}, - {0, 3104, 16192, 2408, 8, 'E', SKINCOLOR_NEONGREEN, 0, + {0, 3104, 16192, 2408, 8, 'E', SKINCOLOR_EMERALD, 0, "That same dragon's eye\n" "hides another secret room.\n" "There, solve its riddle.", 0}, @@ -232,7 +232,7 @@ emblem_t emblemlocations[MAXEMBLEMS] = "The final approach!\n" "A tower holds the emblem\n" "near a ring arrow.", 0}, - {0, 9472, -5890, 710, 10, 'E', SKINCOLOR_NEONGREEN, 0, + {0, 9472, -5890, 710, 10, 'E', SKINCOLOR_EMERALD, 0, "The right starting path\n" "hides this near a canopy,\n" "high, where two trees meet.", 0}, @@ -260,7 +260,7 @@ emblem_t emblemlocations[MAXEMBLEMS] = "Some of these bookshelves\n" "are not flush against the walls.\n" "Wonder why that is?", 0}, - {0, 12708,-13536, 4768, 11, 'E', SKINCOLOR_NEONGREEN, 0, + {0, 12708,-13536, 4768, 11, 'E', SKINCOLOR_EMERALD, 0, "The ending's towers\n" "are hiding a small alcove.\n" "Check around outside.", 0}, @@ -293,7 +293,7 @@ emblem_t emblemlocations[MAXEMBLEMS] = "Not far from the start,\n" "if you climb toward the sky,\n" "the cliffs hide something.", 0}, - {0, 12504, 6848, 3424, 13, 'E', SKINCOLOR_NEONGREEN, 0, + {0, 12504, 6848, 3424, 13, 'E', SKINCOLOR_EMERALD, 0, "Right by the exit,\n" "an emblem lies on a cliff.\n" "Ride ropes to reach it.", 0}, @@ -321,7 +321,7 @@ emblem_t emblemlocations[MAXEMBLEMS] = "Where once a bridge stood,\n" "now magma falls from above.\n" "The bridge dropped something...", 0}, - {0, 8287,-11043, 1328, 16, 'E', SKINCOLOR_NEONGREEN, 0, + {0, 8287,-11043, 1328, 16, 'E', SKINCOLOR_EMERALD, 0, "A lake of magma\n" "ebbs and flows unendingly.\n" "Wait for its nadir.", 0}, @@ -349,7 +349,7 @@ emblem_t emblemlocations[MAXEMBLEMS] = "Don't jump too high here!\n" "No conveyor will catch you;\n" "you'd fall to your death.", 0}, - {0, -6432, -6192, 584, 22, 'E', SKINCOLOR_NEONGREEN, 0, + {0, -6432, -6192, 584, 22, 'E', SKINCOLOR_EMERALD, 0, "Conveyors! Magma!\n" "What an intense room this is!\n" "But, what brought you here?", 0}, @@ -377,7 +377,7 @@ emblem_t emblemlocations[MAXEMBLEMS] = "Gears with missing teeth\n" "can hide a clever secret!\n" "Think Green Hill Zone boss.", 0}, - {0, 1920, 20608, 1064, 23, 'E', SKINCOLOR_NEONGREEN, 0, + {0, 1920, 20608, 1064, 23, 'E', SKINCOLOR_EMERALD, 0, "Just before you reach\n" "the defective cargo bay,\n" "fly under a bridge.", 0}, @@ -398,7 +398,7 @@ emblem_t emblemlocations[MAXEMBLEMS] = "[PH] In the ceiling of the conveyor belt + laser hallway.", 0}, {0,-13728,-13728, 1552, 24, 'D', SKINCOLOR_ORANGE, 0, "[PH] On top of the platform with rows of spikes in reverse gravity.", 0}, - {0,-14944, 768, 1232, 24, 'E', SKINCOLOR_NEONGREEN, 0, + {0,-14944, 768, 1232, 24, 'E', SKINCOLOR_EMERALD, 0, "Follow the leader.", 0}, */ @@ -430,7 +430,7 @@ emblem_t emblemlocations[MAXEMBLEMS] = "The underground room\n" "with platforms that fall and rise\n" "only LOOKS empty...", 0}, - {0 , 4960, -6112, 1312, 30, 'E', SKINCOLOR_NEONGREEN, 0, + {0 , 4960, -6112, 1312, 30, 'E', SKINCOLOR_EMERALD, 0, "This one's straightforward.\n" "What comes to mind when I say:\n" "\"WELCOME TO WARP ZONE!\"?", 0}, @@ -458,7 +458,7 @@ emblem_t emblemlocations[MAXEMBLEMS] = "Much like the last one,\n" "you need to find some switches.\n" "Only two, this time.", 0}, - {0, 13184, 18880, 6672, 40, 'E', SKINCOLOR_NEONGREEN, 0, + {0, 13184, 18880, 6672, 40, 'E', SKINCOLOR_EMERALD, 0, "The inner sanctum!\n" "Teleport to its switches;\n" "then, check near the goal.", 0}, @@ -486,7 +486,7 @@ emblem_t emblemlocations[MAXEMBLEMS] = "A room of currents;\n" "most of them are marked by spikes.\n" "This one? A corner.", 0}, - {0, -4128, 21344, 1120, 41, 'E', SKINCOLOR_NEONGREEN, 0, + {0, -4128, 21344, 1120, 41, 'E', SKINCOLOR_EMERALD, 0, "The only way to hit\n" "all those gems at once is with\n" "a radial blast.", 0}, @@ -498,63 +498,63 @@ emblem_t emblemlocations[MAXEMBLEMS] = // FLORAL FIELD // --- - {0, 5394, -996, 160, 50, 'N', SKINCOLOR_ROSEWOOD, 0, "", 0}, + {0, 5394, -996, 160, 50, 'N', SKINCOLOR_RUST, 0, "", 0}, {ET_NGRADE, 0,0,0, 50, 'Q', SKINCOLOR_TEAL, GRADE_A, "", 0}, {ET_NTIME, 0,0,0, 50, 'T', SKINCOLOR_GREY, 40*TICRATE, "", 0}, // TOXIC PLATEAU // --- - {0, 780, -1664, 32, 51, 'N', SKINCOLOR_ROSEWOOD, 0, "", 0}, + {0, 780, -1664, 32, 51, 'N', SKINCOLOR_RUST, 0, "", 0}, {ET_NGRADE, 0,0,0, 51, 'Q', SKINCOLOR_TEAL, GRADE_A, "", 0}, {ET_NTIME, 0,0,0, 51, 'T', SKINCOLOR_GREY, 50*TICRATE, "", 0}, // FLOODED COVE // --- - {0, 1824, -1888, 2448, 52, 'N', SKINCOLOR_ROSEWOOD, 0, "", 0}, + {0, 1824, -1888, 2448, 52, 'N', SKINCOLOR_RUST, 0, "", 0}, {ET_NGRADE, 0,0,0, 52, 'Q', SKINCOLOR_TEAL, GRADE_A, "", 0}, {ET_NTIME, 0,0,0, 52, 'T', SKINCOLOR_GREY, 90*TICRATE, "", 0}, // CAVERN FORTRESS // --- - {0, -3089, -431, 1328, 53, 'N', SKINCOLOR_ROSEWOOD, 0, "", 0}, + {0, -3089, -431, 1328, 53, 'N', SKINCOLOR_RUST, 0, "", 0}, {ET_NGRADE, 0,0,0, 53, 'Q', SKINCOLOR_TEAL, GRADE_A, "", 0}, {ET_NTIME, 0,0,0, 53, 'T', SKINCOLOR_GREY, 75*TICRATE, "", 0}, // DUSTY WASTELAND // --- - {0, 957, 924, 2956, 54, 'N', SKINCOLOR_ROSEWOOD, 0, "", 0}, + {0, 957, 924, 2956, 54, 'N', SKINCOLOR_RUST, 0, "", 0}, {ET_NGRADE, 0,0,0, 54, 'Q', SKINCOLOR_TEAL, GRADE_A, "", 0}, {ET_NTIME, 0,0,0, 54, 'T', SKINCOLOR_GREY, 65*TICRATE, "", 0}, // MAGMA CAVES // --- - {0, -2752, 3104, 1800, 55, 'N', SKINCOLOR_ROSEWOOD, 0, "", 0}, + {0, -2752, 3104, 1800, 55, 'N', SKINCOLOR_RUST, 0, "", 0}, {ET_NGRADE, 0,0,0, 55, 'Q', SKINCOLOR_TEAL, GRADE_A, "", 0}, {ET_NTIME, 0,0,0, 55, 'T', SKINCOLOR_GREY, 80*TICRATE, "", 0}, // EGG SATELLITE // --- - {0, 5334, -609, 3426, 56, 'N', SKINCOLOR_ROSEWOOD, 0, "", 0}, + {0, 5334, -609, 3426, 56, 'N', SKINCOLOR_RUST, 0, "", 0}, {ET_NGRADE, 0,0,0, 56, 'Q', SKINCOLOR_TEAL, GRADE_A, "", 0}, {ET_NTIME, 0,0,0, 56, 'T', SKINCOLOR_GREY, 120*TICRATE, "", 0}, // BLACK HOLE // --- - {0, 2108, 3776, 32, 57, 'N', SKINCOLOR_ROSEWOOD, 0, "", 0}, + {0, 2108, 3776, 32, 57, 'N', SKINCOLOR_RUST, 0, "", 0}, {ET_NGRADE, 0,0,0, 57, 'Q', SKINCOLOR_TEAL, GRADE_A, "", 0}, {ET_NTIME, 0,0,0, 57, 'T', SKINCOLOR_GREY, 150*TICRATE, "", 0}, // SPRING HILL // --- - {0, -1840, -1024, 1644, 58, 'N', SKINCOLOR_ROSEWOOD, 0, "", 0}, + {0, -1840, -1024, 1644, 58, 'N', SKINCOLOR_RUST, 0, "", 0}, {ET_NGRADE, 0,0,0, 58, 'Q', SKINCOLOR_TEAL, GRADE_A, "", 0}, {ET_NTIME, 0,0,0, 58, 'T', SKINCOLOR_GREY, 60*TICRATE, "", 0}, }; @@ -565,7 +565,7 @@ extraemblem_t extraemblems[MAXEXTRAEMBLEMS] = {"Game Complete", "Complete 1P Mode", 10, 'X', SKINCOLOR_BLUE, 0}, {"All Emeralds", "Complete 1P Mode with all Emeralds", 11, 'V', SKINCOLOR_GREY, 0}, {"Perfect Bonus", "Perfect Bonus on a non-secret stage", 30, 'P', SKINCOLOR_GOLD, 0}, - {"SRB1 Remake", "Complete SRB1 Remake", 21, 'O', SKINCOLOR_ROSEWOOD, 0}, + {"SRB1 Remake", "Complete SRB1 Remake", 21, 'O', SKINCOLOR_RUST, 0}, {"NiGHTS Mastery", "Show your mastery of NiGHTS!", 22, 'W', SKINCOLOR_TEAL, 0}, }; diff --git a/src/r_draw.c b/src/r_draw.c index 808b3cc6e..4f06a58a7 100644 --- a/src/r_draw.c +++ b/src/r_draw.c @@ -137,9 +137,9 @@ const char *Color_Names[MAXSKINCOLORS] = "Grey", // SKINCOLOR_GREY "Black", // SKINCOLOR_BLACK "Cyan", // SKINCOLOR_CYAN - "Aquamarine",// SKINCOLOR_AQUAMARINE + "Aqua", // SKINCOLOR_AQUAMARINE "Teal", // SKINCOLOR_TEAL - "Steel_Blue",// SKINCOLOR_STEELBLUE + "Azure", // SKINCOLOR_AZURE "Blue", // SKINCOLOR_BLUE "Peach", // SKINCOLOR_PEACH "Tan", // SKINCOLOR_TAN @@ -149,12 +149,12 @@ const char *Color_Names[MAXSKINCOLORS] = "Purple", // SKINCOLOR_PURPLE "Magenta", // SKINCOLOR_MAGENTA "Orange", // SKINCOLOR_ORANGE - "Rosewood", // SKINCOLOR_ROSEWOOD + "Rust", // SKINCOLOR_RUST "Beige", // SKINCOLOR_BEIGE "Brown", // SKINCOLOR_BROWN "Red", // SKINCOLOR_RED - "Dark_Red", // SKINCOLOR_DARKRED - "Neon_Green",// SKINCOLOR_NEONGREEN + "Crimson", // SKINCOLOR_CRIMSON + "Emerald", // SKINCOLOR_EMERALD "Green", // SKINCOLOR_GREEN "Zim", // SKINCOLOR_ZIM "Peridot", // SKINCOLOR_PERIDOT @@ -170,9 +170,9 @@ const UINT8 Color_Opposite[MAXSKINCOLORS*2] = SKINCOLOR_SILVER,12,// SKINCOLOR_GREY SKINCOLOR_WHITE,8, // SKINCOLOR_BLACK SKINCOLOR_NONE,8, // SKINCOLOR_CYAN - SKINCOLOR_NONE,8, // SKINCOLOR_AQUAMARINE + SKINCOLOR_NONE,8, // SKINCOLOR_AQUA SKINCOLOR_NONE,8, // SKINCOLOR_TEAL - SKINCOLOR_NONE,8, // SKINCOLOR_STEELBLUE + SKINCOLOR_NONE,8, // SKINCOLOR_AZURE SKINCOLOR_ORANGE,9, // SKINCOLOR_BLUE SKINCOLOR_NONE,8, // SKINCOLOR_PEACH SKINCOLOR_NONE,8, // SKINCOLOR_TAN @@ -182,12 +182,12 @@ const UINT8 Color_Opposite[MAXSKINCOLORS*2] = SKINCOLOR_NONE,8, // SKINCOLOR_PURPLE SKINCOLOR_NONE,8, // SKINCOLOR_MAGENTA SKINCOLOR_BLUE,12, // SKINCOLOR_ORANGE - SKINCOLOR_NONE,8, // SKINCOLOR_ROSEWOOD + SKINCOLOR_NONE,8, // SKINCOLOR_RUST SKINCOLOR_NONE,8, // SKINCOLOR_BEIGE SKINCOLOR_NONE,8, // SKINCOLOR_BROWN SKINCOLOR_GREEN,5, // SKINCOLOR_RED - SKINCOLOR_NONE,8, // SKINCOLOR_DARKRED - SKINCOLOR_NONE,8, // SKINCOLOR_NEONGREEN + SKINCOLOR_NONE,8, // SKINCOLOR_CRIMSON + SKINCOLOR_NONE,8, // SKINCOLOR_EMERALD SKINCOLOR_RED,11, // SKINCOLOR_GREEN SKINCOLOR_MAGENTA,3, // SKINCOLOR_ZIM SKINCOLOR_NONE,8, // SKINCOLOR_PERIDOT @@ -243,9 +243,9 @@ static void R_GenerateTranslationColormap(UINT8 *dest_colormap, INT32 skinnum, U 0x08, // SKINCOLOR_GREY 0x18, // SKINCOLOR_BLACK 0x70, // SKINCOLOR_CYAN - 0xf8, // SKINCOLOR_AQUAMARINE + 0xf8, // SKINCOLOR_AQUA 0x7c, // SKINCOLOR_TEAL - 0x9a, // SKINCOLOR_STEELBLUE + 0x9a, // SKINCOLOR_AZURE 0x82, // SKINCOLOR_BLUE 0xc8, // SKINCOLOR_PEACH 0x54, // SKINCOLOR_TAN @@ -255,12 +255,12 @@ static void R_GenerateTranslationColormap(UINT8 *dest_colormap, INT32 skinnum, U 0x90, // SKINCOLOR_PURPLE 0xa3, // SKINCOLOR_MAGENTA 0x31, // SKINCOLOR_ORANGE - 0x3a, // SKINCOLOR_ROSEWOOD + 0x3a, // SKINCOLOR_RUST 0xe0, // SKINCOLOR_BEIGE 0xd0, // SKINCOLOR_BROWN 0x21, // SKINCOLOR_RED - 0x28, // SKINCOLOR_DARKRED - 0xf0, // SKINCOLOR_NEONGREEN + 0x28, // SKINCOLOR_CRIMSON + 0xf0, // SKINCOLOR_EMERALD 0x60, // SKINCOLOR_GREEN 0x58, // SKINCOLOR_ZIM 0xac, // SKINCOLOR_PERIDOT @@ -330,7 +330,7 @@ static void R_GenerateTranslationColormap(UINT8 *dest_colormap, INT32 skinnum, U dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (i >> 1)); break; - case SKINCOLOR_AQUAMARINE: + case SKINCOLOR_AQUA: // 10 colors for (i = 0; i < SKIN_RAMP_LENGTH; i++) { @@ -354,7 +354,7 @@ static void R_GenerateTranslationColormap(UINT8 *dest_colormap, INT32 skinnum, U } break; - case SKINCOLOR_STEELBLUE: + case SKINCOLOR_AZURE: // 8 colors for (i = 0; i < SKIN_RAMP_LENGTH; i++) { @@ -458,7 +458,7 @@ static void R_GenerateTranslationColormap(UINT8 *dest_colormap, INT32 skinnum, U } break; - case SKINCOLOR_ROSEWOOD: + case SKINCOLOR_RUST: // 9 colors for (i = 0; i < SKIN_RAMP_LENGTH; i++) { @@ -496,7 +496,7 @@ static void R_GenerateTranslationColormap(UINT8 *dest_colormap, INT32 skinnum, U } break; - case SKINCOLOR_DARKRED: + case SKINCOLOR_CRIMSON: // 9 colors for (i = 0; i < SKIN_RAMP_LENGTH; i++) { @@ -509,7 +509,7 @@ static void R_GenerateTranslationColormap(UINT8 *dest_colormap, INT32 skinnum, U } break; - case SKINCOLOR_NEONGREEN: + case SKINCOLOR_EMERALD: // 8 colors for (i = 0; i < SKIN_RAMP_LENGTH; i++) { diff --git a/src/st_stuff.c b/src/st_stuff.c index 58992bea4..13cc36fe1 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -888,7 +888,7 @@ static void ST_drawFirstPersonHUD(void) // [21:42] <+Rob> Beige - Lavender - Steel Blue - Peach - Orange - Purple - Silver - Yellow - Pink - Red - Blue - Green - Cyan - Gold static skincolors_t linkColor[14] = -{SKINCOLOR_BEIGE, SKINCOLOR_LAVENDER, SKINCOLOR_STEELBLUE, SKINCOLOR_PEACH, SKINCOLOR_ORANGE, +{SKINCOLOR_BEIGE, SKINCOLOR_LAVENDER, SKINCOLOR_AZURE, SKINCOLOR_PEACH, SKINCOLOR_ORANGE, SKINCOLOR_MAGENTA, SKINCOLOR_SILVER, SKINCOLOR_SUPER4, SKINCOLOR_PINK, SKINCOLOR_RED, SKINCOLOR_BLUE, SKINCOLOR_GREEN, SKINCOLOR_CYAN, SKINCOLOR_GOLD}; @@ -938,7 +938,7 @@ static void ST_drawNightsRecords(void) V_DrawString(BASEVIDWIDTH/2 - 48, STRINGY(148), aflag, "BONUS:"); V_DrawRightAlignedString(BASEVIDWIDTH/2 + 48, STRINGY(140), V_ORANGEMAP|aflag, va("%d", stplyr->finishedrings)); V_DrawRightAlignedString(BASEVIDWIDTH/2 + 48, STRINGY(148), V_ORANGEMAP|aflag, va("%d", stplyr->finishedrings * 50)); - ST_DrawNightsOverlayNum(BASEVIDWIDTH/2 + 48, STRINGY(160), aflag, stplyr->lastmarescore, nightsnum, SKINCOLOR_STEELBLUE); + ST_DrawNightsOverlayNum(BASEVIDWIDTH/2 + 48, STRINGY(160), aflag, stplyr->lastmarescore, nightsnum, SKINCOLOR_AZURE); // If new record, say so! if (!(netgame || multiplayer) && G_GetBestNightsScore(gamemap, stplyr->lastmare + 1) <= stplyr->lastmarescore) @@ -1220,7 +1220,7 @@ static void ST_drawNiGHTSHUD(void) #endif ) { - ST_DrawNightsOverlayNum(304, STRINGY(16), SPLITFLAGS(V_SNAPTOTOP)|V_SNAPTORIGHT, stplyr->marescore, nightsnum, SKINCOLOR_STEELBLUE); + ST_DrawNightsOverlayNum(304, STRINGY(16), SPLITFLAGS(V_SNAPTOTOP)|V_SNAPTORIGHT, stplyr->marescore, nightsnum, SKINCOLOR_AZURE); } if (!stplyr->exiting From 079f02ca69a4bbad6843a980594473fe74235eba Mon Sep 17 00:00:00 2001 From: Sryder13 Date: Sat, 25 Jul 2015 14:10:52 +0100 Subject: [PATCH 10/27] Fix Peridot --- src/r_draw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/r_draw.c b/src/r_draw.c index 4f06a58a7..3518d384c 100644 --- a/src/r_draw.c +++ b/src/r_draw.c @@ -525,7 +525,7 @@ static void R_GenerateTranslationColormap(UINT8 *dest_colormap, INT32 skinnum, U for (i = 0; i < SKIN_RAMP_LENGTH; i++) { if (8*i/16 == 0) - dest_colormap[starttranscolor + i] = 0x48; // Lightest + dest_colormap[starttranscolor + i] = 0x58; // Lightest else if (8*i/16 == 7) dest_colormap[starttranscolor + i] = 0x6D; // Darkest else if (8*i/16 >= 5) From d0d19e684c1283d90acaa498556c1a26bebf6471 Mon Sep 17 00:00:00 2001 From: Sryder13 Date: Fri, 21 Aug 2015 18:34:21 +0100 Subject: [PATCH 11/27] Change Lavender, Azure, Blue --- src/r_draw.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/src/r_draw.c b/src/r_draw.c index 3518d384c..8e046417e 100644 --- a/src/r_draw.c +++ b/src/r_draw.c @@ -324,6 +324,7 @@ static void R_GenerateTranslationColormap(UINT8 *dest_colormap, INT32 skinnum, U case SKINCOLOR_WHITE: case SKINCOLOR_BLACK: case SKINCOLOR_PINK: + case SKINCOLOR_LAVENDER: case SKINCOLOR_ZIM: // 8 color ramp for (i = 0; i < SKIN_RAMP_LENGTH; i++) @@ -360,8 +361,6 @@ static void R_GenerateTranslationColormap(UINT8 *dest_colormap, INT32 skinnum, U { if (8*i/16 <= 1) dest_colormap[starttranscolor + i] = (UINT8)(0x80 + 8*i/16); // Lightest - else if (8*i/16 == 7) - dest_colormap[starttranscolor + i] = 0x7B; // Darkest else dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (8*i/SKIN_RAMP_LENGTH) - 2); // main } @@ -371,7 +370,7 @@ static void R_GenerateTranslationColormap(UINT8 *dest_colormap, INT32 skinnum, U for (i = 0; i < SKIN_RAMP_LENGTH; i++) { if (i == 14) - dest_colormap[starttranscolor + i] = 0x9F; + dest_colormap[starttranscolor + i] = 0xED; else if (i == 15) dest_colormap[starttranscolor + i] = 0x1F; else @@ -426,17 +425,6 @@ static void R_GenerateTranslationColormap(UINT8 *dest_colormap, INT32 skinnum, U } break; - case SKINCOLOR_LAVENDER: - // 10 colors - for (i = 0; i < SKIN_RAMP_LENGTH; i++) - { - if (10*i/16 <= 1) - dest_colormap[starttranscolor + i] = (UINT8)(0xEC + 10*i/16); // Lightest - else - dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (10*i/SKIN_RAMP_LENGTH) - 2); // main - } - break; - case SKINCOLOR_PURPLE: // 10 colors for (i = 0; i < SKIN_RAMP_LENGTH; i++) From 5a033181b82b4a851e7942c0a1c8f207f1b4917b Mon Sep 17 00:00:00 2001 From: Sryder13 Date: Fri, 21 Aug 2015 20:17:11 +0100 Subject: [PATCH 12/27] Metal Sonic Flash --- src/r_draw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/r_draw.c b/src/r_draw.c index 8e046417e..81bcc9438 100644 --- a/src/r_draw.c +++ b/src/r_draw.c @@ -283,7 +283,7 @@ static void R_GenerateTranslationColormap(UINT8 *dest_colormap, INT32 skinnum, U if (skinnum == TC_BOSS) dest_colormap[31] = 0; else if (skinnum == TC_METALSONIC) - dest_colormap[239] = 0; + dest_colormap[143] = 0; return; } From d4976d677fcbacbd169b1031dce74359b8fb1155 Mon Sep 17 00:00:00 2001 From: Monster Iestyn Date: Sat, 10 Oct 2015 20:30:29 +0100 Subject: [PATCH 13/27] Move finecosine[] declaration to where it really belongs in the source code --- src/r_main.c | 9 --------- src/tables.c | 4 ++-- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/src/r_main.c b/src/r_main.c index 1170b3414..a4e72cba9 100644 --- a/src/r_main.c +++ b/src/r_main.c @@ -114,15 +114,6 @@ INT32 viewangletox[FINEANGLES/2]; // from clipangle to -clipangle. angle_t xtoviewangle[MAXVIDWIDTH+1]; -// UNUSED. -// The finetangentgent[angle+FINEANGLES/4] table -// holds the fixed_t tangent values for view angles, -// ranging from INT32_MIN to 0 to INT32_MAX. - -#if !(defined _NDS) || !(defined NONET) -fixed_t *finecosine = &finesine[FINEANGLES/4]; -#endif - lighttable_t *scalelight[LIGHTLEVELS][MAXLIGHTSCALE]; lighttable_t *scalelightfixed[MAXLIGHTSCALE]; lighttable_t *zlight[LIGHTLEVELS][MAXLIGHTZ]; diff --git a/src/tables.c b/src/tables.c index 6f0446e01..47161e667 100644 --- a/src/tables.c +++ b/src/tables.c @@ -1960,10 +1960,10 @@ fixed_t finesine[10240] = 65531, 65531, 65532, 65532, 65533, 65533, 65534, 65534, 65534, 65535, 65535, 65535, 65535, 65535, 65535, 65535 }; + +fixed_t *finecosine = &finesine[FINEANGLES/4]; #endif - - angle_t tantoangle[2049] = { 0, 333772, 667544, 1001315, 1335086, 1668857, 2002626, 2336395, From fdc2c3adcd6fe71eaba71fce21dd33ce812860ff Mon Sep 17 00:00:00 2001 From: Monster Iestyn Date: Sat, 10 Oct 2015 21:21:16 +0100 Subject: [PATCH 14/27] Fix up lib_finetangent so tan() returns values starting from "0" in Lua (finetangent itself hasn't been touched) Also fixed how the function went out of the array's bounds for ANGLE_180 and above (or negative angles) --- src/lua_mathlib.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lua_mathlib.c b/src/lua_mathlib.c index 8ca2e17af..f4b5ca5fe 100644 --- a/src/lua_mathlib.c +++ b/src/lua_mathlib.c @@ -77,7 +77,9 @@ static int lib_finecosine(lua_State *L) static int lib_finetangent(lua_State *L) { - lua_pushfixed(L, FINETANGENT((luaL_checkangle(L, 1)>>ANGLETOFINESHIFT) & FINEMASK)); + // HACK: add ANGLE_90 to make tan() in Lua start at 0 like it should + // use & 4095 instead of & FINEMASK (8191), so it doesn't go out of the array's bounds + lua_pushfixed(L, FINETANGENT(((luaL_checkangle(L, 1)+ANGLE_90)>>ANGLETOFINESHIFT) & 4095)); return 1; } From a9b96a1668d86f29aaa1bff99bf4364b8c0bb168 Mon Sep 17 00:00:00 2001 From: Monster Iestyn Date: Sun, 11 Oct 2015 14:05:05 +0100 Subject: [PATCH 15/27] Replaced the old finetangent[] with a new more accurate one I made using a Python script. Actually uses 0 and 65536 now! (and also INT32_MIN) --- src/tables.c | 1024 +++++++++++++++++++++++++------------------------- 1 file changed, 512 insertions(+), 512 deletions(-) diff --git a/src/tables.c b/src/tables.c index 47161e667..deb5a6b19 100644 --- a/src/tables.c +++ b/src/tables.c @@ -162,518 +162,518 @@ angle_t FixedAngle(fixed_t fa) #if !(defined _NDS) || !(defined NONET) fixed_t finetangent[4096] = { - -170910304, -56965752, -34178904, -24413316, -18988036, -15535599, -13145455, -11392683, - -10052327, -8994149, -8137527, -7429880, -6835455, -6329090, -5892567, -5512368, - -5178251, -4882318, -4618375, -4381502, -4167737, -3973855, -3797206, -3635590, - -3487165, -3350381, -3223918, -3106651, -2997613, -2895966, -2800983, -2712030, - -2628549, -2550052, -2476104, -2406322, -2340362, -2277919, -2218719, -2162516, - -2109087, -2058233, -2009771, -1963536, -1919378, -1877161, -1836758, -1798063, - -1760956, -1725348, -1691149, -1658278, -1626658, -1596220, -1566898, -1538632, - -1511367, -1485049, -1459630, -1435065, -1411312, -1388330, -1366084, -1344537, - -1323658, -1303416, -1283783, -1264730, -1246234, -1228269, -1210813, -1193846, - -1177345, -1161294, -1145673, -1130465, -1115654, -1101225, -1087164, -1073455, - -1060087, -1047046, -1034322, -1021901, -1009774, -997931, -986361, -975054, - -964003, -953199, -942633, -932298, -922186, -912289, -902602, -893117, - -883829, -874730, -865817, -857081, -848520, -840127, -831898, -823827, - -815910, -808143, -800521, -793041, -785699, -778490, -771411, -764460, - -757631, -750922, -744331, -737853, -731486, -725227, -719074, -713023, - -707072, -701219, -695462, -689797, -684223, -678737, -673338, -668024, - -662792, -657640, -652568, -647572, -642651, -637803, -633028, -628323, - -623686, -619117, -614613, -610174, -605798, -601483, -597229, -593033, - -588896, -584815, -580789, -576818, -572901, -569035, -565221, -561456, - -557741, -554074, -550455, -546881, -543354, -539870, -536431, -533034, - -529680, -526366, -523094, -519861, -516667, -513512, -510394, -507313, - -504269, -501261, -498287, -495348, -492443, -489571, -486732, -483925, - -481150, -478406, -475692, -473009, -470355, -467730, -465133, -462565, - -460024, -457511, -455024, -452564, -450129, -447720, -445337, -442978, - -440643, -438332, -436045, -433781, -431540, -429321, -427125, -424951, - -422798, -420666, -418555, -416465, -414395, -412344, -410314, -408303, - -406311, -404338, -402384, -400448, -398530, -396630, -394747, -392882, - -391034, -389202, -387387, -385589, -383807, -382040, -380290, -378555, - -376835, -375130, -373440, -371765, -370105, -368459, -366826, -365208, - -363604, -362013, -360436, -358872, -357321, -355783, -354257, -352744, - -351244, -349756, -348280, -346816, -345364, -343924, -342495, -341078, - -339671, -338276, -336892, -335519, -334157, -332805, -331464, -330133, - -328812, -327502, -326201, -324910, -323629, -322358, -321097, -319844, - -318601, -317368, -316143, -314928, -313721, -312524, -311335, -310154, - -308983, -307819, -306664, -305517, -304379, -303248, -302126, -301011, - -299904, -298805, -297714, -296630, -295554, -294485, -293423, -292369, - -291322, -290282, -289249, -288223, -287204, -286192, -285186, -284188, - -283195, -282210, -281231, -280258, -279292, -278332, -277378, -276430, - -275489, -274553, -273624, -272700, -271782, -270871, -269965, -269064, - -268169, -267280, -266397, -265519, -264646, -263779, -262917, -262060, - -261209, -260363, -259522, -258686, -257855, -257029, -256208, -255392, - -254581, -253774, -252973, -252176, -251384, -250596, -249813, -249035, - -248261, -247492, -246727, -245966, -245210, -244458, -243711, -242967, - -242228, -241493, -240763, -240036, -239314, -238595, -237881, -237170, - -236463, -235761, -235062, -234367, -233676, -232988, -232304, -231624, - -230948, -230275, -229606, -228941, -228279, -227621, -226966, -226314, - -225666, -225022, -224381, -223743, -223108, -222477, -221849, -221225, - -220603, -219985, -219370, -218758, -218149, -217544, -216941, -216341, - -215745, -215151, -214561, -213973, -213389, -212807, -212228, -211652, - -211079, -210509, -209941, -209376, -208815, -208255, -207699, -207145, - -206594, -206045, -205500, -204956, -204416, -203878, -203342, -202809, - -202279, -201751, -201226, -200703, -200182, -199664, -199149, -198636, - -198125, -197616, -197110, -196606, -196105, -195606, -195109, -194614, - -194122, -193631, -193143, -192658, -192174, -191693, -191213, -190736, - -190261, -189789, -189318, -188849, -188382, -187918, -187455, -186995, - -186536, -186080, -185625, -185173, -184722, -184274, -183827, -183382, - -182939, -182498, -182059, -181622, -181186, -180753, -180321, -179891, - -179463, -179037, -178612, -178190, -177769, -177349, -176932, -176516, - -176102, -175690, -175279, -174870, -174463, -174057, -173653, -173251, - -172850, -172451, -172053, -171657, -171263, -170870, -170479, -170089, - -169701, -169315, -168930, -168546, -168164, -167784, -167405, -167027, - -166651, -166277, -165904, -165532, -165162, -164793, -164426, -164060, - -163695, -163332, -162970, -162610, -162251, -161893, -161537, -161182, - -160828, -160476, -160125, -159775, -159427, -159079, -158734, -158389, - -158046, -157704, -157363, -157024, -156686, -156349, -156013, -155678, - -155345, -155013, -154682, -154352, -154024, -153697, -153370, -153045, - -152722, -152399, -152077, -151757, -151438, -151120, -150803, -150487, - -150172, -149859, -149546, -149235, -148924, -148615, -148307, -148000, - -147693, -147388, -147084, -146782, -146480, -146179, -145879, -145580, - -145282, -144986, -144690, -144395, -144101, -143808, -143517, -143226, - -142936, -142647, -142359, -142072, -141786, -141501, -141217, -140934, - -140651, -140370, -140090, -139810, -139532, -139254, -138977, -138701, - -138426, -138152, -137879, -137607, -137335, -137065, -136795, -136526, - -136258, -135991, -135725, -135459, -135195, -134931, -134668, -134406, - -134145, -133884, -133625, -133366, -133108, -132851, -132594, -132339, - -132084, -131830, -131576, -131324, -131072, -130821, -130571, -130322, - -130073, -129825, -129578, -129332, -129086, -128841, -128597, -128353, - -128111, -127869, -127627, -127387, -127147, -126908, -126669, -126432, - -126195, -125959, -125723, -125488, -125254, -125020, -124787, -124555, - -124324, -124093, -123863, -123633, -123404, -123176, -122949, -122722, - -122496, -122270, -122045, -121821, -121597, -121374, -121152, -120930, - -120709, -120489, -120269, -120050, -119831, -119613, -119396, -119179, - -118963, -118747, -118532, -118318, -118104, -117891, -117678, -117466, - -117254, -117044, -116833, -116623, -116414, -116206, -115998, -115790, - -115583, -115377, -115171, -114966, -114761, -114557, -114354, -114151, - -113948, -113746, -113545, -113344, -113143, -112944, -112744, -112546, - -112347, -112150, -111952, -111756, -111560, -111364, -111169, -110974, - -110780, -110586, -110393, -110200, -110008, -109817, -109626, -109435, - -109245, -109055, -108866, -108677, -108489, -108301, -108114, -107927, - -107741, -107555, -107369, -107184, -107000, -106816, -106632, -106449, - -106266, -106084, -105902, -105721, -105540, -105360, -105180, -105000, - -104821, -104643, -104465, -104287, -104109, -103933, -103756, -103580, - -103404, -103229, -103054, -102880, -102706, -102533, -102360, -102187, - -102015, -101843, -101671, -101500, -101330, -101159, -100990, -100820, - -100651, -100482, -100314, -100146, -99979, -99812, -99645, -99479, - -99313, -99148, -98982, -98818, -98653, -98489, -98326, -98163, - -98000, -97837, -97675, -97513, -97352, -97191, -97030, -96870, - -96710, -96551, -96391, -96233, -96074, -95916, -95758, -95601, - -95444, -95287, -95131, -94975, -94819, -94664, -94509, -94354, - -94200, -94046, -93892, -93739, -93586, -93434, -93281, -93129, - -92978, -92826, -92675, -92525, -92375, -92225, -92075, -91926, - -91777, -91628, -91480, -91332, -91184, -91036, -90889, -90742, - -90596, -90450, -90304, -90158, -90013, -89868, -89724, -89579, - -89435, -89292, -89148, -89005, -88862, -88720, -88577, -88435, - -88294, -88152, -88011, -87871, -87730, -87590, -87450, -87310, - -87171, -87032, -86893, -86755, -86616, -86479, -86341, -86204, - -86066, -85930, -85793, -85657, -85521, -85385, -85250, -85114, - -84980, -84845, -84710, -84576, -84443, -84309, -84176, -84043, - -83910, -83777, -83645, -83513, -83381, -83250, -83118, -82987, - -82857, -82726, -82596, -82466, -82336, -82207, -82078, -81949, - -81820, -81691, -81563, -81435, -81307, -81180, -81053, -80925, - -80799, -80672, -80546, -80420, -80294, -80168, -80043, -79918, - -79793, -79668, -79544, -79420, -79296, -79172, -79048, -78925, - -78802, -78679, -78557, -78434, -78312, -78190, -78068, -77947, - -77826, -77705, -77584, -77463, -77343, -77223, -77103, -76983, - -76864, -76744, -76625, -76506, -76388, -76269, -76151, -76033, - -75915, -75797, -75680, -75563, -75446, -75329, -75213, -75096, - -74980, -74864, -74748, -74633, -74517, -74402, -74287, -74172, - -74058, -73944, -73829, -73715, -73602, -73488, -73375, -73262, - -73149, -73036, -72923, -72811, -72699, -72587, -72475, -72363, - -72252, -72140, -72029, -71918, -71808, -71697, -71587, -71477, - -71367, -71257, -71147, -71038, -70929, -70820, -70711, -70602, - -70494, -70385, -70277, -70169, -70061, -69954, -69846, -69739, - -69632, -69525, -69418, -69312, -69205, -69099, -68993, -68887, - -68781, -68676, -68570, -68465, -68360, -68255, -68151, -68046, - -67942, -67837, -67733, -67629, -67526, -67422, -67319, -67216, - -67113, -67010, -66907, -66804, -66702, -66600, -66498, -66396, - -66294, -66192, -66091, -65989, -65888, -65787, -65686, -65586, - -65485, -65385, -65285, -65185, -65085, -64985, -64885, -64786, - -64687, -64587, -64488, -64389, -64291, -64192, -64094, -63996, - -63897, -63799, -63702, -63604, -63506, -63409, -63312, -63215, - -63118, -63021, -62924, -62828, -62731, -62635, -62539, -62443, - -62347, -62251, -62156, -62060, -61965, -61870, -61775, -61680, - -61585, -61491, -61396, -61302, -61208, -61114, -61020, -60926, - -60833, -60739, -60646, -60552, -60459, -60366, -60273, -60181, - -60088, -59996, -59903, -59811, -59719, -59627, -59535, -59444, - -59352, -59261, -59169, -59078, -58987, -58896, -58805, -58715, - -58624, -58534, -58443, -58353, -58263, -58173, -58083, -57994, - -57904, -57815, -57725, -57636, -57547, -57458, -57369, -57281, - -57192, -57104, -57015, -56927, -56839, -56751, -56663, -56575, - -56487, -56400, -56312, -56225, -56138, -56051, -55964, -55877, - -55790, -55704, -55617, -55531, -55444, -55358, -55272, -55186, - -55100, -55015, -54929, -54843, -54758, -54673, -54587, -54502, - -54417, -54333, -54248, -54163, -54079, -53994, -53910, -53826, - -53741, -53657, -53574, -53490, -53406, -53322, -53239, -53156, - -53072, -52989, -52906, -52823, -52740, -52657, -52575, -52492, - -52410, -52327, -52245, -52163, -52081, -51999, -51917, -51835, - -51754, -51672, -51591, -51509, -51428, -51347, -51266, -51185, - -51104, -51023, -50942, -50862, -50781, -50701, -50621, -50540, - -50460, -50380, -50300, -50221, -50141, -50061, -49982, -49902, - -49823, -49744, -49664, -49585, -49506, -49427, -49349, -49270, - -49191, -49113, -49034, -48956, -48878, -48799, -48721, -48643, - -48565, -48488, -48410, -48332, -48255, -48177, -48100, -48022, - -47945, -47868, -47791, -47714, -47637, -47560, -47484, -47407, - -47331, -47254, -47178, -47102, -47025, -46949, -46873, -46797, - -46721, -46646, -46570, -46494, -46419, -46343, -46268, -46193, - -46118, -46042, -45967, -45892, -45818, -45743, -45668, -45593, - -45519, -45444, -45370, -45296, -45221, -45147, -45073, -44999, - -44925, -44851, -44778, -44704, -44630, -44557, -44483, -44410, - -44337, -44263, -44190, -44117, -44044, -43971, -43898, -43826, - -43753, -43680, -43608, -43535, -43463, -43390, -43318, -43246, - -43174, -43102, -43030, -42958, -42886, -42814, -42743, -42671, - -42600, -42528, -42457, -42385, -42314, -42243, -42172, -42101, - -42030, -41959, -41888, -41817, -41747, -41676, -41605, -41535, - -41465, -41394, -41324, -41254, -41184, -41113, -41043, -40973, - -40904, -40834, -40764, -40694, -40625, -40555, -40486, -40416, - -40347, -40278, -40208, -40139, -40070, -40001, -39932, -39863, - -39794, -39726, -39657, -39588, -39520, -39451, -39383, -39314, - -39246, -39178, -39110, -39042, -38973, -38905, -38837, -38770, - -38702, -38634, -38566, -38499, -38431, -38364, -38296, -38229, - -38161, -38094, -38027, -37960, -37893, -37826, -37759, -37692, - -37625, -37558, -37491, -37425, -37358, -37291, -37225, -37158, - -37092, -37026, -36959, -36893, -36827, -36761, -36695, -36629, - -36563, -36497, -36431, -36365, -36300, -36234, -36168, -36103, - -36037, -35972, -35907, -35841, -35776, -35711, -35646, -35580, - -35515, -35450, -35385, -35321, -35256, -35191, -35126, -35062, - -34997, -34932, -34868, -34803, -34739, -34675, -34610, -34546, - -34482, -34418, -34354, -34289, -34225, -34162, -34098, -34034, - -33970, -33906, -33843, -33779, -33715, -33652, -33588, -33525, - -33461, -33398, -33335, -33272, -33208, -33145, -33082, -33019, - -32956, -32893, -32830, -32767, -32705, -32642, -32579, -32516, - -32454, -32391, -32329, -32266, -32204, -32141, -32079, -32017, - -31955, -31892, -31830, -31768, -31706, -31644, -31582, -31520, - -31458, -31396, -31335, -31273, -31211, -31150, -31088, -31026, - -30965, -30904, -30842, -30781, -30719, -30658, -30597, -30536, - -30474, -30413, -30352, -30291, -30230, -30169, -30108, -30048, - -29987, -29926, -29865, -29805, -29744, -29683, -29623, -29562, - -29502, -29441, -29381, -29321, -29260, -29200, -29140, -29080, - -29020, -28959, -28899, -28839, -28779, -28719, -28660, -28600, - -28540, -28480, -28420, -28361, -28301, -28241, -28182, -28122, - -28063, -28003, -27944, -27884, -27825, -27766, -27707, -27647, - -27588, -27529, -27470, -27411, -27352, -27293, -27234, -27175, - -27116, -27057, -26998, -26940, -26881, -26822, -26763, -26705, - -26646, -26588, -26529, -26471, -26412, -26354, -26295, -26237, - -26179, -26120, -26062, -26004, -25946, -25888, -25830, -25772, - -25714, -25656, -25598, -25540, -25482, -25424, -25366, -25308, - -25251, -25193, -25135, -25078, -25020, -24962, -24905, -24847, - -24790, -24732, -24675, -24618, -24560, -24503, -24446, -24389, - -24331, -24274, -24217, -24160, -24103, -24046, -23989, -23932, - -23875, -23818, -23761, -23704, -23647, -23591, -23534, -23477, - -23420, -23364, -23307, -23250, -23194, -23137, -23081, -23024, - -22968, -22911, -22855, -22799, -22742, -22686, -22630, -22573, - -22517, -22461, -22405, -22349, -22293, -22237, -22181, -22125, - -22069, -22013, -21957, -21901, -21845, -21789, -21733, -21678, - -21622, -21566, -21510, -21455, -21399, -21343, -21288, -21232, - -21177, -21121, -21066, -21010, -20955, -20900, -20844, -20789, - -20734, -20678, -20623, -20568, -20513, -20457, -20402, -20347, - -20292, -20237, -20182, -20127, -20072, -20017, -19962, -19907, - -19852, -19797, -19742, -19688, -19633, -19578, -19523, -19469, - -19414, -19359, -19305, -19250, -19195, -19141, -19086, -19032, - -18977, -18923, -18868, -18814, -18760, -18705, -18651, -18597, - -18542, -18488, -18434, -18380, -18325, -18271, -18217, -18163, - -18109, -18055, -18001, -17946, -17892, -17838, -17784, -17731, - -17677, -17623, -17569, -17515, -17461, -17407, -17353, -17300, - -17246, -17192, -17138, -17085, -17031, -16977, -16924, -16870, - -16817, -16763, -16710, -16656, -16603, -16549, -16496, -16442, - -16389, -16335, -16282, -16229, -16175, -16122, -16069, -16015, - -15962, -15909, -15856, -15802, -15749, -15696, -15643, -15590, - -15537, -15484, -15431, -15378, -15325, -15272, -15219, -15166, - -15113, -15060, -15007, -14954, -14901, -14848, -14795, -14743, - -14690, -14637, -14584, -14531, -14479, -14426, -14373, -14321, - -14268, -14215, -14163, -14110, -14057, -14005, -13952, -13900, - -13847, -13795, -13742, -13690, -13637, -13585, -13533, -13480, - -13428, -13375, -13323, -13271, -13218, -13166, -13114, -13062, - -13009, -12957, -12905, -12853, -12800, -12748, -12696, -12644, - -12592, -12540, -12488, -12436, -12383, -12331, -12279, -12227, - -12175, -12123, -12071, -12019, -11967, -11916, -11864, -11812, - -11760, -11708, -11656, -11604, -11552, -11501, -11449, -11397, - -11345, -11293, -11242, -11190, -11138, -11086, -11035, -10983, - -10931, -10880, -10828, -10777, -10725, -10673, -10622, -10570, - -10519, -10467, -10415, -10364, -10312, -10261, -10209, -10158, - -10106, -10055, -10004, -9952, -9901, -9849, -9798, -9747, - -9695, -9644, -9592, -9541, -9490, -9438, -9387, -9336, - -9285, -9233, -9182, -9131, -9080, -9028, -8977, -8926, - -8875, -8824, -8772, -8721, -8670, -8619, -8568, -8517, - -8466, -8414, -8363, -8312, -8261, -8210, -8159, -8108, - -8057, -8006, -7955, -7904, -7853, -7802, -7751, -7700, - -7649, -7598, -7547, -7496, -7445, -7395, -7344, -7293, - -7242, -7191, -7140, -7089, -7038, -6988, -6937, -6886, - -6835, -6784, -6733, -6683, -6632, -6581, -6530, -6480, - -6429, -6378, -6327, -6277, -6226, -6175, -6124, -6074, - -6023, -5972, -5922, -5871, -5820, -5770, -5719, -5668, - -5618, -5567, -5517, -5466, -5415, -5365, -5314, -5264, - -5213, -5162, -5112, -5061, -5011, -4960, -4910, -4859, - -4808, -4758, -4707, -4657, -4606, -4556, -4505, -4455, - -4404, -4354, -4303, -4253, -4202, -4152, -4101, -4051, - -4001, -3950, -3900, -3849, -3799, -3748, -3698, -3648, - -3597, -3547, -3496, -3446, -3395, -3345, -3295, -3244, - -3194, -3144, -3093, -3043, -2992, -2942, -2892, -2841, - -2791, -2741, -2690, -2640, -2590, -2539, -2489, -2439, - -2388, -2338, -2288, -2237, -2187, -2137, -2086, -2036, - -1986, -1935, -1885, -1835, -1784, -1734, -1684, -1633, - -1583, -1533, -1483, -1432, -1382, -1332, -1281, -1231, - -1181, -1131, -1080, -1030, -980, -929, -879, -829, - -779, -728, -678, -628, -578, -527, -477, -427, - -376, -326, -276, -226, -175, -125, -75, -25, - 25, 75, 125, 175, 226, 276, 326, 376, - 427, 477, 527, 578, 628, 678, 728, 779, - 829, 879, 929, 980, 1030, 1080, 1131, 1181, - 1231, 1281, 1332, 1382, 1432, 1483, 1533, 1583, - 1633, 1684, 1734, 1784, 1835, 1885, 1935, 1986, - 2036, 2086, 2137, 2187, 2237, 2288, 2338, 2388, - 2439, 2489, 2539, 2590, 2640, 2690, 2741, 2791, - 2841, 2892, 2942, 2992, 3043, 3093, 3144, 3194, - 3244, 3295, 3345, 3395, 3446, 3496, 3547, 3597, - 3648, 3698, 3748, 3799, 3849, 3900, 3950, 4001, - 4051, 4101, 4152, 4202, 4253, 4303, 4354, 4404, - 4455, 4505, 4556, 4606, 4657, 4707, 4758, 4808, - 4859, 4910, 4960, 5011, 5061, 5112, 5162, 5213, - 5264, 5314, 5365, 5415, 5466, 5517, 5567, 5618, - 5668, 5719, 5770, 5820, 5871, 5922, 5972, 6023, - 6074, 6124, 6175, 6226, 6277, 6327, 6378, 6429, - 6480, 6530, 6581, 6632, 6683, 6733, 6784, 6835, - 6886, 6937, 6988, 7038, 7089, 7140, 7191, 7242, - 7293, 7344, 7395, 7445, 7496, 7547, 7598, 7649, - 7700, 7751, 7802, 7853, 7904, 7955, 8006, 8057, - 8108, 8159, 8210, 8261, 8312, 8363, 8414, 8466, - 8517, 8568, 8619, 8670, 8721, 8772, 8824, 8875, - 8926, 8977, 9028, 9080, 9131, 9182, 9233, 9285, - 9336, 9387, 9438, 9490, 9541, 9592, 9644, 9695, - 9747, 9798, 9849, 9901, 9952, 10004, 10055, 10106, - 10158, 10209, 10261, 10312, 10364, 10415, 10467, 10519, - 10570, 10622, 10673, 10725, 10777, 10828, 10880, 10931, - 10983, 11035, 11086, 11138, 11190, 11242, 11293, 11345, - 11397, 11449, 11501, 11552, 11604, 11656, 11708, 11760, - 11812, 11864, 11916, 11967, 12019, 12071, 12123, 12175, - 12227, 12279, 12331, 12383, 12436, 12488, 12540, 12592, - 12644, 12696, 12748, 12800, 12853, 12905, 12957, 13009, - 13062, 13114, 13166, 13218, 13271, 13323, 13375, 13428, - 13480, 13533, 13585, 13637, 13690, 13742, 13795, 13847, - 13900, 13952, 14005, 14057, 14110, 14163, 14215, 14268, - 14321, 14373, 14426, 14479, 14531, 14584, 14637, 14690, - 14743, 14795, 14848, 14901, 14954, 15007, 15060, 15113, - 15166, 15219, 15272, 15325, 15378, 15431, 15484, 15537, - 15590, 15643, 15696, 15749, 15802, 15856, 15909, 15962, - 16015, 16069, 16122, 16175, 16229, 16282, 16335, 16389, - 16442, 16496, 16549, 16603, 16656, 16710, 16763, 16817, - 16870, 16924, 16977, 17031, 17085, 17138, 17192, 17246, - 17300, 17353, 17407, 17461, 17515, 17569, 17623, 17677, - 17731, 17784, 17838, 17892, 17946, 18001, 18055, 18109, - 18163, 18217, 18271, 18325, 18380, 18434, 18488, 18542, - 18597, 18651, 18705, 18760, 18814, 18868, 18923, 18977, - 19032, 19086, 19141, 19195, 19250, 19305, 19359, 19414, - 19469, 19523, 19578, 19633, 19688, 19742, 19797, 19852, - 19907, 19962, 20017, 20072, 20127, 20182, 20237, 20292, - 20347, 20402, 20457, 20513, 20568, 20623, 20678, 20734, - 20789, 20844, 20900, 20955, 21010, 21066, 21121, 21177, - 21232, 21288, 21343, 21399, 21455, 21510, 21566, 21622, - 21678, 21733, 21789, 21845, 21901, 21957, 22013, 22069, - 22125, 22181, 22237, 22293, 22349, 22405, 22461, 22517, - 22573, 22630, 22686, 22742, 22799, 22855, 22911, 22968, - 23024, 23081, 23137, 23194, 23250, 23307, 23364, 23420, - 23477, 23534, 23591, 23647, 23704, 23761, 23818, 23875, - 23932, 23989, 24046, 24103, 24160, 24217, 24274, 24331, - 24389, 24446, 24503, 24560, 24618, 24675, 24732, 24790, - 24847, 24905, 24962, 25020, 25078, 25135, 25193, 25251, - 25308, 25366, 25424, 25482, 25540, 25598, 25656, 25714, - 25772, 25830, 25888, 25946, 26004, 26062, 26120, 26179, - 26237, 26295, 26354, 26412, 26471, 26529, 26588, 26646, - 26705, 26763, 26822, 26881, 26940, 26998, 27057, 27116, - 27175, 27234, 27293, 27352, 27411, 27470, 27529, 27588, - 27647, 27707, 27766, 27825, 27884, 27944, 28003, 28063, - 28122, 28182, 28241, 28301, 28361, 28420, 28480, 28540, - 28600, 28660, 28719, 28779, 28839, 28899, 28959, 29020, - 29080, 29140, 29200, 29260, 29321, 29381, 29441, 29502, - 29562, 29623, 29683, 29744, 29805, 29865, 29926, 29987, - 30048, 30108, 30169, 30230, 30291, 30352, 30413, 30474, - 30536, 30597, 30658, 30719, 30781, 30842, 30904, 30965, - 31026, 31088, 31150, 31211, 31273, 31335, 31396, 31458, - 31520, 31582, 31644, 31706, 31768, 31830, 31892, 31955, - 32017, 32079, 32141, 32204, 32266, 32329, 32391, 32454, - 32516, 32579, 32642, 32705, 32767, 32830, 32893, 32956, - 33019, 33082, 33145, 33208, 33272, 33335, 33398, 33461, - 33525, 33588, 33652, 33715, 33779, 33843, 33906, 33970, - 34034, 34098, 34162, 34225, 34289, 34354, 34418, 34482, - 34546, 34610, 34675, 34739, 34803, 34868, 34932, 34997, - 35062, 35126, 35191, 35256, 35321, 35385, 35450, 35515, - 35580, 35646, 35711, 35776, 35841, 35907, 35972, 36037, - 36103, 36168, 36234, 36300, 36365, 36431, 36497, 36563, - 36629, 36695, 36761, 36827, 36893, 36959, 37026, 37092, - 37158, 37225, 37291, 37358, 37425, 37491, 37558, 37625, - 37692, 37759, 37826, 37893, 37960, 38027, 38094, 38161, - 38229, 38296, 38364, 38431, 38499, 38566, 38634, 38702, - 38770, 38837, 38905, 38973, 39042, 39110, 39178, 39246, - 39314, 39383, 39451, 39520, 39588, 39657, 39726, 39794, - 39863, 39932, 40001, 40070, 40139, 40208, 40278, 40347, - 40416, 40486, 40555, 40625, 40694, 40764, 40834, 40904, - 40973, 41043, 41113, 41184, 41254, 41324, 41394, 41465, - 41535, 41605, 41676, 41747, 41817, 41888, 41959, 42030, - 42101, 42172, 42243, 42314, 42385, 42457, 42528, 42600, - 42671, 42743, 42814, 42886, 42958, 43030, 43102, 43174, - 43246, 43318, 43390, 43463, 43535, 43608, 43680, 43753, - 43826, 43898, 43971, 44044, 44117, 44190, 44263, 44337, - 44410, 44483, 44557, 44630, 44704, 44778, 44851, 44925, - 44999, 45073, 45147, 45221, 45296, 45370, 45444, 45519, - 45593, 45668, 45743, 45818, 45892, 45967, 46042, 46118, - 46193, 46268, 46343, 46419, 46494, 46570, 46646, 46721, - 46797, 46873, 46949, 47025, 47102, 47178, 47254, 47331, - 47407, 47484, 47560, 47637, 47714, 47791, 47868, 47945, - 48022, 48100, 48177, 48255, 48332, 48410, 48488, 48565, - 48643, 48721, 48799, 48878, 48956, 49034, 49113, 49191, - 49270, 49349, 49427, 49506, 49585, 49664, 49744, 49823, - 49902, 49982, 50061, 50141, 50221, 50300, 50380, 50460, - 50540, 50621, 50701, 50781, 50862, 50942, 51023, 51104, - 51185, 51266, 51347, 51428, 51509, 51591, 51672, 51754, - 51835, 51917, 51999, 52081, 52163, 52245, 52327, 52410, - 52492, 52575, 52657, 52740, 52823, 52906, 52989, 53072, - 53156, 53239, 53322, 53406, 53490, 53574, 53657, 53741, - 53826, 53910, 53994, 54079, 54163, 54248, 54333, 54417, - 54502, 54587, 54673, 54758, 54843, 54929, 55015, 55100, - 55186, 55272, 55358, 55444, 55531, 55617, 55704, 55790, - 55877, 55964, 56051, 56138, 56225, 56312, 56400, 56487, - 56575, 56663, 56751, 56839, 56927, 57015, 57104, 57192, - 57281, 57369, 57458, 57547, 57636, 57725, 57815, 57904, - 57994, 58083, 58173, 58263, 58353, 58443, 58534, 58624, - 58715, 58805, 58896, 58987, 59078, 59169, 59261, 59352, - 59444, 59535, 59627, 59719, 59811, 59903, 59996, 60088, - 60181, 60273, 60366, 60459, 60552, 60646, 60739, 60833, - 60926, 61020, 61114, 61208, 61302, 61396, 61491, 61585, - 61680, 61775, 61870, 61965, 62060, 62156, 62251, 62347, - 62443, 62539, 62635, 62731, 62828, 62924, 63021, 63118, - 63215, 63312, 63409, 63506, 63604, 63702, 63799, 63897, - 63996, 64094, 64192, 64291, 64389, 64488, 64587, 64687, - 64786, 64885, 64985, 65085, 65185, 65285, 65385, 65485, - 65586, 65686, 65787, 65888, 65989, 66091, 66192, 66294, - 66396, 66498, 66600, 66702, 66804, 66907, 67010, 67113, - 67216, 67319, 67422, 67526, 67629, 67733, 67837, 67942, - 68046, 68151, 68255, 68360, 68465, 68570, 68676, 68781, - 68887, 68993, 69099, 69205, 69312, 69418, 69525, 69632, - 69739, 69846, 69954, 70061, 70169, 70277, 70385, 70494, - 70602, 70711, 70820, 70929, 71038, 71147, 71257, 71367, - 71477, 71587, 71697, 71808, 71918, 72029, 72140, 72252, - 72363, 72475, 72587, 72699, 72811, 72923, 73036, 73149, - 73262, 73375, 73488, 73602, 73715, 73829, 73944, 74058, - 74172, 74287, 74402, 74517, 74633, 74748, 74864, 74980, - 75096, 75213, 75329, 75446, 75563, 75680, 75797, 75915, - 76033, 76151, 76269, 76388, 76506, 76625, 76744, 76864, - 76983, 77103, 77223, 77343, 77463, 77584, 77705, 77826, - 77947, 78068, 78190, 78312, 78434, 78557, 78679, 78802, - 78925, 79048, 79172, 79296, 79420, 79544, 79668, 79793, - 79918, 80043, 80168, 80294, 80420, 80546, 80672, 80799, - 80925, 81053, 81180, 81307, 81435, 81563, 81691, 81820, - 81949, 82078, 82207, 82336, 82466, 82596, 82726, 82857, - 82987, 83118, 83250, 83381, 83513, 83645, 83777, 83910, - 84043, 84176, 84309, 84443, 84576, 84710, 84845, 84980, - 85114, 85250, 85385, 85521, 85657, 85793, 85930, 86066, - 86204, 86341, 86479, 86616, 86755, 86893, 87032, 87171, - 87310, 87450, 87590, 87730, 87871, 88011, 88152, 88294, - 88435, 88577, 88720, 88862, 89005, 89148, 89292, 89435, - 89579, 89724, 89868, 90013, 90158, 90304, 90450, 90596, - 90742, 90889, 91036, 91184, 91332, 91480, 91628, 91777, - 91926, 92075, 92225, 92375, 92525, 92675, 92826, 92978, - 93129, 93281, 93434, 93586, 93739, 93892, 94046, 94200, - 94354, 94509, 94664, 94819, 94975, 95131, 95287, 95444, - 95601, 95758, 95916, 96074, 96233, 96391, 96551, 96710, - 96870, 97030, 97191, 97352, 97513, 97675, 97837, 98000, - 98163, 98326, 98489, 98653, 98818, 98982, 99148, 99313, - 99479, 99645, 99812, 99979, 100146, 100314, 100482, 100651, - 100820, 100990, 101159, 101330, 101500, 101671, 101843, 102015, - 102187, 102360, 102533, 102706, 102880, 103054, 103229, 103404, - 103580, 103756, 103933, 104109, 104287, 104465, 104643, 104821, - 105000, 105180, 105360, 105540, 105721, 105902, 106084, 106266, - 106449, 106632, 106816, 107000, 107184, 107369, 107555, 107741, - 107927, 108114, 108301, 108489, 108677, 108866, 109055, 109245, - 109435, 109626, 109817, 110008, 110200, 110393, 110586, 110780, - 110974, 111169, 111364, 111560, 111756, 111952, 112150, 112347, - 112546, 112744, 112944, 113143, 113344, 113545, 113746, 113948, - 114151, 114354, 114557, 114761, 114966, 115171, 115377, 115583, - 115790, 115998, 116206, 116414, 116623, 116833, 117044, 117254, - 117466, 117678, 117891, 118104, 118318, 118532, 118747, 118963, - 119179, 119396, 119613, 119831, 120050, 120269, 120489, 120709, - 120930, 121152, 121374, 121597, 121821, 122045, 122270, 122496, - 122722, 122949, 123176, 123404, 123633, 123863, 124093, 124324, - 124555, 124787, 125020, 125254, 125488, 125723, 125959, 126195, - 126432, 126669, 126908, 127147, 127387, 127627, 127869, 128111, - 128353, 128597, 128841, 129086, 129332, 129578, 129825, 130073, - 130322, 130571, 130821, 131072, 131324, 131576, 131830, 132084, - 132339, 132594, 132851, 133108, 133366, 133625, 133884, 134145, - 134406, 134668, 134931, 135195, 135459, 135725, 135991, 136258, - 136526, 136795, 137065, 137335, 137607, 137879, 138152, 138426, - 138701, 138977, 139254, 139532, 139810, 140090, 140370, 140651, - 140934, 141217, 141501, 141786, 142072, 142359, 142647, 142936, - 143226, 143517, 143808, 144101, 144395, 144690, 144986, 145282, - 145580, 145879, 146179, 146480, 146782, 147084, 147388, 147693, - 148000, 148307, 148615, 148924, 149235, 149546, 149859, 150172, - 150487, 150803, 151120, 151438, 151757, 152077, 152399, 152722, - 153045, 153370, 153697, 154024, 154352, 154682, 155013, 155345, - 155678, 156013, 156349, 156686, 157024, 157363, 157704, 158046, - 158389, 158734, 159079, 159427, 159775, 160125, 160476, 160828, - 161182, 161537, 161893, 162251, 162610, 162970, 163332, 163695, - 164060, 164426, 164793, 165162, 165532, 165904, 166277, 166651, - 167027, 167405, 167784, 168164, 168546, 168930, 169315, 169701, - 170089, 170479, 170870, 171263, 171657, 172053, 172451, 172850, - 173251, 173653, 174057, 174463, 174870, 175279, 175690, 176102, - 176516, 176932, 177349, 177769, 178190, 178612, 179037, 179463, - 179891, 180321, 180753, 181186, 181622, 182059, 182498, 182939, - 183382, 183827, 184274, 184722, 185173, 185625, 186080, 186536, - 186995, 187455, 187918, 188382, 188849, 189318, 189789, 190261, - 190736, 191213, 191693, 192174, 192658, 193143, 193631, 194122, - 194614, 195109, 195606, 196105, 196606, 197110, 197616, 198125, - 198636, 199149, 199664, 200182, 200703, 201226, 201751, 202279, - 202809, 203342, 203878, 204416, 204956, 205500, 206045, 206594, - 207145, 207699, 208255, 208815, 209376, 209941, 210509, 211079, - 211652, 212228, 212807, 213389, 213973, 214561, 215151, 215745, - 216341, 216941, 217544, 218149, 218758, 219370, 219985, 220603, - 221225, 221849, 222477, 223108, 223743, 224381, 225022, 225666, - 226314, 226966, 227621, 228279, 228941, 229606, 230275, 230948, - 231624, 232304, 232988, 233676, 234367, 235062, 235761, 236463, - 237170, 237881, 238595, 239314, 240036, 240763, 241493, 242228, - 242967, 243711, 244458, 245210, 245966, 246727, 247492, 248261, - 249035, 249813, 250596, 251384, 252176, 252973, 253774, 254581, - 255392, 256208, 257029, 257855, 258686, 259522, 260363, 261209, - 262060, 262917, 263779, 264646, 265519, 266397, 267280, 268169, - 269064, 269965, 270871, 271782, 272700, 273624, 274553, 275489, - 276430, 277378, 278332, 279292, 280258, 281231, 282210, 283195, - 284188, 285186, 286192, 287204, 288223, 289249, 290282, 291322, - 292369, 293423, 294485, 295554, 296630, 297714, 298805, 299904, - 301011, 302126, 303248, 304379, 305517, 306664, 307819, 308983, - 310154, 311335, 312524, 313721, 314928, 316143, 317368, 318601, - 319844, 321097, 322358, 323629, 324910, 326201, 327502, 328812, - 330133, 331464, 332805, 334157, 335519, 336892, 338276, 339671, - 341078, 342495, 343924, 345364, 346816, 348280, 349756, 351244, - 352744, 354257, 355783, 357321, 358872, 360436, 362013, 363604, - 365208, 366826, 368459, 370105, 371765, 373440, 375130, 376835, - 378555, 380290, 382040, 383807, 385589, 387387, 389202, 391034, - 392882, 394747, 396630, 398530, 400448, 402384, 404338, 406311, - 408303, 410314, 412344, 414395, 416465, 418555, 420666, 422798, - 424951, 427125, 429321, 431540, 433781, 436045, 438332, 440643, - 442978, 445337, 447720, 450129, 452564, 455024, 457511, 460024, - 462565, 465133, 467730, 470355, 473009, 475692, 478406, 481150, - 483925, 486732, 489571, 492443, 495348, 498287, 501261, 504269, - 507313, 510394, 513512, 516667, 519861, 523094, 526366, 529680, - 533034, 536431, 539870, 543354, 546881, 550455, 554074, 557741, - 561456, 565221, 569035, 572901, 576818, 580789, 584815, 588896, - 593033, 597229, 601483, 605798, 610174, 614613, 619117, 623686, - 628323, 633028, 637803, 642651, 647572, 652568, 657640, 662792, - 668024, 673338, 678737, 684223, 689797, 695462, 701219, 707072, - 713023, 719074, 725227, 731486, 737853, 744331, 750922, 757631, - 764460, 771411, 778490, 785699, 793041, 800521, 808143, 815910, - 823827, 831898, 840127, 848520, 857081, 865817, 874730, 883829, - 893117, 902602, 912289, 922186, 932298, 942633, 953199, 964003, - 975054, 986361, 997931, 1009774, 1021901, 1034322, 1047046, 1060087, - 1073455, 1087164, 1101225, 1115654, 1130465, 1145673, 1161294, 1177345, - 1193846, 1210813, 1228269, 1246234, 1264730, 1283783, 1303416, 1323658, - 1344537, 1366084, 1388330, 1411312, 1435065, 1459630, 1485049, 1511367, - 1538632, 1566898, 1596220, 1626658, 1658278, 1691149, 1725348, 1760956, - 1798063, 1836758, 1877161, 1919378, 1963536, 2009771, 2058233, 2109087, - 2162516, 2218719, 2277919, 2340362, 2406322, 2476104, 2550052, 2628549, - 2712030, 2800983, 2895966, 2997613, 3106651, 3223918, 3350381, 3487165, - 3635590, 3797206, 3973855, 4167737, 4381502, 4618375, 4882318, 5178251, - 5512368, 5892567, 6329090, 6835455, 7429880, 8137527, 8994149, 10052327, - 11392683, 13145455, 15535599, 18988036, 24413316, 34178904, 56965752, 170910304 + INT32_MIN, -85445642, -42722796, -28481836, -21361347, -17089048, -14240842, -12206405, + -10680573, -9493811, -8544398, -7767602, -7120270, -6572525, -6103026, -5696125, + -5340085, -5025930, -4746679, -4496821, -4271947, -4068489, -3883524, -3714643, + -3559833, -3417407, -3285935, -3164201, -3051161, -2945916, -2847685, -2755792, + -2669640, -2588709, -2512537, -2440718, -2372887, -2308722, -2247933, -2190260, + -2135471, -2083353, -2033716, -1986387, -1941209, -1898038, -1856743, -1817205, + -1779313, -1742967, -1708075, -1674550, -1642314, -1611294, -1581422, -1552635, + -1524876, -1498091, -1472229, -1447242, -1423088, -1399726, -1377116, -1355224, + -1334015, -1313459, -1293525, -1274185, -1255414, -1237186, -1219479, -1202270, + -1185538, -1169265, -1153430, -1138018, -1123011, -1108393, -1094149, -1080266, + -1066729, -1053527, -1040645, -1028074, -1015802, -1003818, -992112, -980675, + -969498, -958571, -947887, -937438, -927215, -917211, -907420, -897835, + -888449, -879257, -870251, -861428, -852780, -844303, -835992, -827843, + -819849, -812008, -804314, -796763, -789353, -782077, -774934, -767919, + -761030, -754261, -747612, -741077, -734655, -728343, -722137, -716035, + -710035, -704133, -698328, -692618, -686999, -681469, -676027, -670671, + -665398, -660206, -655094, -650060, -645102, -640218, -635407, -630667, + -625996, -621393, -616857, -612386, -607978, -603633, -599348, -595124, + -590957, -586848, -582795, -578797, -574853, -570962, -567122, -563332, + -559593, -555902, -552259, -548662, -545112, -541606, -538145, -534727, + -531351, -528018, -524725, -521472, -518259, -515084, -511948, -508849, + -505787, -502760, -499769, -496813, -493891, -491003, -488148, -485325, + -482534, -479774, -477045, -474347, -471678, -469038, -466428, -463845, + -461291, -458764, -456264, -453791, -451343, -448922, -446526, -444154, + -441807, -439485, -437186, -434910, -432658, -430428, -428221, -426035, + -423871, -421729, -419608, -417507, -415427, -413367, -411327, -409306, + -407305, -405323, -403359, -401414, -399487, -397578, -395686, -393812, + -391956, -390116, -388293, -386486, -384696, -382921, -381163, -379420, + -377693, -375981, -374283, -372601, -370933, -369280, -367641, -366016, + -364404, -362807, -361223, -359652, -358094, -356550, -355018, -353499, + -351993, -350499, -349017, -347547, -346089, -344643, -343208, -341785, + -340373, -338973, -337583, -336204, -334837, -333480, -332133, -330797, + -329471, -328156, -326850, -325554, -324269, -322993, -321726, -320469, + -319222, -317984, -316754, -315535, -314324, -313121, -311928, -310743, + -309567, -308400, -307240, -306090, -304947, -303812, -302686, -301567, + -300457, -299354, -298259, -297171, -296091, -295018, -293953, -292895, + -291845, -290801, -289765, -288735, -287713, -286697, -285688, -284686, + -283691, -282702, -281719, -280743, -279774, -278811, -277854, -276903, + -275959, -275020, -274088, -273161, -272241, -271326, -270417, -269514, + -268616, -267724, -266838, -265957, -265082, -264212, -263347, -262488, + -261634, -260785, -259941, -259103, -258270, -257441, -256618, -255799, + -254986, -254177, -253373, -252574, -251779, -250989, -250204, -249423, + -248647, -247876, -247109, -246346, -245588, -244834, -244084, -243338, + -242597, -241860, -241128, -240399, -239674, -238954, -238237, -237525, + -236816, -236112, -235411, -234714, -234021, -233331, -232646, -231964, + -231286, -230611, -229940, -229273, -228610, -227949, -227293, -226640, + -225990, -225344, -224701, -224061, -223425, -222792, -222163, -221536, + -220913, -220294, -219677, -219064, -218453, -217846, -217242, -216641, + -216043, -215448, -214856, -214267, -213681, -213097, -212517, -211940, + -211365, -210793, -210225, -209658, -209095, -208535, -207977, -207422, + -206869, -206319, -205772, -205228, -204686, -204147, -203610, -203076, + -202544, -202015, -201488, -200964, -200442, -199923, -199406, -198892, + -198380, -197870, -197363, -196858, -196355, -195855, -195357, -194861, + -194367, -193876, -193387, -192900, -192416, -191933, -191453, -190975, + -190499, -190025, -189553, -189083, -188615, -188150, -187686, -187225, + -186765, -186308, -185852, -185399, -184947, -184498, -184050, -183604, + -183160, -182718, -182278, -181840, -181404, -180969, -180537, -180106, + -179677, -179250, -178824, -178401, -177979, -177559, -177140, -176724, + -176309, -175896, -175484, -175074, -174666, -174260, -173855, -173452, + -173050, -172650, -172252, -171855, -171460, -171066, -170674, -170284, + -169895, -169508, -169122, -168738, -168355, -167974, -167594, -167216, + -166839, -166464, -166090, -165718, -165347, -164977, -164609, -164242, + -163877, -163513, -163151, -162790, -162430, -162072, -161715, -161359, + -161005, -160652, -160300, -159950, -159601, -159253, -158906, -158561, + -158217, -157875, -157533, -157193, -156855, -156517, -156181, -155845, + -155512, -155179, -154847, -154517, -154188, -153860, -153533, -153208, + -152883, -152560, -152238, -151917, -151597, -151279, -150961, -150645, + -150329, -150015, -149702, -149390, -149079, -148769, -148461, -148153, + -147846, -147541, -147236, -146933, -146630, -146329, -146029, -145729, + -145431, -145134, -144837, -144542, -144248, -143955, -143662, -143371, + -143081, -142791, -142503, -142215, -141929, -141643, -141359, -141075, + -140792, -140511, -140230, -139950, -139671, -139393, -139115, -138839, + -138564, -138289, -138016, -137743, -137471, -137200, -136930, -136661, + -136392, -136125, -135858, -135592, -135327, -135063, -134799, -134537, + -134275, -134014, -133754, -133495, -133237, -132979, -132722, -132466, + -132211, -131957, -131703, -131450, -131198, -130947, -130696, -130446, + -130197, -129949, -129701, -129455, -129209, -128963, -128719, -128475, + -128232, -127990, -127748, -127507, -127267, -127027, -126789, -126551, + -126313, -126077, -125841, -125605, -125371, -125137, -124904, -124671, + -124439, -124208, -123978, -123748, -123519, -123290, -123062, -122835, + -122609, -122383, -122158, -121933, -121709, -121486, -121263, -121041, + -120820, -120599, -120379, -120159, -119940, -119722, -119504, -119287, + -119071, -118855, -118639, -118425, -118211, -117997, -117784, -117572, + -117360, -117149, -116938, -116728, -116519, -116310, -116102, -115894, + -115687, -115480, -115274, -115069, -114864, -114659, -114455, -114252, + -114049, -113847, -113645, -113444, -113244, -113043, -112844, -112645, + -112446, -112248, -112051, -111854, -111658, -111462, -111266, -111071, + -110877, -110683, -110490, -110297, -110104, -109912, -109721, -109530, + -109340, -109150, -108960, -108771, -108583, -108395, -108207, -108020, + -107834, -107648, -107462, -107277, -107092, -106908, -106724, -106541, + -106358, -106175, -105993, -105812, -105631, -105450, -105270, -105090, + -104911, -104732, -104554, -104376, -104198, -104021, -103844, -103668, + -103492, -103317, -103142, -102967, -102793, -102619, -102446, -102273, + -102101, -101929, -101757, -101586, -101415, -101244, -101074, -100905, + -100736, -100567, -100398, -100230, -100063, -99895, -99729, -99562, + -99396, -99230, -99065, -98900, -98735, -98571, -98408, -98244, + -98081, -97918, -97756, -97594, -97433, -97271, -97111, -96950, + -96790, -96630, -96471, -96312, -96153, -95995, -95837, -95680, + -95522, -95365, -95209, -95053, -94897, -94741, -94586, -94431, + -94277, -94123, -93969, -93816, -93663, -93510, -93357, -93205, + -93053, -92902, -92751, -92600, -92450, -92300, -92150, -92000, + -91851, -91702, -91554, -91406, -91258, -91110, -90963, -90816, + -90669, -90523, -90377, -90231, -90086, -89941, -89796, -89651, + -89507, -89363, -89220, -89077, -88934, -88791, -88648, -88506, + -88365, -88223, -88082, -87941, -87800, -87660, -87520, -87380, + -87241, -87101, -86963, -86824, -86686, -86547, -86410, -86272, + -86135, -85998, -85861, -85725, -85589, -85453, -85317, -85182, + -85047, -84912, -84778, -84643, -84509, -84376, -84242, -84109, + -83976, -83843, -83711, -83579, -83447, -83315, -83184, -83053, + -82922, -82791, -82661, -82531, -82401, -82271, -82142, -82013, + -81884, -81756, -81627, -81499, -81371, -81244, -81116, -80989, + -80862, -80735, -80609, -80483, -80357, -80231, -80106, -79980, + -79855, -79731, -79606, -79482, -79358, -79234, -79110, -78987, + -78864, -78741, -78618, -78495, -78373, -78251, -78129, -78008, + -77886, -77765, -77644, -77524, -77403, -77283, -77163, -77043, + -76923, -76804, -76685, -76566, -76447, -76328, -76210, -76092, + -75974, -75856, -75739, -75621, -75504, -75387, -75271, -75154, + -75038, -74922, -74806, -74690, -74575, -74460, -74345, -74230, + -74115, -74001, -73886, -73772, -73659, -73545, -73431, -73318, + -73205, -73092, -72979, -72867, -72755, -72643, -72531, -72419, + -72307, -72196, -72085, -71974, -71863, -71752, -71642, -71532, + -71422, -71312, -71202, -71093, -70983, -70874, -70765, -70656, + -70548, -70439, -70331, -70223, -70115, -70007, -69900, -69793, + -69685, -69578, -69472, -69365, -69258, -69152, -69046, -68940, + -68834, -68728, -68623, -68518, -68413, -68308, -68203, -68098, + -67994, -67889, -67785, -67681, -67578, -67474, -67371, -67267, + -67164, -67061, -66958, -66856, -66753, -66651, -66549, -66447, + -66345, -66243, -66141, -66040, -65939, -65838, -65737, -65636, + -65536, -65435, -65335, -65235, -65135, -65035, -64935, -64836, + -64736, -64637, -64538, -64439, -64340, -64241, -64143, -64045, + -63946, -63848, -63750, -63653, -63555, -63458, -63360, -63263, + -63166, -63069, -62972, -62876, -62779, -62683, -62587, -62491, + -62395, -62299, -62204, -62108, -62013, -61918, -61822, -61728, + -61633, -61538, -61444, -61349, -61255, -61161, -61067, -60973, + -60879, -60786, -60692, -60599, -60506, -60413, -60320, -60227, + -60134, -60042, -59950, -59857, -59765, -59673, -59581, -59489, + -59398, -59306, -59215, -59124, -59033, -58942, -58851, -58760, + -58669, -58579, -58489, -58398, -58308, -58218, -58128, -58039, + -57949, -57859, -57770, -57681, -57592, -57503, -57414, -57325, + -57236, -57148, -57059, -56971, -56883, -56795, -56707, -56619, + -56531, -56444, -56356, -56269, -56181, -56094, -56007, -55920, + -55834, -55747, -55660, -55574, -55487, -55401, -55315, -55229, + -55143, -55057, -54972, -54886, -54801, -54715, -54630, -54545, + -54460, -54375, -54290, -54205, -54121, -54036, -53952, -53868, + -53784, -53699, -53615, -53532, -53448, -53364, -53281, -53197, + -53114, -53031, -52948, -52865, -52782, -52699, -52616, -52533, + -52451, -52369, -52286, -52204, -52122, -52040, -51958, -51876, + -51794, -51713, -51631, -51550, -51469, -51387, -51306, -51225, + -51144, -51063, -50983, -50902, -50822, -50741, -50661, -50581, + -50500, -50420, -50340, -50260, -50181, -50101, -50021, -49942, + -49862, -49783, -49704, -49625, -49546, -49467, -49388, -49309, + -49230, -49152, -49073, -48995, -48917, -48838, -48760, -48682, + -48604, -48526, -48449, -48371, -48293, -48216, -48138, -48061, + -47984, -47907, -47830, -47753, -47676, -47599, -47522, -47445, + -47369, -47292, -47216, -47140, -47063, -46987, -46911, -46835, + -46759, -46684, -46608, -46532, -46457, -46381, -46306, -46230, + -46155, -46080, -46005, -45930, -45855, -45780, -45705, -45631, + -45556, -45482, -45407, -45333, -45259, -45184, -45110, -45036, + -44962, -44888, -44815, -44741, -44667, -44594, -44520, -44447, + -44373, -44300, -44227, -44154, -44081, -44008, -43935, -43862, + -43789, -43717, -43644, -43571, -43499, -43427, -43354, -43282, + -43210, -43138, -43066, -42994, -42922, -42850, -42779, -42707, + -42635, -42564, -42492, -42421, -42350, -42279, -42207, -42136, + -42065, -41994, -41923, -41853, -41782, -41711, -41641, -41570, + -41500, -41429, -41359, -41289, -41219, -41148, -41078, -41008, + -40939, -40869, -40799, -40729, -40660, -40590, -40520, -40451, + -40382, -40312, -40243, -40174, -40105, -40036, -39967, -39898, + -39829, -39760, -39691, -39623, -39554, -39486, -39417, -39349, + -39280, -39212, -39144, -39076, -39007, -38939, -38871, -38804, + -38736, -38668, -38600, -38532, -38465, -38397, -38330, -38262, + -38195, -38128, -38060, -37993, -37926, -37859, -37792, -37725, + -37658, -37591, -37525, -37458, -37391, -37325, -37258, -37192, + -37125, -37059, -36993, -36926, -36860, -36794, -36728, -36662, + -36596, -36530, -36464, -36398, -36333, -36267, -36201, -36136, + -36070, -36005, -35939, -35874, -35809, -35743, -35678, -35613, + -35548, -35483, -35418, -35353, -35288, -35223, -35159, -35094, + -35029, -34965, -34900, -34836, -34771, -34707, -34642, -34578, + -34514, -34450, -34386, -34322, -34257, -34194, -34130, -34066, + -34002, -33938, -33874, -33811, -33747, -33684, -33620, -33557, + -33493, -33430, -33366, -33303, -33240, -33177, -33114, -33051, + -32988, -32925, -32862, -32799, -32736, -32673, -32610, -32548, + -32485, -32422, -32360, -32297, -32235, -32173, -32110, -32048, + -31986, -31923, -31861, -31799, -31737, -31675, -31613, -31551, + -31489, -31427, -31366, -31304, -31242, -31180, -31119, -31057, + -30996, -30934, -30873, -30811, -30750, -30689, -30627, -30566, + -30505, -30444, -30383, -30322, -30261, -30200, -30139, -30078, + -30017, -29956, -29896, -29835, -29774, -29714, -29653, -29593, + -29532, -29472, -29411, -29351, -29291, -29230, -29170, -29110, + -29050, -28989, -28929, -28869, -28809, -28749, -28689, -28630, + -28570, -28510, -28450, -28390, -28331, -28271, -28212, -28152, + -28092, -28033, -27974, -27914, -27855, -27795, -27736, -27677, + -27618, -27559, -27499, -27440, -27381, -27322, -27263, -27204, + -27145, -27087, -27028, -26969, -26910, -26851, -26793, -26734, + -26675, -26617, -26558, -26500, -26441, -26383, -26325, -26266, + -26208, -26150, -26091, -26033, -25975, -25917, -25859, -25801, + -25743, -25685, -25627, -25569, -25511, -25453, -25395, -25337, + -25280, -25222, -25164, -25106, -25049, -24991, -24934, -24876, + -24819, -24761, -24704, -24646, -24589, -24532, -24474, -24417, + -24360, -24303, -24246, -24188, -24131, -24074, -24017, -23960, + -23903, -23846, -23789, -23733, -23676, -23619, -23562, -23505, + -23449, -23392, -23335, -23279, -23222, -23166, -23109, -23053, + -22996, -22940, -22883, -22827, -22770, -22714, -22658, -22602, + -22545, -22489, -22433, -22377, -22321, -22265, -22209, -22153, + -22097, -22041, -21985, -21929, -21873, -21817, -21761, -21705, + -21650, -21594, -21538, -21483, -21427, -21371, -21316, -21260, + -21205, -21149, -21094, -21038, -20983, -20927, -20872, -20817, + -20761, -20706, -20651, -20595, -20540, -20485, -20430, -20375, + -20320, -20264, -20209, -20154, -20099, -20044, -19989, -19935, + -19880, -19825, -19770, -19715, -19660, -19605, -19551, -19496, + -19441, -19387, -19332, -19277, -19223, -19168, -19114, -19059, + -19005, -18950, -18896, -18841, -18787, -18732, -18678, -18624, + -18569, -18515, -18461, -18407, -18352, -18298, -18244, -18190, + -18136, -18082, -18028, -17974, -17919, -17865, -17811, -17758, + -17704, -17650, -17596, -17542, -17488, -17434, -17380, -17327, + -17273, -17219, -17165, -17112, -17058, -17004, -16951, -16897, + -16843, -16790, -16736, -16683, -16629, -16576, -16522, -16469, + -16415, -16362, -16309, -16255, -16202, -16149, -16095, -16042, + -15989, -15935, -15882, -15829, -15776, -15723, -15670, -15616, + -15563, -15510, -15457, -15404, -15351, -15298, -15245, -15192, + -15139, -15086, -15033, -14980, -14927, -14875, -14822, -14769, + -14716, -14663, -14611, -14558, -14505, -14452, -14400, -14347, + -14294, -14242, -14189, -14136, -14084, -14031, -13979, -13926, + -13874, -13821, -13769, -13716, -13664, -13611, -13559, -13506, + -13454, -13402, -13349, -13297, -13245, -13192, -13140, -13088, + -13035, -12983, -12931, -12879, -12827, -12774, -12722, -12670, + -12618, -12566, -12514, -12462, -12409, -12357, -12305, -12253, + -12201, -12149, -12097, -12045, -11993, -11941, -11890, -11838, + -11786, -11734, -11682, -11630, -11578, -11526, -11475, -11423, + -11371, -11319, -11268, -11216, -11164, -11112, -11061, -11009, + -10957, -10906, -10854, -10802, -10751, -10699, -10647, -10596, + -10544, -10493, -10441, -10390, -10338, -10287, -10235, -10184, + -10132, -10081, -10029, -9978, -9926, -9875, -9824, -9772, + -9721, -9669, -9618, -9567, -9515, -9464, -9413, -9362, + -9310, -9259, -9208, -9156, -9105, -9054, -9003, -8952, + -8900, -8849, -8798, -8747, -8696, -8645, -8593, -8542, + -8491, -8440, -8389, -8338, -8287, -8236, -8185, -8134, + -8083, -8032, -7981, -7930, -7879, -7828, -7777, -7726, + -7675, -7624, -7573, -7522, -7471, -7420, -7369, -7318, + -7267, -7216, -7166, -7115, -7064, -7013, -6962, -6911, + -6861, -6810, -6759, -6708, -6657, -6607, -6556, -6505, + -6454, -6403, -6353, -6302, -6251, -6201, -6150, -6099, + -6048, -5998, -5947, -5896, -5846, -5795, -5744, -5694, + -5643, -5592, -5542, -5491, -5441, -5390, -5339, -5289, + -5238, -5188, -5137, -5086, -5036, -4985, -4935, -4884, + -4834, -4783, -4733, -4682, -4632, -4581, -4531, -4480, + -4430, -4379, -4329, -4278, -4228, -4177, -4127, -4076, + -4026, -3975, -3925, -3874, -3824, -3774, -3723, -3673, + -3622, -3572, -3521, -3471, -3421, -3370, -3320, -3269, + -3219, -3169, -3118, -3068, -3018, -2967, -2917, -2866, + -2816, -2766, -2715, -2665, -2615, -2564, -2514, -2464, + -2413, -2363, -2313, -2262, -2212, -2162, -2111, -2061, + -2011, -1960, -1910, -1860, -1810, -1759, -1709, -1659, + -1608, -1558, -1508, -1457, -1407, -1357, -1307, -1256, + -1206, -1156, -1105, -1055, -1005, -955, -904, -854, + -804, -754, -703, -653, -603, -552, -502, -452, + -402, -351, -301, -251, -201, -150, -100, -50, + 0, 50, 100, 150, 201, 251, 301, 351, + 402, 452, 502, 552, 603, 653, 703, 754, + 804, 854, 904, 955, 1005, 1055, 1105, 1156, + 1206, 1256, 1307, 1357, 1407, 1457, 1508, 1558, + 1608, 1659, 1709, 1759, 1810, 1860, 1910, 1960, + 2011, 2061, 2111, 2162, 2212, 2262, 2313, 2363, + 2413, 2464, 2514, 2564, 2615, 2665, 2715, 2766, + 2816, 2866, 2917, 2967, 3018, 3068, 3118, 3169, + 3219, 3269, 3320, 3370, 3421, 3471, 3521, 3572, + 3622, 3673, 3723, 3774, 3824, 3874, 3925, 3975, + 4026, 4076, 4127, 4177, 4228, 4278, 4329, 4379, + 4430, 4480, 4531, 4581, 4632, 4682, 4733, 4783, + 4834, 4884, 4935, 4985, 5036, 5086, 5137, 5188, + 5238, 5289, 5339, 5390, 5441, 5491, 5542, 5592, + 5643, 5694, 5744, 5795, 5846, 5896, 5947, 5998, + 6048, 6099, 6150, 6201, 6251, 6302, 6353, 6403, + 6454, 6505, 6556, 6607, 6657, 6708, 6759, 6810, + 6861, 6911, 6962, 7013, 7064, 7115, 7166, 7216, + 7267, 7318, 7369, 7420, 7471, 7522, 7573, 7624, + 7675, 7726, 7777, 7828, 7879, 7930, 7981, 8032, + 8083, 8134, 8185, 8236, 8287, 8338, 8389, 8440, + 8491, 8542, 8593, 8645, 8696, 8747, 8798, 8849, + 8900, 8952, 9003, 9054, 9105, 9156, 9208, 9259, + 9310, 9362, 9413, 9464, 9515, 9567, 9618, 9669, + 9721, 9772, 9824, 9875, 9926, 9978, 10029, 10081, + 10132, 10184, 10235, 10287, 10338, 10390, 10441, 10493, + 10544, 10596, 10647, 10699, 10751, 10802, 10854, 10906, + 10957, 11009, 11061, 11112, 11164, 11216, 11268, 11319, + 11371, 11423, 11475, 11526, 11578, 11630, 11682, 11734, + 11786, 11838, 11890, 11941, 11993, 12045, 12097, 12149, + 12201, 12253, 12305, 12357, 12409, 12462, 12514, 12566, + 12618, 12670, 12722, 12774, 12827, 12879, 12931, 12983, + 13035, 13088, 13140, 13192, 13245, 13297, 13349, 13402, + 13454, 13506, 13559, 13611, 13664, 13716, 13769, 13821, + 13874, 13926, 13979, 14031, 14084, 14136, 14189, 14242, + 14294, 14347, 14400, 14452, 14505, 14558, 14611, 14663, + 14716, 14769, 14822, 14875, 14927, 14980, 15033, 15086, + 15139, 15192, 15245, 15298, 15351, 15404, 15457, 15510, + 15563, 15616, 15670, 15723, 15776, 15829, 15882, 15935, + 15989, 16042, 16095, 16149, 16202, 16255, 16309, 16362, + 16415, 16469, 16522, 16576, 16629, 16683, 16736, 16790, + 16843, 16897, 16951, 17004, 17058, 17112, 17165, 17219, + 17273, 17327, 17380, 17434, 17488, 17542, 17596, 17650, + 17704, 17758, 17811, 17865, 17919, 17974, 18028, 18082, + 18136, 18190, 18244, 18298, 18352, 18407, 18461, 18515, + 18569, 18624, 18678, 18732, 18787, 18841, 18896, 18950, + 19005, 19059, 19114, 19168, 19223, 19277, 19332, 19387, + 19441, 19496, 19551, 19605, 19660, 19715, 19770, 19825, + 19880, 19935, 19989, 20044, 20099, 20154, 20209, 20264, + 20320, 20375, 20430, 20485, 20540, 20595, 20651, 20706, + 20761, 20817, 20872, 20927, 20983, 21038, 21094, 21149, + 21205, 21260, 21316, 21371, 21427, 21483, 21538, 21594, + 21650, 21705, 21761, 21817, 21873, 21929, 21985, 22041, + 22097, 22153, 22209, 22265, 22321, 22377, 22433, 22489, + 22545, 22602, 22658, 22714, 22770, 22827, 22883, 22940, + 22996, 23053, 23109, 23166, 23222, 23279, 23335, 23392, + 23449, 23505, 23562, 23619, 23676, 23733, 23789, 23846, + 23903, 23960, 24017, 24074, 24131, 24188, 24246, 24303, + 24360, 24417, 24474, 24532, 24589, 24646, 24704, 24761, + 24819, 24876, 24934, 24991, 25049, 25106, 25164, 25222, + 25280, 25337, 25395, 25453, 25511, 25569, 25627, 25685, + 25743, 25801, 25859, 25917, 25975, 26033, 26091, 26150, + 26208, 26266, 26325, 26383, 26441, 26500, 26558, 26617, + 26675, 26734, 26793, 26851, 26910, 26969, 27028, 27087, + 27145, 27204, 27263, 27322, 27381, 27440, 27499, 27559, + 27618, 27677, 27736, 27795, 27855, 27914, 27974, 28033, + 28092, 28152, 28212, 28271, 28331, 28390, 28450, 28510, + 28570, 28630, 28689, 28749, 28809, 28869, 28929, 28989, + 29050, 29110, 29170, 29230, 29291, 29351, 29411, 29472, + 29532, 29593, 29653, 29714, 29774, 29835, 29896, 29956, + 30017, 30078, 30139, 30200, 30261, 30322, 30383, 30444, + 30505, 30566, 30627, 30689, 30750, 30811, 30873, 30934, + 30996, 31057, 31119, 31180, 31242, 31304, 31366, 31427, + 31489, 31551, 31613, 31675, 31737, 31799, 31861, 31923, + 31986, 32048, 32110, 32173, 32235, 32297, 32360, 32422, + 32485, 32548, 32610, 32673, 32736, 32799, 32862, 32925, + 32988, 33051, 33114, 33177, 33240, 33303, 33366, 33430, + 33493, 33557, 33620, 33684, 33747, 33811, 33874, 33938, + 34002, 34066, 34130, 34194, 34257, 34322, 34386, 34450, + 34514, 34578, 34642, 34707, 34771, 34836, 34900, 34965, + 35029, 35094, 35159, 35223, 35288, 35353, 35418, 35483, + 35548, 35613, 35678, 35743, 35809, 35874, 35939, 36005, + 36070, 36136, 36201, 36267, 36333, 36398, 36464, 36530, + 36596, 36662, 36728, 36794, 36860, 36926, 36993, 37059, + 37125, 37192, 37258, 37325, 37391, 37458, 37525, 37591, + 37658, 37725, 37792, 37859, 37926, 37993, 38060, 38128, + 38195, 38262, 38330, 38397, 38465, 38532, 38600, 38668, + 38736, 38804, 38871, 38939, 39007, 39076, 39144, 39212, + 39280, 39349, 39417, 39486, 39554, 39623, 39691, 39760, + 39829, 39898, 39967, 40036, 40105, 40174, 40243, 40312, + 40382, 40451, 40520, 40590, 40660, 40729, 40799, 40869, + 40939, 41008, 41078, 41148, 41219, 41289, 41359, 41429, + 41500, 41570, 41641, 41711, 41782, 41853, 41923, 41994, + 42065, 42136, 42207, 42279, 42350, 42421, 42492, 42564, + 42635, 42707, 42779, 42850, 42922, 42994, 43066, 43138, + 43210, 43282, 43354, 43427, 43499, 43571, 43644, 43717, + 43789, 43862, 43935, 44008, 44081, 44154, 44227, 44300, + 44373, 44447, 44520, 44594, 44667, 44741, 44815, 44888, + 44962, 45036, 45110, 45184, 45259, 45333, 45407, 45482, + 45556, 45631, 45705, 45780, 45855, 45930, 46005, 46080, + 46155, 46230, 46306, 46381, 46457, 46532, 46608, 46684, + 46759, 46835, 46911, 46987, 47063, 47140, 47216, 47292, + 47369, 47445, 47522, 47599, 47676, 47753, 47830, 47907, + 47984, 48061, 48138, 48216, 48293, 48371, 48449, 48526, + 48604, 48682, 48760, 48838, 48917, 48995, 49073, 49152, + 49230, 49309, 49388, 49467, 49546, 49625, 49704, 49783, + 49862, 49942, 50021, 50101, 50181, 50260, 50340, 50420, + 50500, 50581, 50661, 50741, 50822, 50902, 50983, 51063, + 51144, 51225, 51306, 51387, 51469, 51550, 51631, 51713, + 51794, 51876, 51958, 52040, 52122, 52204, 52286, 52369, + 52451, 52533, 52616, 52699, 52782, 52865, 52948, 53031, + 53114, 53197, 53281, 53364, 53448, 53532, 53615, 53699, + 53784, 53868, 53952, 54036, 54121, 54205, 54290, 54375, + 54460, 54545, 54630, 54715, 54801, 54886, 54972, 55057, + 55143, 55229, 55315, 55401, 55487, 55574, 55660, 55747, + 55834, 55920, 56007, 56094, 56181, 56269, 56356, 56444, + 56531, 56619, 56707, 56795, 56883, 56971, 57059, 57148, + 57236, 57325, 57414, 57503, 57592, 57681, 57770, 57859, + 57949, 58039, 58128, 58218, 58308, 58398, 58489, 58579, + 58669, 58760, 58851, 58942, 59033, 59124, 59215, 59306, + 59398, 59489, 59581, 59673, 59765, 59857, 59950, 60042, + 60134, 60227, 60320, 60413, 60506, 60599, 60692, 60786, + 60879, 60973, 61067, 61161, 61255, 61349, 61444, 61538, + 61633, 61728, 61822, 61918, 62013, 62108, 62204, 62299, + 62395, 62491, 62587, 62683, 62779, 62876, 62972, 63069, + 63166, 63263, 63360, 63458, 63555, 63653, 63750, 63848, + 63946, 64045, 64143, 64241, 64340, 64439, 64538, 64637, + 64736, 64836, 64935, 65035, 65135, 65235, 65335, 65435, + 65535, 65636, 65737, 65838, 65939, 66040, 66141, 66243, + 66345, 66447, 66549, 66651, 66753, 66856, 66958, 67061, + 67164, 67267, 67371, 67474, 67578, 67681, 67785, 67889, + 67994, 68098, 68203, 68308, 68413, 68518, 68623, 68728, + 68834, 68940, 69046, 69152, 69258, 69365, 69472, 69578, + 69685, 69793, 69900, 70007, 70115, 70223, 70331, 70439, + 70548, 70656, 70765, 70874, 70983, 71093, 71202, 71312, + 71422, 71532, 71642, 71752, 71863, 71974, 72085, 72196, + 72307, 72419, 72531, 72643, 72755, 72867, 72979, 73092, + 73205, 73318, 73431, 73545, 73659, 73772, 73886, 74001, + 74115, 74230, 74345, 74460, 74575, 74690, 74806, 74922, + 75038, 75154, 75271, 75387, 75504, 75621, 75739, 75856, + 75974, 76092, 76210, 76328, 76447, 76566, 76685, 76804, + 76923, 77043, 77163, 77283, 77403, 77524, 77644, 77765, + 77886, 78008, 78129, 78251, 78373, 78495, 78618, 78741, + 78864, 78987, 79110, 79234, 79358, 79482, 79606, 79731, + 79855, 79980, 80106, 80231, 80357, 80483, 80609, 80735, + 80862, 80989, 81116, 81244, 81371, 81499, 81627, 81756, + 81884, 82013, 82142, 82271, 82401, 82531, 82661, 82791, + 82922, 83053, 83184, 83315, 83447, 83579, 83711, 83843, + 83976, 84109, 84242, 84376, 84509, 84643, 84778, 84912, + 85047, 85182, 85317, 85453, 85589, 85725, 85861, 85998, + 86135, 86272, 86410, 86547, 86686, 86824, 86963, 87101, + 87241, 87380, 87520, 87660, 87800, 87941, 88082, 88223, + 88365, 88506, 88648, 88791, 88934, 89077, 89220, 89363, + 89507, 89651, 89796, 89941, 90086, 90231, 90377, 90523, + 90669, 90816, 90963, 91110, 91258, 91406, 91554, 91702, + 91851, 92000, 92150, 92300, 92450, 92600, 92751, 92902, + 93053, 93205, 93357, 93510, 93663, 93816, 93969, 94123, + 94277, 94431, 94586, 94741, 94897, 95053, 95209, 95365, + 95522, 95680, 95837, 95995, 96153, 96312, 96471, 96630, + 96790, 96950, 97111, 97271, 97433, 97594, 97756, 97918, + 98081, 98244, 98408, 98571, 98735, 98900, 99065, 99230, + 99396, 99562, 99729, 99895, 100063, 100230, 100398, 100567, + 100736, 100905, 101074, 101244, 101415, 101586, 101757, 101929, + 102101, 102273, 102446, 102619, 102793, 102967, 103142, 103317, + 103492, 103668, 103844, 104021, 104198, 104376, 104554, 104732, + 104911, 105090, 105270, 105450, 105631, 105812, 105993, 106175, + 106358, 106541, 106724, 106908, 107092, 107277, 107462, 107648, + 107834, 108020, 108207, 108395, 108583, 108771, 108960, 109150, + 109340, 109530, 109721, 109912, 110104, 110297, 110490, 110683, + 110877, 111071, 111266, 111462, 111658, 111854, 112051, 112248, + 112446, 112645, 112844, 113043, 113244, 113444, 113645, 113847, + 114049, 114252, 114455, 114659, 114864, 115069, 115274, 115480, + 115687, 115894, 116102, 116310, 116519, 116728, 116938, 117149, + 117360, 117572, 117784, 117997, 118211, 118425, 118639, 118855, + 119071, 119287, 119504, 119722, 119940, 120159, 120379, 120599, + 120820, 121041, 121263, 121486, 121709, 121933, 122158, 122383, + 122609, 122835, 123062, 123290, 123519, 123748, 123978, 124208, + 124439, 124671, 124904, 125137, 125371, 125605, 125841, 126077, + 126313, 126551, 126789, 127027, 127267, 127507, 127748, 127990, + 128232, 128475, 128719, 128963, 129209, 129455, 129701, 129949, + 130197, 130446, 130696, 130947, 131198, 131450, 131703, 131957, + 132211, 132466, 132722, 132979, 133237, 133495, 133754, 134014, + 134275, 134537, 134799, 135063, 135327, 135592, 135858, 136125, + 136392, 136661, 136930, 137200, 137471, 137743, 138016, 138289, + 138564, 138839, 139115, 139393, 139671, 139950, 140230, 140511, + 140792, 141075, 141359, 141643, 141929, 142215, 142503, 142791, + 143081, 143371, 143662, 143955, 144248, 144542, 144837, 145134, + 145431, 145729, 146029, 146329, 146630, 146933, 147236, 147541, + 147846, 148153, 148461, 148769, 149079, 149390, 149702, 150015, + 150329, 150645, 150961, 151279, 151597, 151917, 152238, 152560, + 152883, 153208, 153533, 153860, 154188, 154517, 154847, 155179, + 155512, 155845, 156181, 156517, 156855, 157193, 157533, 157875, + 158217, 158561, 158906, 159253, 159601, 159950, 160300, 160652, + 161005, 161359, 161715, 162072, 162430, 162790, 163151, 163513, + 163877, 164242, 164609, 164977, 165347, 165718, 166090, 166464, + 166839, 167216, 167594, 167974, 168355, 168738, 169122, 169508, + 169895, 170284, 170674, 171066, 171460, 171855, 172252, 172650, + 173050, 173452, 173855, 174260, 174666, 175074, 175484, 175896, + 176309, 176724, 177140, 177559, 177979, 178401, 178824, 179250, + 179677, 180106, 180537, 180969, 181404, 181840, 182278, 182718, + 183160, 183604, 184050, 184498, 184947, 185399, 185852, 186308, + 186765, 187225, 187686, 188150, 188615, 189083, 189553, 190025, + 190499, 190975, 191453, 191933, 192416, 192900, 193387, 193876, + 194367, 194861, 195357, 195855, 196355, 196858, 197363, 197870, + 198380, 198892, 199406, 199923, 200442, 200964, 201488, 202015, + 202544, 203076, 203610, 204147, 204686, 205228, 205772, 206319, + 206869, 207422, 207977, 208535, 209095, 209658, 210225, 210793, + 211365, 211940, 212517, 213097, 213681, 214267, 214856, 215448, + 216043, 216641, 217242, 217846, 218453, 219064, 219677, 220294, + 220913, 221536, 222163, 222792, 223425, 224061, 224701, 225344, + 225990, 226640, 227293, 227949, 228610, 229273, 229940, 230611, + 231286, 231964, 232646, 233331, 234021, 234714, 235411, 236112, + 236816, 237525, 238237, 238954, 239674, 240399, 241128, 241860, + 242597, 243338, 244084, 244834, 245588, 246346, 247109, 247876, + 248647, 249423, 250204, 250989, 251779, 252574, 253373, 254177, + 254986, 255799, 256618, 257441, 258270, 259103, 259941, 260785, + 261634, 262488, 263347, 264212, 265082, 265957, 266838, 267724, + 268616, 269514, 270417, 271326, 272241, 273161, 274088, 275020, + 275959, 276903, 277854, 278811, 279774, 280743, 281719, 282702, + 283691, 284686, 285688, 286697, 287713, 288735, 289765, 290801, + 291845, 292895, 293953, 295018, 296091, 297171, 298259, 299354, + 300457, 301567, 302686, 303812, 304947, 306090, 307240, 308400, + 309567, 310743, 311928, 313121, 314324, 315535, 316754, 317984, + 319222, 320469, 321726, 322993, 324269, 325554, 326850, 328156, + 329471, 330797, 332133, 333480, 334837, 336204, 337583, 338973, + 340373, 341785, 343208, 344643, 346089, 347547, 349017, 350499, + 351993, 353499, 355018, 356550, 358094, 359652, 361223, 362807, + 364404, 366016, 367641, 369280, 370933, 372601, 374283, 375981, + 377693, 379420, 381163, 382921, 384696, 386486, 388293, 390116, + 391956, 393812, 395686, 397578, 399487, 401414, 403359, 405323, + 407305, 409306, 411327, 413367, 415427, 417507, 419608, 421729, + 423871, 426035, 428221, 430428, 432658, 434910, 437186, 439485, + 441807, 444154, 446526, 448922, 451343, 453791, 456264, 458764, + 461291, 463845, 466428, 469038, 471678, 474347, 477045, 479774, + 482534, 485325, 488148, 491003, 493891, 496813, 499769, 502760, + 505787, 508849, 511948, 515084, 518259, 521472, 524725, 528018, + 531351, 534727, 538145, 541606, 545112, 548662, 552259, 555902, + 559593, 563332, 567122, 570962, 574853, 578797, 582795, 586848, + 590957, 595124, 599348, 603633, 607978, 612386, 616857, 621393, + 625996, 630667, 635407, 640218, 645102, 650060, 655094, 660206, + 665398, 670671, 676027, 681469, 686999, 692618, 698328, 704133, + 710035, 716035, 722137, 728343, 734655, 741077, 747612, 754261, + 761030, 767919, 774934, 782077, 789353, 796763, 804314, 812008, + 819849, 827843, 835992, 844303, 852780, 861428, 870251, 879257, + 888449, 897835, 907420, 917211, 927215, 937438, 947887, 958571, + 969498, 980675, 992112, 1003818, 1015802, 1028074, 1040645, 1053527, + 1066729, 1080266, 1094149, 1108393, 1123011, 1138018, 1153430, 1169265, + 1185538, 1202270, 1219479, 1237186, 1255414, 1274185, 1293525, 1313459, + 1334015, 1355224, 1377116, 1399726, 1423088, 1447242, 1472229, 1498091, + 1524876, 1552635, 1581422, 1611294, 1642314, 1674550, 1708075, 1742967, + 1779313, 1817205, 1856743, 1898038, 1941209, 1986387, 2033716, 2083353, + 2135471, 2190260, 2247933, 2308722, 2372887, 2440718, 2512537, 2588709, + 2669640, 2755792, 2847685, 2945916, 3051161, 3164201, 3285935, 3417407, + 3559833, 3714643, 3883524, 4068489, 4271947, 4496821, 4746679, 5025930, + 5340085, 5696125, 6103026, 6572525, 7120270, 7767602, 8544398, 9493811, + 10680573, 12206405, 14240842, 17089048, 21361347, 28481836, 42722796, 85445642 }; From 08c0c7676c4b64f7b9a0ea40269ff6a22d53973d Mon Sep 17 00:00:00 2001 From: Monster Iestyn Date: Sun, 11 Oct 2015 21:01:04 +0100 Subject: [PATCH 16/27] Since cv_pointlimit is handled in P_CheckPointLimit, I've just created P_CheckTimeLimit for cv_timelimit. It helps make P_UpdateSpecials less messy-looking anyway. --- src/p_inter.c | 117 +++++++++++++++++++++++++++++++++++++++++++++++++- src/p_local.h | 1 + src/p_spec.c | 101 ++----------------------------------------- 3 files changed, 120 insertions(+), 99 deletions(-) diff --git a/src/p_inter.c b/src/p_inter.c index f9dc3c342..e49d89eb4 100644 --- a/src/p_inter.c +++ b/src/p_inter.c @@ -1648,11 +1648,126 @@ static void P_HitDeathMessages(player_t *player, mobj_t *inflictor, mobj_t *sour CONS_Printf(str, targetname, deadtarget ? M_GetText("killed") : M_GetText("hit")); } +/** Checks if the level timer is over the timelimit and the round should end, + * unless you are in overtime. In which case leveltime may stretch out beyond + * timelimitintics and overtime's status will be checked here each tick. + * Verify that the value of ::cv_timelimit is greater than zero before + * calling this function. + * + * \sa cv_timelimit, P_CheckPointLimit, P_UpdateSpecials + */ +void P_CheckTimeLimit(void) +{ + INT32 i, k; + + if (!cv_timelimit.value) + return; + + if (!(multiplayer || netgame)) + return; + + if (G_PlatformGametype()) + return; + + if (leveltime < timelimitintics) + return; + + if (gameaction == ga_completed) + return; + + //Tagmode round end but only on the tic before the + //XD_EXITLEVEL packet is recieved by all players. + if (G_TagGametype()) + { + if (leveltime == (timelimitintics + 1)) + { + for (i = 0; i < MAXPLAYERS; i++) + { + if (!playeringame[i] || players[i].spectator + || (players[i].pflags & PF_TAGGED) || (players[i].pflags & PF_TAGIT)) + continue; + + CONS_Printf(M_GetText("%s recieved double points for surviving the round.\n"), player_names[i]); + P_AddPlayerScore(&players[i], players[i].score); + } + } + + if (server) + SendNetXCmd(XD_EXITLEVEL, NULL, 0); + } + + //Optional tie-breaker for Match/CTF + else if (cv_overtime.value) + { + INT32 playerarray[MAXPLAYERS]; + INT32 tempplayer = 0; + INT32 spectators = 0; + INT32 playercount = 0; + + //Figure out if we have enough participating players to care. + for (i = 0; i < MAXPLAYERS; i++) + { + if (playeringame[i] && players[i].spectator) + spectators++; + } + + if ((D_NumPlayers() - spectators) > 1) + { + // Play the starpost sfx after the first second of overtime. + if (gamestate == GS_LEVEL && (leveltime == (timelimitintics + TICRATE))) + S_StartSound(NULL, sfx_strpst); + + // Normal Match + if (!G_GametypeHasTeams()) + { + //Store the nodes of participating players in an array. + for (i = 0; i < MAXPLAYERS; i++) + { + if (playeringame[i] && !players[i].spectator) + { + playerarray[playercount] = i; + playercount++; + } + } + + //Sort 'em. + for (i = 1; i < playercount; i++) + { + for (k = i; k < playercount; k++) + { + if (players[playerarray[i-1]].score < players[playerarray[k]].score) + { + tempplayer = playerarray[i-1]; + playerarray[i-1] = playerarray[k]; + playerarray[k] = tempplayer; + } + } + } + + //End the round if the top players aren't tied. + if (players[playerarray[0]].score == players[playerarray[1]].score) + return; + } + else + { + //In team match and CTF, determining a tie is much simpler. =P + if (redscore == bluescore) + return; + } + } + if (server) + SendNetXCmd(XD_EXITLEVEL, NULL, 0); + } + + if (server) + SendNetXCmd(XD_EXITLEVEL, NULL, 0); +} + /** Checks if a player's score is over the pointlimit and the round should end. * Verify that the value of ::cv_pointlimit is greater than zero before * calling this function. * - * \sa cv_pointlimit, P_UpdateSpecials + * \sa cv_pointlimit, P_CheckTimeLimit, P_UpdateSpecials */ void P_CheckPointLimit(void) { diff --git a/src/p_local.h b/src/p_local.h index 498bf0828..6bd402912 100644 --- a/src/p_local.h +++ b/src/p_local.h @@ -397,6 +397,7 @@ void P_PlayerEmeraldBurst(player_t *player, boolean toss); void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck); void P_PlayerFlagBurst(player_t *player, boolean toss); +void P_CheckTimeLimit(void); void P_CheckPointLimit(void); void P_CheckSurvivors(void); boolean P_CheckRacers(void); diff --git a/src/p_spec.c b/src/p_spec.c index 0d786c695..88174c220 100644 --- a/src/p_spec.c +++ b/src/p_spec.c @@ -4648,114 +4648,19 @@ void P_PlayerInSpecialSector(player_t *player) /** Animate planes, scroll walls, etc. and keeps track of level timelimit and exits if time is up. * - * \sa cv_timelimit, P_CheckPointLimit + * \sa P_CheckTimeLimit, P_CheckPointLimit */ void P_UpdateSpecials(void) { anim_t *anim; - INT32 i, k; + INT32 i; INT32 pic; size_t j; levelflat_t *foundflats; // for flat animation // LEVEL TIMER - // Exit if the timer is equal to or greater the timelimit, unless you are - // in overtime. In which case leveltime may stretch out beyond timelimitintics - // and overtime's status will be checked here each tick. - if (cv_timelimit.value && timelimitintics <= leveltime && (multiplayer || netgame) - && G_RingSlingerGametype() && (gameaction != ga_completed)) - { - boolean pexit = false; - - //Tagmode round end but only on the tic before the - //XD_EXITLEVEL packet is recieved by all players. - if (G_TagGametype()) - { - if (leveltime == (timelimitintics + 1)) - { - for (i = 0; i < MAXPLAYERS; i++) - { - if (!playeringame[i] || players[i].spectator - || (players[i].pflags & PF_TAGGED) || (players[i].pflags & PF_TAGIT)) - continue; - - CONS_Printf(M_GetText("%s recieved double points for surviving the round.\n"), player_names[i]); - P_AddPlayerScore(&players[i], players[i].score); - } - } - - pexit = true; - } - - //Optional tie-breaker for Match/CTF - else if (G_RingSlingerGametype() && cv_overtime.value) - { - INT32 playerarray[MAXPLAYERS]; - INT32 tempplayer = 0; - INT32 spectators = 0; - INT32 playercount = 0; - - //Figure out if we have enough participating players to care. - for (i = 0; i < MAXPLAYERS; i++) - { - if (playeringame[i] && players[i].spectator) - spectators++; - } - - if ((D_NumPlayers() - spectators) > 1) - { - // Play the starpost sfx after the first second of overtime. - if (gamestate == GS_LEVEL && (leveltime == (timelimitintics + TICRATE))) - S_StartSound(NULL, sfx_strpst); - - // Normal Match - if (!G_GametypeHasTeams()) - { - //Store the nodes of participating players in an array. - for (i = 0; i < MAXPLAYERS; i++) - { - if (playeringame[i] && !players[i].spectator) - { - playerarray[playercount] = i; - playercount++; - } - } - - //Sort 'em. - for (i = 1; i < playercount; i++) - { - for (k = i; k < playercount; k++) - { - if (players[playerarray[i-1]].score < players[playerarray[k]].score) - { - tempplayer = playerarray[i-1]; - playerarray[i-1] = playerarray[k]; - playerarray[k] = tempplayer; - } - } - } - - //End the round if the top players aren't tied. - if (!(players[playerarray[0]].score == players[playerarray[1]].score)) - pexit = true; - } - else - { - //In team match and CTF, determining a tie is much simpler. =P - if (!(redscore == bluescore)) - pexit = true; - } - } - else - pexit = true; - } - else - pexit = true; - - if (server && pexit) - SendNetXCmd(XD_EXITLEVEL, NULL, 0); - } + P_CheckTimeLimit(); // POINT LIMIT P_CheckPointLimit(); From 165aec3d34b8c5521b4941ffe0c4d7bb733dc4c1 Mon Sep 17 00:00:00 2001 From: Monster Iestyn Date: Sun, 11 Oct 2015 22:23:40 +0100 Subject: [PATCH 17/27] FF_TRANSSHIFT is meant for transmaps linked to states, not anything else! I'm surprised how the source code flew in the face of this fact for so long and just used it everywhere, that's just silly. --- src/f_wipe.c | 2 +- src/r_plane.c | 42 +++++++++++++----------------------------- src/r_segs.c | 48 ++++++++++++------------------------------------ src/r_splats.c | 2 +- src/r_things.c | 4 ++-- src/v_video.c | 6 +++--- 6 files changed, 32 insertions(+), 72 deletions(-) diff --git a/src/f_wipe.c b/src/f_wipe.c index 8e7c622c4..0d3061324 100644 --- a/src/f_wipe.c +++ b/src/f_wipe.c @@ -232,7 +232,7 @@ static void F_DoWipe(fademask_t *fademask) do { // pointer to transtable that this mask would use - transtbl = transtables + ((9 - *mask)<polyobj->translucency >= 10) return; // Don't even draw it - else if (pl->polyobj->translucency == 9) - ds_transmap = ((tr_trans90)<polyobj->translucency == 8) - ds_transmap = ((tr_trans80)<polyobj->translucency == 7) - ds_transmap = ((tr_trans70)<polyobj->translucency == 6) - ds_transmap = ((tr_trans60)<polyobj->translucency == 5) - ds_transmap = ((tr_trans50)<polyobj->translucency == 4) - ds_transmap = ((tr_trans40)<polyobj->translucency == 3) - ds_transmap = ((tr_trans30)<polyobj->translucency == 2) - ds_transmap = ((tr_trans20)<polyobj->translucency == 1) - ds_transmap = ((tr_trans10)<polyobj->translucency <= 9 && pl->polyobj->translucency > 0) + ds_transmap = transtables + ((pl->polyobj->translucency-1)<<16); else // Opaque, but allow transparent flat pixels spanfunc = splatfunc; if (pl->extra_colormap && pl->extra_colormap->fog) light = (pl->lightlevel >> LIGHTSEGSHIFT); else - light = LIGHTLEVELS-1; + light = LIGHTLEVELS-1; } else #endif @@ -805,23 +789,23 @@ void R_DrawSinglePlane(visplane_t *pl) if (pl->ffloor->alpha < 12) return; // Don't even draw it else if (pl->ffloor->alpha < 38) - ds_transmap = ((tr_trans90)<ffloor->alpha < 64) - ds_transmap = ((tr_trans80)<ffloor->alpha < 89) - ds_transmap = ((tr_trans70)<ffloor->alpha < 115) - ds_transmap = ((tr_trans60)<ffloor->alpha < 140) - ds_transmap = ((tr_trans50)<ffloor->alpha < 166) - ds_transmap = ((tr_trans40)<ffloor->alpha < 192) - ds_transmap = ((tr_trans30)<ffloor->alpha < 217) - ds_transmap = ((tr_trans20)<ffloor->alpha < 243) - ds_transmap = ((tr_trans10)<special) { case 900: - dc_transmap = ((tr_trans10)<special-900)<<16); colfunc = fuzzcolfunc; break; case 909: @@ -354,7 +330,7 @@ void R_RenderMaskedSegRange(drawseg_t *ds, INT32 x1, INT32 x2) if (curline->polyseg->translucency >= NUMTRANSMAPS) return; - dc_transmap = ((curline->polyseg->translucency)<polyseg->translucency-1)<<16); colfunc = fuzzcolfunc; } @@ -733,23 +709,23 @@ void R_RenderThickSideRange(drawseg_t *ds, INT32 x1, INT32 x2, ffloor_t *pfloor) if (pfloor->alpha < 12) return; // Don't even draw it else if (pfloor->alpha < 38) - dc_transmap = ((tr_trans90)<alpha < 64) - dc_transmap = ((tr_trans80)<alpha < 89) - dc_transmap = ((tr_trans70)<alpha < 115) - dc_transmap = ((tr_trans60)<alpha < 140) - dc_transmap = ((tr_trans50)<alpha < 166) - dc_transmap = ((tr_trans40)<alpha < 192) - dc_transmap = ((tr_trans30)<alpha < 217) - dc_transmap = ((tr_trans20)<alpha < 243) - dc_transmap = ((tr_trans10)<flags2 & MF2_SHADOW) // actually only the player should use this (temporary invisibility) - vis->transmap = ((tr_trans80-1)<transmap = transtables + ((tr_trans80-1)<<16); // because now the translucency is set through FF_TRANSMASK else if (thing->frame & FF_TRANSMASK) - vis->transmap = (thing->frame & FF_TRANSMASK) - 0x10000 + transtables; + vis->transmap = transtables + ((((thing->frame & FF_TRANSMASK)>>FF_TRANSSHIFT)-1)<<16); if (((thing->frame & FF_FULLBRIGHT) || (thing->flags2 & MF2_SHADOW)) && (!vis->extra_colormap || !vis->extra_colormap->fog)) diff --git a/src/v_video.c b/src/v_video.c index 524c15cc7..010c042c3 100644 --- a/src/v_video.c +++ b/src/v_video.c @@ -366,7 +366,7 @@ void V_DrawFixedPatch(fixed_t x, fixed_t y, fixed_t pscale, INT32 scrn, patch_t } if (alphalevel) { - v_translevel = ((alphalevel)< Date: Mon, 12 Oct 2015 15:10:43 +0100 Subject: [PATCH 18/27] Partial undo of what I did last commit to make Inu happy again. Note: polyobj_t's "translucency" is apparently a SIGNED integer, so in theory it's possible to get polyobj flats to use the "spanfunc = splatfunc" line using negative values. If this is not meant to happen, this should probably be fixed asap --- src/f_wipe.c | 2 +- src/r_plane.c | 24 ++++++++++++------------ src/r_segs.c | 24 ++++++++++++------------ src/r_splats.c | 2 +- src/r_things.c | 4 ++-- src/v_video.c | 6 +++--- 6 files changed, 31 insertions(+), 31 deletions(-) diff --git a/src/f_wipe.c b/src/f_wipe.c index 0d3061324..8e7c622c4 100644 --- a/src/f_wipe.c +++ b/src/f_wipe.c @@ -232,7 +232,7 @@ static void F_DoWipe(fademask_t *fademask) do { // pointer to transtable that this mask would use - transtbl = transtables + ((9 - *mask)<<16); + transtbl = transtables + ((9 - *mask)<polyobj->translucency >= 10) return; // Don't even draw it - else if (pl->polyobj->translucency <= 9 && pl->polyobj->translucency > 0) - ds_transmap = transtables + ((pl->polyobj->translucency-1)<<16); + else if (pl->polyobj->translucency > 0) + ds_transmap = transtables + ((pl->polyobj->translucency-1)<ffloor->alpha < 12) return; // Don't even draw it else if (pl->ffloor->alpha < 38) - ds_transmap = transtables + ((tr_trans90-1)<<16); + ds_transmap = transtables + ((tr_trans90-1)<ffloor->alpha < 64) - ds_transmap = transtables + ((tr_trans80-1)<<16); + ds_transmap = transtables + ((tr_trans80-1)<ffloor->alpha < 89) - ds_transmap = transtables + ((tr_trans70-1)<<16); + ds_transmap = transtables + ((tr_trans70-1)<ffloor->alpha < 115) - ds_transmap = transtables + ((tr_trans60-1)<<16); + ds_transmap = transtables + ((tr_trans60-1)<ffloor->alpha < 140) - ds_transmap = transtables + ((tr_trans50-1)<<16); + ds_transmap = transtables + ((tr_trans50-1)<ffloor->alpha < 166) - ds_transmap = transtables + ((tr_trans40-1)<<16); + ds_transmap = transtables + ((tr_trans40-1)<ffloor->alpha < 192) - ds_transmap = transtables + ((tr_trans30-1)<<16); + ds_transmap = transtables + ((tr_trans30-1)<ffloor->alpha < 217) - ds_transmap = transtables + ((tr_trans20-1)<<16); + ds_transmap = transtables + ((tr_trans20-1)<ffloor->alpha < 243) - ds_transmap = transtables + ((tr_trans10-1)<<16); + ds_transmap = transtables + ((tr_trans10-1)<special-900)<<16); + dc_transmap = transtables + ((ldef->special-900)<polyseg->translucency >= NUMTRANSMAPS) return; - dc_transmap = transtables + ((curline->polyseg->translucency-1)<<16); + dc_transmap = transtables + ((curline->polyseg->translucency-1)<alpha < 12) return; // Don't even draw it else if (pfloor->alpha < 38) - dc_transmap = transtables + ((tr_trans90-1)<<16); + dc_transmap = transtables + ((tr_trans90-1)<alpha < 64) - dc_transmap = transtables + ((tr_trans80-1)<<16); + dc_transmap = transtables + ((tr_trans80-1)<alpha < 89) - dc_transmap = transtables + ((tr_trans70-1)<<16); + dc_transmap = transtables + ((tr_trans70-1)<alpha < 115) - dc_transmap = transtables + ((tr_trans60-1)<<16); + dc_transmap = transtables + ((tr_trans60-1)<alpha < 140) - dc_transmap = transtables + ((tr_trans50-1)<<16); + dc_transmap = transtables + ((tr_trans50-1)<alpha < 166) - dc_transmap = transtables + ((tr_trans40-1)<<16); + dc_transmap = transtables + ((tr_trans40-1)<alpha < 192) - dc_transmap = transtables + ((tr_trans30-1)<<16); + dc_transmap = transtables + ((tr_trans30-1)<alpha < 217) - dc_transmap = transtables + ((tr_trans20-1)<<16); + dc_transmap = transtables + ((tr_trans20-1)<alpha < 243) - dc_transmap = transtables + ((tr_trans10-1)<<16); + dc_transmap = transtables + ((tr_trans10-1)<flags2 & MF2_SHADOW) // actually only the player should use this (temporary invisibility) - vis->transmap = transtables + ((tr_trans80-1)<<16); // because now the translucency is set through FF_TRANSMASK + vis->transmap = transtables + ((tr_trans80-1)<frame & FF_TRANSMASK) - vis->transmap = transtables + ((((thing->frame & FF_TRANSMASK)>>FF_TRANSSHIFT)-1)<<16); + vis->transmap = transtables + (thing->frame & FF_TRANSMASK) - 0x10000; if (((thing->frame & FF_FULLBRIGHT) || (thing->flags2 & MF2_SHADOW)) && (!vis->extra_colormap || !vis->extra_colormap->fog)) diff --git a/src/v_video.c b/src/v_video.c index 010c042c3..c5afd783f 100644 --- a/src/v_video.c +++ b/src/v_video.c @@ -366,7 +366,7 @@ void V_DrawFixedPatch(fixed_t x, fixed_t y, fixed_t pscale, INT32 scrn, patch_t } if (alphalevel) { - v_translevel = transtables + ((alphalevel-1)<<16); + v_translevel = transtables + ((alphalevel-1)< Date: Wed, 21 Oct 2015 15:32:50 +0100 Subject: [PATCH 19/27] From what I can tell, correcting this one value in finetangent[] shouldn't cause any harm at all, so... --- src/tables.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tables.c b/src/tables.c index deb5a6b19..3f881be7d 100644 --- a/src/tables.c +++ b/src/tables.c @@ -546,7 +546,7 @@ fixed_t finetangent[4096] = 63166, 63263, 63360, 63458, 63555, 63653, 63750, 63848, 63946, 64045, 64143, 64241, 64340, 64439, 64538, 64637, 64736, 64836, 64935, 65035, 65135, 65235, 65335, 65435, - 65535, 65636, 65737, 65838, 65939, 66040, 66141, 66243, + 65536, 65636, 65737, 65838, 65939, 66040, 66141, 66243, 66345, 66447, 66549, 66651, 66753, 66856, 66958, 67061, 67164, 67267, 67371, 67474, 67578, 67681, 67785, 67889, 67994, 68098, 68203, 68308, 68413, 68518, 68623, 68728, From ac24ce234fb517a073825a73f70bc423458348ec Mon Sep 17 00:00:00 2001 From: Monster Iestyn Date: Wed, 21 Oct 2015 15:40:59 +0100 Subject: [PATCH 20/27] If this isn't an accidental copy+paste then I'd be very surprised --- src/g_game.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/g_game.c b/src/g_game.c index 643ec8c93..57b2f731f 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -297,9 +297,6 @@ static CV_PossibleValue_t joyaxis_cons_t[] = {{0, "None"}, #if JOYAXISSET > 3 {7, "Pitch"}, {8, "Roll"}, {-7, "Pitch-"}, {-8, "Roll-"}, #endif -#if JOYAXISSET > 3 -{7, "Pitch"}, {8, "Roll"}, {-7, "Pitch-"}, {-8, "Roll-"}, -#endif #if JOYAXISSET > 4 {7, "Yaw"}, {8, "Dummy"}, {-7, "Yaw-"}, {-8, "Dummy-"}, #endif From b94fc008abb8c694749666fad346b838ea43b7ea Mon Sep 17 00:00:00 2001 From: Monster Iestyn Date: Wed, 21 Oct 2015 16:01:16 +0100 Subject: [PATCH 21/27] doomtype.h tweaks some of the mess in here really bothers me --- src/doomtype.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/doomtype.h b/src/doomtype.h index ff4199775..8e7da6881 100644 --- a/src/doomtype.h +++ b/src/doomtype.h @@ -100,11 +100,13 @@ typedef long ssize_t; #if defined (_MSC_VER) || defined (__OS2__) // Microsoft VisualC++ +#ifdef _MSC_VER #if (_MSC_VER <= 1800) // MSVC 2013 and back #define snprintf _snprintf #if (_MSC_VER <= 1200) // MSVC 2012 and back #define vsnprintf _vsnprintf #endif +#endif #endif #define strncasecmp strnicmp #define strcasecmp stricmp @@ -177,6 +179,8 @@ size_t strlcpy(char *dst, const char *src, size_t siz); // not the number of bytes in the buffer. #define STRBUFCPY(dst,src) strlcpy(dst, src, sizeof dst) +// \note __BYTEBOOL__ used to be set above if "macintosh" was defined, +// if macintosh's version of boolean type isn't needed anymore, then isn't this macro pointless now? #ifndef __BYTEBOOL__ #define __BYTEBOOL__ @@ -193,7 +197,6 @@ size_t strlcpy(char *dst, const char *src, size_t siz); #else typedef enum {false, true} boolean; #endif - //#endif // __cplusplus #endif // __BYTEBOOL__ /* 7.18.2.1 Limits of exact-width integer types */ From 77f118dd2f748d45221758746fca7829b361e5b6 Mon Sep 17 00:00:00 2001 From: Monster Iestyn Date: Fri, 6 Nov 2015 14:23:06 +0000 Subject: [PATCH 22/27] Removed dummied-out Pope XVI code --- src/st_stuff.c | 31 ------------------------------- 1 file changed, 31 deletions(-) diff --git a/src/st_stuff.c b/src/st_stuff.c index 6e19b92ff..585db0c87 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -1842,37 +1842,6 @@ static void ST_overlayDrawer(void) LUAh_GameHUD(stplyr); #endif -#if 0 // Pope XVI - if (!(netgame || multiplayer) && !modifiedgame && gamemap == 11 && ALL7EMERALDS(emeralds) - && stplyr->mo && stplyr->mo->subsector && stplyr->mo->subsector->sector-sectors == 1361) - { - if (grade & 2048) // NAGZ - { - V_DrawCenteredString(BASEVIDWIDTH/2, 70, 0, M_GetText("I, Pope Rededict XVI proclaim")); - V_DrawCenteredString(BASEVIDWIDTH/2, 80, 0, M_GetText("AJ & Amy")); - V_DrawCenteredString(BASEVIDWIDTH/2, 90, 0, M_GetText("Husband & Wife")); - V_DrawCenteredString(BASEVIDWIDTH/2, 100, 0, M_GetText("on this day")); - V_DrawCenteredString(BASEVIDWIDTH/2, 110, 0, M_GetText("May 16, 2009")); - - P_GivePlayerRings(stplyr, 9999); - } - else - { - V_DrawCenteredString(BASEVIDWIDTH/2, 60, 0, M_GetText("Oh... it's you again...")); - V_DrawCenteredString(BASEVIDWIDTH/2, 80, 0, M_GetText("Look, I wanted to apologize for the way")); - V_DrawCenteredString(BASEVIDWIDTH/2, 90, 0, M_GetText("I've acted in the past.")); - V_DrawCenteredString(BASEVIDWIDTH/2, 110, 0, M_GetText("I've seen the error of my ways")); - V_DrawCenteredString(BASEVIDWIDTH/2, 120, 0, M_GetText("and turned over a new leaf.")); - V_DrawCenteredString(BASEVIDWIDTH/2, 140, 0, M_GetText("Instead of sending people to hell,")); - V_DrawCenteredString(BASEVIDWIDTH/2, 150, 0, M_GetText("I now send them to heaven!")); - - P_LinedefExecute(4200, stplyr->mo, stplyr->mo->subsector->sector); - P_LinedefExecute(4201, stplyr->mo, stplyr->mo->subsector->sector); - stplyr->mo->momx = stplyr->mo->momy = 0; - } - } -#endif - // draw level title Tails if (*mapheaderinfo[gamemap-1]->lvlttl != '\0' && !(hu_showscores && (netgame || multiplayer)) #ifdef HAVE_BLUA From 1ed54078215a2ab5b0618de25bee6007bf4c0c76 Mon Sep 17 00:00:00 2001 From: wolfy852 Date: Sat, 7 Nov 2015 13:56:21 -0600 Subject: [PATCH 23/27] update stuff --- src/console.c | 15 +- src/d_main.c | 8 +- src/dehacked.c | 40 +-- src/doomdef.h | 40 +-- src/hardware/hw_defs.h | 5 +- src/m_menu.c | 3 +- src/r_draw.c | 570 +++++++++++++++++++---------------------- src/r_draw8.c | 3 +- 8 files changed, 329 insertions(+), 355 deletions(-) diff --git a/src/console.c b/src/console.c index 1c8640396..fe447b10a 100644 --- a/src/console.c +++ b/src/console.c @@ -249,7 +249,7 @@ void CON_ReSetupBackColormap(UINT16 num) j = pal[i] + pal[i+1] + pal[i+2]; cwhitemap[k] = (UINT8)(15 - (j>>6)); corangemap[k] = (UINT8)(63 - (j>>6)); - cbluemap[k] = (UINT8)(143 - (j>>6)); + cbluemap[k] = (UINT8)(159 - (j>>6)); cgreenmap[k] = (UINT8)(111 - (j>>6)); cgraymap[k] = (UINT8)(31 - (j>>6)); credmap[k] = (UINT8)(47 - (j>>6)); @@ -284,7 +284,7 @@ static void CON_SetupBackColormap(void) j = pal[i] + pal[i+1] + pal[i+2]; cwhitemap[k] = (UINT8)(15 - (j>>6)); corangemap[k] = (UINT8)(63 - (j>>6)); - cbluemap[k] = (UINT8)(143 - (j>>6)); + cbluemap[k] = (UINT8)(159 - (j>>6)); cgreenmap[k] = (UINT8)(111 - (j>>6)); cgraymap[k] = (UINT8)(31 - (j>>6)); credmap[k] = (UINT8)(47 - (j>>6)); @@ -308,15 +308,15 @@ static void CON_SetupBackColormap(void) yellowmap[3] = (UINT8)73; yellowmap[9] = (UINT8)66; - purplemap[3] = (UINT8)168; - purplemap[9] = (UINT8)170; + purplemap[3] = (UINT8)184; + purplemap[9] = (UINT8)186; lgreenmap[3] = (UINT8)102; lgreenmap[9] = (UINT8)106; - bluemap[3] = (UINT8)131; - bluemap[9] = (UINT8)142; + bluemap[3] = (UINT8)147; + bluemap[9] = (UINT8)158; graymap[3] = (UINT8)10; graymap[9] = (UINT8)15; - redmap[3] = (UINT8)194; + redmap[3] = (UINT8)210; redmap[9] = (UINT8)32; orangemap[3] = (UINT8)52; orangemap[9] = (UINT8)57; @@ -1472,3 +1472,4 @@ void CON_Drawer(void) else if (gamestate == GS_LEVEL || gamestate == GS_INTERMISSION || gamestate == GS_CUTSCENE || gamestate == GS_CREDITS) CON_DrawHudlines(); } + diff --git a/src/d_main.c b/src/d_main.c index a959a8632..709cbea7b 100644 --- a/src/d_main.c +++ b/src/d_main.c @@ -1121,10 +1121,10 @@ void D_SRB2Main(void) #if 1 // md5s last updated 12/14/14 // Check MD5s of autoloaded files - W_VerifyFileMD5(0, ASSET_HASH_SRB2_SRB); // srb2.srb/srb2.wad - W_VerifyFileMD5(1, ASSET_HASH_ZONES_DTA); // zones.dta - W_VerifyFileMD5(2, ASSET_HASH_PLAYER_DTA); // player.dta - W_VerifyFileMD5(3, ASSET_HASH_RINGS_DTA); // rings.dta + //W_VerifyFileMD5(0, ASSET_HASH_SRB2_SRB); // srb2.srb/srb2.wad + //W_VerifyFileMD5(1, ASSET_HASH_ZONES_DTA); // zones.dta + //W_VerifyFileMD5(2, ASSET_HASH_PLAYER_DTA); // player.dta + //W_VerifyFileMD5(3, ASSET_HASH_RINGS_DTA); // rings.dta //W_VerifyFileMD5(4, "0c66790502e648bfce90fdc5bb15722e"); // patch.dta // don't check music.dta because people like to modify it, and it doesn't matter if they do // ...except it does if they slip maps in there, and that's what W_VerifyNMUSlumps is for. diff --git a/src/dehacked.c b/src/dehacked.c index 760ae84b3..b22f7b867 100644 --- a/src/dehacked.c +++ b/src/dehacked.c @@ -7309,30 +7309,31 @@ static const char *COLOR_ENUMS[] = { "SILVER", // SKINCOLOR_SILVER "GREY", // SKINCOLOR_GREY "BLACK", // SKINCOLOR_BLACK - "CYAN", // SKINCOLOR_CYAN - "AQUA", // SKINCOLOR_AQUA - "TEAL", // SKINCOLOR_TEAL - "AZURE", // SKINCOLOR_AZURE - "BLUE", // SKINCOLOR_BLUE - "PEACH", // SKINCOLOR_PEACH - "TAN", // SKINCOLOR_TAN - "PINK", // SKINCOLOR_PINK - "ROSY", // SKINCOLOR_ROSY - "LAVENDER", // SKINCOLOR_LAVENDER - "PURPLE", // SKINCOLOR_PURPLE - "MAGENTA", // SKINCOLOR_MAGENTA - "ORANGE", // SKINCOLOR_ORANGE - "RUST", // SKINCOLOR_RUST "BEIGE", // SKINCOLOR_BEIGE + "PEACH", // SKINCOLOR_PEACH "BROWN", // SKINCOLOR_BROWN "RED", // SKINCOLOR_RED "CRIMSON", // SKINCOLOR_CRIMSON - "EMERALD", // SKINCOLOR_EMERALD - "GREEN", // SKINCOLOR_GREEN - "ZIM", // SKINCOLOR_ZIM - "PERIDOT", // SKINCOLOR_PERIDOT + "ORANGE", // SKINCOLOR_ORANGE + "RUST", // SKINCOLOR_RUST + "GOLD", // SKINCOLOR_GOLD "YELLOW", // SKINCOLOR_YELLOW - "GOLD" // SKINCOLOR_GOLD + "TAN", // SKINCOLOR_TAN + "MOSS", // SKINCOLOR_MOSS + "PERIDOT", // SKINCOLOR_PERIDOT + "GREEN", // SKINCOLOR_GREEN + "EMERALD", // SKINCOLOR_EMERALD + "AQUA", // SKINCOLOR_AQUA + "TEAL", // SKINCOLOR_TEAL + "CYAN", // SKINCOLOR_CYAN + "BLUE", // SKINCOLOR_BLUE + "AZURE", // SKINCOLOR_AZURE + "PASTEL", // SKINCOLOR_PASTEL + "PURPLE", // SKINCOLOR_PURPLE + "LAVENDER", // SKINCOLOR_LAVENDER + "MAGENTA", // SKINCOLOR_MAGENTA + "PINK", // SKINCOLOR_PINK + "ROSY" // SKINCOLOR_ROSY }; static const char *const POWERS_LIST[] = { @@ -8769,3 +8770,4 @@ void LUA_SetActionByName(void *state, const char *actiontocompare) } #endif // HAVE_BLUA + diff --git a/src/doomdef.h b/src/doomdef.h index d6af0f1a0..88fc206a2 100644 --- a/src/doomdef.h +++ b/src/doomdef.h @@ -230,30 +230,31 @@ typedef enum SKINCOLOR_SILVER, SKINCOLOR_GREY, SKINCOLOR_BLACK, - SKINCOLOR_CYAN, - SKINCOLOR_AQUA, - SKINCOLOR_TEAL, - SKINCOLOR_AZURE, - SKINCOLOR_BLUE, - SKINCOLOR_PEACH, - SKINCOLOR_TAN, - SKINCOLOR_PINK, - SKINCOLOR_ROSY, - SKINCOLOR_LAVENDER, - SKINCOLOR_PURPLE, - SKINCOLOR_MAGENTA, - SKINCOLOR_ORANGE, - SKINCOLOR_RUST, SKINCOLOR_BEIGE, + SKINCOLOR_PEACH, SKINCOLOR_BROWN, SKINCOLOR_RED, SKINCOLOR_CRIMSON, - SKINCOLOR_EMERALD, - SKINCOLOR_GREEN, - SKINCOLOR_ZIM, - SKINCOLOR_PERIDOT, - SKINCOLOR_YELLOW, + SKINCOLOR_ORANGE, + SKINCOLOR_RUST, SKINCOLOR_GOLD, + SKINCOLOR_YELLOW, + SKINCOLOR_TAN, + SKINCOLOR_MOSS, + SKINCOLOR_PERIDOT, + SKINCOLOR_GREEN, + SKINCOLOR_EMERALD, + SKINCOLOR_AQUA, + SKINCOLOR_TEAL, + SKINCOLOR_CYAN, + SKINCOLOR_BLUE, + SKINCOLOR_AZURE, + SKINCOLOR_PASTEL, + SKINCOLOR_PURPLE, + SKINCOLOR_LAVENDER, + SKINCOLOR_MAGENTA, + SKINCOLOR_PINK, + SKINCOLOR_ROSY, // Careful! MAXSKINCOLORS cannot be greater than 0x20! MAXSKINCOLORS, @@ -498,3 +499,4 @@ extern const char *compdate, *comptime, *comprevision; //#define REDSANALOG #endif // __DOOMDEF__ + diff --git a/src/hardware/hw_defs.h b/src/hardware/hw_defs.h index 70d776d9e..5a39fead1 100644 --- a/src/hardware/hw_defs.h +++ b/src/hardware/hw_defs.h @@ -46,8 +46,8 @@ typedef unsigned char FBOOLEAN; #define HWR_PATCHES_CHROMAKEY_COLORINDEX 0 #define HWR_CHROMAKEY_EQUIVALENTCOLORINDEX 1 #else -#define HWR_PATCHES_CHROMAKEY_COLORINDEX 247 -#define HWR_CHROMAKEY_EQUIVALENTCOLORINDEX 220 +#define HWR_PATCHES_CHROMAKEY_COLORINDEX 255 +#define HWR_CHROMAKEY_EQUIVALENTCOLORINDEX 130 #endif // the chroma key color shows on border sprites, set it to black @@ -229,3 +229,4 @@ enum hwdfiltermode #endif //_HWR_DEFS_ + diff --git a/src/m_menu.c b/src/m_menu.c index 111be9479..f115e9d44 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -2820,7 +2820,7 @@ static void M_DrawSlider(INT32 x, INT32 y, const consvar_t *cv) void M_DrawTextBox(INT32 x, INT32 y, INT32 width, INT32 boxlines) { // Solid color textbox. - V_DrawFill(x+5, y+5, width*8+6, boxlines*8+6, 143); + V_DrawFill(x+5, y+5, width*8+6, boxlines*8+6, 159); //V_DrawFill(x+8, y+8, width*8, boxlines*8, 31); /* patch_t *p; @@ -7409,3 +7409,4 @@ static void M_HandleFogColor(INT32 choice) } } #endif + diff --git a/src/r_draw.c b/src/r_draw.c index 81bcc9438..420b96c1d 100644 --- a/src/r_draw.c +++ b/src/r_draw.c @@ -131,68 +131,70 @@ static UINT8** translationtablecache[MAXSKINS + 4] = {NULL}; // TODO Callum: Can this be translated? const char *Color_Names[MAXSKINCOLORS] = { - "None", // SKINCOLOR_NONE - "White", // SKINCOLOR_WHITE - "Silver", // SKINCOLOR_SILVER - "Grey", // SKINCOLOR_GREY - "Black", // SKINCOLOR_BLACK - "Cyan", // SKINCOLOR_CYAN - "Aqua", // SKINCOLOR_AQUAMARINE - "Teal", // SKINCOLOR_TEAL - "Azure", // SKINCOLOR_AZURE - "Blue", // SKINCOLOR_BLUE - "Peach", // SKINCOLOR_PEACH - "Tan", // SKINCOLOR_TAN - "Pink", // SKINCOLOR_PINK - "Rosy", // SKINCOLOR_ROSY - "Lavender", // SKINCOLOR_LAVENDER - "Purple", // SKINCOLOR_PURPLE - "Magenta", // SKINCOLOR_MAGENTA - "Orange", // SKINCOLOR_ORANGE - "Rust", // SKINCOLOR_RUST - "Beige", // SKINCOLOR_BEIGE - "Brown", // SKINCOLOR_BROWN - "Red", // SKINCOLOR_RED - "Crimson", // SKINCOLOR_CRIMSON - "Emerald", // SKINCOLOR_EMERALD - "Green", // SKINCOLOR_GREEN - "Zim", // SKINCOLOR_ZIM - "Peridot", // SKINCOLOR_PERIDOT - "Yellow", // SKINCOLOR_YELLOW - "Gold" // SKINCOLOR_GOLD + "None", // SKINCOLOR_NONE + "White", // SKINCOLOR_WHITE + "Silver", // SKINCOLOR_SILVER + "Grey", // SKINCOLOR_GREY + "Black", // SKINCOLOR_BLACK + "Beige", // SKINCOLOR_BEIGE + "Peach", // SKINCOLOR_PEACH + "Brown", // SKINCOLOR_BROWN + "Red", // SKINCOLOR_RED + "Crimson", // SKINCOLOR_CRIMSON + "Orange", // SKINCOLOR_ORANGE + "Rust", // SKINCOLOR_RUST + "Gold", // SKINCOLOR_GOLD + "Yellow", // SKINCOLOR_YELLOW + "Tan", // SKINCOLOR_TAN + "Moss", // SKINCOLOR_MOSS + "Peridot", // SKINCOLOR_PERIDOT + "Green", // SKINCOLOR_GREEN + "Emerald", // SKINCOLOR_EMERALD + "Aqua", // SKINCOLOR_AQUA + "Teal", // SKINCOLOR_TEAL + "Cyan", // SKINCOLOR_CYAN + "Blue", // SKINCOLOR_BLUE + "Azure", // SKINCOLOR_AZURE + "Pastel", // SKINCOLOR_PASTEL + "Purple", // SKINCOLOR_PURPLE + "Lavender", // SKINCOLOR_LAVENDER + "Magenta", // SKINCOLOR_MAGENTA + "Pink", // SKINCOLOR_PINK + "Rosy" // SKINCOLOR_ROSY }; const UINT8 Color_Opposite[MAXSKINCOLORS*2] = { - SKINCOLOR_NONE,8, // SKINCOLOR_NONE - SKINCOLOR_BLACK,10, // SKINCOLOR_WHITE - SKINCOLOR_GREY,4, // SKINCOLOR_SILVER - SKINCOLOR_SILVER,12,// SKINCOLOR_GREY - SKINCOLOR_WHITE,8, // SKINCOLOR_BLACK - SKINCOLOR_NONE,8, // SKINCOLOR_CYAN - SKINCOLOR_NONE,8, // SKINCOLOR_AQUA - SKINCOLOR_NONE,8, // SKINCOLOR_TEAL - SKINCOLOR_NONE,8, // SKINCOLOR_AZURE - SKINCOLOR_ORANGE,9, // SKINCOLOR_BLUE - SKINCOLOR_NONE,8, // SKINCOLOR_PEACH - SKINCOLOR_NONE,8, // SKINCOLOR_TAN - SKINCOLOR_NONE,8, // SKINCOLOR_PINK - SKINCOLOR_NONE,8, // SKINCOLOR_ROSY - SKINCOLOR_NONE,8, // SKINCOLOR_LAVENDER - SKINCOLOR_NONE,8, // SKINCOLOR_PURPLE - SKINCOLOR_NONE,8, // SKINCOLOR_MAGENTA - SKINCOLOR_BLUE,12, // SKINCOLOR_ORANGE - SKINCOLOR_NONE,8, // SKINCOLOR_RUST - SKINCOLOR_NONE,8, // SKINCOLOR_BEIGE - SKINCOLOR_NONE,8, // SKINCOLOR_BROWN - SKINCOLOR_GREEN,5, // SKINCOLOR_RED - SKINCOLOR_NONE,8, // SKINCOLOR_CRIMSON - SKINCOLOR_NONE,8, // SKINCOLOR_EMERALD - SKINCOLOR_RED,11, // SKINCOLOR_GREEN - SKINCOLOR_MAGENTA,3, // SKINCOLOR_ZIM - SKINCOLOR_NONE,8, // SKINCOLOR_PERIDOT - SKINCOLOR_NONE,8, // SKINCOLOR_YELLOW - SKINCOLOR_NONE,8 // SKINCOLOR_GOLD + SKINCOLOR_NONE,8, // SKINCOLOR_NONE + SKINCOLOR_BLACK,10, // SKINCOLOR_WHITE + SKINCOLOR_GREY,4, // SKINCOLOR_SILVER + SKINCOLOR_SILVER,12, // SKINCOLOR_GREY + SKINCOLOR_WHITE,8, // SKINCOLOR_BLACK + SKINCOLOR_BEIGE,8, // SKINCOLOR_BEIGE - needs new offset + SKINCOLOR_BROWN,8, // SKINCOLOR_PEACH - ditto + SKINCOLOR_PEACH,8, // SKINCOLOR_BROWN - ditto + SKINCOLOR_GREEN,5, // SKINCOLOR_RED + SKINCOLOR_CYAN,8, // SKINCOLOR_CRIMSON - ditto + SKINCOLOR_BLUE,12, // SKINCOLOR_ORANGE + SKINCOLOR_TAN,8, // SKINCOLOR_RUST - ditto + SKINCOLOR_LAVENDER,8, // SKINCOLOR_GOLD - ditto + SKINCOLOR_TEAL,8, // SKINCOLOR_YELLOW - ditto + SKINCOLOR_RUST,8, // SKINCOLOR_TAN - ditto + SKINCOLOR_MAGENTA,3, // SKINCOLOR_MOSS + SKINCOLOR_PURPLE,8, // SKINCOLOR_PERIDOT - ditto + SKINCOLOR_RED,11, // SKINCOLOR_GREEN + SKINCOLOR_PASTEL,8, // SKINCOLOR_EMERALD - ditto + SKINCOLOR_ROSY,8, // SKINCOLOR_AQUA - ditto + SKINCOLOR_YELLOW,8, // SKINCOLOR_TEAL - ditto + SKINCOLOR_CRIMSON,8, // SKINCOLOR_CYAN - ditto + SKINCOLOR_ORANGE,9, // SKINCOLOR_BLUE + SKINCOLOR_PINK,8, // SKINCOLOR_AZURE - ditto + SKINCOLOR_EMERALD,8, // SKINCOLOR_PASTEL - ditto + SKINCOLOR_PERIDOT,8, // SKINCOLOR_PURPLE - ditto + SKINCOLOR_GOLD,8, // SKINCOLOR_LAVENDER - ditto + SKINCOLOR_MOSS,8, // SKINCOLOR_MAGENTA - ditto + SKINCOLOR_AZURE,8, // SKINCOLOR_PINK - ditto + SKINCOLOR_AQUA,8 // SKINCOLOR_ROSY - ditto }; CV_PossibleValue_t Color_cons_t[MAXSKINCOLORS+1]; @@ -242,30 +244,31 @@ static void R_GenerateTranslationColormap(UINT8 *dest_colormap, INT32 skinnum, U 0x03, // SKINCOLOR_SILVER 0x08, // SKINCOLOR_GREY 0x18, // SKINCOLOR_BLACK - 0x70, // SKINCOLOR_CYAN - 0xf8, // SKINCOLOR_AQUA - 0x7c, // SKINCOLOR_TEAL - 0x9a, // SKINCOLOR_AZURE - 0x82, // SKINCOLOR_BLUE - 0xc8, // SKINCOLOR_PEACH - 0x54, // SKINCOLOR_TAN - 0xc0, // SKINCOLOR_PINK - 0xb8, // SKINCOLOR_ROSY - 0xb0, // SKINCOLOR_LAVENDER - 0x90, // SKINCOLOR_PURPLE - 0xa3, // SKINCOLOR_MAGENTA - 0x31, // SKINCOLOR_ORANGE - 0x3a, // SKINCOLOR_RUST - 0xe0, // SKINCOLOR_BEIGE - 0xd0, // SKINCOLOR_BROWN + 0xf0, // SKINCOLOR_BEIGE + 0xd8, // SKINCOLOR_PEACH + 0xe0, // SKINCOLOR_BROWN 0x21, // SKINCOLOR_RED 0x28, // SKINCOLOR_CRIMSON - 0xf0, // SKINCOLOR_EMERALD - 0x60, // SKINCOLOR_GREEN - 0x58, // SKINCOLOR_ZIM - 0xac, // SKINCOLOR_PERIDOT - 0x48, // SKINCOLOR_YELLOW + 0x31, // SKINCOLOR_ORANGE + 0x3a, // SKINCOLOR_RUST 0x40, // SKINCOLOR_GOLD + 0x48, // SKINCOLOR_YELLOW + 0x54, // SKINCOLOR_TAN + 0x58, // SKINCOLOR_MOSS + 0xbc, // SKINCOLOR_PERIDOT + 0x60, // SKINCOLOR_GREEN + 0x70, // SKINCOLOR_EMERALD + 0x78, // SKINCOLOR_AQUA + 0x8c, // SKINCOLOR_TEAL + 0x80, // SKINCOLOR_CYAN + 0x92, // SKINCOLOR_BLUE + 0xaa, // SKINCOLOR_AZURE + 0xa0, // SKINCOLOR_PASTEL + 0xa0, // SKINCOLOR_PURPLE + 0xc0, // SKINCOLOR_LAVENDER + 0xb3, // SKINCOLOR_MAGENTA + 0xd0, // SKINCOLOR_PINK + 0xc8, // SKINCOLOR_ROSY }; INT32 i; INT32 starttranscolor; @@ -283,7 +286,7 @@ static void R_GenerateTranslationColormap(UINT8 *dest_colormap, INT32 skinnum, U if (skinnum == TC_BOSS) dest_colormap[31] = 0; else if (skinnum == TC_METALSONIC) - dest_colormap[143] = 0; + dest_colormap[159] = 0; return; } @@ -309,176 +312,59 @@ static void R_GenerateTranslationColormap(UINT8 *dest_colormap, INT32 skinnum, U dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + i); break; + case SKINCOLOR_WHITE: case SKINCOLOR_CYAN: // 12 color ramp for (i = 0; i < SKIN_RAMP_LENGTH; i++) dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (12*i/SKIN_RAMP_LENGTH)); break; - case SKINCOLOR_MAGENTA: - // 9 color ramp - for (i = 0; i < SKIN_RAMP_LENGTH; i++) - dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (9*i/SKIN_RAMP_LENGTH)); - break; - - case SKINCOLOR_WHITE: case SKINCOLOR_BLACK: - case SKINCOLOR_PINK: + case SKINCOLOR_MOSS: + case SKINCOLOR_EMERALD: case SKINCOLOR_LAVENDER: - case SKINCOLOR_ZIM: + case SKINCOLOR_PINK: // 8 color ramp for (i = 0; i < SKIN_RAMP_LENGTH; i++) dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (i >> 1)); break; - case SKINCOLOR_AQUA: - // 10 colors - for (i = 0; i < SKIN_RAMP_LENGTH; i++) - { - if (10*i/16 >= 8) - dest_colormap[starttranscolor + i] = (UINT8)(0x6C + (10*i/SKIN_RAMP_LENGTH) - 8); // Darkest - else - dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (10*i/SKIN_RAMP_LENGTH)); - } - break; - - case SKINCOLOR_TEAL: - // 6 colors - for (i = 0; i < SKIN_RAMP_LENGTH; i++) - { - if (6*i/16 == 0) - dest_colormap[starttranscolor + i] = 0xf8; // Lightest - else if (6*i/16 == 5) - dest_colormap[starttranscolor + i] = 0x7a; // Darkest - else - dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (6*i/SKIN_RAMP_LENGTH) - 1); - } - break; - - case SKINCOLOR_AZURE: - // 8 colors - for (i = 0; i < SKIN_RAMP_LENGTH; i++) - { - if (8*i/16 <= 1) - dest_colormap[starttranscolor + i] = (UINT8)(0x80 + 8*i/16); // Lightest - else - dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (8*i/SKIN_RAMP_LENGTH) - 2); // main - } - break; - - case SKINCOLOR_BLUE: - for (i = 0; i < SKIN_RAMP_LENGTH; i++) - { - if (i == 14) - dest_colormap[starttranscolor + i] = 0xED; - else if (i == 15) - dest_colormap[starttranscolor + i] = 0x1F; - else - dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + i); - } - break; - - case SKINCOLOR_PEACH: - // 10 colors - for (i = 0; i < SKIN_RAMP_LENGTH; i++) - { - if (10*i/16 == 0) - dest_colormap[starttranscolor + i] = 0xC0; // Lightest - else if (10*i/16 == 1) - dest_colormap[starttranscolor + i] = 0x30; // Second - else - dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (10*i/SKIN_RAMP_LENGTH) - 2); // main - } - break; - - case SKINCOLOR_TAN: - // 8 colors - for (i = 0; i < SKIN_RAMP_LENGTH; i++) - { - if (8*i/16 == 0) - dest_colormap[starttranscolor + i] = 0x51; // Lightest 1 - else if (8*i/16 == 5) - dest_colormap[starttranscolor + i] = 0xE5; // Darkest 1 - else if (8*i/16 == 6) - dest_colormap[starttranscolor + i] = 0xE9; // Darkest 2 - else if (8*i/16 == 7) - dest_colormap[starttranscolor + i] = 0xDD; // Darkest 3 - else - dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (8*i/SKIN_RAMP_LENGTH) - 1); // main - } - break; - - case SKINCOLOR_ROSY: - // 15 colors - for (i = 0; i < SKIN_RAMP_LENGTH; i++) - { - if (15*i/16 == 0) - dest_colormap[starttranscolor + i] = 0xEC; // Lightest - else if (15*i/16 == 12) - dest_colormap[starttranscolor + i] = 0x47; // Dark Shade - else if (15*i/16 >= 13) - dest_colormap[starttranscolor + i] = (UINT8)(0x2E + (15*i/SKIN_RAMP_LENGTH) - 13); // Darkest - else if (15*i/16 >= 9) - dest_colormap[starttranscolor + i] = (UINT8)(0x2B + (15*i/SKIN_RAMP_LENGTH) - 9); // Darkish - else - dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (15*i/SKIN_RAMP_LENGTH) - 1); // main - } - break; - - case SKINCOLOR_PURPLE: - // 10 colors - for (i = 0; i < SKIN_RAMP_LENGTH; i++) - { - if (i <= 3) - dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + i); // Lightest - else - dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (8*i/SKIN_RAMP_LENGTH) + 2); // main - } - break; - - case SKINCOLOR_ORANGE: - for (i = 0; i < SKIN_RAMP_LENGTH; i++) - { - if (i == 15) - dest_colormap[starttranscolor + i] = 0xEE; - else - dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + i); - } - break; - - case SKINCOLOR_RUST: - // 9 colors - for (i = 0; i < SKIN_RAMP_LENGTH; i++) - { - if (9*i/16 == 6) - dest_colormap[starttranscolor + i] = 0xEE; - else if (9*i/16 == 7) - dest_colormap[starttranscolor + i] = 0xEF; - else if (9*i/16 == 8) - dest_colormap[starttranscolor + i] = 0x47; - else - dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (9*i/SKIN_RAMP_LENGTH)); - } - break; - case SKINCOLOR_BEIGE: // 13 colors for (i = 0; i < SKIN_RAMP_LENGTH; i++) { - if (13*i/16 == 12) - dest_colormap[starttranscolor + i] = 0xDD; // darkest + if (i == 15) + dest_colormap[starttranscolor + i] = 0xed; // Darkest + else if (i <= 6) + dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + ((i + 1) >> 1)); // Brightest else - dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (13*i/SKIN_RAMP_LENGTH)); // Neon green + dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + i - 3); } break; - + + case SKINCOLOR_PEACH: + // 11 colors + for (i = 0; i < SKIN_RAMP_LENGTH; i++) + { + if (i == 0) + dest_colormap[starttranscolor + i] = 0xD0; // Lightest 1 + else if (i == 1) + dest_colormap[starttranscolor + i] = 0x30; // Lightest 2 + else if (i <= 11) + dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (i >> 1) - 1); + else + dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + i - 7); // Darkest + } + break; + case SKINCOLOR_RED: + // 16 colors for (i = 0; i < SKIN_RAMP_LENGTH; i++) { if (i == 13) - dest_colormap[starttranscolor + i] = 0x47; + dest_colormap[starttranscolor + i] = 0x47; // Semidark else if (i > 13) - dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + i - 1); + dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + i - 1); // Darkest else dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + i); } @@ -488,38 +374,52 @@ static void R_GenerateTranslationColormap(UINT8 *dest_colormap, INT32 skinnum, U // 9 colors for (i = 0; i < SKIN_RAMP_LENGTH; i++) { - if (9*i/16 == 6) - dest_colormap[starttranscolor + i] = 0x47; - else if (9*i/16 > 6) - dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (9*i/SKIN_RAMP_LENGTH) - 1); + if (i/2 == 6) + dest_colormap[starttranscolor + i] = 0x47; // Semidark + else if (i/2 == 7) + dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + i - 8); // Darkest else - dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (9*i/SKIN_RAMP_LENGTH)); + dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (i >> 1)); } break; - case SKINCOLOR_EMERALD: - // 8 colors + case SKINCOLOR_ORANGE: for (i = 0; i < SKIN_RAMP_LENGTH; i++) { - if (8*i/16 == 7) - dest_colormap[starttranscolor + i] = 0x6E; // Darkest + if (i == 15) + dest_colormap[starttranscolor + i] = 0x2c; // Darkest else - dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (8*i/SKIN_RAMP_LENGTH)); // Neon green + dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + i); } break; - case SKINCOLOR_PERIDOT: - // 8 colors + case SKINCOLOR_RUST: + // 10 colors for (i = 0; i < SKIN_RAMP_LENGTH; i++) { - if (8*i/16 == 0) - dest_colormap[starttranscolor + i] = 0x58; // Lightest - else if (8*i/16 == 7) - dest_colormap[starttranscolor + i] = 0x6D; // Darkest - else if (8*i/16 >= 5) - dest_colormap[starttranscolor + i] = (UINT8)(0x5E + (8*i/SKIN_RAMP_LENGTH) - 5); // Darkish + if (i <= 11) + dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (i >> 1)); + else if (i == 12) + dest_colormap[starttranscolor + i] = 0x2c; // Darkest 4 + else if (i == 13) + dest_colormap[starttranscolor + i] = 0xfe; // Darkest 3 else - dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (8*i/SKIN_RAMP_LENGTH) - 1); // main + dest_colormap[starttranscolor + i] = 0x2d + i - 14; // Darkest 2 and 1 + } + break; + + case SKINCOLOR_GOLD: + // 10 colors + for (i = 0; i < SKIN_RAMP_LENGTH; i++) + { + if (i == 0) + dest_colormap[starttranscolor + i] = 0x50; // Lightest 1 + else if (i == 1) + dest_colormap[starttranscolor + i] = 0x53; // Lightest 2 + else if (i/2 == 7) + dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + i - 8); //Darkest + else + dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (i >> 1) - 1); } break; @@ -530,22 +430,135 @@ static void R_GenerateTranslationColormap(UINT8 *dest_colormap, INT32 skinnum, U if (i == 0) dest_colormap[starttranscolor + i] = 0x53; // Lightest else if (i == 15) - dest_colormap[starttranscolor + i] = 0xDD; // Darkest + dest_colormap[starttranscolor + i] = 0xed; // Darkest else - dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (8*i/SKIN_RAMP_LENGTH)); + dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (i >> 1)); } break; - case SKINCOLOR_GOLD: + case SKINCOLOR_TAN: + // 8 colors + for (i = 0; i < SKIN_RAMP_LENGTH; i++) + { + if (i/2 == 0) + dest_colormap[starttranscolor + i] = 0x51; // Lightest + else if (i/2 == 5) + dest_colormap[starttranscolor + i] = 0xf5; // Darkest 1 + else if (i/2 == 6) + dest_colormap[starttranscolor + i] = 0xf9; // Darkest 2 + else if (i/2 == 7) + dest_colormap[starttranscolor + i] = 0xed; // Darkest 3 + else + dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (i >> 1) - 1); + } + break; + + case SKINCOLOR_PERIDOT: + // 8 colors + for (i = 0; i < SKIN_RAMP_LENGTH; i++) + { + if (i/2 == 0) + dest_colormap[starttranscolor + i] = 0x58; // Lightest + else if (i/2 == 7) + dest_colormap[starttranscolor + i] = 0x77; // Darkest + else if (i/2 >= 5) + dest_colormap[starttranscolor + i] = (UINT8)(0x5e + (i >> 1) - 5); // Semidark + else + dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (i >> 1) - 1); + } + break; + + case SKINCOLOR_AQUA: // 10 colors for (i = 0; i < SKIN_RAMP_LENGTH; i++) { - if (10*i/16 == 0) - dest_colormap[starttranscolor + i] = 0x50; // Lightest - else if (10*i/16 == 1) - dest_colormap[starttranscolor + i] = 0x53; // Second + if (i == 0) + dest_colormap[starttranscolor + i] = 0x78; // Lightest + else if (i >= 14) + dest_colormap[starttranscolor + i] = (UINT8)(0x76 + i - 14); // Darkest else - dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (10*i/SKIN_RAMP_LENGTH) - 2); // main + dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (i >> 1) + 1); + } + break; + + case SKINCOLOR_TEAL: + // 6 colors + for (i = 0; i < SKIN_RAMP_LENGTH; i++) + { + if (i <= 1) + dest_colormap[starttranscolor + i] = 0x78; // Lightest + else if (i >= 13) + dest_colormap[starttranscolor + i] = 0x8a; // Darkest + else + dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + ((i - 1)/3)); + } + break; + + case SKINCOLOR_AZURE: + // 8 colors + for (i = 0; i < SKIN_RAMP_LENGTH; i++) + { + if (i <= 3) + dest_colormap[starttranscolor + i] = (UINT8)(0x90 + i/2); // Lightest + else + dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (i >> 1) - 2); + } + break; + + case SKINCOLOR_BLUE: + // 16 colors + for (i = 0; i < SKIN_RAMP_LENGTH; i++) + { + if (i == 15) + dest_colormap[starttranscolor + i] = 0x1F; //Darkest 1 + else if (i == 14) + dest_colormap[starttranscolor + i] = 0xfd; //Darkest 2 + else + dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + i); + } + break; + + case SKINCOLOR_PASTEL: + // 10 colors + for (i = 0; i < SKIN_RAMP_LENGTH; i++) + { + if (i >= 12) + dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + i - 7); // Darkest + else if (i <= 1) + dest_colormap[starttranscolor + i] = 0x90; // Lightest + else + dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (i >> 1) - 1); + } + break; + + case SKINCOLOR_PURPLE: + // 10 colors + for (i = 0; i < SKIN_RAMP_LENGTH; i++) + { + if (i <= 3) + dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + i); // Lightest + else + dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (i >> 1) + 2); + } + break; + + case SKINCOLOR_MAGENTA: + // 9 colors + for (i = 0; i < SKIN_RAMP_LENGTH; i++) + if (i == 0) + dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1]); // Lightest + else + dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (i >> 1) + 1); + break; + + case SKINCOLOR_ROSY: + // 9 colors + for (i = 0; i < SKIN_RAMP_LENGTH; i++) + { + if (i == 0) + dest_colormap[starttranscolor + i] = 0xfc; // Lightest + else + dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + ((i - 1) >> 1)); } break; @@ -612,67 +625,19 @@ static void R_GenerateTranslationColormap(UINT8 *dest_colormap, INT32 skinnum, U dest_colormap[starttranscolor + 15] = (UINT8)63; break; - // Super Tails + // Super Tails and Knuckles, who really should be dummied out by now case SKINCOLOR_TSUPER1: - for (i = 0; i < 10; i++) // white - dest_colormap[starttranscolor + i] = 120; - for (; i < SKIN_RAMP_LENGTH; i++) // orange - dest_colormap[starttranscolor + i] = (UINT8)(80 + (i-10)); - break; - case SKINCOLOR_TSUPER2: - for (i = 0; i < 4; i++) // white - dest_colormap[starttranscolor + i] = 120; - for (; i < SKIN_RAMP_LENGTH; i++) // orange - dest_colormap[starttranscolor + i] = (UINT8)(80 + ((i-4)>>1)); - break; - case SKINCOLOR_TSUPER3: - dest_colormap[starttranscolor] = 120; // pure white - dest_colormap[starttranscolor+1] = 120; - for (i = 2; i < SKIN_RAMP_LENGTH; i++) // orange - dest_colormap[starttranscolor + i] = (UINT8)(80 + ((i-2)>>1)); - break; - case SKINCOLOR_TSUPER4: - dest_colormap[starttranscolor] = 120; // pure white - for (i = 1; i < 9; i++) // orange - dest_colormap[starttranscolor + i] = (UINT8)(80 + (i-1)); - for (; i < SKIN_RAMP_LENGTH; i++) // gold - dest_colormap[starttranscolor + i] = (UINT8)(115 + (5*(i-9)/7)); - break; - case SKINCOLOR_TSUPER5: - for (i = 0; i < 8; i++) // orange - dest_colormap[starttranscolor + i] = (UINT8)(80 + i); - for (; i < SKIN_RAMP_LENGTH; i++) // gold - dest_colormap[starttranscolor + i] = (UINT8)(115 + (5*(i-8)/8)); - break; - - // Super Knuckles case SKINCOLOR_KSUPER1: - for (i = 0; i < SKIN_RAMP_LENGTH; i++) - dest_colormap[starttranscolor + i] = (UINT8)(120 + (i >> 2)); - break; - case SKINCOLOR_KSUPER2: - for (i = 0; i < SKIN_RAMP_LENGTH; i++) - dest_colormap[starttranscolor + i] = (UINT8)(120 + (6*i/SKIN_RAMP_LENGTH)); - break; - case SKINCOLOR_KSUPER3: - for (i = 0; i < SKIN_RAMP_LENGTH; i++) - dest_colormap[starttranscolor + i] = (UINT8)(120 + (i >> 1)); - break; - case SKINCOLOR_KSUPER4: - for (i = 0; i < SKIN_RAMP_LENGTH; i++) - dest_colormap[starttranscolor + i] = (UINT8)(121 + (i >> 1)); - break; - case SKINCOLOR_KSUPER5: for (i = 0; i < SKIN_RAMP_LENGTH; i++) - dest_colormap[starttranscolor + i] = (UINT8)(122 + (i >> 1)); + dest_colormap[starttranscolor + i] = 0xFF; break; default: @@ -986,3 +951,4 @@ void R_DrawViewBorder(void) // ========================================================================== #include "r_draw16.c" + diff --git a/src/r_draw8.c b/src/r_draw8.c index e0264ba92..d6c109574 100644 --- a/src/r_draw8.c +++ b/src/r_draw8.c @@ -105,7 +105,7 @@ void R_DrawColumn_8(void) } } -#define TRANSPARENTPIXEL 247 +#define TRANSPARENTPIXEL 255 void R_Draw2sMultiPatchColumn_8(void) { @@ -947,3 +947,4 @@ void R_DrawColumnShadowed_8(void) if (dc_yl <= realyh) walldrawerfunc(); // R_DrawWallColumn_8 for the appropriate architecture } + From 5409367a5f56434cf9fe0ada86958a492a29e4db Mon Sep 17 00:00:00 2001 From: wolfy852 Date: Sat, 7 Nov 2015 15:32:11 -0600 Subject: [PATCH 24/27] Define TRANSPARENTPIXEL as 255 in asm files --- src/tmap.nas | 2 +- src/tmap_mmx.nas | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tmap.nas b/src/tmap.nas index 6d1629c20..dbe64806d 100644 --- a/src/tmap.nas +++ b/src/tmap.nas @@ -17,7 +17,7 @@ [BITS 32] %define FRACBITS 16 -%define TRANSPARENTPIXEL 247 +%define TRANSPARENTPIXEL 255 %ifdef LINUX %macro cextern 1 diff --git a/src/tmap_mmx.nas b/src/tmap_mmx.nas index 928916668..758cd4395 100644 --- a/src/tmap_mmx.nas +++ b/src/tmap_mmx.nas @@ -18,7 +18,7 @@ [BITS 32] %define FRACBITS 16 -%define TRANSPARENTPIXEL 247 +%define TRANSPARENTPIXEL 255 %ifdef LINUX %macro cextern 1 From 2b6e65f122b00528eb9fd11222ee6ef2d5ac7795 Mon Sep 17 00:00:00 2001 From: Yukita Mayako Date: Mon, 9 Nov 2015 16:45:35 -0500 Subject: [PATCH 25/27] Added missing comma to COLOR_ENUMS string array after "ROSY". It's not SKINCOLOR_ROSYSUPER1, after all. --- src/dehacked.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dehacked.c b/src/dehacked.c index 6905d8379..d5b808e35 100644 --- a/src/dehacked.c +++ b/src/dehacked.c @@ -7337,7 +7337,7 @@ static const char *COLOR_ENUMS[] = { "LAVENDER", // SKINCOLOR_LAVENDER "MAGENTA", // SKINCOLOR_MAGENTA "PINK", // SKINCOLOR_PINK - "ROSY" // SKINCOLOR_ROSY + "ROSY", // SKINCOLOR_ROSY // Super special awesome Super flashing colors! "SUPER1", // SKINCOLOR_SUPER1 "SUPER2", // SKINCOLOR_SUPER2, From e0e9c7c1720d11ac6e6dd9826d518beaee9d7a86 Mon Sep 17 00:00:00 2001 From: Monster Iestyn Date: Tue, 1 Dec 2015 22:38:57 +0000 Subject: [PATCH 26/27] Added missing SHORT macros around these variables, they're needed for big-endian builds to use these properly ...I'm to blame for this particular slipup as it happens, surprise surprise --- src/p_saveg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/p_saveg.c b/src/p_saveg.c index 07e7b3564..f329ab758 100644 --- a/src/p_saveg.c +++ b/src/p_saveg.c @@ -636,7 +636,7 @@ static void P_NetArchiveWorld(void) if (li->special != SHORT(mld->special)) diff |= LD_SPECIAL; - if (mld->special == 321 || mld->special == 322) // only reason li->callcount would be non-zero is if either of these are involved + if (SHORT(mld->special) == 321 || SHORT(mld->special) == 322) // only reason li->callcount would be non-zero is if either of these are involved diff |= LD_CLLCOUNT; if (li->sidenum[0] != 0xffff) From e18f467885eeb7998cb8973e80f70f30fa5511ea Mon Sep 17 00:00:00 2001 From: Inuyasha Date: Fri, 8 Jan 2016 08:16:16 -0800 Subject: [PATCH 27/27] Further optimization of fading code because I'm crazy The less branches, the better. Optimization is a bitch, you know. --- src/f_wipe.c | 52 +++++++++++++++++++++++++++++++++++----------------- 1 file changed, 35 insertions(+), 17 deletions(-) diff --git a/src/f_wipe.c b/src/f_wipe.c index 8e7c622c4..6f14e577a 100644 --- a/src/f_wipe.c +++ b/src/f_wipe.c @@ -231,34 +231,52 @@ static void F_DoWipe(fademask_t *fademask) maskx = masky = 0; do { - // pointer to transtable that this mask would use - transtbl = transtables + ((9 - *mask)<= fademask->width) ++masky, maskx = 0;