Mercurial > sdl-ios-xcode
comparison src/video/SDL_blit_A.c @ 1456:84de7511f79f
Fixed a bunch of 64-bit compatibility problems
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Wed, 01 Mar 2006 09:43:47 +0000 |
parents | 9ebbbb4ae53b |
children | dc6b59e925a2 |
comparison
equal
deleted
inserted
replaced
1455:f487bb150acc | 1456:84de7511f79f |
---|---|
1440 int srcskip = info->s_skip >> 1; | 1440 int srcskip = info->s_skip >> 1; |
1441 Uint16 *dstp = (Uint16 *)info->d_pixels; | 1441 Uint16 *dstp = (Uint16 *)info->d_pixels; |
1442 int dstskip = info->d_skip >> 1; | 1442 int dstskip = info->d_skip >> 1; |
1443 | 1443 |
1444 while(height--) { | 1444 while(height--) { |
1445 if(((unsigned long)srcp ^ (unsigned long)dstp) & 2) { | 1445 if(((uintptr_t)srcp ^ (uintptr_t)dstp) & 2) { |
1446 /* | 1446 /* |
1447 * Source and destination not aligned, pipeline it. | 1447 * Source and destination not aligned, pipeline it. |
1448 * This is mostly a win for big blits but no loss for | 1448 * This is mostly a win for big blits but no loss for |
1449 * small ones | 1449 * small ones |
1450 */ | 1450 */ |
1451 Uint32 prev_sw; | 1451 Uint32 prev_sw; |
1452 int w = width; | 1452 int w = width; |
1453 | 1453 |
1454 /* handle odd destination */ | 1454 /* handle odd destination */ |
1455 if((unsigned long)dstp & 2) { | 1455 if((uintptr_t)dstp & 2) { |
1456 Uint16 d = *dstp, s = *srcp; | 1456 Uint16 d = *dstp, s = *srcp; |
1457 *dstp = BLEND16_50(d, s, mask); | 1457 *dstp = BLEND16_50(d, s, mask); |
1458 dstp++; | 1458 dstp++; |
1459 srcp++; | 1459 srcp++; |
1460 w--; | 1460 w--; |
1497 } else { | 1497 } else { |
1498 /* source and destination are aligned */ | 1498 /* source and destination are aligned */ |
1499 int w = width; | 1499 int w = width; |
1500 | 1500 |
1501 /* first odd pixel? */ | 1501 /* first odd pixel? */ |
1502 if((unsigned long)srcp & 2) { | 1502 if((uintptr_t)srcp & 2) { |
1503 Uint16 d = *dstp, s = *srcp; | 1503 Uint16 d = *dstp, s = *srcp; |
1504 *dstp = BLEND16_50(d, s, mask); | 1504 *dstp = BLEND16_50(d, s, mask); |
1505 srcp++; | 1505 srcp++; |
1506 dstp++; | 1506 dstp++; |
1507 w--; | 1507 w--; |