├── debian
├── dirs
├── pinball.docs
├── pinball.manpages
├── source
│ └── format
├── pinball-data.install
├── pinball-dev.manpages
├── tests
│ ├── control
│ └── smoke
├── watch
├── gbp.conf
├── pinball.install
├── changelog
├── pinball-dev.install
├── pinball.postrm
├── upstream
│ └── metadata
├── clean
├── pinball.postinst
├── pinball-config.6
└── rules
├── test
├── module.txt
├── fire.png
├── tex.jpg
├── token.txt
├── explode.png
├── font_12.pcx
├── font_16.pcx
├── script.txt
├── collision.cpp
├── explode2.png
├── moduletest.cpp
├── unittest.cpp
├── joy.cpp
├── Makefile.am
├── big.cpp
├── key.cpp
├── sound.cpp
├── simple.cpp
├── thread.cpp
├── camera.cpp
├── billboard.cpp
├── font.cpp
├── alpha.cpp
├── anim.cpp
├── trans.cpp
├── light.cpp
├── ship.emi
├── tmp.emi
├── texture.cpp
├── signal.cpp
└── misc.cpp
├── NEWS
├── snap
└── hooks
│ └── configure
├── data
├── menu.mid
├── font_34.png
├── font_35.pcx
├── splash.png
├── tux
│ ├── up.wav
│ ├── bump.wav
│ ├── face.png
│ ├── face2.png
│ ├── flip.wav
│ ├── floor2.png
│ ├── floor3.png
│ ├── game.mid
│ ├── game.ogg
│ ├── intro.mid
│ ├── intro.ogg
│ ├── lock.wav
│ ├── loop.wav
│ ├── nudge.wav
│ ├── shoot.wav
│ ├── tiles.png
│ ├── bumphard.wav
│ ├── bumpsoft.wav
│ ├── face.png.pcx
│ ├── gameover.wav
│ ├── locklock.wav
│ ├── opentux.wav
│ ├── floor2.png.pcx
│ ├── multiball.mid
│ ├── multiball.ogg
│ ├── tiles.png.pcx
│ └── Makefile.am
├── splash.png.pcx
├── professor
│ ├── bump.wav
│ ├── flip.wav
│ ├── floor.png
│ ├── nudge.wav
│ ├── introp.ogg
│ ├── bumphard.wav
│ ├── bumpsoft.wav
│ ├── floor.png.pcx
│ ├── gameover.wav
│ ├── professor.mid
│ ├── professor.ogg
│ ├── professor.png
│ └── Makefile.am
├── Makefile.am
└── pinball.xpm
├── .github
├── FUNDING.yml
└── workflows
│ └── fediverse-action.yml
├── .travis.yml
├── base
├── CollisionVisitor.cpp
├── Camera.cpp
├── Behavior.cpp
├── SoundVisitor.h
├── BehaviorVisitor.h
├── TransformVisitor.h
├── RenderVisitor.cpp
├── SoundVisitor.cpp
├── OpenGLVisitor.h
├── Camera.h
├── PointLightVisitor.h
├── Light.cpp
├── OctTree.h
├── AmbientLightVisitor.h
├── Sound.h
├── Profiler.h
├── AlignVisitor.h
├── BillBoard.cpp
├── SignalSender.h
├── RenderVisitor.h
├── BehaviorVisitor.cpp
├── Makefile.am
├── Sound.cpp
├── BillBoard.h
├── AllegroVisitor.h
├── EmFont.h
├── Node.h
├── Light.h
├── Visitor.h
├── StateMachine.h
├── CollisionBounds.h
└── SoundUtil.h
├── extra
├── files
│ └── screenshot.png
├── profile
│ ├── pinball
│ │ └── etc
│ │ │ ├── pinball
│ │ │ ├── xinit.env.sh
│ │ │ ├── pinball.service
│ │ │ ├── xinit.service
│ │ │ ├── pinball
│ │ │ ├── weston.service
│ │ │ ├── pinball.env.sh
│ │ │ ├── configure.sh
│ │ │ └── install.sh
│ │ │ └── init.d
│ │ │ └── pinball
│ └── pincab
│ │ └── etc
│ │ └── pinball
│ │ ├── pinball
│ │ ├── weston.ini
│ │ └── pinball.env.sh
├── debos
│ ├── machine
│ │ ├── generic
│ │ │ ├── image.yaml
│ │ │ ├── pinball-i386.yaml
│ │ │ ├── pinball-amd64.yaml
│ │ │ └── actions.yaml
│ │ ├── rpi_4
│ │ │ ├── image.yaml
│ │ │ ├── actions.yaml
│ │ │ └── pinball-rpi_4.yaml
│ │ ├── rpi_3_32b
│ │ │ ├── image.yaml
│ │ │ ├── actions.yaml
│ │ │ └── pinball-rpi_3_32b.yaml
│ │ ├── rpi_3_64b
│ │ │ ├── image.yaml
│ │ │ ├── actions.yaml
│ │ │ └── pinball-rpi_3_64b.yaml
│ │ └── rpi_2
│ │ │ ├── pinball-rpi_2.yaml
│ │ │ └── image.yaml
│ └── pinball.yaml
├── fink
│ └── pinball.info
└── Makefile
├── bootstrap
├── docs
├── contact.md
├── Home.md
├── screenshots.md
├── credits.md
├── bugs.md
├── download.md
├── editor.md
├── index.md
├── Makefile
├── news.md
└── faq.md
├── docker-compose.yml
├── .whitesource
├── Makefile.am
├── pinball.desktop
├── addon
├── BigSphere.h
├── Makefile.am
├── Sphere.h
├── Cube.h
├── Cone.h
├── Cylinder.h
├── KeyBehavior.h
├── KeyRotBehavior.h
├── TexAnimation.h
├── ColorBehavior.h
├── KeyRotBehavior.cpp
├── KeyBehavior.cpp
├── Grid.h
├── ColorBehavior.cpp
├── Cone.cpp
├── Grid.cpp
├── Cylinder.cpp
└── TexAnimation.cpp
├── AUTHORS
├── ChangeLog
├── CONTRIBUTING.md
├── pinball.appdata.xml
├── src
├── BallGroup.h
├── BumperBehavior.h
├── FakeModuleBehavior.h
├── ArmBehavior.h
├── PlungerBehavior.h
├── LoaderModule.h
├── BounceBehavior.h
├── BumperBehavior.cpp
├── Makefile.am
├── EyeBehavior.h
├── Score.h
├── Script.h
├── Script.cpp
└── Obj3dsUtil.h
├── BUILD.md
├── pinball.dsw
├── Dockerfile
├── pinball-config.in
├── FAQ.md
├── .gitignore
├── .dockerignore
└── pinball.spec
/debian/dirs:
--------------------------------------------------------------------------------
1 | /usr/games
2 |
--------------------------------------------------------------------------------
/debian/pinball.docs:
--------------------------------------------------------------------------------
1 | README
2 |
--------------------------------------------------------------------------------
/debian/pinball.manpages:
--------------------------------------------------------------------------------
1 | pinball.6
2 |
--------------------------------------------------------------------------------
/debian/source/format:
--------------------------------------------------------------------------------
1 | 3.0 (quilt)
2 |
--------------------------------------------------------------------------------
/test/module.txt:
--------------------------------------------------------------------------------
1 | {
2 | libModuleTest.la
3 | }
4 |
--------------------------------------------------------------------------------
/debian/pinball-data.install:
--------------------------------------------------------------------------------
1 | usr/share/games/pinball
2 |
--------------------------------------------------------------------------------
/debian/pinball-dev.manpages:
--------------------------------------------------------------------------------
1 | debian/pinball-config.6
2 |
--------------------------------------------------------------------------------
/NEWS:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaymiiOrg/pinball/master/NEWS
--------------------------------------------------------------------------------
/snap/hooks/configure:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | snapctl restart $SNAP_NAME
3 |
--------------------------------------------------------------------------------
/data/menu.mid:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaymiiOrg/pinball/master/data/menu.mid
--------------------------------------------------------------------------------
/debian/tests/control:
--------------------------------------------------------------------------------
1 | Tests: smoke
2 | Depends: @
3 | Restrictions: allow-stderr
4 |
--------------------------------------------------------------------------------
/test/fire.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaymiiOrg/pinball/master/test/fire.png
--------------------------------------------------------------------------------
/test/tex.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaymiiOrg/pinball/master/test/tex.jpg
--------------------------------------------------------------------------------
/test/token.txt:
--------------------------------------------------------------------------------
1 | a b
2 | aa bb cc
3 |
4 | aaaa bbbb
5 | 12
6 | aaaaaa bbbbbb
7 |
--------------------------------------------------------------------------------
/data/font_34.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaymiiOrg/pinball/master/data/font_34.png
--------------------------------------------------------------------------------
/data/font_35.pcx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaymiiOrg/pinball/master/data/font_35.pcx
--------------------------------------------------------------------------------
/data/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaymiiOrg/pinball/master/data/splash.png
--------------------------------------------------------------------------------
/data/tux/up.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaymiiOrg/pinball/master/data/tux/up.wav
--------------------------------------------------------------------------------
/debian/watch:
--------------------------------------------------------------------------------
1 | version=4
2 | https://sf.net/pinball/pinball-([\d+\.]+|\d+)\.tar\.gz
3 |
--------------------------------------------------------------------------------
/test/explode.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaymiiOrg/pinball/master/test/explode.png
--------------------------------------------------------------------------------
/test/font_12.pcx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaymiiOrg/pinball/master/test/font_12.pcx
--------------------------------------------------------------------------------
/test/font_16.pcx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaymiiOrg/pinball/master/test/font_16.pcx
--------------------------------------------------------------------------------
/test/script.txt:
--------------------------------------------------------------------------------
1 | {
2 | onsignal 1 11 setvar 101 1
3 | onsignal 1 22 setvar 101 2
4 | }
--------------------------------------------------------------------------------
/data/splash.png.pcx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaymiiOrg/pinball/master/data/splash.png.pcx
--------------------------------------------------------------------------------
/data/tux/bump.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaymiiOrg/pinball/master/data/tux/bump.wav
--------------------------------------------------------------------------------
/data/tux/face.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaymiiOrg/pinball/master/data/tux/face.png
--------------------------------------------------------------------------------
/data/tux/face2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaymiiOrg/pinball/master/data/tux/face2.png
--------------------------------------------------------------------------------
/data/tux/flip.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaymiiOrg/pinball/master/data/tux/flip.wav
--------------------------------------------------------------------------------
/data/tux/floor2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaymiiOrg/pinball/master/data/tux/floor2.png
--------------------------------------------------------------------------------
/data/tux/floor3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaymiiOrg/pinball/master/data/tux/floor3.png
--------------------------------------------------------------------------------
/data/tux/game.mid:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaymiiOrg/pinball/master/data/tux/game.mid
--------------------------------------------------------------------------------
/data/tux/game.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaymiiOrg/pinball/master/data/tux/game.ogg
--------------------------------------------------------------------------------
/data/tux/intro.mid:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaymiiOrg/pinball/master/data/tux/intro.mid
--------------------------------------------------------------------------------
/data/tux/intro.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaymiiOrg/pinball/master/data/tux/intro.ogg
--------------------------------------------------------------------------------
/data/tux/lock.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaymiiOrg/pinball/master/data/tux/lock.wav
--------------------------------------------------------------------------------
/data/tux/loop.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaymiiOrg/pinball/master/data/tux/loop.wav
--------------------------------------------------------------------------------
/data/tux/nudge.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaymiiOrg/pinball/master/data/tux/nudge.wav
--------------------------------------------------------------------------------
/data/tux/shoot.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaymiiOrg/pinball/master/data/tux/shoot.wav
--------------------------------------------------------------------------------
/data/tux/tiles.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaymiiOrg/pinball/master/data/tux/tiles.png
--------------------------------------------------------------------------------
/test/collision.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaymiiOrg/pinball/master/test/collision.cpp
--------------------------------------------------------------------------------
/test/explode2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaymiiOrg/pinball/master/test/explode2.png
--------------------------------------------------------------------------------
/data/tux/bumphard.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaymiiOrg/pinball/master/data/tux/bumphard.wav
--------------------------------------------------------------------------------
/data/tux/bumpsoft.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaymiiOrg/pinball/master/data/tux/bumpsoft.wav
--------------------------------------------------------------------------------
/data/tux/face.png.pcx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaymiiOrg/pinball/master/data/tux/face.png.pcx
--------------------------------------------------------------------------------
/data/tux/gameover.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaymiiOrg/pinball/master/data/tux/gameover.wav
--------------------------------------------------------------------------------
/data/tux/locklock.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaymiiOrg/pinball/master/data/tux/locklock.wav
--------------------------------------------------------------------------------
/data/tux/opentux.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaymiiOrg/pinball/master/data/tux/opentux.wav
--------------------------------------------------------------------------------
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | github: [rzr]
2 | custom: ["https://www.paypal.me/rzrfreefr", www.rzr.online.fr]
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | dist: bionic
2 | sudo: required
3 | services: docker
4 | script:
5 | - docker build .
6 |
--------------------------------------------------------------------------------
/data/professor/bump.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaymiiOrg/pinball/master/data/professor/bump.wav
--------------------------------------------------------------------------------
/data/professor/flip.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaymiiOrg/pinball/master/data/professor/flip.wav
--------------------------------------------------------------------------------
/data/professor/floor.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaymiiOrg/pinball/master/data/professor/floor.png
--------------------------------------------------------------------------------
/data/professor/nudge.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaymiiOrg/pinball/master/data/professor/nudge.wav
--------------------------------------------------------------------------------
/data/tux/floor2.png.pcx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaymiiOrg/pinball/master/data/tux/floor2.png.pcx
--------------------------------------------------------------------------------
/data/tux/multiball.mid:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaymiiOrg/pinball/master/data/tux/multiball.mid
--------------------------------------------------------------------------------
/data/tux/multiball.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaymiiOrg/pinball/master/data/tux/multiball.ogg
--------------------------------------------------------------------------------
/data/tux/tiles.png.pcx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaymiiOrg/pinball/master/data/tux/tiles.png.pcx
--------------------------------------------------------------------------------
/base/CollisionVisitor.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaymiiOrg/pinball/master/base/CollisionVisitor.cpp
--------------------------------------------------------------------------------
/data/professor/introp.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaymiiOrg/pinball/master/data/professor/introp.ogg
--------------------------------------------------------------------------------
/extra/files/screenshot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaymiiOrg/pinball/master/extra/files/screenshot.png
--------------------------------------------------------------------------------
/data/professor/bumphard.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaymiiOrg/pinball/master/data/professor/bumphard.wav
--------------------------------------------------------------------------------
/data/professor/bumpsoft.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaymiiOrg/pinball/master/data/professor/bumpsoft.wav
--------------------------------------------------------------------------------
/data/professor/floor.png.pcx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaymiiOrg/pinball/master/data/professor/floor.png.pcx
--------------------------------------------------------------------------------
/data/professor/gameover.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaymiiOrg/pinball/master/data/professor/gameover.wav
--------------------------------------------------------------------------------
/data/professor/professor.mid:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaymiiOrg/pinball/master/data/professor/professor.mid
--------------------------------------------------------------------------------
/data/professor/professor.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaymiiOrg/pinball/master/data/professor/professor.ogg
--------------------------------------------------------------------------------
/data/professor/professor.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaymiiOrg/pinball/master/data/professor/professor.png
--------------------------------------------------------------------------------
/bootstrap:
--------------------------------------------------------------------------------
1 | #! /bin/sh
2 | # SPDX-License-Identifier: GPL-2
3 | set -e
4 | set -x
5 |
6 | ./helper.mk bootstrap
7 |
--------------------------------------------------------------------------------
/debian/gbp.conf:
--------------------------------------------------------------------------------
1 | [DEFAULT]
2 | debian-branch=debian/master
3 | upstream-branch=master
4 | filter=*/.git
5 | upstream-tag=%(version)s
6 |
--------------------------------------------------------------------------------
/extra/profile/pinball/etc/pinball/xinit.env.sh:
--------------------------------------------------------------------------------
1 | # SPDX-License-Identifier: GPL-2.0+
2 |
3 | XINITRC=/etc/pinball/pinball-session.sh
4 |
--------------------------------------------------------------------------------
/debian/tests/smoke:
--------------------------------------------------------------------------------
1 | #!/bin/sh -e
2 |
3 | export HOME=${AUTOPKGTEST_TMP:-${TMPDIR:-/tmp}}
4 | pinball -dir | grep '/usr/share/games/pinball'
5 |
--------------------------------------------------------------------------------
/debian/pinball.install:
--------------------------------------------------------------------------------
1 | usr/games/pinball
2 | usr/lib/*/pinball/*.la
3 | usr/lib/*/pinball/*.so.*
4 | usr/share/applications/pinball.desktop
5 | usr/share/pixmaps/pinball.xpm
6 |
--------------------------------------------------------------------------------
/debian/changelog:
--------------------------------------------------------------------------------
1 | pinball (0.0.0-0) unstable; urgency=medium
2 |
3 | * wip: https://purl.org/rzr
4 |
5 | -- Philippe Coval Fri, 31 Jul 2020 16:23:26 +0200
6 |
--------------------------------------------------------------------------------
/debian/pinball-dev.install:
--------------------------------------------------------------------------------
1 | usr/include
2 | usr/games/pinball-config
3 | usr/lib/*/pinball/libemilia_addon.a
4 | usr/lib/*/pinball/libemilia_base.a
5 | usr/lib/*/pinball/libemilia_pin.a
6 |
--------------------------------------------------------------------------------
/debian/pinball.postrm:
--------------------------------------------------------------------------------
1 | #! /bin/sh
2 |
3 | set -e
4 |
5 | if [ "$1" = "purge" ] ; then
6 |
7 | if [ -d /var/games/pinball ]; then
8 | rm -rf /var/games/pinball
9 | fi
10 |
11 | fi
12 |
13 | #DEBHELPER#
14 |
--------------------------------------------------------------------------------
/docs/contact.md:
--------------------------------------------------------------------------------
1 | # Contact #
2 |
3 | Comments, bug reports and fan mail can be mailed to henqvist at users.sourceforge.net
4 | please use the word 'pinball' somewhere in the subject
5 | otherwise it may go in the thrash as spam.
6 |
--------------------------------------------------------------------------------
/docker-compose.yml:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | # SPDX-License-Identifier: GPL-2.0
3 |
4 | version: "2"
5 |
6 | services:
7 | default:
8 | build: .
9 | environment:
10 | - DISPLAY=unix:0
11 | volumes:
12 | - /tmp/.X11-unix:/tmp/.X11-unix
13 |
--------------------------------------------------------------------------------
/extra/profile/pinball/etc/pinball/pinball.service:
--------------------------------------------------------------------------------
1 | [Unit]
2 | After=weston.service
3 | Requires=display-manager.service
4 |
5 | [Service]
6 | Type=single
7 | ExecStart=/etc/pinball/pinball-session.sh
8 | Restart=always
9 |
10 | [Install]
11 | WantedBy=graphical.target
12 |
--------------------------------------------------------------------------------
/.whitesource:
--------------------------------------------------------------------------------
1 | {
2 | "scanSettings": {
3 | "configMode": "AUTO",
4 | "configExternalURL": ""
5 | },
6 | "checkRunSettings": {
7 | "vulnerableCheckRunConclusionLevel": "failure"
8 | },
9 | "issueSettings": {
10 | "minSeverityLevel": "LOW"
11 | }
12 | }
--------------------------------------------------------------------------------
/data/Makefile.am:
--------------------------------------------------------------------------------
1 | AUTOMAKE_OPTIONS = gnu
2 |
3 | SUBDIRS = tux professor
4 |
5 | pindatadir = $(datadir)/pinball
6 |
7 | pindata_DATA = \
8 | font_34.png \
9 | font_35.pcx \
10 | pinball.xpm \
11 | splash.png \
12 | splash.png.pcx
13 |
14 | EXTRA_DIST = $(pindata_DATA)
15 |
--------------------------------------------------------------------------------
/docs/Home.md:
--------------------------------------------------------------------------------
1 | - [bugs.md](bugs.md)
2 | - [contact.md](contact.md)
3 | - [credits.md](credits.md)
4 | - [download.md](download.md)
5 | - [editor.md](editor.md)
6 | - [faq.md](faq.md)
7 | - [index.md](index.md)
8 | - [news.md](news.md)
9 | - [screenshots.md](screenshots.md)
10 |
--------------------------------------------------------------------------------
/docs/screenshots.md:
--------------------------------------------------------------------------------
1 | - http://pinball.sourceforge.net/ss20021024_1.jpg
2 | - http://pinball.sourceforge.net/ss20021024_2.jpg
3 | - http://pinball.sourceforge.net/ss20021024_3.jpg
4 | - http://pinball.sourceforge.net/ss20021024_3.jpg
5 | - http://pinball.sourceforge.net/editor20030616.jpg
6 |
--------------------------------------------------------------------------------
/extra/profile/pinball/etc/pinball/xinit.service:
--------------------------------------------------------------------------------
1 | [Unit]
2 | RequiresMountsFor=/run
3 |
4 | [Service]
5 | User=root
6 | EnvironmentFile=-/etc/pinball/pinball.env.sh
7 | ExecStart=/usr/bin/xinit ${XINIT_ARGS}
8 |
9 | # TODO
10 | [Install]
11 | Alias=display-manager.service
12 | WantedBy=graphical.target
13 |
--------------------------------------------------------------------------------
/debian/upstream/metadata:
--------------------------------------------------------------------------------
1 | Bug-Database: https://sourceforge.net/p/pinball/bugs/
2 | Bug-Submit: https://sourceforge.net/p/pinball/bugs/new/
3 | Documentation: https://sourceforge.net/p/pinball/wiki/Home/
4 | Repository-Browse: https://sourceforge.net/p/pinball/code/
5 | Repository: https://git.code.sf.net/p/pinball/code.git
6 |
--------------------------------------------------------------------------------
/Makefile.am:
--------------------------------------------------------------------------------
1 | AUTOMAKE_OPTIONS = gnu
2 |
3 | SUBDIRS = libltdl addon base data src test
4 |
5 | EXTRA_DIST = bootstrap pinball.spec clean pinball.desktop
6 |
7 | pinincludedir = $(includedir)/pinball
8 |
9 | pininclude_HEADERS = pinconfig.h
10 |
11 | bin_SCRIPTS = pinball-config
12 |
13 | ACLOCAL_AMFLAGS = -I libltdl/m4
14 |
--------------------------------------------------------------------------------
/pinball.desktop:
--------------------------------------------------------------------------------
1 | [Desktop Entry]
2 | Categories=Game;Simulation;ArcadeGame;
3 | Name=Emilia Pinball
4 | Comment=3D pinball game
5 | Exec=pinball
6 | Icon=pinball
7 | Terminal=false
8 | Type=Application
9 | Comment[fr]=Jeu de flipper 3D
10 | Comment[ca]=Pinball 3D
11 | Comment[es]=Pinball 3D
12 | Keywords=Game;Arcade;Pinball;ArcadeGame
13 |
--------------------------------------------------------------------------------
/docs/credits.md:
--------------------------------------------------------------------------------
1 | # CREDITS #
2 |
3 | ## CREW ##
4 |
5 | - Lead developer: Henrik Enqvist.
6 | - Porting, coding: Philippe Coval.
7 | - Coding: Pedro Ferreira.
8 |
9 | ## SPECIAL THANKS ##
10 |
11 | - Bastian Salmela for the splash screen.
12 | - Thomas Thierry for maintaining a FreeBSD port.
13 | - And everybody else I forgot to mention.
14 |
--------------------------------------------------------------------------------
/extra/debos/machine/generic/image.yaml:
--------------------------------------------------------------------------------
1 | {{- $architecture := or .architecture "i386" -}}
2 |
3 | architecture: {{$architecture}}
4 |
5 | actions:
6 | - action: run
7 | description: Install bootloader
8 | chroot: true
9 | command: >
10 | {{if eq $architecture "i386" "amd64"}}
11 | update-grub
12 | && grub-install /dev/disk/by-id/virtio-fakedisk-0
13 | {{end}}
14 |
--------------------------------------------------------------------------------
/docs/bugs.md:
--------------------------------------------------------------------------------
1 | # Bugs #
2 |
3 | If I am not aware of the bugs I can not fix 'em.
4 | The list of known bugs is at project page:
5 |
6 | -
7 |
8 | Submit bugs there or send them to henqvist at users.sourceforge.net,
9 | please put the word 'pinball' somewhere in the subject
10 | otherwise it may go in the thrash as spam (99% of the english mail I get is spam).
11 |
--------------------------------------------------------------------------------
/extra/profile/pinball/etc/pinball/pinball:
--------------------------------------------------------------------------------
1 | size: 512 512
2 | sound: 8
3 | music: 8
4 | view: 1
5 | bpp: 16
6 | fullscreen: 0
7 | lights: 1
8 | brightness: 0.5
9 | texture_filter: 0
10 | showfps: 1
11 | fire: 1
12 | keyboard: bottomnudge 32
13 | keyboard: launch 13
14 | keyboard: leftflip 1073742049
15 | keyboard: leftnudge 1073742048
16 | keyboard: reset 114
17 | keyboard: rightflip 1073742053
18 | keyboard: rightnudge 1073742052
19 |
--------------------------------------------------------------------------------
/extra/profile/pincab/etc/pinball/pinball:
--------------------------------------------------------------------------------
1 | size: 768 1024
2 | sound: 8
3 | music: 8
4 | view: 4
5 | bpp: 16
6 | fullscreen: 1
7 | lights: 1
8 | brightness: 0.5
9 | texture_filter: 0
10 | showfps: 1
11 | fire: 1
12 | keyboard: bottomnudge 32
13 | keyboard: launch 13
14 | keyboard: leftflip 1073742049
15 | keyboard: leftnudge 1073742048
16 | keyboard: reset 114
17 | keyboard: rightflip 1073742053
18 | keyboard: rightnudge 1073742052
19 | ratio: 0.384
20 |
--------------------------------------------------------------------------------
/docs/download.md:
--------------------------------------------------------------------------------
1 | # Download #
2 |
3 | Download the latest release,
4 | 0.3.0 from the files sections at the project page at sourceforge.
5 |
6 | The rpm packages are for Red Hat 8.0.
7 | There is also some Mandrake binares on rpmfind
8 | and Debian package are also available from www.debian.org
9 | in the testing distribution (although they are really old at the moment).
10 |
11 | These packages are updated by other people
12 | so it may take some days (weeks) before the latest release is available.
13 |
--------------------------------------------------------------------------------
/extra/debos/machine/rpi_4/image.yaml:
--------------------------------------------------------------------------------
1 | {{- $architecture := or .architecture "arm64" -}}
2 | {{- $kernel := or .kernel "linux-image-generic" -}}
3 | {{- $machine := or .machine "rpi_4" -}}
4 | {{- $suite := or .suite "bullseye" -}}
5 |
6 | architecture: {{$architecture}}
7 |
8 | actions:
9 |
10 | - action: recipe
11 | recipe: ../rpi_2/image.yaml
12 | variables:
13 | architecture: {{$architecture}}
14 | kernel: {{$kernel}}
15 | machine: {{$machine}}
16 | suite: {{$suite}}
17 |
--------------------------------------------------------------------------------
/extra/debos/machine/rpi_3_32b/image.yaml:
--------------------------------------------------------------------------------
1 | {{- $architecture := or .architecture "armhf" -}}
2 | {{- $kernel := or .kernel "linux-image-armmp" -}}
3 | {{- $machine := or .machine "rpi_3_32b" -}}
4 | {{- $suite := or .suite "bullseye" -}}
5 |
6 | architecture: {{$architecture}}
7 |
8 | actions:
9 |
10 | - action: recipe
11 | recipe: ../rpi_2/image.yaml
12 | variables:
13 | architecture: {{$architecture}}
14 | kernel: {{$kernel}}
15 | machine: {{$machine}}
16 | suite: {{$suite}}
17 |
--------------------------------------------------------------------------------
/extra/debos/machine/rpi_3_64b/image.yaml:
--------------------------------------------------------------------------------
1 | {{- $architecture := or .architecture "arm64" -}}
2 | {{- $kernel := or .kernel "linux-image-generic" -}}
3 | {{- $machine := or .machine "rpi_3_64b" -}}
4 | {{- $suite := or .suite "bullseye" -}}
5 |
6 | architecture: {{$architecture}}
7 |
8 | actions:
9 |
10 | - action: recipe
11 | recipe: ../rpi_2/image.yaml
12 | variables:
13 | architecture: {{$architecture}}
14 | kernel: {{$kernel}}
15 | machine: {{$machine}}
16 | suite: {{$suite}}
17 |
--------------------------------------------------------------------------------
/extra/debos/machine/generic/pinball-i386.yaml:
--------------------------------------------------------------------------------
1 | {{- $architecture := or .architecture "i386" -}}
2 | {{- $machine := or .machine "generic" -}}
3 | {{- $mirror := or .mirror "https://deb.debian.org/debian" -}}
4 | {{- $suite := or .suite "bullseye" -}}
5 |
6 | architecture: {{$architecture}}
7 |
8 | actions:
9 |
10 | - action: recipe
11 | recipe: ../../pinball.yaml
12 | variables:
13 | architecture: {{$architecture}}
14 | machine: {{$machine}}
15 | mirror: {{$mirror}}
16 | suite: {{$suite}}
17 |
--------------------------------------------------------------------------------
/extra/debos/machine/rpi_2/pinball-rpi_2.yaml:
--------------------------------------------------------------------------------
1 | {{- $architecture := or .architecture "armhf" -}}
2 | {{- $machine := or .machine "rpi_2" -}}
3 | {{- $suite := or .suite "bullseye" -}}
4 | {{- $uboot_machine := or .uboot_machine "rpi_2" -}}
5 |
6 | architecture: {{$architecture}}
7 |
8 | actions:
9 |
10 | - action: recipe
11 | recipe: ../../pinball.yaml
12 | variables:
13 | architecture: {{$architecture}}
14 | machine: {{$machine}}
15 | suite: {{$suite}}
16 | uboot_machine: {{$uboot_machine}}
17 |
--------------------------------------------------------------------------------
/extra/debos/machine/generic/pinball-amd64.yaml:
--------------------------------------------------------------------------------
1 | {{- $architecture := or .architecture "amd64" -}}
2 | {{- $machine := or .machine "generic" -}}
3 | {{- $mirror := or .mirror "https://deb.debian.org/debian" -}}
4 | {{- $suite := or .suite "bullseye" -}}
5 |
6 | architecture: {{$architecture}}
7 |
8 | actions:
9 |
10 | - action: recipe
11 | recipe: ../../pinball.yaml
12 | variables:
13 | architecture: {{$architecture}}
14 | machine: {{$machine}}
15 | mirror: {{$mirror}}
16 | suite: {{$suite}}
17 |
--------------------------------------------------------------------------------
/base/Camera.cpp:
--------------------------------------------------------------------------------
1 | /***************************************************************************
2 | Camera.cpp - description
3 | -------------------
4 | begin : Fri Jan 28 2000
5 | copyright : (C) 2000 by
6 | email :
7 | ***************************************************************************/
8 |
9 | #include "Private.h"
10 | #include "Camera.h"
11 |
12 | Camera::Camera() {
13 | }
14 |
15 | Camera::~Camera() {
16 | }
17 |
--------------------------------------------------------------------------------
/docs/editor.md:
--------------------------------------------------------------------------------
1 | # Building your own tables #
2 |
3 | Those who want to build their own tables can download the in-house table editor for the game.
4 | It is basically a simple 3D-modeller which allows you to edit the statemachines of objects.
5 | Currently it uses its own file format but support for importing other 3D file formats is on its way.
6 | The editor only works on linux and other QT 3.x.x friendly environments.
7 | Download it as a seperate package from sourceforge, pinedit.
8 | The editor requies that the latest version of pinball is installed.
9 |
10 |
11 |
--------------------------------------------------------------------------------
/extra/debos/machine/rpi_3_32b/actions.yaml:
--------------------------------------------------------------------------------
1 | {{- $architecture := or .architecture "armhf" -}}
2 | {{- $kernel := or .kernel "linux-image-armmp" -}}
3 | {{- $machine := or .machine "rpi_3_32b" -}}
4 | {{- $suite := or .suite "bullseye" -}}
5 | {{- $uboot_machine := or .uboot_machine "rpi_3_32b" -}}
6 |
7 | architecture: {{$architecture}}
8 |
9 | actions:
10 |
11 | - action: recipe
12 | recipe: ../rpi_2/actions.yaml
13 | variables:
14 | architecture: {{$architecture}}
15 | kernel: {{$kernel}}
16 | machine: {{$machine}}
17 | suite: {{$suite}}
18 | uboot_machine: {{$uboot_machine}}
19 |
--------------------------------------------------------------------------------
/extra/debos/machine/rpi_4/actions.yaml:
--------------------------------------------------------------------------------
1 | {{- $architecture := or .architecture "arm64" -}}
2 | {{- $kernel := or .kernel "linux-image-generic" -}}
3 | {{- $machine := or .machine "rpi_4" -}}
4 | {{- $suite := or .suite "bullseye" -}}
5 | {{- $uboot_machine := or .uboot_machine "rpi4" -}}
6 |
7 | architecture: {{$architecture}}
8 |
9 | actions:
10 |
11 | - action: recipe
12 | recipe: ../rpi_2/actions.yaml
13 | variables:
14 | architecture: {{$architecture}}
15 | kernel: {{$kernel}}
16 | machine: {{$machine}}
17 | suite: {{$suite}}
18 | uboot_machine: {{$uboot_machine}}
19 |
20 |
--------------------------------------------------------------------------------
/extra/debos/machine/rpi_4/pinball-rpi_4.yaml:
--------------------------------------------------------------------------------
1 | {{- $architecture := or .architecture "arm64" -}}
2 | {{- $machine := or .machine "rpi_4" -}}
3 | {{- $mirror := or .mirror "https://deb.debian.org/debian" -}}
4 | {{- $suite := or .suite "bullseye" -}}
5 | {{- $uboot_machine := or .uboot_machine "rpi_4" -}}
6 |
7 | architecture: {{$architecture}}
8 |
9 | actions:
10 |
11 | - action: recipe
12 | recipe: ../../pinball.yaml
13 | variables:
14 | architecture: {{$architecture}}
15 | machine: {{$machine}}
16 | mirror: {{$mirror}}
17 | suite: {{$suite}}
18 | uboot_machine: {{$uboot_machine}}
19 |
--------------------------------------------------------------------------------
/extra/debos/machine/rpi_3_32b/pinball-rpi_3_32b.yaml:
--------------------------------------------------------------------------------
1 | {{- $architecture := or .architecture "armhf" -}}
2 | {{- $image := or .image "pinball-rpi_3_32b.img" -}}
3 | {{- $machine := or .machine "rpi_3_32b" -}}
4 | {{- $suite := or .suite "bullseye" -}}
5 | {{- $uboot_machine := or .uboot_machine "rpi_3_32b" -}}
6 |
7 | architecture: {{$architecture}}
8 |
9 | actions:
10 |
11 | - action: recipe
12 | recipe: ../../pinball.yaml
13 | variables:
14 | architecture: {{$architecture}}
15 | image: {{$image}}
16 | machine: {{$machine}}
17 | suite: {{$suite}}
18 | uboot_machine: {{$uboot_machine}}
19 |
--------------------------------------------------------------------------------
/.github/workflows/fediverse-action.yml:
--------------------------------------------------------------------------------
1 | # YAML
2 | ---
3 | name: fediverse-action
4 | on: [push]
5 | jobs:
6 | post:
7 | runs-on: ubuntu-latest
8 | steps:
9 | - uses: actions/checkout@v1
10 | - id: log
11 | run: echo "::set-output name=message::$(git log --no-merges -1 --oneline)"
12 | - if: "contains(steps.log.outputs.message, 'Release ')"
13 | uses: rzr/fediverse-action@master
14 | with:
15 | access-token: ${{ secrets.MASTODON_ACCESS_TOKEN }}
16 | message: "https://github.com/${{ github.repository }}/commit/${{ steps.log.outputs.message }} ~ #FediVerseAction"
17 |
--------------------------------------------------------------------------------
/extra/debos/machine/rpi_3_64b/actions.yaml:
--------------------------------------------------------------------------------
1 | {{- $architecture := or .architecture "arm64" -}}
2 | {{- $kernel := or .kernel "linux-image-generic" -}}
3 | {{- $machine := or .machine "rpi_3_64b" -}}
4 | {{- $suite := or .suite "bullseye" -}}
5 | {{- $uboot_machine := or .uboot_machine "rpi_3" -}}
6 |
7 | architecture: {{$architecture}}
8 |
9 | actions:
10 |
11 | - action: recipe
12 | recipe: ../rpi_2/actions.yaml
13 | variables:
14 | architecture: {{$architecture}}
15 | kernel: {{$kernel}}
16 | machine: {{$machine}}
17 | suite: {{$suite}}
18 | uboot_machine: {{$uboot_machine}}
19 |
--------------------------------------------------------------------------------
/debian/clean:
--------------------------------------------------------------------------------
1 | compile
2 | config.sub
3 | config.guess
4 | config.status
5 | config.log
6 | configure
7 | configure.tmp
8 | depcomp
9 | pinball.6
10 | manpage.links
11 | manpage.refs
12 | manpage.log
13 | aclocal.m4
14 | ltmain.sh
15 | stamp-h.in
16 | install-sh
17 | pinconfig.h.in~
18 | pinconfig.h.in
19 | libtool
20 | missing
21 | Makefile.in
22 | addon/Makefile.in
23 | base/Makefile.in
24 | data/Makefile.in
25 | data/tux/Makefile.in
26 | data/professor/Makefile.in
27 | src/Makefile.in
28 | test/Makefile.in
29 | debian/stamp-patched
30 | *.o
31 | missing
32 | mkinstalldirs
33 | install-sh
34 | autom4te.cache/*
35 | compile
36 | INSTALL
37 | depcomp
38 | README
39 |
--------------------------------------------------------------------------------
/extra/debos/machine/rpi_2/image.yaml:
--------------------------------------------------------------------------------
1 | {{- $architecture := or .architecture "armhf" -}}
2 |
3 | architecture: {{$architecture}}
4 |
5 | actions:
6 | - action: run
7 | description: Update weston default output
8 | chroot: true
9 | command: >
10 | sed -e 's|Virtual-1|HDMI-A-1|g' -i /etc/xdg/weston/weston.ini
11 |
12 | - action: run
13 | description: Check bootloader
14 | chroot: true
15 | command: >
16 | find /boot \
17 | /boot/firmware \
18 | /usr/lib/u-boot/ \
19 | && ls /boot/firmware/u-boot.bin
20 | && cat /boot/firmware/config.txt
21 | && cat /boot/extlinux/extlinux.conf
22 | && ls /boot/vmlinuz*
23 |
--------------------------------------------------------------------------------
/base/Behavior.cpp:
--------------------------------------------------------------------------------
1 | /***************************************************************************
2 | Behavior.cpp - description
3 | -------------------
4 | begin : Wed Jan 26 2000
5 | copyright : (C) 2000 by Henrik Enqvist GPL
6 | email : henqvist@excite.com
7 | ***************************************************************************/
8 |
9 | #include "Private.h"
10 | #include "Behavior.h"
11 | #include "Group.h"
12 |
13 | #include
14 |
15 | Behavior::Behavior() {
16 | //EM_COUT("Behavior::Behavior", 1);
17 | p_Light = NULL;
18 | p_Parent = NULL;
19 | m_iType = 0;
20 | }
21 |
22 |
--------------------------------------------------------------------------------
/addon/BigSphere.h:
--------------------------------------------------------------------------------
1 | /***************************************************************************
2 | BigSphere.h - description
3 | -------------------
4 | begin : Wed Jan 26 2000
5 | copyright : (C) 2000 by Henrik Enqvist
6 | email : henqvist@excite.com
7 | ***************************************************************************/
8 |
9 | #ifndef BIGSPHERE_H
10 | #define BIGSPHERE_H
11 |
12 | #include "Shape3D.h"
13 |
14 | /** */
15 | class BigSphere : public Shape3D {
16 | public:
17 | BigSphere(float fSize, int level, float fR, float fG, float fB, float fA);
18 | };
19 |
20 | #endif // SPHERE_H
21 |
--------------------------------------------------------------------------------
/extra/debos/machine/rpi_3_64b/pinball-rpi_3_64b.yaml:
--------------------------------------------------------------------------------
1 | {{- $architecture := or .architecture "arm64" -}}
2 | {{- $image := or .image "pinball-rpi_3_64b.img" -}}
3 | {{- $kernel := or .kernel "linux-image-generic" -}}
4 | {{- $machine := or .machine "rpi_3_64b" -}}
5 | {{- $suite := or .suite "bullseye" -}}
6 | {{- $uboot_machine := or .uboot_machine "rpi_3" -}}
7 |
8 | architecture: {{$architecture}}
9 |
10 | actions:
11 |
12 | - action: recipe
13 | recipe: ../../pinball.yaml
14 | variables:
15 | architecture: {{$architecture}}
16 | image: {{$image}}
17 | kernel: {{$kernel}}
18 | machine: {{$machine}}
19 | suite: {{$suite}}
20 | uboot_machine: {{$uboot_machine}}
21 |
--------------------------------------------------------------------------------
/AUTHORS:
--------------------------------------------------------------------------------
1 | Lead developer: Henrik Enqvist
2 | Porting, coding: Philippe Coval
3 | Coding: Pedro Ferreira
4 | Debian contributors:
5 | Didier Dhollande
6 | Innocent De Marchi
7 | 2002 Yann Dirson
8 | 2004 Helge Kreutzmann
9 | 2004 Matt Zimmerman
10 | 2004-2010 Jochen Friedrich
11 | 2006 Matthias Klose
12 | 2011 Regis Boudin
13 | 2014-2016 Markus Koschany
14 | 2016 Neil Roeth
15 | 2018 Innocent De Marchi
16 |
--------------------------------------------------------------------------------
/addon/Makefile.am:
--------------------------------------------------------------------------------
1 | AUTOMAKE_OPTIONS = gnu
2 |
3 | pinlibdir = $(libdir)/pinball
4 | pinincludedir = $(includedir)/pinball
5 |
6 | pinlib_LIBRARIES = libemilia_addon.a
7 |
8 | AM_CPPFLAGS = -I../base
9 |
10 | libemilia_addon_a_SOURCES = \
11 | BigSphere.cpp \
12 | ColorBehavior.cpp \
13 | Cone.cpp \
14 | Cube.cpp \
15 | Cylinder.cpp \
16 | Grid.cpp \
17 | KeyBehavior.cpp \
18 | KeyRotBehavior.cpp \
19 | Menu.cpp \
20 | Sphere.cpp \
21 | StdAnimation.cpp \
22 | TexAnimation.cpp
23 |
24 | pininclude_HEADERS = \
25 | BigSphere.h \
26 | ColorBehavior.h \
27 | Cone.h \
28 | Cube.h \
29 | Cylinder.h \
30 | Grid.h \
31 | KeyBehavior.h \
32 | KeyRotBehavior.h \
33 | Menu.h \
34 | Sphere.h \
35 | StdAnimation.h \
36 | TexAnimation.h
37 |
--------------------------------------------------------------------------------
/debian/pinball.postinst:
--------------------------------------------------------------------------------
1 | #! /bin/sh
2 |
3 | set -e
4 |
5 | if [ "$1" = "configure" ] ; then
6 |
7 | TABLES="professor tux"
8 |
9 | if [ ! -d /var/games ]; then
10 | mkdir /var/games
11 | fi
12 |
13 | if [ ! -d /var/games/pinball ]; then
14 | mkdir /var/games/pinball
15 | fi
16 |
17 | for DIRS in $TABLES; do
18 |
19 | if [ ! -d /var/games/pinball/$DIRS ]; then
20 | mkdir /var/games/pinball/$DIRS
21 | fi
22 |
23 | if [ -e /var/games/pinball/$DIRS/highscores ]; then
24 | continue
25 | fi
26 |
27 | touch /var/games/pinball/$DIRS/highscores
28 | chown root:games /var/games/pinball/$DIRS/highscores
29 | chmod 664 /var/games/pinball/$DIRS/highscores
30 | done
31 |
32 | fi
33 |
34 | #DEBHELPER#
35 |
--------------------------------------------------------------------------------
/addon/Sphere.h:
--------------------------------------------------------------------------------
1 | /***************************************************************************
2 | Sphere.h - description
3 | -------------------
4 | begin : Wed Jan 26 2000
5 | copyright : (C) 2000 by Henrik Enqvist
6 | email : henqvist@excite.com
7 | ***************************************************************************/
8 |
9 | #ifndef SPHERE_H
10 | #define SPHERE_H
11 |
12 | #include "Shape3D.h"
13 |
14 | /** The BigSphere class is a nicer than this sphere. @see BigSphere */
15 | class Sphere : public Shape3D {
16 | public:
17 | Sphere(float fSize, float fR, float fG, float fB, float fA);
18 | };
19 |
20 | #endif // SPHERE_H
21 |
--------------------------------------------------------------------------------
/ChangeLog:
--------------------------------------------------------------------------------
1 |
2 | 0.1.3
3 | - Fixed collision bug.
4 |
5 | forgott a lot of stuff
6 |
7 | 0.0.3
8 | - Polygon intersection speed up.
9 | - Command line parse error fix.
10 | - OpenGL polygon state switch speed up (speed up ~30).
11 | - Textured polygon instead of rasters for fonts, (speed up ~20%).
12 | - New font file type, 256x256 png-file.
13 | - Experimental, not compiled by default: Threaded rendering, (speed down/up -10% -> +10%).
14 | - Cache in SoundUtil.
15 | - Behaviors loads sounds instead of Score.
16 | - 'Screen goes black'-bug fixed.
17 | - New sounds.
18 | - Extra ball.
19 | - Fixed png check in configure.in.
20 |
21 | 0.0.2
22 | Multiball.
23 | Right ramp.
24 | Jackpot.
25 | Cache in TextureUtil.
26 |
27 | 0.0.1
28 | First alpha release
29 |
--------------------------------------------------------------------------------
/extra/profile/pinball/etc/pinball/weston.service:
--------------------------------------------------------------------------------
1 | # SPDX-License-Identifier: GPL-2.0+
2 |
3 | [Unit]
4 | Description=Weston Wayland compositor startup
5 | RequiresMountsFor=/run
6 |
7 | [Service]
8 | Type=simple
9 | User=root
10 | EnvironmentFile=-/etc/pinball/weston.env.sh
11 | Environment="XDG_RUNTIME_DIR=/run/user/0"
12 | Environment="DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/root/dbus/user_bus_socket"
13 | ExecStartPre=/usr/bin/sudo /bin/mkdir -p /run/user/0/dbus
14 | ExecStartPre=/usr/bin/sudo /bin/chown -R root:root /run/user/0/dbus
15 | ExecStartPre=/bin/chmod -R 0700 /run/user/0
16 | ExecStart=/usr/bin/openvt -v -w -s -- su root -l -c "/usr/bin/weston-launch -- 2>&1 | tee /var/log/weston.log"
17 |
18 | [Install]
19 | Alias=display-manager.service
20 | WantedBy=graphical.target
21 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing to pinball #
2 |
3 | Upstream project is located at:
4 |
5 | - https://sourceforge.net/p/pinball/
6 |
7 | But current maintainer would prefer to review patches using git,
8 | feel free to open pull requests at:
9 |
10 | - https://github.com/rzr/pinball
11 |
12 | Extra tables are also welcome but they should be maintained in separate projects,
13 | try to align structure to existing ones:
14 |
15 | - https://github.com/rzr/pinball-table-gnu
16 | - https://github.com/rzr/pinball-table-hurd
17 |
18 | ## Coding Styles ##
19 |
20 | Unless the code is linted, please try to align the current style
21 |
22 | ## License ##
23 |
24 | By contributing to OpenAirInterface, you agree that your contributions will be licensed under the LICENSE file in the root directory of this source tree.
25 |
--------------------------------------------------------------------------------
/addon/Cube.h:
--------------------------------------------------------------------------------
1 | /***************************************************************************
2 | Cube.h - description
3 | -------------------
4 | begin : Wed Jan 26 2000
5 | copyright : (C) 2000 by
6 | email :
7 | ***************************************************************************/
8 |
9 | #ifndef CUBE_H
10 | #define CUBE_H
11 |
12 | #include "Shape3D.h"
13 | /** A simple cube. @see Shape3D */
14 | class Cube : public Shape3D {
15 | public:
16 | /** Cube(size, r, g, b, a). You must enable transaparency to be able to
17 | * use the alpha color. */
18 | Cube(float size, float r, float g, float b, float a);
19 | /** Cube(size, textureAppliedToEverySide). */
20 | Cube(float, EmTexture*);
21 | };
22 |
23 | #endif // CUBE_H
24 |
--------------------------------------------------------------------------------
/addon/Cone.h:
--------------------------------------------------------------------------------
1 | /***************************************************************************
2 | Cone.h - description
3 | -------------------
4 | begin : Wed Jan 26 2000
5 | copyright : (C) 2000 by Henrik Enqvist
6 | email : henqvist@excite.com
7 | ***************************************************************************/
8 |
9 | #ifndef CONE_H
10 | #define CONE_H
11 |
12 | #include "EMath.h"
13 | #include "Shape3D.h"
14 |
15 | /** A simple cone. @see Shape3D */
16 | class Cone : public Shape3D {
17 | public:
18 | /** Cone(size, r, g, b, a). Color given by r, g, b and a. You must enable
19 | * transparency to use the alpha color. */
20 | Cone(float size, int sides, float r, float g, float b, float a);
21 | };
22 |
23 | #endif // CONE_H
24 |
--------------------------------------------------------------------------------
/addon/Cylinder.h:
--------------------------------------------------------------------------------
1 | /***************************************************************************
2 | Cylinder.h - description
3 | -------------------
4 | begin : Wed Jan 26 2000
5 | copyright : (C) 2000 by
6 | email :
7 | ***************************************************************************/
8 |
9 | #ifndef CYLINDER_H
10 | #define CYLINDER_H
11 |
12 | #include "EMath.h"
13 | #include "Shape3D.h"
14 | /** A simple cylinder. @see Shape3D */
15 | class Cylinder : public Shape3D {
16 | public:
17 | /** Cylinder(size, sides, r, g, b, a). You must enable transparency to be able
18 | * to use the alpha color. */
19 | Cylinder(float size, int sides, float r, float g, float b, float a, bool bTop = true);
20 | };
21 |
22 | #endif // SPHERE_H
23 |
--------------------------------------------------------------------------------
/base/SoundVisitor.h:
--------------------------------------------------------------------------------
1 | /***************************************************************************
2 | SoundVisitor.h - description
3 | -------------------
4 | begin : Wed Jan 26 2000
5 | copyright : (C) 2000 by Henrik Enqvist
6 | email : henqvist@excite.com
7 | ***************************************************************************/
8 |
9 | #ifndef SOUNDVISITOR_H
10 | #define SOUNDVISITOR_H
11 |
12 | #include "Visitor.h"
13 |
14 | class Group;
15 | /** @author Henrik Enqvist */
16 | class SoundVisitor : public Visitor {
17 | protected:
18 | SoundVisitor();
19 | public:
20 | ~SoundVisitor();
21 | static SoundVisitor * getInstance();
22 | void visit(Group*);
23 | private:
24 | static SoundVisitor * p_SoundVisitor;
25 | };
26 |
27 | #endif // SOUNDVISITOR_H
28 |
--------------------------------------------------------------------------------
/test/moduletest.cpp:
--------------------------------------------------------------------------------
1 | /***************************************************************************
2 | module.cpp - description
3 | -------------------
4 | begin : Sun Sep 22 2002
5 | copyright : (C) 2002 by Henrik Enqvist
6 | email : henqvist@excite.com
7 | ***************************************************************************/
8 |
9 | #include
10 | #include "Private.h"
11 | #include "Behavior.h"
12 |
13 |
14 | class MyBehavior : public Behavior {
15 | public:
16 | MyBehavior() : Behavior() {};
17 | ~MyBehavior() {};
18 | void onTick() {};
19 | void onCollision(const Vertex3D & vtxWall, const Vertex3D & vtxOwn, Group * g) {};
20 | void onSignal(int signal, Group * sender) {};
21 | };
22 |
23 | extern "C" void * new_object_fct(void) {
24 | return new MyBehavior();
25 | }
26 |
--------------------------------------------------------------------------------
/pinball.appdata.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | pinball.desktop
4 | CC0-1.0
5 | GPL-2.0+
6 | Emilia Pinball
7 | 3D Pinball Game
8 |
9 |
10 | The Emilia Pinball project is an open source pinball simulator
11 | by Henrik Enqvist.
12 |
13 |
14 | The current release features a number of tables:
15 | tux, professor
16 | and is very addictive.
17 |
18 |
19 | http://pinball.sourceforge.net/
20 |
21 | http://repo.openpandora.org/files/pnd/pinball_ptitseb/preview1.png
22 |
23 | jwrdegoede_at_fedoraproject.org
24 |
25 |
--------------------------------------------------------------------------------
/base/BehaviorVisitor.h:
--------------------------------------------------------------------------------
1 | /***************************************************************************
2 | BehaviorVisitor.h - description
3 | -------------------
4 | begin : Wed Jan 26 2000
5 | copyright : (C) 2000 by Henrik Enqvist
6 | email : henqvist@excite.com
7 | ***************************************************************************/
8 |
9 | #ifndef BEHAVIORVISITOR_H
10 | #define BEHAVIORVISITOR_H
11 |
12 | #include "Visitor.h"
13 |
14 | class Group;
15 | /** Only for internal use. @see Visitor */
16 | class BehaviorVisitor : public Visitor {
17 | protected:
18 | BehaviorVisitor();
19 | public:
20 | ~BehaviorVisitor();
21 | static BehaviorVisitor * getInstance();
22 | void visit(Group*);
23 | private:
24 | static BehaviorVisitor * p_BehaviorVisitor;
25 | };
26 |
27 | #endif // BEHAVIORVISITOR_H
28 |
--------------------------------------------------------------------------------
/docs/index.md:
--------------------------------------------------------------------------------
1 | # EMILIA PINBALL DOCS #
2 |
3 | The Emilia Pinball project is an open source pinball simulator
4 | intended for linux machines by Henrik Enqvist.
5 | It has been reported to work on other unix variants also.
6 | Now a days there is also a win***s version, and a mac version might be on its way.
7 |
8 | Porting it to other systems should be easy
9 | as long as OpenGL and SDL (or Allegro) are working.
10 |
11 | There is both an hardware accelerated version using SDL and OpenGL
12 | as well as an software version using Allegro available.
13 |
14 | The Allegro version is always a bit behind in development
15 | and has more bugs than the SDL/OpenGL version.
16 |
17 | ## REQUIREMENTS ##
18 |
19 | - Some sort of linux or unix box.
20 | - 300 Mhz cpu (450 Mhz for software rendering).
21 | - OpenGL compatible 3D card, OpenGL/Mesa and glut installed.
22 | - The SDL, SDL_image and SDL_mixer library
23 | - Same for
24 |
--------------------------------------------------------------------------------
/base/TransformVisitor.h:
--------------------------------------------------------------------------------
1 | /***************************************************************************
2 | TVisitor.h - description
3 | -------------------
4 | begin : Wed Jan 26 2000
5 | copyright : (C) 2000 by Henrik Enqvist
6 | email : henqvist@excite.com
7 | ***************************************************************************/
8 |
9 | #ifndef TRANSFORMVISITOR_H
10 | #define TRANSFORMVISITOR_H
11 |
12 | #include "Visitor.h"
13 | #include "EMath.h"
14 |
15 | /** Only for internal use. */
16 | class TransformVisitor : public Visitor {
17 | protected:
18 | TransformVisitor();
19 | public:
20 | ~TransformVisitor();
21 | static TransformVisitor * getInstance();
22 | void setCamera(Group*);
23 | void visit(Group*);
24 | void empty();
25 | private:
26 | Group* p_GroupCamera;
27 | static TransformVisitor * p_TransformVisitor;
28 | };
29 |
30 | #endif // TRANSFORMVISITOR_H
31 |
--------------------------------------------------------------------------------
/test/unittest.cpp:
--------------------------------------------------------------------------------
1 | /***************************************************************************
2 | Unit test runner
3 | ***************************************************************************/
4 |
5 | #include "Private.h"
6 | #include "TextureUtil.h"
7 |
8 | #include
9 |
10 | #if EM_UNIT_TEST
11 | #include
12 | #include "Private.h"
13 | #include "SrcTest.h"
14 | #include "BaseTest.h"
15 | #endif
16 |
17 | /** Main */
18 | int main(int argc, char *argv[]) {
19 | #if EM_UNIT_TEST
20 | CppUnit::TextUi::TestRunner runner;
21 | runner.addTest(EMathTest::suite());
22 | runner.addTest(LoaderTest::suite());
23 | runner.addTest(ScriptTest::suite());
24 | runner.addTest(StateBehaviorTest::suite());
25 | runner.addTest(ShapeTest::suite());
26 | runner.run();
27 | #else
28 | cerr << "Unittest support not found, install cppunit and reconfigure!" << endl;
29 | #endif
30 | return 0;
31 | }
32 |
33 | #if EM_USE_ALLEGRO
34 | END_OF_MAIN();
35 | #endif
36 |
--------------------------------------------------------------------------------
/addon/KeyBehavior.h:
--------------------------------------------------------------------------------
1 | /***************************************************************************
2 | KeyBehavior.h - description
3 | -------------------
4 | begin : Wed Jan 26 2000
5 | copyright : (C) 2000 by Henrik Enqvist
6 | email : henqvist@excite.com
7 | ***************************************************************************/
8 |
9 | #ifndef KEYBEHAVIOR_H
10 | #define KEYBEHAVIOR_H
11 |
12 | #include "Behavior.h"
13 |
14 | /** A Behavior that lets the users move the group with A, S, D, Q, W, E keys.
15 | * Simply add a KeyBehavior object to a group to be able to move it. */
16 | class KeyBehavior : public Behavior {
17 | public:
18 | KeyBehavior();
19 | ~KeyBehavior();
20 | void onTick();
21 | virtual void onCollision(const Vertex3D &, const Vertex3D &, Group *) {};
22 | virtual void onSignal(int, Group *) {};
23 | private:
24 | float m_x, m_y, m_z;
25 | };
26 |
27 | #endif // KEYBEHAVIOR_H
28 |
--------------------------------------------------------------------------------
/base/RenderVisitor.cpp:
--------------------------------------------------------------------------------
1 | // -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*-
2 | // SPDX-License-Identifier: GPL-2.0+
3 |
4 | #include
5 | #include
6 | #include
7 |
8 | #include "Private.h"
9 | #include "RenderVisitor.h"
10 | #include "OpenGLVisitor.h"
11 | #include "AllegroVisitor.h"
12 |
13 |
14 | using namespace std;
15 |
16 |
17 | RenderVisitor* RenderVisitor::getInstance()
18 | {
19 | static RenderVisitor* pInstance = NULL;
20 |
21 | if (!pInstance) {
22 | char* text = getenv("PINBALL_RENDER_DRIVER");
23 | if (text) {
24 | cerr << "PINBALL_RENDER_DRIVER=\""<< text<<"\""<p_Sound != NULL) {
32 | g->p_Sound->adjust();
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/base/OpenGLVisitor.h:
--------------------------------------------------------------------------------
1 | /***************************************************************************
2 | OpenGLVisitor.h - description
3 | -------------------
4 | begin : Sat Jan 6 2001
5 | copyright : (C) 2001 by Henrik Enqvist
6 | email : henqvist@excite.com
7 | ***************************************************************************/
8 |
9 |
10 | #ifndef OPENGLVISITOR_H
11 | #define OPENGLVISITOR_H
12 |
13 | #include "RenderVisitor.h"
14 |
15 | #define EM_GL_GCOL_TEX 0
16 | #define EM_GL_GCOL_TEX_TRANS 2
17 | #define EM_GL_CLEAN 4
18 |
19 |
20 | class OpenGLVisitor
21 | : public RenderVisitor
22 | {
23 | public:
24 | static OpenGLVisitor* getInstance();
25 | public:
26 | virtual void visit(Group* g);
27 | virtual void empty();
28 | protected:
29 | OpenGLVisitor();
30 | virtual ~OpenGLVisitor();
31 | protected:
32 | static OpenGLVisitor* p_OpenGLVisitor;
33 | };
34 |
35 | #endif // OPENGLVISITOR_H
36 |
37 |
--------------------------------------------------------------------------------
/test/joy.cpp:
--------------------------------------------------------------------------------
1 | /***************************************************************************
2 | Joystick test
3 | ***************************************************************************/
4 |
5 | #include
6 |
7 | #include "Private.h"
8 | #include "Engine.h"
9 | #include "Keyboard.h"
10 |
11 | /** Main */
12 | int main(int argc, char *argv[]) {
13 | #if EM_USE_SDL
14 | cerr << "Joystick test" << endl;
15 | Engine* engine = new Engine(argc, argv);
16 |
17 | int njoystick = SDL_NumJoysticks();
18 | cerr << njoystick << " joysticks were found." << endl;
19 |
20 | if (njoystick != 0) {
21 | cerr << "The names of the joysticks are:" << endl;
22 | for(int a=0; atick();
29 | engine->render();
30 | engine->swap();
31 | }
32 |
33 | delete(engine);
34 | #else
35 | #warning "this is sdl specific test"
36 | #endif
37 | return 0;
38 | }
39 |
40 | #if EM_USE_ALLEGRO
41 | END_OF_MAIN();
42 | #endif
43 |
--------------------------------------------------------------------------------
/addon/TexAnimation.h:
--------------------------------------------------------------------------------
1 | /***************************************************************************
2 | Animation.h - description
3 | -------------------
4 | begin : Wed Jan 26 2000
5 | copyright : (C) 2000 by
6 | email :
7 | ***************************************************************************/
8 |
9 | #ifndef TEXANIMATION_H
10 | #define TEXANIMATION_H
11 |
12 | #include "EMath.h"
13 | #include "Behavior.h"
14 | #include "StateMachine.h"
15 |
16 | class Group;
17 |
18 | /** @see Group */
19 | class TexAnimation : public Behavior {
20 | public:
21 | /** Animation(stepsize, nvertex, type). */
22 | TexAnimation(int step, int nvtx);
23 | ~TexAnimation();
24 | void onTick();
25 | void add(float, float);
26 | void onCollision(const Vertex3D &, const Vertex3D &, Group *) {};
27 | void onSignal(int, Group *) {};
28 | private:
29 | vector m_vTexCoord;
30 | int m_iStep;
31 | int m_iTick;
32 | int m_iTexCoord;
33 | };
34 |
35 | #endif // TEXANIMATION_H
36 |
--------------------------------------------------------------------------------
/base/Camera.h:
--------------------------------------------------------------------------------
1 | /***************************************************************************
2 | camera.h - description
3 | -------------------
4 | begin : Fri Jan 28 2000
5 | copyright : (C) 2000 by Henrik Enqvist
6 | email : henqvist@excite.com
7 | ***************************************************************************/
8 |
9 | #ifndef CAMERA_H
10 | #define CAMERA_H
11 |
12 | /** Every engine needs a camera. The camera is the viewer of the world.
13 | * The camera is added to the engine with the "setEngineCamera" function.
14 | * If you want to move the camera around you should add it to a group.
15 | * Example:
16 | * Group* groupC = new Group(1);
17 | * Camera* camera = new Camera();
18 | *
19 | * engine->add(groupC);
20 | * groupC->add(camera);
21 | *
22 | * engine->setEngineCamera(groupC);
23 | *
24 | * @see Engine */
25 | class Camera {
26 | public:
27 | Camera();
28 | ~Camera();
29 | };
30 |
31 | #endif // CAMERA_H
32 |
--------------------------------------------------------------------------------
/addon/ColorBehavior.h:
--------------------------------------------------------------------------------
1 | /***************************************************************************
2 | ColorBehavior.h - description
3 | -------------------
4 | begin : Tue Feb 15 2000
5 | copyright : (C) 2000 by Henrik Enqvist
6 | email : henqvist@excite.com
7 | ***************************************************************************/
8 |
9 | #ifndef COLORBEHAVIOR_H
10 | #define COLORBEHAVIOR_H
11 |
12 | #include "Behavior.h"
13 | #include "EMath.h"
14 | #include "StateMachine.h"
15 |
16 | /** A simple behavior that changes the color of all polygons in the Shape3D
17 | * to blue and then when collision occurs all polygons are changed to red.
18 | * The collision example uses this to demonstrate when collision is
19 | * detected between two Shape3Ds. */
20 | class ColorBehavior : public Behavior {
21 | public:
22 | ColorBehavior();
23 | ~ColorBehavior();
24 | void onCollision(const Vertex3D & vtxWall, const Vertex3D & vtxOwn, Group * g);
25 | void onTick();
26 | void StdOnSignal();
27 | };
28 |
29 | #endif // COLORBEHAVIOR_H
30 |
--------------------------------------------------------------------------------
/base/PointLightVisitor.h:
--------------------------------------------------------------------------------
1 | /***************************************************************************
2 | PointLightVisit.h - description
3 | -------------------
4 | begin : Sun Jan 30 2000
5 | copyright : (C) 2000 by Henrik Enqvist
6 | email : henqvist@excite.com
7 | ***************************************************************************/
8 |
9 | #ifndef POINTLIGHTVISITOR_H
10 | #define POINTLIGHTVISITOR_H
11 |
12 | #include
13 |
14 | #include "Visitor.h"
15 | #include "EMath.h"
16 |
17 | class Light;
18 | class Group;
19 | class Shape3D;
20 |
21 | /** Only for internal use. */
22 | class PointLightVisitor : public Visitor {
23 | protected:
24 | PointLightVisitor(int size = 4);
25 | public:
26 | ~PointLightVisitor();
27 | static PointLightVisitor * getInstance();
28 | void add(Light* l);
29 | void visit(Group* g);
30 | void clear();
31 | private:
32 | vector m_vLight;
33 | void visit(Shape3D* s, Group* g);
34 | static PointLightVisitor * p_PointLightVisitor;
35 | };
36 |
37 | #endif // POINTLIGHTVISITOR_H
38 |
--------------------------------------------------------------------------------
/data/professor/Makefile.am:
--------------------------------------------------------------------------------
1 | AUTOMAKE_OPTIONS = gnu
2 |
3 | highscoredir = $(DESTDIR)/$(EM_BUILD_ROOT)/$(EM_HIGHSCORE_DIR)/professor
4 |
5 | professorlibdir = $(EM_LIBDIR)
6 | professordatadir = $(datadir)/pinball/professor
7 |
8 | professorlib_LTLIBRARIES = libModuleProfessor.la
9 |
10 | AM_CPPFLAGS = -I../../base -I.../../addon -I../../src
11 |
12 | libModuleProfessor_la_LDFLAGS = -module
13 | libModuleProfessor_la_SOURCES = ModuleProfessor.cpp
14 |
15 | professordata_DATA = \
16 | bump.wav \
17 | bumphard.wav \
18 | bumpsoft.wav \
19 | flip.wav \
20 | floor.png \
21 | floor.png.pcx \
22 | gameover.wav \
23 | introp.ogg \
24 | nudge.wav \
25 | pinball.pbl \
26 | professor.ogg \
27 | professor.png
28 |
29 | # This will create a new empty highscores file
30 | # NOTE! The user games must exist!
31 | install-data-hook:
32 | -mkdir -p $(highscoredir) # - if not root #!rzr
33 | -touch $(highscoredir)/highscores
34 | -if test `whoami` = root; then chown games $(highscoredir)/highscores; fi
35 | -if test `whoami` = root; then chgrp games $(highscoredir)/highscores; fi
36 | -chmod 666 $(highscoredir)/highscores
37 |
38 | EXTRA_DIST = $(professordata_DATA)
39 |
--------------------------------------------------------------------------------
/base/Light.cpp:
--------------------------------------------------------------------------------
1 | /***************************************************************************
2 | Light.cpp - description
3 | -------------------
4 | begin : Sun Jan 30 2000
5 | copyright : (C) 2000 by
6 | email :
7 | ***************************************************************************/
8 |
9 | #include
10 |
11 | #include "Private.h"
12 | #include "Light.h"
13 |
14 | Light::Light(float c, float l, float q, float r, float g, float b) {
15 | m_bOn = true;
16 | p_Parent = NULL;
17 | m_fConstant = EM_MAX(c, 0.0);
18 | m_fLinear = EM_MAX(l, 0.0);
19 | m_fQuadratic = EM_MAX(q, 0.0);
20 | m_fBounds = 1.0;
21 | m_iProperties = EM_USE_DIFFUSE + EM_USE_SPECULAR;
22 | m_fR = EM_MAX(EM_MIN(1.0, r), 0.0);
23 | m_fG = EM_MAX(EM_MIN(1.0, g), 0.0);
24 | m_fB = EM_MAX(EM_MIN(1.0, b), 0.0);
25 | m_vtxSrc.x = 0;
26 | m_vtxSrc.y = 0;
27 | m_vtxSrc.z = 0;
28 | }
29 |
30 | Light::~Light() {
31 | }
32 |
33 | void Light::setProperty(int p) {
34 | m_iProperties |= p;
35 | }
36 |
37 | void Light::unsetProperty(int p) {
38 | m_iProperties -= (m_iProperties & p);
39 | }
40 |
--------------------------------------------------------------------------------
/src/BallGroup.h:
--------------------------------------------------------------------------------
1 | /***************************************************************************
2 | BallGroup.h - description
3 | -------------------
4 | begin : Sat Mar 8 2003
5 | copyright : (C) 2000 by Henrik Enqvist
6 | email : henqvist@excite.com
7 | ***************************************************************************/
8 |
9 | #ifndef BALLGROUP_H
10 | #define BALLGROUP_H
11 |
12 | #include "Group.h"
13 | #include "EMath.h"
14 |
15 | class Engine;
16 | class Group;
17 | class Shape3D;
18 |
19 | /** */
20 | class BallGroup : public Group {
21 | public:
22 | BallGroup(float r, float g, float b, int pbl);
23 | ~BallGroup();
24 | /** -1 always, 0 off, >1 timer */
25 | inline void setFireTimer(int timer) {
26 | m_iFireTimer = timer;
27 | };
28 | void updateFire();
29 | void resetFire();
30 | void tick();
31 | inline int getBall() { return m_iBall; };
32 | private:
33 | int m_iBall;
34 | int m_iFireTimer;
35 | Vertex3D vtxPrev;
36 | Group * aFire[8];
37 | Shape3D * aFireShape[8];
38 | Vertex3D aFireVtx[16];
39 | };
40 |
41 | #endif // BALLGROUP_H
42 |
--------------------------------------------------------------------------------
/extra/profile/pincab/etc/pinball/weston.ini:
--------------------------------------------------------------------------------
1 | # file:///etc/xdg/weston/weston.ini
2 | # SPDX-FileCopyrightText: 2021 Philippe Coval
3 | # SPDX-License-Identifier: GPL-2.0+"
4 |
5 | [core]
6 | idle-time=0
7 | require-input=false
8 | xwayland=false
9 |
10 | [shell]
11 | panel-position=none
12 | locking=false
13 | background-color=0xff002244
14 | background-image=/usr/share/games/pinball/splash.png
15 |
16 | [libinput]
17 | enable_tap=false
18 |
19 | [input-method]
20 | path=
21 |
22 | [output]
23 | name=DP-1
24 | # mode=off
25 | mode=1024x768
26 | transform=rotate-90
27 |
28 | [output]
29 | name=DP-2
30 | mode=off
31 | # mode=1024x768
32 | transform=rotate-90
33 |
34 | [output]
35 | name=DVI-I-1
36 | mode=off
37 | # mode=1024x768
38 | transform=rotate-90
39 |
40 | # configure: playfield screen on PI
41 | [output]
42 | name=HDMI-A-1
43 | # mode=off
44 | mode=1024x768
45 | transform=rotate-90
46 |
47 | [output]
48 | name=LVDS-1
49 | mode=off
50 | # mode=1024x768
51 | transform=rotate-90
52 |
53 | [output]
54 | name=Virtual-1
55 | # mode=off
56 | mode=1024x768
57 | transform=rotate-90
58 |
59 | [output]
60 | name=VGA-1
61 | mode=off
62 | # mode=1024x768
63 | transform=rotate-90
64 |
--------------------------------------------------------------------------------
/src/BumperBehavior.h:
--------------------------------------------------------------------------------
1 | /***************************************************************************
2 | BumperBehavior.h - description
3 | -------------------
4 | begin : Thu Mar 9 2000
5 | copyright : (C) 2000 by
6 | email :
7 | ***************************************************************************/
8 |
9 | #ifndef BUMPERBEHAVIOR_E
10 | #define BUMPERBEHAVIOR_E
11 |
12 | #include "Behavior.h"
13 | #include "EMath.h"
14 | #include "Light.h"
15 | #include "StateMachine.h"
16 |
17 | /** A behavior for the pinball game. */
18 | class BumperBehavior : public Behavior {
19 | public:
20 | BumperBehavior();
21 | ~BumperBehavior();
22 | void onTick();
23 | void StdOnSignal();
24 | void StdOnCollision();
25 | inline void setPower(float p) { m_fPower = p; };
26 | inline float getPower() { return m_fPower; };
27 | inline void setSound(int s) { m_iSound = s; };
28 | inline int getSound() { return m_iSound; };
29 | private:
30 | int m_sigBump;
31 | int m_iLightCounter;
32 | int m_iSound;
33 | float m_fPower;
34 | bool m_bTilt;
35 | };
36 |
37 | #endif // BounceBehavior
38 |
--------------------------------------------------------------------------------
/addon/KeyRotBehavior.cpp:
--------------------------------------------------------------------------------
1 | /***************************************************************************
2 | KeyRorBehavior.cpp - description
3 | -------------------
4 | begin : Wed Jan 26 2000
5 | copyright : (C) 2000 by Henrik Enqvist
6 | email : henqvist@excite.com
7 | ***************************************************************************/
8 |
9 | #include "Private.h"
10 | #include "KeyRotBehavior.h"
11 | #include "Group.h"
12 | #include "Keyboard.h"
13 |
14 | KeyRotBehavior::KeyRotBehavior() : Behavior() {
15 | }
16 |
17 | KeyRotBehavior::~KeyRotBehavior() {
18 | }
19 |
20 | void KeyRotBehavior::onTick() {
21 | EmAssert(this->getParent() != NULL, "KeyRotBehavior::onTick parent NULL");
22 | float x = 0, y = 0, z = 0;
23 | if (Keyboard::isKeyDown(SDLK_RIGHT)) y = 0.01f;
24 | if (Keyboard::isKeyDown(SDLK_LEFT)) y = -0.01f;
25 | if (Keyboard::isKeyDown(SDLK_UP)) x = 0.01f;
26 | if (Keyboard::isKeyDown(SDLK_DOWN)) x = -0.01f;
27 | if (Keyboard::isKeyDown(SDLK_PAGEUP)) z = 0.01f;
28 | if (Keyboard::isKeyDown(SDLK_PAGEDOWN)) z = -0.01f;
29 | this->getParent()->addRotation(x, y, z);
30 | }
31 |
--------------------------------------------------------------------------------
/extra/profile/pinball/etc/pinball/pinball.env.sh:
--------------------------------------------------------------------------------
1 | #! /bin/sh
2 | # SPDX-License-Identifier: GPL-2.0+
3 |
4 | PINBALL_PROFILE="pinball"
5 |
6 | # Output screen
7 | # PINBALL_SCREEN="DP-1"
8 |
9 | # TODO: Use preferred resolution (align to /etc/default/pinball)
10 | # PINBALL_RESOLUTION="1024x768"
11 |
12 | # TODO
13 | PINBALL_EXTRA_DIR="/usr/local/opt/pinball"
14 |
15 | PINBALL_IMAGE="/usr/local/opt/pinball/src/pinball/tmp/1024x1024/pinball.jpg"
16 |
17 | # Random table if defined
18 | PINBALL_TABLE=
19 |
20 | # Quit after displayed frames (for developers)
21 | # PINBALL_QUIT=4294967295
22 | # export PINBALL_QUIT
23 |
24 | # Readonly FS
25 | HOME="/tmp/pinball"
26 |
27 | # Graphical system : weston or xinit
28 | PINBALL_DISPLAY_MANAGER='weston'
29 | XDG_RUNTIME_DIR='/run/user/0'
30 | #PINBALL_DISPLAY_MANAGER="xinit"
31 | #DISPLAY=':0'
32 | #XINITRC="/etc/pinball/pinball-session.sh"
33 | #PINBALL_XRANDR_ARGS="--rotate left --mode ${PINBALL_RESOLUTION}"
34 |
35 | DBUS_SESSION_BUS_ADDRESS='unix:path=/run/user/0/dbus/user_bus_socket'
36 | # ALSA_CARD=""
37 |
38 | # Extra
39 | # SDL_VIDEODRIVER=dummy
40 | # SDL_NOMOUSE=
41 | # SDL_AUDIODRIVER=dummy
42 | # SDL_DEBUG=
43 |
44 | # XINIT_ARGS= -- -nocursor
45 |
--------------------------------------------------------------------------------
/BUILD.md:
--------------------------------------------------------------------------------
1 | ## Installing and building
2 |
3 | It is best to remove any previous version of pinball before installing a new
4 | version. If you have used a rpm-package write as root user 'rpm -e pinball'.
5 | If you have installed from source code goto the pinball source directory and
6 | write as root user 'make uninstall'.
7 |
8 | _NOTE:_ A user and group named 'games' must exist before installation, this
9 | user and group exist by defualt on most systems else:
10 | useradd 'games' (as root user)
11 |
12 | After checking that you have the necessary libraries (SDL, SDL_IMAGE and
13 | SDL_MIXER) installed you are ready to install. If you have an rpm-package
14 | you write as root user 'rpm -i pinball-x.x.x.rpm'.
15 |
16 | If you compile from a source package check that you also have the have the
17 | development libraries installed. They usually have a name like
18 | sdl-devel.x.x.x.rpm. Then install with the usual:
19 |
20 | Did you remember to install the development packages of SDL? Did you remember
21 | to install also SDL_Image and SDL_Mixer?
22 |
23 | configure
24 | make
25 | make install (as root user)
26 | make clean (if you want to save some disc space)
27 |
28 | The game is started with 'pinball'.
29 |
--------------------------------------------------------------------------------
/src/FakeModuleBehavior.h:
--------------------------------------------------------------------------------
1 | /***************************************************************************
2 | FakeModuleBehavior.h - description
3 | -------------------
4 | begin : Wed Jan 26 2000
5 | copyright : (C) 2000 by Henrik Enqvist
6 | email : henqvist@excite.com
7 | ***************************************************************************/
8 |
9 | #ifndef FAKEMODULEBEHAVIOR_H
10 | #define FAKEMODULEBEHAVIOR_H
11 |
12 | #include
13 | #include "Behavior.h"
14 | #include "Pinball.h"
15 |
16 | class FakeModuleBehavior : public Behavior {
17 | public:
18 | FakeModuleBehavior(const char * name) {
19 | strncpy(m_Name, name, 255);
20 | this->setType(PBL_TYPE_FAKEMODULEBEH);
21 | };
22 | ~FakeModuleBehavior() {};
23 | const char * getName() {
24 | return m_Name;
25 | }
26 | void setName(const char * name) {
27 | strncpy(m_Name, name, 255);
28 | }
29 | void onTick() {};
30 | void onCollision(const Vertex3D &, const Vertex3D &, Group *) {};
31 | void onSignal(int, Group *) {};
32 | private:
33 | char m_Name[256];
34 | };
35 |
36 | #endif // KEYBEHAVIOR_H
37 |
--------------------------------------------------------------------------------
/docs/Makefile:
--------------------------------------------------------------------------------
1 | #!/usr/bin/make -f
2 | # -*- makefile -*-
3 | # ex: set tabstop=4 noexpandtab:
4 | # -*- coding: utf-8 -*
5 | #
6 | # SPDX-License-Identifier: GPL-2.0-or-later
7 | # Copyright: Philippe Coval - 2021+
8 | #
9 |
10 | default: help
11 |
12 | sudo?=sudo
13 | srcs?=$(wildcard *.md | sort)
14 | home?=Home.md
15 | branch?=$(shell git rev-parse --abbrev-ref HEAD)
16 | url?=http://localhost:4567
17 |
18 | help:
19 | @echo "Usage:"
20 | @echo "make setup start"
21 |
22 | setup/debian: /etc/debian_version
23 | ${sudo} apt-get -y update
24 | ${sudo} apt-get -y install libicu-dev cmake ruby-dev
25 | ${sudo} gem install github-linguist
26 | ${sudo} gem install gollum
27 | ${sudo} gem install org-ruby # optional
28 |
29 | setup: setup/debian
30 | -@sync
31 |
32 | run: ${home}
33 | cd ../docs/.. \
34 | && gollum --ref ${branch} --page-file-dir docs
35 |
36 | ${home}: ${srcs}
37 | echo $^ | tr ' ' '\n' | while read file; do echo "- [$$file]($$file)" ; done > $@
38 | -git add "$@"
39 | -git commit -sm 'docs: Regenerated default file' "$@"
40 |
41 | home: ${home}
42 | cat $<
43 |
44 | regen:
45 | rm -f ${home}
46 | make home
47 | start:
48 | x-www-browser "${url}"
49 | ${MAKE} run
50 | echo "info: Reload ${url}"
51 |
--------------------------------------------------------------------------------
/extra/debos/machine/generic/actions.yaml:
--------------------------------------------------------------------------------
1 | {{- $architecture := or .architecture "i386" -}}
2 | {{- $machine := or .machine "generic" -}}
3 | {{- $project := or .project "pinball" -}}
4 | {{- $suite := or .suite "bullseye" -}}
5 | {{- $image := or .image (printf "%s-%s-%s.img" $project $architecture $machine) -}}
6 |
7 | architecture: {{$architecture}}
8 |
9 | actions:
10 |
11 | - action: image-partition
12 | imagename: {{$image}}
13 | imagesize: 2GB
14 | partitiontype: msdos
15 | mountpoints:
16 | - mountpoint: /
17 | partition: root
18 | partitions:
19 | - name: root
20 | fs: ext4
21 | start: 512
22 | end: 100%
23 | flags: [boot]
24 |
25 | - action: apt
26 | packages:
27 | {{if eq $architecture "i386" "amd64"}}
28 | - grub-pc
29 | {{end}}
30 | {{if eq $suite "unstable" "sid" "testing" "bullseye"}}
31 | - linux-image-generic
32 | {{else}}
33 | {{if eq $suite "buster" "stable"}}
34 | {{if eq $architecture "i386"}}
35 | - linux-image-686
36 | {{else}}
37 | - linux-image-{{$architecture}}
38 | {{end}}
39 | {{end}}
40 | {{end}}
41 | - firmware-linux-free
42 | - firmware-linux-nonfree
43 |
44 |
--------------------------------------------------------------------------------
/extra/fink/pinball.info:
--------------------------------------------------------------------------------
1 | Package: pinball
2 | Version: 0.3.1
3 | Revision: 1002
4 | Depends: libjpeg-shlibs (>= 6b-17), libogg-shlibs (>= 1.1.4-1), libpng3-shlibs (>= 1:1.2.35-2), libtiff-shlibs (>= 3.8.2-1002), libvorbis0-shlibs (>= 1.2.3-1), sdl-image-shlibs (>= 1.2.6-1002), sdl-mixer-shlibs (>= 1.2.8-13), sdl-shlibs (>= 1.2.13-svn4819-1), smpeg-shlibs (>= 0.4.4-1027)
5 | BuildDepends: libjpeg (>= 6b-17), libogg (>= 1.1.4-1), libpng3 (>= 1:1.2.35-2), libtiff (>= 3.8.2-1002), libvorbis0 (>= 1.2.3-1), sdl-image (>= 1.2.6-1002), sdl-mixer (>= 1.2.8-13), sdl (>= 1.2.13-svn4819-1), smpeg (>= 0.4.4-1027), x11-dev
6 | Source: http://archive.ubuntu.com/ubuntu/pool/universe/p/%n/%n_%v.orig.tar.gz
7 | Source-MD5: f28e8f49e0db8e9491e4d9f0c13c36c6
8 | SourceDirectory: %n-%v
9 | SetCPPFLAGS: -I/usr/X11R6/include
10 | SetLDFLAGS: -framework OpenGL
11 | PatchScript: perl -pi -e 's,\#include "config-rzr.h",,' base/Private.h
12 | ConfigureParams: --mandir=%p/share/man --disable-dependency-tracking --disable-sdltest
13 | InstallScript: make install DESTDIR=%d
14 | DocFiles: AUTHORS COPYING ChangeLog NEWS README
15 | License: GPL
16 | GCC: 4.0
17 | Homepage: http://pinball.sourceforge.net
18 | Maintainer: Jack Fink
19 | Description: Pinball simulator
20 |
21 |
--------------------------------------------------------------------------------
/extra/profile/pincab/etc/pinball/pinball.env.sh:
--------------------------------------------------------------------------------
1 | #! /bin/sh
2 | # SPDX-License-Identifier: GPL-2.0+
3 |
4 | PINBALL_PROFILE="pincab"
5 |
6 | # TODO: pin version
7 | PINBALL_BRANCH="next"
8 |
9 | # Output screen
10 | # PINBALL_SCREEN="DVI-I-1"
11 |
12 | # TODO: Use preferred resolution (align to /etc/default/pinball)
13 | PINBALL_RESOLUTION="1024x768"
14 |
15 | # TODO
16 | PINBALL_EXTRA_DIR="/usr/local/opt/pinball"
17 |
18 | PINBALL_IMAGE="/usr/local/opt/pinball/src/pinball/tmp/1024x1024/pinball.jpg"
19 |
20 | # Random table if defined
21 | PINBALL_TABLE=
22 |
23 | # Quit after displayed frames (for developers)
24 | # PINBALL_QUIT=4294967295
25 | # export PINBALL_QUIT
26 |
27 | # Readonly FS
28 | HOME="/tmp/${PINBALL_PROFILE}"
29 |
30 | # Graphical system : weston or xinit
31 | PINBALL_DISPLAY_MANAGER='weston'
32 | XDG_RUNTIME_DIR='/run/user/0'
33 | #PINBALL_DISPLAY_MANAGER="xinit"
34 | #DISPLAY=':0'
35 | #XINITRC="/etc/pinball/pinball-session.sh"
36 | #PINBALL_XRANDR_ARGS="--rotate left --mode ${PINBALL_RESOLUTION}"
37 |
38 | DBUS_SESSION_BUS_ADDRESS='unix:path=/run/user/0/dbus/user_bus_socket'
39 | # ALSA_CARD=""
40 |
41 | # Extra
42 | # SDL_VIDEODRIVER=dummy
43 | # SDL_NOMOUSE=
44 | # SDL_AUDIODRIVER=dummy
45 | # SDL_DEBUG=
46 |
47 | # XINIT_ARGS= -- -nocursor
48 |
--------------------------------------------------------------------------------
/debian/pinball-config.6:
--------------------------------------------------------------------------------
1 | .TH "PINBALL-CONFIG" "6"
2 | .SH "NAME"
3 | pinball-config \- returns information about installed pinball libraries and
4 | binaries
5 | .SH SYNOPSIS
6 | .B pinball-config
7 | [OPTIONS]
8 | .SH DESCRIPTION
9 | The
10 | .B pinball-config
11 | shell script is designed to retrieve the configuration information about
12 | the libraries and binaries of the
13 | .B pinball
14 | package.
15 | .SH "OPTIONS"
16 | .TP
17 | \fB\-\-version\fR
18 | displays the pinball version number
19 | .TP
20 | \fB\-\-libs\fR
21 | lists libraries needed for building new levels
22 | .TP
23 | \fB\-\-cflags\fR
24 | lists additional compilation flags needed
25 | .TP
26 | \fB\-\-datadir\fR
27 | Display the installation datadir
28 | .TP
29 | \fB\-\-libdir\fR
30 | Display the installation libdir
31 | .TP
32 | \fB\-\-prefix\fR
33 | Display the installation prefix
34 | .TP
35 | \fB\-\-exec\-prefix\fR
36 | Display the installation exec-prefix
37 | .SH "SEE ALSO"
38 | .PP
39 | The program is documented fully by the
40 | .B README
41 | file that can be found under
42 | .B /usr/share/doc/pinball/README
43 | on
44 | .B Debian GNU/Linux.
45 | .SH "AUTHOR"
46 | .PP
47 | This manual page was written by Jochen Friedrich for
48 | the
49 | .B Debian GNU/Linux
50 | system (but may be used by others).
51 |
--------------------------------------------------------------------------------
/base/OctTree.h:
--------------------------------------------------------------------------------
1 | /***************************************************************************
2 | OctTree.h - description
3 | -------------------
4 | begin : Sun Mar 19 2000
5 | copyright : (C) 2000 by Henrik Enqvist
6 | email : henqvist@excite.com
7 | ***************************************************************************/
8 |
9 | #ifndef OCTTREE_H
10 | #define OCTTREE_H
11 |
12 | using namespace std;
13 |
14 | #include
15 |
16 | #include "EMath.h"
17 | #include "Node.h"
18 |
19 | class Group;
20 | class CollisionBounds;
21 |
22 | /** An global octtree used for speeding up collision detection and
23 | * hidden surface test. */
24 | class OctTree {
25 | public:
26 | OctTree(int level, float size, float x=0.0f, float y=0.0f, float z=0.0f);
27 | ~OctTree();
28 |
29 | private:
30 | friend class CollisionVisitor;
31 |
32 | void split(int depth);
33 | bool surround(CollisionBounds * cb);
34 | bool collide(CollisionBounds * cb);
35 | bool insertGroup(Group * g);
36 | void clear();
37 | void printTree(int depth=0);
38 |
39 | float m_fSize;
40 | Vertex3D m_vtx;
41 | vector m_vOctTree;
42 | vector m_vGroup;
43 | };
44 |
45 | #endif // OCTTREE_H
46 |
--------------------------------------------------------------------------------
/src/ArmBehavior.h:
--------------------------------------------------------------------------------
1 | /***************************************************************************
2 | ArmBehavior.h - description
3 | -------------------
4 | begin : Wed Jan 26 2000
5 | copyright : (C) 2000 by
6 | email :
7 | ***************************************************************************/
8 |
9 | #ifndef ARMBEHAVIOR_H
10 | #define ARMBEHAVIOR_H
11 |
12 | #include
13 |
14 | #include "Behavior.h"
15 | #include "StateMachine.h"
16 | #include "EMath.h"
17 | #include "Keyboard.h"
18 |
19 | /** A Behavior for the pinball demo. */
20 | class ArmBehavior : public Behavior {
21 | public:
22 | ArmBehavior(bool right = true);
23 | ~ArmBehavior();
24 | void onTick();
25 | void StdOnSignal();
26 | void StdEmptyOnCollision() {};
27 | void doArm(EMKey key);
28 | inline void setSound(int s) { m_iSound = s; };
29 | inline int getSound() { return m_iSound; };
30 | inline void setIsRight(bool r) { m_bRight = r; };
31 | inline bool getIsRight() { return m_bRight; };
32 | private:
33 | Vertex3D m_vtxRot;
34 | bool m_bRight;
35 | int m_iCount;
36 | bool m_bOn;
37 | int m_iSound;
38 | bool m_bFirst;
39 | bool m_bTilt;
40 | };
41 |
42 | #endif // ARMBEHAVIOR_H
43 |
--------------------------------------------------------------------------------
/src/PlungerBehavior.h:
--------------------------------------------------------------------------------
1 | /***************************************************************************
2 | PlungerBehavior.h - description
3 | -------------------
4 | begin : Wed Jan 26 2000
5 | copyright : (C) 2000 by
6 | email :
7 | ***************************************************************************/
8 |
9 | #ifndef PLUNGERBEHAVIOR_H
10 | #define PLUNGERBEHAVIOR_H
11 |
12 | #include "Behavior.h"
13 | #include "StateMachine.h"
14 | #include "EMath.h"
15 |
16 | /** A plunger, the . */
17 | class PlungerBehavior : public Behavior {
18 | public:
19 | PlungerBehavior();
20 | ~PlungerBehavior();
21 | void onTick();
22 | void StdOnSignal() {};
23 | void StdOnCollision();
24 | inline void setSound(int s) { m_iSound = s; };
25 | inline int getSound() { return m_iSound; };
26 | /** zero power is 0.0f max power is 1.0f */
27 | inline float getPower() { return m_fPower; };
28 | inline bool getLaunch() { return m_iLaunchState == 2; };
29 | private:
30 | int m_iLaunchState;
31 | float m_fPower;
32 | int m_iCounter;
33 | int m_sigPlunger;
34 | int m_iSound;
35 | bool m_bFirst;
36 | Vertex3D m_vtxTr;
37 |
38 | bool m_bDoublePress;
39 | };
40 |
41 | #endif // ARMBEHAVIOR_H
42 |
--------------------------------------------------------------------------------
/base/AmbientLightVisitor.h:
--------------------------------------------------------------------------------
1 | /***************************************************************************
2 | AmbientLightVisitor.h - description
3 | -------------------
4 | begin : Sun Jan 30 2000
5 | copyright : (C) 2000 by Henrik Enqvist
6 | email : henqvist@excite.com
7 | ***************************************************************************/
8 |
9 | #ifndef AMBIENTLIGHTVISITOR_H
10 | #define AMBIENTLIGHTVISITOR_H
11 |
12 | #include
13 |
14 | #include "Visitor.h"
15 | #include "EMath.h"
16 |
17 | class Light;
18 | class Group;
19 | class Shape3D;
20 |
21 | /** Only for internal use. */
22 | class AmbientLightVisitor : public Visitor {
23 | protected:
24 | AmbientLightVisitor(int size = 4);
25 | public:
26 | ~AmbientLightVisitor();
27 | static AmbientLightVisitor * getInstance();
28 | void setLightning(float s, float bg);
29 | void add(Light* l);
30 | void visit(Group* g);
31 | void clear();
32 | private:
33 | void visitAmbient(Shape3D* s);
34 | void visitPoint(Shape3D* s);
35 |
36 | vector m_vLight;
37 | float m_fStrength;
38 | float m_fBackground;
39 | static AmbientLightVisitor * p_AmbientLightVisitor;
40 | };
41 |
42 | #endif // AMBIENTLIGHTVISITOR_H
43 |
--------------------------------------------------------------------------------
/data/tux/Makefile.am:
--------------------------------------------------------------------------------
1 | #$Id: Makefile.am,v 1.13 2010/02/17 13:22:08 rzr Exp $
2 | AUTOMAKE_OPTIONS = gnu
3 |
4 | highscoredir = $(DESTDIR)/$(EM_BUILD_ROOT)/$(EM_HIGHSCORE_DIR)/tux
5 |
6 | tuxlibdir = $(EM_LIBDIR)
7 | tuxdatadir = $(datadir)/pinball/tux
8 |
9 | tuxlib_LTLIBRARIES = libModuleTux.la
10 | AM_CPPFLAGS = -I../../base -I.../../addon -I../../src
11 |
12 | libModuleTux_la_LDFLAGS = -module
13 | libModuleTux_la_SOURCES = ModuleTux.cpp
14 |
15 | tuxdata_DATA = \
16 | bumphard.wav \
17 | bumpsoft.wav \
18 | bump.wav \
19 | face2.png \
20 | face.png.pcx \
21 | flip.wav \
22 | floor2.png \
23 | floor2.png.pcx \
24 | floor3.png \
25 | game.ogg \
26 | gameover.wav \
27 | lock.wav \
28 | loop.wav \
29 | floor.pbl \
30 | intro.ogg \
31 | multiball.ogg \
32 | nudge.wav \
33 | opentux.wav \
34 | pinball.pbl \
35 | shoot.wav \
36 | tiles.png \
37 | tiles.png.pcx \
38 | up.wav
39 |
40 | # This will create a new empty highscores file
41 | # NOTE! The user games must exist!
42 | install-data-hook:
43 | -mkdir -p $(highscoredir) # - if not root #!rzr
44 | -touch $(highscoredir)/highscores
45 | -if test `whoami` = root; then chown games $(highscoredir)/highscores; fi
46 | -if test `whoami` = root; then chgrp games $(highscoredir)/highscores; fi
47 | -chmod 666 $(highscoredir)/highscores
48 |
49 | EXTRA_DIST = $(tuxdata_DATA)
50 |
--------------------------------------------------------------------------------
/base/Sound.h:
--------------------------------------------------------------------------------
1 | /***************************************************************************
2 | Sound.h - description
3 | -------------------
4 | begin : Wed Jan 26 2000
5 | copyright : (C) 2000 by Henrik Enqvist
6 | email : henqvist@excite.com
7 | ***************************************************************************/
8 |
9 | #ifndef SOUND_H
10 | #define SOUND_H
11 |
12 | #include "EMath.h"
13 | #include "SoundUtil.h"
14 |
15 | class Group;
16 |
17 | /** 3D Sound objects. */
18 | class Sound {
19 | public:
20 | /** Sound( sample, distance ). Creates a sound object using the sample.
21 | * The distance parameter defines the distance were sound is played at full volume.
22 | * Create the sample using Allogros functions. */
23 | Sound(EmSample* sample, float dist, bool b3D = true);
24 | ~Sound(){};
25 | void play(bool loop = true);
26 | void adjust();
27 | /** Group uses this mehtod when the Sound is added to the Group. */
28 | void setParent(Group* g);
29 | private:
30 | Vertex3D m_vtxSrc;
31 | Vertex3D m_vtxTrans;
32 | Vertex3D m_vtxAlign;
33 | EmSample* p_Sample;
34 | bool m_bLoop;
35 | float m_fDistance;
36 | Group* p_Parent;
37 | bool m_b3D;
38 | };
39 |
40 | #endif // SOUND_H
41 |
--------------------------------------------------------------------------------
/addon/KeyBehavior.cpp:
--------------------------------------------------------------------------------
1 | /***************************************************************************
2 | KeyBeh.cpp - description
3 | -------------------
4 | begin : Wed Jan 26 2000
5 | copyright : (C) 2000 by Henrik Enqvist
6 | email : henqvist@excite.com
7 | ***************************************************************************/
8 |
9 | #include "Private.h"
10 | #include "KeyBehavior.h"
11 | #include "Group.h"
12 | #include "Shape3D.h"
13 | #include "Keyboard.h"
14 |
15 | KeyBehavior::KeyBehavior() : Behavior() {
16 | m_x = 0;
17 | m_y = 0;
18 | m_z = 0;
19 | }
20 |
21 | KeyBehavior::~KeyBehavior() {
22 | }
23 |
24 | void KeyBehavior::onTick() {
25 | EmAssert(this->getParent() != NULL, "KeyBehavior::onTick parent NULL");
26 | m_x = this->getParent()->m_mtxSrc.t[0];
27 | m_y = this->getParent()->m_mtxSrc.t[1];
28 | m_z = this->getParent()->m_mtxSrc.t[2];
29 | if (Keyboard::isKeyDown(SDLK_a)) m_x -= 0.2;
30 | if (Keyboard::isKeyDown(SDLK_d)) m_x += 0.2;
31 | if (Keyboard::isKeyDown(SDLK_w)) m_z -= 0.2;
32 | if (Keyboard::isKeyDown(SDLK_s)) m_z += 0.2;
33 | if (Keyboard::isKeyDown(SDLK_q)) m_y -= 0.2;
34 | if (Keyboard::isKeyDown(SDLK_e)) m_y += 0.2;
35 | this->getParent()->setTranslation(m_x, m_y, m_z);
36 | }
37 |
--------------------------------------------------------------------------------
/test/Makefile.am:
--------------------------------------------------------------------------------
1 | AUTOMAKE_OPTIONS = gnu
2 |
3 | testlibdir = $(EM_LIBDIR)
4 | testdatadir = $(pkgdatadir)
5 |
6 | noinst_PROGRAMS = scale simple light texture load explode collision signal billboard font thread menu joy sound trans math misc varray unittest
7 | # noinst_PROGRAMS = unittest
8 |
9 | AM_CPPFLAGS = -I../base -I../addon -I../src @INCLTDL@
10 | LDADD = ../src/libemilia_pin.a ../addon/libemilia_addon.a ../base/libemilia_base.a @LIBLTDL@
11 |
12 | testlib_LTLIBRARIES = libModuleTest.la
13 |
14 | libModuleTest_la_LDFLAGS = -module
15 | libModuleTest_la_SOURCES = moduletest.cpp
16 |
17 | unittest_LDFLAGS = -export-dynamic
18 | load_LDFLAGS = -export-dynamic
19 |
20 | billboard_SOURCES = billboard.cpp
21 | collision_SOURCES = collision.cpp
22 | explode_SOURCES = explode.cpp
23 | font_SOURCES = font.cpp
24 | joy_SOURCES = joy.cpp
25 | light_SOURCES = light.cpp
26 | load_SOURCES = load.cpp
27 | math_SOURCES = math.cpp
28 | menu_SOURCES = menu.cpp
29 | misc_SOURCES = misc.cpp
30 | scale_SOURCES = scale.cpp
31 | signal_SOURCES = signal.cpp
32 | simple_SOURCES = simple.cpp
33 | sound_SOURCES = sound.cpp
34 | texture_SOURCES = texture.cpp
35 | thread_SOURCES = thread.cpp
36 | trans_SOURCES = trans.cpp
37 | unittest_SOURCES = unittest.cpp
38 | varray_SOURCES = varray.cpp
39 |
40 | EXTRA_DIST = \
41 | module.txt \
42 | script.txt \
43 | token.txt
44 |
--------------------------------------------------------------------------------
/addon/Grid.h:
--------------------------------------------------------------------------------
1 | /***************************************************************************
2 | Grid.h - description
3 | -------------------
4 | begin : Tue Feb 8 2000
5 | copyright : (C) 2000 by Henrik Enqvist
6 | email : henqvist@excite.com
7 | ***************************************************************************/
8 |
9 | #ifndef GRID_H
10 | #define GRID_H
11 |
12 | #include "Shape3D.h"
13 |
14 | /** A simple grid. @see Shape3D */
15 | class Grid : public Shape3D {
16 | public:
17 | /**
18 | * Grid(Texture, SizeForEachStepX, SizeForEachStepY, Steps, SizeForEachBitmapStep,
19 | * r, g, b, a)
20 | *
21 | *
22 | * v-sizex-v Steps=3
23 | * ----------------------
24 | * | | | |
25 | * | | | |
26 | * ---------------------- <
27 | * | | | | | sizey
28 | * | | | | |
29 | * ---------------------- <
30 | * | | | |
31 | * | | | |
32 | * ---------------------- Steps=3
33 | *
34 | */
35 | Grid(EmTexture*, float sizex, float sizey, int steps, float bmStep,
36 | float fR=1.0, float fG=1.0, float fB=1.0, float fA=1.0);
37 | };
38 |
39 | #endif // GRID_H
40 |
--------------------------------------------------------------------------------
/pinball.dsw:
--------------------------------------------------------------------------------
1 | Microsoft Developer Studio Workspace File, Format Version 6.00
2 | # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
3 |
4 | ###############################################################################
5 |
6 | Project: "Base"=".\base\base.dsp" - Package Owner=<4>
7 |
8 | Package=<5>
9 | {{{
10 | }}}
11 |
12 | Package=<4>
13 | {{{
14 | }}}
15 |
16 | ###############################################################################
17 |
18 | Project: "Pinball"=".\src\pinball.dsp" - Package Owner=<4>
19 |
20 | Package=<5>
21 | {{{
22 | }}}
23 |
24 | Package=<4>
25 | {{{
26 | Begin Project Dependency
27 | Project_Dep_Name addon
28 | End Project Dependency
29 | Begin Project Dependency
30 | Project_Dep_Name Base
31 | End Project Dependency
32 | }}}
33 |
34 | ###############################################################################
35 |
36 | Project: "addon"=".\addon\addon.dsp" - Package Owner=<4>
37 |
38 | Package=<5>
39 | {{{
40 | }}}
41 |
42 | Package=<4>
43 | {{{
44 | }}}
45 |
46 | ###############################################################################
47 |
48 | Global:
49 |
50 | Package=<5>
51 | {{{
52 | }}}
53 |
54 | Package=<3>
55 | {{{
56 | }}}
57 |
58 | ###############################################################################
59 |
60 |
--------------------------------------------------------------------------------
/addon/ColorBehavior.cpp:
--------------------------------------------------------------------------------
1 | /***************************************************************************
2 | ColorBehavior.cpp - description
3 | -------------------
4 | begin : Tue Feb 15 2000
5 | copyright : (C) 2000 by Henrik Enqvist
6 | email : henqvist@excite.com
7 | ***************************************************************************/
8 |
9 | #include "Private.h"
10 | #include "ColorBehavior.h"
11 | #include "Group.h"
12 | #include "Shape3D.h"
13 |
14 | ColorBehavior::ColorBehavior() : Behavior() {
15 | }
16 |
17 | ColorBehavior::~ColorBehavior() {
18 | }
19 |
20 | void ColorBehavior::onCollision(const Vertex3D &, const Vertex3D &, Group *) {
21 | EmAssert(this->getParent() != NULL, "ColorBehavior::onCollision parent NULL");
22 | EM_COUT("ColorBehavior::onCollision()" << endl, 0);
23 | if (this->getParent() != NULL) {
24 | for (int a=0; agetParent()->getShape3DSize(); a++) {
25 | this->getParent()->getShape3D(a)->setColor(1.0, 1.0, 0.0, 0.0);
26 | }
27 | }
28 | }
29 |
30 | void ColorBehavior::onTick() {
31 | EmAssert(this->getParent() != NULL, "ColorBehavior::onTick parent NULL");
32 | for (int a=0; agetParent()->getShape3DSize(); a++) {
33 | this->getParent()->getShape3D(a)->setColor(1.0, 0.0, 0.0, 1.0);
34 | }
35 | }
36 |
37 |
--------------------------------------------------------------------------------
/base/Profiler.h:
--------------------------------------------------------------------------------
1 | /***************************************************************************
2 | Profiler.h - description
3 | -------------------
4 | begin : Tue Jul 30 2001
5 | copyright : (C) 2002 by Henrik Enqvist
6 | email : henqvist@excite.com
7 | ***************************************************************************/
8 |
9 |
10 | #ifndef PROFILER_H
11 | #define PROFILER_H
12 |
13 |
14 | #define COUNT 1
15 | #define ALIGN 2
16 | #define BEH 3
17 | #define GLIGHT 4
18 | #define COLLISION 5
19 | #define PLIGHT 6
20 | #define PNORMAL 7
21 | #define RENDER 8
22 | #define SOUND 9
23 | #define SIG 10
24 | #define TRANS 11
25 | #define DRAW 13
26 | #define SWAP 14
27 | #define KEY 15
28 | #define RENDER_OUT 16
29 | #define TICK_OUT 17
30 | #define SWAP_OUT 18
31 | #define WAIT 19
32 |
33 |
34 | /** Singleton class for quick and dirty profiling */
35 | class Profiler {
36 | protected:
37 | Profiler();
38 | public:
39 | ~Profiler();
40 | static Profiler* getInstance();
41 | void startProfile(int i);
42 | void stopProfile();
43 | void printProfile();
44 | private:
45 | unsigned int m_aProfile[256];
46 | unsigned int m_iStart;
47 | unsigned int m_iCurrentProfile;
48 | unsigned int m_iCurrentTime;
49 | static Profiler* p_Profiler;
50 | };
51 |
52 | #endif
53 |
--------------------------------------------------------------------------------
/Dockerfile:
--------------------------------------------------------------------------------
1 | #!/bin/echo docker build . -f
2 | # -*- coding: utf-8 -*-
3 | # SPDX-License-Identifier: GPL-2.0+
4 |
5 | FROM i386/debian:11
6 | LABEL maintainer="Philippe Coval (rzr@users.sf.net)"
7 |
8 | ENV DEBIAN_FRONTEND noninteractive
9 | ENV LC_ALL en_US.UTF-8
10 | ENV LANG ${LC_ALL}
11 |
12 | RUN echo "# log: Configuring locales" \
13 | && set -x \
14 | && apt-get update -y \
15 | && apt-get install -y locales \
16 | && echo "${LC_ALL} UTF-8" | tee /etc/locale.gen \
17 | && locale-gen ${LC_ALL} \
18 | && dpkg-reconfigure locales \
19 | && sync
20 |
21 | RUN echo "# log: Setup build system" \
22 | && set -x \
23 | && apt-get update -y \
24 | && apt-get install -y \
25 | make \
26 | sudo \
27 | && apt-get clean \
28 | && sync
29 |
30 | ENV project pinball
31 | ENV workdir /usr/local/opt/${project}/src/${project}
32 |
33 | ADD helper.mk ${workdir}/
34 | WORKDIR ${workdir}
35 | RUN echo "# log: ${project}: Preparing sources" \
36 | && set -x \
37 | && ./helper.mk debian/setup/devel \
38 | && sync
39 |
40 | ADD . ${workdir}/
41 | WORKDIR ${workdir}
42 | RUN echo "# log: ${project}: Building sources" \
43 | && set -x \
44 | && ./helper.mk debi \
45 | && dpkg -L ${project} \
46 | && dpkg -L ${project}-data \
47 | && sync
48 |
49 | RUN echo "# log: ${project}: Listing sources" \
50 | && set -x \
51 | && cd .. && find ${PWD}/ -maxdepth 1 \
52 | && sync
53 |
54 |
55 | ENTRYPOINT [ "/usr/games/pinball" ]
56 |
--------------------------------------------------------------------------------
/base/AlignVisitor.h:
--------------------------------------------------------------------------------
1 | /***************************************************************************
2 | AVisitor.h - description
3 | -------------------
4 | begin : Wed Jan 26 2000
5 | copyright : (C) 2000 by Henrik Enqvist
6 | email : henqvist@excite.com
7 | ***************************************************************************/
8 |
9 | #ifndef ALIGNVISITOR_H
10 | #define ALIGNVISITOR_H
11 |
12 | #include "Visitor.h"
13 | #include "EMath.h"
14 |
15 | class CollisionBounds;
16 |
17 | /** Only for internal use.
18 | * AlignVisitor alignes transformed vertices to aligned vertices
19 | * by applying the camera matrix.
20 | * @see visitor */
21 | class AlignVisitor : public Visitor {
22 | protected:
23 | AlignVisitor();
24 | public:
25 | ~AlignVisitor();
26 | static AlignVisitor * getInstance();
27 | /** Applys the camera matrix to the Shape3D and Sound objects
28 | * of the group. Checks first if the objects are NULL. */
29 | void visit(Group* g);
30 | void empty();
31 | /** The Engine object uses this function when setting the camera marix. */
32 | void setCamera(Group * g);
33 | private:
34 | Group* p_GroupCamera;
35 | Matrix m_mtxInverse;
36 | Vertex3D m_vtxFront;
37 | Vertex3D m_vtxUp;
38 | Vertex3D m_vtxTrans;
39 | Vertex3D m_vtxRot;
40 | static AlignVisitor * p_AlignVisitor;
41 | };
42 |
43 | #endif // ALIGNVISITOR_H
44 |
--------------------------------------------------------------------------------
/base/BillBoard.cpp:
--------------------------------------------------------------------------------
1 | /***************************************************************************
2 | BillBoard.cpp - description
3 | -------------------
4 | begin : Sun Dec 16 2001
5 | copyright : (C) 2001 by henqvist
6 | email : henqvist@excite.com
7 | ***************************************************************************/
8 |
9 | #include "Private.h"
10 | #include "BillBoard.h"
11 |
12 | BillBoard::BillBoard(EmTexture * tex, float sizex, float sizey) {
13 | EmAssert(tex != NULL, "texture not allowed to be null");
14 |
15 | m_iProperties = 0;
16 | p_Parent = NULL;
17 | m_Texture = tex;
18 | m_fSizexD2 = sizex / 2;
19 | m_fSizeyD2 = sizey / 2;
20 | m_fZOffset = 0;
21 |
22 | m_aTexCoord[0].u = 0;
23 | m_aTexCoord[0].v = 0;
24 | m_aTexCoord[1].u = 1;
25 | m_aTexCoord[1].v = 0;
26 | m_aTexCoord[2].u = 1;
27 | m_aTexCoord[2].v = 1;
28 | m_aTexCoord[3].u = 0;
29 | m_aTexCoord[3].v = 1;
30 |
31 | m_vtxSrc.x = 0;
32 | m_vtxSrc.y = 0;
33 | m_vtxSrc.z = 0;
34 | }
35 |
36 | BillBoard::~BillBoard() {
37 | }
38 |
39 | void BillBoard::setProperty(int p) {
40 | m_iProperties |= p;
41 | }
42 |
43 | void BillBoard::unsetProperty(int p) {
44 | m_iProperties -= (m_iProperties & p);
45 | }
46 |
47 | void BillBoard::setParent(Group* p) {
48 | p_Parent = p;
49 | }
50 |
51 | void BillBoard::setTexture(EmTexture* tex) {
52 | m_Texture = tex;
53 | }
54 |
55 |
--------------------------------------------------------------------------------
/base/SignalSender.h:
--------------------------------------------------------------------------------
1 | /***************************************************************************
2 | SignalVisitor.h - description
3 | -------------------
4 | begin : Wed Jan 26 2000
5 | copyright : (C) 2000 by Henrik Enqvist
6 | email : henqvist@excite.com
7 | ***************************************************************************/
8 |
9 | #ifndef SIGNALSENDER_H
10 | #define SIGNALSENDER_H
11 |
12 | #include
13 |
14 | #include "Visitor.h"
15 |
16 | class Group;
17 |
18 | typedef struct {
19 | int signal;
20 | int delay;
21 | Group * sender;
22 | Group * reciever;
23 | } SignalStruct;
24 |
25 |
26 | /** A medium for sending signals between behaviors. */
27 | class SignalSender {
28 | protected:
29 | SignalSender();
30 | public:
31 | ~SignalSender();
32 | static SignalSender * getInstance();
33 | /** If reciever is NULL the signal will be sent to all registered groups, multicast. */
34 | void addSignal(int signal, int delay, Group * sender, Group * reciever);
35 | void addGroup(Group * g);
36 | /** Removes all groups from the signalsender. Does not not free the memory
37 | * allocated by the groups. */
38 | void clear();
39 | void tick();
40 | private:
41 | vector m_vSignal;
42 | vector m_vSignalBuffer;
43 | vector m_vGroup;
44 | static SignalSender * p_SignalSender;
45 | };
46 | #endif // SIGNALVISITOR_H
47 |
--------------------------------------------------------------------------------
/base/RenderVisitor.h:
--------------------------------------------------------------------------------
1 | // -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*-
2 | // SPDX-License-Identifier: GPL-2.0+
3 | // Copyright: Henrik Enqvist and contributors 2001-present
4 |
5 | /***************************************************************************
6 | RenderVisitor.h - description
7 | -------------------
8 | begin : Sat Jan 6 2001
9 | copyright : (C) 2001 by Henrik Enqvist
10 | email : henqvist@excite.com
11 | ***************************************************************************/
12 |
13 | #ifndef RENDERVISITOR_H
14 | #define RENDERVISITOR_H
15 |
16 | #include
17 |
18 | class Group;
19 | class Shape3D;
20 |
21 | #include "Visitor.h"
22 |
23 |
24 | /// Dummy renderer to be derived
25 | class RenderVisitor
26 | : public Visitor
27 | {
28 | public:
29 | static RenderVisitor* getInstance(); //< may be derived
30 | public:
31 | virtual ~RenderVisitor() {}
32 | protected:
33 | RenderVisitor() : Visitor(), m_iPoly(0) {}
34 | public:
35 | virtual void visit(Group* g) {}
36 | virtual void empty() {}
37 | virtual int getMode() { return m_iMode; };
38 | virtual void setMode(int m) { m_iMode = m; };
39 | virtual int getPolys() { return m_iPoly; };
40 | private:
41 | virtual void visit(Shape3D* s, Group* g) {}
42 | protected:
43 | int m_iMode;
44 | bool m_bOffset;
45 | int m_iPoly;
46 | };
47 |
48 | #endif // RENDERVISITOR_H
49 |
50 |
--------------------------------------------------------------------------------
/pinball-config.in:
--------------------------------------------------------------------------------
1 | #! /bin/sh
2 | # @configure_input@
3 | #
4 |
5 | prefix=@prefix@
6 | exec_prefix=@exec_prefix@
7 |
8 | usage()
9 | {
10 | cat <&2
26 | fi
27 |
28 | while test $# -gt 0; do
29 | case $1 in
30 | --version)
31 | echo @PACKAGE_VERSION@
32 | ;;
33 | --cflags)
34 | echo_cflags=yes
35 | ;;
36 | --libs)
37 | echo_libs=yes
38 | ;;
39 | --datadir)
40 | echo_datadir=yes
41 | ;;
42 | --libdir)
43 | echo_libdir=yes
44 | ;;
45 | --prefix)
46 | echo_prefix=yes
47 | ;;
48 | --exec-prefix)
49 | echo_execprefix=yes
50 | ;;
51 | *)
52 | usage 1 1>&2
53 | ;;
54 | esac
55 | shift
56 | done
57 |
58 | if test "$echo_cflags" = "yes"; then
59 | echo -I@includedir@/pinball/..
60 | fi
61 |
62 | if test "$echo_libs" = "yes"; then
63 | echo -L@libdir@/pinball
64 | fi
65 | if test "$echo_datadir" = "yes"; then
66 | echo @datadir@/pinball
67 | fi
68 | if test "$echo_libdir" = "yes"; then
69 | echo @EM_LIBDIR@
70 | fi
71 | if test "$echo_prefix" = "yes"; then
72 | echo @prefix@
73 | fi
74 | if test "$echo_execprefix" = "yes"; then
75 | echo @execprefix@
76 | fi
77 |
--------------------------------------------------------------------------------
/base/BehaviorVisitor.cpp:
--------------------------------------------------------------------------------
1 | /***************************************************************************
2 | BehaviorVisitor.cpp - description
3 | -------------------
4 | begin : Wed Jan 26 2000
5 | copyright : (C) 2000 by Henrik Enqvist
6 | email : henqvist@excite.com
7 | ***************************************************************************/
8 | #include "Private.h"
9 | #include "BehaviorVisitor.h"
10 | #include "Behavior.h"
11 | #include "Group.h"
12 |
13 | #include
14 | #include
15 | #include
16 |
17 | BehaviorVisitor * BehaviorVisitor::p_BehaviorVisitor = NULL;
18 |
19 | BehaviorVisitor::BehaviorVisitor() {
20 | }
21 |
22 | BehaviorVisitor::~BehaviorVisitor() {
23 | p_BehaviorVisitor = NULL;
24 | }
25 |
26 | BehaviorVisitor * BehaviorVisitor::getInstance() {
27 | if (p_BehaviorVisitor == NULL) {
28 | p_BehaviorVisitor = new BehaviorVisitor();
29 | }
30 | return p_BehaviorVisitor;
31 | }
32 |
33 | void BehaviorVisitor::visit(Group* g) {
34 | // Check properties before applying behavior
35 | if (g->m_iProperties & EM_GROUP_NO_BEHAVIOR) return;
36 | #ifdef PINBALL_TODO
37 | vector::iterator iter = g->m_vBehavior.begin();
38 | vector::iterator end = g->m_vBehavior.end();
39 | for(; iter != end; iter++) {
40 | (*iter)->onTick();
41 | }
42 | #endif
43 | if (g->getBehavior() != NULL) {
44 | g->getBehavior()->onTick();
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/FAQ.md:
--------------------------------------------------------------------------------
1 | ## FAQ
2 |
3 | **Q:** What hardware is supported
4 | **A:**
5 | * minimal 300 Mhz cpu.
6 | * 450 Mhz PIII+ preferred
7 | * Decent graphics card, voodoo3, tnt2, geforce, matrox g450
8 | (you do not need anything superfast).
9 | Graphics card known to work: Voodoo3, Matrox G450, GeForce4.
10 |
11 | **Q:** What minimal OS is supported ?
12 |
13 | **A:** Compiles without problems on: RedHat 7.3, 8.0, 9.0, Debian 3.0.
14 |
15 | **Q:** The 'boot' and 'tux' lights on the floor blinks or have vertical
16 | lines?
17 |
18 | **A:** Some buggy implementations of OpenGL does not implement the polygon
19 | offset command - which is need by the game for correct rendering.
20 |
21 | **Q:** Sounds are delayed with 0.5 seconds?
22 |
23 | **A:** You're either using arts, esd or have buggy audio drivers. Stop
24 | arts and esd, if that does not help install alsa drivers.
25 |
26 | **Q:** The rpm doesn't fit my dist and the source won't compile?
27 | Search the web for rpms, e.g. Mandrake rpms seems to pop up on
28 | rpmfind a couple of weeks/months after my releases.
29 | For compiling: double check that you the _development_ packages of OpenGL, X, SDL,
30 | SDL_image, SDL_mixer are installed.
31 |
32 | **Q:** Can I help?
33 |
34 | **A:** Yes, I would like to check that the physics model of the game is
35 | somewhat like a real pinball machine without putting all my money into
36 | the pinball games at the local game corner. So if you have a spare
37 | pinball machine send it to me (it don't think it will fit in the
38 | mail though...).
39 |
--------------------------------------------------------------------------------
/src/LoaderModule.h:
--------------------------------------------------------------------------------
1 | //#ident "$Id: LoaderModule.h,v 1.2 2003/04/09 12:19:07 rzr Exp $"
2 | #ifndef LoaderModule_h_
3 | #define LoaderModule_h_
4 | #include
5 | #include