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