src/video/SDL_blit_1.c
changeset 91 e85e03f195b4
parent 0 74212992fb08
child 252 e8157fcb3114
equal deleted inserted replaced
90:ee1f71c10889 91:e85e03f195b4
   135 					(map[src[HI]]<<16)|(map[src[LO]]);
   135 					(map[src[HI]]<<16)|(map[src[LO]]);
   136 				src += 2;
   136 				src += 2;
   137 				dst += 4;
   137 				dst += 4;
   138 			}
   138 			}
   139 			/* Get any leftovers */
   139 			/* Get any leftovers */
   140 			switch (width % 4) {
   140 			switch (width & 3) {
   141 				case 3:
   141 				case 3:
   142 					*(Uint16 *)dst = map[*src++];
   142 					*(Uint16 *)dst = map[*src++];
   143 					dst += 2;
   143 					dst += 2;
   144 				case 2:
   144 				case 2:
   145 					*(Uint32 *)dst =
   145 					*(Uint32 *)dst =
   167 					(map[src[HI]]<<16)|(map[src[LO]]);
   167 					(map[src[HI]]<<16)|(map[src[LO]]);
   168 				src += 2;
   168 				src += 2;
   169 				dst += 4;
   169 				dst += 4;
   170 			}
   170 			}
   171 			/* Get any leftovers */
   171 			/* Get any leftovers */
   172 			switch (width % 4) {
   172 			switch (width & 3) {
   173 				case 3:
   173 				case 3:
   174 					*(Uint16 *)dst = map[*src++];
   174 					*(Uint16 *)dst = map[*src++];
   175 					dst += 2;
   175 					dst += 2;
   176 				case 2:
   176 				case 2:
   177 					*(Uint32 *)dst =
   177 					*(Uint32 *)dst =
   264 			*dst++ = map[*src++];
   264 			*dst++ = map[*src++];
   265 			*dst++ = map[*src++];
   265 			*dst++ = map[*src++];
   266 			*dst++ = map[*src++];
   266 			*dst++ = map[*src++];
   267 			*dst++ = map[*src++];
   267 			*dst++ = map[*src++];
   268 		}
   268 		}
   269 		switch ( width % 4 ) {
   269 		switch ( width & 3 ) {
   270 			case 3:
   270 			case 3:
   271 				*dst++ = map[*src++];
   271 				*dst++ = map[*src++];
   272 			case 2:
   272 			case 2:
   273 				*dst++ = map[*src++];
   273 				*dst++ = map[*src++];
   274 			case 1:
   274 			case 1: