Diff for /np2/vram/scrnsave.c between versions 1.1 and 1.3

version 1.1, 2004/06/21 15:19:15 version 1.3, 2005/02/09 20:11:35
Line 30  typedef struct { Line 30  typedef struct {
 } SCRNDATA;  } SCRNDATA;
   
   
 static void screenmix(PALNUM *dest, const BYTE *src1, const BYTE *src2) {  static void screenmix(PALNUM *dest, const UINT8 *src1, const UINT8 *src2) {
   
         int             i;          int             i;
   
Line 39  static void screenmix(PALNUM *dest, cons Line 39  static void screenmix(PALNUM *dest, cons
         }          }
 }  }
   
 static void screenmix2(PALNUM *dest, const BYTE *src1, const BYTE *src2) {  static void screenmix2(PALNUM *dest, const UINT8 *src1, const UINT8 *src2) {
   
         int             x, y;          int             x, y;
   
Line 59  static void screenmix2(PALNUM *dest, con Line 59  static void screenmix2(PALNUM *dest, con
         }          }
 }  }
   
 static void screenmix3(PALNUM *dest, const BYTE *src1, const BYTE *src2) {  static void screenmix3(PALNUM *dest, const UINT8 *src1, const UINT8 *src2) {
   
         PALNUM  c;          PALNUM  c;
         int             x, y;          int             x, y;
Line 81  static void screenmix3(PALNUM *dest, con Line 81  static void screenmix3(PALNUM *dest, con
 }  }
   
 #if defined(SUPPORT_PC9821)  #if defined(SUPPORT_PC9821)
 static void screenmix4(PALNUM *dest, const BYTE *src1, const BYTE *src2) {  static void screenmix4(PALNUM *dest, const UINT8 *src1, const UINT8 *src2) {
   
         int             i;          int             i;
   
Line 106  SCRNSAVE scrnsave_get(void) { Line 106  SCRNSAVE scrnsave_get(void) {
         SCRNDATA        *sd;          SCRNDATA        *sd;
         PALNUM          *dat;          PALNUM          *dat;
         UINT            scrnsize;          UINT            scrnsize;
         BYTE            *datanull;          UINT8           *datanull;
         BYTE            *datatext;          UINT8           *datatext;
         BYTE            *datagrph;          UINT8           *datagrph;
         void            (*mix)(PALNUM *dest, const BYTE *src1, const BYTE *src2);          void            (*mix)(PALNUM *dest, const UINT8 *src1, const UINT8 *src2);
         PALNUM          *s;          PALNUM          *s;
         UINT            pals;          UINT            pals;
         PALNUM          remap[NP2PAL_TOTAL];          PALNUM          remap[NP2PAL_TOTAL];
Line 133  SCRNSAVE scrnsave_get(void) { Line 133  SCRNSAVE scrnsave_get(void) {
   
         dat = sd->dat;          dat = sd->dat;
         scrnsize = SURFACE_WIDTH * SURFACE_HEIGHT;          scrnsize = SURFACE_WIDTH * SURFACE_HEIGHT;
         datanull = ((BYTE *)dat) + (scrnsize * (sizeof(PALNUM) - 1));          datanull = ((UINT8 *)dat) + (scrnsize * (sizeof(PALNUM) - 1));
         datatext = datanull;          datatext = datanull;
         datagrph = datanull;          datagrph = datanull;
         if (gdcs.textdisp & 0x80) {          if (gdcs.textdisp & 0x80) {
Line 196  SCRNSAVE scrnsave_get(void) { Line 196  SCRNSAVE scrnsave_get(void) {
         sd->width = width;          sd->width = width;
         sd->height = height;          sd->height = height;
         sd->pals = pals;          sd->pals = pals;
         if (pals < 2) {          if (pals <= 2) {
                 sd->type = SCRNSAVE_1BIT;                  sd->type = SCRNSAVE_1BIT;
         }          }
         else if (pals < 16) {          else if (pals <= 16) {
                 sd->type = SCRNSAVE_4BIT;                  sd->type = SCRNSAVE_4BIT;
         }          }
         else if (pals < 256) {          else if (pals <= 256) {
                 sd->type = SCRNSAVE_8BIT;                  sd->type = SCRNSAVE_8BIT;
         }          }
         else {          else {
Line 224  void scrnsave_trash(SCRNSAVE hdl) { Line 224  void scrnsave_trash(SCRNSAVE hdl) {
   
 // ---- BMP  // ---- BMP
   
 BOOL scrnsave_writebmp(SCRNSAVE hdl, const char *filename, UINT flag) {  BOOL scrnsave_writebmp(SCRNSAVE hdl, const OEMCHAR *filename, UINT flag) {
   
 const SCRNDATA  *sd;  const SCRNDATA  *sd;
         FILEH           fh;          FILEH           fh;
Line 236  const SCRNDATA *sd; Line 236  const SCRNDATA *sd;
         BMPINFO         bi;          BMPINFO         bi;
         UINT8           palwork[1024];          UINT8           palwork[1024];
         UINT            align;          UINT            align;
         BYTE            *work;          UINT8           *work;
 const PALNUM    *s;  const PALNUM    *s;
         int                     r;          int                     r;
         int                     x;          int                     x;
Line 302  const PALNUM *s; Line 302  const PALNUM *s;
                 }                  }
         }          }
   
         work = (BYTE *)_MALLOC(align, filename);          work = (UINT8 *)_MALLOC(align, filename);
         if (work == NULL) {          if (work == NULL) {
                 goto sswb_err2;                  goto sswb_err2;
         }          }
Line 431  sswb_err1: Line 431  sswb_err1:
         } while(/*CONSTCOND*/ 0)          } while(/*CONSTCOND*/ 0)
   
   
 BOOL scrnsave_writegif(SCRNSAVE hdl, const char *filename, UINT flag) {  BOOL scrnsave_writegif(SCRNSAVE hdl, const OEMCHAR *filename, UINT flag) {
   
 const SCRNDATA  *sd;  const SCRNDATA  *sd;
         UINT            bpp;          UINT            bpp;
Line 450  const PALNUM *s; Line 450  const PALNUM *s;
         UINT8           bitcount;          UINT8           bitcount;
         UINT            bitdata;          UINT            bitdata;
         UINT            bitdatas;          UINT            bitdatas;
         BYTE            bitbuf[3+256*3];          UINT8           bitbuf[3+256*3];
   
         int                     x;          int                     x;
         int                     y;          int                     y;

Removed from v.1.1  
changed lines
  Added in v.1.3


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