Diff for /np2/lio/gput1.c between versions 1.9 and 1.12

version 1.9, 2004/02/21 06:26:34 version 1.12, 2004/03/07 23:04:51
Line 321  const BYTE *src; Line 321  const BYTE *src;
   
 // ----  // ----
   
 static REG8 putsub(LIOWORK lio, const LIOPUT *lput) {  static REG8 putsub(GLIO lio, const LIOPUT *lput) {
   
         UINT    addr;          UINT    addr;
         PUTCNTX pt;          PUTCNTX pt;
Line 371  static REG8 putsub(LIOWORK lio, const LI Line 371  static REG8 putsub(LIOWORK lio, const LI
                         flag >>= 1;                          flag >>= 1;
                         if (flag & 8) {                          if (flag & 8) {
                                 pt.baseptr = mem + lio->draw.base + lioplaneadrs[pl];                                  pt.baseptr = mem + lio->draw.base + lioplaneadrs[pl];
                                 i286_memstr_read(lput->seg, off, pt.pat, datacnt);                                  MEML_READSTR(lput->seg, off, pt.pat, datacnt);
                                 if (lput->sw) {                                  if (lput->sw) {
                                         off += datacnt;                                          off += datacnt;
                                 }                                  }
Line 455  static REG8 putsub(LIOWORK lio, const LI Line 455  static REG8 putsub(LIOWORK lio, const LI
   
 // ---- GGET  // ---- GGET
   
 REG8 lio_gget(LIOWORK lio) {  REG8 lio_gget(GLIO lio) {
   
         GGET    dat;          GGET    dat;
         SINT32  x;          SINT32  x;
Line 473  REG8 lio_gget(LIOWORK lio) { Line 473  REG8 lio_gget(LIOWORK lio) {
         UINT    pl;          UINT    pl;
   
         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));
         x = (SINT16)LOADINTELWORD(dat.x1);          x = (SINT16)LOADINTELWORD(dat.x1);
         y = (SINT16)LOADINTELWORD(dat.y1);          y = (SINT16)LOADINTELWORD(dat.y1);
         x2 = (SINT16)LOADINTELWORD(dat.x2);          x2 = (SINT16)LOADINTELWORD(dat.x2);
Line 509  REG8 lio_gget(LIOWORK lio) { Line 509  REG8 lio_gget(LIOWORK lio) {
         if (leng < (size + 4)) {          if (leng < (size + 4)) {
                 return(LIO_ILLEGALFUNC);                  return(LIO_ILLEGALFUNC);
         }          }
         i286_memword_write(seg, off, (REG16)x2);          MEML_WRITE16(seg, off, (REG16)x2);
         i286_memword_write(seg, off+2, (REG16)y2);          MEML_WRITE16(seg, off+2, (REG16)y2);
         off += 4;          off += 4;
         gt.addr = (x >> 3) + (y * 80);          gt.addr = (x >> 3) + (y * 80);
         if (lio->draw.flag & LIODRAW_UPPER) {          if (lio->draw.flag & LIODRAW_UPPER) {
Line 526  REG8 lio_gget(LIOWORK lio) { Line 526  REG8 lio_gget(LIOWORK lio) {
                         if (mask & 8) {                          if (mask & 8) {
                                 gt.baseptr = mem + lio->draw.base + lioplaneadrs[pl];                                  gt.baseptr = mem + lio->draw.base + lioplaneadrs[pl];
                                 getvram(&gt, pat);                                  getvram(&gt, pat);
                                 i286_memstr_write(seg, off, pat, datacnt);                                  MEML_WRITESTR(seg, off, pat, datacnt);
                                 off += datacnt;                                  off += datacnt;
                         }                          }
                 }                  }
Line 539  REG8 lio_gget(LIOWORK lio) { Line 539  REG8 lio_gget(LIOWORK lio) {
   
 // ---- GPUT1  // ---- GPUT1
   
 REG8 lio_gput1(LIOWORK lio) {  REG8 lio_gput1(GLIO lio) {
   
         GPUT1   dat;          GPUT1   dat;
         LIOPUT  lput;          LIOPUT  lput;
Line 547  REG8 lio_gput1(LIOWORK lio) { Line 547  REG8 lio_gput1(LIOWORK lio) {
         UINT    size;          UINT    size;
   
         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));
         lput.x = (SINT16)LOADINTELWORD(dat.x);          lput.x = (SINT16)LOADINTELWORD(dat.x);
         lput.y = (SINT16)LOADINTELWORD(dat.y);          lput.y = (SINT16)LOADINTELWORD(dat.y);
         lput.off = (UINT16)(LOADINTELWORD(dat.off) + 4);          lput.off = (UINT16)(LOADINTELWORD(dat.off) + 4);
         lput.seg = LOADINTELWORD(dat.seg);          lput.seg = LOADINTELWORD(dat.seg);
         lput.mode = dat.mode;          lput.mode = dat.mode;
         leng = LOADINTELWORD(dat.leng);          leng = LOADINTELWORD(dat.leng);
         lput.width = i286_memword_read(lput.seg, lput.off - 4);          lput.width = MEML_READ16(lput.seg, lput.off - 4);
         lput.height = i286_memword_read(lput.seg, lput.off - 2);          lput.height = MEML_READ16(lput.seg, lput.off - 2);
         size = ((lput.width + 7) >> 3) * lput.height;          size = ((lput.width + 7) >> 3) * lput.height;
         if (leng < (size + 4)) {          if (leng < (size + 4)) {
                 return(LIO_ILLEGALFUNC);                  return(LIO_ILLEGALFUNC);
Line 567  REG8 lio_gput1(LIOWORK lio) { Line 567  REG8 lio_gput1(LIOWORK lio) {
                         lput.bg = dat.bg;                          lput.bg = dat.bg;
                 }                  }
                 else {                  else {
                         lput.fg = lio->mem.fgcolor;                          lput.fg = lio->work.fgcolor;
                         lput.bg = lio->mem.bgcolor;                          lput.bg = lio->work.bgcolor;
                 }                  }
         }          }
         else {          else {
Line 589  REG8 lio_gput1(LIOWORK lio) { Line 589  REG8 lio_gput1(LIOWORK lio) {
   
 // ---- GPUT2  // ---- GPUT2
   
 REG8 lio_gput2(LIOWORK lio) {  REG8 lio_gput2(GLIO lio) {
   
         GPUT2   dat;          GPUT2   dat;
         LIOPUT  lput;          LIOPUT  lput;
Line 597  REG8 lio_gput2(LIOWORK lio) { Line 597  REG8 lio_gput2(LIOWORK lio) {
         REG16   size;          REG16   size;
   
         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));
         lput.x = (SINT16)LOADINTELWORD(dat.x);          lput.x = (SINT16)LOADINTELWORD(dat.x);
         lput.y = (SINT16)LOADINTELWORD(dat.y);          lput.y = (SINT16)LOADINTELWORD(dat.y);
         jis = LOADINTELWORD(dat.chr);          jis = LOADINTELWORD(dat.chr);
Line 621  REG8 lio_gput2(LIOWORK lio) { Line 621  REG8 lio_gput2(LIOWORK lio) {
                 lput.bg = dat.bg;                  lput.bg = dat.bg;
         }          }
         else {          else {
                 lput.fg = lio->mem.fgcolor;                  lput.fg = lio->work.fgcolor;
                 lput.bg = lio->mem.bgcolor;                  lput.bg = lio->work.bgcolor;
         }          }
         return(putsub(lio, &lput));          return(putsub(lio, &lput));
 }  }

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


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