Package: tecnoballz
Version: 0.91-1
Severity: normal
Tags: patch

When building 'tecnoballz' on amd64/unstable with gcc-4.0,
I get the following error:

g++  -Wall -pthread -D_REENTRANT -I/usr/X11R6/includes     -c -o 
src/fond_ecran.o src/fond_ecran.cc
src/fond_ecran.cc: In member function 'Sint32 fond_ecran::instalFond(Sint32)':
src/fond_ecran.cc:136: error: cast from 'ecran_hard*' to 'Sint32' loses 
precision
src/fond_ecran.cc:137: error: cast from 'GIF_bitMap*' to 'Sint32' loses 
precision
make[1]: *** [src/fond_ecran.o] Error 1
make[1]: Leaving directory `/tecnoballz-0.91'
make: *** [build-stamp] Error 2

With the attached patch 'tecnoballz' can be compiled
on amd64 using gcc-4.0.

Regards
Andreas Jochens

diff -urN ../tmp-orig/tecnoballz-0.91/src/RAM_killer.cc ./src/RAM_killer.cc
--- ../tmp-orig/tecnoballz-0.91/src/RAM_killer.cc       2005-01-04 
16:13:14.000000000 +0100
+++ ./src/RAM_killer.cc 2005-04-05 08:04:38.846212771 +0200
@@ -139,8 +139,8 @@
        }
        if(adres)
        {       adrNoFound++;
-               fprintf(stderr, "RAM_killer::liberation() : %i) address %x not 
found\n",
-                       adrNoFound, (Sint32)adres);
+               fprintf(stderr, "RAM_killer::liberation() : %i) address %lx not 
found\n",
+                       adrNoFound, (long)adres);
        }
 }
 
@@ -155,8 +155,8 @@
                {       char* adres = memPT->adresseMem;
                        if(adres)
                        {       fprintf(stderr,
-                                       "RAM_killer::libereTout() : addr:%x; 
size:%i; id:%x\n",
-                                       (Sint32)memPT->adresseMem, 
memPT->taille_mem,
+                                       "RAM_killer::libereTout() : addr:%lx; 
size:%i; id:%x\n",
+                                       (long)memPT->adresseMem, 
memPT->taille_mem,
                                        (Sint32)memPT->identifier);
                                free(adres);    //release memory
                                octetTotal -= memPT->taille_mem;
diff -urN ../tmp-orig/tecnoballz-0.91/src/fond_ecran.cc ./src/fond_ecran.cc
--- ../tmp-orig/tecnoballz-0.91/src/fond_ecran.cc       2005-01-11 
12:02:11.000000000 +0100
+++ ./src/fond_ecran.cc 2005-04-05 08:03:21.876644170 +0200
@@ -133,8 +133,8 @@
        // display background map 
        //###############################################################
        Sint32 src_X = 0;
-       Sint32 h = (Sint32)ecran;       //use pointer address as random value
-       Sint32 k = (Sint32)fonds;       //use pointer address as random value
+       Sint32 h = (long)ecran; //use pointer address as random value
+       Sint32 k = (long)fonds; //use pointer address as random value
        Sint32 nline;
        if(mVert > 0)
                nline = mVert;
diff -urN ../tmp-orig/tecnoballz-0.91/src/mentatCode.cc ./src/mentatCode.cc
--- ../tmp-orig/tecnoballz-0.91/src/mentatCode.cc       2005-01-23 
20:52:24.000000000 +0100
+++ ./src/mentatCode.cc 2005-04-05 08:04:07.162153369 +0200
@@ -85,7 +85,7 @@
 {
        if(is_verbose)
                printf("mentatCode::first_init() [START]\n");
-       hasard_val = (Sint32)first_init;
+       hasard_val = (long)first_init;
        memGestion = new RAM_killer();
        memGestion->initialise(8000);
        num_erreur = memGestion->retour_err();
@@ -336,16 +336,16 @@
                printf("==6 ptScoreTab\n");
        delete ptScoreTab;
        if(is_verbose)
-               printf("==7 ecran_gere %x\n", (Sint32)ecran_gere);
+               printf("==7 ecran_gere %lx\n", (long)ecran_gere);
        delete ecran_gere;
 #ifndef SOUNDISOFF
        if(is_verbose)
-               printf("==8 audiomixer %x\n", (Sint32)ptAudiomix);
+               printf("==8 audiomixer %lx\n", (long)ptAudiomix);
        delete ptAudiomix;
 #endif
        delete pRessource;
        if(is_verbose)
-               printf("==9 memGestion %x \n", (Sint32)memGestion);
+               printf("==9 memGestion %lx \n", (long)memGestion);
        delete memGestion;
        return num_erreur;
 }
diff -urN ../tmp-orig/tecnoballz-0.91/src/tecno_boui.cc ./src/tecno_boui.cc
--- ../tmp-orig/tecnoballz-0.91/src/tecno_boui.cc       2005-01-04 
16:13:14.000000000 +0100
+++ ./src/tecno_boui.cc 2005-04-05 08:05:16.732109360 +0200
@@ -63,7 +63,7 @@
                        {       if(!over_brick(position_x, position_y))
                                {       flag_actif = 1;
                                        Sint32 *monPT = ghost_bobs + 
(hasard_val & 31);
-                                       hasard_val += (Sint32)this;
+                                       hasard_val += (long)this;
                                        Sint32 k = *monPT;
                                        miniOffset = k;
                                        animOffset = k;
@@ -190,7 +190,7 @@
        i *= 2;
        i &= 31;
        atom_traje = i;
-       hasard_val += (Sint32)this;
+       hasard_val += (long)this;
        
        
        i = 4 * resolution;
diff -urN ../tmp-orig/tecnoballz-0.91/src/zeNewBalls.cc ./src/zeNewBalls.cc
--- ../tmp-orig/tecnoballz-0.91/src/zeNewBalls.cc       2005-01-04 
16:13:14.000000000 +0100
+++ ./src/zeNewBalls.cc 2005-04-05 08:06:23.646563243 +0200
@@ -628,8 +628,8 @@
                                        j = balle->directBall;
                                        //(char *)monPT += j;
                                        monPT = (Sint32 *)((char *)monPT + j); 
-                                       printf("monPT = %x / bumpX->rebonds_GD 
= %x / *monPT = %i\n",
-                                               (Sint32)monPT, 
(Sint32)bumpX->rebonds_GD, *monPT);
+                                       printf("monPT = %lx / bumpX->rebonds_GD 
= %lx / *monPT = %i\n",
+                                               (long)monPT, 
(long)bumpX->rebonds_GD, *monPT);
                                        
                                        printf("%i %i\n", 
bumpX->rebonds_GD[16], bumpX->rebonds_GD[64]);
                                        j = 60;
diff -urN ../tmp-orig/tecnoballz-0.91/src/ze_magneye.cc ./src/ze_magneye.cc
--- ../tmp-orig/tecnoballz-0.91/src/ze_magneye.cc       2005-01-04 
16:13:14.000000000 +0100
+++ ./src/ze_magneye.cc 2005-04-05 08:05:42.169340010 +0200
@@ -69,7 +69,7 @@
        for(Sint32 i = 0; i < objetTotal; i++)
        {       techno_eye *ptEye = objetListe[i];
                ptEye->centerPosx = Xcoordinat[hval & 31]  * resolution;
-               hval += (Sint32)ptEye;
+               hval += (long)ptEye;
                ptEye->centerPosy = Ycoordinat[hval & 31]  * resolution;
                hval += keyGestion->sourisGetY();
                ptEye->finishPosx = Xcoordinat[hval & 31]  * resolution;


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to