on master help sign in
New Flatpak for de.billardgl.Billardgl
commit70d19f559e4a0fc2f6a43d3a1dc971c3cf44728b authorRobert McQueen <rob@endlessm.com> dateTue 18 Jun 2019, 15:20 (7 years ago) parent746ea89
14 files changed+738
.gitmodules+3 de.billardgl.Billardgl.appdata.xml+76 de.billardgl.Billardgl.desktop+38 de.billardgl.Billardgl.json+96 de.billardgl.Billardgl.png patches/01_flatten_data_path.patch+13 patches/02_divide-by-zero_on_alpha.patch+26 patches/03_config_buffer_overflows.patch+40 patches/04_starting_resolution.patch+15 patches/05_Makefile.patch+33 patches/06_language_pack.patch+56 patches/07_segfault_no_home.patch+48 patches/99_cosmetic_fixes.patch+293 shared-modules+1
.gitmodulesnew file+3
@@ -0,0 +1,3 @@
1+[submodule "shared-modules"]
2+ path = shared-modules
3+ url = https://github.com/flathub/shared-modules.git
de.billardgl.Billardgl.appdata.xmlnew file+76
@@ -0,0 +1,76 @@
1+<?xml version="1.0" encoding="UTF-8"?>
2+<component type="desktop">
3+ <id>de.billardgl.Billardgl</id>
4+ <launchable type="desktop-id">de.billardgl.Billardgl.desktop</launchable>
5+ <metadata_license>CC0-1.0</metadata_license>
6+ <project_license>GPL-2.0+</project_license>
7+
8+ <name>Billiards</name>
9+ <name xml:lang="ar">بلياردو</name>
10+ <name xml:lang="bn">বিলিয়ার্ডস</name>
11+ <name xml:lang="de">Billard</name>
12+ <name xml:lang="es">Billar</name>
13+ <name xml:lang="fr">Billard</name>
14+ <name xml:lang="hi">बिलियर्ड्स</name>
15+ <name xml:lang="id">Biliar</name>
16+ <name xml:lang="pt_BR">Sinuca</name>
17+ <name xml:lang="ro">Biliard</name>
18+ <name xml:lang="th">บิลเลียด</name>
19+ <name xml:lang="vi">Bida</name>
20+ <name xml:lang="zh_CN">桌球</name>
21+ <name xml:lang="zh_TW">撞球</name>
22+
23+ <categories>
24+ <category>Game</category>
25+ </categories>
26+
27+ <summary>Fun 3D billiards game</summary>
28+ <summary xml:lang="ar">لعبة بلياردو ممتعة ثلاثية الأبعاد</summary>
29+ <summary xml:lang="bn">মজার 3D বিলিয়ার্ডস খেলা</summary>
30+ <summary xml:lang="de">Spaßiges 3D-Billard-Spiel</summary>
31+ <summary xml:lang="es">Practica tus habilidades con este juego de billar en 3D</summary>
32+ <summary xml:lang="fr">Jeu de billard amusant en 3D</summary>
33+ <summary xml:lang="hi">3D बिलियर्ड्स गेम</summary>
34+ <summary xml:lang="id">Game biliar 3D seru</summary>
35+ <summary xml:lang="pt_BR">Divertido jogo de sinuca em 3D</summary>
36+ <summary xml:lang="ro">Jocuri de biliard 3D</summary>
37+ <summary xml:lang="th">เกมบิลเลียด 3 มิติ</summary>
38+ <summary xml:lang="vi">Trò chơi bida 3D vui nhộn</summary>
39+ <summary xml:lang="zh_CN">趣味3D桌球游戏</summary>
40+ <summary xml:lang="zh_TW">有趣的 3D 撞球遊戲</summary>
41+
42+ <description><p>Do you love playing billiards, or have you ever wanted to learn how to play? This game lets you have the experience of playing pool and other similar games right from your home. It’s simple to learn and use, yet highly realistic. This app is a great tool for both playing for fun and improving your game.</p></description>
43+ <description xml:lang="ar"><p>هل تحب لعب البلياردو، هل كنت تريد في أي وقت مضى أن تتعلم كيف تلعبها؟ هذه اللعبة تتيح لديك تجربة لعب البلياردو وغيرها من الألعاب المماثلة مباشرة من منزلك. إنها سهلة التعلم والإستخدام، لكنها واقعيةٌ للغاية. هذا التطبيق أداة عظيمة لكل من اللعب من أجل المتعة ولتحسين لعبك.</p></description>
44+ <description xml:lang="bn"><p>আপনি কি বিলিয়ার্ড খেলতে ভালবাসেন, অথবা কখনো খেলা শিখতে চেয়েছেন? এই খেলার মাধ্যমে আপনি ঘরে বসেই পুল এবং আরো অন্যান্য একইরকম খেলার অভিজ্ঞতা অর্জন করতে পারবেন। অত্যন্ত বাস্তবধর্মী হলেও এই খেলাটি সহজে শেখা ও ব্যবহার করা যায়। শুধু মজার জন্য খেলা বা আপনার দক্ষতা বাড়ানোর জন্যও এই এ্যাপটি খুবই কার্যকরী।</p></description>
45+ <description xml:lang="es"><p>¿Te gusta jugar al billar, o tal vez has querido aprender como jugarlo? Con este programa puedes jugar al billar y a otros juegos parecidos desde tu casa por completamente gratis. Este programa es muy realista y sencilla para aprender a jugar, para practicar estrategias o simplemente para divertirte por un rato.</p></description>
46+ <description xml:lang="fr"><p>Aimez-vous jouer au billard, ou avez-vous jamais voulu apprendre comment y jouer ? Ce jeu vous donne une expérience de jeu de billard et autres jeux similaires depuis le confort de votre maison. Il est simple à prendre en main et à utiliser, tout en étant hautement réaliste. Cette application est un excellent outil à la fois pour vous divertir et pour améliorer votre technique de jeu.</p></description>
47+ <description xml:lang="hi"><p>क्या आपको बिलियर्ड्स खेलना भाता है या क्या कभी आपने इसे सीखना चाहा है? यह गेम आपको अपने घर से ही पूल और ऐसे ही अन्य गेमों को खेलने का मजेदार एहसास देता है। इसे सीखना और इस्तेमाल करना आसान है। यह ऐप्स आनंद के लिए खेलने के लिए या अपने खेल में सुधार लाने, दोनों के लिए कमाल है।</p></description>
48+ <description xml:lang="id"><p>Apakah Anda suka bermain biliar, atau pernah ingin belajar cara memainkannya? Permainan ini membuat Anda mendapatkan pengalaman bermain biliar dan sejenisnya langsung di rumah Anda. Mudah untuk dipelajari dan digunakan, juga sangat realistis. Aplikasi ini cocok untuk bermain sambil bersenang-senang sekaligus meningkatkan kemampuan biliar Anda.</p></description>
49+ <description xml:lang="pt_BR"><p>Você gosta de jogar sinuca ou sempre quis aprender a jogar? Este jogo proporciona a experiência de jogar sinuca e outros jogos similares direto da sua casa. É fácil de aprender e de usar, mas altamente realista. Este programa é uma ótima ferramenta para jogar, se divertir e melhorar o seu jogo.</p></description>
50+ <description xml:lang="ro"><p>Iti place sa joci biliard,sau ai vrut sa inveti vreodata sa inveti cum se joaca?Acest joc te lasa sa ai parte de experienta jocului chiar de acasa.Este simplu de invatat,dar si foarte realist.Aceasta aplicatie este o unealta grozava pentru invatare dar si pentru a-ti imbunatati jocul.</p></description>
51+ <description xml:lang="th"><p>คุณรักการเล่นบิลเลียดหรือคุณเคยอยากที่จะเรียนรู้วิธีการเล่นมั้ย เกมนี้ช่วยให้คุณมีประสบการณ์ในการเล่นบิลเลียดและเกมอื่น ๆ ที่คล้ายกันได้จากที่บ้านของคุณ มันง่ายที่จะเรียนรู้และใช้ แต่สมจริงอย่างมาก แอพนี้เป็นเครื่องมือที่ดีสำหรับทั้งการเล่นเพื่อความสนุกสนานและปรับปรุงเกมการเล่นของคุณ</p></description>
52+ <description xml:lang="vi"><p>Bạn thích chơi bida, hoặc đã từng muốn tìm hiểu cách chơi như thế nào? Trò chơi này sẽ mang đến cho bạn trải nghiệm như được chơi bida và các trò chơi tượng tự khác ngay tại nhà. Đây là trò chơi rất dễ tìm hiểu và chơi với độ thực tế cao. Ứng dụng này chính là công cụ tuyệt vời để vừa chơi để giải trí vừa cải thiện trình độ của bạn.</p></description>
53+ <description xml:lang="zh_CN"><p>您爱打桌球吗?您想学吗?这款游戏让您足不出户即可体验桌球这类游戏的快乐。简单易操作,带给您最真实的体验。畅玩的同时提升游戏技能,这款APP带给您惊喜。</p></description>
54+ <description xml:lang="zh_TW"><p>你喜歡玩撞球或你曾想過要學如何玩撞球嗎?這個遊戲讓你在家裡就可以擁有撞球和其他類似遊戲的體驗。它很簡單易學並且容易使用,而且感覺非常真實。這款應用程式是一個很棒的工具,可以獲得樂趣,也可以改善你的撞球技巧。</p></description>
55+
56+ <developer_name>Tobias Nopper, Stefan Disch, Martina Welte</developer_name>
57+
58+ <releases>
59+ <release date="2003-07-14" version="1.75" />
60+ </releases>
61+
62+ <screenshots>
63+ <screenshot><image type="source">https://d3lapyynmdp1i9.cloudfront.net/screenshots/de.billardgl.Billardgl/C/de.billardgl.billardgl-screenshot1.jpg</image></screenshot>
64+ <screenshot><image type="source">https://d3lapyynmdp1i9.cloudfront.net/screenshots/de.billardgl.Billardgl/C/de.billardgl.billardgl-screenshot2.jpg</image></screenshot>
65+ <screenshot><image type="source">https://d3lapyynmdp1i9.cloudfront.net/screenshots/de.billardgl.Billardgl/C/de.billardgl.billardgl-screenshot3.jpg</image></screenshot>
66+ </screenshots>
67+
68+ <content_rating type="oars-1.1" />
69+
70+ <metadata>
71+ <value key="GnomeSoftware::popular-background">https://d3lapyynmdp1i9.cloudfront.net/thumbnails/de.billardgl.Billardgl/de.billardgl.billardgl-thumb.jpg</value>
72+ </metadata>
73+
74+ <url type="homepage">http://www.billardgl.de/index-en.html</url>
75+ <url type="bugtracker">https://sourceforge.net/p/billardgl/bugs/</url>
76+</component>
de.billardgl.Billardgl.desktopnew file+38
@@ -0,0 +1,38 @@
1+[Desktop Entry]
2+Type=Application
3+Name=Billiards
4+Name[ar]=بلياردو
5+Name[bn]=বিলিয়ার্ডস
6+Name[de]=Billard
7+Name[es]=Billar
8+Name[fr]=Billard
9+Name[hi]=बिलियर्ड्स
10+Name[id]=Biliar
11+Name[pt_BR]=Sinuca
12+Name[ro]=Biliard
13+Name[th]=บิลเลียด
14+Name[vi]=Bida
15+Name[zh_CN]=桌球
16+Name[zh_TW]=撞球
17+Comment=Fun 3D billiards game
18+Comment[ar]=لعبة بلياردو ممتعة ثلاثية الأبعاد
19+Comment[bn]=মজার 3D বিলিয়ার্ডস খেলা
20+Comment[de]=Spaßiges 3D-Billard-Spiel
21+Comment[es]=Practica tus habilidades con este juego de billar en 3D
22+Comment[fr]=Jeu de billard amusant en 3D
23+Comment[hi]=3D बिलियर्ड्स गेम
24+Comment[id]=Game biliar 3D seru
25+Comment[pt_BR]=Divertido jogo de sinuca em 3D
26+Comment[ro]=Jocuri de biliard 3D
27+Comment[th]=เกมบิลเลียด 3 มิติ
28+Comment[vi]=Trò chơi bida 3D vui nhộn
29+Comment[zh_CN]=趣味3D桌球游戏
30+Comment[zh_TW]=有趣的 3D 撞球遊戲
31+Categories=Game;Simulation;
32+Exec=billard-gl
33+GenericName=billard-gl
34+Icon=de.billardgl.Billardgl
35+Keywords=billiard;billard;3D;opengl;game;
36+StartupWMClass=billard-gl
37+Terminal=false
38+
de.billardgl.Billardgl.jsonnew file+96
@@ -0,0 +1,96 @@
1+{
2+ "app-id": "de.billardgl.Billardgl",
3+ "runtime": "org.freedesktop.Platform",
4+ "sdk": "org.freedesktop.Sdk",
5+ "runtime-version": "18.08",
6+ "command": "billard-gl",
7+ "build-options": {
8+ "cflags": "-g -O2",
9+ "cppflags": "-g -O2"
10+ },
11+ "separate-locales": false,
12+ "cleanup": [ "/include", "/lib/*.a", "/lib/*.la", "/lib/pkgconfig" ],
13+ "finish-args": [
14+ "--share=ipc",
15+ "--socket=x11",
16+ "--device=dri"
17+ ],
18+ "modules": [
19+ "shared-modules/glu/glu-9.0.0.json",
20+ {
21+ "name": "freeglut",
22+ "buildsystem": "cmake-ninja",
23+ "config-opts": [
24+ "-DCMAKE_BUILD_TYPE=RelWithDebInfo",
25+ "-DCMAKE_INSTALL_LIBDIR:PATH=/app/lib"
26+ ],
27+ "sources": [
28+ {
29+ "type": "archive",
30+ "url": "https://downloads.sourceforge.net/project/freeglut/freeglut/3.0.0/freeglut-3.0.0.tar.gz",
31+ "sha256": "2a43be8515b01ea82bcfa17d29ae0d40bd128342f0930cd1f375f1ff999f76a2"
32+ }
33+ ]
34+ },
35+ {
36+ "name": "billard-gl",
37+ "buildsystem": "simple",
38+ "sources": [
39+ {
40+ "type": "archive",
41+ "url": "https://iweb.dl.sourceforge.net/project/billardgl/billardgl/BillardGL%201.75/BillardGL-1.75.tar.gz",
42+ "sha256": "9b865b1254aa30125480ec7ea2ce00d91524db066a524b78492545782856df96"
43+ },
44+ {
45+ "type": "archive",
46+ "url": "https://iweb.dl.sourceforge.net/project/billardgl/billardgl/BillardGL%201.75/BillardGL-LP-010.zip",
47+ "sha256": "a1325a0ed9b0dc3e2cbf8acebe4f7c4caf4183547b777b7543ad61e1e6e07cf6"
48+ },
49+ {
50+ "type": "shell",
51+ "commands": [
52+ "mkdir lp",
53+ "mv *.lang Install.txt turk lp"
54+ ]
55+ },
56+ {
57+ "type": "patch",
58+ "paths": [
59+ "patches/01_flatten_data_path.patch",
60+ "patches/02_divide-by-zero_on_alpha.patch",
61+ "patches/03_config_buffer_overflows.patch",
62+ "patches/04_starting_resolution.patch",
63+ "patches/05_Makefile.patch",
64+ "patches/06_language_pack.patch",
65+ "patches/07_segfault_no_home.patch",
66+ "patches/99_cosmetic_fixes.patch"
67+ ]
68+ },
69+ {
70+ "type": "file",
71+ "path": "de.billardgl.Billardgl.appdata.xml"
72+ },
73+ {
74+ "type": "file",
75+ "path": "de.billardgl.Billardgl.desktop"
76+ },
77+ {
78+ "type": "file",
79+ "path": "de.billardgl.Billardgl.png"
80+ }
81+ ],
82+ "build-commands": [
83+ "make -C src",
84+ "install -d /app/bin /app/share/BillardGL/lang",
85+ "install src/billard-gl /app/bin",
86+ "install -m644 lp/*.lang /app/share/BillardGL/lang",
87+ "install -m644 src/lang/*.lang /app/share/BillardGL/lang",
88+ "cp -r src/Texturen /app/share/BillardGL/Texturen",
89+ "install -D -m644 -t /app/share/appdata de.billardgl.Billardgl.appdata.xml",
90+ "install -D -m644 -t /app/share/applications de.billardgl.Billardgl.desktop",
91+ "install -D -m644 -t /app/share/icons/hicolor/64x64/apps de.billardgl.Billardgl.png"
92+ ]
93+ }
94+ ]
95+}
96+
de.billardgl.Billardgl.pngnew file

