Mercurial > hg > dmlib
comparison tools/gfxconv.c @ 826:742e3d850247
Remove dead code.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Fri, 16 May 2014 22:33:36 +0300 |
parents | c5b768c8e641 |
children | c8beac5313c3 |
comparison
equal
deleted
inserted
replaced
825:c5b768c8e641 | 826:742e3d850247 |
---|---|
761 } | 761 } |
762 (*offs)++; | 762 (*offs)++; |
763 } | 763 } |
764 | 764 |
765 | 765 |
766 #ifdef UNFINISHED | |
767 int dmConvertBMP2(DMImage *screen, const DM64Image *img) | |
768 { | |
769 int yc; | |
770 Uint8 *dp = screen->data; | |
771 | |
772 for (yc = 0; yc < screen->height; yc++) | |
773 { | |
774 Uint8 *d = dp; | |
775 const int y = yc / 8, yb = yc & 7; | |
776 const int scroffsy = y * C64_SCR_CH_WIDTH; | |
777 const int bmoffsy = y * C64_SCR_WIDTH; | |
778 int xc; | |
779 | |
780 for (xc = 0; xc < screen->width / 2; xc++) | |
781 { | |
782 const int x = xc / 4; | |
783 const int scroffs = scroffsy + x; | |
784 const int b = img->bitmap[0][bmoffsy + (x * 8) + yb]; | |
785 const int v = 6 - ((xc * 2) & 6); | |
786 Uint8 c; | |
787 | |
788 switch ((b >> v) & 3) | |
789 { | |
790 case 0: c = img->bgcolor; break; | |
791 case 1: c = img->screen[0][scroffs] >> 4; break; | |
792 case 2: c = img->screen[0][scroffs] & 15; break; | |
793 case 3: c = img->color[0][scroffs] & 15; break; | |
794 } | |
795 | |
796 *d++ = c; | |
797 *d++ = c; | |
798 } | |
799 | |
800 dp += screen->pitch; | |
801 } | |
802 | |
803 return 0; | |
804 } | |
805 #endif | |
806 | |
807 | |
808 int dmRemapImageColors(DMImage *image) | 766 int dmRemapImageColors(DMImage *image) |
809 { | 767 { |
810 DMColor *npal = dmCalloc(image->ncolors, sizeof(DMColor)); | 768 DMColor *npal = dmCalloc(image->ncolors, sizeof(DMColor)); |
811 int *mapping = dmMalloc(image->ncolors * sizeof(int)); | 769 int *mapping = dmMalloc(image->ncolors * sizeof(int)); |
812 BOOL *mapped = dmMalloc(image->ncolors * sizeof(BOOL)); | 770 BOOL *mapped = dmMalloc(image->ncolors * sizeof(BOOL)); |