summaryrefslogtreecommitdiffstats
path: root/source/xap/xgames/xlander-2009-07-18.diff
diff options
context:
space:
mode:
author Patrick J Volkerding <volkerdi@slackware.com>2009-08-26 10:00:38 -0500
committer Eric Hameleers <alien@slackware.com>2018-05-31 22:41:17 +0200
commit5a12e7c134274dba706667107d10d231517d3e05 (patch)
tree55718d5acb710fde798d9f38d0bbaf594ed4b296 /source/xap/xgames/xlander-2009-07-18.diff
downloadcurrent-5a12e7c134274dba706667107d10d231517d3e05.tar.gz
current-5a12e7c134274dba706667107d10d231517d3e05.tar.xz
Slackware 13.0slackware-13.0
Wed Aug 26 10:00:38 CDT 2009 Slackware 13.0 x86_64 is released as stable! Thanks to everyone who helped make this release possible -- see the RELEASE_NOTES for the credits. The ISOs are off to the replicator. This time it will be a 6 CD-ROM 32-bit set and a dual-sided 32-bit/64-bit x86/x86_64 DVD. We're taking pre-orders now at store.slackware.com. Please consider picking up a copy to help support the project. Once again, thanks to the entire Slackware community for all the help testing and fixing things and offering suggestions during this development cycle. As always, have fun and enjoy! -P.
Diffstat (limited to '')
-rw-r--r--source/xap/xgames/xlander-2009-07-18.diff86
1 files changed, 86 insertions, 0 deletions
diff --git a/source/xap/xgames/xlander-2009-07-18.diff b/source/xap/xgames/xlander-2009-07-18.diff
new file mode 100644
index 000000000..21402ea4d
--- /dev/null
+++ b/source/xap/xgames/xlander-2009-07-18.diff
@@ -0,0 +1,86 @@
+diff --git a/game.c b/game.c
+index e6f3a53..b789081 100644
+--- a/game.c
++++ b/game.c
+@@ -93,7 +93,7 @@ void RateLanding (db, lander)
+ extern LINE landingpad[];
+ int x_distance, z_distance; /* Distance from center of pad */
+ int abs ();
+- void InitializeLander (), DisplayAcceleration ();
++ void InitFrameRate (), InitializeLander (), DisplayAcceleration ();
+
+ x_distance =
+ abs ((int) (db->off_x - (landingpad[0].x1 + (PAD_WIDTH >> 1))));
+@@ -108,6 +108,7 @@ void RateLanding (db, lander)
+ }
+ XDrawImageString (d, instrBuffer, gcInstr, 381, 84, buf, strlen (buf));
+ Pause ("Press mouse button to continue");
++ InitFrameRate ();
+ InitializeLander (db, lander);
+
+ /*
+diff --git a/initialize.c b/initialize.c
+index 99a81c5..279e3f2 100644
+--- a/initialize.c
++++ b/initialize.c
+@@ -60,7 +60,7 @@ void InitializeLander (craft, lander)
+ lander->retro_thruster = 0;
+ lander->vert_speed = 0.0;
+ lander->heading = 1.36;
+- lander->lat_veloc = 100.0;
++ lander->lat_veloc = 300.0;
+ lander->fuel = FULL_TANK;
+ lander->alt = craft->off_y / PIXELS_PER_FOOT;
+ }
+diff --git a/patchlevel.h b/patchlevel.h
+index 9625f98..be79bb8 100644
+--- a/patchlevel.h
++++ b/patchlevel.h
+@@ -1,2 +1,2 @@
+-#define PATCHLEVEL 3
++#define PATCHLEVEL 4
+
+diff --git a/xlander.c b/xlander.c
+index 2b2c103..318e5df 100644
+--- a/xlander.c
++++ b/xlander.c
+@@ -101,9 +101,17 @@ void DisplayWorld ()
+ }
+
+
++void InitFrameRate ()
++{
++ gettimeofday(&frame_time, NULL);
++ gettimeofday(&prev_frame_time, NULL);
++ fps = 1000000.0; /* Avoid initial spike */
++}
++
++
+ void UpdateFrameRate ()
+ {
+- unsigned long sec, usec, diff;
++ long sec, usec, diff;
+
+ gettimeofday(&frame_time, NULL);
+ sec = frame_time.tv_sec - prev_frame_time.tv_sec;
+@@ -164,6 +172,7 @@ int main (argc, argv)
+ */
+ mask = sigblock (sigmask (SIGINT));
+ Pause ("Press any mouse button to begin");
++ InitFrameRate ();
+ DisplayAcceleration ();
+ for (;;) {
+ UpdateOrientation (world, craft, &lander);
+diff --git a/xlander.h b/xlander.h
+index ea157f7..ea072d3 100644
+--- a/xlander.h
++++ b/xlander.h
+@@ -44,7 +44,7 @@
+ #define PIXELS_PER_FOOT 6 /* Number of pixels per foot */
+ #define ACCELERATION -5.310 /* Acceleration of gravity (ft/sec^2) */
+ #define RETRO 35.0 /* Acceleration due to retroactive thruster */
+-#define LATERAL_THRUST 5.0 /* Acceleration due to lateral thruster */
++#define LATERAL_THRUST 1.0 /* Acceleration due to lateral thruster */
+ #define PI 3.1415926535897932384
+ #define HALFPI 1.5707963 /* pi/2 */
+ #define TWOPI100 628