|
|
| version 1.11, 2004/02/22 00:52:55 | version 1.15, 2005/05/20 13:59:47 |
|---|---|
| Line 7 | Line 7 |
| typedef struct { | typedef struct { |
| BYTE x1[2]; | UINT8 x1[2]; |
| BYTE y1[2]; | UINT8 y1[2]; |
| BYTE x2[2]; | UINT8 x2[2]; |
| BYTE y2[2]; | UINT8 y2[2]; |
| BYTE pal; | UINT8 pal; |
| BYTE type; | UINT8 type; |
| BYTE sw; | UINT8 sw; |
| BYTE style[2]; | UINT8 style[2]; |
| BYTE patleng; | UINT8 patleng; |
| BYTE off[2]; | UINT8 off[2]; |
| BYTE seg[2]; | UINT8 seg[2]; |
| } GLINE; | } GLINE; |
| typedef struct { | typedef struct { |
| Line 178 static void glineb(const _GLIO *lio, con | Line 178 static void glineb(const _GLIO *lio, con |
| // ---- | // ---- |
| static void gbox(const _GLIO *lio, const LINEPT *lp, BYTE *tile, UINT leng) { | static void gbox(const _GLIO *lio, const LINEPT *lp, UINT8 *tile, UINT leng) { |
| int x1; | int x1; |
| int y1; | int y1; |
| Line 191 static void gbox(const _GLIO *lio, const | Line 191 static void gbox(const _GLIO *lio, const |
| UINT adrs[4]; | UINT adrs[4]; |
| UINT8 ope[4]; | UINT8 ope[4]; |
| UINT16 pat; | UINT16 pat; |
| BYTE *tterm; | UINT8 *tterm; |
| UINT r; | UINT r; |
| x1 = lp->x1; | x1 = lp->x1; |
| Line 248 static void gbox(const _GLIO *lio, const | Line 248 static void gbox(const _GLIO *lio, const |
| tmp = (x1 - lio->draw.x1) & 7; | tmp = (x1 - lio->draw.x1) & 7; |
| do { | do { |
| r = GDCPATREVERSE(*tile); | r = GDCPATREVERSE(*tile); |
| *tile = (BYTE)((r << tmp) | (r >> (8 - tmp))); | *tile = (UINT8)((r << tmp) | (r >> (8 - tmp))); |
| } while(++tile < tterm); | } while(++tile < tterm); |
| tile -= leng; | tile -= leng; |
| tmp = (y1 - lio->draw.y1) * planes; | tmp = (y1 - lio->draw.y1) * planes; |
| Line 300 REG8 lio_gline(GLIO lio) { | Line 300 REG8 lio_gline(GLIO lio) { |
| UINT16 pat; | UINT16 pat; |
| UINT leng; | UINT leng; |
| // UINT lengmin; | // UINT lengmin; |
| BYTE tile[256]; | UINT8 tile[256]; |
| lio_updatedraw(lio); | lio_updatedraw(lio); |
| i286_memstr_read(CPU_DS, CPU_BX, &dat, sizeof(dat)); | MEMR_READS(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); |
| lp.y2 = (SINT16)LOADINTELWORD(dat.y2); | lp.y2 = (SINT16)LOADINTELWORD(dat.y2); |
| TRACEOUT(("lio_gline %d,%d-%d,%d [%d]", lp.x1, lp.y1, lp.x2, lp.y2, dat.type)); | |
| if (dat.pal == 0xff) { | if (dat.pal == 0xff) { |
| lp.pal = lio->work.fgcolor; | dat.pal = lio->work.fgcolor; |
| } | |
| else { | |
| lp.pal = dat.pal; | |
| } | } |
| if (lp.pal >= lio->draw.palmax) { | if (dat.pal >= lio->draw.palmax) { |
| goto gline_err; | goto gline_err; |
| } | } |
| pat = 0xffff; | pat = 0xffff; |
| Line 323 REG8 lio_gline(GLIO lio) { | Line 323 REG8 lio_gline(GLIO lio) { |
| pat = (GDCPATREVERSE(dat.style[0]) << 8) + | pat = (GDCPATREVERSE(dat.style[0]) << 8) + |
| GDCPATREVERSE(dat.style[1]); | GDCPATREVERSE(dat.style[1]); |
| } | } |
| lp.pal = dat.pal; | |
| if (dat.type == 0) { | if (dat.type == 0) { |
| gline(lio, &lp, pat); | gline(lio, &lp, pat); |
| } | } |
| Line 337 REG8 lio_gline(GLIO lio) { | Line 338 REG8 lio_gline(GLIO lio) { |
| if (leng == 0) { | if (leng == 0) { |
| goto gline_err; | goto gline_err; |
| } | } |
| i286_memstr_read(LOADINTELWORD(dat.seg), LOADINTELWORD(dat.off), | MEMR_READS(LOADINTELWORD(dat.seg), LOADINTELWORD(dat.off), |
| tile, leng); | tile, leng); |
| } | } |
| gbox(lio, &lp, tile, leng); | if (dat.sw != 1) { |
| lp.pal = dat.pal; | |
| gbox(lio, &lp, tile, leng); | |
| } | |
| else { | |
| lp.pal = dat.style[0]; | |
| gbox(lio, &lp, tile, leng); | |
| lp.pal = dat.pal; | |
| glineb(lio, &lp, 0xffff); | |
| } | |
| } | } |
| else { | else { |
| goto gline_err; | goto gline_err; |