Skip to content

Commit

Permalink
Fixes && Suggestions (#3)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
Jess Portnoy and jessp01 authored Apr 2, 2023
1 parent 25ded25 commit 19b779c
Show file tree
Hide file tree
Showing 35 changed files with 999 additions and 765 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: GitHub CI

on: [push, pull_request]

defaults:
run:
shell: 'bash -Eeuo pipefail -x {0}'

jobs:
build-and-test:
name: Build and Test
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
compiler: [clang-12, gcc-10]
env:
CC: ${{ matrix.compiler }}
steps:
- uses: actions/checkout@v2
- name: Install Dependencies
run: |
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
sudo apt-get update -qq
sudo apt-get install -y \
build-essential \
pkg-config \
clang-12 \
gcc-10 \
libglu1-mesa-dev \
libfreetype6-dev \
libpng-dev \
libsdl1.2-dev \
libsdl-net1.2-dev \
libsdl-mixer1.2-dev
- name : Build
run: ./buildme.sh ${{ matrix.confargs }}
- name : Install
run : |
sudo make install
- name : Smoke test
run : ldd /usr/games/foobillardplus/bin/foobillardplus
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ src/stamp-h1
# Mac specific things
.DS_Store
xcuserdata/
homebrew/
homebrew/
2 changes: 1 addition & 1 deletion AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ Robert Brandl - Windows port with MinGW/Msys
Julian Mayer - Apple Mac Port
Alrusdi - Russian localisation
Émeric Dupont - Patches and fixes

Jesse Portnoy - Patches and fixes, README additions
324 changes: 161 additions & 163 deletions INSTALL

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions LICENSE
3 changes: 2 additions & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ dist-hook:
cp -p $(srcdir)/ChangeLog $(distdir)
cp -p $(srcdir)/TODO $(distdir)
cp -p $(srcdir)/OFL.txt $(distdir)
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
cp -p $(srcdir)/foobillardplus.desktop $(distdir)
cp -p $(srcdir)/foobillardplus.desktop /usr/share/applications
cp -p $(srcdir)/foobillardplus.png $(distdir)
Expand All @@ -39,11 +40,11 @@ install-data-hook:
cp -p $(srcdir)/ChangeLog $(datarootdir)
cp -p $(srcdir)/TODO $(datarootdir)
cp -p $(srcdir)/OFL.txt $(datarootdir)
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
cp -p $(srcdir)/foobillardplus.desktop $(datarootdir)
cp -p $(srcdir)/foobillardplus.png $(datarootdir)
cp -p $(srcdir)/foobillardplus.png /usr/share/icons
cp -p $(srcdir)/foobillardplus.xbm $(datarootdir)
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

uninstall-hook:
rm $(datarootdir) -R
Expand Down
290 changes: 0 additions & 290 deletions README

This file was deleted.

1 change: 1 addition & 0 deletions README
Loading

0 comments on commit 19b779c

Please sign in to comment.