aboutsummaryrefslogtreecommitdiff
path: root/games/asteroids3d/files
diff options
context:
space:
mode:
authorGuido Falsi <madpilot@FreeBSD.org>2012-07-18 11:27:01 +0000
committerGuido Falsi <madpilot@FreeBSD.org>2012-07-18 11:27:01 +0000
commit91907a3009a3a6b48b7fe8f746165cb8e24594c8 (patch)
tree6d2f521e8ca666801d62ff9807f6941864c3d770 /games/asteroids3d/files
parent977e73b396dd800f60993165a7fa94ec9468f074 (diff)
downloadports-91907a3009a3a6b48b7fe8f746165cb8e24594c8.tar.gz
ports-91907a3009a3a6b48b7fe8f746165cb8e24594c8.zip
A simple first person shooter of blowing up asteroids in 3D space.
The codebase also serves as an introduction to trigonometry and OpenGL. WWW: http://sourceforge.net/projects/a3d/ http://staff.psc.edu/smp/a3d/ PR: ports/168177 Submitted by: nemysis@gmx.ch Approved by: tabthorpe (mentor)
Notes
Notes: svn path=/head/; revision=301078
Diffstat (limited to 'games/asteroids3d/files')
-rw-r--r--games/asteroids3d/files/patch-src-texture.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/games/asteroids3d/files/patch-src-texture.c b/games/asteroids3d/files/patch-src-texture.c
new file mode 100644
index 000000000000..d36d3dce6501
--- /dev/null
+++ b/games/asteroids3d/files/patch-src-texture.c
@@ -0,0 +1,28 @@
+--- src/texture.c.orig 2008-04-06 16:37:29.000000000 +0200
++++ src/texture.c 2012-05-20 11:27:24.000000000 +0200
+@@ -99,19 +99,19 @@
+ static void average_RGBA_alpha_and_floor(unsigned char *image,
+ int x, int y, int flr)
+ {
+- int ir, ig, ib, ia, i, new_alpha;
++ int ir, ig, ib, ia, i;
+
+ for (i = 0; i < x * y * 4; i += 4) {
+ ir = image[i];
+ ig = image[i+1];
+ ib = image[i+2];
+- ia = image[i+3];
++ /* ia = image[i+3]; */
+
+- new_alpha = (ir + ig + ib) / 3;
+- if (new_alpha < flr)
+- new_alpha = 0;
++ ia = (ir + ig + ib) / 3;
++ if (ia < flr)
++ ia = 0;
+
+- image[i+3] = new_alpha;
++ image[i+3] = ia;
+ }
+
+ return;