diff options
| author | Albrecht Schlosser <albrechts.fltk@online.de> | 2020-07-01 18:03:10 +0200 |
|---|---|---|
| committer | Albrecht Schlosser <albrechts.fltk@online.de> | 2020-07-06 20:28:20 +0200 |
| commit | f09e17c3c564e8310125a10c03397cbf473ff643 (patch) | |
| tree | 8d0fd4a28e3686c33aaa140d07ddba26ab28bdc2 /test/glpuzzle.cxx | |
| parent | b0e0c355edaa2e23148cb0260ada907aec930f05 (diff) | |
Remove $Id$ tags, update URL's, and more
- remove obsolete svn '$Id$' tags from all source files
- update .fl files and generated files accordingly
- replace 'http://www.fltk.org' URL's with 'https://...'
- replace bug report URL 'str.php' with 'bugs.php'
- remove trailing whitespace
- fix other whitespace errors flagged by Git
- add and/or fix missing or wrong standard headers
- convert tabs to spaces in all source files
The only relevant code changes are in the fluid/ folder where
some .fl files and other source files were used to generate
the '$Id' headers and footers.
Diffstat (limited to 'test/glpuzzle.cxx')
| -rw-r--r-- | test/glpuzzle.cxx | 36 |
1 files changed, 15 insertions, 21 deletions
diff --git a/test/glpuzzle.cxx b/test/glpuzzle.cxx index 8a97e8f4b..5f265f55e 100644 --- a/test/glpuzzle.cxx +++ b/test/glpuzzle.cxx @@ -1,6 +1,4 @@ // -// "$Id$" -// // OpenGL puzzle demo for the Fast Light Tool Kit (FLTK). // // This is a GLUT demo program to demonstrate fltk's GLUT emulation. @@ -14,9 +12,9 @@ // // https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// https://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // // Convenience options 'n' and ' ' and command line switch '-n' added for FLTK @@ -39,9 +37,9 @@ int main(int, char**) { #include <sys/types.h> #include <time.h> #include <math.h> -#include <FL/glut.H> // changed for fltk +#include <FL/glut.H> // changed for fltk #include <FL/glu.h> // added for fltk -#include "trackball.c" // changed from trackball.h for fltk +#include "trackball.c" // changed from trackball.h for fltk #define WIDTH 4 #define HEIGHT 5 @@ -879,7 +877,7 @@ invertMatrix(const GLfloat src[16], GLfloat inverse[16]) makeIdentity(inverse); for (i = 0; i < 4; i++) { - /* + /* ** Look for largest element in column */ swap = i; for (j = i + 1; j < 4; j++) { @@ -889,7 +887,7 @@ invertMatrix(const GLfloat src[16], GLfloat inverse[16]) } if (swap != i) { - /* + /* ** Swap rows. */ for (k = 0; k < 4; k++) { t = temp[i][k]; @@ -902,7 +900,7 @@ invertMatrix(const GLfloat src[16], GLfloat inverse[16]) } } if (temp[i][i] == 0) { - /* + /* ** No non-zero pivot. The matrix is singular, which shouldn't ** happen. This means the user gave us a bad matrix. */ @@ -928,9 +926,9 @@ invertMatrix(const GLfloat src[16], GLfloat inverse[16]) /* ** This is a screwball function. What it does is the following: - ** Given screen x and y coordinates, compute the corresponding object space + ** Given screen x and y coordinates, compute the corresponding object space ** x and y coordinates given that the object space z is 0.9 + OFFSETZ. - ** Since the tops of (most) pieces are at z = 0.9 + OFFSETZ, we use that + ** Since the tops of (most) pieces are at z = 0.9 + OFFSETZ, we use that ** number. */ int @@ -969,10 +967,10 @@ computeCoords(int piece, int mousex, int mousey, finalMatrix[3 * 4 + 3]; d = finalMatrix[2 * 4 + 3]; - /* - ** Ok, now we need to solve for z: ** (a + b z) / (c + d + /* + ** Ok, now we need to solve for z: ** (a + b z) / (c + d - z) = height. ** ("height" is the height in object space we + z) = height. ** ("height" is the height in object space we want to solve z for) ** ** ==> a + b z = height c + height d z ** bz - height d z = height c - a ** z = @@ -984,12 +982,12 @@ computeCoords(int piece, int mousex, int mousey, z = top / bot; - /* + /* ** Ok, no problem. ** Now we solve for x and y. We know that w = c + d z, so we compute it. */ w = c + d * z; - /* + /* ** Now for x and y: */ *selx = (in[0] * finalMatrix[0 * 4 + 0] + in[1] * finalMatrix[1 * 4 + 0] + @@ -1096,7 +1094,7 @@ moveSelection(float selx, float sely) } else { if (deltay > 0 && thePuzzle[selecty][selectx] == 10 && selectx == 1 && selecty == 3) { - /* Allow visual movement of solution piece outside of the + /* Allow visual movement of solution piece outside of the box */ move_x = selectx; @@ -1497,7 +1495,3 @@ main(int argc, char **argv) } #endif // added for fltk's distribution - -// -// End of "$Id$". -// |
