Package: xmoto
Version: 0.1.6.dfsg-4
Severity: important
Tags: patch
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On big endian platforms such as my Apple Titanium PowerBook, xmoto fails to
start:
User directory: /home/michdaen/.xmoto
Data directory: /usr/share/xmoto
Initializing binary data package...
GL: Mesa DRI R200 20050831 AGP 4x PowerPC/Altivec TCL (Tungsten Graphics,
Inc.)
GL: using Vertex Buffer Objects
Loading profiles...
1 profile loaded
Initializing sound system...
Loading data...
** Warning ** : TextureManager::loadTexture() : texture
'Textures/UI/Loading.png' not found or invalid
fatal exception : invalid or missing texture file
I tracked down the problem to an endianness bug when reading .dat files. The
attached patch makes it work fine for me.
- -- System Information:
Debian Release: testing/unstable
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'stable'), (102, 'experimental'), (101,
'breezy-security'), (101, 'breezy')
Architecture: powerpc (ppc)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.12-1-powerpc
Locale: LANG=de_CH.UTF-8, LC_CTYPE=de_CH.UTF-8 (charmap=UTF-8)
Versions of packages xmoto depends on:
ii libc6 2.3.5-7 GNU C Library: Shared libraries an
ii libgcc1 1:4.0.2-2 GCC support library
ii libgl1-mesa-d 6.3.2-2.2 A free implementation of the OpenG
ii libjpeg62 6b-10 The Independent JPEG Group's JPEG
ii libogg0 1.1.2-1 Ogg Bitstream Library
hi libpng12-0 1.2.8rel-5 PNG library - runtime
ii libsdl1.2debi 1.2.7+1.2.8cvs20041007-5.3 Simple DirectMedia Layer
ii libstdc++6 4.0.2-2 The GNU Standard C++ Library v3
ii libvorbis0a 1.1.0-1 The Vorbis General Audio Compressi
ii libvorbisfile 1.1.0-1 The Vorbis General Audio Compressi
ii xmoto-data 0.1.6.dfsg-4 2D motocross platform game
xmoto recommends no packages.
- -- no debconf information
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
iD8DBQFDXgy1WoGvjmrbsgARAsTuAJ9ifXPU8f52uNFj2Kb9Aq8ZZ9uXIACZAZon
VKggrlgXYIOozOREiOuf9OA=
=swgf
-----END PGP SIGNATURE-----
diff -up -ru xmoto-0.1.6.dfsg.orig/src/VFileIO.cpp xmoto-0.1.6.dfsg/src/VFileIO.cpp
--- xmoto-0.1.6.dfsg.orig/src/VFileIO.cpp 2005-10-03 15:43:18.000000000 +0200
+++ xmoto-0.1.6.dfsg/src/VFileIO.cpp 2005-10-25 12:37:42.598390397 +0200
@@ -834,7 +834,9 @@ namespace vapp {
/* Read file size */
int nSize;
- fread(&nSize,4,1,fp);
+ unsigned char nSizeBuf[4];
+ fread(nSizeBuf,4,1,fp);
+ nSize = nSizeBuf[0] | nSizeBuf[1] << 8 | nSizeBuf[2] << 16 | nSizeBuf[3] << 24;
if(m_nNumPackFiles < MAX_PACK_FILES) {
m_PackFiles[m_nNumPackFiles].Name = cBuf;