From 532a8a1561833a5ba0d571025c8c30c40502a976 Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Tue, 13 Oct 2009 21:00:27 -0700 Subject: [PATCH] new bitmap converter (including fill option) and new pixmaps --- pixmaps/asdd72.xpm | 93 ++++++++++++++++++++++--------------------- pixmaps/asdl72.xpm | 93 ++++++++++++++++++++++--------------------- pixmaps/convert.c | 30 ++++++++++++-- pixmaps/cvdd33.xpm | 39 +++++++++--------- pixmaps/cvdd37.xpm | 43 ++++++++++---------- pixmaps/cvdd40.xpm | 49 ++++++++++++----------- pixmaps/cvdd45.xpm | 57 +++++++++++++------------- pixmaps/cvdd49.xpm | 63 +++++++++++++++-------------- pixmaps/cvdd54.xpm | 67 ++++++++++++++++--------------- pixmaps/cvdd58.xpm | 77 ++++++++++++++++++------------------ pixmaps/cvdd64.xpm | 79 +++++++++++++++++++------------------ pixmaps/cvdd72.xpm | 87 ++++++++++++++++++++-------------------- pixmaps/cvdl33.xpm | 39 +++++++++--------- pixmaps/cvdl37.xpm | 43 ++++++++++---------- pixmaps/cvdl40.xpm | 49 ++++++++++++----------- pixmaps/cvdl45.xpm | 57 +++++++++++++------------- pixmaps/cvdl49.xpm | 63 +++++++++++++++-------------- pixmaps/cvdl54.xpm | 67 ++++++++++++++++--------------- pixmaps/cvdl58.xpm | 77 ++++++++++++++++++------------------ pixmaps/cvdl64.xpm | 79 +++++++++++++++++++------------------ pixmaps/cvdl72.xpm | 87 ++++++++++++++++++++-------------------- pixmaps/hdd33.xpm | 47 +++++++++++----------- pixmaps/hdd49.xpm | 75 ++++++++++++++++++----------------- pixmaps/hdd72.xpm | 111 ++++++++++++++++++++++++++-------------------------- pixmaps/hdl33.xpm | 47 +++++++++++----------- pixmaps/hdl49.xpm | 75 ++++++++++++++++++----------------- pixmaps/hdl72.xpm | 111 ++++++++++++++++++++++++++-------------------------- pixmaps/m33s.bmp | Bin 0 -> 326 bytes pixmaps/mdd33.xpm | 84 ++++++++++++++++++++-------------------- pixmaps/mdl33.xpm | 84 ++++++++++++++++++++-------------------- 30 files changed, 1010 insertions(+), 962 deletions(-) create mode 100644 pixmaps/m33s.bmp diff --git a/pixmaps/asdd72.xpm b/pixmaps/asdd72.xpm index 313020b..65f0a0a 100644 --- a/pixmaps/asdd72.xpm +++ b/pixmaps/asdd72.xpm @@ -1,9 +1,10 @@ /* XPM */ static char *asdd72[] = { /* columns rows colors chars-per-pixel */ -"72 72 2 1", +"72 72 3 1", " c black s dark_piece", ". c green s dark_square", +"X c white s light_piece", /* pixels */ "........................................................................", "........................................................................", @@ -18,51 +19,51 @@ static char *asdd72[] = { "........ ........................ .........", "........ ...................... .........", "........ .................... .........", -"........ . .................. .........", -"........ .. ................ . .........", -"........ .. .............. .. .........", -"........ .. ............ .. .........", -"........ .. .......... .. .........", -"........ .. ........ .. .........", -"........ .. ...... .. .........", -"........ .. .... .. .........", -"......... .. .. .. .........", -".......... .. .. ..........", -"........... .. .. .. ...........", -"............ .. .. .. ............", -"............. .. .. .. .............", -".............. .. .. .. ..............", -"............... .. .. ...............", -"................ .. .. ................", -"................. .. .. .................", -".................. .. .. ..................", -"................... .. .. ...................", -".................... .. .. ....................", -"..................... .. .. .....................", -"...................... .. ......................", -"....................... .. .......................", -"...................... .. ......................", -"........ .......... .. .. .......... ........", -"....... ........ .. .. ........ .......", -"...... ...... .. .. ...... ......", -"..... .... .. .. .... .....", -".... .. .. .. .. ....", -".... .. .. .. .. ....", -".... .. .. .. .. ....", -".... .. . .. .. .. ....", -"..... .. .. .. .. .. .....", -"...... .. . .. . .. ......", -"....... .. . .. .......", -"........ .. .. ........", -"......... .. .. .. .........", -"............ .. .... .. ............", -"............. .. ...... .. .............", -"............ . .. ........ .. . ............", -"........... . .. .......... .. . ...........", -".......... . ................ . ..........", -"......... . .............. . .........", -"........ . ............ . ........", -"....... . .......... . .......", +"........ X .................. .........", +"........ XX ................ X .........", +"........ XX .............. XX .........", +"........ XX ............ XX .........", +"........ XX .......... XX .........", +"........ XX ........ XX .........", +"........ XX ...... XX .........", +"........ XX .... XX .........", +"......... XX .. XX .........", +".......... XX XX ..........", +"........... XX XX XX ...........", +"............ XX XX XX ............", +"............. XX XX XX .............", +".............. XX XX XX ..............", +"............... XX XX ...............", +"................ XX XX ................", +"................. XX XX .................", +".................. XX XX ..................", +"................... XX XX ...................", +".................... XX XX ....................", +"..................... XX XX .....................", +"...................... XX ......................", +"....................... XX .......................", +"...................... XX ......................", +"........ .......... XX XX .......... ........", +"....... ........ XX XX ........ .......", +"...... ...... XX XX ...... ......", +"..... .... XX XX .... .....", +".... .. XX XX .. ....", +".... XX XX XX XX ....", +".... XX XX XX XX ....", +".... XX X XX XX XX ....", +"..... XX XX XX XX XX .....", +"...... XX X XX X XX ......", +"....... XX X XX .......", +"........ XX XX ........", +"......... XX .. XX .........", +"............ XX .... XX ............", +"............. XX ...... XX .............", +"............ X XX ........ XX X ............", +"........... X XX .......... XX X ...........", +".......... X XX............XX X ..........", +"......... X .............. X .........", +"........ X ............ X ........", +"....... X .......... X .......", "...... . ........ . ......", "..... .. ...... .. .....", ".... .... .... .... ....", diff --git a/pixmaps/asdl72.xpm b/pixmaps/asdl72.xpm index 7f987f2..6dcd22e 100644 --- a/pixmaps/asdl72.xpm +++ b/pixmaps/asdl72.xpm @@ -1,9 +1,10 @@ /* XPM */ static char *asdl72[] = { /* columns rows colors chars-per-pixel */ -"72 72 2 1", +"72 72 3 1", " c black s dark_piece", ". c gray s light_square", +"X c white s light_piece", /* pixels */ "........................................................................", "........................................................................", @@ -18,51 +19,51 @@ static char *asdl72[] = { "........ ........................ .........", "........ ...................... .........", "........ .................... .........", -"........ . .................. .........", -"........ .. ................ . .........", -"........ .. .............. .. .........", -"........ .. ............ .. .........", -"........ .. .......... .. .........", -"........ .. ........ .. .........", -"........ .. ...... .. .........", -"........ .. .... .. .........", -"......... .. .. .. .........", -".......... .. .. ..........", -"........... .. .. .. ...........", -"............ .. .. .. ............", -"............. .. .. .. .............", -".............. .. .. .. ..............", -"............... .. .. ...............", -"................ .. .. ................", -"................. .. .. .................", -".................. .. .. ..................", -"................... .. .. ...................", -".................... .. .. ....................", -"..................... .. .. .....................", -"...................... .. ......................", -"....................... .. .......................", -"...................... .. ......................", -"........ .......... .. .. .......... ........", -"....... ........ .. .. ........ .......", -"...... ...... .. .. ...... ......", -"..... .... .. .. .... .....", -".... .. .. .. .. ....", -".... .. .. .. .. ....", -".... .. .. .. .. ....", -".... .. . .. .. .. ....", -"..... .. .. .. .. .. .....", -"...... .. . .. . .. ......", -"....... .. . .. .......", -"........ .. .. ........", -"......... .. .. .. .........", -"............ .. .... .. ............", -"............. .. ...... .. .............", -"............ . .. ........ .. . ............", -"........... . .. .......... .. . ...........", -".......... . ................ . ..........", -"......... . .............. . .........", -"........ . ............ . ........", -"....... . .......... . .......", +"........ X .................. .........", +"........ XX ................ X .........", +"........ XX .............. XX .........", +"........ XX ............ XX .........", +"........ XX .......... XX .........", +"........ XX ........ XX .........", +"........ XX ...... XX .........", +"........ XX .... XX .........", +"......... XX .. XX .........", +".......... XX XX ..........", +"........... XX XX XX ...........", +"............ XX XX XX ............", +"............. XX XX XX .............", +".............. XX XX XX ..............", +"............... XX XX ...............", +"................ XX XX ................", +"................. XX XX .................", +".................. XX XX ..................", +"................... XX XX ...................", +".................... XX XX ....................", +"..................... XX XX .....................", +"...................... XX ......................", +"....................... XX .......................", +"...................... XX ......................", +"........ .......... XX XX .......... ........", +"....... ........ XX XX ........ .......", +"...... ...... XX XX ...... ......", +"..... .... XX XX .... .....", +".... .. XX XX .. ....", +".... XX XX XX XX ....", +".... XX XX XX XX ....", +".... XX X XX XX XX ....", +"..... XX XX XX XX XX .....", +"...... XX X XX X XX ......", +"....... XX X XX .......", +"........ XX XX ........", +"......... XX .. XX .........", +"............ XX .... XX ............", +"............. XX ...... XX .............", +"............ X XX ........ XX X ............", +"........... X XX .......... XX X ...........", +".......... X XX............XX X ..........", +"......... X .............. X .........", +"........ X ............ X ........", +"....... X .......... X .......", "...... . ........ . ......", "..... .. ...... .. .....", ".... .... .... .... ....", diff --git a/pixmaps/convert.c b/pixmaps/convert.c index dcdcd47..3118808 100644 --- a/pixmaps/convert.c +++ b/pixmaps/convert.c @@ -54,6 +54,19 @@ void Paint(char dest[130][130], char src[130][130], int size, char c) for(i=0; i 0) FloodFill(a, size, x-1, y); + if(y > 0) FloodFill(a, size, x, y-1); + if(x < size-1) FloodFill(a, size, x+1, y); + if(y < size-1) FloodFill(a, size, x, y+1); + } + +} + void Save(FILE *f, char *name, char data[130][130], int size, char *col, int depth) { // write out data in source format for d x d pixmap with specified square color int i, j; @@ -79,9 +92,11 @@ char data[130][130], oData[130][130], sData[130][130], wData[130][130]; main(int argc, char **argv) { - int i, j, k, d, cnt, p, s, t; char c, h, w, *name, buf[80]; + int i, j, k, d, cnt, p, s, t; char c, h, w, *name, buf[80], transparent; FILE *f; + transparent = argc > 1 && !strcmp(argv[1], "-t"); + for(s=0; s<18; s++) for(p=0; pieceList[p] != NULL; p++) { // Load the 3 kinds of Windows monochrome bitmaps (outline, solid, white fill) @@ -107,19 +122,26 @@ main(int argc, char **argv) printf("%s loaded\n", buf); // construct pixmaps as character arrays d = sizeList[s]; - for(i=0; i-dkhQN8N@JaI+ZOr7T2z%Ry=4E#D4xGzXZ-;hV+8r;12*RGQC`MpNGm7IIL%q& i2(7)Fm>`%}=$%93`)ImWhQhI(Gu2%Ck}v)5C;tHIEo3tQ literal 0 HcmV?d00001 diff --git a/pixmaps/mdd33.xpm b/pixmaps/mdd33.xpm index 8ccecf3..f599594 100644 --- a/pixmaps/mdd33.xpm +++ b/pixmaps/mdd33.xpm @@ -1,42 +1,42 @@ -/* XPM */ -static char *mdd33[] = { -/* columns rows colors chars-per-pixel */ -"33 33 3 1", -" c white s light_piece", -". c green s dark_square", -"X c black s dark_piece", -/* pixels */ -".................................", -".................................", -".................................", -".................................", -".................................", -"................X................", -"...............XXX...............", -"..............XXXXX..............", -"..............XXXXX..............", -"...............XXX...............", -"............... ...............", -"...........XXXXXXXXXXX...........", -"........XXXXXXXXXXXXXXXXX........", -".......XXXXXXXXXXXXXXXXXXX.......", -"......XXXXXXXXXXXXXXXXXXXXX......", -"......XXXXXXXXXXXXXXXXXXXXX......", -".....XXXXXXXXXXXXXXXXXXXXXXX.....", -".....XXXXXXXXXXXXXXXXXXXXXXX.....", -".....XXXXXXXXXXXXXXXXXXXXXXX.....", -".....XXXXXXXXXXXXXXXXXXXXXXX.....", -"....XXXXXXXXXXXXXXXXXXXXXXXXX....", -"....XXXXXXXXXXXXXXXXXXXXXXXXX....", -"....XXXXXX XXXXXX....", -"...XX XXXXXXXXXXXXX XX...", -"...X XXXXXXXXXXXXXXXXXXXXXXX X...", -"..XXXXXXXXXXXXXXXXXXXXXXXXXXXXX..", -"..XXXXXXXXXXXXXXXXXXXXXXXXXXXXX..", -"...XXXXXXXXXXXXXXXXXXXXXXXXXXX...", -".....XXXXXXXXXXXXXXXXXXXXXXX.....", -"..........XXXXXXXXXXXXX..........", -".................................", -".................................", -"................................." -}; +/* XPM */ +static char *mdd33[] = { +/* columns rows colors chars-per-pixel */ +"33 33 3 1", +" c black s dark_piece", +". c green s dark_square", +"X c white s light_piece", +/* pixels */ +".................................", +".................................", +".................................", +".................................", +".................................", +"................ ................", +"............... ...............", +".............. ..............", +".............. ..............", +"............... ...............", +"............... X ...............", +"........... ...........", +"........ ........", +"....... .......", +"...... ......", +"...... ......", +"..... .....", +"..... .....", +"..... .....", +"..... .....", +".... ....", +".... ....", +".... XXXXXXXXXXXXX ....", +"... XXXXX XXXXX ...", +"... X X ...", +".. ..", +".. ..", +"... ...", +"..... .....", +".......... ..........", +".................................", +".................................", +"................................." +}; diff --git a/pixmaps/mdl33.xpm b/pixmaps/mdl33.xpm index cda976f..253cc90 100644 --- a/pixmaps/mdl33.xpm +++ b/pixmaps/mdl33.xpm @@ -1,42 +1,42 @@ -/* XPM */ -static char *mdl33[] = { -/* columns rows colors chars-per-pixel */ -"33 33 3 1", -" c white s light_piece", -". c gray s light_square", -"X c black s dark_piece", -/* pixels */ -".................................", -".................................", -".................................", -".................................", -".................................", -"................X................", -"...............XXX...............", -"..............XXXXX..............", -"..............XXXXX..............", -"...............XXX...............", -"............... ...............", -"...........XXXXXXXXXXX...........", -"........XXXXXXXXXXXXXXXXX........", -".......XXXXXXXXXXXXXXXXXXX.......", -"......XXXXXXXXXXXXXXXXXXXXX......", -"......XXXXXXXXXXXXXXXXXXXXX......", -".....XXXXXXXXXXXXXXXXXXXXXXX.....", -".....XXXXXXXXXXXXXXXXXXXXXXX.....", -".....XXXXXXXXXXXXXXXXXXXXXXX.....", -".....XXXXXXXXXXXXXXXXXXXXXXX.....", -"....XXXXXXXXXXXXXXXXXXXXXXXXX....", -"....XXXXXXXXXXXXXXXXXXXXXXXXX....", -"....XXXXXX XXXXXX....", -"...XX XXXXXXXXXXXXX XX...", -"...X XXXXXXXXXXXXXXXXXXXXXXX X...", -"..XXXXXXXXXXXXXXXXXXXXXXXXXXXXX..", -"..XXXXXXXXXXXXXXXXXXXXXXXXXXXXX..", -"...XXXXXXXXXXXXXXXXXXXXXXXXXXX...", -".....XXXXXXXXXXXXXXXXXXXXXXX.....", -"..........XXXXXXXXXXXXX..........", -".................................", -".................................", -"................................." -}; +/* XPM */ +static char *mdl33[] = { +/* columns rows colors chars-per-pixel */ +"33 33 3 1", +" c black s dark_piece", +". c gray s light_square", +"X c white s light_piece", +/* pixels */ +".................................", +".................................", +".................................", +".................................", +".................................", +"................ ................", +"............... ...............", +".............. ..............", +".............. ..............", +"............... ...............", +"............... X ...............", +"........... ...........", +"........ ........", +"....... .......", +"...... ......", +"...... ......", +"..... .....", +"..... .....", +"..... .....", +"..... .....", +".... ....", +".... ....", +".... XXXXXXXXXXXXX ....", +"... XXXXX XXXXX ...", +"... X X ...", +".. ..", +".. ..", +"... ...", +"..... .....", +".......... ..........", +".................................", +".................................", +"................................." +}; -- 1.7.0.4