Binary file not shown.

patches/01_flatten_data_path.patchnew file+13
@@ -0,0 +1,13 @@
1+Description: Changes the data path to conform with the FHS.
2+Origin: other
3+--- a/src/Namen.h
4++++ b/src/Namen.h
5+@@ -23,7 +23,7 @@
6+ #define TUTORIAL 105
7+
8+ #ifndef _WIN32
9+-#define PFAD "/usr/share/BillardGL/"
10++#define PFAD "/app/share/BillardGL/"
11+ #endif
12+
13+ #ifndef PFAD
patches/02_divide-by-zero_on_alpha.patchnew file+26
@@ -0,0 +1,26 @@
1+Author: Julien LEMOINE <speedblue@debian.org>
2+Bug-Debian: http://bugs.debian.org/166378
3+Description: Fixes divide-by-zero on alphas.
4+--- a/src/kugeltabellen.cpp
5++++ b/src/kugeltabellen.cpp
6+@@ -7,6 +7,7 @@
7+ #ifndef M_PI
8+ #define M_PI 3.14159265358979323846
9+ #endif
10++#define EPSILON 0.00001
11+
12+ GLint calc_ind2(GLint b, GLint c, GLint Aufloesung) {
13+ return ((c*(2*Aufloesung+3-c))/2)+b;
14+@@ -28,9 +29,9 @@
15+ GLfloat temp_y=ay+((b+0.0)/(Aufloesung+0.0))*(by-ay)+((c+0.0)/(Aufloesung+0.0))*(cy-ay);
16+ GLfloat temp_z=az+((b+0.0)/(Aufloesung+0.0))*(bz-az)+((c+0.0)/(Aufloesung+0.0))*(cz-az);
17+ GLfloat Abstand=sqrt(temp_x*temp_x+temp_y*temp_y+temp_z*temp_z);
18+- temp_x=temp_x/Abstand;
19+- temp_y=temp_y/Abstand;
20+- temp_z=temp_z/Abstand;
21++ temp_x= (temp_x/Abstand == 0) ? EPSILON : temp_x/Abstand;
22++ temp_y= (temp_y/Abstand == 0) ? EPSILON : temp_y/Abstand;
23++ temp_z= (temp_z/Abstand == 0) ? EPSILON : temp_z/Abstand;
24+ vertices[iv++]=temp_x;
25+ vertices[iv++]=temp_y;
26+ vertices[iv++]=temp_z;
patches/03_config_buffer_overflows.patchnew file+40
@@ -0,0 +1,40 @@
1+Author: Ulf Härnhammar <Ulf.Harnhammar.9485@student.uu.se>
2+Description: Fixes buffer overflows while loading the config file.
3+Bug-Debian: http://bugs.debian.org/290822
4+--- a/src/KommandoZeilenParameter.cpp
5++++ b/src/KommandoZeilenParameter.cpp
6+@@ -8,8 +8,8 @@
7+ void SchreibeKonfiguration(){
8+ FILE *f;
9+ #ifndef _WIN32
10+- char dateiname[40];
11+- sprintf(dateiname,"%s/.BillardGL.conf.v7",getenv("HOME"));
12++ char dateiname[512];
13++ snprintf(dateiname,sizeof(dateiname),"%s/.BillardGL.conf.v7",getenv("HOME"));
14+ f=fopen(dateiname,"w+");
15+ #endif
16+ #ifdef _WIN32
17+@@ -65,8 +65,8 @@
18+ void LeseKonfiguration(){
19+ FILE *f;
20+ #ifndef _WIN32
21+- char dateiname[40];
22+- sprintf(dateiname,"%s/.BillardGL.conf.v7",getenv("HOME"));
23++ char dateiname[512];
24++ snprintf(dateiname,sizeof(dateiname),"%s/.BillardGL.conf.v7",getenv("HOME"));
25+ f=fopen(dateiname,"r");
26+ #endif
27+ #ifdef _WIN32
28+@@ -95,9 +95,9 @@
29+ fscanf(f,"%i",&GrueneLampe);
30+ fscanf(f,"%f",&EffektLautstaerke);
31+ fscanf(f,"%f",&MusikLautstaerke);
32+- fscanf(f,"%s",Spieler1temp);
33+- fscanf(f,"%s",Spieler2temp);
34+- fscanf(f,"%s",NetzwerkSpielertemp);
35++ fscanf(f,"%9s",Spieler1temp);
36++ fscanf(f,"%9s",Spieler2temp);
37++ fscanf(f,"%9s",NetzwerkSpielertemp);
38+ for (int i=0;i<10;i++) {
39+ if (Spieler1temp[i]=='%') {
40+ Spieler1[i]=' ';
patches/04_starting_resolution.patchnew file+15
@@ -0,0 +1,15 @@
1+Author: Thierry Reding <thierry@doppeltgemoppelt.de>
2+Description: By default, start in windowed mode.
3+Bug-Debian: http://bugs.debian.org/173197
4+Bug-Debian: http://bugs.debian.org/284855
5+--- a/src/KommandoZeilenParameter.cpp
6++++ b/src/KommandoZeilenParameter.cpp
7+@@ -154,7 +154,7 @@
8+ TischLampen = 2;
9+ GrueneLampe = 0;
10+
11+- FullScreen = 1;
12++ FullScreen = 0;
13+
14+ EffektLautstaerke = .5;
15+ MusikLautstaerke = .5;
patches/05_Makefile.patchnew file+33
@@ -0,0 +1,33 @@
1+Author: Thierry Reding <thierry@doppeltgemoppelt.de>
2+Description: Fix makefile to generate lowercase name for executable.
3+ Enable debian/rules to pass additional CFLAGS.
4+Index: billard-gl-1.75/src/Makefile
5+===================================================================
6+--- billard-gl-1.75.orig/src/Makefile 2013-06-19 18:29:12.000000000 -0400
7++++ billard-gl-1.75/src/Makefile 2013-06-19 18:29:45.000000000 -0400
8+@@ -7,12 +7,12 @@
9+
10+ CC = gcc
11+ CXX = g++
12+-CFLAGS = -pipe -Wall -W -DNO_DEBUG -g
13+-CXXFLAGS= -pipe -Wall -W -DNO_DEBUG -g
14++CFLAGS := -pipe -Wall -W -DNO_DEBUG $(CFLAGS)
15++CXXFLAGS:= -pipe -Wall -W -DNO_DEBUG $(CPPFLAGS)
16+ INCPATH = -I/usr/X11R6/include
17+ LINK = g++
18+-LFLAGS =
19+-LIBS = -L/usr/X11R6/lib -lGL -lGLU -lglut -lXmu -lXext -lX11 -lm -lXi
20++LFLAGS = $(LDFLAGS)
21++LIBS = -lGL -lGLU -lglut
22+
23+ ## -lqgl -lGLU
24+
25+@@ -109,7 +109,7 @@
26+ SRCMOC =
27+ OBJMOC =
28+ DIST =
29+-TARGET = BillardGL
30++TARGET = billard-gl
31+ INTERFACE_DECL_PATH = .
32+
33+ ####### Implicit rules
patches/06_language_pack.patchnew file+56
@@ -0,0 +1,56 @@
1+Author: Vincent Legout <vincent@legout.info>
2+Bug-Debian: http://bugs.debian.org/580711
3+Description: Fix a segmentation fault due to missing strings in language files
4+
5+Index: billard-gl-1.75/lp/901.lang
6+===================================================================
7+--- billard-gl-1.75.orig/lp/901.lang 2010-05-08 22:19:14.075833001 +0800
8++++ billard-gl-1.75/lp/901.lang 2010-05-08 22:19:43.659833001 +0800
9+@@ -143,6 +143,8 @@
10+ 295 Texture Interpolation :
11+ 296 Off
12+ 297 Linear
13++298 Standard
14++299 High
15+
16+ 300 Quality :
17+ 301 Very Fast
18+Index: billard-gl-1.75/lp/904.lang
19+===================================================================
20+--- billard-gl-1.75.orig/lp/904.lang 2010-05-08 22:20:00.947833001 +0800
21++++ billard-gl-1.75/lp/904.lang 2010-05-08 22:20:33.283833001 +0800
22+@@ -141,6 +141,8 @@
23+ 295 Interpolacion de texturas :
24+ 296 No
25+ 297 Lineal
26++298 Normal
27++299 Alta
28+
29+ 300 Calidad :
30+ 301 Muy r�pido
31+Index: billard-gl-1.75/lp/905.lang
32+===================================================================
33+--- billard-gl-1.75.orig/lp/905.lang 2010-05-08 22:21:10.631833001 +0800
34++++ billard-gl-1.75/lp/905.lang 2010-05-08 22:21:48.847833001 +0800
35+@@ -141,6 +141,8 @@
36+ 295 Struktur Interpolation :
37+ 296 Off
38+ 297 Line�r
39++298 Standard
40++299 High
41+
42+ 300 Kvalitet :
43+ 301 Meget Hurtig
44+Index: billard-gl-1.75/lp/907.lang
45+===================================================================
46+--- billard-gl-1.75.orig/lp/907.lang 2010-05-08 22:21:19.331833000 +0800
47++++ billard-gl-1.75/lp/907.lang 2010-05-08 22:21:40.583833001 +0800
48+@@ -141,6 +141,8 @@
49+ 295 Struktur Interpolation :
50+ 296 Off
51+ 297 Line�r
52++298 Standard
53++299 High
54+
55+ 300 Kvalitet :
56+ 301 Meget Hurtig
patches/07_segfault_no_home.patchnew file+48
@@ -0,0 +1,48 @@
1+Description: billard-gl tries to get the HOME dir but doesn't fail gracefully
2+ if it is not set in the environment. This patch addresses that.
3+Author: Barry deFreese <bdefreese@debian.org>
4+Debian-Bug: http://bugs.debian.org/715681
5+Index: billard-gl-1.75/src/KommandoZeilenParameter.cpp
6+===================================================================
7+--- billard-gl-1.75.orig/src/KommandoZeilenParameter.cpp 2013-08-09 11:52:05.000000000 -0400
8++++ billard-gl-1.75/src/KommandoZeilenParameter.cpp 2013-08-09 20:25:45.906456954 -0400
9+@@ -2,6 +2,9 @@
10+ #include <stdlib.h>
11+ #include <stdio.h>
12+ #include <string.h>
13++#include <unistd.h>
14++#include <sys/types.h>
15++#include <pwd.h>
16+ #include "Namen.h"
17+ #include "KommandoZeilenParameter.h"
18+
19+@@ -9,7 +12,13 @@
20+ FILE *f;
21+ #ifndef _WIN32
22+ char dateiname[512];
23+- snprintf(dateiname,sizeof(dateiname),"%s/.BillardGL.conf.v7",getenv("HOME"));
24++ const char *homedir = getenv("HOME");
25++ if (!homedir) {
26++ struct passwd *pw;
27++ pw = getpwuid(getuid());
28++ homedir = pw->pw_dir;
29++ }
30++ snprintf(dateiname,sizeof(dateiname),"%s/.BillardGL.conf.v7",homedir);
31+ f=fopen(dateiname,"w+");
32+ #endif
33+ #ifdef _WIN32
34+@@ -66,7 +75,13 @@
35+ FILE *f;
36+ #ifndef _WIN32
37+ char dateiname[512];
38+- snprintf(dateiname,sizeof(dateiname),"%s/.BillardGL.conf.v7",getenv("HOME"));
39++ const char *homedir = getenv("HOME");
40++ if (!homedir) {
41++ struct passwd *pw;
42++ pw = getpwuid(getuid());
43++ homedir = pw->pw_dir;
44++ }
45++ snprintf(dateiname,sizeof(dateiname),"%s/.BillardGL.conf.v7",homedir);
46+ f=fopen(dateiname,"r");
47+ #endif
48+ #ifdef _WIN32
patches/99_cosmetic_fixes.patchnew file+293
@@ -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));
shared-modulesnew file+1

Submodule changed.