Skip to content

Commit bfdbf1c

Browse files
author
Mitsuhiro Itakura
committed
New palette
1 parent 0ef7b5a commit bfdbf1c

File tree

3 files changed

+66
-32
lines changed

3 files changed

+66
-32
lines changed

new.bmp

0 Bytes
Binary file not shown.

tool/bm.c

+32-22
Original file line numberDiff line numberDiff line change
@@ -449,32 +449,27 @@ while(1){
449449
ss[ix-1]=0;printf("%s\n",ss);
450450
}
451451

452-
void stdpal(){
453-
int i;
454-
455-
for(i=0;i<256;i++){
456-
palr[i]=pbuf[i*4+2];
457-
palg[i]=pbuf[i*4+1];
458-
palb[i]=pbuf[i*4+0];
459-
}
460-
for(i=0;i<NHASH;i++)hashn[i]=0;
461-
for(i=0;i<256;i++)forcereg(i);
462-
}
463-
464-
void newgold()
452+
void oldcolors()
465453
{
466-
int coldat[7*4] = {
467-
0xE6, 0x68, 0x56, 0x22,
468-
0xE7, 0x80, 0x6a, 0x2a,
469-
0xE8, 0xa8, 0x8c, 0x38,
470-
0xE9, 0xc0, 0xa0, 0x40,
471-
0xEA, 0xe0, 0xba, 0x4a,
472-
0xEB, 0xf8, 0xe0, 0x60,
473-
0xEC, 0xff, 0xff, 0xa0
454+
int coldat[10*4] = {
455+
// Old gold
456+
0xE6, 0x68, 0x54, 0x1f,
457+
0xE7, 0x80, 0x70, 0x20,
458+
0xE8, 0xaa, 0x88, 0x34,
459+
0xEA, 0xf2, 0xc4, 0x4d,
460+
0xEC, 0xfc, 0xfc, 0x99,
461+
//Old zombie
462+
0xee, 0x75, 0x69, 0x58,
463+
0xef, 0x91, 0x87, 0x6e,
464+
0xf0, 0xab, 0x9a, 0x81,
465+
//Old brass
466+
0xf1, 0xa0, 0xc0, 0xe0,
467+
0xe9, 0x50, 0xa8, 0xd0
474468
};
475469
int i;
476470

477-
for(i=0;i<7;i++){
471+
for(i=0;i<10;i++)
472+
{
478473
int ix = coldat[i*4+0];
479474
int r= coldat[i*4+1];
480475
int g= coldat[i*4+2];
@@ -483,9 +478,24 @@ for(i=0;i<7;i++){
483478
palr[ix]=r;
484479
palg[ix]=g;
485480
palb[ix]=b;
481+
}
486482
}
483+
484+
void stdpal(){
485+
int i;
486+
487+
for(i=0;i<256;i++){
488+
palr[i]=pbuf[i*4+2];
489+
palg[i]=pbuf[i*4+1];
490+
palb[i]=pbuf[i*4+0];
491+
}
492+
for(i=0;i<NHASH;i++)hashn[i]=0;
493+
for(i=0;i<256;i++)forcereg(i);
494+
495+
oldcolors();
487496
}
488497

498+
489499
int getval(char *buf, char *tag, int *val)
490500
{
491501
int len = strlen(tag);

tool/palette.h

+34-10
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
unsigned char pbuf[1024]= {
2+
// Red
23
/* 0x00 */ 0x00, 0x00, 0xff, 0x00,
34
/* 0x01 */ 0x00, 0x00, 0xe0, 0x00,
45
/* 0x02 */ 0x00, 0x00, 0xc0, 0x00,
@@ -7,14 +8,18 @@ unsigned char pbuf[1024]= {
78
/* 0x05 */ 0x00, 0x00, 0x60, 0x00,
89
/* 0x06 */ 0x00, 0x00, 0x40, 0x00,
910
/* 0x07 */ 0x00, 0x00, 0x30, 0x00,
11+
// Dark red
1012
/* 0x08 */ 0x00, 0x00, 0x20, 0x00,
1113
/* 0x09 */ 0x00, 0x00, 0x18, 0x00,
1214
/* 0x0a */ 0x00, 0x00, 0x10, 0x00,
15+
//Pale Red
1316
/* 0x0b */ 0x40, 0x40, 0x80, 0x00,
1417
/* 0x0c */ 0x50, 0x50, 0xa0, 0x00,
1518
/* 0x0d */ 0x60, 0x60, 0xc0, 0x00,
1619
/* 0x0e */ 0x70, 0x70, 0xe0, 0x00,
1720
/* 0x0f */ 0x80, 0x80, 0xff, 0x00,
21+
22+
//Red-Orange
1823
/* 0x10 */ 0x00, 0x40, 0xff, 0x00,
1924
/* 0x11 */ 0x00, 0x38, 0xe0, 0x00,
2025
/* 0x12 */ 0x00, 0x30, 0xc0, 0x00,
@@ -223,24 +228,43 @@ unsigned char pbuf[1024]= {
223228
/* 0xdd */ 0x50, 0x50, 0x50, 0x00,
224229
/* 0xde */ 0x30, 0x30, 0x30, 0x00,
225230
/* 0xdf */ 0x10, 0x10, 0x10, 0x00,
231+
232+
// Flesh
226233
/* 0xe0 */ 0x48, 0x5a, 0x7f, 0x00,
227234
/* 0xe1 */ 0x5e, 0x76, 0xa5, 0x00,
228235
/* 0xe2 */ 0x72, 0x8f, 0xca, 0x00,
229236
/* 0xe3 */ 0x82, 0xa2, 0xe5, 0x00,
230237
/* 0xe4 */ 0x91, 0xb6, 0xff, 0x00,
231238
/* 0xe5 */ 0xaf, 0xd3, 0xff, 0x00,
232-
/* 0xe6 */ 0x1f, 0x54, 0x68, 0x00,
233-
/* 0xe7 */ 0x20, 0x70, 0x80, 0x00,
234-
/* 0xe8 */ 0x34, 0x88, 0xaa, 0x00,
239+
240+
//Gold 12:10:4
241+
/* 0xe6 */ 0x22, 0x56, 0x68, 0x00,
242+
/* 0xe7 */ 0x2a, 0x6a, 0x80, 0x00,
243+
/* 0xe8 */ 0x38, 0x8c, 0xa8, 0x00,
235244
/* 0xe9 */ 0x40, 0xa0, 0xc0, 0x00,
236-
/* 0xea */ 0x4d, 0xc4, 0xf2, 0x00,
245+
/* 0xea */ 0x4a, 0xba, 0xe0, 0x00,
237246
/* 0xeb */ 0x60, 0xe0, 0xf8, 0x00,
238-
/* 0xec */ 0x99, 0xfc, 0xfc, 0x00,
239-
/* 0xed */ 0x58, 0x69, 0x75, 0x00,
240-
/* 0xee */ 0x6e, 0x87, 0x91, 0x00,
241-
/* 0xef */ 0x81, 0x9a, 0xab, 0x00,
242-
/* 0xf0 */ 0xa0, 0xc0, 0xe0, 0x00,
243-
/* 0xf1 */ 0x50, 0xa8, 0xd0, 0x00,
247+
/* 0xec */ 0xa0, 0xff, 0xff, 0x00,
248+
249+
// Zombie 8:7:6
250+
251+
#if 0
252+
/* 0xed */ 0x58, 0x69, 0x75, 0x00, -> 607080
253+
/* 0xee */ 0x6e, 0x87, 0x91, 0x00, -> 788ca0
254+
/* 0xef */ 0x81, 0x9a, 0xab, 0x00, -> 90a8c0
255+
#endif
256+
257+
/* 0xed */ 0x48, 0x54, 0x60, 0x00,
258+
/* 0xee */ 0x60, 0x70, 0x80, 0x00,
259+
/* 0xef */ 0x78, 0x8c, 0xa0, 0x00,
260+
/* 0xf0 */ 0x90, 0xa8, 0xc0, 0x00,
261+
/* 0xf1 */ 0xa8, 0xc4, 0xe0, 0x00,
262+
#if 0
263+
// Old Brass 14:12:10, 13:10.5:5
264+
/* 0xf0 */ 0xa0, 0xc0, 0xe0, 0x00, -> a8c4e0
265+
/* 0xf1 */ 0x50, 0xa8, 0xd0, 0x00, -> 40a0c0
266+
#endif
267+
244268
/* 0xf2 */ 0x00, 0x00, 0x00, 0x00,
245269
/* 0xf3 */ 0x00, 0x00, 0x00, 0x00,
246270
/* 0xf4 */ 0x00, 0x00, 0x00, 0x00,

0 commit comments

Comments
 (0)