|
|
1.1.1.2 root 1: /* Screen Conversion, Low Res to 320x16Bit */
1.1 root 2:
1.1.1.4 root 3: static void ConvertLowRes_320x16Bit(void)
1.1 root 4: {
1.1.1.2 root 5: Uint32 *edi, *ebp;
6: Uint16 *esi;
1.1.1.3 root 7: Uint32 eax, edx;
1.1.1.4 root 8: Uint32 ebx, ecx;
9: int y, x;
1.1 root 10:
1.1.1.2 root 11: Convert_StartFrame(); /* Start frame, track palettes */
1.1 root 12:
1.1.1.4 root 13: for (y = STScreenStartHorizLine; y < STScreenEndHorizLine; y++) {
14:
15: eax = STScreenLineOffset[y] + STScreenLeftSkipBytes; /* Offset for this line + Amount to skip on left hand side */
1.1.1.2 root 16: edi = (Uint32 *)((Uint8 *)pSTScreen + eax); /* ST format screen 4-plane 16 colours */
17: ebp = (Uint32 *)((Uint8 *)pSTScreenCopy + eax); /* Previous ST format screen */
1.1.1.3 root 18: esi = (Uint16 *)pPCScreenDest; /* PC format screen */
1.1 root 19:
1.1.1.4 root 20: AdjustLinePaletteRemap(y);
1.1 root 21:
1.1.1.4 root 22: x = STScreenWidthBytes>>3; /* Amount to draw across in 16-pixels(8 bytes) */
1.1 root 23:
24: do /* x-loop */
25: {
26: /* Do 16 pixels at one time */
27: ebx=*edi;
28: ecx=*(edi+1);
29:
1.1.1.3 root 30: if( (ScrUpdateFlag&0xe0000000) || ebx!=*ebp || ecx!=*(ebp+1) ) /* Does differ? */
31: { /* copy word */
1.1 root 32:
33: bScreenContentsChanged=TRUE;
34:
1.1.1.2 root 35: #if SDL_BYTEORDER == SDL_BIG_ENDIAN
1.1 root 36: /* Plot pixels */
37: LOW_BUILD_PIXELS_0 ; /* Generate 'ecx' as pixels [4,5,6,7] */
38: PLOT_LOW_320_16BIT(12) ;
39: LOW_BUILD_PIXELS_1 ; /* Generate 'ecx' as pixels [12,13,14,15] */
40: PLOT_LOW_320_16BIT(4) ;
41: LOW_BUILD_PIXELS_2 ; /* Generate 'ecx' as pixels [0,1,2,3] */
42: PLOT_LOW_320_16BIT(8) ;
43: LOW_BUILD_PIXELS_3 ; /* Generate 'ecx' as pixels [8,9,10,11] */
44: PLOT_LOW_320_16BIT(0) ;
45: #else
46: /* Plot pixels */
47: LOW_BUILD_PIXELS_0 ; /* Generate 'ecx' as pixels [4,5,6,7] */
48: PLOT_LOW_320_16BIT(4) ;
49: LOW_BUILD_PIXELS_1 ; /* Generate 'ecx' as pixels [12,13,14,15] */
50: PLOT_LOW_320_16BIT(12) ;
51: LOW_BUILD_PIXELS_2 ; /* Generate 'ecx' as pixels [0,1,2,3] */
52: PLOT_LOW_320_16BIT(0) ;
53: LOW_BUILD_PIXELS_3 ; /* Generate 'ecx' as pixels [8,9,10,11] */
54: PLOT_LOW_320_16BIT(8) ;
55: #endif
56: }
57:
58: esi += 16; /* Next PC pixels */
59: edi += 2; /* Next ST pixels */
60: ebp += 2; /* Next ST copy pixels */
61: }
1.1.1.4 root 62: while( --x ); /* Loop on X */
1.1 root 63:
1.1.1.5 ! root 64: pPCScreenDest = (((Uint8 *)pPCScreenDest)+PCScreenBytesPerLine); /* Offset to next line */
1.1 root 65: }
66: }
67:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.