#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
uint8_t Skins[256];
uint8_t GreenMap[256] =
{
0,126,127,124,112,112,116,120,124,112,116,120,124,116,120,124,112,112,113,113,114,114,115,115,116,116,117,117,118,118,
119,119,120,120,121,121,122,122,123,123,124,124,125,125,126,126,127,127,112,112,113,113,114,114,115,115,116,116,117,117,
118,118,119,119,120,120,121,121,122,122,123,123,124,124,125,125,126,126,127,127,112,112,113,113,114,114,115,115,116,116,
117,117,118,118,119,119,120,120,121,121,122,122,123,123,124,124,125,125,126,126,127,127,112,113,114,115,116,117,118,119,
120,121,122,123,124,125,126,127,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,112,114,116,118,120,122,
124,126,112,114,116,118,120,122,124,126,112,114,116,118,120,122,124,126,112,112,113,113,114,115,115,116,117,117,118,119,
119,120,121,121,122,123,123,124,125,125,126,127,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,112,113,
114,115,116,117,118,119,120,121,122,123,124,125,126,127,112,114,116,118,120,122,124,126,112,116,120,124,112,116,120,124,
112,114,116,118,120,122,124,126,116,112,112,114,116,118,122,122,
};
int main(int argc, char** argv)
{
FILE* f;
int i, j;
uint8_t u;
/* Load skin colors */
f = fopen("skincols", "rb");
fread(Skins, 256, 1, f);
fclose(f);
/* Go through */
f = fopen("remapped", "wb");
for (i = 0; i < 16; i++)
{
for (j = 0; j < 256; j++)
{
u = Skins[(16 * i) + (GreenMap[j] - 112)];
fwrite(&u, 1, 1, f);
}
}
fclose(f);
}