|
|
1.1 root 1:
2: static int LNAME (int spix, int dpix, int stoppos)
3: {
4: TYPE *buf = ((TYPE *)xlinebuffer);
1.1.1.2 ! root 5: uae_u8 xor_val;
1.1 root 6:
1.1.1.2 ! root 7: if (AGA) xor_val = (uae_u8)(dp_for_drawing->bplcon4 >> 8);
! 8: if (bplham && bplplanecnt >= 6) {
! 9: /* HAM 6 / HAM 8 */
1.1 root 10: while (dpix < stoppos) {
1.1.1.2 ! root 11: TYPE d = AGA ? CONVERT_RGB (ham_linebuf[spix]) : xcolors[ham_linebuf[spix]];
1.1 root 12: spix += SRC_INC;
13: buf[dpix++] = d;
14: if (HDOUBLE)
15: buf[dpix++] = d;
16: }
17: } else if (bpldualpf) {
1.1.1.2 ! root 18: /* Dual playfield (AGA broken) */
1.1 root 19: int *lookup = bpldualpfpri ? dblpf_ind2 : dblpf_ind1;
20: while (dpix < stoppos) {
21: int pixcol = pixdata.apixels[spix];
22: TYPE d = colors_for_drawing.acolors[lookup[pixcol]];
23: spix += SRC_INC;
24: buf[dpix++] = d;
25: if (HDOUBLE)
26: buf[dpix++] = d;
27: }
28: } else if (bplehb) {
29: while (dpix < stoppos) {
30: int p = pixdata.apixels[spix];
31: TYPE d = colors_for_drawing.acolors[p];
32: spix += SRC_INC;
1.1.1.2 ! root 33: if (AGA) {
! 34: /* AGA EHB playfield */
! 35: int ehbtmp = (p >= 32
! 36: ? (colors_for_drawing.color_regs_aga[(p-32)^xor_val] >> 1) & 0x7F7F7F
! 37: : colors_for_drawing.color_regs_aga[p]);
! 38: d = CONVERT_RGB (ehbtmp);
! 39: } else {
! 40: /* OCS/ECS EHB playfield */
! 41: if (p >= 32)
! 42: d = xcolors[(colors_for_drawing.color_regs_ecs[p-32] >> 1) & 0x777];
! 43: }
1.1 root 44: buf[dpix++] = d;
45: if (HDOUBLE)
46: buf[dpix++] = d;
47: }
48: } else {
49: while (dpix < stoppos) {
1.1.1.2 ! root 50: TYPE d = (AGA ? colors_for_drawing.acolors[pixdata.apixels[spix]^xor_val]
! 51: : colors_for_drawing.acolors[pixdata.apixels[spix]]);
1.1 root 52: spix += SRC_INC;
53: buf[dpix++] = d;
54: if (HDOUBLE)
55: buf[dpix++] = d;
56: }
57: }
58: return spix;
59: }
60:
61: #undef LNAME
62: #undef HDOUBLE
63: #undef SRC_INC
1.1.1.2 ! root 64: #undef AGA
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.