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