diff options
| author | Sam Lawrance <lawrance@FreeBSD.org> | 2006-04-27 23:53:20 +0000 | 
|---|---|---|
| committer | Sam Lawrance <lawrance@FreeBSD.org> | 2006-04-27 23:53:20 +0000 | 
| commit | 2632e04e8a236f462625aaa292d8fb185ae15af8 (patch) | |
| tree | 48a5fbd5f2de78081bb9d38d5dff47120936a3cc /graphics | |
| parent | update bsd.sites.mk - add mozdev mirrors (diff) | |
Fix build on 4.x.
Reported by:	Kris
Diffstat (limited to 'graphics')
4 files changed, 102 insertions, 0 deletions
diff --git a/graphics/reallyslick/files/patch-other_src_driver.c b/graphics/reallyslick/files/patch-other_src_driver.c new file mode 100644 index 000000000000..db4885e70829 --- /dev/null +++ b/graphics/reallyslick/files/patch-other_src_driver.c @@ -0,0 +1,27 @@ +--- other_src/driver.c.orig	Sun Feb 26 07:16:15 2006 ++++ other_src/driver.c	Fri Apr 28 09:27:01 2006 +@@ -152,10 +152,14 @@ + { + 	int bFPS = False; + 	XEvent event; +-	Atom XA_WM_PROTOCOLS = XInternAtom (XStuff->display, "WM_PROTOCOLS", False); +-	Atom XA_WM_DELETE_WINDOW = XInternAtom (XStuff->display, "WM_DELETE_WINDOW", False); ++	Atom XA_WM_PROTOCOLS; ++	Atom XA_WM_DELETE_WINDOW; + 	struct timeval then, now, fps_time; + 	int fps = 0; ++	int frameTimeSoFar = 0; ++ ++	XA_WM_PROTOCOLS = XInternAtom (XStuff->display, "WM_PROTOCOLS", False); ++	XA_WM_DELETE_WINDOW = XInternAtom (XStuff->display, "WM_DELETE_WINDOW", False); +  + 	if (!rootWindow) { + 		XSetWMProtocols (XStuff->display, XStuff->window, &XA_WM_DELETE_WINDOW, 1); +@@ -164,7 +168,6 @@ + 	clearBuffers(); +  + 	gettimeofday (&now, NULL); +-	int frameTimeSoFar = 0; + 	while (!signalled) { + 		hack_draw (XStuff, (double)now.tv_sec + now.tv_usec / 1000000.0f, frameTimeSoFar / 1000000.0f); +  diff --git a/graphics/reallyslick/files/patch-other_src_matrixview.c b/graphics/reallyslick/files/patch-other_src_matrixview.c new file mode 100644 index 000000000000..a5c9028cb29e --- /dev/null +++ b/graphics/reallyslick/files/patch-other_src_matrixview.c @@ -0,0 +1,20 @@ +--- other_src/matrixview.c.orig	Sun Feb 26 08:55:26 2006 ++++ other_src/matrixview.c	Fri Apr 28 09:33:18 2006 +@@ -94,13 +94,15 @@ +  + // Directory scanning + image loading code in a separate function callable either from loadNextImage or another thread if pthreads is available. + void loadNextImageFromDisk() { +-	MagickWand *magick_wand = NewMagickWand(); ++	MagickWand *magick_wand; + 	ExceptionInfo exception; + 	int dirLoop = 0; ++	int imageLoaded = 0; ++ ++	magick_wand = NewMagickWand(); +  + 	GetExceptionInfo (&exception); +  +-	int imageLoaded = 0; + 	do { + 		struct dirent *file; +  diff --git a/graphics/reallyslick/files/patch-reallyslick_c_src_driver.c b/graphics/reallyslick/files/patch-reallyslick_c_src_driver.c new file mode 100644 index 000000000000..e12e4474aad0 --- /dev/null +++ b/graphics/reallyslick/files/patch-reallyslick_c_src_driver.c @@ -0,0 +1,27 @@ +--- reallyslick/c_src/driver.c.orig	Sun Feb 26 07:16:15 2006 ++++ reallyslick/c_src/driver.c	Fri Apr 28 09:39:38 2006 +@@ -152,10 +152,14 @@ + { + 	int bFPS = False; + 	XEvent event; +-	Atom XA_WM_PROTOCOLS = XInternAtom (XStuff->display, "WM_PROTOCOLS", False); +-	Atom XA_WM_DELETE_WINDOW = XInternAtom (XStuff->display, "WM_DELETE_WINDOW", False); ++	Atom XA_WM_PROTOCOLS; ++	Atom XA_WM_DELETE_WINDOW; + 	struct timeval then, now, fps_time; + 	int fps = 0; ++	int frameTimeSoFar = 0; ++ ++	XA_WM_PROTOCOLS = XInternAtom (XStuff->display, "WM_PROTOCOLS", False); ++	XA_WM_DELETE_WINDOW = XInternAtom (XStuff->display, "WM_DELETE_WINDOW", False); +  + 	if (!rootWindow) { + 		XSetWMProtocols (XStuff->display, XStuff->window, &XA_WM_DELETE_WINDOW, 1); +@@ -164,7 +168,6 @@ + 	clearBuffers(); +  + 	gettimeofday (&now, NULL); +-	int frameTimeSoFar = 0; + 	while (!signalled) { + 		hack_draw (XStuff, (double)now.tv_sec + now.tv_usec / 1000000.0f, frameTimeSoFar / 1000000.0f); +  diff --git a/graphics/reallyslick/files/patch-reallyslick_c_src_lattice.c b/graphics/reallyslick/files/patch-reallyslick_c_src_lattice.c new file mode 100644 index 000000000000..dbfd48a30092 --- /dev/null +++ b/graphics/reallyslick/files/patch-reallyslick_c_src_lattice.c @@ -0,0 +1,28 @@ +--- reallyslick/c_src/lattice.c.orig	Sun Feb 26 07:47:35 2006 ++++ reallyslick/c_src/lattice.c	Fri Apr 28 09:43:41 2006 +@@ -714,6 +714,7 @@ + 	static float rollVel = 0.0f, rollAcc = 0.0f; + 	int drawDepth = dDrawdepth + 2; + 	static float rollChange = 0;	/* rsRandf (10.0f) + 2.0f; */ ++	float dot, maxSpin, rotationInertia; +  + 	where += (float)dSpeed * 0.05f * elapsedTime; + 	if (where >= 1.0f) { +@@ -741,14 +742,14 @@ + 	rsVec_cross ((float *)&angvel, dir, oldDir); /* Desired axis of rotation */ +  + 	/* Protect against mild "overflow" */ +-	float dot = MAX(MIN(rsVec_dot (oldDir, dir), -1.0), 1.0); +-	float maxSpin = 0.25f * (float)dSpeed * elapsedTime; ++	dot = MAX(MIN(rsVec_dot (oldDir, dir), -1.0), 1.0); ++	maxSpin = 0.25f * (float)dSpeed * elapsedTime; + 	angle = MAX(MIN(acos(dot), -maxSpin), maxSpin); +  + 	rsVec_scale ((float *)&angvel, angle); /* Desired angular velocity */ + 	rsVec_subtract (angvel, oldAngvel, (float *)&tempVec); /* Change in angular velocity */ + 	distance = rsVec_length (tempVec); /* Don't let angular velocity change too much */ +-	float rotationInertia = 0.007f * (float)dSpeed * elapsedTime; ++	rotationInertia = 0.007f * (float)dSpeed * elapsedTime; + 	if (distance > rotationInertia * elapsedTime) { + 		rsVec_scale ((float *)&tempVec, ((rotationInertia * elapsedTime) / distance)); + 		rsVec_add (oldAngvel, tempVec, (float *)&angvel);  | 
