This repository has been archived on 2025-02-27. You can view files and clone it, but cannot push or open issues or pull requests.
CnC_Renegade/Code/Tools/vidinit/defpal.cpp

76 lines
No EOL
4.9 KiB
C++

/*
** Command & Conquer Renegade(tm)
** Copyright 2025 Electronic Arts Inc.
**
** This program is free software: you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation, either version 3 of the License, or
** (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "stdafx.h"
#include <convert.h>
#include <bsurface.h>
// Define a default palette for the product in case one hasn't been loaded
// from disk.
char DefaultPaletteData[768] = {
0, 0, 0, 42, 0, 42, 0, 42, 42, 0, 42, 0, 22, 63, 21, 63,
63, 21, 63, 21, 21, 42, 21, 0, 42, 0, 0, 21, 63, 63, 20, 20,
63, 0, 0, 42, 0, 0, 0, 21, 21, 21, 42, 42, 42, 63, 63, 63,
4, 3, 3, 3, 4, 5, 5, 5, 6, 8, 7, 7, 7, 8, 9, 9,
9, 10, 12, 10, 10, 10, 12, 11, 11, 13, 13, 17, 14, 14, 10, 17,
10, 13, 16, 10, 11, 16, 14, 14, 17, 14, 14, 20, 15, 17, 17, 15,
25, 20, 14, 14, 14, 17, 13, 17, 27, 21, 18, 18, 18, 21, 18, 21,
22, 18, 25, 22, 21, 21, 25, 19, 18, 25, 21, 25, 25, 19, 29, 25,
19, 25, 26, 22, 29, 26, 22, 29, 29, 23, 22, 29, 24, 22, 29, 29,
26, 30, 25, 30, 29, 29, 34, 22, 20, 34, 28, 22, 34, 30, 27, 27,
33, 23, 29, 33, 25, 30, 37, 29, 33, 34, 26, 37, 34, 26, 37, 38,
29, 42, 37, 29, 36, 41, 29, 42, 42, 30, 23, 30, 41, 34, 30, 42,
22, 33, 36, 30, 35, 34, 30, 34, 43, 26, 37, 49, 34, 34, 33, 37,
37, 33, 41, 37, 35, 43, 43, 35, 34, 34, 45, 38, 37, 46, 41, 37,
42, 41, 38, 46, 49, 45, 35, 44, 43, 50, 50, 45, 50, 57, 54, 57,
61, 53, 30, 57, 50, 28, 53, 47, 26, 49, 44, 24, 45, 41, 22, 42,
38, 21, 36, 34, 19, 36, 29, 16, 33, 28, 14, 27, 25, 14, 22, 21,
11, 21, 19, 9, 18, 17, 8, 14, 13, 7, 13, 11, 5, 10, 8, 2,
23, 49, 55, 23, 41, 50, 23, 35, 45, 23, 29, 41, 23, 35, 45, 23,
41, 50, 23, 45, 55, 47, 0, 0, 52, 48, 40, 49, 45, 37, 46, 42,
33, 44, 39, 30, 41, 36, 27, 37, 32, 24, 34, 27, 20, 31, 24, 18,
59, 56, 54, 55, 51, 49, 51, 46, 44, 46, 41, 38, 41, 36, 33, 37,
31, 28, 33, 28, 25, 28, 22, 20, 23, 18, 16, 20, 15, 13, 15, 11,
10, 11, 7, 6, 0, 63, 0, 0, 49, 0, 0, 35, 0, 0, 22, 0,
59, 59, 59, 57, 57, 57, 52, 52, 52, 47, 47, 47, 43, 43, 43, 40,
40, 40, 37, 37, 37, 34, 34, 34, 31, 31, 31, 28, 28, 28, 25, 25,
25, 23, 23, 23, 19, 19, 19, 14, 14, 14, 9, 9, 9, 5, 5, 5,
49, 57, 33, 44, 52, 31, 39, 47, 29, 34, 43, 27, 30, 38, 25, 26,
34, 23, 22, 29, 19, 19, 25, 15, 15, 21, 12, 12, 17, 9, 9, 13,
6, 6, 9, 4, 63, 63, 39, 63, 53, 0, 63, 45, 0, 63, 34, 0,
56, 57, 61, 51, 52, 58, 45, 47, 55, 40, 42, 50, 35, 37, 46, 31,
33, 43, 26, 29, 40, 22, 26, 37, 17, 21, 34, 14, 18, 31, 12, 16,
29, 10, 14, 27, 8, 11, 24, 6, 11, 21, 3, 8, 17, 2, 5, 13,
33, 41, 43, 29, 37, 39, 25, 32, 34, 21, 27, 29, 17, 22, 24, 14,
18, 19, 9, 12, 13, 5, 8, 9, 17, 36, 31, 16, 33, 29, 14, 29,
27, 7, 27, 24, 6, 22, 19, 7, 16, 16, 3, 13, 13, 0, 8, 8,
45, 54, 63, 31, 47, 60, 17, 37, 57, 10, 30, 54, 9, 21, 51, 6,
17, 45, 5, 15, 39, 4, 12, 34, 52, 38, 31, 48, 34, 26, 45, 28,
21, 43, 23, 17, 38, 19, 14, 33, 16, 12, 28, 11, 9, 24, 9, 7,
63, 57, 37, 63, 53, 31, 61, 49, 28, 59, 43, 21, 58, 40, 16, 57,
36, 10, 53, 30, 4, 49, 24, 0, 45, 18, 0, 41, 14, 0, 38, 10,
0, 33, 8, 0, 27, 4, 0, 23, 2, 0, 19, 0, 0, 14, 0, 0,
63, 0, 63, 63, 0, 63, 63, 0, 63, 49, 49, 49, 54, 53, 54, 63,
23, 0, 63, 0, 0, 59, 0, 0, 54, 0, 0, 51, 0, 0, 47, 0,
0, 44, 0, 0, 37, 0, 0, 33, 0, 0, 29, 0, 0, 25, 0, 0,
7, 6, 2, 9, 8, 3, 10, 9, 4, 12, 12, 5, 14, 14, 7, 16,
16, 8, 18, 18, 10, 20, 20, 12, 22, 22, 14, 23, 24, 16, 25, 26,
18, 27, 28, 21, 29, 30, 23, 31, 32, 26, 33, 34, 29, 63, 63, 63,
};
PaletteClass DefaultPalette((unsigned char *)DefaultPaletteData);
ConvertClass DefaultConvert(DefaultPalette, DefaultPalette, BSurface(8,8,8));