From: Jacek Konieczny Date: Fri, 30 Apr 2004 07:37:22 +0000 (+0000) Subject: - trying to fix crossfire-client build on big endian machines X-Git-Tag: auto/ac/crossfire-client-1_7_0-1_1~1 X-Git-Url: http://git.pld-linux.org/?p=packages%2Fcrossfire-client.git;a=commitdiff_plain;h=59faaf33cce574014f083aac622c148593d1bb82 - trying to fix crossfire-client build on big endian machines Changed files: crossfire-client-big_endian.patch -> 1.1 --- diff --git a/crossfire-client-big_endian.patch b/crossfire-client-big_endian.patch new file mode 100644 index 0000000..bd3e257 --- /dev/null +++ b/crossfire-client-big_endian.patch @@ -0,0 +1,18 @@ +--- crossfire-client-1.7.0.orig/gtk/image.c 2004-04-19 08:35:11.000000000 +0200 ++++ crossfire-client-1.7.0/gtk/image.c 2004-04-30 09:33:58.000000000 +0200 +@@ -193,11 +193,11 @@ + } + + for (i=0; i < pi->map_width * pi->map_height; i+= 4) { +- p = (uint32) (fog->pixels + i); +- g = ( ((p >> 24) & 0xff) + ((p >> 16) & 0xff) + ((p >> 8) & 0xff)) / 3; +- p = (g << 24) | (g << 16) | (g << 8) | (p & 0xff); ++ p = (uint32*) (fog->pixels + i); ++ g = ( ((*p >> 24) & 0xff) + ((*p >> 16) & 0xff) + ((*p >> 8) & 0xff)) / 3; ++ p = (g << 24) | (g << 16) | (g << 8) | (*p & 0xff); + l = (uint32*) fog->pixels + i; +- *(uint32*) l = p; ++ *(uint32*) l = *p; + } + + SDL_UnlockSurface(fog);