tag 454306 + patch
thanks,

Investigating this issue, it seems that the fix could be rather trivial,
however as the package is superseeded by stratagus
( http://stratagus.org/ ) also packaged in debian freecraft could
probably be removed. anyway, also for stratagus development has stopped
as the developers are working on boswars ( http://www.boswars.org ) also
in debian.


Regarding the fix, thanks to the increadible helpful bugreport, we see

y=<value optimized out>) at src/video/obj/../graphic.c:224
224                 *dp++=pixels[*sp++];        // unroll

 array accesses to pixels, which is of type VMemType32*. VMemType32 is
defined in include/video.h as 

typedef unsigned long VMemType32;   /// 32 bpp modes pointer

which is obviously for 64bit archs 64 bit instead of 32 ...

As I don't have an amd64 arch at hand, could you please apply the
attached patch and check if it still compiles on amd64 and even works?

(it still works on my x86 based machine - nice game btw, maybe worth
rescuing it :)

Soeren
Index: freecraft-1.18/src/include/video.h
===================================================================
--- freecraft-1.18.orig/src/include/video.h	2008-04-13 09:32:37.000000000 +0200
+++ freecraft-1.18/src/include/video.h	2008-04-13 09:37:39.000000000 +0200
@@ -66,14 +66,16 @@
 #undef DrawIcon
 #endif
 
+#include <stdint.h>
+
 /*----------------------------------------------------------------------------
 --	Declarations
 ----------------------------------------------------------------------------*/
 
-typedef unsigned char VMemType8;	///  8 bpp modes pointer
-typedef unsigned short VMemType16;	/// 16 bpp modes pointer
+typedef uint8_t VMemType8;	///  8 bpp modes pointer
+typedef uint16_t VMemType16;	/// 16 bpp modes pointer
 typedef struct { char a,b,c;} VMemType24;/// 24 bpp modes pointer
-typedef unsigned long VMemType32;	/// 32 bpp modes pointer
+typedef uint32_t VMemType32;	/// 32 bpp modes pointer
 
 /**
 **	General video mode pointer.

Reply via email to