Diff for /np2/lio/gline.c between versions 1.10 and 1.12

version 1.10, 2004/02/22 00:05:56 version 1.12, 2004/03/04 17:36:06
Line 187  static void gbox(const _GLIO *lio, const Line 187  static void gbox(const _GLIO *lio, const
         int             tmp;          int             tmp;
         UINT32  csrw;          UINT32  csrw;
         GDCVECT vect;          GDCVECT vect;
         UINT16  pat[4];          UINT    planes;
           UINT    adrs[4];
           UINT8   ope[4];
           UINT16  pat;
           BYTE    *tterm;
           UINT    r;
   
         x1 = lp->x1;          x1 = lp->x1;
         y1 = lp->y1;          y1 = lp->y1;
Line 212  static void gbox(const _GLIO *lio, const Line 217  static void gbox(const _GLIO *lio, const
         y1 = max(y1, lio->draw.y1);          y1 = max(y1, lio->draw.y1);
         x2 = min(x2, lio->draw.x2);          x2 = min(x2, lio->draw.x2);
         y2 = min(y2, lio->draw.y2);          y2 = min(y2, lio->draw.y2);
         pat[0] = 0xffff;  
         pat[1] = 0xffff;          csrw = 0;
         pat[2] = 0xffff;          if (lio->draw.flag & LIODRAW_UPPER) {
         pat[3] = 0xffff;                  csrw += 16000 >> 1;
         if (leng != 0) {  
         }          }
         if (!(lio->draw.flag & LIODRAW_MONO)) {          if (!(lio->draw.flag & LIODRAW_MONO)) {
                 while(y1 <= y2) {                  planes = (lio->draw.flag & LIODRAW_4BPP)?4:3;
                         gdcsub_setvectl(&vect, x1, y1, x2, y1);                  adrs[0] = csrw + 0x4000;
                         csrw = (y1 * 40) + (x1 >> 4) + ((x1 & 0xf) << 20);                  adrs[1] = csrw + 0x8000;
                         if (lio->draw.flag & LIODRAW_UPPER) {                  adrs[2] = csrw + 0xc000;
                                 csrw += 16000 >> 1;                  adrs[3] = csrw + 0x0000;
                         }                  ope[0] = (lp->pal & 1)?GDCOPE_SET:GDCOPE_CLEAR;
                         gdcsub_vectl(csrw + 0x4000, &vect, pat[0],                  ope[1] = (lp->pal & 2)?GDCOPE_SET:GDCOPE_CLEAR;
                                                         (REG8)((lp->pal & 1)?GDCOPE_SET:GDCOPE_CLEAR));                  ope[2] = (lp->pal & 4)?GDCOPE_SET:GDCOPE_CLEAR;
                         gdcsub_vectl(csrw + 0x8000, &vect, pat[1],                  ope[3] = (lp->pal & 8)?GDCOPE_SET:GDCOPE_CLEAR;
                                                         (REG8)((lp->pal & 2)?GDCOPE_SET:GDCOPE_CLEAR));  
                         gdcsub_vectl(csrw + 0xc000, &vect, pat[2],  
                                                         (REG8)((lp->pal & 4)?GDCOPE_SET:GDCOPE_CLEAR));  
                         if (lio->draw.flag & LIODRAW_4BPP) {  
                                 gdcsub_vectl(csrw, &vect, pat[3],  
                                                         (REG8)((lp->pal & 8)?GDCOPE_SET:GDCOPE_CLEAR));  
                         }  
                         y1++;  
                 }  
         }          }
         else {          else {
                 while(y1 <= y2) {                  planes = 1;
                         gdcsub_setvectl(&vect, x1, y1, x2, y1);                  adrs[0] = csrw + (((lio->draw.flag + 1) & LIODRAW_PMASK) << 12);
                         csrw = (y1 * 40) + (x1 >> 4) + ((x1 & 0xf) << 20);                  ope[0] = (lp->pal)?GDCOPE_SET:GDCOPE_CLEAR;
                         if (lio->draw.flag & LIODRAW_UPPER) {          }
                                 csrw += 16000 >> 1;  
           if (leng == 0) {
                   tile = NULL;
                   tterm = NULL;
           }
           else {
                   tterm = tile + leng;
                   tmp = (x1 - lio->draw.x1) & 7;
                   do {
                           r = GDCPATREVERSE(*tile);
                           *tile = (BYTE)((r << tmp) | (r >> (8 - tmp)));
                   } while(++tile < tterm);
                   tile -= leng;
                   tmp = (y1 - lio->draw.y1) * planes;
                   tile += tmp % leng;
           }
   
           pat = 0xffff;
           while(y1 <= y2) {
                   gdcsub_setvectl(&vect, x1, y1, x2, y1);
                   csrw = (y1 * 40) + (x1 >> 4) + ((x1 & 0xf) << 20);
                   r = 0;
                   do {
                           if (tile) {
                                   pat = (*tile << 8) | *tile;
                                   if (++tile >= tterm) {
                                           tile -= leng;
                                   }
                         }                          }
                         csrw += ((lio->draw.flag + 1) & LIODRAW_PMASK) << 12;                          gdcsub_vectl(csrw + adrs[r], &vect, pat, ope[r]);
                         gdcsub_vectl(csrw, &vect, pat[0],                  } while(++r < planes);
                                                                 (REG8)((lp->pal)?GDCOPE_SET:GDCOPE_CLEAR));                  y1++;
                         y1++;  
                 }  
         }          }
 }  }
   
Line 279  REG8 lio_gline(GLIO lio) { Line 299  REG8 lio_gline(GLIO lio) {
         LINEPT  lp;          LINEPT  lp;
         UINT16  pat;          UINT16  pat;
         UINT    leng;          UINT    leng;
         UINT    lengmin;  //      UINT    lengmin;
         BYTE    tile[256];          BYTE    tile[256];
   
         lio_updatedraw(lio);          lio_updatedraw(lio);
         i286_memstr_read(CPU_DS, CPU_BX, &dat, sizeof(dat));          MEML_READSTR(CPU_DS, CPU_BX, &dat, sizeof(dat));
         lp.x1 = (SINT16)LOADINTELWORD(dat.x1);          lp.x1 = (SINT16)LOADINTELWORD(dat.x1);
         lp.y1 = (SINT16)LOADINTELWORD(dat.y1);          lp.y1 = (SINT16)LOADINTELWORD(dat.y1);
         lp.x2 = (SINT16)LOADINTELWORD(dat.x2);          lp.x2 = (SINT16)LOADINTELWORD(dat.x2);
Line 312  REG8 lio_gline(GLIO lio) { Line 332  REG8 lio_gline(GLIO lio) {
         }          }
         else if (dat.type == 2) {          else if (dat.type == 2) {
                 leng = 0;                  leng = 0;
                 if (dat.sw != 2) {                  if (dat.sw == 2) {
                         leng = dat.patleng;                          leng = dat.patleng;
                         if (leng == 0) {                          if (leng == 0) {
                                 goto gline_err;                                  goto gline_err;
                         }                          }
                         i286_memstr_read(LOADINTELWORD(dat.seg), LOADINTELWORD(dat.off),                          MEML_READSTR(LOADINTELWORD(dat.seg), LOADINTELWORD(dat.off),
                                                                                                                                 tile, leng);                                                                                                                                  tile, leng);
                 }                  }
                 gbox(lio, &lp, tile, leng);                  gbox(lio, &lp, tile, leng);

Removed from v.1.10  
changed lines
  Added in v.1.12


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