at 24.05-pre 391 lines 13 kB view raw
1diff -r -u Ri-li-2.0.1.orig/src/audio.cc Ri-li-2.0.1/src/audio.cc 2--- Ri-li-2.0.1.orig/src/audio.cc 2012-01-22 00:40:56.928609371 -0800 3+++ Ri-li-2.0.1/src/audio.cc 2012-01-22 00:28:33.360636539 -0800 4@@ -22,8 +22,8 @@ 5 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 6 7 #include <stdlib.h> 8-#include <iostream.h> 9-#include <string.h> 10+#include <iostream> 11+#include <string> 12 13 #include "audio.h" 14 #include "utils.h" 15@@ -57,7 +57,7 @@ 16 char PathFile[512]; 17 18 if(Mix_OpenAudio(22050,AUDIO_S16,1,1024)) { 19- cerr <<"Enable to init Sound card ! "<<SDL_GetError()<<endl; 20+ std::cerr <<"Enable to init Sound card ! "<<SDL_GetError()<<std::endl; 21 return false; 22 } 23 24diff -r -u Ri-li-2.0.1.orig/src/ecran.cc Ri-li-2.0.1/src/ecran.cc 25--- Ri-li-2.0.1.orig/src/ecran.cc 2007-11-02 04:48:16.000000000 -0700 26+++ Ri-li-2.0.1/src/ecran.cc 2012-01-22 00:13:54.422798653 -0800 27@@ -21,7 +21,7 @@ 28 // with this program; if not, write to the Free Software Foundation, Inc., 29 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 30 31-#include <iostream.h> 32+#include <iostream> 33 #include <stdio.h> 34 #include <stdlib.h> 35 #include <math.h> 36diff -r -u Ri-li-2.0.1.orig/src/editeur.cc Ri-li-2.0.1/src/editeur.cc 37--- Ri-li-2.0.1.orig/src/editeur.cc 2007-11-02 04:48:17.000000000 -0700 38+++ Ri-li-2.0.1/src/editeur.cc 2012-01-22 00:28:59.632635579 -0800 39@@ -25,10 +25,10 @@ 40 #include <windows.h> 41 #endif 42 43-#include <iostream.h> 44+#include <iostream> 45 #include <stdio.h> 46 #include <stdlib.h> 47-#include <string.h> 48+#include <string> 49 #include <math.h> 50 #include <SDL/SDL.h> 51 52@@ -374,7 +374,7 @@ 53 54 // Sauve le niveau 55 if(Niveau.Save()==false) { 56- cerr <<"ERREUR Saving levels!"<<endl; 57+ std::cerr <<"ERREUR Saving levels!"<<std::endl; 58 exit(-1); 59 } 60 61diff -r -u Ri-li-2.0.1.orig/src/jeux.cc Ri-li-2.0.1/src/jeux.cc 62--- Ri-li-2.0.1.orig/src/jeux.cc 2007-11-02 04:48:17.000000000 -0700 63+++ Ri-li-2.0.1/src/jeux.cc 2012-01-22 00:14:08.422798143 -0800 64@@ -25,10 +25,10 @@ 65 #include <windows.h> 66 #endif 67 68-#include <iostream.h> 69+#include <iostream> 70 #include <stdio.h> 71 #include <stdlib.h> 72-#include <string.h> 73+#include <string> 74 #include <math.h> 75 #include <SDL/SDL.h> 76 77diff -r -u Ri-li-2.0.1.orig/src/loco.cc Ri-li-2.0.1/src/loco.cc 78--- Ri-li-2.0.1.orig/src/loco.cc 2007-11-02 04:48:18.000000000 -0700 79+++ Ri-li-2.0.1/src/loco.cc 2012-01-22 00:14:17.878797797 -0800 80@@ -21,10 +21,10 @@ 81 // with this program; if not, write to the Free Software Foundation, Inc., 82 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 83 84-#include <iostream.h> 85+#include <iostream> 86 #include <stdio.h> 87 #include <stdlib.h> 88-#include <string.h> 89+#include <string> 90 #include <math.h> 91 #include "preference.h" 92 #include "loco.h" 93diff -r -u Ri-li-2.0.1.orig/src/main.cc Ri-li-2.0.1/src/main.cc 94--- Ri-li-2.0.1.orig/src/main.cc 2007-11-02 04:48:19.000000000 -0700 95+++ Ri-li-2.0.1/src/main.cc 2012-01-22 00:29:40.080634136 -0800 96@@ -23,8 +23,8 @@ 97 98 #include <stdio.h> 99 #include <stdlib.h> 100-#include <iostream.h> 101-#include <string.h> 102+#include <iostream> 103+#include <string> 104 #include <SDL/SDL.h> 105 #include <SDL/SDL_mixer.h> 106 107@@ -115,7 +115,7 @@ 108 109 // Initilise SDL 110 if( SDL_Init(SDL_INIT_VIDEO|SDL_INIT_TIMER|SDL_INIT_AUDIO|SDL_INIT_NOPARACHUTE) < 0 ) { 111- cerr <<"Impossible d'initialiser SDL:"<<SDL_GetError()<<endl; 112+ std::cerr <<"Impossible d'initialiser SDL:"<<SDL_GetError()<<std::endl; 113 exit(-1); 114 } 115 // Ferme le programme correctement quant quit 116@@ -125,7 +125,7 @@ 117 sdlVideoInfo=(SDL_VideoInfo*)SDL_GetVideoInfo(); 118 119 if(sdlVideoInfo->vfmt->BitsPerPixel==8) { 120- cerr <<"Impossible d'utiliser 8bits pour la vid�o !"<<endl; 121+ std::cerr <<"Impossible d'utiliser 8bits pour la vid�o !"<<std::endl; 122 exit(-1); 123 } 124 125@@ -145,7 +145,7 @@ 126 sdlVideo=SDL_SetVideoMode(800,600,sdlVideoInfo->vfmt->BitsPerPixel,vOption); 127 128 if(sdlVideo==NULL) { 129- cerr <<"Impossible de passer dans le mode vid�o 800x600 !"<<endl; 130+ std::cerr <<"Impossible de passer dans le mode vid�o 800x600 !"<<std::endl; 131 exit(-1); 132 } 133 // Change le nom de la fenetre 134diff -r -u Ri-li-2.0.1.orig/src/menu.cc Ri-li-2.0.1/src/menu.cc 135--- Ri-li-2.0.1.orig/src/menu.cc 2007-11-02 04:48:19.000000000 -0700 136+++ Ri-li-2.0.1/src/menu.cc 2012-01-22 00:30:04.752633198 -0800 137@@ -21,10 +21,10 @@ 138 // with this program; if not, write to the Free Software Foundation, Inc., 139 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 140 141-#include <iostream.h> 142+#include <iostream> 143 #include <stdio.h> 144 #include <stdlib.h> 145-#include <string.h> 146+#include <string> 147 #include "preference.h" 148 #include "menu.h" 149 #include "sprite.h" 150@@ -92,7 +92,7 @@ 151 // Teste la resolution video 152 sdlVideoInfo=(SDL_VideoInfo*)SDL_GetVideoInfo(); 153 if(sdlVideoInfo->vfmt->BitsPerPixel==8) { 154- cerr <<"Impossible d'utiliser 8bits pour la vid�o !"<<endl; 155+ std::cerr <<"Impossible d'utiliser 8bits pour la vid�o !"<<std::endl; 156 exit(-1); 157 } 158 159@@ -112,7 +112,7 @@ 160 if(Pref.FullScreen) vOption|=SDL_FULLSCREEN; 161 sdlVideo=SDL_SetVideoMode(800,600,sdlVideoInfo->vfmt->BitsPerPixel,vOption); 162 if(sdlVideo==NULL) { 163- cerr <<"Impossible de passer dans le mode vid�o 800x600 !"<<endl; 164+ std::cerr <<"Impossible de passer dans le mode vid�o 800x600 !"<<std::endl; 165 exit(-1); 166 } 167 168diff -r -u Ri-li-2.0.1.orig/src/mouse.cc Ri-li-2.0.1/src/mouse.cc 169--- Ri-li-2.0.1.orig/src/mouse.cc 2007-11-02 04:48:20.000000000 -0700 170+++ Ri-li-2.0.1/src/mouse.cc 2012-01-22 00:14:36.438797120 -0800 171@@ -21,7 +21,7 @@ 172 // with this program; if not, write to the Free Software Foundation, Inc., 173 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 174 175-#include <iostream.h> 176+#include <iostream> 177 #include <stdio.h> 178 #include "mouse.h" 179 #include "preference.h" 180diff -r -u Ri-li-2.0.1.orig/src/sprite.cc Ri-li-2.0.1/src/sprite.cc 181--- Ri-li-2.0.1.orig/src/sprite.cc 2007-11-02 04:48:20.000000000 -0700 182+++ Ri-li-2.0.1/src/sprite.cc 2012-01-22 00:30:43.640631779 -0800 183@@ -21,10 +21,10 @@ 184 // with this program; if not, write to the Free Software Foundation, Inc., 185 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 186 187-#include <iostream.h> 188+#include <iostream> 189 #include <stdio.h> 190 #include <stdlib.h> 191-#include <string.h> 192+#include <string> 193 #include <math.h> 194 #include "sprite.h" 195 #include "preference.h" 196@@ -84,7 +84,7 @@ 197 strcpy(PathFile,Langue[Pref.Langue]); 198 GetPath(PathFile); 199 if(FileExiste(PathFile)==false) { 200- cerr <<"Impossible de trouver "<<Langue[Pref.Langue]<<endl; 201+ std::cerr <<"Impossible de trouver "<<Langue[Pref.Langue]<<std::endl; 202 return false; 203 } 204 L=ChargeFichier(PathFile,Buf); 205@@ -128,7 +128,7 @@ 206 // *** Charge le fichier des langues *** 207 // ************************************* 208 if(FileExiste(PathFile)==false) { 209- cerr <<"Impossible de trouver 'language.dat'"<<endl; 210+ std::cerr <<"Impossible de trouver 'language.dat'"<<std::endl; 211 return false; 212 } 213 L=ChargeFichier(PathFile,Buf); 214@@ -163,7 +163,7 @@ 215 strcpy(PathFile,"sprites.dat"); 216 GetPath(PathFile); 217 if(FileExiste(PathFile)==false) { 218- cerr <<"Impossible de trouver 'sprites.dat'"<<endl; 219+ std::cerr <<"Impossible de trouver 'sprites.dat'"<<std::endl; 220 return false; 221 } 222 L=ChargeFichier(PathFile,Buf); 223@@ -352,7 +352,7 @@ 224 Image[i]=SDL_CreateRGBSurface((Dim[i].bpp-3)*SDL_SRCALPHA,Dim[i].L,Dim[i].H,Dim[i].bpp*8, 225 0xff,0xff00,0xff0000,0xff000000*(Dim[i].bpp-3)); 226 if(Image[i]<=NULL) { 227- cerr <<"Impossible de cr�er une Surface SDL!"<<endl; 228+ std::cerr <<"Impossible de cr�er une Surface SDL!"<<std::endl; 229 return false; 230 } 231 232@@ -486,7 +486,7 @@ 233 Image[0]=SDL_CreateRGBSurface((Dim[0].bpp-3)*SDL_SRCALPHA,Dim[0].L,Dim[0].H,Dim[0].bpp*8, 234 0xff,0xff00,0xff0000,0xff000000*(Dim[0].bpp-3)); 235 if(Image[0]<=NULL) { 236- cerr <<"Impossible de cr�er une Surface SDL!"<<endl; 237+ std::cerr <<"Impossible de cr�er une Surface SDL!"<<std::endl; 238 return false; 239 } 240 return true; 241diff -r -u Ri-li-2.0.1.orig/src/tableau.cc Ri-li-2.0.1/src/tableau.cc 242--- Ri-li-2.0.1.orig/src/tableau.cc 2007-11-02 04:48:21.000000000 -0700 243+++ Ri-li-2.0.1/src/tableau.cc 2012-01-22 00:14:50.710796598 -0800 244@@ -21,7 +21,7 @@ 245 // with this program; if not, write to the Free Software Foundation, Inc., 246 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 247 248-#include <iostream.h> 249+#include <iostream> 250 #include <stdio.h> 251 #include <stdlib.h> 252 #include "preference.h" 253diff -r -u Ri-li-2.0.1.orig/src/utils.cc Ri-li-2.0.1/src/utils.cc 254--- Ri-li-2.0.1.orig/src/utils.cc 2007-11-02 04:48:22.000000000 -0700 255+++ Ri-li-2.0.1/src/utils.cc 2012-01-22 00:31:30.944630051 -0800 256@@ -21,10 +21,10 @@ 257 // with this program; if not, write to the Free Software Foundation, Inc., 258 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 259 260-#include <iostream.h> 261+#include <iostream> 262 #include <stdio.h> 263 #include <stdlib.h> 264-#include <string.h> 265+#include <string> 266 267 #ifdef WINDOWS 268 #include <windows.h> 269@@ -77,7 +77,7 @@ 270 271 file=fopen(Path,"r"); 272 if(!file) { 273- cerr <<"ERREUR: Impossible d'ouvrir '"<<Path<<"'"<<endl; 274+ std::cerr <<"ERREUR: Impossible d'ouvrir '"<<Path<<"'"<<std::endl; 275 perror("fopen"); 276 return -1; 277 } 278@@ -93,7 +93,7 @@ 279 280 Buf=new unsigned char [L+1]; 281 if(Buf==NULL) { 282- cerr <<"ERREUR: Memoire insuffisante!"<<endl; 283+ std::cerr <<"ERREUR: Memoire insuffisante!"<<std::endl; 284 fclose(file); 285 return -1; 286 } 287@@ -104,7 +104,7 @@ 288 while(Compt>1024) { 289 AfficheChargeur(); 290 if( fread(Po,1,1024,file) != 1024 ) { 291- cerr <<"ERREUR de lecture du fichier '"<<Path<<"'"<<endl; 292+ std::cerr <<"ERREUR de lecture du fichier '"<<Path<<"'"<<std::endl; 293 perror("fread"); 294 fclose(file); 295 delete [] Buf; 296@@ -131,13 +131,13 @@ 297 298 file=_lopen(Path,OF_READ); 299 if(file==-1) { 300- cerr <<"Impossible d'ouvrir "<<Path<<endl; 301+ std::cerr <<"Impossible d'ouvrir "<<Path<<std::endl; 302 exit(-1); 303 } 304 305 long L=(long)_llseek(file,0,SEEK_END); 306 if(L==-1) { 307- cerr <<"Impossible de trouver la longueur du fichier"<<endl; 308+ std::cerr <<"Impossible de trouver la longueur du fichier"<<std::endl; 309 perror("lseek"); 310 _lclose(file); 311 return -1; 312@@ -146,7 +146,7 @@ 313 314 Buf=new unsigned char [L+1]; 315 if(Buf==NULL) { 316- cerr <<"ERREUR: Memoire insuffisante!"<<endl; 317+ std::cerr <<"ERREUR: Memoire insuffisante!"<<std::endl; 318 _lclose(file); 319 return -1; 320 } 321@@ -169,14 +169,14 @@ 322 323 file=fopen(Path,"w"); 324 if(!file) { 325- cerr <<"ERREUR: Impossible d'ouvrir '"<<Path<<"'"<<endl; 326+ std::cerr <<"ERREUR: Impossible d'ouvrir '"<<Path<<"'"<<std::endl; 327 perror("fopen"); 328 return false; 329 } 330 331 while(L>512) { 332 if( fwrite(Buf,1,512,file) != 512 ) { 333- cerr <<"ERREUR d'ecriture du fichier '"<<Path<<"'"<<endl; 334+ std::cerr <<"ERREUR d'ecriture du fichier '"<<Path<<"'"<<std::endl; 335 perror("fwrite"); 336 fclose(file); 337 return false; 338@@ -187,7 +187,7 @@ 339 340 if(L>0) { 341 if( fwrite(Buf,1,(size_t)L,file) != (size_t)L ) { 342- cerr <<"ERREUR d'ecriture du fichier '"<<Path<<"'"<<endl; 343+ std::cerr <<"ERREUR d'ecriture du fichier '"<<Path<<"'"<<std::endl; 344 perror("fwrite"); 345 fclose(file); 346 return false; 347@@ -208,7 +208,7 @@ 348 349 file=_lcreat(Path,0); 350 if(!file) { 351- cerr <<"ERREUR: Impossible de cr�er le fichier '"<<Path<<"'"<<endl; 352+ std::cerr <<"ERREUR: Impossible de cr�er le fichier '"<<Path<<"'"<<std::endl; 353 return false; 354 } 355 356@@ -216,7 +216,7 @@ 357 _lclose(file); 358 359 if(Lec!=L) { 360- cerr <<"Probl�me d'ecriture du fichier '"<<Path<<"' ecris="<<Lec<<" au lieux de ="<<L<<endl; 361+ std::cerr <<"Probl�me d'ecriture du fichier '"<<Path<<"' ecris="<<Lec<<" au lieux de ="<<L<<std::endl; 362 return false; 363 } 364 365@@ -250,7 +250,7 @@ 366 sprintf(Path,"/usr/share/games/Ri-li/%s",Provi); 367 if(FileExiste(Path)) return; 368 369- cerr <<"Impossible de trouver le fichier '"<<Provi<<endl; 370+ std::cerr <<"Impossible de trouver le fichier '"<<Provi<<std::endl; 371 exit(-1); 372 } 373 #endif 374@@ -266,7 +266,7 @@ 375 sprintf(Path,"PROGDIR:%s",Provi); 376 if(FileExiste(Path)) return; 377 378- cerr <<"Impossible de trouver le fichier '"<<Path<<endl; 379+ std::cerr <<"Impossible de trouver le fichier '"<<Path<<std::endl; 380 exit(-1); 381 } 382 #endif 383@@ -282,7 +282,7 @@ 384 sprintf(Path,"Ri-li.app/Contents/Resources/%s",Provi); 385 if(FileExiste(Path)) return; 386 387- cerr <<"Impossible de trouver le fichier '"<<Path<<endl; 388+ std::cerr <<"Impossible de trouver le fichier '"<<Path<<std::endl; 389 exit(-1); 390 } 391 #endif