> Saving games on an i386 machine, then trying to load them on an amd64
> doesn't work.

Wow, I'd better not ask how you happened to try this.. :)

> Looking at the code, it appears it's making an attempt 
> to be architecture independent, so I'm pretty sure this is a bug.

With some luck, it's just that u16 is not really 16 bit or u32 bit is not 
really 32 bit. Could you please try and copy the attached patch to 
debian/patches/, rebuild and see if it works?

- Jarno
diff -Naur src-old/agi.h src/agi.h
--- src-old/agi.h	2005-08-29 23:14:25.000000000 +0300
+++ src/agi.h	2005-08-29 23:16:14.000000000 +0300
@@ -3,6 +3,7 @@
 
 // the only include file i should include in an include file
 #include <SDL/SDL.h>
+#include <stdint.h>
 
 // ok no warning here
 
@@ -32,12 +33,12 @@
 
 
 
-typedef unsigned char	u8;
-typedef unsigned short	u16;
-typedef unsigned long	u32;
-typedef signed char		s8;
-typedef signed short		s16;
-typedef signed long		s32;
+typedef uint8_t	u8;
+typedef uint16_t	u16;
+typedef uint32_t	u32;
+typedef int8_t		s8;
+typedef int16_t		s16;
+typedef int32_t		s32;
 
 #ifndef RAD_LINUX
 typedef unsigned int		uint;
diff -Naur src-old/read_agidata.c src/read_agidata.c
--- src-old/read_agidata.c	2005-08-29 23:14:25.000000000 +0300
+++ src/read_agidata.c	2005-08-29 23:17:04.000000000 +0300
@@ -1,9 +1,11 @@
-typedef unsigned char	u8;
-typedef unsigned short	u16;
-typedef unsigned long	u32;
-typedef signed char		s8;
-typedef signed short		s16;
-typedef signed long		s32;
+#include <stdint.h>
+
+typedef uint8_t	u8;
+typedef uint16_t	u16;
+typedef uint32_t	u32;
+typedef int8_t		s8;
+typedef int16_t		s16;
+typedef int32_t		s32;
 typedef unsigned int		uint;
 typedef signed int		sint;
 
diff -Naur src-old/tools/savefont.c src/tools/savefont.c
--- src-old/tools/savefont.c	2005-08-29 23:14:25.000000000 +0300
+++ src/tools/savefont.c	2005-08-29 23:18:23.000000000 +0300
@@ -1,14 +1,13 @@
 #include <stdlib.h>
 #include <stdio.h>
+#include <stdint.h>
 
-
-
-typedef unsigned char	u8;
-typedef unsigned short	u16;
-typedef unsigned long	u32;
-typedef signed char		s8;
-typedef signed short		s16;
-typedef signed long		s32;
+typedef uint8_t	u8;
+typedef uint16_t	u16;
+typedef uint32_t	u32;
+typedef int8_t		s8;
+typedef int16_t		s16;
+typedef int32_t		s32;
 typedef unsigned int		uint;
 typedef signed int		sint;
 

Reply via email to