Skip to content

Commit 19b779c

Browse files
Jess Portnoyjessp01
andauthored
Fixes && Suggestions (#3)
* Fixes the below: ```c billard3d.c:2319:41: warning: unused variable ‘cue_start_ball’ [-Wunused-variable] 2319 | VMvect dir,cue_start,cue_start_bande,cue_start_ball,nx,ny,pos,hitpoint; | ^~~~~~~~~~~~~~ billard3d.c:2319:15: warning: unused variable ‘cue_start’ [-Wunused-variable] 2319 | VMvect dir,cue_start,cue_start_bande,cue_start_ball,nx,ny,pos,hitpoint; | ^~~~~~~~~ billard3d.c: In function ‘init_player_roster’: billard3d.c:2574:5: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 2574 | if(getenv("USER")) | ^~ billard3d.c:2576:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 2576 | strcpy(player[0].name,getenv("USER")); | ^~~~~~ billard3d.c: In function ‘Key’: billard3d.c:6506:25: warning: statement with no effect [-Wunused-value] 6506 | options_pause == 0; | ~~~~~~~~~~~~~~^~~~ ``` * - Fix include path for freetype2/ft2build.h - Drop freetype2/freetypeftoutln.h as it does not exist in recent versions of `freetype2` * Compiling with `FAST_MATH` using a modern GCC and LD vers results with: ``` /usr/bin/ld: billard3d.c:(.text+0x4d79): undefined reference to `fastcos' /usr/bin/ld: billard3d.c:(.text+0x4dbe): undefined reference to `fastsin' ``` Set to `no` by default for now. * Util script for GNU build toolchain invocation * Synlink to MD. * README fixes * A few more README modifications * . * . * Rearranged README sections * A few more touches * Illustration images * Add images to README. * . * More screen images * Add more screen images * Added Jesse to `AUTHORS` * CI * . * `libpng-dev` is the package name for recent Ubuntu versions * invoke `configure` && `make` * use `pkg-config` since freetype-config is deprecated. * Creation of desktop file needs to happen before copying it * fix typo * fix header safeguard typo * . * - Same font as status for player name and score - Show number of balls pocketed by player when player 8 ball - Orange rather than blue for non-active player name and score - Fix some compiler warnings - Introduced UK English locale (mostly because of the spelling of the word 'colour') * - options_language size 5 to accommodate languages with multiple locales - use '-' as separator for locales since '_' is currently replaced by space * bigger size * - avoid `sprintf()` overflow warnings - freetype/ftoutln.h is needed for `FT_Outline_Decompose()` * be more generous with size allocation to avoid `-Wformat-overflow=` warnings * Remove `inline` from function declarations as they are in fact defined in `vmath.c` --------- Co-authored-by: Jesse Portnoy <[email protected]>
1 parent 25ded25 commit 19b779c

35 files changed

+999
-765
lines changed

.github/workflows/ci.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: GitHub CI
2+
3+
on: [push, pull_request]
4+
5+
defaults:
6+
run:
7+
shell: 'bash -Eeuo pipefail -x {0}'
8+
9+
jobs:
10+
build-and-test:
11+
name: Build and Test
12+
runs-on: ubuntu-22.04
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
compiler: [clang-12, gcc-10]
17+
env:
18+
CC: ${{ matrix.compiler }}
19+
steps:
20+
- uses: actions/checkout@v2
21+
- name: Install Dependencies
22+
run: |
23+
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
24+
sudo apt-get update -qq
25+
sudo apt-get install -y \
26+
build-essential \
27+
pkg-config \
28+
clang-12 \
29+
gcc-10 \
30+
libglu1-mesa-dev \
31+
libfreetype6-dev \
32+
libpng-dev \
33+
libsdl1.2-dev \
34+
libsdl-net1.2-dev \
35+
libsdl-mixer1.2-dev
36+
- name : Build
37+
run: ./buildme.sh ${{ matrix.confargs }}
38+
- name : Install
39+
run : |
40+
sudo make install
41+
- name : Smoke test
42+
run : ldd /usr/games/foobillardplus/bin/foobillardplus

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,4 @@ src/stamp-h1
4141
# Mac specific things
4242
.DS_Store
4343
xcuserdata/
44-
homebrew/
44+
homebrew/

AUTHORS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ Robert Brandl - Windows port with MinGW/Msys
44
Julian Mayer - Apple Mac Port
55
Alrusdi - Russian localisation
66
Émeric Dupont - Patches and fixes
7-
7+
Jesse Portnoy - Patches and fixes, README additions

INSTALL

Lines changed: 161 additions & 163 deletions
Large diffs are not rendered by default.

LICENSE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
COPYING

Makefile.am

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ dist-hook:
2323
cp -p $(srcdir)/ChangeLog $(distdir)
2424
cp -p $(srcdir)/TODO $(distdir)
2525
cp -p $(srcdir)/OFL.txt $(distdir)
26+
echo -e "[Desktop Entry]\nVersion=1.0\nType=Application\nTerminal=false\nIcon=/usr/share/icons/foobillardplus.png\nName=Foobillard++\nExec=$(bindir)/foobillardplus\nComment=OpenGL Billiard Game\nGenericName=OpenGL Billiard Game\n" > foobillardplus.desktop
2627
cp -p $(srcdir)/foobillardplus.desktop $(distdir)
2728
cp -p $(srcdir)/foobillardplus.desktop /usr/share/applications
2829
cp -p $(srcdir)/foobillardplus.png $(distdir)
@@ -39,11 +40,11 @@ install-data-hook:
3940
cp -p $(srcdir)/ChangeLog $(datarootdir)
4041
cp -p $(srcdir)/TODO $(datarootdir)
4142
cp -p $(srcdir)/OFL.txt $(datarootdir)
43+
echo -e "[Desktop Entry]\nVersion=1.0\nType=Application\nTerminal=false\nIcon=/usr/share/icons/foobillardplus.png\nName=Foobillard++\nExec=$(bindir)/foobillardplus\nComment=OpenGL Billiard Game\nGenericName=OpenGL Billiard Game\n" > foobillardplus.desktop
4244
cp -p $(srcdir)/foobillardplus.desktop $(datarootdir)
4345
cp -p $(srcdir)/foobillardplus.png $(datarootdir)
4446
cp -p $(srcdir)/foobillardplus.png /usr/share/icons
4547
cp -p $(srcdir)/foobillardplus.xbm $(datarootdir)
46-
echo -e "[Desktop Entry]\nVersion=1.0\nType=Application\nTerminal=false\nIcon=/usr/share/icons/foobillardplus.png\nName=Foobillard++\nExec=$(bindir)/foobillardplus\nComment=OpenGL Billiard Game\nGenericName=OpenGL Billiard Game\n" >/usr/share/applications/foobillardplus.desktop
4748

4849
uninstall-hook:
4950
rm $(datarootdir) -R

README

Lines changed: 0 additions & 290 deletions
This file was deleted.

README

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
README.md

0 commit comments

Comments
 (0)