|
|
| version 1.5, 2004/02/21 00:25:33 | version 1.9, 2004/02/21 20:48:52 |
|---|---|
| Line 30 typedef struct { | Line 30 typedef struct { |
| } LINEPT; | } LINEPT; |
| static void gline(const _LIOWORK *lio, const LINEPT *lp) { | static void gline(const _GLIO *lio, const LINEPT *lp) { |
| int x1; | int x1; |
| int y1; | int y1; |
| Line 132 static void gline(const _LIOWORK *lio, c | Line 132 static void gline(const _LIOWORK *lio, c |
| pat = (UINT16)((lp->pat >> d1) | (lp->pat << (16 - d1))); | pat = (UINT16)((lp->pat >> d1) | (lp->pat << (16 - d1))); |
| csrw = (y1 * 40) + (x1 >> 4) + ((x1 & 0xf) << 20); | csrw = (y1 * 40) + (x1 >> 4) + ((x1 & 0xf) << 20); |
| if (lio->draw.flag & LIODRAW_UPPER) { | |
| csrw += 16000 >> 1; | |
| } | |
| gdcsub_setvectl(&vect, x1, y1, x2, y2); | gdcsub_setvectl(&vect, x1, y1, x2, y2); |
| if (lio->scrn.plane & 0x80) { | if (!(lio->draw.flag & LIODRAW_MONO)) { |
| gdcsub_vectl(csrw + 0x4000, &vect, pat, | gdcsub_vectl(csrw + 0x4000, &vect, pat, |
| (lp->pal & 1)?GDCOPE_SET:GDCOPE_CLEAR); | (REG8)((lp->pal & 1)?GDCOPE_SET:GDCOPE_CLEAR)); |
| gdcsub_vectl(csrw + 0x8000, &vect, pat, | gdcsub_vectl(csrw + 0x8000, &vect, pat, |
| (lp->pal & 2)?GDCOPE_SET:GDCOPE_CLEAR); | (REG8)((lp->pal & 2)?GDCOPE_SET:GDCOPE_CLEAR)); |
| gdcsub_vectl(csrw + 0xc000, &vect, pat, | gdcsub_vectl(csrw + 0xc000, &vect, pat, |
| (lp->pal & 4)?GDCOPE_SET:GDCOPE_CLEAR); | (REG8)((lp->pal & 4)?GDCOPE_SET:GDCOPE_CLEAR)); |
| if (lio->gcolor1.palmode == 2) { | if (lio->draw.flag & LIODRAW_4BPP) { |
| gdcsub_vectl(csrw, &vect, pat, | gdcsub_vectl(csrw, &vect, pat, |
| (lp->pal & 8)?GDCOPE_SET:GDCOPE_CLEAR); | (REG8)((lp->pal & 8)?GDCOPE_SET:GDCOPE_CLEAR)); |
| } | } |
| } | } |
| else { | else { |
| csrw += ((lio->scrn.plane + 1) & 3) << 12; | csrw += ((lio->draw.flag + 1) & LIODRAW_PMASK) << 12; |
| gdcsub_vectl(csrw, &vect, pat, (lp->pal)?GDCOPE_SET:GDCOPE_CLEAR); | gdcsub_vectl(csrw, &vect, pat, |
| (REG8)((lp->pal)?GDCOPE_SET:GDCOPE_CLEAR)); | |
| } | } |
| } | } |
| // ---- | // ---- |
| static void nor_linebox(const _LIOWORK *lio, SINT16 x1, SINT16 y1, | static void nor_linebox(const _GLIO *lio, SINT16 x1, SINT16 y1, |
| SINT16 x2, SINT16 y2, REG8 pal) { | SINT16 x2, SINT16 y2, REG8 pal) { |
| lio_line(lio, x1, x2, y1, pal); | lio_line(lio, x1, x2, y1, pal); |
| Line 167 static void nor_linebox(const _LIOWORK * | Line 171 static void nor_linebox(const _LIOWORK * |
| } | } |
| } | } |
| static void nor_lineboxfill(const _LIOWORK *lio, SINT16 x1, SINT16 y1, | static void nor_lineboxfill(const _GLIO *lio, SINT16 x1, SINT16 y1, |
| SINT16 x2, SINT16 y2, REG8 pal) { | SINT16 x2, SINT16 y2, REG8 pal) { |
| for (; y1<=y2; y1++) { | for (; y1<=y2; y1++) { |
| Line 178 static void nor_lineboxfill(const _LIOWO | Line 182 static void nor_lineboxfill(const _LIOWO |
| // ---- | // ---- |
| REG8 lio_gline(LIOWORK lio) { | REG8 lio_gline(GLIO lio) { |
| GLINE dat; | GLINE dat; |
| LINEPT lp; | LINEPT lp; |
| Line 190 REG8 lio_gline(LIOWORK lio) { | Line 194 REG8 lio_gline(LIOWORK lio) { |
| lio_updatedraw(lio); | lio_updatedraw(lio); |
| i286_memstr_read(CPU_DS, CPU_BX, &dat, sizeof(dat)); | i286_memstr_read(CPU_DS, CPU_BX, &dat, sizeof(dat)); |
| if (dat.pal == 0xff) { | if (dat.pal == 0xff) { |
| lp.pal = lio->gcolor1.fgcolor; | lp.pal = lio->work.fgcolor; |
| } | } |
| else { | else { |
| lp.pal = dat.pal; | lp.pal = dat.pal; |
| } | } |
| if (lp.pal >= lio->gcolor1.palmax) { | if (lp.pal >= lio->draw.palmax) { |
| return(LIO_ILLEGALFUNC); | return(LIO_ILLEGALFUNC); |
| } | } |
| 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(("line %d %d %d %d", lp.x1, lp.y1, lp.x2, lp.y2)); | |
| if (dat.sw) { | if (dat.sw) { |
| lp.pat = (GDCPATREVERSE(dat.style[0]) << 8) + | lp.pat = (GDCPATREVERSE(dat.style[0]) << 8) + |
| GDCPATREVERSE(dat.style[1]); | GDCPATREVERSE(dat.style[1]); |
| Line 209 REG8 lio_gline(LIOWORK lio) { | Line 214 REG8 lio_gline(LIOWORK lio) { |
| else { | else { |
| lp.pat = 0xffff; | lp.pat = 0xffff; |
| } | } |
| if (dat.pal == 0xff) { | if (dat.pal == 0xff) { |
| dat.pal = lio->gcolor1.fgcolor; | dat.pal = lio->work.fgcolor; |
| } | } |
| else if (dat.pal >= lio->gcolor1.palmax) { | else if (dat.pal >= lio->draw.palmax) { |
| return(5); | return(5); |
| } | } |
| x1 = (SINT16)LOADINTELWORD(dat.x1); | x1 = (SINT16)LOADINTELWORD(dat.x1); |
| Line 223 REG8 lio_gline(LIOWORK lio) { | Line 226 REG8 lio_gline(LIOWORK lio) { |
| y2 = (SINT16)LOADINTELWORD(dat.y2); | y2 = (SINT16)LOADINTELWORD(dat.y2); |
| switch(dat.type) { | switch(dat.type) { |
| case 0: | case 0: |
| // gline0(); | gline(lio, &lp); |
| break; | break; |
| case 1: | case 1: |