[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
Here is my first contribution to Allegro.
I have fixed two of the examples: exstars and exlights.
I increased the star volume in exstars so that stars don't disappear
into (and appear from) thin air.
The hue was in the wrong range in exlights (0-320, not 0-360).
I hope I got the diff right, it's my first.
/ Daniel Nilsson
diff -U 3 ALLEGRO.OLD\EXAMPLES/exlights.c ALLEGRO\EXAMPLES/exlights.c
--- ALLEGRO.OLD\EXAMPLES/exlights.c Wed Mar 15 16:55:08 2000
+++ ALLEGRO\EXAMPLES/exlights.c Wed Mar 15 16:57:34 2000
@@ -114,7 +114,7 @@
dir = fixtoi(fatan2(itofix(dy), itofix(dx)));
- hsv_to_rgb(dir*320.0/256.0, MID(0, dist/128.0, 1), 1, &r, &g, &b);
+ hsv_to_rgb(dir*360.0/256.0, MID(0, dist/128.0, 1), 1, &r, &g, &b);
r = r * (128-dist) / 1024;
g = g * (128-dist) / 1024;
diff -U 3 ALLEGRO.OLD\EXAMPLES/exstars.c ALLEGRO\EXAMPLES/exstars.c
--- ALLEGRO.OLD\EXAMPLES/exstars.c Sun Nov 7 18:51:42 1999
+++ ALLEGRO\EXAMPLES/exstars.c Wed Mar 15 17:06:44 2000
@@ -19,11 +19,11 @@
} VECTOR;
-#define NUM_STARS 256
+#define NUM_STARS 512
#define Z_NEAR 24
#define Z_FAR 1024
-#define XY_CUBE 512
+#define XY_CUBE 2048
#define SPEED_LIMIT 20