@@ -0,0 +1,293 @@
1+Author: Thierry Reding <thierry@doppeltgemoppelt.de>
2+Description: Fixes a couple of compiler warnings.
3+Updated: 6/20/2013 - Barry deFreese <bdefreese@debian.org>.
4+ Fixed several warnings on string conversions and missing parens.
5+Index: billard-gl-1.75/src/BillardGL.cpp
6+===================================================================
7+--- billard-gl-1.75.orig/src/BillardGL.cpp 2013-06-19 18:36:57.000000000 -0400
8++++ billard-gl-1.75/src/BillardGL.cpp 2013-06-20 04:35:45.000000000 -0400
9+@@ -35,8 +35,6 @@
10+
11+ #include "BillardGL.h"
12+
13+-#pragma comment(linker, "/subsystem:\"windows\" /entry:\"mainCRTStartup\"")
14+-
15+ //Tabellen
16+ GLfloat Bewegungstabelle[2000][16][3];
17+ GLint Soundtabelle[1000];
18+Index: billard-gl-1.75/src/bmp.cpp
19+===================================================================
20+--- billard-gl-1.75.orig/src/bmp.cpp 2013-06-19 18:36:57.000000000 -0400
21++++ billard-gl-1.75/src/bmp.cpp 2013-06-20 04:35:45.000000000 -0400
22+@@ -4,14 +4,16 @@
23+ // Modified by Volker Blanz, 25.4.2001
24+ //
25+
26+-#include <iostream.h>
27+-#include <fstream.h>
28++#include <iostream>
29++#include <fstream>
30+ #include <stdio.h>
31+ #include <string.h>
32+ #include "LA.h"
33+ #include "Namen.h"
34+ #include "bmp.h"
35+
36++using namespace std;
37++
38+ // from ioutil:
39+
40+ WORDX readWord(FILE *f) {
41+Index: billard-gl-1.75/src/Kugel.cpp
42+===================================================================
43+--- billard-gl-1.75.orig/src/Kugel.cpp 2013-06-19 18:36:57.000000000 -0400
44++++ billard-gl-1.75/src/Kugel.cpp 2013-06-20 05:21:02.000000000 -0400
45+@@ -123,7 +123,7 @@
46+ glBindTexture(GL_TEXTURE_2D,Texturen[TG]);
47+ sprintf(Name,"Texturen/%i/%i.bmp",TG,Nr);
48+ loadBMP(tex_r,tex_g,tex_b,Name);
49+- GLfloat *texcoord;
50++ GLfloat *texcoord = NULL;
51+ if (tex_r.nrh!=tex_r.nch) {
52+ GLfloat Aspekt=(tex_r.nch+1.0)/(tex_r.nrh+1.0);
53+ texcoord = (GLfloat*) malloc (20*(Aufloesung+1)*(Aufloesung+2)*sizeof(GLfloat));
54+@@ -419,17 +419,17 @@
55+ }
56+
57+ void Kugel::neuePositionCM(GLfloat neuPos[]) {
58+- GLfloat Pos[]={neuPos[0]/2.8575,neuPos[1]/2.8575,neuPos[2]/2.8575};
59++ GLfloat Pos[]={static_cast<GLfloat>(neuPos[0]/2.8575),static_cast<GLfloat>(neuPos[1]/2.8575),static_cast<GLfloat>(neuPos[2]/2.8575)};
60+ neuePosition(Pos);
61+ }
62+
63+ void Kugel::neuePositionCM(GLfloat neuPos_x,GLfloat neuPos_y,GLfloat neuPos_z) {
64+- GLfloat Pos[]={neuPos_x/2.8575,neuPos_y/2.8575,neuPos_z/2.8575};
65++ GLfloat Pos[]={static_cast<GLfloat>(neuPos_x/2.8575),static_cast<GLfloat>(neuPos_y/2.8575),static_cast<GLfloat>(neuPos_z/2.8575)};
66+ neuePosition(Pos);
67+ }
68+
69+ void Kugel::neuePositionCM(GLfloat neuPos_x,GLfloat neuPos_y) {
70+- GLfloat Pos[]={neuPos_x/2.8575,neuPos_y/2.8575,0.0};
71++ GLfloat Pos[]={static_cast<GLfloat>(neuPos_x/2.8575),static_cast<GLfloat>(neuPos_y/2.8575),0.0};
72+ neuePosition(Pos);
73+ }
74+
75+@@ -449,17 +449,17 @@
76+ }
77+
78+ void Kugel::neuePositionINCH(GLfloat neuPos[]) {
79+- GLfloat Pos[]={neuPos[0]/1.125,neuPos[1]/1.125,neuPos[2]/1.125};
80++ GLfloat Pos[]={static_cast<GLfloat>(neuPos[0]/1.125),static_cast<GLfloat>(neuPos[1]/1.125),static_cast<GLfloat>(neuPos[2]/1.125)};
81+ neuePosition(Pos);
82+ }
83+
84+ void Kugel::neuePositionINCH(GLfloat neuPos_x,GLfloat neuPos_y,GLfloat neuPos_z) {
85+- GLfloat Pos[]={neuPos_x/1.125,neuPos_y/1.125,neuPos_z/1.125};
86++ GLfloat Pos[]={static_cast<GLfloat>(neuPos_x/1.125),static_cast<GLfloat>(neuPos_y/1.125),static_cast<GLfloat>(neuPos_z/1.125)};
87+ neuePosition(Pos);
88+ }
89+
90+ void Kugel::neuePositionINCH(GLfloat neuPos_x,GLfloat neuPos_y) {
91+- GLfloat Pos[]={neuPos_x/1.125,neuPos_y/1.125,0.0};
92++ GLfloat Pos[]={static_cast<GLfloat>(neuPos_x/1.125),static_cast<GLfloat>(neuPos_y/1.125),0.0};
93+ neuePosition(Pos);
94+ }
95+
96+Index: billard-gl-1.75/src/Textfeld.cpp
97+===================================================================
98+--- billard-gl-1.75.orig/src/Textfeld.cpp 2002-04-23 12:08:13.000000000 -0400
99++++ billard-gl-1.75/src/Textfeld.cpp 2013-06-20 06:30:40.000000000 -0400
100+@@ -168,12 +168,12 @@
101+ Horchen=0;
102+ }
103+
104+-void Textfeld::Initialisiere(GLint DLA, char TextZ[]){
105++void Textfeld::Initialisiere(GLint DLA, const char TextZ[]){
106+ Initialisiere(DLA);
107+ SetzeText(TextZ);
108+ }
109+
110+-void Textfeld::InitialisiereKDL(GLint DLA, char TextZ[]){
111++void Textfeld::InitialisiereKDL(GLint DLA, const char TextZ[]){
112+ Initialisiere(DLA);
113+ SetzeTextKDL(TextZ);
114+ }
115+@@ -245,7 +245,7 @@
116+ }
117+
118+
119+-void Textfeld::SetzeText(char TextZ[]){
120++void Textfeld::SetzeText(const char TextZ[]){
121+ int i=0;
122+ while (TextZ[i] && i<1999) {
123+ Zeichenkette[i]=TextZ[i];
124+@@ -255,7 +255,7 @@
125+ GeneriereDisplayList();
126+ }
127+
128+-void Textfeld::SetzeTextKDL(char TextZ[]){
129++void Textfeld::SetzeTextKDL(const char TextZ[]){
130+ int i=0;
131+ while (TextZ[i] && i<1999) {
132+ Zeichenkette[i]=TextZ[i];
133+Index: billard-gl-1.75/src/Textfeld.h
134+===================================================================
135+--- billard-gl-1.75.orig/src/Textfeld.h 2002-04-23 12:10:50.000000000 -0400
136++++ billard-gl-1.75/src/Textfeld.h 2013-06-20 06:28:31.000000000 -0400
137+@@ -3,13 +3,13 @@
138+ Textfeld();
139+ GLint dummyInitialisiere(GLint);
140+ void Initialisiere(GLint);
141+- void Initialisiere(GLint,char[]);
142+- void InitialisiereKDL(GLint,char[]);
143++ void Initialisiere(GLint,const char[]);
144++ void InitialisiereKDL(GLint,const char[]);
145+ void male();
146+ void Positioniere(GLfloat,GLfloat,GLfloat,GLint);
147+ void PositioniereFix(GLfloat,GLfloat,GLfloat,GLint);
148+- void SetzeText(char[]);
149+- void SetzeTextKDL(char[]);
150++ void SetzeText(const char[]);
151++ void SetzeTextKDL(const char[]);
152+ GLint Zeichen(char);
153+ char* Text();
154+
155+Index: billard-gl-1.75/src/Schild.h
156+===================================================================
157+--- billard-gl-1.75.orig/src/Schild.h 2002-04-23 12:10:11.000000000 -0400
158++++ billard-gl-1.75/src/Schild.h 2013-06-20 06:39:37.000000000 -0400
159+@@ -4,10 +4,10 @@
160+ Schild();
161+ void Initialisiere();
162+ void InitialisiereLogo();
163+- void Initialisiere(GLint,char[]);
164+- void InitialisiereBuchstabe(GLint,char[]);
165+- void Initialisiere(GLint,char[],char);
166+- void Initialisiere(GLint,char[],char[]);
167++ void Initialisiere(GLint,const char[]);
168++ void InitialisiereBuchstabe(GLint,const char[]);
169++ void Initialisiere(GLint,const char[],char);
170++ void Initialisiere(GLint,const char[],const char[]);
171+ void male();
172+ void Positioniere(GLfloat,GLfloat,GLfloat,GLfloat);
173+ void PositioniereFix(GLfloat,GLfloat,GLfloat,GLfloat);
174+Index: billard-gl-1.75/src/Schild.cpp
175+===================================================================
176+--- billard-gl-1.75.orig/src/Schild.cpp 2002-04-23 12:09:55.000000000 -0400
177++++ billard-gl-1.75/src/Schild.cpp 2013-06-20 07:05:24.000000000 -0400
178+@@ -31,8 +31,8 @@
179+ }
180+
181+ void Schild::Initialisiere(GLint TexGr,
182+- char Name[],
183+- char AlphaName[]){
184++ const char Name[],
185++ const char AlphaName[]){
186+ FMatrix texr,texg,texb,texa; // Matrix-Bilder, in die die Textur kommt
187+ if (!SchildIndex) {
188+ SchildIndex=glGenLists(1);
189+@@ -80,7 +80,7 @@
190+ }
191+
192+ void Schild::Initialisiere(GLint TexGr,
193+- char Name[]){
194++ const char Name[]){
195+ FMatrix texr,texg,texb; // Matrix-Bilder, in die die Textur kommt
196+ if (!SchildIndex) {
197+ SchildIndex=glGenLists(1);
198+@@ -155,7 +155,7 @@
199+ }
200+
201+ void Schild::InitialisiereBuchstabe(GLint TexGr,
202+- char Name[]){
203++ const char Name[]){
204+ FMatrix texr,texg,texb; // Matrix-Bilder, in die die Textur kommt
205+ if (!SchildIndex) {
206+ SchildIndex=glGenLists(1);
207+@@ -199,7 +199,7 @@
208+ }
209+
210+ void Schild::Initialisiere(GLint TexGr,
211+- char Name[],
212++ const char Name[],
213+ char Land){
214+ Land='c';
215+ FMatrix texr,texg,texb; // Matrix-Bilder, in die die Textur kommt
216+Index: billard-gl-1.75/src/Schiedsrichter.cpp
217+===================================================================
218+--- billard-gl-1.75.orig/src/Schiedsrichter.cpp 2002-04-22 06:40:54.000000000 -0400
219++++ billard-gl-1.75/src/Schiedsrichter.cpp 2013-06-20 07:04:45.000000000 -0400
220+@@ -115,8 +115,8 @@
221+ KugelnAnBande[Kugel]=JA;
222+
223+ if (!ErsteBeruehrteKugel && ((Bande==20) ||
224+- (Bande==21) && (Kugelx<-63.5) ||
225+- (Bande==23) && (Kugelx<-63.5))) {
226++ ((Bande==21) && (Kugelx<-63.5)) ||
227++ ((Bande==23) && (Kugelx<-63.5)))) {
228+ BandeAusserhalbKopffeldvorKugelBeruehrt = JA;
229+ }
230+ }
231+@@ -236,17 +236,17 @@
232+ ErsteVersenkteKugel &&
233+ ErsteBeruehrteKugel != 8 &&
234+ ErsteVersenkteKugel != 8) {
235+- if ((SpielerAmStoss == SPIELER1) &&
236+- (ErsteVersenkteKugel < 8) ||
237+- (SpielerAmStoss == SPIELER2) &&
238+- (ErsteVersenkteKugel > 8)) {
239++ if (((SpielerAmStoss == SPIELER1) &&
240++ (ErsteVersenkteKugel < 8)) ||
241++ ((SpielerAmStoss == SPIELER2) &&
242++ (ErsteVersenkteKugel > 8))) {
243+ GruppenVerteilung = S1_GANZE_S2_HALBE;
244+ //printf("Gruppenverteilung: S1_GANZE_S2_HALBE\n");
245+ }
246+- if ((SpielerAmStoss == SPIELER1) &&
247+- (ErsteVersenkteKugel > 8) ||
248+- (SpielerAmStoss == SPIELER2) &&
249+- (ErsteVersenkteKugel < 8)) {
250++ if (((SpielerAmStoss == SPIELER1) &&
251++ (ErsteVersenkteKugel > 8)) ||
252++ ((SpielerAmStoss == SPIELER2) &&
253++ (ErsteVersenkteKugel < 8))) {
254+ GruppenVerteilung = S1_HALBE_S2_GANZE;
255+ //printf("Gruppenverteilung: S1_HALBE_S2_GANZE\n");
256+ }
257+@@ -274,10 +274,10 @@
258+ }
259+ }
260+
261+- if ((SpielerAmStoss==SPIELER1) &&
262+- (FoulsHintereinanderSpieler1 == 3) ||
263+- (SpielerAmStoss==SPIELER2) &&
264+- (FoulsHintereinanderSpieler2 == 3)) {
265++ if (((SpielerAmStoss==SPIELER1) &&
266++ (FoulsHintereinanderSpieler1 == 3)) ||
267++ ((SpielerAmStoss==SPIELER2) &&
268++ (FoulsHintereinanderSpieler2 == 3))) {
269+ Verloren = JA;
270+ //printf("Verloren durch drei Fouls hintereinander\n");
271+ }
272+@@ -485,7 +485,7 @@
273+
274+ GLint Schiedsrichter::FarbigeKugel(GLint Kugel){
275+ if (Spiel==ACHTBALL) {
276+- if (0<Kugel && Kugel<8 || 8<Kugel && Kugel<16) {
277++ if ((0<Kugel && Kugel<8) || (8<Kugel && Kugel<16)) {
278+ return JA;
279+ }
280+ }
281+Index: billard-gl-1.75/src/SpielfeldAufbau.cpp
282+===================================================================
283+--- billard-gl-1.75.orig/src/SpielfeldAufbau.cpp 2002-04-22 06:43:39.000000000 -0400
284++++ billard-gl-1.75/src/SpielfeldAufbau.cpp 2013-06-20 07:12:58.000000000 -0400
285+@@ -78,7 +78,7 @@
286+ }
287+ }
288+ }
289+- } while ((nummer[1]<8)&&(nummer[15]<8)||(nummer[1]>8)&&(nummer[15]>8));
290++ } while (((nummer[1]<8)&&(nummer[15]<8))||((nummer[1]>8)&&(nummer[15]>8)));
291+
292+ Kugel[nummer[0]].neuePositionCM(-63.5,0.0);
293+ Kugel[nummer[1]].neuePositionCM(63.5+12*asw3+random(Epsilon),-2.0*a+random(Epsilon));