Diff for /np2/generic/cmndraw.c between versions 1.5 and 1.6

version 1.5, 2004/03/25 08:51:23 version 1.6, 2004/03/25 10:41:13
Line 511  const BYTE *ptr; Line 511  const BYTE *ptr;
   
 // ---- bmp  // ---- bmp
   
 void cmddraw_bmp16(CMNVRAM *vram, const void *bmp, CMNPALCNV cnv) {  void cmddraw_bmp16(CMNVRAM *vram, const void *bmp, CMNPALCNV cnv, UINT flag) {
   
 const BMPFILE   *bf;  const BMPFILE   *bf;
 const BMPINFO   *bi;  const BMPINFO   *bi;
Line 560  const BYTE  *palptr; Line 560  const BYTE  *palptr;
         }          }
         (*cnv)(pal, paltbl, pals, vram->bpp);          (*cnv)(pal, paltbl, pals, vram->bpp);
         dst = vram->ptr;          dst = vram->ptr;
 #if 0          switch(flag & 0x03) {
         dst += ((vram->width - inf.width) / 2) * vram->xalign;                  case CMNBMP_CENTER:
         dst += ((vram->height - inf.height) / 2) * vram->yalign;                          dst += ((vram->width - inf.width) / 2) * vram->xalign;
 #endif                          break;
   
                   case CMNBMP_RIGHT:
                           dst += (vram->width - inf.width) * vram->xalign;
                           break;
           }
           switch(flag & 0x0c) {
                   case CMNBMP_MIDDLE:
                           dst += ((vram->height - inf.height) / 2) * vram->yalign;
                           break;
   
                   case CMNBMP_BOTTOM:
                           dst += (vram->height - inf.height) * vram->yalign;
                           break;
           }
         yalign = vram->yalign - (inf.width * vram->xalign);          yalign = vram->yalign - (inf.width * vram->xalign);
         switch(vram->bpp) {          switch(vram->bpp) {
   #if defined(SUPPORT_8BPP)
                   case 8:
                           for (y=0; y<inf.height; y++) {
                                   for (x=0; x<inf.width; x++) {
                                           if (!(x & 1)) {
                                                   c = src[x >> 1] >> 4;
                                           }
                                           else {
                                                   c = src[x >> 1] & 15;
                                           }
                                           *dst = pal[c].pal8;
                                           dst += vram->xalign;
                                   }
                                   src += bmpalign;
                                   dst += yalign;
                           }
                           break;
   #endif
 #if defined(SUPPORT_16BPP)  #if defined(SUPPORT_16BPP)
                 case 16:                  case 16:
                         for (y=0; y<inf.height; y++) {                          for (y=0; y<inf.height; y++) {
Line 584  const BYTE  *palptr; Line 616  const BYTE  *palptr;
                         }                          }
                         break;                          break;
 #endif  #endif
   #if defined(SUPPORT_24BPP)
                   case 24:
                           for (y=0; y<inf.height; y++) {
                                   for (x=0; x<inf.width; x++) {
                                           if (!(x & 1)) {
                                                   c = src[x >> 1] >> 4;
                                           }
                                           else {
                                                   c = src[x >> 1] & 15;
                                           }
                                           dst[RGB24_R] = pal[c].pal32.p.r;
                                           dst[RGB24_G] = pal[c].pal32.p.g;
                                           dst[RGB24_B] = pal[c].pal32.p.b;
                                           dst += vram->xalign;
                                   }
                                   src += bmpalign;
                                   dst += yalign;
                           }
                           break;
   #endif
 #if defined(SUPPORT_32BPP)  #if defined(SUPPORT_32BPP)
                 case 32:                  case 32:
                         for (y=0; y<inf.height; y++) {                          for (y=0; y<inf.height; y++) {

Removed from v.1.5  
changed lines
  Added in v.1.6


RetroPC.NET-CVS <cvs@retropc.net>