]> Dogcows Code - chaz/yoink/commitdiff
reformatting
authorCharles McGarvey <chazmcgarvey@brokenzipper.com>
Sun, 24 Jan 2010 04:51:15 +0000 (21:51 -0700)
committerCharles McGarvey <chazmcgarvey@brokenzipper.com>
Sun, 24 Jan 2010 04:51:15 +0000 (21:51 -0700)
87 files changed:
README
configure.ac
data/scenes/Classic.lua
data/yoinkrc
doc/yoink.6.in
src/Animation.cc
src/Animation.hh
src/Character.cc
src/Character.hh
src/ErrorHandler.cc
src/ErrorHandler.hh
src/GameLayer.cc
src/GameLayer.hh
src/GameState.hh
src/Heroine.cc
src/Heroine.hh
src/Hud.cc
src/Hud.hh
src/Main.cc
src/Main.hh
src/Makefile.am
src/Moof/Aabb.cc
src/Moof/Aabb.hh
src/Moof/Camera.cc
src/Moof/Camera.hh
src/Moof/Core.cc
src/Moof/Core.hh
src/Moof/Cullable.hh
src/Moof/Dispatch.cc
src/Moof/Dispatch.hh
src/Moof/Drawable.hh
src/Moof/Entity.hh
src/Moof/Error.hh
src/Moof/Event.hh
src/Moof/Frustum.cc
src/Moof/Frustum.hh
src/Moof/Hash.cc
src/Moof/Hash.hh
src/Moof/Image.cc
src/Moof/Image.hh
src/Moof/Interpolator.hh
src/Moof/Layer.hh
src/Moof/Line.hh
src/Moof/Log.cc
src/Moof/Log.hh
src/Moof/Manager.hh
src/Moof/Math.hh
src/Moof/ModalDialog.hh
src/Moof/Octree.hh
src/Moof/OpenGL.hh
src/Moof/Plane.cc
src/Moof/Plane.hh
src/Moof/Ray.hh
src/Moof/Rectangle.cc
src/Moof/Rectangle.hh
src/Moof/Resource.cc
src/Moof/Resource.hh
src/Moof/RigidBody.hh
src/Moof/Script.hh
src/Moof/Settings.cc
src/Moof/Settings.hh
src/Moof/Shape.hh
src/Moof/Sound.cc
src/Moof/Sound.hh
src/Moof/Sphere.cc
src/Moof/Sphere.hh
src/Moof/StringTools.cc
src/Moof/StringTools.hh
src/Moof/Texture.cc
src/Moof/Texture.hh
src/Moof/Thread.hh
src/Moof/Timer.cc
src/Moof/Timer.hh
src/Moof/Transition.hh
src/Moof/Video.cc
src/Moof/Video.hh
src/Scene.cc
src/Scene.hh
src/TilemapFont.cc
src/TilemapFont.hh
src/TitleLayer.cc
src/TitleLayer.hh
src/Typesetter.cc
src/Typesetter.hh
src/version.c
src/version.h
src/yoink.rc

diff --git a/README b/README
index 319344927c18dc23c143fa279a5c8dedc22e2e2a..bd05038886201b7330ff66ad1c62266985be565d 100644 (file)
--- a/README
+++ b/README
@@ -10,7 +10,7 @@ I.   Users
   c)   License
 II.  Developers
   a)   Notes regarding the code
   c)   License
 II.  Developers
   a)   Notes regarding the code
-  b)   Porting
+  b)   Sending patches
 III. Packagers
   a)   The build system
   b)   Targeting Win32
 III. Packagers
   a)   The build system
   b)   Targeting Win32
@@ -21,9 +21,9 @@ I. Users
 
 a) General information
 
 
 a) General information
 
-Yoink is a game originally developed by Neil Carter for Mac OS.  You play
-the part of a flying alien heroine who must defend her home on Earth from
-other airborne alien invaders.
+Yoink is a game created by Neil Carter for Mac OS.  You play the part of a
+flying alien heroine who must defend her home on Earth from other airborne
+alien invaders.
 
 This version of the game uses all new code and modern frameworks to bring
 this simple, fast-moving action game to a wider audience.
 
 This version of the game uses all new code and modern frameworks to bring
 this simple, fast-moving action game to a wider audience.
@@ -41,14 +41,14 @@ SDL
 
 c) License
 
 
 c) License
 
-The new code is released under the BSD-2 license.  The old code and
-original resources are provided under the zlib/libpng License.  See COPYING
-for complete details.  The full texts of applicable licenses can be found
-in doc/licenses/.
+The new code is released under the 2-clause BSD license.  The old code and
+original resources are provided under the zlib/libpng License.  See the
+file COPYING for complete details.  The full texts of applicable licenses
+can be found in doc/licenses/.
 
 
 
 
-II. Developer
--------------
+II. Developers
+--------------
 
 a) Notes regarding the code
 
 
 a) Notes regarding the code
 
@@ -65,9 +65,9 @@ This is the code directly in src/.  These classes reside in no namespace.
 2. Reusable code.
 
 Currently, the code is in src/Moof/, and it is compiled as a convenience
 2. Reusable code.
 
 Currently, the code is in src/Moof/, and it is compiled as a convenience
-library.  These classes and other helper functions reside in the Mf
-namespace.  Since I wrote this code alongside the Yoink-specific stuff,
-there is somewhat of a blurry line between the two categories.
+library.  These classes and helper functions reside in the Mf namespace.
+Since I wrote this code alongside the Yoink-specific stuff, there is
+somewhat of a blurry line between the two categories, unfortunately.
 
 3. 3rd-party code.
 
 
 3. 3rd-party code.
 
@@ -76,12 +76,23 @@ the explicit dependencies above), the licenses of which are also in the
 COPYING file.  This code resides in various namespaces and in various
 subdirectories.
 
 COPYING file.  This code resides in various namespaces and in various
 subdirectories.
 
-b) Porting
+b) Sending patches
+
+I'll gladly entertain patches if you want to fix bugs or whatnot.  Just
+email me your stuff or tell me where to pull from (git).  If you're
+interested in that, please observe the following:
+
+*  Stick to the coding style of the source code files you edit.  Follow the
+   general style of method and variable naming, as well as white spacing
+   formatting.  In particular, use literal tabs with an assumed tabstop of
+   4 characters.  Also, limit line lengths to 75 characters.
 
 
-Portability is a goal of this project.  To this end, Yoink is written in
-standard C++ and takes advantage of cross-platform libraries.  If code
-changes are required to cleanly build Yoink on your platform, please send
-back patches.
+*  For legal reasons, don't include other peoples' code with your patch.
+   You must also agree to license your changes according to the same terms
+   and conditions as the files you edit, usually the 2-clause BSD license.
+
+*  If you want to add your contact information to the file AUTHORS, please
+   just do it in the patch you provide.
 
 
 III. Packagers
 
 
 III. Packagers
@@ -90,9 +101,9 @@ III. Packagers
 a) The build system
 
 You can probably tell that the build system of this package is built from
 a) The build system
 
 You can probably tell that the build system of this package is built from
-autoconf and automake.  It should be fairly sane.  If you find any
-problems, especially any bugs which complicate packaging on certain
-systems, please send back patches.
+autoconf and automake.  It should be fairly sane.  If you find any build
+system problems or code which doesn't compile cleanly on your platform,
+feel free to send back patches.
 
 b) Targeting Win32
 
 
 b) Targeting Win32
 
@@ -101,10 +112,13 @@ build a win32 binary using a command such as this:
 
 ./configure --host=mingw32 --prefix=/usr/mingw32/usr
 
 
 ./configure --host=mingw32 --prefix=/usr/mingw32/usr
 
-where mingw32 is the correct name of your toolchain.  You can get all the
-non-standard dependencies from the git repository at win32/win32-libs.zip.
-Just unzip the contents of that archive into your toolchain.  If everything
-goes smoothly, you should have a yoink.exe appropriate for the win32
-platform.  You can then build a complete installer using "make package" if
-you have nsis installed.
+where mingw32 is the correct name of your toolchain and the prefix points
+to the installation of your toolchain.  I maintain an archive of most of
+the dependencies.  The package is in the git repository; just unzip it onto
+your toolchain and configure/compile.  If everything goes smoothly, you
+should have a new, shiny yoink.exe.  You can then build a complete
+installer using "make package" if you have nsis installed.
+
+I haven't tried building with cygwin or mingw32 on an actual Windows
+machine, let alone VS.  You're on your own if you go that route.
 
 
index 813b6b51fb80a0df31ca10f8785fedfccddde44b..2f2bc1d5874cd9f9342358d09b5cd4cd8f0af3ee 100644 (file)
@@ -18,7 +18,7 @@ AM_INIT_AUTOMAKE
 
 #
 # Checks for programs.
 
 #
 # Checks for programs.
-#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 AC_PROG_CXX
 AC_PROG_CC
 
 AC_PROG_CXX
 AC_PROG_CC
@@ -34,7 +34,7 @@ AC_SUBST(DOXYGEN)
 
 #
 # Configure platform-specific stuff.
 
 #
 # Configure platform-specific stuff.
-#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 case "${host}" in
        *mingw32*)
 
 case "${host}" in
        *mingw32*)
@@ -62,7 +62,7 @@ AM_CONDITIONAL([WIN32], test "$WIN32" = "yes")
 
 #
 # Checks for configuration arguments.
 
 #
 # Checks for configuration arguments.
-#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 AC_ARG_ENABLE([debug],
                          [  --enable-debug          include debugging symbols and features],
 
 AC_ARG_ENABLE([debug],
                          [  --enable-debug          include debugging symbols and features],
@@ -165,7 +165,7 @@ AC_DEFINE_UNQUOTED([YOINK_DATADIR], ["$DATADIR"],
 
 #
 # Split the version number into components.
 
 #
 # Split the version number into components.
-#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 VERSION_MAJOR=$(echo $VERSION | cut -d. -f1)
 VERSION_MINOR=$(echo $VERSION | cut -d. -f2)
 
 VERSION_MAJOR=$(echo $VERSION | cut -d. -f1)
 VERSION_MINOR=$(echo $VERSION | cut -d. -f2)
@@ -191,7 +191,7 @@ fi
 
 #
 # Checks for system functions/headers and compiler characteristics.
 
 #
 # Checks for system functions/headers and compiler characteristics.
-#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 AC_C_STRINGIZE
 AC_C_INLINE
 
 AC_C_STRINGIZE
 AC_C_INLINE
@@ -218,7 +218,7 @@ AC_SEARCH_LIBS([clock_gettime], [rt],
 
 #
 # Checks for build dependencies.
 
 #
 # Checks for build dependencies.
-#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 ##### boost #####
 website="http://www.boost.org/"
 
 ##### boost #####
 website="http://www.boost.org/"
@@ -322,7 +322,7 @@ fi
 
 #
 # Find the game resources to install.
 
 #
 # Find the game resources to install.
-#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 DATA_FILES=$(echo $(cd data && find . -name "*.lua" \
                                                                   -o -name "*.ogg" \
 
 DATA_FILES=$(echo $(cd data && find . -name "*.lua" \
                                                                   -o -name "*.ogg" \
@@ -333,7 +333,7 @@ AC_SUBST([DATA_FILES])
 
 #
 # Create the build files.
 
 #
 # Create the build files.
-#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 AC_CONFIG_FILES([Makefile
                                 data/Makefile
 
 AC_CONFIG_FILES([Makefile
                                 data/Makefile
@@ -354,7 +354,7 @@ AC_OUTPUT
 
 #
 # Print a friendly little message.
 
 #
 # Print a friendly little message.
-#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 echo ""
 echo " Configuration complete! :-)"
 
 echo ""
 echo " Configuration complete! :-)"
index 10ba6a2d27597f5f6c6317bc7216918a6ac0c6d6..fb4765fc1e30fbca4136a04c91a8dd7bc61b0e4b 100644 (file)
@@ -25,7 +25,7 @@ SetBounds({-5, 0, -6}, {45, 15, 7})
 
 
 -- Left end tower block
 
 
 -- Left end tower block
--- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 -- Front
 
 
 -- Front
 
@@ -89,7 +89,7 @@ DrawTilemap({
        3,      3,      3,      3,      3})
 
 -- Leftmost background tower block
        3,      3,      3,      3,      3})
 
 -- Leftmost background tower block
--- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                
 -- Front
 
                
 -- Front
 
@@ -139,7 +139,7 @@ if detail > LOW then
 end
 
 -- Foreground building with pitched roof
 end
 
 -- Foreground building with pitched roof
--- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                
 -- Left wall
 
                
 -- Left wall
 
@@ -211,7 +211,7 @@ DrawTilemap({
        -1,     -1,     -1})
 
 -- The ground
        -1,     -1,     -1})
 
 -- The ground
--- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                
 -- Courtyard
 
                
 -- Courtyard
 
@@ -284,7 +284,7 @@ if detail > MEDIUM then
 end
 
 -- Background building with pitched roof
 end
 
 -- Background building with pitched roof
--- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                
 -- Front wall
 
                
 -- Front wall
 
@@ -360,7 +360,7 @@ if detail > LOW then
 end
 
 -- More ground to the right
 end
 
 -- More ground to the right
--- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                
 -- Ground under house
 
                
 -- Ground under house
 
@@ -625,7 +625,7 @@ DrawTilemap({
        0,      1,      1,      1,      1,      1,      1,      -1,     -1,     -1})
 
 -- Right foreground tower block
        0,      1,      1,      1,      1,      1,      1,      -1,     -1,     -1})
 
 -- Right foreground tower block
--- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                
 -- Front
 
                
 -- Front
 
@@ -690,7 +690,7 @@ DrawTilemap({
        3,      3,      3,      3,      3})
 
 -- Right end tower block
        3,      3,      3,      3,      3})
 
 -- Right end tower block
--- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 -- Front
 
 
 -- Front
 
@@ -753,7 +753,7 @@ DrawTilemap({
        3,      3,      3,      3,      3})
 
 -- Background
        3,      3,      3,      3,      3})
 
 -- Background
--- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 ResetTransform()
 Translate(-0.3, -0.3, -35)
 
 ResetTransform()
 Translate(-0.3, -0.3, -35)
@@ -768,7 +768,7 @@ DrawTile({
 })
 
 -- Trees
 })
 
 -- Trees
--- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 SetTexture("Trees")
 
 
 SetTexture("Trees")
 
index 13be9a754ef7fd7990c8146ae1b437ad9a0cd795..de65603a99c3b37ebec77d24b5f1f38805b1bad9 100644 (file)
@@ -1,6 +1,6 @@
 
 -- Example Yoink Configuration File
 
 -- Example Yoink Configuration File
--- vim: ft=lua ts=4
+-- ex:ft=lua ts=4 sw=4 tw=75
 
 print "loading default settings..."
 
 
 print "loading default settings..."
 
@@ -54,7 +54,7 @@ resizable             = true
 -- videomode to override the default resolution.  If the fullscreen option
 -- is false, videomode will determine the size of the window.
 
 -- videomode to override the default resolution.  If the fullscreen option
 -- is false, videomode will determine the size of the window.
 
-videomode              = {800, 600}
+--videomode            = {800, 600}
 
 -- Set this to make the cursor remain visible as you mouse over the view of
 -- the game.
 
 -- Set this to make the cursor remain visible as you mouse over the view of
 -- the game.
index d3df203b9ab2d1c8122da0c592578594ee33a3ab..57af5e932c0f3ec6283d62ad834bc81ca5e14342 100644 (file)
@@ -1,29 +1,9 @@
 .\"
 .\"
-.\" Copyright (c) 2009, Charles McGarvey
+.\" Copyright (c) 2009-2010, Charles McGarvey
 .\" All rights reserved.
 .\" 
 .\" All rights reserved.
 .\" 
-.\" Redistribution  and  use  in  source  and binary forms, with or without
-.\" modification,  are permitted provided that the following conditions are
-.\" met:
-.\" 
-.\" 1. Redistributions  of  source  code  must  retain  the above copyright
-.\"    notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions  in  binary  form must reproduce the above copyright
-.\"    notice,  this list of conditions and the following disclaimer in the
-.\"    documentation and/or other materials provided with the distribution.
-.\" 
-.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
-.\" IS"  AND  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-.\" TO,  THE  IMPLIED  WARRANTIES  OF  MERCHANTABILITY  AND  FITNESS  FOR A
-.\" PARTICULAR  PURPOSE  ARE  DISCLAIMED.  IN  NO EVENT SHALL THE COPYRIGHT
-.\" OWNER  OR  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-.\" SPECIAL,  EXEMPLARY,  OR  CONSEQUENTIAL  DAMAGES  (INCLUDING,  BUT  NOT
-.\" LIMITED  TO,  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-.\" DATA,  OR  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-.\" THEORY  OF  LIABILITY,  WHETHER  IN CONTRACT, STRICT LIABILITY, OR TORT
-.\" (INCLUDING  NEGLIGENCE  OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-.\" OF  THIS  SOFTWARE,  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-.\" 
+.\" Distributable under the terms and conditions of the 2-clause BSD
+.\" license; see the file COPYING for a complete text of the license.
 .\"
 .TH YOINK 6 "July 24, 2009"
 .SH NAME
 .\"
 .TH YOINK 6 "July 24, 2009"
 .SH NAME
index 477997037230b125635f28cf4980d8ffa3d3cc3a..2a3d03a5922e62a6ef68e4cf106dd3a0e8c1c99b 100644 (file)
@@ -1,30 +1,13 @@
 
 
-/*******************************************************************************
-
- Copyright (c) 2009, Charles McGarvey
- All rights reserved.
- Redistribution   and   use  in  source  and  binary  forms,  with  or  without
- modification, are permitted provided that the following conditions are met:
-   * Redistributions  of  source  code  must retain the above copyright notice,
-     this list of conditions and the following disclaimer.
-   * Redistributions  in binary form must reproduce the above copyright notice,
-     this  list of conditions and the following disclaimer in the documentation
-     and/or other materials provided with the distribution.
- THIS  SOFTWARE  IS  PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND  ANY  EXPRESS  OR  IMPLIED  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED.  IN  NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- FOR  ANY  DIRECT,  INDIRECT,  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES  (INCLUDING,  BUT  NOT  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- SERVICES;  LOSS  OF  USE,  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- CAUSED  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-*******************************************************************************/
+/*]  Copyright (c) 2009-2010, Charles McGarvey  [**************************
+**]  All rights reserved.
+*
+* vi:ts=4 sw=4 tw=75
+*
+* Distributable under the terms and conditions of the 2-clause BSD license;
+* see the file COPYING for a complete text of the license.
+*
+**************************************************************************/
 
 #include <map>
 #include <vector>
 
 #include <map>
 #include <vector>
 
 
 /**
 
 
 /**
- * The collection of nested animation classes.  The animation implementation
- * consists of an Impl class which is allocated and initialized with the
- * interface object.  This class contains the specific fields which are required
- * to run a single instance of an animation.  The sequence data is loaded in a
- * different class which can be shared amongst multiple animation implementation
- * instances.
+ * The collection of nested animation classes.  The animation
+ * implementation consists of an Impl class which is allocated and
+ * initialized with the interface object.  This class contains the specific
+ * fields which are required to run a single instance of an animation.  The
+ * sequence data is loaded in a different class which can be shared amongst
+ * multiple animation implementation instances.
  */
 
 class Animation::Impl
  */
 
 class Animation::Impl
@@ -50,9 +33,9 @@ class Animation::Impl
 public:
 
        /**
 public:
 
        /**
-        * Contains "global" animation data for the various animations which get
-        * loaded.  This is a mippleton, so it will be shared amongst any animation
-        * which wants to use these loaded sequences.
+        * Contains "global" animation data for the various animations which
+        * get loaded.  This is a mippleton, so it will be shared amongst any
+        * animation which wants to use these loaded sequences.
         */
 
        class Data : public Mf::Manager<Data>
         */
 
        class Data : public Mf::Manager<Data>
@@ -60,9 +43,10 @@ public:
        public:
 
                /**
        public:
 
                /**
-                * A frame of an animation sequence.  A frame is merely an index which
-                * presumably represents a "slide" or tile which should be displayed,
-                * and the duration that is how long the slide will be shown.
+                * A frame of an animation sequence.  A frame is merely an index
+                * which presumably represents a "slide" or tile which should be
+                * displayed, and the duration that is how long the slide will be
+                * shown.
                 */
 
                class Frame
                 */
 
                class Frame
@@ -73,8 +57,9 @@ public:
                        Mf::Scalar      mDuration;                              ///< Frame duration.
 
                        /**
                        Mf::Scalar      mDuration;                              ///< Frame duration.
 
                        /**
-                        * Construction is initialization.  The frame data is loaded from a
-                        * frame map which is probably loaded within an animation file.
+                        * Construction is initialization.  The frame data is loaded
+                        * from a frame map which is probably loaded within an
+                        * animation file.
                         */
                
                        Frame(Mf::Script& script, Mf::Script::Slot table) :
                         */
                
                        Frame(Mf::Script& script, Mf::Script::Slot table) :
@@ -93,24 +78,24 @@ public:
 
 
                /**
 
 
                /**
-                * A sequence is just a few attributes and a list of frames in the order
-                * that they should be played.
+                * A sequence is just a few attributes and a list of frames in the
+                * order that they should be played.
                 */
 
                class Sequence
                {
                public:
 
                 */
 
                class Sequence
                {
                public:
 
-                       std::vector<Frame>      mFrames;                ///< List of frames.
-                       Mf::Scalar                      mDelay;                 ///< Scale frame durations.
-                       bool                            mLoop;                  ///< Does the sequence repeat?
-                       std::string                     mNext;                  ///< Next sequence name.
+                       std::vector<Frame>      mFrames;        ///< List of frames.
+                       Mf::Scalar                      mDelay;         ///< Scale frame durations.
+                       bool                            mLoop;          ///< Does the sequence repeat?
+                       std::string                     mNext;          ///< Next sequence name.
 
                        /**
 
                        /**
-                        * Construction is initialization.  The constructor loads sequence
-                        * data from the sequence map, presumably loaded from an animation
-                        * file.  The rest of the loading takes place in the frame's
-                        * constructor which loads each individual frame.
+                        * Construction is initialization.  The constructor loads
+                        * sequence data from the sequence map, presumably loaded from
+                        * an animation file.  The rest of the loading takes place in
+                        * the frame's constructor which loads each individual frame.
                         */
 
                        Sequence(Mf::Script& script, Mf::Script::Slot table) :
                         */
 
                        Sequence(Mf::Script& script, Mf::Script::Slot table) :
@@ -143,8 +128,11 @@ public:
                                                script.push(index);
                                                frameTable.pushField();
 
                                                script.push(index);
                                                frameTable.pushField();
 
-                                               if (top.isTable()) mFrames.push_back(Frame(script, top));
-                                               else               break;
+                                               if (top.isTable())
+                                               {
+                                                       mFrames.push_back(Frame(script, top));
+                                               }
+                                               else break;
 
                                                ++index;
                                        }
 
                                                ++index;
                                        }
@@ -155,9 +143,9 @@ public:
 
 
                /**
 
 
                /**
-                * Starts loading a file with animation data.  Such a file is formatted
-                * as a map of named sequences.   The sequence constructor loads each
-                * individual sequence.
+                * Starts loading a file with animation data.  Such a file is
+                * formatted as a map of named sequences.   The sequence
+                * constructor loads each individual sequence.
                 */
 
                void init(const std::string& name)
                 */
 
                void init(const std::string& name)
@@ -185,8 +173,8 @@ public:
                        std::string nameStr;
                        name.get(nameStr);
 
                        std::string nameStr;
                        name.get(nameStr);
 
-                       mSequences.insert(std::pair<std::string,Sequence>(nameStr,
-                                               Sequence(script, table)));
+                       mSequences.insert(std::make_pair(nameStr,
+                                                                                        Sequence(script, table)));
 
                        return 0;
                }
 
                        return 0;
                }
@@ -195,7 +183,8 @@ public:
                void importAnimationBindings(Mf::Script& script)
                {
                        script.importFunction("DefineSequence",
                void importAnimationBindings(Mf::Script& script)
                {
                        script.importFunction("DefineSequence",
-                                       boost::bind(&Data::defineSequence, this, _1));
+                                                                 boost::bind(&Data::defineSequence,
+                                                                                         this, _1));
 
                        script.push(1); script.set("ATTACK");
                        script.push(2); script.set("CHARGE");
 
                        script.push(1); script.set("ATTACK");
                        script.push(2); script.set("CHARGE");
@@ -207,7 +196,7 @@ public:
                }
 
 
                }
 
 
-               std::map<std::string,Sequence> mSequences;              ///< List of sequences.
+               std::map<std::string,Sequence> mSequences;      ///< List of sequences.
        };
 
 
        };
 
 
@@ -225,9 +214,9 @@ public:
 
 
        /**
 
 
        /**
-        * Sets up the animation classes to "play" a named sequence.  If another
-        * sequence was active, it will be replaced.  Future updates will progress
-        * the new sequence.
+        * Sets up the animation classes to "play" a named sequence.  If
+        * another sequence was active, it will be replaced.  Future updates
+        * will progress the new sequence.
         */
 
        void startSequence(const std::string& name)
         */
 
        void startSequence(const std::string& name)
@@ -243,7 +232,7 @@ public:
                        mFrameIndex = mCurrentSequence->mFrames[0].mIndex;
                        mTimeAccum = 0.0;
                        mFrameDuration = mCurrentSequence->mDelay *
                        mFrameIndex = mCurrentSequence->mFrames[0].mIndex;
                        mTimeAccum = 0.0;
                        mFrameDuration = mCurrentSequence->mDelay *
-                               mCurrentSequence->mFrames[0].mDuration;
+                                                        mCurrentSequence->mFrames[0].mDuration;
                }
        }
 
                }
        }
 
@@ -251,42 +240,41 @@ public:
         * Updates or progresses the animation sequence.  If the time interval
         * surpasses the duration of the current frame, a new frame becomes the
         * current frame.  If the last frame of a sequence expires, the active
         * Updates or progresses the animation sequence.  If the time interval
         * surpasses the duration of the current frame, a new frame becomes the
         * current frame.  If the last frame of a sequence expires, the active
-        * sequence will switch automatically to the designated "next" sequence, or
-        * if none is specified but the sequence is set to loop, the first frame of
-        * the sequence will become the current frame, and the animation essentially
-        * starts over again.
+        * sequence will switch automatically to the designated "next"
+        * sequence, or if none is specified but the sequence is set to loop,
+        * the first frame of the sequence will become the current frame, and
+        * the animation essentially starts over again.
         */
 
        void update(Mf::Scalar t, Mf::Scalar dt)
        {
         */
 
        void update(Mf::Scalar t, Mf::Scalar dt)
        {
-               if (mCurrentSequence)
-               {
-                       mTimeAccum += dt;
+               if (!mCurrentSequence) return;
+
+               mTimeAccum += dt;
 
 
-                       if (mTimeAccum >= mFrameDuration)
+               if (mTimeAccum >= mFrameDuration)
+               {
+                       if (++mFrameCounter >= mCurrentSequence->mFrames.size())
                        {
                        {
-                               if (++mFrameCounter >= mCurrentSequence->mFrames.size())
+                               if (!mCurrentSequence->mNext.empty())
                                {
                                {
-                                       if (!mCurrentSequence->mNext.empty())
-                                       {
-                                               startSequence(mCurrentSequence->mNext);
-                                       }
-                                       else if (mCurrentSequence->mLoop)
-                                       {
-                                               mFrameCounter = 0;
-                                       }
-                                       else
-                                       {
-                                               mFrameCounter--;
-                                               mCurrentSequence = 0;
-                                       }
+                                       startSequence(mCurrentSequence->mNext);
+                               }
+                               else if (mCurrentSequence->mLoop)
+                               {
+                                       mFrameCounter = 0;
+                               }
+                               else
+                               {
+                                       mFrameCounter--;
+                                       mCurrentSequence = 0;
                                }
                                }
-
-                               mFrameIndex = mCurrentSequence->mFrames[mFrameCounter].mIndex;
-                               mTimeAccum = mFrameDuration - mTimeAccum;
-                               mFrameDuration = mCurrentSequence->mDelay *
-                                       mCurrentSequence->mFrames[mFrameCounter].mDuration;
                        }
                        }
+
+                       mFrameIndex = mCurrentSequence->mFrames[mFrameCounter].mIndex;
+                       mTimeAccum = mFrameDuration - mTimeAccum;
+                       mFrameDuration = mCurrentSequence->mDelay *
+                               mCurrentSequence->mFrames[mFrameCounter].mDuration;
                }
        }
 
                }
        }
 
@@ -330,8 +318,8 @@ unsigned Animation::getFrame() const
 
 
 /**
 
 
 /**
- * Specialized search location for animation files.  They can be found in the
- * "animations" subdirectory of any of the searched directories.
+ * Specialized search location for animation files.  They can be found in
+ * the "animations" subdirectory of any of the search directories.
  */
 
 std::string Animation::getPath(const std::string& name)
  */
 
 std::string Animation::getPath(const std::string& name)
@@ -339,6 +327,3 @@ std::string Animation::getPath(const std::string& name)
        return Mf::Resource::getPath("animations/" + name + ".lua");
 }
 
        return Mf::Resource::getPath("animations/" + name + ".lua");
 }
 
-
-/** vim: set ts=4 sw=4 tw=80: *************************************************/
-
index 5cfd2604a32966aec745390251ba97ba6609e907..ac00679809b7da11931aef0d29e393fe1b59417e 100644 (file)
@@ -1,30 +1,13 @@
 
 
-/*******************************************************************************
-
- Copyright (c) 2009, Charles McGarvey
- All rights reserved.
- Redistribution   and   use  in  source  and  binary  forms,  with  or  without
- modification, are permitted provided that the following conditions are met:
-   * Redistributions  of  source  code  must retain the above copyright notice,
-     this list of conditions and the following disclaimer.
-   * Redistributions  in binary form must reproduce the above copyright notice,
-     this  list of conditions and the following disclaimer in the documentation
-     and/or other materials provided with the distribution.
- THIS  SOFTWARE  IS  PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND  ANY  EXPRESS  OR  IMPLIED  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED.  IN  NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- FOR  ANY  DIRECT,  INDIRECT,  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES  (INCLUDING,  BUT  NOT  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- SERVICES;  LOSS  OF  USE,  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- CAUSED  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-*******************************************************************************/
+/*]  Copyright (c) 2009-2010, Charles McGarvey  [**************************
+**]  All rights reserved.
+*
+* vi:ts=4 sw=4 tw=75
+*
+* Distributable under the terms and conditions of the 2-clause BSD license;
+* see the file COPYING for a complete text of the license.
+*
+**************************************************************************/
 
 #ifndef _ANIMATION_HH_
 #define _ANIMATION_HH_
 
 #ifndef _ANIMATION_HH_
 #define _ANIMATION_HH_
@@ -46,11 +29,11 @@ class Animation;
 typedef boost::shared_ptr<Animation> AnimationP;
 
 /**
 typedef boost::shared_ptr<Animation> AnimationP;
 
 /**
- * A class to manage frame-based animation.  Animation sequences can be loaded
- * from file, then named sequences are started.  The animation is updated
- * periodically (each update cycle), and the correct current frame is
- * determined.  This class is generic enough that a frame can mean just about
- * anything to whatever drawing context is used to render the frame.
+ * A class to manage frame-based animation.  Animation sequences can be
+ * loaded from file, then named sequences are started.  The animation is
+ * updated periodically (each update cycle), and the correct current frame
+ * is determined.  This class is generic enough that a frame can mean just
+ * about anything to whatever drawing context is used to render the frame.
  */
 
 class Animation : public Mf::Resource
  */
 
 class Animation : public Mf::Resource
@@ -79,5 +62,3 @@ public:
 
 #endif // _ANIMATION_HH_
 
 
 #endif // _ANIMATION_HH_
 
-/** vim: set ts=4 sw=4 tw=80: *************************************************/
-
index 2290e3c2797a5d1023f63ddc4335921c04dfc602..6a7c69883ea6ddeeda7f8ec77f9c806f0b76c080 100644 (file)
@@ -1,30 +1,13 @@
 
 
-/*******************************************************************************
-
- Copyright (c) 2009, Charles McGarvey
- All rights reserved.
- Redistribution   and   use  in  source  and  binary  forms,  with  or  without
- modification, are permitted provided that the following conditions are met:
-   * Redistributions  of  source  code  must retain the above copyright notice,
-     this list of conditions and the following disclaimer.
-   * Redistributions  in binary form must reproduce the above copyright notice,
-     this  list of conditions and the following disclaimer in the documentation
-     and/or other materials provided with the distribution.
- THIS  SOFTWARE  IS  PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND  ANY  EXPRESS  OR  IMPLIED  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED.  IN  NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- FOR  ANY  DIRECT,  INDIRECT,  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES  (INCLUDING,  BUT  NOT  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- SERVICES;  LOSS  OF  USE,  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- CAUSED  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-*******************************************************************************/
+/*]  Copyright (c) 2009-2010, Charles McGarvey  [**************************
+**]  All rights reserved.
+*
+* vi:ts=4 sw=4 tw=75
+*
+* Distributable under the terms and conditions of the 2-clause BSD license;
+* see the file COPYING for a complete text of the license.
+*
+**************************************************************************/
 
 #include <iostream>
 
 
 #include <iostream>
 
@@ -47,7 +30,8 @@ public:
 
                // spring:
                //mState.force += -15.0 * x - 1.5 * mState.velocity;
 
                // spring:
                //mState.force += -15.0 * x - 1.5 * mState.velocity;
-               force = SCALAR(-10.0) * (mag - d) * (x / mag) - 2.0 * state.velocity;
+               force = SCALAR(-10.0) * (mag - d) * (x / mag) -
+                               SCALAR(2.0) * state.velocity;
 
                return force;
        }
 
                return force;
        }
@@ -119,7 +103,6 @@ void Character::update(Mf::Scalar t, Mf::Scalar dt)
 
 void Character::draw(Mf::Scalar alpha) const
 {
 
 void Character::draw(Mf::Scalar alpha) const
 {
-       //Mf::Vector2 position = cml::lerp(mPrevState.position, mState.position, alpha);
        Mf::State2 state = getState(alpha);
        Mf::Vector2 position = state.position;
 
        Mf::State2 state = getState(alpha);
        Mf::Vector2 position = state.position;
 
@@ -275,6 +258,3 @@ void Character::setPosition(Mf::Vector2 position)
        mState.position = position;
 }
 
        mState.position = position;
 }
 
-
-/** vim: set ts=4 sw=4 tw=80: *************************************************/
-
index 82804babf16b32b37ae4db339229398ef3a8983b..4140d17249e2b8d822a31c8e8893e09737ef78b4 100644 (file)
@@ -1,34 +1,19 @@
 
 
-/*******************************************************************************
-
- Copyright (c) 2009, Charles McGarvey
- All rights reserved.
- Redistribution   and   use  in  source  and  binary  forms,  with  or  without
- modification, are permitted provided that the following conditions are met:
-   * Redistributions  of  source  code  must retain the above copyright notice,
-     this list of conditions and the following disclaimer.
-   * Redistributions  in binary form must reproduce the above copyright notice,
-     this  list of conditions and the following disclaimer in the documentation
-     and/or other materials provided with the distribution.
- THIS  SOFTWARE  IS  PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND  ANY  EXPRESS  OR  IMPLIED  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED.  IN  NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- FOR  ANY  DIRECT,  INDIRECT,  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES  (INCLUDING,  BUT  NOT  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- SERVICES;  LOSS  OF  USE,  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- CAUSED  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-*******************************************************************************/
+/*]  Copyright (c) 2009-2010, Charles McGarvey  [**************************
+**]  All rights reserved.
+*
+* vi:ts=4 sw=4 tw=75
+*
+* Distributable under the terms and conditions of the 2-clause BSD license;
+* see the file COPYING for a complete text of the license.
+*
+**************************************************************************/
 
 #ifndef _CHARACTER_HH_
 #define _CHARACTER_HH_
 
 
 #ifndef _CHARACTER_HH_
 #define _CHARACTER_HH_
 
+#include <string>
+
 #include <boost/shared_ptr.hpp>
 
 #include <Moof/Aabb.hh>
 #include <boost/shared_ptr.hpp>
 
 #include <Moof/Aabb.hh>
@@ -41,7 +26,6 @@
 #include "Animation.hh"
 
 
 #include "Animation.hh"
 
 
-
 class Character;
 typedef boost::shared_ptr<Character> CharacterP;
 
 class Character;
 typedef boost::shared_ptr<Character> CharacterP;
 
@@ -74,5 +58,3 @@ public:
 
 #endif // _CHARACTER_HH_
 
 
 #endif // _CHARACTER_HH_
 
-/** vim: set ts=4 sw=4 tw=80: *************************************************/
-
index 8d0a8d9a1a9cedb1265d2a91385e411f08184541..d027956f046b597819218cb72f1d74b04f6be51d 100644 (file)
@@ -1,30 +1,13 @@
 
 
-/*******************************************************************************
-
- Copyright (c) 2009, Charles McGarvey
- All rights reserved.
- Redistribution   and   use  in  source  and  binary  forms,  with  or  without
- modification, are permitted provided that the following conditions are met:
-   * Redistributions  of  source  code  must retain the above copyright notice,
-     this list of conditions and the following disclaimer.
-   * Redistributions  in binary form must reproduce the above copyright notice,
-     this  list of conditions and the following disclaimer in the documentation
-     and/or other materials provided with the distribution.
- THIS  SOFTWARE  IS  PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND  ANY  EXPRESS  OR  IMPLIED  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED.  IN  NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- FOR  ANY  DIRECT,  INDIRECT,  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES  (INCLUDING,  BUT  NOT  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- SERVICES;  LOSS  OF  USE,  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- CAUSED  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-*******************************************************************************/
+/*]  Copyright (c) 2009-2010, Charles McGarvey  [**************************
+**]  All rights reserved.
+*
+* vi:ts=4 sw=4 tw=75
+*
+* Distributable under the terms and conditions of the 2-clause BSD license;
+* see the file COPYING for a complete text of the license.
+*
+**************************************************************************/
 
 #include <sstream>
 
 
 #include <sstream>
 
@@ -71,7 +54,7 @@ std::string getErrorString(const Mf::Error& error)
                        return str;
 
                case Mf::Error::SDL_VIDEOMODE:
                        return str;
 
                case Mf::Error::SDL_VIDEOMODE:
-                       str += "An error occurred while trying to set up the video mode.";
+                       str += "An error occurred while trying to set up the graphics.";
                        return str;
 
                case Mf::Error::UNKNOWN_AUDIO_FORMAT:
                        return str;
 
                case Mf::Error::UNKNOWN_AUDIO_FORMAT:
@@ -92,6 +75,3 @@ std::string getErrorString(const Mf::Error& error)
        return stream.str();
 }
 
        return stream.str();
 }
 
-
-/** vim: set ts=4 sw=4 tw=80: *************************************************/
-
index 8132ac4738aa2d8fbbc3b28ed9f9e11ddb89c53f..d1201e8314ecaa3189dff666d5fd75a631263e1b 100644 (file)
@@ -1,30 +1,13 @@
 
 
-/*******************************************************************************
-
- Copyright (c) 2009, Charles McGarvey
- All rights reserved.
- Redistribution   and   use  in  source  and  binary  forms,  with  or  without
- modification, are permitted provided that the following conditions are met:
-   * Redistributions  of  source  code  must retain the above copyright notice,
-     this list of conditions and the following disclaimer.
-   * Redistributions  in binary form must reproduce the above copyright notice,
-     this  list of conditions and the following disclaimer in the documentation
-     and/or other materials provided with the distribution.
- THIS  SOFTWARE  IS  PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND  ANY  EXPRESS  OR  IMPLIED  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED.  IN  NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- FOR  ANY  DIRECT,  INDIRECT,  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES  (INCLUDING,  BUT  NOT  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- SERVICES;  LOSS  OF  USE,  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- CAUSED  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-*******************************************************************************/
+/*]  Copyright (c) 2009-2010, Charles McGarvey  [**************************
+**]  All rights reserved.
+*
+* vi:ts=4 sw=4 tw=75
+*
+* Distributable under the terms and conditions of the 2-clause BSD license;
+* see the file COPYING for a complete text of the license.
+*
+**************************************************************************/
 
 #ifndef _ERRORHANDLER_HH_
 #define _ERRORHANDLER_HH_
 
 #ifndef _ERRORHANDLER_HH_
 #define _ERRORHANDLER_HH_
@@ -37,5 +20,3 @@ std::string getErrorString(const Mf::Error& error);
 
 #endif // _ERRORHANDLER_HH_
 
 
 #endif // _ERRORHANDLER_HH_
 
-/** vim: set ts=4 sw=4 tw=80: *************************************************/
-
index 6db27b16bb8b34011f9a6829c3ea81eca711d81f..3a0ea09eba80e44fb81dda883975bf5bd1c66f43 100644 (file)
@@ -1,30 +1,13 @@
 
 
-/*******************************************************************************
-
- Copyright (c) 2009, Charles McGarvey
- All rights reserved.
- Redistribution   and   use  in  source  and  binary  forms,  with  or  without
- modification, are permitted provided that the following conditions are met:
-   * Redistributions  of  source  code  must retain the above copyright notice,
-     this list of conditions and the following disclaimer.
-   * Redistributions  in binary form must reproduce the above copyright notice,
-     this  list of conditions and the following disclaimer in the documentation
-     and/or other materials provided with the distribution.
- THIS  SOFTWARE  IS  PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND  ANY  EXPRESS  OR  IMPLIED  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED.  IN  NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- FOR  ANY  DIRECT,  INDIRECT,  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES  (INCLUDING,  BUT  NOT  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- SERVICES;  LOSS  OF  USE,  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- CAUSED  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-*******************************************************************************/
+/*]  Copyright (c) 2009-2010, Charles McGarvey  [**************************
+**]  All rights reserved.
+*
+* vi:ts=4 sw=4 tw=75
+*
+* Distributable under the terms and conditions of the 2-clause BSD license;
+* see the file COPYING for a complete text of the license.
+*
+**************************************************************************/
 
 #include <Moof/Core.hh>
 #include <Moof/Error.hh>
 
 #include <Moof/Core.hh>
 #include <Moof/Error.hh>
@@ -143,7 +126,8 @@ void GameLayer::pushedOntoEngine()
        mSphere.point.set(22, 5);
        mSphere.radius = 2;
 
        mSphere.point.set(22, 5);
        mSphere.radius = 2;
 
-       mRayTimer.init(boost::bind(&GameLayer::rayTimer, this), 1.0, Mf::Timer::REPEAT);
+       mRayTimer.init(boost::bind(&GameLayer::rayTimer, this),
+                                  1.0, Mf::Timer::REPEAT);
 }
 
 
 }
 
 
@@ -154,9 +138,9 @@ void GameLayer::update(Mf::Scalar t, Mf::Scalar dt)
 
        mState.scene->checkForCollision(*mState.heroine);
 
 
        mState.scene->checkForCollision(*mState.heroine);
 
-       mState.camera.setPosition(Mf::Vector3(-mState.heroine->getState().position[0],
-                               -mState.heroine->getState().position[1], -8));
-       //mState.camera.lookAt(Mf::promote(mState.heroine->getState().position));
+       Mf::Vector3 camPosition(-mState.heroine->getState().position[0],
+                                                       -mState.heroine->getState().position[1], -8);
+       mState.camera.setPosition(camPosition);
 
        mRay.point = mState.heroine->getState().position;
 }
 
        mRay.point = mState.heroine->getState().position;
 }
@@ -285,7 +269,8 @@ bool GameLayer::handleEvent(const Mf::Event& event)
 
 void GameLayer::setProjection()
 {
 
 void GameLayer::setProjection()
 {
-       ASSERT(Mf::video && "no current video context from which to get dimensions");
+       ASSERT(Mf::video &&
+                  "no current video context from which to get dimensions");
        setProjection(Mf::video->getWidth(), Mf::video->getHeight());
 }
 
        setProjection(Mf::video->getWidth(), Mf::video->getHeight());
 }
 
@@ -294,6 +279,3 @@ void GameLayer::setProjection(Mf::Scalar width, Mf::Scalar height)
        mState.camera.setProjection(cml::rad(45.0), width / height, 1.0, 200.0);
 }
 
        mState.camera.setProjection(cml::rad(45.0), width / height, 1.0, 200.0);
 }
 
-
-/** vim: set ts=4 sw=4 tw=80: *************************************************/
-
index 53613617b513aa7e95ef993fe376b21ec1bf335a..885a49daa3392d07de25369573c9f5112b3a005b 100644 (file)
@@ -1,30 +1,13 @@
 
 
-/*******************************************************************************
-
- Copyright (c) 2009, Charles McGarvey
- All rights reserved.
- Redistribution   and   use  in  source  and  binary  forms,  with  or  without
- modification, are permitted provided that the following conditions are met:
-   * Redistributions  of  source  code  must retain the above copyright notice,
-     this list of conditions and the following disclaimer.
-   * Redistributions  in binary form must reproduce the above copyright notice,
-     this  list of conditions and the following disclaimer in the documentation
-     and/or other materials provided with the distribution.
- THIS  SOFTWARE  IS  PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND  ANY  EXPRESS  OR  IMPLIED  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED.  IN  NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- FOR  ANY  DIRECT,  INDIRECT,  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES  (INCLUDING,  BUT  NOT  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- SERVICES;  LOSS  OF  USE,  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- CAUSED  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-*******************************************************************************/
+/*]  Copyright (c) 2009-2010, Charles McGarvey  [**************************
+**]  All rights reserved.
+*
+* vi:ts=4 sw=4 tw=75
+*
+* Distributable under the terms and conditions of the 2-clause BSD license;
+* see the file COPYING for a complete text of the license.
+*
+**************************************************************************/
 
 #ifndef _GAMELAYER_HH_
 #define _GAMELAYER_HH_
 
 #ifndef _GAMELAYER_HH_
 #define _GAMELAYER_HH_
 #include <Moof/Math.hh>
 #include <Moof/Sound.hh>
 
 #include <Moof/Math.hh>
 #include <Moof/Sound.hh>
 
-#include <Moof/Line.hh>
+#include <Moof/Line.hh>                // TODO
 #include <Moof/Plane.hh>
 #include <Moof/Ray.hh>
 #include <Moof/Sphere.hh>
 #include <Moof/Timer.hh>
 
 #include <Moof/Plane.hh>
 #include <Moof/Ray.hh>
 #include <Moof/Sphere.hh>
 #include <Moof/Timer.hh>
 
-#include "Hud.hh"
 #include "GameState.hh"
 #include "GameState.hh"
+#include "Hud.hh"
 
 
 class GameLayer;
 
 
 class GameLayer;
@@ -103,5 +86,3 @@ private:
 
 #endif // _GAMELAYER_HH_
 
 
 #endif // _GAMELAYER_HH_
 
-/** vim: set ts=4 sw=4 tw=80: *************************************************/
-
index bc59eaff30cd2b1c168a8918a5a76cf0d6c96590..9583ff238af0aa1c470b23afb6d48f51a37ef6e6 100644 (file)
@@ -1,30 +1,13 @@
 
 
-/*******************************************************************************
-
- Copyright (c) 2009, Charles McGarvey
- All rights reserved.
- Redistribution   and   use  in  source  and  binary  forms,  with  or  without
- modification, are permitted provided that the following conditions are met:
-   * Redistributions  of  source  code  must retain the above copyright notice,
-     this list of conditions and the following disclaimer.
-   * Redistributions  in binary form must reproduce the above copyright notice,
-     this  list of conditions and the following disclaimer in the documentation
-     and/or other materials provided with the distribution.
- THIS  SOFTWARE  IS  PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND  ANY  EXPRESS  OR  IMPLIED  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED.  IN  NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- FOR  ANY  DIRECT,  INDIRECT,  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES  (INCLUDING,  BUT  NOT  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- SERVICES;  LOSS  OF  USE,  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- CAUSED  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-*******************************************************************************/
+/*]  Copyright (c) 2009-2010, Charles McGarvey  [**************************
+**]  All rights reserved.
+*
+* vi:ts=4 sw=4 tw=75
+*
+* Distributable under the terms and conditions of the 2-clause BSD license;
+* see the file COPYING for a complete text of the license.
+*
+**************************************************************************/
 
 #ifndef _GAMESTATE_HH_
 #define _GAMESTATE_HH_
 
 #ifndef _GAMESTATE_HH_
 #define _GAMESTATE_HH_
@@ -34,6 +17,9 @@
  * The data.
  */
 
  * The data.
  */
 
+#include <string>
+#include <vector>
+
 #include <boost/shared_ptr.hpp>
 
 #include <Moof/Camera.hh>
 #include <boost/shared_ptr.hpp>
 
 #include <Moof/Camera.hh>
@@ -50,16 +36,14 @@ struct GameState
        Mf::Script                                      script;
        std::vector<std::string>        sceneList;
 
        Mf::Script                                      script;
        std::vector<std::string>        sceneList;
 
-       HeroineP                heroine;
-       SceneP                  scene;
+       HeroineP                                        heroine;
+       SceneP                                          scene;
 
 
-       Mf::Lerp                interp;
+       Mf::Lerp                                        interp;
 
 
-       Mf::Camera              camera;
+       Mf::Camera                                      camera;
 };
 
 
 #endif // _GAMESTATE_HH_
 
 };
 
 
 #endif // _GAMESTATE_HH_
 
-/** vim: set ts=4 sw=4 tw=80: *************************************************/
-
index a70b798e92071e6b34fd495f6b2c2219d6543b3b..c1c9f076d2b00eb9b6c0db09e61596b6e03df7de 100644 (file)
@@ -1,30 +1,13 @@
 
 
-/*******************************************************************************
-
- Copyright (c) 2009, Charles McGarvey
- All rights reserved.
- Redistribution   and   use  in  source  and  binary  forms,  with  or  without
- modification, are permitted provided that the following conditions are met:
-   * Redistributions  of  source  code  must retain the above copyright notice,
-     this list of conditions and the following disclaimer.
-   * Redistributions  in binary form must reproduce the above copyright notice,
-     this  list of conditions and the following disclaimer in the documentation
-     and/or other materials provided with the distribution.
- THIS  SOFTWARE  IS  PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND  ANY  EXPRESS  OR  IMPLIED  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED.  IN  NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- FOR  ANY  DIRECT,  INDIRECT,  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES  (INCLUDING,  BUT  NOT  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- SERVICES;  LOSS  OF  USE,  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- CAUSED  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-*******************************************************************************/
+/*]  Copyright (c) 2009-2010, Charles McGarvey  [**************************
+**]  All rights reserved.
+*
+* vi:ts=4 sw=4 tw=75
+*
+* Distributable under the terms and conditions of the 2-clause BSD license;
+* see the file COPYING for a complete text of the license.
+*
+**************************************************************************/
 
 #include <Moof/Sound.hh>
 
 
 #include <Moof/Sound.hh>
 
@@ -105,6 +88,3 @@ bool Heroine::handleEvent(const Mf::Event& event)
        return false;
 }
 
        return false;
 }
 
-
-/** vim: set ts=4 sw=4 tw=80: *************************************************/
-
index ad8cd9ab35c9c2281b3bbdfafc21e5fc867af7bb..8ed8f661118877703c3fe3846e52998773965157 100644 (file)
@@ -1,30 +1,13 @@
 
 
-/*******************************************************************************
-
- Copyright (c) 2009, Charles McGarvey
- All rights reserved.
- Redistribution   and   use  in  source  and  binary  forms,  with  or  without
- modification, are permitted provided that the following conditions are met:
-   * Redistributions  of  source  code  must retain the above copyright notice,
-     this list of conditions and the following disclaimer.
-   * Redistributions  in binary form must reproduce the above copyright notice,
-     this  list of conditions and the following disclaimer in the documentation
-     and/or other materials provided with the distribution.
- THIS  SOFTWARE  IS  PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND  ANY  EXPRESS  OR  IMPLIED  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED.  IN  NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- FOR  ANY  DIRECT,  INDIRECT,  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES  (INCLUDING,  BUT  NOT  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- SERVICES;  LOSS  OF  USE,  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- CAUSED  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-*******************************************************************************/
+/*]  Copyright (c) 2009-2010, Charles McGarvey  [**************************
+**]  All rights reserved.
+*
+* vi:ts=4 sw=4 tw=75
+*
+* Distributable under the terms and conditions of the 2-clause BSD license;
+* see the file COPYING for a complete text of the license.
+*
+**************************************************************************/
 
 #ifndef _HEROINE_HH_
 #define _HEROINE_HH_
 
 #ifndef _HEROINE_HH_
 #define _HEROINE_HH_
@@ -62,5 +45,3 @@ public:
 
 #endif // _HEROINE_HH_
 
 
 #endif // _HEROINE_HH_
 
-/** vim: set ts=4 sw=4 tw=80: *************************************************/
-
index f8f40d91c7ab79a114a9734f4b2a308153b34dcb..9e40a601a859f15f9a89a4243a008b0879bb3559 100644 (file)
@@ -1,30 +1,13 @@
 
 
-/*******************************************************************************
-
- Copyright (c) 2009, Charles McGarvey
- All rights reserved.
- Redistribution   and   use  in  source  and  binary  forms,  with  or  without
- modification, are permitted provided that the following conditions are met:
-   * Redistributions  of  source  code  must retain the above copyright notice,
-     this list of conditions and the following disclaimer.
-   * Redistributions  in binary form must reproduce the above copyright notice,
-     this  list of conditions and the following disclaimer in the documentation
-     and/or other materials provided with the distribution.
- THIS  SOFTWARE  IS  PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND  ANY  EXPRESS  OR  IMPLIED  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED.  IN  NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- FOR  ANY  DIRECT,  INDIRECT,  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES  (INCLUDING,  BUT  NOT  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- SERVICES;  LOSS  OF  USE,  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- CAUSED  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-*******************************************************************************/
+/*]  Copyright (c) 2009-2010, Charles McGarvey  [**************************
+**]  All rights reserved.
+*
+* vi:ts=4 sw=4 tw=75
+*
+* Distributable under the terms and conditions of the 2-clause BSD license;
+* see the file COPYING for a complete text of the license.
+*
+**************************************************************************/
 
 #include <Moof/Core.hh>
 #include <Moof/OpenGL.hh>
 
 #include <Moof/Core.hh>
 #include <Moof/OpenGL.hh>
@@ -33,7 +16,8 @@
 #include "Hud.hh"
 
 
 #include "Hud.hh"
 
 
-ProgressBar::ProgressBar(const Mf::Texture& tilemap, Mf::Texture::TileIndex index) :
+ProgressBar::ProgressBar(const Mf::Texture& tilemap,
+                                                Mf::Texture::TileIndex index) :
        mProgress(0.0),
        mTilemap(tilemap)
 {
        mProgress(0.0),
        mTilemap(tilemap)
 {
@@ -124,7 +108,8 @@ Hud::Hud(GameState& state) :
        mBar2(Mf::Texture("StatusBars"), 2),
        mFont("Font")
 {
        mBar2(Mf::Texture("StatusBars"), 2),
        mFont("Font")
 {
-       ASSERT(Mf::video && "no current video context from which to get dimensions");
+       ASSERT(Mf::video &&
+                  "no current video context from which to get dimensions");
        resize(Mf::video->getWidth(), Mf::video->getHeight());
 }
 
        resize(Mf::video->getWidth(), Mf::video->getHeight());
 }
 
@@ -201,6 +186,3 @@ bool Hud::handleEvent(const Mf::Event& event)
        return false;
 }
 
        return false;
 }
 
-
-/** vim: set ts=4 sw=4 tw=80: *************************************************/
-
index 2262b062983ae1d8faedc89bdc0cdcda21aaa270..30b5a42be36cae2d195372d6c762399dd59d34c0 100644 (file)
@@ -1,30 +1,13 @@
 
 
-/*******************************************************************************
-
- Copyright (c) 2009, Charles McGarvey
- All rights reserved.
- Redistribution   and   use  in  source  and  binary  forms,  with  or  without
- modification, are permitted provided that the following conditions are met:
-   * Redistributions  of  source  code  must retain the above copyright notice,
-     this list of conditions and the following disclaimer.
-   * Redistributions  in binary form must reproduce the above copyright notice,
-     this  list of conditions and the following disclaimer in the documentation
-     and/or other materials provided with the distribution.
- THIS  SOFTWARE  IS  PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND  ANY  EXPRESS  OR  IMPLIED  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED.  IN  NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- FOR  ANY  DIRECT,  INDIRECT,  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES  (INCLUDING,  BUT  NOT  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- SERVICES;  LOSS  OF  USE,  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- CAUSED  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-*******************************************************************************/
+/*]  Copyright (c) 2009-2010, Charles McGarvey  [**************************
+**]  All rights reserved.
+*
+* vi:ts=4 sw=4 tw=75
+*
+* Distributable under the terms and conditions of the 2-clause BSD license;
+* see the file COPYING for a complete text of the license.
+*
+**************************************************************************/
 
 #ifndef _HUD_HH_
 #define _HUD_HH_
 
 #ifndef _HUD_HH_
 #define _HUD_HH_
@@ -120,5 +103,3 @@ private:
 
 #endif // _HUD_HH_
 
 
 #endif // _HUD_HH_
 
-/** vim: set ts=4 sw=4 tw=80: *************************************************/
-
index 510a9b1b3a1e8bedc3f78926859842e32f3d8785..91a8d080ba04d14df9114e8a112f3ba179e4a63c 100644 (file)
@@ -1,30 +1,13 @@
 
 
-/*******************************************************************************
-
- Copyright (c) 2009, Charles McGarvey
- All rights reserved.
- Redistribution   and   use  in  source  and  binary  forms,  with  or  without
- modification, are permitted provided that the following conditions are met:
-   * Redistributions  of  source  code  must retain the above copyright notice,
-     this list of conditions and the following disclaimer.
-   * Redistributions  in binary form must reproduce the above copyright notice,
-     this  list of conditions and the following disclaimer in the documentation
-     and/or other materials provided with the distribution.
- THIS  SOFTWARE  IS  PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND  ANY  EXPRESS  OR  IMPLIED  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED.  IN  NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- FOR  ANY  DIRECT,  INDIRECT,  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES  (INCLUDING,  BUT  NOT  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- SERVICES;  LOSS  OF  USE,  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- CAUSED  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-*******************************************************************************/
+/*]  Copyright (c) 2009-2010, Charles McGarvey  [**************************
+**]  All rights reserved.
+*
+* vi:ts=4 sw=4 tw=75
+*
+* Distributable under the terms and conditions of the 2-clause BSD license;
+* see the file COPYING for a complete text of the license.
+*
+**************************************************************************/
 
 #include <cstdlib>             // atexit, getenv
 #include <iostream>
 
 #include <cstdlib>             // atexit, getenv
 #include <iostream>
@@ -206,7 +189,8 @@ void Main::contextCreated()
 
 void Main::printUsage()
 {
 
 void Main::printUsage()
 {
-       std::cout << "Usage: "PACKAGE" [-h|--help] [-i|--info] [OPTION=VALUE]..."
+       std::cout << "Usage: "
+                         << PACKAGE" [-h|--help] [-i|--info] [OPTION=VALUE]..."
                          << std::endl
                          << "The alien-smashing action game." << std::endl
                          << std::endl
                          << std::endl
                          << "The alien-smashing action game." << std::endl
                          << std::endl
@@ -220,7 +204,7 @@ void Main::printUsage()
                          << "  fullscreen=true|false" << std::endl
                          << "      if true, uses the entire display" << std::endl
                          << "  framerate=num" << std::endl
                          << "  fullscreen=true|false" << std::endl
                          << "      if true, uses the entire display" << std::endl
                          << "  framerate=num" << std::endl
-                         << "      the target number of frames per second" << std::endl
+                         << "      number of frames to draw per second" << std::endl
                          << std::endl
                          << "See documentation for more options." << std::endl;
 }
                          << std::endl
                          << "See documentation for more options." << std::endl;
 }
@@ -324,12 +308,14 @@ int main(int argc, char* argv[])
        Mf::settings.loadFromFiles(Main::getConfigPath());
        Mf::settings.parseArgs(argc, argv);
 
        Mf::settings.loadFromFiles(Main::getConfigPath());
        Mf::settings.parseArgs(argc, argv);
 
-       Mf::Log::Level logLevel;
-       if (Mf::settings.get("loglevel", logLevel)) Mf::Log::setLevel(logLevel);
+       Mf::Log::Level logLevel = Mf::Log::INFO;
+       Mf::settings.get("loglevel", logLevel);
+       Mf::Log::setLevel(logLevel);
 
        try
        {
 
        try
        {
-               Mf::Video video(PACKAGE_STRING, Mf::Resource::getPath(PACKAGE".png"));
+               Mf::Video video(PACKAGE_STRING,
+                                               Mf::Resource::getPath(PACKAGE".png"));
                MainP app = Main::alloc();
                Mf::core.push(app);
                Mf::core.run();
                MainP app = Main::alloc();
                Mf::core.push(app);
                Mf::core.run();
@@ -349,6 +335,3 @@ int main(int argc, char* argv[])
        return 0;
 }
 
        return 0;
 }
 
-
-/** vim: set ts=4 sw=4 tw=80: *************************************************/
-
index 78d3b710a8eb9e0f0d36a952ea411f0a72763547..91a4b4c3d2701922db35fde2f1e01fa29d81e70e 100644 (file)
@@ -1,33 +1,16 @@
 
 
-/*******************************************************************************
-
- Copyright (c) 2009, Charles McGarvey
- All rights reserved.
- Redistribution   and   use  in  source  and  binary  forms,  with  or  without
- modification, are permitted provided that the following conditions are met:
-   * Redistributions  of  source  code  must retain the above copyright notice,
-     this list of conditions and the following disclaimer.
-   * Redistributions  in binary form must reproduce the above copyright notice,
-     this  list of conditions and the following disclaimer in the documentation
-     and/or other materials provided with the distribution.
- THIS  SOFTWARE  IS  PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND  ANY  EXPRESS  OR  IMPLIED  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED.  IN  NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- FOR  ANY  DIRECT,  INDIRECT,  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES  (INCLUDING,  BUT  NOT  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- SERVICES;  LOSS  OF  USE,  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- CAUSED  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-*******************************************************************************/
-
-#ifndef _YOINKAPP_HH_
-#define _YOINKAPP_HH_
+/*]  Copyright (c) 2009-2010, Charles McGarvey  [**************************
+**]  All rights reserved.
+*
+* vi:ts=4 sw=4 tw=75
+*
+* Distributable under the terms and conditions of the 2-clause BSD license;
+* see the file COPYING for a complete text of the license.
+*
+**************************************************************************/
+
+#ifndef _MAIN_HH_
+#define _MAIN_HH_
 
 /**
  * @file Main.hh
 
 /**
  * @file Main.hh
@@ -82,7 +65,5 @@ private:
 };
 
 
 };
 
 
-#endif // _YOINKAPP_HH_
-
-/** vim: set ts=4 sw=4 tw=80: *************************************************/
+#endif // _MAIN_HH_
 
 
index 58b31118846ec4e601bdf0042cfba99ee818d27e..45ea7cdd6fde36fe917d9c2390b0195a46e86c7e 100644 (file)
@@ -7,7 +7,7 @@
 
 #
 # libmoof.a
 
 #
 # libmoof.a
-#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 noinst_LIBRARIES = libmoof.a
 
 
 noinst_LIBRARIES = libmoof.a
 
@@ -79,7 +79,7 @@ EXTRA_DIST = Moof/cml Moof/stlplus
 
 #
 # yoink
 
 #
 # yoink
-#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 bin_PROGRAMS = yoink
 
 
 bin_PROGRAMS = yoink
 
index 692ec3622db5435ef04695ba132552df8ef231c4..4ef15200d80be9b82e4eb2d40b1584be085f62f5 100644 (file)
@@ -1,30 +1,13 @@
 
 
-/*******************************************************************************
-
- Copyright (c) 2009, Charles McGarvey
- All rights reserved.
- Redistribution   and   use  in  source  and  binary  forms,  with  or  without
- modification, are permitted provided that the following conditions are met:
-   * Redistributions  of  source  code  must retain the above copyright notice,
-     this list of conditions and the following disclaimer.
-   * Redistributions  in binary form must reproduce the above copyright notice,
-     this  list of conditions and the following disclaimer in the documentation
-     and/or other materials provided with the distribution.
- THIS  SOFTWARE  IS  PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND  ANY  EXPRESS  OR  IMPLIED  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED.  IN  NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- FOR  ANY  DIRECT,  INDIRECT,  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES  (INCLUDING,  BUT  NOT  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- SERVICES;  LOSS  OF  USE,  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- CAUSED  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-*******************************************************************************/
+/*]  Copyright (c) 2009-2010, Charles McGarvey  [**************************
+**]  All rights reserved.
+*
+* vi:ts=4 sw=4 tw=75
+*
+* Distributable under the terms and conditions of the 2-clause BSD license;
+* see the file COPYING for a complete text of the license.
+*
+**************************************************************************/
 
 #include "Aabb.hh"
 #include "Frustum.hh"
 
 #include "Aabb.hh"
 #include "Frustum.hh"
@@ -84,9 +67,5 @@ void Aabb::getOctant(Aabb& octant, int num) const
 */
 
 
 */
 
 
-
-
 } // namespace Mf
 
 } // namespace Mf
 
-/** vim: set ts=4 sw=4 tw=80: *************************************************/
-
index 83926b3fa47789e19a85ed9124c9bef61bd89fca..f3e92ab471c8b48701a19cf8e61a4427c66a46ab 100644 (file)
@@ -1,30 +1,13 @@
 
 
-/*******************************************************************************
-
- Copyright (c) 2009, Charles McGarvey
- All rights reserved.
- Redistribution   and   use  in  source  and  binary  forms,  with  or  without
- modification, are permitted provided that the following conditions are met:
-   * Redistributions  of  source  code  must retain the above copyright notice,
-     this list of conditions and the following disclaimer.
-   * Redistributions  in binary form must reproduce the above copyright notice,
-     this  list of conditions and the following disclaimer in the documentation
-     and/or other materials provided with the distribution.
- THIS  SOFTWARE  IS  PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND  ANY  EXPRESS  OR  IMPLIED  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED.  IN  NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- FOR  ANY  DIRECT,  INDIRECT,  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES  (INCLUDING,  BUT  NOT  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- SERVICES;  LOSS  OF  USE,  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- CAUSED  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-*******************************************************************************/
+/*]  Copyright (c) 2009-2010, Charles McGarvey  [**************************
+**]  All rights reserved.
+*
+* vi:ts=4 sw=4 tw=75
+*
+* Distributable under the terms and conditions of the 2-clause BSD license;
+* see the file COPYING for a complete text of the license.
+*
+**************************************************************************/
 
 #ifndef _MOOF_AABB_HH_
 #define _MOOF_AABB_HH_
 
 #ifndef _MOOF_AABB_HH_
 #define _MOOF_AABB_HH_
@@ -35,7 +18,7 @@
 #include <Moof/Plane.hh>
 #include <Moof/Shape.hh>
 
 #include <Moof/Plane.hh>
 #include <Moof/Shape.hh>
 
-#include <Moof/Frustum.hh>
+#include <Moof/Frustum.hh>             // FIXME this file is quite broken
 #include <Moof/OpenGL.hh>
 #include <Moof/Texture.hh>
 
 #include <Moof/OpenGL.hh>
 #include <Moof/Texture.hh>
 
@@ -148,69 +131,86 @@ struct Aabb : public Cullable, public Drawable, public Shape<D>
        */
 
 
        */
 
 
-void getCorners(Vector corners[8]) const
-{
-       corners[0][0] = min[0]; corners[0][1] = min[1]; corners[0][2] = max[2];
-       corners[1][0] = max[0]; corners[1][1] = min[1]; corners[1][2] = max[2];
-       corners[2][0] = max[0]; corners[2][1] = max[1]; corners[2][2] = max[2];
-       corners[3][0] = min[0]; corners[3][1] = max[1]; corners[3][2] = max[2];
-       corners[4][0] = min[0]; corners[4][1] = min[1]; corners[4][2] = min[2];
-       corners[5][0] = max[0]; corners[5][1] = min[1]; corners[5][2] = min[2];
-       corners[6][0] = max[0]; corners[6][1] = max[1]; corners[6][2] = min[2];
-       corners[7][0] = min[0]; corners[7][1] = max[1]; corners[7][2] = min[2];
-}
-
-
-void encloseVertices(const Vector vertices[], unsigned count)
-{
-       min.zero();
-       max.zero();
+       void getCorners(Vector corners[8]) const
+       {
+               corners[0][0] = min[0];
+               corners[0][1] = min[1];
+               corners[0][2] = max[2];
+               corners[1][0] = max[0];
+               corners[1][1] = min[1];
+               corners[1][2] = max[2];
+               corners[2][0] = max[0];
+               corners[2][1] = max[1];
+               corners[2][2] = max[2];
+               corners[3][0] = min[0];
+               corners[3][1] = max[1];
+               corners[3][2] = max[2];
+               corners[4][0] = min[0];
+               corners[4][1] = min[1];
+               corners[4][2] = min[2];
+               corners[5][0] = max[0];
+               corners[5][1] = min[1];
+               corners[5][2] = min[2];
+               corners[6][0] = max[0];
+               corners[6][1] = max[1];
+               corners[6][2] = min[2];
+               corners[7][0] = min[0];
+               corners[7][1] = max[1];
+               corners[7][2] = min[2];
+       }
 
 
-       for (unsigned i = 1; i < count; ++i)
+
+       void encloseVertices(const Vector vertices[], unsigned count)
        {
        {
-               min.minimize(vertices[i]);
-               max.maximize(vertices[i]);
+               min.zero();
+               max.zero();
+
+               for (unsigned i = 1; i < count; ++i)
+               {
+                       min.minimize(vertices[i]);
+                       max.maximize(vertices[i]);
+               }
        }
        }
-}
 
 
 
 
-void draw(Scalar alpha = 0.0) const
-{
-       Scalar vertices[] = {min[0], min[1], min[2],
-                                                min[0], max[1], min[2],
-                                                max[0], max[1], min[2],
-                                                max[0], min[1], min[2],
-                                                min[0], max[1], max[2],
-                                                min[0], min[1], max[2],
-                                                max[0], min[1], max[2],
-                                                max[0], max[1], max[2]};
-
-       GLubyte indices[] = {0, 1, 2, 3,
-                                                1, 2, 7, 4,
-                                                3, 0, 5, 6,
-                                                2, 3, 6, 7,
-                                                5, 0, 1, 4,
-                                                4, 5, 6, 7};
-
-       glEnableClientState(GL_VERTEX_ARRAY);
-       glDisableClientState(GL_TEXTURE_COORD_ARRAY);
-       glVertexPointer(3, GL_SCALAR, 0, vertices);
-
-       glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
-       Texture::resetBind();
-
-       glDrawElements(GL_QUADS, sizeof(indices), GL_UNSIGNED_BYTE, indices);
-
-       glEnableClientState(GL_TEXTURE_COORD_ARRAY);
-       //glDisableClientState(GL_VERTEX_ARRAY);
-
-       glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
-}
-
-bool isVisible(const Frustum& frustum) const
-{
-       return frustum.contains(*this);
-}
+       void draw(Scalar alpha = 0.0) const
+       {
+               Scalar vertices[] = {min[0], min[1], min[2],
+                                                        min[0], max[1], min[2],
+                                                        max[0], max[1], min[2],
+                                                        max[0], min[1], min[2],
+                                                        min[0], max[1], max[2],
+                                                        min[0], min[1], max[2],
+                                                        max[0], min[1], max[2],
+                                                        max[0], max[1], max[2]};
+
+               GLubyte indices[] = {0, 1, 2, 3,
+                                                        1, 2, 7, 4,
+                                                        3, 0, 5, 6,
+                                                        2, 3, 6, 7,
+                                                        5, 0, 1, 4,
+                                                        4, 5, 6, 7};
+
+               glEnableClientState(GL_VERTEX_ARRAY);
+               glDisableClientState(GL_TEXTURE_COORD_ARRAY);
+               glVertexPointer(3, GL_SCALAR, 0, vertices);
+
+               glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
+               Texture::resetBind();
+
+               glDrawElements(GL_QUADS, sizeof(indices), GL_UNSIGNED_BYTE,
+                                          indices);
+
+               glEnableClientState(GL_TEXTURE_COORD_ARRAY);
+               //glDisableClientState(GL_VERTEX_ARRAY);
+
+               glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
+       }
+
+       bool isVisible(const Frustum& frustum) const
+       {
+               return frustum.contains(*this);
+       }
 };
 
 
 };
 
 
@@ -218,5 +218,3 @@ bool isVisible(const Frustum& frustum) const
 
 #endif // _MOOF_AABB_HH_
 
 
 #endif // _MOOF_AABB_HH_
 
-/** vim: set ts=4 sw=4 tw=80: *************************************************/
-
index 8f313b7aaf7d83b15ee8a97dc8ec12562c8c40e3..d7f1fe2d34c20752aa2667c9e8723c0472ee7ca7 100644 (file)
@@ -1,30 +1,13 @@
 
 
-/*******************************************************************************
-
- Copyright (c) 2009, Charles McGarvey
- All rights reserved.
- Redistribution   and   use  in  source  and  binary  forms,  with  or  without
- modification, are permitted provided that the following conditions are met:
-   * Redistributions  of  source  code  must retain the above copyright notice,
-     this list of conditions and the following disclaimer.
-   * Redistributions  in binary form must reproduce the above copyright notice,
-     this  list of conditions and the following disclaimer in the documentation
-     and/or other materials provided with the distribution.
- THIS  SOFTWARE  IS  PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND  ANY  EXPRESS  OR  IMPLIED  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED.  IN  NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- FOR  ANY  DIRECT,  INDIRECT,  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES  (INCLUDING,  BUT  NOT  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- SERVICES;  LOSS  OF  USE,  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- CAUSED  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-*******************************************************************************/
+/*]  Copyright (c) 2009-2010, Charles McGarvey  [**************************
+**]  All rights reserved.
+*
+* vi:ts=4 sw=4 tw=75
+*
+* Distributable under the terms and conditions of the 2-clause BSD license;
+* see the file COPYING for a complete text of the license.
+*
+**************************************************************************/
 
 #include "Camera.hh"
 #include "OpenGL.hh"
 
 #include "Camera.hh"
 #include "OpenGL.hh"
@@ -46,8 +29,9 @@ void Camera::setRotation(const Quaternion& rotation)
 void Camera::lookAt(const Vector3& point)
 {
        // FIXME this doesn't work as expected
 void Camera::lookAt(const Vector3& point)
 {
        // FIXME this doesn't work as expected
-       cml::quaternion_rotation_aim_at(mState.orientation, mState.position, point,
-                       Vector3(0.0, 1.0, 0.0));
+       cml::quaternion_rotation_aim_at(mState.orientation,
+                                                                       mState.position, point,
+                                                                       Vector3(0.0, 1.0, 0.0));
 }
 
 
 }
 
 
@@ -57,10 +41,10 @@ void Camera::setProjection(const Matrix4& projection)
 }
 
 void Camera::setProjection(Scalar fovy, Scalar aspect, Scalar abutting,
 }
 
 void Camera::setProjection(Scalar fovy, Scalar aspect, Scalar abutting,
-               Scalar distant)
+                                                  Scalar distant)
 {
        cml::matrix_perspective_yfov_RH(mProjection, fovy, aspect, abutting,
 {
        cml::matrix_perspective_yfov_RH(mProjection, fovy, aspect, abutting,
-                       distant, cml::z_clip_neg_one);
+                                                                       distant, cml::z_clip_neg_one);
 }
 
 
 }
 
 
@@ -166,5 +150,3 @@ void Camera::handleEvent(const Event& event)
 
 } // namespace Mf
 
 
 } // namespace Mf
 
-/** vim: set ts=4 sw=4 tw=80: *************************************************/
-
index 8e28f5420fe4e64de32130e88716abe4e7b515b6..bbb493d5d3c499190e03e904cd149221ccc2b053 100644 (file)
@@ -1,30 +1,13 @@
 
 
-/*******************************************************************************
-
- Copyright (c) 2009, Charles McGarvey
- All rights reserved.
- Redistribution   and   use  in  source  and  binary  forms,  with  or  without
- modification, are permitted provided that the following conditions are met:
-   * Redistributions  of  source  code  must retain the above copyright notice,
-     this list of conditions and the following disclaimer.
-   * Redistributions  in binary form must reproduce the above copyright notice,
-     this  list of conditions and the following disclaimer in the documentation
-     and/or other materials provided with the distribution.
- THIS  SOFTWARE  IS  PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND  ANY  EXPRESS  OR  IMPLIED  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED.  IN  NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- FOR  ANY  DIRECT,  INDIRECT,  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES  (INCLUDING,  BUT  NOT  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- SERVICES;  LOSS  OF  USE,  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- CAUSED  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-*******************************************************************************/
+/*]  Copyright (c) 2009-2010, Charles McGarvey  [**************************
+**]  All rights reserved.
+*
+* vi:ts=4 sw=4 tw=75
+*
+* Distributable under the terms and conditions of the 2-clause BSD license;
+* see the file COPYING for a complete text of the license.
+*
+**************************************************************************/
 
 #ifndef _MOOF_CAMERA_HH_
 #define _MOOF_CAMERA_HH_
 
 #ifndef _MOOF_CAMERA_HH_
 #define _MOOF_CAMERA_HH_
@@ -95,5 +78,3 @@ private:
 
 #endif // _MOOF_CAMERA_HH_
 
 
 #endif // _MOOF_CAMERA_HH_
 
-/** vim: set ts=4 sw=4 tw=80: *************************************************/
-
index 190f4c8d4d3bd064735c2f07da709c926fb77ddf..b9ad92a63a8e29e8c7f59e1e6cc310a03bca5b36 100644 (file)
@@ -1,30 +1,13 @@
 
 
-/*******************************************************************************
-
- Copyright (c) 2009, Charles McGarvey
- All rights reserved.
- Redistribution   and   use  in  source  and  binary  forms,  with  or  without
- modification, are permitted provided that the following conditions are met:
-   * Redistributions  of  source  code  must retain the above copyright notice,
-     this list of conditions and the following disclaimer.
-   * Redistributions  in binary form must reproduce the above copyright notice,
-     this  list of conditions and the following disclaimer in the documentation
-     and/or other materials provided with the distribution.
- THIS  SOFTWARE  IS  PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND  ANY  EXPRESS  OR  IMPLIED  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED.  IN  NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- FOR  ANY  DIRECT,  INDIRECT,  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES  (INCLUDING,  BUT  NOT  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- SERVICES;  LOSS  OF  USE,  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- CAUSED  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-*******************************************************************************/
+/*]  Copyright (c) 2009-2010, Charles McGarvey  [**************************
+**]  All rights reserved.
+*
+* vi:ts=4 sw=4 tw=75
+*
+* Distributable under the terms and conditions of the 2-clause BSD license;
+* see the file COPYING for a complete text of the license.
+*
+**************************************************************************/
 
 #include <algorithm>
 #include <cstdlib>                     // exit, srand
 
 #include <algorithm>
 #include <cstdlib>                     // exit, srand
@@ -78,10 +61,10 @@ public:
 
 
        /**
 
 
        /**
-        * The main loop.  This just calls dispatchEvents(), update(), and draw()
-        * over and over again.  The timing of the update and draw are decoupled.
-        * The actual frame rate is also calculated here.  This function will return
-        * the exit code used to stop the loop.
+        * The main loop.  This just calls dispatchEvents(), update(), and
+        * draw() over and over again.  The timing of the update and draw are
+        * decoupled.  The actual frame rate is also calculated here.  This
+        * function will return the exit code used to stop the loop.
         */
 
        void run()
         */
 
        void run()
@@ -176,7 +159,8 @@ public:
 
        void update(Scalar t, Scalar dt)
        {
 
        void update(Scalar t, Scalar dt)
        {
-               for (mStackIt = mStack.begin(); mStackIt != mStack.end(); ++mStackIt)
+               for (mStackIt = mStack.begin(); mStackIt != mStack.end();
+                               ++mStackIt)
                {
                        (*mStackIt)->update(t, dt);
                }
                {
                        (*mStackIt)->update(t, dt);
                }
@@ -194,7 +178,8 @@ public:
 
        void handleEvent(const Event& event)
        {
 
        void handleEvent(const Event& event)
        {
-               for (mStackIt = mStack.begin(); mStackIt != mStack.end(); ++mStackIt)
+               for (mStackIt = mStack.begin(); mStackIt != mStack.end();
+                               ++mStackIt)
                {
                        if ((*mStackIt)->handleEvent(event)) break;
                }
                {
                        if ((*mStackIt)->handleEvent(event)) break;
                }
@@ -206,7 +191,7 @@ public:
                ASSERT(layer && "cannot push null layer");
                mStack.push_front(layer);
                logInfo << "stack: " << mStack.size()
                ASSERT(layer && "cannot push null layer");
                mStack.push_front(layer);
                logInfo << "stack: " << mStack.size()
-                                << " [pushed " << layer.get() << "]" << std::endl;
+                               << " [pushed " << layer.get() << "]" << std::endl;
                layer->addedToCore();
        }
 
                layer->addedToCore();
        }
 
@@ -218,7 +203,7 @@ public:
                LayerP layer = mStack.front();
                mStack.pop_front();
                logInfo << "stack: " << mStack.size()
                LayerP layer = mStack.front();
                mStack.pop_front();
                logInfo << "stack: " << mStack.size()
-                                << " [popped " << layer.get() << "]" << std::endl;
+                               << " [popped " << layer.get() << "]" << std::endl;
                layer->removedFromCore();
 
                if (fixIt) mStackIt = --mStack.begin();
                layer->removedFromCore();
 
                if (fixIt) mStackIt = --mStack.begin();
@@ -248,7 +233,8 @@ public:
                                {
                                        (*it)->removedFromCore();
                                        logInfo << "stack: " << mStack.size()
                                {
                                        (*it)->removedFromCore();
                                        logInfo << "stack: " << mStack.size()
-                                                        << " [popped " << (*it).get() << "]" << std::endl;
+                                                       << " [popped " << (*it).get() << "]"
+                                                       << std::endl;
                                }
 
                                if (fixIt) mStackIt = --mStack.begin();
                                }
 
                                if (fixIt) mStackIt = --mStack.begin();
@@ -339,19 +325,20 @@ void Core::run()
 
 
 Dispatch::Handler Core::addHandler(const std::string& event,
 
 
 Dispatch::Handler Core::addHandler(const std::string& event,
-               const Dispatch::Function& callback)
+                                                                  const Dispatch::Function& callback)
 {
        return mImpl->mDispatch.addHandler(event, callback);
 }
 
 Dispatch::Handler Core::addHandler(const std::string& event,
 {
        return mImpl->mDispatch.addHandler(event, callback);
 }
 
 Dispatch::Handler Core::addHandler(const std::string& event,
-               const Dispatch::Function& callback, Dispatch::Handler handler)
+                                                                  const Dispatch::Function& callback,
+                                                                  Dispatch::Handler handler)
 {
        return mImpl->mDispatch.addHandler(event, callback, handler);
 }
 
 void Core::dispatch(const std::string& event,
 {
        return mImpl->mDispatch.addHandler(event, callback, handler);
 }
 
 void Core::dispatch(const std::string& event,
-               const Dispatch::Message* message)
+                                       const Dispatch::Message* message)
 {
        mImpl->mDispatch.dispatch(event, message);
 }
 {
        mImpl->mDispatch.dispatch(event, message);
 }
@@ -384,7 +371,7 @@ public:
                        char name[128];
                        SDL_VideoDriverName(name, sizeof(name));
                        logInfo << "initialized SDL; using video driver `"
                        char name[128];
                        SDL_VideoDriverName(name, sizeof(name));
                        logInfo << "initialized SDL; using video driver `"
-                                        << name << "'" << std::endl;
+                                       << name << "'" << std::endl;
                }
 
                if (FE_Init() != 0)
                }
 
                if (FE_Init() != 0)
@@ -432,9 +419,9 @@ private:
        static BackendP gInstance;
 };
 
        static BackendP gInstance;
 };
 
-Error Backend_::gError(Error::UNINITIALIZED);
-int Backend_::gRetainCount = 0;
-BackendP Backend_::gInstance;
+Error          Backend_::gError(Error::UNINITIALIZED);
+int                    Backend_::gRetainCount = 0;
+BackendP       Backend_::gInstance;
 
 
 Backend::Backend()
 
 
 Backend::Backend()
@@ -460,5 +447,3 @@ const Error& Backend::getError()
 
 } // namespace Mf
 
 
 } // namespace Mf
 
-/** vim: set ts=4 sw=4 tw=80: *************************************************/
-
index 109999a7913a26adfe6d16646be19b13a895242d..eaa98b4a474d8f8dad318d9614f13770bba5bbc8 100644 (file)
@@ -1,34 +1,19 @@
 
 
-/*******************************************************************************
-
- Copyright (c) 2009, Charles McGarvey
- All rights reserved.
- Redistribution   and   use  in  source  and  binary  forms,  with  or  without
- modification, are permitted provided that the following conditions are met:
-   * Redistributions  of  source  code  must retain the above copyright notice,
-     this list of conditions and the following disclaimer.
-   * Redistributions  in binary form must reproduce the above copyright notice,
-     this  list of conditions and the following disclaimer in the documentation
-     and/or other materials provided with the distribution.
- THIS  SOFTWARE  IS  PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND  ANY  EXPRESS  OR  IMPLIED  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED.  IN  NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- FOR  ANY  DIRECT,  INDIRECT,  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES  (INCLUDING,  BUT  NOT  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- SERVICES;  LOSS  OF  USE,  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- CAUSED  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-*******************************************************************************/
+/*]  Copyright (c) 2009-2010, Charles McGarvey  [**************************
+**]  All rights reserved.
+*
+* vi:ts=4 sw=4 tw=75
+*
+* Distributable under the terms and conditions of the 2-clause BSD license;
+* see the file COPYING for a complete text of the license.
+*
+**************************************************************************/
 
 #ifndef _MOOF_CORE_HH_
 #define _MOOF_CORE_HH_
 
 
 #ifndef _MOOF_CORE_HH_
 #define _MOOF_CORE_HH_
 
+#include <string>
+
 #include <boost/shared_ptr.hpp>
 
 #include <Moof/Dispatch.hh>
 #include <boost/shared_ptr.hpp>
 
 #include <Moof/Dispatch.hh>
@@ -40,12 +25,12 @@ namespace Mf {
 
 
 /**
 
 
 /**
- * The core is essentially a stack of layers.  While running, it updates each
- * layer from the bottom up every timestep.  It also draws each layer from the
- * bottom up, adhering to the maximum frame-rate.  Events are sent to each layer
- * from the top down until a layer signals the event was handled.  The core is
- * also responsible for firing timers on time.  The core will continue running
- * as long as there are layers on the stack.
+ * The core is essentially a stack of layers.  While running, it updates
+ * each layer from the bottom up every timestep.  It also draws each layer
+ * from the bottom up, adhering to the maximum frame-rate.  Events are sent
+ * to each layer from the top down until a layer signals the event was
+ * handled.  The core is also responsible for firing timers on time.  The
+ * core will continue running as long as there are layers on the stack.
  */
 
 class Core
  */
 
 class Core
@@ -61,7 +46,7 @@ public:
 
        void push(LayerP layer);        // push a layer onto the top
        LayerP pop();                           // pop the top layer
 
        void push(LayerP layer);        // push a layer onto the top
        LayerP pop();                           // pop the top layer
-       LayerP pop(Layer* layer);       // pops a specific layer and all layers above it
+       LayerP pop(Layer* layer);       // pops a specific layer and layers above it
        void clear();                           // remove all layers (the core will stop)
 
        int getSize() const;            // get the size of the stack
        void clear();                           // remove all layers (the core will stop)
 
        int getSize() const;            // get the size of the stack
@@ -70,12 +55,13 @@ public:
        void run();
 
        Dispatch::Handler addHandler(const std::string& event,
        void run();
 
        Dispatch::Handler addHandler(const std::string& event,
-                       const Dispatch::Function& callback);
+                                                                const Dispatch::Function& callback);
        Dispatch::Handler addHandler(const std::string& event,
        Dispatch::Handler addHandler(const std::string& event,
-                       const Dispatch::Function& callback, Dispatch::Handler handler);
+                                                                const Dispatch::Function& callback,
+                                                                Dispatch::Handler handler);
 
        void dispatch(const std::string& event,
 
        void dispatch(const std::string& event,
-                       const Dispatch::Message* message = 0);
+                                 const Dispatch::Message* message = 0);
 
 private:
 
 
 private:
 
@@ -88,9 +74,10 @@ extern Core core;
 
 /*
  * Some classes and subsystems require certain backend libraries to be
 
 /*
  * Some classes and subsystems require certain backend libraries to be
- * initialized.  This is the mechanism to accomplish that.  Classes which rely
- * on any backend libraries just need to instantiate this class as a member.
- * Backend cleanup will occur automagically when there are no more instances.
+ * initialized.  This is the mechanism to accomplish that.  Classes which
+ * rely on any backend libraries just need to instantiate this class as a
+ * member.  Backend cleanup will occur automagically when there are no more
+ * instances.
  */
 
 class Backend
  */
 
 class Backend
@@ -109,5 +96,3 @@ public:
 
 #endif // _MOOF_CORE_HH_
 
 
 #endif // _MOOF_CORE_HH_
 
-/** vim: set ts=4 sw=4 tw=80: *************************************************/
-
index 64b43eb03197c5ec0a76ff20ee52507def0af81f..a5ffcc1446e77cfac97491ad409d617d42777c55 100644 (file)
@@ -1,30 +1,13 @@
 
 
-/*******************************************************************************
-
- Copyright (c) 2009, Charles McGarvey
- All rights reserved.
- Redistribution   and   use  in  source  and  binary  forms,  with  or  without
- modification, are permitted provided that the following conditions are met:
-   * Redistributions  of  source  code  must retain the above copyright notice,
-     this list of conditions and the following disclaimer.
-   * Redistributions  in binary form must reproduce the above copyright notice,
-     this  list of conditions and the following disclaimer in the documentation
-     and/or other materials provided with the distribution.
- THIS  SOFTWARE  IS  PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND  ANY  EXPRESS  OR  IMPLIED  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED.  IN  NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- FOR  ANY  DIRECT,  INDIRECT,  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES  (INCLUDING,  BUT  NOT  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- SERVICES;  LOSS  OF  USE,  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- CAUSED  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-*******************************************************************************/
+/*]  Copyright (c) 2009-2010, Charles McGarvey  [**************************
+**]  All rights reserved.
+*
+* vi:ts=4 sw=4 tw=75
+*
+* Distributable under the terms and conditions of the 2-clause BSD license;
+* see the file COPYING for a complete text of the license.
+*
+**************************************************************************/
 
 #ifndef _MOOF_CULLABLE_HH_
 #define _MOOF_CULLABLE_HH_
 
 #ifndef _MOOF_CULLABLE_HH_
 #define _MOOF_CULLABLE_HH_
@@ -56,5 +39,3 @@ public:
 
 #endif // _MOOF_CULLABLE_HH_
 
 
 #endif // _MOOF_CULLABLE_HH_
 
-/** vim: set ts=4 sw=4 tw=80: *************************************************/
-
index b05ff9c9a74355529828094e4ad276eba16cc036..52f28f88327e2591378819308cb3a832c44e1512 100644 (file)
@@ -1,30 +1,13 @@
 
 
-/*******************************************************************************
-
- Copyright (c) 2009, Charles McGarvey
- All rights reserved.
- Redistribution   and   use  in  source  and  binary  forms,  with  or  without
- modification, are permitted provided that the following conditions are met:
-   * Redistributions  of  source  code  must retain the above copyright notice,
-     this list of conditions and the following disclaimer.
-   * Redistributions  in binary form must reproduce the above copyright notice,
-     this  list of conditions and the following disclaimer in the documentation
-     and/or other materials provided with the distribution.
- THIS  SOFTWARE  IS  PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND  ANY  EXPRESS  OR  IMPLIED  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED.  IN  NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- FOR  ANY  DIRECT,  INDIRECT,  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES  (INCLUDING,  BUT  NOT  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- SERVICES;  LOSS  OF  USE,  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- CAUSED  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-*******************************************************************************/
+/*]  Copyright (c) 2009-2010, Charles McGarvey  [**************************
+**]  All rights reserved.
+*
+* vi:ts=4 sw=4 tw=75
+*
+* Distributable under the terms and conditions of the 2-clause BSD license;
+* see the file COPYING for a complete text of the license.
+*
+**************************************************************************/
 
 #include <map>
 
 
 #include <map>
 
@@ -58,10 +41,10 @@ public:
 
 
        inline Handler addHandler(const std::string& event,
 
 
        inline Handler addHandler(const std::string& event,
-                       const Function& callback, Handler handler)
+                                                         const Function& callback, Handler handler)
        {
                mCallbacks.insert(std::make_pair(event,
        {
                mCallbacks.insert(std::make_pair(event,
-                                       std::make_pair(handler.getId(), callback)));
+                                                 std::make_pair(handler.getId(), callback)));
                mHandlers.insert(std::make_pair(handler.getId(), event));
 
                return handler;
                mHandlers.insert(std::make_pair(handler.getId(), event));
 
                return handler;
@@ -69,7 +52,8 @@ public:
 
        inline void removeHandler(unsigned id)
        {
 
        inline void removeHandler(unsigned id)
        {
-               std::pair<HandlerIter,HandlerIter> matching(mHandlers.equal_range(id));
+               std::pair<HandlerIter,HandlerIter>
+                       matching(mHandlers.equal_range(id));
 
                for (HandlerIter it = matching.first; it != matching.second; ++it)
                {
 
                for (HandlerIter it = matching.first; it != matching.second; ++it)
                {
@@ -94,7 +78,8 @@ public:
                std::pair<CallbackIter,CallbackIter>
                        callbacks(mCallbacks.equal_range(event));
 
                std::pair<CallbackIter,CallbackIter>
                        callbacks(mCallbacks.equal_range(event));
 
-               for (CallbackIter it = callbacks.first; it != callbacks.second; ++it)
+               for (CallbackIter it = callbacks.first; it != callbacks.second;
+                               ++it)
                {
                        Function callback = (*it).second.second;
                        callback(message);
                {
                        Function callback = (*it).second.second;
                        callback(message);
@@ -123,13 +108,14 @@ Dispatch::Dispatch() :
 
 
 Dispatch::Handler Dispatch::addHandler(const std::string& event,
 
 
 Dispatch::Handler Dispatch::addHandler(const std::string& event,
-               const Function& callback)
+                                                                          const Function& callback)
 {
        return addHandler(event, callback, mImpl->getNewHandler());
 }
 
 Dispatch::Handler Dispatch::addHandler(const std::string& event,
 {
        return addHandler(event, callback, mImpl->getNewHandler());
 }
 
 Dispatch::Handler Dispatch::addHandler(const std::string& event,
-               const Function& callback, Handler handler)
+                                                                          const Function& callback,
+                                                                          Handler handler)
 {
        // pass through
        return mImpl->addHandler(event, callback, handler);
 {
        // pass through
        return mImpl->addHandler(event, callback, handler);
@@ -152,5 +138,3 @@ void Dispatch::dispatch(const std::string& event, const Message* message)
 
 } // namespace Mf
 
 
 } // namespace Mf
 
-/** vim: set ts=4 sw=4 tw=80: *************************************************/
-
index 031f77d0bc65507aee31bfdff50afd4d0f057050..fd328fe37d733a49dba95f84176a68f279923e99 100644 (file)
@@ -1,30 +1,13 @@
 
 
-/*******************************************************************************
-
- Copyright (c) 2009, Charles McGarvey
- All rights reserved.
- Redistribution   and   use  in  source  and  binary  forms,  with  or  without
- modification, are permitted provided that the following conditions are met:
-   * Redistributions  of  source  code  must retain the above copyright notice,
-     this list of conditions and the following disclaimer.
-   * Redistributions  in binary form must reproduce the above copyright notice,
-     this  list of conditions and the following disclaimer in the documentation
-     and/or other materials provided with the distribution.
- THIS  SOFTWARE  IS  PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND  ANY  EXPRESS  OR  IMPLIED  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED.  IN  NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- FOR  ANY  DIRECT,  INDIRECT,  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES  (INCLUDING,  BUT  NOT  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- SERVICES;  LOSS  OF  USE,  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- CAUSED  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-*******************************************************************************/
+/*]  Copyright (c) 2009-2010, Charles McGarvey  [**************************
+**]  All rights reserved.
+*
+* vi:ts=4 sw=4 tw=75
+*
+* Distributable under the terms and conditions of the 2-clause BSD license;
+* see the file COPYING for a complete text of the license.
+*
+**************************************************************************/
 
 #ifndef _MOOF_DISPATCH_HH_
 #define _MOOF_DISPATCH_HH_
 
 #ifndef _MOOF_DISPATCH_HH_
 #define _MOOF_DISPATCH_HH_
@@ -111,7 +94,7 @@ public:
 
        Handler addHandler(const std::string& event, const Function& callback);
        Handler addHandler(const std::string& event, const Function& callback,
 
        Handler addHandler(const std::string& event, const Function& callback);
        Handler addHandler(const std::string& event, const Function& callback,
-                       Handler handler);
+                                          Handler handler);
 
        void dispatch(const std::string& event, const Message* message = 0);
 };
 
        void dispatch(const std::string& event, const Message* message = 0);
 };
@@ -121,5 +104,3 @@ public:
 
 #endif // _MOOF_DISPATCH_HH_
 
 
 #endif // _MOOF_DISPATCH_HH_
 
-/** vim: set ts=4 sw=4 tw=80: *************************************************/
-
index 61283fa3675995072d92d0afdabf10c14381fb3c..40916c095639b9ec397f4f47714824dd8a0aa218 100644 (file)
@@ -1,30 +1,13 @@
 
 
-/*******************************************************************************
-
- Copyright (c) 2009, Charles McGarvey
- All rights reserved.
- Redistribution   and   use  in  source  and  binary  forms,  with  or  without
- modification, are permitted provided that the following conditions are met:
-   * Redistributions  of  source  code  must retain the above copyright notice,
-     this list of conditions and the following disclaimer.
-   * Redistributions  in binary form must reproduce the above copyright notice,
-     this  list of conditions and the following disclaimer in the documentation
-     and/or other materials provided with the distribution.
- THIS  SOFTWARE  IS  PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND  ANY  EXPRESS  OR  IMPLIED  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED.  IN  NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- FOR  ANY  DIRECT,  INDIRECT,  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES  (INCLUDING,  BUT  NOT  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- SERVICES;  LOSS  OF  USE,  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- CAUSED  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-*******************************************************************************/
+/*]  Copyright (c) 2009-2010, Charles McGarvey  [**************************
+**]  All rights reserved.
+*
+* vi:ts=4 sw=4 tw=75
+*
+* Distributable under the terms and conditions of the 2-clause BSD license;
+* see the file COPYING for a complete text of the license.
+*
+**************************************************************************/
 
 #ifndef _MOOF_DRAWABLE_HH_
 #define _MOOF_DRAWABLE_HH_
 
 #ifndef _MOOF_DRAWABLE_HH_
 #define _MOOF_DRAWABLE_HH_
@@ -52,5 +35,3 @@ public:
 
 #endif // _MOOF_DRAWABLE_HH_
 
 
 #endif // _MOOF_DRAWABLE_HH_
 
-/** vim: set ts=4 sw=4 tw=80: *************************************************/
-
index ee0f8602c6fd8585090251b9d89cab8f753aefd6..4e71466579693ff455d156dde95f836f03e7d112 100644 (file)
@@ -1,30 +1,13 @@
 
 
-/*******************************************************************************
-
- Copyright (c) 2009, Charles McGarvey
- All rights reserved.
- Redistribution   and   use  in  source  and  binary  forms,  with  or  without
- modification, are permitted provided that the following conditions are met:
-   * Redistributions  of  source  code  must retain the above copyright notice,
-     this list of conditions and the following disclaimer.
-   * Redistributions  in binary form must reproduce the above copyright notice,
-     this  list of conditions and the following disclaimer in the documentation
-     and/or other materials provided with the distribution.
- THIS  SOFTWARE  IS  PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND  ANY  EXPRESS  OR  IMPLIED  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED.  IN  NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- FOR  ANY  DIRECT,  INDIRECT,  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES  (INCLUDING,  BUT  NOT  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- SERVICES;  LOSS  OF  USE,  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- CAUSED  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-*******************************************************************************/
+/*]  Copyright (c) 2009-2010, Charles McGarvey  [**************************
+**]  All rights reserved.
+*
+* vi:ts=4 sw=4 tw=75
+*
+* Distributable under the terms and conditions of the 2-clause BSD license;
+* see the file COPYING for a complete text of the license.
+*
+**************************************************************************/
 
 #ifndef _MOOF_ENTITY_HH_
 #define _MOOF_ENTITY_HH_
 
 #ifndef _MOOF_ENTITY_HH_
 #define _MOOF_ENTITY_HH_
@@ -40,9 +23,6 @@
 namespace Mf {
 
 
 namespace Mf {
 
 
-class Entity;
-typedef boost::shared_ptr<Entity> EntityP;
-
 class Frustum;
 
 
 class Frustum;
 
 
@@ -51,6 +31,10 @@ class Frustum;
  * specified volume (take up space).
  */
 
  * specified volume (take up space).
  */
 
+class Entity;
+typedef boost::shared_ptr<Entity> EntityP;
+
+
 class Entity : public Cullable, public Drawable
 {
 protected:
 class Entity : public Cullable, public Drawable
 {
 protected:
@@ -88,5 +72,3 @@ public:
 
 #endif // _MOOF_ENTITY_HH_
 
 
 #endif // _MOOF_ENTITY_HH_
 
-/** vim: set ts=4 sw=4 tw=80: *************************************************/
-
index c452ae6df836f8351660b5cd0e460239f1932697..78c894f3178f4583fde3ccb47583be9c08070573 100644 (file)
@@ -1,30 +1,13 @@
 
 
-/*******************************************************************************
-
- Copyright (c) 2009, Charles McGarvey
- All rights reserved.
- Redistribution   and   use  in  source  and  binary  forms,  with  or  without
- modification, are permitted provided that the following conditions are met:
-   * Redistributions  of  source  code  must retain the above copyright notice,
-     this list of conditions and the following disclaimer.
-   * Redistributions  in binary form must reproduce the above copyright notice,
-     this  list of conditions and the following disclaimer in the documentation
-     and/or other materials provided with the distribution.
- THIS  SOFTWARE  IS  PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND  ANY  EXPRESS  OR  IMPLIED  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED.  IN  NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- FOR  ANY  DIRECT,  INDIRECT,  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES  (INCLUDING,  BUT  NOT  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- SERVICES;  LOSS  OF  USE,  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- CAUSED  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-*******************************************************************************/
+/*]  Copyright (c) 2009-2010, Charles McGarvey  [**************************
+**]  All rights reserved.
+*
+* vi:ts=4 sw=4 tw=75
+*
+* Distributable under the terms and conditions of the 2-clause BSD license;
+* see the file COPYING for a complete text of the license.
+*
+**************************************************************************/
 
 #ifndef _MOOF_ERROR_HH_
 #define _MOOF_ERROR_HH_
 
 #ifndef _MOOF_ERROR_HH_
 #define _MOOF_ERROR_HH_
@@ -108,5 +91,3 @@ private:
 
 #endif // _MOOF_ERROR_HH_
 
 
 #endif // _MOOF_ERROR_HH_
 
-/** vim: set ts=4 sw=4 tw=80: *************************************************/
-
index 51d745412b3c35f7dea6dd7dc67b92e10e3a8710..53b86f82dd106619e64a4f7bbc5e8b4ab6276e7f 100644 (file)
@@ -1,30 +1,13 @@
 
 
-/*******************************************************************************
-
- Copyright (c) 2009, Charles McGarvey
- All rights reserved.
- Redistribution   and   use  in  source  and  binary  forms,  with  or  without
- modification, are permitted provided that the following conditions are met:
-   * Redistributions  of  source  code  must retain the above copyright notice,
-     this list of conditions and the following disclaimer.
-   * Redistributions  in binary form must reproduce the above copyright notice,
-     this  list of conditions and the following disclaimer in the documentation
-     and/or other materials provided with the distribution.
- THIS  SOFTWARE  IS  PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND  ANY  EXPRESS  OR  IMPLIED  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED.  IN  NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- FOR  ANY  DIRECT,  INDIRECT,  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES  (INCLUDING,  BUT  NOT  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- SERVICES;  LOSS  OF  USE,  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- CAUSED  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-*******************************************************************************/
+/*]  Copyright (c) 2009-2010, Charles McGarvey  [**************************
+**]  All rights reserved.
+*
+* vi:ts=4 sw=4 tw=75
+*
+* Distributable under the terms and conditions of the 2-clause BSD license;
+* see the file COPYING for a complete text of the license.
+*
+**************************************************************************/
 
 #ifndef _MOOF_EVENT_HH_
 #define _MOOF_EVENT_HH_
 
 #ifndef _MOOF_EVENT_HH_
 #define _MOOF_EVENT_HH_
 namespace Mf {
 
 
 namespace Mf {
 
 
-// The event handling in SDL is so big that it would take more time than it's
-// worth to add an object-oriented abstraction layer that would completely cover
-// what SDL has already layed down.  Fortunately, SDL event structures are easy
-// to work with, and it is not the purpose of this library to completely hide
-// its dependencies and provide full functionality.
+// The event handling in SDL is so big that it would take more time than
+// it's worth to add an object-oriented abstraction layer that would
+// completely cover what SDL has already layed down.  Fortunately, SDL
+// event structures are easy to work with, and it is not the purpose of
+// this library to completely hide its dependencies and provide complete
+// abstractions.
 
 typedef SDL_Event Event;
 
 
 typedef SDL_Event Event;
 
@@ -48,5 +32,3 @@ typedef SDL_Event Event;
 
 #endif // _MOOF_EVENT_HH_
 
 
 #endif // _MOOF_EVENT_HH_
 
-/** vim: set ts=4 sw=4 tw=80: *************************************************/
-
index 1db6d253299b489bf46690a72c62b5476a3a1491..e56fb7bec94a1056433c91fc2c6c5b8fb980e66f 100644 (file)
@@ -1,30 +1,13 @@
 
 
-/*******************************************************************************
-
- Copyright (c) 2009, Charles McGarvey
- All rights reserved.
- Redistribution   and   use  in  source  and  binary  forms,  with  or  without
- modification, are permitted provided that the following conditions are met:
-   * Redistributions  of  source  code  must retain the above copyright notice,
-     this list of conditions and the following disclaimer.
-   * Redistributions  in binary form must reproduce the above copyright notice,
-     this  list of conditions and the following disclaimer in the documentation
-     and/or other materials provided with the distribution.
- THIS  SOFTWARE  IS  PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND  ANY  EXPRESS  OR  IMPLIED  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED.  IN  NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- FOR  ANY  DIRECT,  INDIRECT,  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES  (INCLUDING,  BUT  NOT  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- SERVICES;  LOSS  OF  USE,  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- CAUSED  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-*******************************************************************************/
+/*]  Copyright (c) 2009-2010, Charles McGarvey  [**************************
+**]  All rights reserved.
+*
+* vi:ts=4 sw=4 tw=75
+*
+* Distributable under the terms and conditions of the 2-clause BSD license;
+* see the file COPYING for a complete text of the license.
+*
+**************************************************************************/
 
 #include <Moof/Aabb.hh>
 #include <Moof/Frustum.hh>
 
 #include <Moof/Aabb.hh>
 #include <Moof/Frustum.hh>
@@ -39,23 +22,29 @@ void Frustum::init(const Matrix4& modelview, const Matrix4& projection)
        Scalar planes[6][4];
 
        cml::extract_frustum_planes(modelview, projection, planes,
        Scalar planes[6][4];
 
        cml::extract_frustum_planes(modelview, projection, planes,
-                       cml::z_clip_neg_one);
-
-       mPlanes[0] = Plane(planes[0][0], planes[0][1], planes[0][2], planes[0][3]);
-       mPlanes[1] = Plane(planes[1][0], planes[1][1], planes[1][2], planes[1][3]);
-       mPlanes[2] = Plane(planes[2][0], planes[2][1], planes[2][2], planes[2][3]);
-       mPlanes[3] = Plane(planes[3][0], planes[3][1], planes[3][2], planes[3][3]);
-       mPlanes[4] = Plane(planes[4][0], planes[4][1], planes[4][2], planes[4][3]);
-       mPlanes[5] = Plane(planes[5][0], planes[5][1], planes[5][2], planes[5][3]);
+                                                               cml::z_clip_neg_one);
+
+       mPlanes[0] = Plane(planes[0][0], planes[0][1],
+                                          planes[0][2], planes[0][3]);
+       mPlanes[1] = Plane(planes[1][0], planes[1][1],
+                                          planes[1][2], planes[1][3]);
+       mPlanes[2] = Plane(planes[2][0], planes[2][1],
+                                          planes[2][2], planes[2][3]);
+       mPlanes[3] = Plane(planes[3][0], planes[3][1],
+                                          planes[3][2], planes[3][3]);
+       mPlanes[4] = Plane(planes[4][0], planes[4][1],
+                                          planes[4][2], planes[4][3]);
+       mPlanes[5] = Plane(planes[5][0], planes[5][1],
+                                          planes[5][2], planes[5][3]);
 }
 
 void Frustum::init(const Matrix4& modelview, Scalar fovy, Scalar aspect,
 }
 
 void Frustum::init(const Matrix4& modelview, Scalar fovy, Scalar aspect,
-               Scalar abutting, Scalar distant)
+                                  Scalar abutting, Scalar distant)
 {
        Matrix4 projection;
 
 {
        Matrix4 projection;
 
-       cml::matrix_perspective_yfov_RH(projection, fovy, aspect, abutting, distant,
-                       cml::z_clip_neg_one);
+       cml::matrix_perspective_yfov_RH(projection, fovy, aspect, abutting,
+                                                                       distant, cml::z_clip_neg_one);
 
        init(modelview, projection);
 }
 
        init(modelview, projection);
 }
@@ -73,8 +62,7 @@ Frustum::Collision Frustum::contains(const Aabb<3>& aabb) const
 
                for (int j = 0; j < 8; ++j)
                {
 
                for (int j = 0; j < 8; ++j)
                {
-                       if (mPlanes[i].intersects(corners[j]) ==
-                                       Plane::NEGATIVE)
+                       if (mPlanes[i].intersects(corners[j]) == Plane::NEGATIVE)
                        {
                                --nInside;
                        }
                        {
                                --nInside;
                        }
@@ -105,5 +93,3 @@ Frustum::Collision Frustum::contains(const Sphere<3>& sphere) const
 
 } // namespace Mf
 
 
 } // namespace Mf
 
-/** vim: set ts=4 sw=4 tw=80: *************************************************/
-
index 406e2304895db75ea5c519e6e8ec1a0a6685f799..6e93cd6c87f8c675ca61ff4f3dc820ee9b57a1f5 100644 (file)
@@ -1,30 +1,13 @@
 
 
-/*******************************************************************************
-
- Copyright (c) 2009, Charles McGarvey
- All rights reserved.
- Redistribution   and   use  in  source  and  binary  forms,  with  or  without
- modification, are permitted provided that the following conditions are met:
-   * Redistributions  of  source  code  must retain the above copyright notice,
-     this list of conditions and the following disclaimer.
-   * Redistributions  in binary form must reproduce the above copyright notice,
-     this  list of conditions and the following disclaimer in the documentation
-     and/or other materials provided with the distribution.
- THIS  SOFTWARE  IS  PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND  ANY  EXPRESS  OR  IMPLIED  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED.  IN  NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- FOR  ANY  DIRECT,  INDIRECT,  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES  (INCLUDING,  BUT  NOT  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- SERVICES;  LOSS  OF  USE,  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- CAUSED  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-*******************************************************************************/
+/*]  Copyright (c) 2009-2010, Charles McGarvey  [**************************
+**]  All rights reserved.
+*
+* vi:ts=4 sw=4 tw=75
+*
+* Distributable under the terms and conditions of the 2-clause BSD license;
+* see the file COPYING for a complete text of the license.
+*
+**************************************************************************/
 
 #ifndef _MOOF_FRUSTUM_HH_
 #define _MOOF_FRUSTUM_HH_
 
 #ifndef _MOOF_FRUSTUM_HH_
 #define _MOOF_FRUSTUM_HH_
@@ -64,7 +47,7 @@ public:
        
        void init(const Matrix4& modelview, const Matrix4& projection);
        void init(const Matrix4& modelview, Scalar fovy, Scalar aspect,
        
        void init(const Matrix4& modelview, const Matrix4& projection);
        void init(const Matrix4& modelview, Scalar fovy, Scalar aspect,
-                       Scalar abutting, Scalar distant);
+                         Scalar abutting, Scalar distant);
 
        Collision contains(const Aabb<3>& aabb) const;
        Collision contains(const Sphere<3>& sphere) const;
 
        Collision contains(const Aabb<3>& aabb) const;
        Collision contains(const Sphere<3>& sphere) const;
@@ -75,5 +58,3 @@ public:
 
 #endif // _MOOF_FRUSTUM_HH_
 
 
 #endif // _MOOF_FRUSTUM_HH_
 
-/** vim: set ts=4 sw=4 tw=80: *************************************************/
-
index eb024ad85c7675176b6894ad323cc12457a2f6d7..357b5318a3edb02fb2382fc3689b0f78b84bf1e9 100644 (file)
@@ -1,30 +1,13 @@
 
 
-/*******************************************************************************
-
- Copyright (c) 2009, Charles McGarvey
- All rights reserved.
- Redistribution   and   use  in  source  and  binary  forms,  with  or  without
- modification, are permitted provided that the following conditions are met:
-   * Redistributions  of  source  code  must retain the above copyright notice,
-     this list of conditions and the following disclaimer.
-   * Redistributions  in binary form must reproduce the above copyright notice,
-     this  list of conditions and the following disclaimer in the documentation
-     and/or other materials provided with the distribution.
- THIS  SOFTWARE  IS  PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND  ANY  EXPRESS  OR  IMPLIED  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED.  IN  NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- FOR  ANY  DIRECT,  INDIRECT,  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES  (INCLUDING,  BUT  NOT  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- SERVICES;  LOSS  OF  USE,  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- CAUSED  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-*******************************************************************************/
+/*]  Copyright (c) 2009-2010, Charles McGarvey  [**************************
+**]  All rights reserved.
+*
+* vi:ts=4 sw=4 tw=75
+*
+* Distributable under the terms and conditions of the 2-clause BSD license;
+* see the file COPYING for a complete text of the license.
+*
+**************************************************************************/
 
 #include "Hash.hh"
 
 
 #include "Hash.hh"
 
@@ -48,7 +31,8 @@ namespace Mf {
 // 2. It will not produce the same results on little-endian and big-endian
 //    machines.
 
 // 2. It will not produce the same results on little-endian and big-endian
 //    machines.
 
-unsigned getHash::operator()(const void* key, int len, unsigned int seed) const
+unsigned getHash::operator()(const void* key, int len,
+                                                        unsigned int seed) const
 {
        // 'm' and 'r' are mixing constants generated offline.
        // They're not really 'magic', they just happen to work well.
 {
        // 'm' and 'r' are mixing constants generated offline.
        // They're not really 'magic', they just happen to work well.
@@ -102,5 +86,3 @@ unsigned getHash::operator()(const void* key, int len, unsigned int seed) const
 
 } // namespace Mf
 
 
 } // namespace Mf
 
-/** vim: set ts=4 sw=4 tw=80: *************************************************/
-
index f0fab50705aca13e9c554d5eb14c0c161a36699e..e97ee254ec140fb04fdc8542bec83e754dddc9d8 100644 (file)
@@ -1,30 +1,13 @@
 
 
-/*******************************************************************************
-
- Copyright (c) 2009, Charles McGarvey
- All rights reserved.
- Redistribution   and   use  in  source  and  binary  forms,  with  or  without
- modification, are permitted provided that the following conditions are met:
-   * Redistributions  of  source  code  must retain the above copyright notice,
-     this list of conditions and the following disclaimer.
-   * Redistributions  in binary form must reproduce the above copyright notice,
-     this  list of conditions and the following disclaimer in the documentation
-     and/or other materials provided with the distribution.
- THIS  SOFTWARE  IS  PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND  ANY  EXPRESS  OR  IMPLIED  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED.  IN  NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- FOR  ANY  DIRECT,  INDIRECT,  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES  (INCLUDING,  BUT  NOT  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- SERVICES;  LOSS  OF  USE,  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- CAUSED  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-*******************************************************************************/
+/*]  Copyright (c) 2009-2010, Charles McGarvey  [**************************
+**]  All rights reserved.
+*
+* vi:ts=4 sw=4 tw=75
+*
+* Distributable under the terms and conditions of the 2-clause BSD license;
+* see the file COPYING for a complete text of the license.
+*
+**************************************************************************/
 
 #ifndef _MOOF_HASH_HH_
 #define _MOOF_HASH_HH_
 
 #ifndef _MOOF_HASH_HH_
 #define _MOOF_HASH_HH_
@@ -40,7 +23,8 @@ namespace Mf {
 struct getHash
 {
        // generic hash function
 struct getHash
 {
        // generic hash function
-       unsigned operator()(const void* key, int len, unsigned seed = -1) const;
+       unsigned operator()(const void* key, int len,
+                                               unsigned seed = -1) const;
 
        inline unsigned operator()(const std::string& val) const
        {
 
        inline unsigned operator()(const std::string& val) const
        {
@@ -58,5 +42,3 @@ struct getHash
 
 #endif // _MOOF_HASH_HH_
 
 
 #endif // _MOOF_HASH_HH_
 
-/** vim: set ts=4 sw=4 tw=80: *************************************************/
-
index ee44dd75dcacb319f331411df02e9c28da92407b..c5566d54e33f8bc0812a4328a5ad939d28ee78fe 100644 (file)
@@ -1,38 +1,21 @@
 
 
-/*******************************************************************************
-
- Copyright (c) 2009, Charles McGarvey
- All rights reserved.
- Redistribution   and   use  in  source  and  binary  forms,  with  or  without
- modification, are permitted provided that the following conditions are met:
-   * Redistributions  of  source  code  must retain the above copyright notice,
-     this list of conditions and the following disclaimer.
-   * Redistributions  in binary form must reproduce the above copyright notice,
-     this  list of conditions and the following disclaimer in the documentation
-     and/or other materials provided with the distribution.
- THIS  SOFTWARE  IS  PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND  ANY  EXPRESS  OR  IMPLIED  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED.  IN  NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- FOR  ANY  DIRECT,  INDIRECT,  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES  (INCLUDING,  BUT  NOT  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- SERVICES;  LOSS  OF  USE,  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- CAUSED  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-*******************************************************************************/
+/*]  Copyright (c) 2009-2010, Charles McGarvey  [**************************
+**]  All rights reserved.
+*
+* vi:ts=4 sw=4 tw=75
+*
+* Distributable under the terms and conditions of the 2-clause BSD license;
+* see the file COPYING for a complete text of the license.
+*
+**************************************************************************/
 
 #include <cstdio>              // FILE
 #include <cstring>             // strncmp
 
 #include <boost/algorithm/string.hpp>
 
 
 #include <cstdio>              // FILE
 #include <cstring>             // strncmp
 
 #include <boost/algorithm/string.hpp>
 
-#include <SDL/SDL.h>
 #include <png.h>
 #include <png.h>
+#include <SDL/SDL.h>
 
 #include "Core.hh"
 #include "Error.hh"
 
 #include "Core.hh"
 #include "Error.hh"
@@ -116,7 +99,8 @@ public:
 
                logInfo("checking signature...");
                bytesRead = fread(signature, 1, sizeof(signature), fp);
 
                logInfo("checking signature...");
                bytesRead = fread(signature, 1, sizeof(signature), fp);
-               logInfo << "reading " << bytesRead << " bytes of signature" << std::endl;
+               logInfo << "reading " << bytesRead << " bytes of signature"
+                               << std::endl;
                if (bytesRead < sizeof(signature) ||
                        png_sig_cmp(signature, 0, sizeof(signature)) != 0) goto cleanup;
 
                if (bytesRead < sizeof(signature) ||
                        png_sig_cmp(signature, 0, sizeof(signature)) != 0) goto cleanup;
 
@@ -190,7 +174,8 @@ public:
                {
                        for (int i = 0; i < height; ++i)
                        {
                {
                        for (int i = 0; i < height; ++i)
                        {
-                               rows[height - 1 - i] = (png_bytep)(mPixels + i * channels * width);
+                               rows[height - 1 - i] = (png_bytep)(mPixels +
+                                                                                                  i * channels * width);
                        }
                }
                else
                        }
                }
                else
@@ -333,5 +318,3 @@ std::string Image::getPath(const std::string& name)
 
 } // namespace Mf
 
 
 } // namespace Mf
 
-/** vim: set ts=4 sw=4 tw=80: *************************************************/
-
index e958edcba2cccb0103b7616477097721d5a7e907..d923b0c7c2f2780ca63b0906ee6a77d72402e68c 100644 (file)
@@ -1,30 +1,13 @@
 
 
-/*******************************************************************************
-
- Copyright (c) 2009, Charles McGarvey
- All rights reserved.
- Redistribution   and   use  in  source  and  binary  forms,  with  or  without
- modification, are permitted provided that the following conditions are met:
-   * Redistributions  of  source  code  must retain the above copyright notice,
-     this list of conditions and the following disclaimer.
-   * Redistributions  in binary form must reproduce the above copyright notice,
-     this  list of conditions and the following disclaimer in the documentation
-     and/or other materials provided with the distribution.
- THIS  SOFTWARE  IS  PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND  ANY  EXPRESS  OR  IMPLIED  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED.  IN  NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- FOR  ANY  DIRECT,  INDIRECT,  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES  (INCLUDING,  BUT  NOT  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- SERVICES;  LOSS  OF  USE,  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- CAUSED  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-*******************************************************************************/
+/*]  Copyright (c) 2009-2010, Charles McGarvey  [**************************
+**]  All rights reserved.
+*
+* vi:ts=4 sw=4 tw=75
+*
+* Distributable under the terms and conditions of the 2-clause BSD license;
+* see the file COPYING for a complete text of the license.
+*
+**************************************************************************/
 
 #ifndef _MOOF_IMAGE_HH_
 #define _MOOF_IMAGE_HH_
 
 #ifndef _MOOF_IMAGE_HH_
 #define _MOOF_IMAGE_HH_
@@ -83,5 +66,3 @@ private:
 
 #endif // _MOOF_IMAGE_HH_
 
 
 #endif // _MOOF_IMAGE_HH_
 
-/** vim: set ts=4 sw=4 tw=80: *************************************************/
-
index e49ac694c2d0c3876c3b0028ca46e85e6131e462..d918a8df1bea77a7c3c79d81a901901446157b45 100644 (file)
@@ -1,30 +1,13 @@
 
 
-/*******************************************************************************
-
- Copyright (c) 2009, Charles McGarvey
- All rights reserved.
- Redistribution   and   use  in  source  and  binary  forms,  with  or  without
- modification, are permitted provided that the following conditions are met:
-   * Redistributions  of  source  code  must retain the above copyright notice,
-     this list of conditions and the following disclaimer.
-   * Redistributions  in binary form must reproduce the above copyright notice,
-     this  list of conditions and the following disclaimer in the documentation
-     and/or other materials provided with the distribution.
- THIS  SOFTWARE  IS  PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND  ANY  EXPRESS  OR  IMPLIED  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED.  IN  NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- FOR  ANY  DIRECT,  INDIRECT,  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES  (INCLUDING,  BUT  NOT  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- SERVICES;  LOSS  OF  USE,  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- CAUSED  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-*******************************************************************************/
+/*]  Copyright (c) 2009-2010, Charles McGarvey  [**************************
+**]  All rights reserved.
+*
+* vi:ts=4 sw=4 tw=75
+*
+* Distributable under the terms and conditions of the 2-clause BSD license;
+* see the file COPYING for a complete text of the license.
+*
+**************************************************************************/
 
 #ifndef _MOOF_INTERPOLATOR_HH_
 #define _MOOF_INTERPOLATOR_HH_
 
 #ifndef _MOOF_INTERPOLATOR_HH_
 #define _MOOF_INTERPOLATOR_HH_
@@ -173,5 +156,3 @@ typedef Interpolator< Linear<Scalar> > Lerp;
 
 #endif // _MOOF_INTERPOLATOR_HH_
 
 
 #endif // _MOOF_INTERPOLATOR_HH_
 
-/** vim: set ts=4 sw=4 tw=80: *************************************************/
-
index 31607fba32a5459767e405227db074eb052c3110..8bbb94bdb93850c9e233199a64917371450e7b1e 100644 (file)
@@ -1,30 +1,13 @@
 
 
-/*******************************************************************************
-
- Copyright (c) 2009, Charles McGarvey
- All rights reserved.
- Redistribution   and   use  in  source  and  binary  forms,  with  or  without
- modification, are permitted provided that the following conditions are met:
-   * Redistributions  of  source  code  must retain the above copyright notice,
-     this list of conditions and the following disclaimer.
-   * Redistributions  in binary form must reproduce the above copyright notice,
-     this  list of conditions and the following disclaimer in the documentation
-     and/or other materials provided with the distribution.
- THIS  SOFTWARE  IS  PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND  ANY  EXPRESS  OR  IMPLIED  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED.  IN  NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- FOR  ANY  DIRECT,  INDIRECT,  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES  (INCLUDING,  BUT  NOT  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- SERVICES;  LOSS  OF  USE,  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- CAUSED  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-*******************************************************************************/
+/*]  Copyright (c) 2009-2010, Charles McGarvey  [**************************
+**]  All rights reserved.
+*
+* vi:ts=4 sw=4 tw=75
+*
+* Distributable under the terms and conditions of the 2-clause BSD license;
+* see the file COPYING for a complete text of the license.
+*
+**************************************************************************/
 
 #ifndef _MOOF_LAYER_HH_
 #define _MOOF_LAYER_HH_
 
 #ifndef _MOOF_LAYER_HH_
 #define _MOOF_LAYER_HH_
@@ -62,5 +45,3 @@ typedef boost::shared_ptr<Layer> LayerP;
 
 #endif // _MOOF_LAYER_HH_
 
 
 #endif // _MOOF_LAYER_HH_
 
-/** vim: set ts=4 sw=4 tw=80: *************************************************/
-
index 0747e280fffe42e6449569cc6fe90566fb16db1f..7902ea90d969e2a6c7170f9f970c25f215613eb1 100644 (file)
@@ -1,30 +1,13 @@
 
 
-/*******************************************************************************
-
- Copyright (c) 2009, Charles McGarvey
- All rights reserved.
- Redistribution   and   use  in  source  and  binary  forms,  with  or  without
- modification, are permitted provided that the following conditions are met:
-   * Redistributions  of  source  code  must retain the above copyright notice,
-     this list of conditions and the following disclaimer.
-   * Redistributions  in binary form must reproduce the above copyright notice,
-     this  list of conditions and the following disclaimer in the documentation
-     and/or other materials provided with the distribution.
- THIS  SOFTWARE  IS  PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND  ANY  EXPRESS  OR  IMPLIED  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED.  IN  NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- FOR  ANY  DIRECT,  INDIRECT,  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES  (INCLUDING,  BUT  NOT  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- SERVICES;  LOSS  OF  USE,  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- CAUSED  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-*******************************************************************************/
+/*]  Copyright (c) 2009-2010, Charles McGarvey  [**************************
+**]  All rights reserved.
+*
+* vi:ts=4 sw=4 tw=75
+*
+* Distributable under the terms and conditions of the 2-clause BSD license;
+* see the file COPYING for a complete text of the license.
+*
+**************************************************************************/
 
 #ifndef _MOOF_LINE_HH_
 #define _MOOF_LINE_HH_
 
 #ifndef _MOOF_LINE_HH_
 #define _MOOF_LINE_HH_
@@ -36,8 +19,6 @@
 #include <Moof/Shape.hh>
 #include <Moof/Texture.hh>
 
 #include <Moof/Shape.hh>
 #include <Moof/Texture.hh>
 
-#include <Moof/Log.hh>
-
 
 namespace Mf {
 
 
 namespace Mf {
 
@@ -130,5 +111,3 @@ struct Polygon : public Shape<D>
 
 #endif // _MOOF_LINE_HH_
 
 
 #endif // _MOOF_LINE_HH_
 
-/** vim: set ts=4 sw=4 tw=80: *************************************************/
-
index 863ab87317c6cc9f2e7235877a1fa7d0818c8147..8656dc306a4531e4ea928cf3a645364f43708168 100644 (file)
@@ -1,30 +1,13 @@
 
 
-/*******************************************************************************
-
- Copyright (c) 2009, Charles McGarvey
- All rights reserved.
- Redistribution   and   use  in  source  and  binary  forms,  with  or  without
- modification, are permitted provided that the following conditions are met:
-   * Redistributions  of  source  code  must retain the above copyright notice,
-     this list of conditions and the following disclaimer.
-   * Redistributions  in binary form must reproduce the above copyright notice,
-     this  list of conditions and the following disclaimer in the documentation
-     and/or other materials provided with the distribution.
- THIS  SOFTWARE  IS  PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND  ANY  EXPRESS  OR  IMPLIED  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED.  IN  NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- FOR  ANY  DIRECT,  INDIRECT,  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES  (INCLUDING,  BUT  NOT  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- SERVICES;  LOSS  OF  USE,  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- CAUSED  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-*******************************************************************************/
+/*]  Copyright (c) 2009-2010, Charles McGarvey  [**************************
+**]  All rights reserved.
+*
+* vi:ts=4 sw=4 tw=75
+*
+* Distributable under the terms and conditions of the 2-clause BSD license;
+* see the file COPYING for a complete text of the license.
+*
+**************************************************************************/
 
 #include <fstream>
 
 
 #include <fstream>
 
@@ -77,10 +60,14 @@ static int logScript_(Script& script, Log::Level level)
 
 void importLogFunctions(Script& script)
 {
 
 void importLogFunctions(Script& script)
 {
-       script.importFunction("LogError",   boost::bind(logScript_, _1, Log::ERRORR));
-       script.importFunction("LogWarning", boost::bind(logScript_, _1, Log::WARNING));
-       script.importFunction("LogInfo",    boost::bind(logScript_, _1, Log::INFO));
-       script.importFunction("print",      boost::bind(logScript_, _1, Log::INFO));
+       script.importFunction("LogError",
+                                                 boost::bind(logScript_, _1, Log::ERRORR));
+       script.importFunction("LogWarning",
+                                                 boost::bind(logScript_, _1, Log::WARNING));
+       script.importFunction("LogInfo",
+                                                 boost::bind(logScript_, _1, Log::INFO));
+       script.importFunction("print",
+                                                 boost::bind(logScript_, _1, Log::INFO));
 }
 
 
 }
 
 
index 96585a1d5dc0041c7deea6b4027dd69eff9eb056..c7736301fc679f6ede496933d0eccbc866d530e1 100644 (file)
@@ -1,30 +1,13 @@
 
 
-/*******************************************************************************
-
- Copyright (c) 2009, Charles McGarvey
- All rights reserved.
- Redistribution   and   use  in  source  and  binary  forms,  with  or  without
- modification, are permitted provided that the following conditions are met:
-   * Redistributions  of  source  code  must retain the above copyright notice,
-     this list of conditions and the following disclaimer.
-   * Redistributions  in binary form must reproduce the above copyright notice,
-     this  list of conditions and the following disclaimer in the documentation
-     and/or other materials provided with the distribution.
- THIS  SOFTWARE  IS  PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND  ANY  EXPRESS  OR  IMPLIED  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED.  IN  NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- FOR  ANY  DIRECT,  INDIRECT,  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES  (INCLUDING,  BUT  NOT  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- SERVICES;  LOSS  OF  USE,  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- CAUSED  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-*******************************************************************************/
+/*]  Copyright (c) 2009-2010, Charles McGarvey  [**************************
+**]  All rights reserved.
+*
+* vi:ts=4 sw=4 tw=75
+*
+* Distributable under the terms and conditions of the 2-clause BSD license;
+* see the file COPYING for a complete text of the license.
+*
+**************************************************************************/
 
 #ifndef _MOOF_LOG_H_
 #define _MOOF_LOG_H_
 
 #ifndef _MOOF_LOG_H_
 #define _MOOF_LOG_H_
@@ -32,8 +15,8 @@
 /**
  * @file log.h
  * Functions related to logging the process.
 /**
  * @file log.h
  * Functions related to logging the process.
- * The logging functions are logError(), logWarning(), logInfo(), and
- * logDebug(), listed from most critical to least critical.
+ * The logging functions are logError(), logWarning(), and logInfo(),
+ * listed from most critical to least critical.
  */
 
 #include <cstdlib>             // exit
  */
 
 #include <cstdlib>             // exit
@@ -41,7 +24,8 @@
 
 
 /**
 
 
 /**
- * Macro which tests an assertion and issues an logError() and exits if false.
+ * Macro which tests an assertion and issues an logError() and exits if
+ * false.
  * @param X test to perform
  */
 
  * @param X test to perform
  */
 
@@ -50,8 +34,9 @@
 #if NDEBUG
 #define ASSERT(X)
 #else
 #if NDEBUG
 #define ASSERT(X)
 #else
-#define ASSERT(X) if (!(X)) Mf::logError << \
-       "false assertion at " << __FILE__ << ":" << __LINE__ << ", " << #X, exit(1)
+#define ASSERT(X) if (!(X)) Mf::logError \
+       << "false assertion at " << __FILE__ << ":" << __LINE__ << ", " \
+       << #X, exit(1)
 #endif
 
 
 #endif
 
 
index 89c20760ba984b967267bd9f966ad8587fb4d5bf..2773a593f5e081ce3ae710404d0d124e42ad5900 100644 (file)
@@ -1,39 +1,22 @@
 
 
-/*******************************************************************************
-
- Copyright (c) 2009, Charles McGarvey
- All rights reserved.
- Redistribution   and   use  in  source  and  binary  forms,  with  or  without
- modification, are permitted provided that the following conditions are met:
-   * Redistributions  of  source  code  must retain the above copyright notice,
-     this list of conditions and the following disclaimer.
-   * Redistributions  in binary form must reproduce the above copyright notice,
-     this  list of conditions and the following disclaimer in the documentation
-     and/or other materials provided with the distribution.
- THIS  SOFTWARE  IS  PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND  ANY  EXPRESS  OR  IMPLIED  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED.  IN  NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- FOR  ANY  DIRECT,  INDIRECT,  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES  (INCLUDING,  BUT  NOT  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- SERVICES;  LOSS  OF  USE,  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- CAUSED  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-*******************************************************************************/
+/*]  Copyright (c) 2009-2010, Charles McGarvey  [**************************
+**]  All rights reserved.
+*
+* vi:ts=4 sw=4 tw=75
+*
+* Distributable under the terms and conditions of the 2-clause BSD license;
+* see the file COPYING for a complete text of the license.
+*
+**************************************************************************/
 
 #ifndef _MOOF_MANAGER_HH_
 #define _MOOF_MANAGER_HH_
 
 /**
  * @file Manager.hh
 
 #ifndef _MOOF_MANAGER_HH_
 #define _MOOF_MANAGER_HH_
 
 /**
  * @file Manager.hh
- * A library is a collection of named objects of the same type.  Libraries use
- * reference counting to automagically delete objects which no longer have any
- * interested code.
+ * A library is a collection of named objects of the same type.  Libraries
+ * use reference counting to automagically delete objects which no longer
+ * have any interested code.
  */
 
 #include <string>
  */
 
 #include <string>
@@ -112,5 +95,3 @@ stlplus::hash<std::string,T*,getHash> Manager<T>::mPtrMap;
 
 #endif // _MOOF_MANAGER_HH_
 
 
 #endif // _MOOF_MANAGER_HH_
 
-/** vim: set ts=4 sw=4 tw=80: *************************************************/
-
index 45c6e90b7ee02543df9bed379ac519291529aaaa..429320768c98aae2b1adf4a7643cf9095acb2f50 100644 (file)
@@ -1,30 +1,13 @@
 
 
-/*******************************************************************************
-
- Copyright (c) 2009, Charles McGarvey
- All rights reserved.
- Redistribution   and   use  in  source  and  binary  forms,  with  or  without
- modification, are permitted provided that the following conditions are met:
-   * Redistributions  of  source  code  must retain the above copyright notice,
-     this list of conditions and the following disclaimer.
-   * Redistributions  in binary form must reproduce the above copyright notice,
-     this  list of conditions and the following disclaimer in the documentation
-     and/or other materials provided with the distribution.
- THIS  SOFTWARE  IS  PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND  ANY  EXPRESS  OR  IMPLIED  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED.  IN  NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- FOR  ANY  DIRECT,  INDIRECT,  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES  (INCLUDING,  BUT  NOT  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- SERVICES;  LOSS  OF  USE,  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- CAUSED  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-*******************************************************************************/
+/*]  Copyright (c) 2009-2010, Charles McGarvey  [**************************
+**]  All rights reserved.
+*
+* vi:ts=4 sw=4 tw=75
+*
+* Distributable under the terms and conditions of the 2-clause BSD license;
+* see the file COPYING for a complete text of the license.
+*
+**************************************************************************/
 
 #ifndef _MOOF_MATH_HH_
 #define _MOOF_MATH_HH_
 
 #ifndef _MOOF_MATH_HH_
 #define _MOOF_MATH_HH_
@@ -157,10 +140,10 @@ inline bool isEqual(Scalar a, Scalar b, Scalar epsilon = EPSILON)
 
 
 
 
 
 
-// Here are some generic implementations of a few simple integrators.  To use,
-// you need one type representing the state and another containing the
-// derivatives of the primary state variables.  The state class must implement
-// these methods:
+// Here are some generic implementations of a few simple integrators.  To
+// use, you need one type representing the state and another containing the
+// derivatives of the primary state variables.  The state class must
+// implement these methods:
 //
 // void getDerivative(Derivative_Type& derivative, Scalar absoluteTime);
 // void step(const Derivative_Type& derivative, Scalar deltaTime);
 //
 // void getDerivative(Derivative_Type& derivative, Scalar absoluteTime);
 // void step(const Derivative_Type& derivative, Scalar deltaTime);
@@ -219,5 +202,3 @@ inline void rk4(S& state, Scalar t, Scalar dt)
 
 #endif // _MOOF_MATH_HH_
 
 
 #endif // _MOOF_MATH_HH_
 
-/** vim: set ts=4 sw=4 tw=80: *************************************************/
-
index f630cb6a21c64c5cab567a46e8880a10f376813a..8bb6741f80148dfbf5b9d3d8c3d1d11348d91a24 100644 (file)
@@ -1,30 +1,13 @@
 
 
-/*******************************************************************************
-
- Copyright (c) 2009, Charles McGarvey
- All rights reserved.
- Redistribution   and   use  in  source  and  binary  forms,  with  or  without
- modification, are permitted provided that the following conditions are met:
-   * Redistributions  of  source  code  must retain the above copyright notice,
-     this list of conditions and the following disclaimer.
-   * Redistributions  in binary form must reproduce the above copyright notice,
-     this  list of conditions and the following disclaimer in the documentation
-     and/or other materials provided with the distribution.
- THIS  SOFTWARE  IS  PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND  ANY  EXPRESS  OR  IMPLIED  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED.  IN  NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- FOR  ANY  DIRECT,  INDIRECT,  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES  (INCLUDING,  BUT  NOT  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- SERVICES;  LOSS  OF  USE,  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- CAUSED  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-*******************************************************************************/
+/*]  Copyright (c) 2009-2010, Charles McGarvey  [**************************
+**]  All rights reserved.
+*
+* vi:ts=4 sw=4 tw=75
+*
+* Distributable under the terms and conditions of the 2-clause BSD license;
+* see the file COPYING for a complete text of the license.
+*
+**************************************************************************/
 
 #ifndef _MOOF_MODALDIALOG_HH_
 #define _MOOF_MODALDIALOG_HH_
 
 #ifndef _MOOF_MODALDIALOG_HH_
 #define _MOOF_MODALDIALOG_HH_
@@ -135,11 +118,12 @@ struct ModalDialog
                                GTK_DIALOG_DESTROY_WITH_PARENT, iconType,
                                GTK_BUTTONS_CLOSE, "%s", text1.c_str());
                gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(dialog),
                                GTK_DIALOG_DESTROY_WITH_PARENT, iconType,
                                GTK_BUTTONS_CLOSE, "%s", text1.c_str());
                gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(dialog),
-                               "%s", text2.c_str());
+                                                                                                "%s", text2.c_str());
                gtk_window_set_title(GTK_WINDOW(dialog), title.c_str());
 
                std::string iconPath = Resource::getPath(PACKAGE".png");
                gtk_window_set_title(GTK_WINDOW(dialog), title.c_str());
 
                std::string iconPath = Resource::getPath(PACKAGE".png");
-               GdkPixbuf* iconPixbuf = gdk_pixbuf_new_from_file(iconPath.c_str(), NULL);
+               GdkPixbuf* iconPixbuf = gdk_pixbuf_new_from_file(iconPath.c_str(),
+                                                                                                                NULL);
                gtk_window_set_icon(GTK_WINDOW(dialog), iconPixbuf);
 
                gtk_dialog_run(GTK_DIALOG(dialog));
                gtk_window_set_icon(GTK_WINDOW(dialog), iconPixbuf);
 
                gtk_dialog_run(GTK_DIALOG(dialog));
@@ -189,5 +173,3 @@ struct ModalDialog
 
 #endif // _MOOF_MODALDIALOG_HH_
 
 
 #endif // _MOOF_MODALDIALOG_HH_
 
-/** vim: set ts=4 sw=4 tw=80: *************************************************/
-
index 301b420852a4262486cf561449ce64bbe259cc79..155995934728e73b7721cc7c3f4765567d6bacb6 100644 (file)
@@ -1,30 +1,13 @@
 
 
-/*******************************************************************************
-
- Copyright (c) 2009, Charles McGarvey
- All rights reserved.
- Redistribution   and   use  in  source  and  binary  forms,  with  or  without
- modification, are permitted provided that the following conditions are met:
-   * Redistributions  of  source  code  must retain the above copyright notice,
-     this list of conditions and the following disclaimer.
-   * Redistributions  in binary form must reproduce the above copyright notice,
-     this  list of conditions and the following disclaimer in the documentation
-     and/or other materials provided with the distribution.
- THIS  SOFTWARE  IS  PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND  ANY  EXPRESS  OR  IMPLIED  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED.  IN  NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- FOR  ANY  DIRECT,  INDIRECT,  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES  (INCLUDING,  BUT  NOT  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- SERVICES;  LOSS  OF  USE,  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- CAUSED  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-*******************************************************************************/
+/*]  Copyright (c) 2009-2010, Charles McGarvey  [**************************
+**]  All rights reserved.
+*
+* vi:ts=4 sw=4 tw=75
+*
+* Distributable under the terms and conditions of the 2-clause BSD license;
+* see the file COPYING for a complete text of the license.
+*
+**************************************************************************/
 
 #ifndef _MOOF_OCTREE_HH_
 #define _MOOF_OCTREE_HH_
 
 #ifndef _MOOF_OCTREE_HH_
 #define _MOOF_OCTREE_HH_
@@ -33,7 +16,6 @@
 #include <list>
 
 #include <boost/shared_ptr.hpp>
 #include <list>
 
 #include <boost/shared_ptr.hpp>
-
 #include <stlplus/ntree.hpp>
 
 #include <Moof/Aabb.hh>
 #include <stlplus/ntree.hpp>
 
 #include <Moof/Aabb.hh>
@@ -369,5 +351,3 @@ public:
 
 #endif // _MOOF_OCTREE_HH_
 
 
 #endif // _MOOF_OCTREE_HH_
 
-/** vim: set ts=4 sw=4 tw=80: *************************************************/
-
index 1e37b5e1f86d3be952826fab83e514ebe858ad53..2fc919779682dd725b179a59ecd9b2a746236ce7 100644 (file)
@@ -1,30 +1,13 @@
 
 
-/*******************************************************************************
-
- Copyright (c) 2009, Charles McGarvey
- All rights reserved.
- Redistribution   and   use  in  source  and  binary  forms,  with  or  without
- modification, are permitted provided that the following conditions are met:
-   * Redistributions  of  source  code  must retain the above copyright notice,
-     this list of conditions and the following disclaimer.
-   * Redistributions  in binary form must reproduce the above copyright notice,
-     this  list of conditions and the following disclaimer in the documentation
-     and/or other materials provided with the distribution.
- THIS  SOFTWARE  IS  PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND  ANY  EXPRESS  OR  IMPLIED  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED.  IN  NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- FOR  ANY  DIRECT,  INDIRECT,  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES  (INCLUDING,  BUT  NOT  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- SERVICES;  LOSS  OF  USE,  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- CAUSED  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-*******************************************************************************/
+/*]  Copyright (c) 2009-2010, Charles McGarvey  [**************************
+**]  All rights reserved.
+*
+* vi:ts=4 sw=4 tw=75
+*
+* Distributable under the terms and conditions of the 2-clause BSD license;
+* see the file COPYING for a complete text of the license.
+*
+**************************************************************************/
 
 #ifndef _MOOF_OPENGL_HH_
 #define _MOOF_OPENGL_HH_
 
 #ifndef _MOOF_OPENGL_HH_
 #define _MOOF_OPENGL_HH_
 
 #if USE_DOUBLE_PRECISION
 
 
 #if USE_DOUBLE_PRECISION
 
-#define OPENGL_GENERIC_FUNC(R, N, L)                                                                           \
+#define OPENGL_GENERIC_FUNC(R, N, L)                                                                   \
        inline R gl##N(ARGS_##L) { gl##N##d(PASS_##L); }//
 
        inline R gl##N(ARGS_##L) { gl##N##d(PASS_##L); }//
 
-#define OPENGL_ORDINAL_FUNC(R, N, K)                                                                           \
-       inline R gl##N(ARGS_##S##K) { gl##N##K##d(PASS_##S##K); }                               \
+#define OPENGL_ORDINAL_FUNC(R, N, K)                                                                   \
+       inline R gl##N(ARGS_##S##K) { gl##N##K##d(PASS_##S##K); }                       \
        inline R gl##N(ARGS_##P##K) { gl##N##K##d##v(PASS_##P##K); }//
 
 #else
 
        inline R gl##N(ARGS_##P##K) { gl##N##K##d##v(PASS_##P##K); }//
 
 #else
 
-#define OPENGL_GENERIC_FUNC(R, N, L)                                                                           \
+#define OPENGL_GENERIC_FUNC(R, N, L)                                                                   \
        inline R gl##N(ARGS_##L) { gl##N##f(PASS_##L); }//
 
        inline R gl##N(ARGS_##L) { gl##N##f(PASS_##L); }//
 
-#define OPENGL_ORDINAL_FUNC(R, N, K)                                                                           \
-       inline R gl##N(ARGS_##S##K) { gl##N##K##f(PASS_##S##K); }                               \
+#define OPENGL_ORDINAL_FUNC(R, N, K)                                                                   \
+       inline R gl##N(ARGS_##S##K) { gl##N##K##f(PASS_##S##K); }                       \
        inline R gl##N(ARGS_##P##K) { gl##N##K##f##v(PASS_##P##K); }//
 
 #endif
        inline R gl##N(ARGS_##P##K) { gl##N##K##f##v(PASS_##P##K); }//
 
 #endif
@@ -124,5 +107,3 @@ inline void glGetScalar(GLenum a, GLscalar* b) { glGetFloatv(a, b); }
 
 #endif // _MOOF_OPENGL_HH_
 
 
 #endif // _MOOF_OPENGL_HH_
 
-/** vim: set ts=4 sw=4 tw=80: *************************************************/
-
index 71ea65e614b634d71cc5da6bf9b0f73d8b138eee..5c4d9fd94b04d852cd96d449a7bf24c11b2c01b9 100644 (file)
@@ -1,30 +1,13 @@
 
 
-/*******************************************************************************
-
- Copyright (c) 2009, Charles McGarvey
- All rights reserved.
- Redistribution   and   use  in  source  and  binary  forms,  with  or  without
- modification, are permitted provided that the following conditions are met:
-   * Redistributions  of  source  code  must retain the above copyright notice,
-     this list of conditions and the following disclaimer.
-   * Redistributions  in binary form must reproduce the above copyright notice,
-     this  list of conditions and the following disclaimer in the documentation
-     and/or other materials provided with the distribution.
- THIS  SOFTWARE  IS  PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND  ANY  EXPRESS  OR  IMPLIED  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED.  IN  NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- FOR  ANY  DIRECT,  INDIRECT,  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES  (INCLUDING,  BUT  NOT  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- SERVICES;  LOSS  OF  USE,  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- CAUSED  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-*******************************************************************************/
+/*]  Copyright (c) 2009-2010, Charles McGarvey  [**************************
+**]  All rights reserved.
+*
+* vi:ts=4 sw=4 tw=75
+*
+* Distributable under the terms and conditions of the 2-clause BSD license;
+* see the file COPYING for a complete text of the license.
+*
+**************************************************************************/
 
 #include "Aabb.hh"
 #include "Plane.hh"
 
 #include "Aabb.hh"
 #include "Plane.hh"
@@ -66,5 +49,3 @@ Plane::Halfspace Plane::intersects(const Sphere<3>& sphere) const
 
 } // namespace Mf
 
 
 } // namespace Mf
 
-/** vim: set ts=4 sw=4 tw=80: *************************************************/
-
index b39891790f16a6afc682c9e753642cf8015ebd5e..262a6bd281bfb796eb1832b3f2e68c54761e0dd4 100644 (file)
@@ -1,30 +1,13 @@
 
 
-/*******************************************************************************
-
- Copyright (c) 2009, Charles McGarvey
- All rights reserved.
- Redistribution   and   use  in  source  and  binary  forms,  with  or  without
- modification, are permitted provided that the following conditions are met:
-   * Redistributions  of  source  code  must retain the above copyright notice,
-     this list of conditions and the following disclaimer.
-   * Redistributions  in binary form must reproduce the above copyright notice,
-     this  list of conditions and the following disclaimer in the documentation
-     and/or other materials provided with the distribution.
- THIS  SOFTWARE  IS  PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND  ANY  EXPRESS  OR  IMPLIED  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED.  IN  NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- FOR  ANY  DIRECT,  INDIRECT,  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES  (INCLUDING,  BUT  NOT  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- SERVICES;  LOSS  OF  USE,  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- CAUSED  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-*******************************************************************************/
+/*]  Copyright (c) 2009-2010, Charles McGarvey  [**************************
+**]  All rights reserved.
+*
+* vi:ts=4 sw=4 tw=75
+*
+* Distributable under the terms and conditions of the 2-clause BSD license;
+* see the file COPYING for a complete text of the license.
+*
+**************************************************************************/
 
 #ifndef _MOOF_PLANE_HH_
 #define _MOOF_PLANE_HH_
 
 #ifndef _MOOF_PLANE_HH_
 #define _MOOF_PLANE_HH_
@@ -41,8 +24,8 @@ template <int D> class Sphere;
 
 
 /*
 
 
 /*
- * A plane in 3-space defined by the equation Ax + By + Cz = D, where [A, B, C]
- * is normal to the plane.
+ * A plane in 3-space defined by the equation Ax + By + Cz = D, where [A,
+ * B, C] is normal to the plane.
  */
 
 struct Plane : public Shape<3>
  */
 
 struct Plane : public Shape<3>
@@ -97,9 +80,10 @@ struct Plane : public Shape<3>
        }
 
 
        }
 
 
-       /* Causes the normal of the plane to become normalized.  The scalar may also
-        * be changed to keep the equation true.  Word to the wise: don't normalize
-        * a plane if the normal is the zero vector. */
+       /* Causes the normal of the plane to become normalized.  The scalar may
+        * also be changed to keep the equation true.  Word to the wise: don't
+        * normalize a plane if the normal is the zero vector.
+        */
        void normalize()
        {
                Scalar mag = normal.length();
        void normalize()
        {
                Scalar mag = normal.length();
@@ -109,8 +93,8 @@ struct Plane : public Shape<3>
        }
 
        /**
        }
 
        /**
-        * Determine the shortest distance between a point and the plane. */
-
+        * Determine the shortest distance between a point and the plane.
+        */
        Scalar getDistanceToPoint(const Vector3& point) const
        {
                return cml::dot(point, normal) + d;
        Scalar getDistanceToPoint(const Vector3& point) const
        {
                return cml::dot(point, normal) + d;
@@ -134,5 +118,3 @@ struct Plane : public Shape<3>
 
 #endif // _MOOF_PLANE_HH_
 
 
 #endif // _MOOF_PLANE_HH_
 
-/** vim: set ts=4 sw=4 tw=80: *************************************************/
-
index 5a693d29be996da95d2065b3e617ad971971a6cc..1564087dcf4482bde9cada95e9084f60bc8ec82a 100644 (file)
@@ -1,30 +1,13 @@
 
 
-/*******************************************************************************
-
- Copyright (c) 2009, Charles McGarvey
- All rights reserved.
- Redistribution   and   use  in  source  and  binary  forms,  with  or  without
- modification, are permitted provided that the following conditions are met:
-   * Redistributions  of  source  code  must retain the above copyright notice,
-     this list of conditions and the following disclaimer.
-   * Redistributions  in binary form must reproduce the above copyright notice,
-     this  list of conditions and the following disclaimer in the documentation
-     and/or other materials provided with the distribution.
- THIS  SOFTWARE  IS  PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND  ANY  EXPRESS  OR  IMPLIED  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED.  IN  NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- FOR  ANY  DIRECT,  INDIRECT,  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES  (INCLUDING,  BUT  NOT  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- SERVICES;  LOSS  OF  USE,  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- CAUSED  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-*******************************************************************************/
+/*]  Copyright (c) 2009-2010, Charles McGarvey  [**************************
+**]  All rights reserved.
+*
+* vi:ts=4 sw=4 tw=75
+*
+* Distributable under the terms and conditions of the 2-clause BSD license;
+* see the file COPYING for a complete text of the license.
+*
+**************************************************************************/
 
 #ifndef _MOOF_RAY_HH_
 #define _MOOF_RAY_HH_
 
 #ifndef _MOOF_RAY_HH_
 #define _MOOF_RAY_HH_
@@ -70,7 +53,7 @@ struct Ray : public Drawable
        void draw(Scalar alpha = 0.0) const
        {
                Vector end = point + 1000.0 * direction;
        void draw(Scalar alpha = 0.0) const
        {
                Vector end = point + 1000.0 * direction;
-               // TODO this is kinda cheesy
+               // FIXME this is kinda cheesy
 
                Mf::Texture::resetBind();
                glBegin(GL_LINES);
 
                Mf::Texture::resetBind();
                glBegin(GL_LINES);
@@ -90,5 +73,3 @@ struct Ray : public Drawable
 
 #endif // _MOOF_RAY_HH_
 
 
 #endif // _MOOF_RAY_HH_
 
-/** vim: set ts=4 sw=4 tw=80: *************************************************/
-
index fef6ac46bbbf12e6eea5fc5de798548011acfd0b..949c22a2395deb23fc9454f06fa3e8878377c409 100644 (file)
@@ -1,30 +1,13 @@
 
 
-/*******************************************************************************
-
- Copyright (c) 2009, Charles McGarvey
- All rights reserved.
- Redistribution   and   use  in  source  and  binary  forms,  with  or  without
- modification, are permitted provided that the following conditions are met:
-   * Redistributions  of  source  code  must retain the above copyright notice,
-     this list of conditions and the following disclaimer.
-   * Redistributions  in binary form must reproduce the above copyright notice,
-     this  list of conditions and the following disclaimer in the documentation
-     and/or other materials provided with the distribution.
- THIS  SOFTWARE  IS  PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND  ANY  EXPRESS  OR  IMPLIED  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED.  IN  NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- FOR  ANY  DIRECT,  INDIRECT,  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES  (INCLUDING,  BUT  NOT  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- SERVICES;  LOSS  OF  USE,  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- CAUSED  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-*******************************************************************************/
+/*]  Copyright (c) 2009-2010, Charles McGarvey  [**************************
+**]  All rights reserved.
+*
+* vi:ts=4 sw=4 tw=75
+*
+* Distributable under the terms and conditions of the 2-clause BSD license;
+* see the file COPYING for a complete text of the license.
+*
+**************************************************************************/
 
 #include "Rectangle.hh"
 
 
 #include "Rectangle.hh"
 
@@ -47,5 +30,3 @@ void Rectangle::getCorners(Vector2 corners[4]) const
 
 } // namespace Mf
 
 
 } // namespace Mf
 
-/** vim: set ts=4 sw=4 tw=80: *************************************************/
-
index 634491c020e4498d2edf6d3e1a74b3f4c0c8369e..e41b879cc2e85ba3cd4d71057495c2c0c376d42e 100644 (file)
@@ -1,30 +1,13 @@
 
 
-/*******************************************************************************
-
- Copyright (c) 2009, Charles McGarvey
- All rights reserved.
- Redistribution   and   use  in  source  and  binary  forms,  with  or  without
- modification, are permitted provided that the following conditions are met:
-   * Redistributions  of  source  code  must retain the above copyright notice,
-     this list of conditions and the following disclaimer.
-   * Redistributions  in binary form must reproduce the above copyright notice,
-     this  list of conditions and the following disclaimer in the documentation
-     and/or other materials provided with the distribution.
- THIS  SOFTWARE  IS  PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND  ANY  EXPRESS  OR  IMPLIED  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED.  IN  NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- FOR  ANY  DIRECT,  INDIRECT,  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES  (INCLUDING,  BUT  NOT  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- SERVICES;  LOSS  OF  USE,  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- CAUSED  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-*******************************************************************************/
+/*]  Copyright (c) 2009-2010, Charles McGarvey  [**************************
+**]  All rights reserved.
+*
+* vi:ts=4 sw=4 tw=75
+*
+* Distributable under the terms and conditions of the 2-clause BSD license;
+* see the file COPYING for a complete text of the license.
+*
+**************************************************************************/
 
 #ifndef _MOOF_RECTANGLE_HH_
 #define _MOOF_RECTANGLE_HH_
 
 #ifndef _MOOF_RECTANGLE_HH_
 #define _MOOF_RECTANGLE_HH_
@@ -98,5 +81,3 @@ struct Rectangle
 
 #endif // _MOOF_RECTANGLE_HH_
 
 
 #endif // _MOOF_RECTANGLE_HH_
 
-/** vim: set ts=4 sw=4 tw=80: *************************************************/
-
index ec940257045ea6650bf479f197eed0df9f91b60c..ca127a9be54a101f6b501ecdc408cc6f9db4edb0 100644 (file)
@@ -1,30 +1,13 @@
 
 
-/*******************************************************************************
-
- Copyright (c) 2009, Charles McGarvey
- All rights reserved.
- Redistribution   and   use  in  source  and  binary  forms,  with  or  without
- modification, are permitted provided that the following conditions are met:
-   * Redistributions  of  source  code  must retain the above copyright notice,
-     this list of conditions and the following disclaimer.
-   * Redistributions  in binary form must reproduce the above copyright notice,
-     this  list of conditions and the following disclaimer in the documentation
-     and/or other materials provided with the distribution.
- THIS  SOFTWARE  IS  PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND  ANY  EXPRESS  OR  IMPLIED  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED.  IN  NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- FOR  ANY  DIRECT,  INDIRECT,  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES  (INCLUDING,  BUT  NOT  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- SERVICES;  LOSS  OF  USE,  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- CAUSED  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-*******************************************************************************/
+/*]  Copyright (c) 2009-2010, Charles McGarvey  [**************************
+**]  All rights reserved.
+*
+* vi:ts=4 sw=4 tw=75
+*
+* Distributable under the terms and conditions of the 2-clause BSD license;
+* see the file COPYING for a complete text of the license.
+*
+**************************************************************************/
 
 #include <unistd.h>
 
 
 #include <unistd.h>
 
@@ -102,5 +85,3 @@ std::string Resource::getPath(const std::string& name)
 
 } // namespace Mf
 
 
 } // namespace Mf
 
-/** vim: set ts=4 sw=4 tw=80: *************************************************/
-
index 671aeb65bc3329c69666ba31a0451d7ff1913c52..8446d0896b715cd626a2444e97172903a6c00fa6 100644 (file)
@@ -1,30 +1,13 @@
 
 
-/*******************************************************************************
-
- Copyright (c) 2009, Charles McGarvey
- All rights reserved.
- Redistribution   and   use  in  source  and  binary  forms,  with  or  without
- modification, are permitted provided that the following conditions are met:
-   * Redistributions  of  source  code  must retain the above copyright notice,
-     this list of conditions and the following disclaimer.
-   * Redistributions  in binary form must reproduce the above copyright notice,
-     this  list of conditions and the following disclaimer in the documentation
-     and/or other materials provided with the distribution.
- THIS  SOFTWARE  IS  PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND  ANY  EXPRESS  OR  IMPLIED  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED.  IN  NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- FOR  ANY  DIRECT,  INDIRECT,  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES  (INCLUDING,  BUT  NOT  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- SERVICES;  LOSS  OF  USE,  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- CAUSED  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-*******************************************************************************/
+/*]  Copyright (c) 2009-2010, Charles McGarvey  [**************************
+**]  All rights reserved.
+*
+* vi:ts=4 sw=4 tw=75
+*
+* Distributable under the terms and conditions of the 2-clause BSD license;
+* see the file COPYING for a complete text of the license.
+*
+**************************************************************************/
 
 #ifndef _MOOF_RESOURCE_HH_
 #define _MOOF_RESOURCE_HH_
 
 #ifndef _MOOF_RESOURCE_HH_
 #define _MOOF_RESOURCE_HH_
@@ -62,8 +45,8 @@ public:
 
        /**
         * Get the path to a resource of a given name.
 
        /**
         * Get the path to a resource of a given name.
-        * @param name Name of a resource.  The name will be appended to each search
-        * directory in order.
+        * @param name Name of a resource.  The name will be appended to each
+        * search directory in order.
         * @return The first path found which resolves to a file.
         */
 
         * @return The first path found which resolves to a file.
         */
 
@@ -79,5 +62,3 @@ private:
 
 #endif // _MOOF_RESOURCE_HH_
 
 
 #endif // _MOOF_RESOURCE_HH_
 
-/** vim: set ts=4 sw=4 tw=80: *************************************************/
-
index e7dee3861652d4c0baa30cd43002db8ae4a8e8da..ad6e33ff67c2135115dfe0b2700bdb863bc99686 100644 (file)
@@ -1,30 +1,13 @@
 
 
-/*******************************************************************************
-
- Copyright (c) 2009, Charles McGarvey
- All rights reserved.
- Redistribution   and   use  in  source  and  binary  forms,  with  or  without
- modification, are permitted provided that the following conditions are met:
-   * Redistributions  of  source  code  must retain the above copyright notice,
-     this list of conditions and the following disclaimer.
-   * Redistributions  in binary form must reproduce the above copyright notice,
-     this  list of conditions and the following disclaimer in the documentation
-     and/or other materials provided with the distribution.
- THIS  SOFTWARE  IS  PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND  ANY  EXPRESS  OR  IMPLIED  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED.  IN  NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- FOR  ANY  DIRECT,  INDIRECT,  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES  (INCLUDING,  BUT  NOT  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- SERVICES;  LOSS  OF  USE,  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- CAUSED  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-*******************************************************************************/
+/*]  Copyright (c) 2009-2010, Charles McGarvey  [**************************
+**]  All rights reserved.
+*
+* vi:ts=4 sw=4 tw=75
+*
+* Distributable under the terms and conditions of the 2-clause BSD license;
+* see the file COPYING for a complete text of the license.
+*
+**************************************************************************/
 
 #ifndef _MOOF_RIGIDBODY_HH_
 #define _MOOF_RIGIDBODY_HH_
 
 #ifndef _MOOF_RIGIDBODY_HH_
 #define _MOOF_RIGIDBODY_HH_
@@ -44,8 +27,9 @@ namespace Mf {
 template <int D = 3>
 struct LinearState
 {
 template <int D = 3>
 struct LinearState
 {
-       typedef cml::vector< Scalar, cml::fixed<D> >                            Vector;
-       typedef boost::function<const Vector& (const LinearState&)>     ForceFunction;
+       typedef cml::vector< Scalar, cml::fixed<D> >    Vector;
+       typedef boost::function<const Vector& (const LinearState&)>
+                                                                                                       ForceFunction;
 
        // primary
        
 
        // primary
        
@@ -257,26 +241,28 @@ inline T interpolate(const T& a, const T& b, Scalar alpha)
 }
 
 template <>
 }
 
 template <>
-inline State2 interpolate<State2>(const State2& a, const State2& b, Scalar alpha)
+inline State2 interpolate<State2>(const State2& a, const State2& b,
+                                                                 Scalar alpha)
 {
        State2 state(b);
        state.position = interpolate(a.position, b.position, alpha);
        state.momentum = interpolate(a.momentum, b.momentum, alpha);
        state.orientation = interpolate(a.orientation, b.orientation, alpha);
 {
        State2 state(b);
        state.position = interpolate(a.position, b.position, alpha);
        state.momentum = interpolate(a.momentum, b.momentum, alpha);
        state.orientation = interpolate(a.orientation, b.orientation, alpha);
-       state.angularMomentum = interpolate(a.angularMomentum, b.angularMomentum,
-                       alpha);
+       state.angularMomentum = interpolate(a.angularMomentum,
+                                                                               b.angularMomentum, alpha);
        return state;
 }
 
 template <>
        return state;
 }
 
 template <>
-inline State3 interpolate<State3>(const State3& a, const State3& b, Scalar alpha)
+inline State3 interpolate<State3>(const State3& a, const State3& b,
+                                                                 Scalar alpha)
 {
        State3 state(b);
        state.position = interpolate(a.position, b.position, alpha);
        state.momentum = interpolate(a.momentum, b.momentum, alpha);
        state.orientation = cml::slerp(a.orientation, b.orientation, alpha);
 {
        State3 state(b);
        state.position = interpolate(a.position, b.position, alpha);
        state.momentum = interpolate(a.momentum, b.momentum, alpha);
        state.orientation = cml::slerp(a.orientation, b.orientation, alpha);
-       state.angularMomentum = interpolate(a.angularMomentum, b.angularMomentum,
-                       alpha);
+       state.angularMomentum = interpolate(a.angularMomentum,
+                                                                               b.angularMomentum, alpha);
        return state;
 }
 
        return state;
 }
 
@@ -328,5 +314,3 @@ typedef RigidBody<State3> RigidBody3;
 
 #endif // _MOOF_RIGIDBODY_HH_
 
 
 #endif // _MOOF_RIGIDBODY_HH_
 
-/** vim: set ts=4 sw=4 tw=80: *************************************************/
-
index 9e8827abc78d5c3fb254a379b5540b64626cee21..9af54402ae74846e88418531d8b679e71595c02d 100644 (file)
@@ -1,41 +1,24 @@
 
 
-/*******************************************************************************
-
- Copyright (c) 2009, Charles McGarvey
- All rights reserved.
- Redistribution   and   use  in  source  and  binary  forms,  with  or  without
- modification, are permitted provided that the following conditions are met:
-   * Redistributions  of  source  code  must retain the above copyright notice,
-     this list of conditions and the following disclaimer.
-   * Redistributions  in binary form must reproduce the above copyright notice,
-     this  list of conditions and the following disclaimer in the documentation
-     and/or other materials provided with the distribution.
- THIS  SOFTWARE  IS  PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND  ANY  EXPRESS  OR  IMPLIED  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED.  IN  NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- FOR  ANY  DIRECT,  INDIRECT,  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES  (INCLUDING,  BUT  NOT  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- SERVICES;  LOSS  OF  USE,  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- CAUSED  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-*******************************************************************************/
+/*]  Copyright (c) 2009-2010, Charles McGarvey  [**************************
+**]  All rights reserved.
+*
+* vi:ts=4 sw=4 tw=75
+*
+* Distributable under the terms and conditions of the 2-clause BSD license;
+* see the file COPYING for a complete text of the license.
+*
+**************************************************************************/
 
 #ifndef _MOOF_SCRIPT_HH_
 #define _MOOF_SCRIPT_HH_
 
 /**
  * @file Script.hh
 
 #ifndef _MOOF_SCRIPT_HH_
 #define _MOOF_SCRIPT_HH_
 
 /**
  * @file Script.hh
- * A thin wrapper over Lua.  This is not meant as a complicated binding package
- * between C++ and Lua.  It does not try to make the boundary invisible.  It
- * does not hide the concept of the Lua stack, but rather provides that
- * mechanism with a certain level of abstraction while also providing a cleaner,
- * more consistent API.
+ * A thin wrapper over Lua.  This is not meant as a complicated binding
+ * package between C++ and Lua.  It does not try to make the boundary
+ * invisible.  It does not hide the concept of the Lua stack, but rather
+ * provides that mechanism with a certain level of abstraction while also
+ * providing a cleaner, more consistent API.
  */
 
 #include <iostream>
  */
 
 #include <iostream>
@@ -47,7 +30,6 @@
 #include <boost/bind.hpp>
 #include <boost/function.hpp>
 #include <boost/shared_ptr.hpp>
 #include <boost/bind.hpp>
 #include <boost/function.hpp>
 #include <boost/shared_ptr.hpp>
-
 #include <lua.hpp>
 
 #include <Moof/Log.hh>
 #include <lua.hpp>
 
 #include <Moof/Log.hh>
@@ -99,40 +81,42 @@ public:
        };
 
        /**
        };
 
        /**
-        * This is the most prominent abstraction on top of the standard Lua API.
-        * A Slot object represents a value on the stack.  More specifically, it
-        * represents a position on the stack.  The distinction is only important
-        * when objects are moved around on the stack or if the Slot represents a
-        * negative index on the stack (the value of which will change as things are
-        * pushed onto and popped from the stack).
+        * This is the most prominent abstraction on top of the standard Lua
+        * API.  A Slot object represents a value on the stack.  More
+        * specifically, it represents a position on the stack.  The
+        * distinction is only important when objects are moved around on the
+        * stack or if the Slot represents a negative index on the stack (the
+        * value of which will change as things are pushed onto and popped from
+        * the stack).
         */
 
        struct Slot
        {
                /**
         */
 
        struct Slot
        {
                /**
-                * You have direct access to the index of the value on the stack being
-                * represented.
+                * You have direct access to the index of the value on the stack
+                * being represented.
                 */
 
                int index;
 
 
                /**
                 */
 
                int index;
 
 
                /**
-                * A default-constructed Slot is invalid until a valid Slot is assigned
-                * to it.  The only method that should be called on such a Slot is
-                * isValid(), otherwise chaos may ensue.  In this case, the Slot will be
-                * invalid even if index is manually changed to a valid index.  You have
-                * to index the script itself to get a valid Slot.
+                * A default-constructed Slot is invalid until a valid Slot is
+                * assigned to it.  The only method that should be called on such a
+                * Slot is isValid(), otherwise chaos may ensue.  In this case, the
+                * Slot will be invalid even if index is manually changed to a
+                * valid index.  You have to index the script itself to get a valid
+                * Slot.
                 */
                Slot(lua_State* s = 0, int i = 0) :
                        index(i),
                        mState(s) {}
 
                /**
                 */
                Slot(lua_State* s = 0, int i = 0) :
                        index(i),
                        mState(s) {}
 
                /**
-                * A copied value presently points to the same value, except the real
-                * index is used.  That means that if a value that refers to a frame
-                * referenced from the top of the stack will have its normalized index
-                * copied into the new value object.
+                * A copied value presently points to the same value, except the
+                * real index is used.  That means that if a value that refers to a
+                * frame referenced from the top of the stack will have its
+                * normalized index copied into the new value object.
                 */
 
                Slot(const Slot& copy) :
                 */
 
                Slot(const Slot& copy) :
@@ -141,30 +125,43 @@ public:
 
 
                // check the type of the value
 
 
                // check the type of the value
-               bool isBoolean() const   { return (bool)lua_isboolean(mState, index); }
-               bool isFunction() const  { return (bool)lua_isfunction(mState, index); }
-               bool isNil() const       { return (bool)lua_isnil(mState, index); }
-               bool isNone() const      { return (bool)lua_isnone(mState, index); }
-               bool isValid() const     { return mState != 0 && !isNone(); }
-               bool isNoneOrNil() const { return (bool)lua_isnoneornil(mState, index); }
-               bool isNumber() const    { return (bool)lua_isnumber(mState, index); }
-               bool isString() const    { return (bool)lua_isstring(mState, index); }
-               bool isTable() const     { return (bool)lua_istable(mState, index); }
-               bool isThread() const    { return (bool)lua_isthread(mState, index); }
-               bool isData() const      { return (bool)lua_isuserdata(mState, index); }
-               bool isLightData() const { return (bool)lua_islightuserdata(mState, index); }
+               bool isBoolean() const
+               { return (bool)lua_isboolean(mState, index); }
+               bool isFunction() const
+               { return (bool)lua_isfunction(mState, index); }
+               bool isNil() const
+               { return (bool)lua_isnil(mState, index); }
+               bool isNone() const
+               { return (bool)lua_isnone(mState, index); }
+               bool isValid() const
+               { return mState != 0 && !isNone(); }
+               bool isNoneOrNil() const
+               { return (bool)lua_isnoneornil(mState, index); }
+               bool isNumber() const
+               { return (bool)lua_isnumber(mState, index); }
+               bool isString() const
+               { return (bool)lua_isstring(mState, index); }
+               bool isTable() const
+               { return (bool)lua_istable(mState, index); }
+               bool isThread() const
+               { return (bool)lua_isthread(mState, index); }
+               bool isData() const
+               { return (bool)lua_isuserdata(mState, index); }
+               bool isLightData() const
+               { return (bool)lua_islightuserdata(mState, index); }
 
                /**
 
                /**
-                * Check the value and throw an error if its the wrong type.  There's a
-                * little caveat: This method never returns because it does a long jump.
-                * Consequently, constructed C++ objects which exist on the stack
-                * between the current frame and some lua function will not be
-                * destructed.  That's not a problem for objects that only exist on the
-                * stack, but any objects that allocate memory on the heap (such as
-                * containers or strings) will leak.  Therefore, you should only call
-                * this method after cleaning up such objects.  The best thing to do for
-                * defining functions is to simply check all the parameters at the
-                * get-go before any C++ objects are even constructed.
+                * Check the value and throw an error if its the wrong type.
+                * There's a little caveat: This method never returns because it
+                * does a long jump.  Consequently, constructed C++ objects which
+                * exist on the stack between the current frame and some lua
+                * function will not be destructed.  That's not a problem for
+                * objects that only exist on the stack, but any objects that
+                * allocate memory on the heap (such as containers or strings) will
+                * leak.  Therefore, you should only call this method after
+                * cleaning up such objects.  The best thing to do for defining
+                * functions is to simply check all the parameters at the get-go
+                * before any C++ objects are even constructed.
                 */
 
                void requireType(Type type) const
                 */
 
                void requireType(Type type) const
@@ -243,7 +240,8 @@ public:
 
 
                /**
 
 
                /**
-                * Get the length of the value according to the definition given by Lua.
+                * Get the length of the value according to the definition given by
+                * Lua.
                 */
 
                size_t getLength() const
                 */
 
                size_t getLength() const
@@ -259,7 +257,8 @@ public:
 
 
                /**
 
 
                /**
-                * Get a pointer value (for userdata, tables, threads, and functions).
+                * Get a pointer value (for userdata, tables, threads, and
+                * functions).
                 */
 
                const void* getIdentifier() const
                 */
 
                const void* getIdentifier() const
@@ -438,8 +437,8 @@ public:
                }
 
                /**
                }
 
                /**
-                * Inserts the top-most value on the stack at position index, shifting other
-                * values as needed.
+                * Inserts the top-most value on the stack at position index,
+                * shifting other values as needed.
                 */
 
                void insertTopHere()
                 */
 
                void insertTopHere()
@@ -618,13 +617,14 @@ public:
 
 
        /**
 
 
        /**
-        * Throw an error with the value at the top of the stack.  This method never
-        * returns because it does a long jump.  Consequently, constructed C++
-        * objects  which exist on the stack between the current frame and some lua
-        * function will not be destructed.  That's not a problem for objects that
-        * only exist on the stack, but any objects that allocate memory on the heap
-        * (such as containers or strings) will leak.  Therefore, you should only
-        * call this method after cleaning up such objects.
+        * Throw an error with the value at the top of the stack.  This method
+        * never returns because it does a long jump.  Consequently,
+        * constructed C++ objects  which exist on the stack between the
+        * current frame and some lua function will not be destructed.  That's
+        * not a problem for objects that only exist on the stack, but any
+        * objects that allocate memory on the heap (such as containers or
+        * strings) will leak.  Therefore, you should only call this method
+        * after cleaning up such objects.
         */
 
        void throwError()
         */
 
        void throwError()
@@ -658,7 +658,8 @@ public:
        }
 
        /**
        }
 
        /**
-        * Get the size of the stack; this is also the index of the top-most value.
+        * Get the size of the stack; this is also the index of the top-most
+        * value.
         */
 
        int getSize() const
         */
 
        int getSize() const
@@ -678,11 +679,11 @@ public:
 
 
        /**
 
 
        /**
-        * Makes sure there is at least extra more places on the stack.  Returns
-        * false if space couldn't be created.  Just like with the regular Lua API,
-        * you are responsible to make sure the stack is big enough to hold whatever
-        * you want to push on it.  This is usually only an issue if you're pushing
-        * stuff in a loop.
+        * Makes sure there is at least extra more places on the stack.
+        * Returns false if space couldn't be created.  Just like with the
+        * regular Lua API, you are responsible to make sure the stack is big
+        * enough to hold whatever you want to push on it.  This is usually
+        * only an issue if you're pushing stuff in a loop.
         */
 
        bool checkStack(int extra)
         */
 
        bool checkStack(int extra)
@@ -766,7 +767,8 @@ public:
                return (Result)luaL_loadfile(mState, filename.c_str());
        }
 
                return (Result)luaL_loadfile(mState, filename.c_str());
        }
 
-       Result pushCode(const std::string& name, const char* buffer, size_t size)
+       Result pushCode(const std::string& name, const char* buffer,
+                                       size_t size)
        {
                return (Result)luaL_loadbuffer(mState, buffer, size, name.c_str());
        }
        {
                return (Result)luaL_loadbuffer(mState, buffer, size, name.c_str());
        }
@@ -784,9 +786,9 @@ public:
 
        /**
         * Call a function on the stack.  The correct procedure is to push a
 
        /**
         * Call a function on the stack.  The correct procedure is to push a
-        * function onto the stack followed by nargs arguments.  This method will
-        * pop them off upon return, leaving up to nresults return values (default
-        * is any number of return values, depending on the callee).
+        * function onto the stack followed by nargs arguments.  This method
+        * will pop them off upon return, leaving up to nresults return values
+        * (default is any number of return values, depending on the callee).
         */
 
        Result call(int nargs = 0, int nresults = LUA_MULTRET)
         */
 
        Result call(int nargs = 0, int nresults = LUA_MULTRET)
@@ -927,5 +929,3 @@ inline std::ostream& operator << (std::ostream& stream,
 
 #endif // _MOOF_SCRIPT_HH_
 
 
 #endif // _MOOF_SCRIPT_HH_
 
-/** vim: set ts=4 sw=4 tw=80: *************************************************/
-
index 5e19ed599ee511b0abef7306fa9fade271135fd2..94845c2b1380962352d6a86e80b034837efb1ad4 100644 (file)
@@ -1,30 +1,13 @@
 
 
-/*******************************************************************************
-
- Copyright (c) 2009, Charles McGarvey
- All rights reserved.
- Redistribution   and   use  in  source  and  binary  forms,  with  or  without
- modification, are permitted provided that the following conditions are met:
-   * Redistributions  of  source  code  must retain the above copyright notice,
-     this list of conditions and the following disclaimer.
-   * Redistributions  in binary form must reproduce the above copyright notice,
-     this  list of conditions and the following disclaimer in the documentation
-     and/or other materials provided with the distribution.
- THIS  SOFTWARE  IS  PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND  ANY  EXPRESS  OR  IMPLIED  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED.  IN  NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- FOR  ANY  DIRECT,  INDIRECT,  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES  (INCLUDING,  BUT  NOT  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- SERVICES;  LOSS  OF  USE,  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- CAUSED  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-*******************************************************************************/
+/*]  Copyright (c) 2009-2010, Charles McGarvey  [**************************
+**]  All rights reserved.
+*
+* vi:ts=4 sw=4 tw=75
+*
+* Distributable under the terms and conditions of the 2-clause BSD license;
+* see the file COPYING for a complete text of the license.
+*
+**************************************************************************/
 
 #include <cstdlib>             // getenv
 
 
 #include <cstdlib>             // getenv
 
@@ -39,12 +22,6 @@ Settings::~Settings()
        save();
 }
 
        save();
 }
 
-//Settings& Settings::getInstance()
-//{
-       //static Settings settings;
-       //return settings;
-//}
-
 
 void Settings::parseArgs(int argc, char* argv[])
 {
 
 void Settings::parseArgs(int argc, char* argv[])
 {
@@ -115,13 +92,12 @@ void Settings::saveAs(const std::string& path)
 
 void Settings::save() const
 {
 
 void Settings::save() const
 {
+       // TODO saving settings not yet implemented
 }
 
 
 }
 
 
-Settings settings;
+Settings settings;     // global instance
 
 
 } // namepsace Mf
 
 
 
 } // namepsace Mf
 
-/** vim: set ts=4 sw=4 tw=80: *************************************************/
-
index d4cbb9fa0cd47e0a06a0f21a4ea5a3923f6a5d7d..f7503dd7b8d1f34806b5ccce86a185ababdb3065 100644 (file)
@@ -1,30 +1,13 @@
 
 
-/*******************************************************************************
-
- Copyright (c) 2009, Charles McGarvey
- All rights reserved.
- Redistribution   and   use  in  source  and  binary  forms,  with  or  without
- modification, are permitted provided that the following conditions are met:
-   * Redistributions  of  source  code  must retain the above copyright notice,
-     this list of conditions and the following disclaimer.
-   * Redistributions  in binary form must reproduce the above copyright notice,
-     this  list of conditions and the following disclaimer in the documentation
-     and/or other materials provided with the distribution.
- THIS  SOFTWARE  IS  PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND  ANY  EXPRESS  OR  IMPLIED  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED.  IN  NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- FOR  ANY  DIRECT,  INDIRECT,  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES  (INCLUDING,  BUT  NOT  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- SERVICES;  LOSS  OF  USE,  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- CAUSED  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-*******************************************************************************/
+/*]  Copyright (c) 2009-2010, Charles McGarvey  [**************************
+**]  All rights reserved.
+*
+* vi:ts=4 sw=4 tw=75
+*
+* Distributable under the terms and conditions of the 2-clause BSD license;
+* see the file COPYING for a complete text of the license.
+*
+**************************************************************************/
 
 #ifndef _MOOF_SETTINGS_HH_
 #define _MOOF_SETTINGS_HH_
 
 #ifndef _MOOF_SETTINGS_HH_
 #define _MOOF_SETTINGS_HH_
@@ -117,5 +100,3 @@ extern Settings settings;
 
 #endif // _MOOF_SETTINGS_HH_
 
 
 #endif // _MOOF_SETTINGS_HH_
 
-/** vim: set ts=4 sw=4 tw=80: *************************************************/
-
index 626ac3a391299d7d807feba416ba2dbb94d2afe2..c97296004b7a80aa73d5ff3594ed4ae658b38c40 100644 (file)
@@ -1,30 +1,13 @@
 
 
-/*******************************************************************************
-
- Copyright (c) 2009, Charles McGarvey
- All rights reserved.
- Redistribution   and   use  in  source  and  binary  forms,  with  or  without
- modification, are permitted provided that the following conditions are met:
-   * Redistributions  of  source  code  must retain the above copyright notice,
-     this list of conditions and the following disclaimer.
-   * Redistributions  in binary form must reproduce the above copyright notice,
-     this  list of conditions and the following disclaimer in the documentation
-     and/or other materials provided with the distribution.
- THIS  SOFTWARE  IS  PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND  ANY  EXPRESS  OR  IMPLIED  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED.  IN  NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- FOR  ANY  DIRECT,  INDIRECT,  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES  (INCLUDING,  BUT  NOT  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- SERVICES;  LOSS  OF  USE,  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- CAUSED  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-*******************************************************************************/
+/*]  Copyright (c) 2009-2010, Charles McGarvey  [**************************
+**]  All rights reserved.
+*
+* vi:ts=4 sw=4 tw=75
+*
+* Distributable under the terms and conditions of the 2-clause BSD license;
+* see the file COPYING for a complete text of the license.
+*
+**************************************************************************/
 
 #ifndef _MOOF_SHAPE_HH_
 #define _MOOF_SHAPE_HH_
 
 #ifndef _MOOF_SHAPE_HH_
 #define _MOOF_SHAPE_HH_
@@ -63,13 +46,13 @@ public:
        virtual ~Shape() {}
 
        /**
        virtual ~Shape() {}
 
        /**
-        * Checks if this shape is intersected by a given ray.  If so, returns the
-        * distance from the start of the ray to the shape and information about the
-        * intersection via the 2nd parameter.  A negative value is returned if
-        * there is no intersection.
+        * Checks if this shape is intersected by a given ray.  If so, returns
+        * the distance from the start of the ray to the shape and information
+        * about the intersection via the 2nd parameter.  A negative value is
+        * returned if there is no intersection.
         */
        virtual bool intersectRay(const Ray<D>& ray,
         */
        virtual bool intersectRay(const Ray<D>& ray,
-                       typename Ray<D>::Intersection& hit)
+                                                         typename Ray<D>::Intersection& hit)
        {
                return SCALAR(-1.0);
        }
        {
                return SCALAR(-1.0);
        }
@@ -80,5 +63,3 @@ public:
 
 #endif // _MOOF_SHAPE_HH_
 
 
 #endif // _MOOF_SHAPE_HH_
 
-/** vim: set ts=4 sw=4 tw=80: *************************************************/
-
index f8f05baf75717aa376ae85eaebc950fc79d8db5e..c78b35c613b972d919b51de87db0c4cbc215d503 100644 (file)
@@ -1,30 +1,13 @@
 
 
-/*******************************************************************************
-
- Copyright (c) 2009, Charles McGarvey
- All rights reserved.
- Redistribution   and   use  in  source  and  binary  forms,  with  or  without
- modification, are permitted provided that the following conditions are met:
-   * Redistributions  of  source  code  must retain the above copyright notice,
-     this list of conditions and the following disclaimer.
-   * Redistributions  in binary form must reproduce the above copyright notice,
-     this  list of conditions and the following disclaimer in the documentation
-     and/or other materials provided with the distribution.
- THIS  SOFTWARE  IS  PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND  ANY  EXPRESS  OR  IMPLIED  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED.  IN  NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- FOR  ANY  DIRECT,  INDIRECT,  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES  (INCLUDING,  BUT  NOT  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- SERVICES;  LOSS  OF  USE,  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- CAUSED  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-*******************************************************************************/
+/*]  Copyright (c) 2009-2010, Charles McGarvey  [**************************
+**]  All rights reserved.
+*
+* vi:ts=4 sw=4 tw=75
+*
+* Distributable under the terms and conditions of the 2-clause BSD license;
+* see the file COPYING for a complete text of the license.
+*
+**************************************************************************/
 
 #include <cstdio>
 #include <deque>
 
 #include <cstdio>
 #include <deque>
@@ -98,7 +81,7 @@ public:
                        if (result < 0)
                        {
                                logWarning << "couldn't load sound: " << path << std::endl;
                        if (result < 0)
                        {
                                logWarning << "couldn't load sound: " << path << std::endl;
-                               throw Error(Error::UNKNOWN_AUDIO_FORMAT, path);
+                               Error(Error::UNKNOWN_AUDIO_FORMAT, path).raise();
                        }
 
                        vorbis_info* vorbisInfo = ov_info(&mOggStream, -1);
                        }
 
                        vorbis_info* vorbisInfo = ov_info(&mOggStream, -1);
@@ -338,7 +321,8 @@ public:
                                {
                                        // nothing more to play, stopping...
                                        mIsPlaying = false;
                                {
                                        // nothing more to play, stopping...
                                        mIsPlaying = false;
-                                       std::remove(mBuffers.begin(), mBuffers.end(), bufferObj);
+                                       std::remove(mBuffers.begin(), mBuffers.end(),
+                                                               bufferObj);
                                }
                        }
                }
                                }
                        }
                }
@@ -346,8 +330,8 @@ public:
                ALenum state;
                alGetSourcei(mSource, AL_SOURCE_STATE, &state);
 
                ALenum state;
                alGetSourcei(mSource, AL_SOURCE_STATE, &state);
 
-               // restart playing if we're stopped but supposed to be playing... this
-               // means we didn't queue enough and the audio skipped :-(
+               // restart playing if we're stopped but supposed to be playing...
+               // this means we didn't queue enough and the audio skipped :-(
                if (mIsPlaying && state != AL_PLAYING)
                {
                        alSourcePlay(mSource);
                if (mIsPlaying && state != AL_PLAYING)
                {
                        alSourcePlay(mSource);
@@ -425,8 +409,8 @@ public:
        {
                // don't let the music die!
                update();
        {
                // don't let the music die!
                update();
-               // TODO - might be nice to also allow using threads for streaming rather
-               // than a timer, probably as a compile-time option
+               // TODO - might be nice to also allow using threads for streaming
+               // rather than a timer, probably as a compile-time option
        }
 
        static void retainBackend()
        }
 
        static void retainBackend()
@@ -446,7 +430,8 @@ public:
                        {
                                alcMakeContextCurrent(gAlContext);
                                logInfo << "opened sound device `"
                        {
                                alcMakeContextCurrent(gAlContext);
                                logInfo << "opened sound device `"
-                                               << alcGetString(gAlDevice, ALC_DEFAULT_DEVICE_SPECIFIER)
+                                               << alcGetString(gAlDevice,
+                                                                               ALC_DEFAULT_DEVICE_SPECIFIER)
                                                << "'" << std::endl;
                        }
                }
                                                << "'" << std::endl;
                        }
                }
@@ -563,21 +548,18 @@ void Sound::setLooping(bool looping)
 
 void Sound::setListenerPosition(const Vector3& position)
 {
 
 void Sound::setListenerPosition(const Vector3& position)
 {
-       //alListener3f(AL_POSITION, float(position[0]), float(position[1]),
-                       //float(position[2]));
        float vec[] = {position[0], position[1], position[2]};
        alListenerfv(AL_POSITION, vec);
 }
 
 void Sound::setListenerVelocity(const Vector3& velocity)
 {
        float vec[] = {position[0], position[1], position[2]};
        alListenerfv(AL_POSITION, vec);
 }
 
 void Sound::setListenerVelocity(const Vector3& velocity)
 {
-       //alListener3f(AL_VELOCITY, float(velocity[0]), float(velocity[1]),
-                       //float(velocity[2]));
        float vec[] = {velocity[0], velocity[1], velocity[2]};
        alListenerfv(AL_VELOCITY, vec);
 }
 
        float vec[] = {velocity[0], velocity[1], velocity[2]};
        alListenerfv(AL_VELOCITY, vec);
 }
 
-void Sound::setListenerOrientation(const Vector3& forward, const Vector3& up)
+void Sound::setListenerOrientation(const Vector3& forward,
+                                                                  const Vector3& up)
 {
        float vec[6];
        vec[0] = float(forward[0]);
 {
        float vec[6];
        vec[0] = float(forward[0]);
@@ -606,7 +588,7 @@ std::string Sound::getPath(const std::string& name)
 }
 
 
 }
 
 
-//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 
 void SoundStream::enqueue(const std::string& name)
 
 
 void SoundStream::enqueue(const std::string& name)
@@ -625,5 +607,3 @@ void SoundStream::play()
 
 } // namespace Mf
 
 
 } // namespace Mf
 
-/** vim: set ts=4 sw=4 tw=80: *************************************************/
-
index 14cd79041ac10cbdc2e0b53d4f295b5090bc26b6..d3cfa895f4743e747a89fa7f984d8f80c6c6a562 100644 (file)
@@ -1,30 +1,13 @@
 
 
-/*******************************************************************************
-
- Copyright (c) 2009, Charles McGarvey
- All rights reserved.
- Redistribution   and   use  in  source  and  binary  forms,  with  or  without
- modification, are permitted provided that the following conditions are met:
-   * Redistributions  of  source  code  must retain the above copyright notice,
-     this list of conditions and the following disclaimer.
-   * Redistributions  in binary form must reproduce the above copyright notice,
-     this  list of conditions and the following disclaimer in the documentation
-     and/or other materials provided with the distribution.
- THIS  SOFTWARE  IS  PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND  ANY  EXPRESS  OR  IMPLIED  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED.  IN  NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- FOR  ANY  DIRECT,  INDIRECT,  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES  (INCLUDING,  BUT  NOT  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- SERVICES;  LOSS  OF  USE,  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- CAUSED  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-*******************************************************************************/
+/*]  Copyright (c) 2009-2010, Charles McGarvey  [**************************
+**]  All rights reserved.
+*
+* vi:ts=4 sw=4 tw=75
+*
+* Distributable under the terms and conditions of the 2-clause BSD license;
+* see the file COPYING for a complete text of the license.
+*
+**************************************************************************/
 
 #ifndef _MOOF_SOUND_HH_
 #define _MOOF_SOUND_HH_
 
 #ifndef _MOOF_SOUND_HH_
 #define _MOOF_SOUND_HH_
@@ -34,6 +17,8 @@
  * Load and play sounds, current supports ogg vorbis.
  */
 
  * Load and play sounds, current supports ogg vorbis.
  */
 
+#include <string>
+
 #include <boost/shared_ptr.hpp>
 
 #include <Moof/Math.hh>
 #include <boost/shared_ptr.hpp>
 
 #include <Moof/Math.hh>
@@ -83,7 +68,7 @@ public:
        static void setListenerPosition(const Vector3& position);
        static void setListenerVelocity(const Vector3& velocity);
        static void setListenerOrientation(const Vector3& forward,
        static void setListenerPosition(const Vector3& position);
        static void setListenerVelocity(const Vector3& velocity);
        static void setListenerOrientation(const Vector3& forward,
-                       const Vector3& up);
+                                                                          const Vector3& up);
 
        static std::string getPath(const std::string& name);
 
 
        static std::string getPath(const std::string& name);
 
@@ -117,5 +102,3 @@ public:
 
 #endif // _MOOF_SOUND_HH_
 
 
 #endif // _MOOF_SOUND_HH_
 
-/** vim: set ts=4 sw=4 tw=80: *************************************************/
-
index aa2c139166e223cf00db45709cb428210ee4c181..03db01208edaa2cf66c1b9ca307a9a3b3f411c92 100644 (file)
@@ -1,30 +1,13 @@
 
 
-/*******************************************************************************
-
- Copyright (c) 2009, Charles McGarvey
- All rights reserved.
- Redistribution   and   use  in  source  and  binary  forms,  with  or  without
- modification, are permitted provided that the following conditions are met:
-   * Redistributions  of  source  code  must retain the above copyright notice,
-     this list of conditions and the following disclaimer.
-   * Redistributions  in binary form must reproduce the above copyright notice,
-     this  list of conditions and the following disclaimer in the documentation
-     and/or other materials provided with the distribution.
- THIS  SOFTWARE  IS  PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND  ANY  EXPRESS  OR  IMPLIED  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED.  IN  NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- FOR  ANY  DIRECT,  INDIRECT,  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES  (INCLUDING,  BUT  NOT  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- SERVICES;  LOSS  OF  USE,  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- CAUSED  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-*******************************************************************************/
+/*]  Copyright (c) 2009-2010, Charles McGarvey  [**************************
+**]  All rights reserved.
+*
+* vi:ts=4 sw=4 tw=75
+*
+* Distributable under the terms and conditions of the 2-clause BSD license;
+* see the file COPYING for a complete text of the license.
+*
+**************************************************************************/
 
 #include "Frustum.hh"
 #include "OpenGL.hh"
 
 #include "Frustum.hh"
 #include "OpenGL.hh"
@@ -63,5 +46,3 @@ bool Sphere::isVisible(const Frustum& frustum) const
 
 } // namespace Mf
 
 
 } // namespace Mf
 
-/** vim: set ts=4 sw=4 tw=80: *************************************************/
-
index f1847091c6d0afcc9bad1cbbabcddfdb7cb78dfe..3cd1ec7a073c05b00988ea97c2c4565afb89ba8c 100644 (file)
@@ -1,30 +1,13 @@
 
 
-/*******************************************************************************
-
- Copyright (c) 2009, Charles McGarvey
- All rights reserved.
- Redistribution   and   use  in  source  and  binary  forms,  with  or  without
- modification, are permitted provided that the following conditions are met:
-   * Redistributions  of  source  code  must retain the above copyright notice,
-     this list of conditions and the following disclaimer.
-   * Redistributions  in binary form must reproduce the above copyright notice,
-     this  list of conditions and the following disclaimer in the documentation
-     and/or other materials provided with the distribution.
- THIS  SOFTWARE  IS  PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND  ANY  EXPRESS  OR  IMPLIED  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED.  IN  NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- FOR  ANY  DIRECT,  INDIRECT,  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES  (INCLUDING,  BUT  NOT  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- SERVICES;  LOSS  OF  USE,  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- CAUSED  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-*******************************************************************************/
+/*]  Copyright (c) 2009-2010, Charles McGarvey  [**************************
+**]  All rights reserved.
+*
+* vi:ts=4 sw=4 tw=75
+*
+* Distributable under the terms and conditions of the 2-clause BSD license;
+* see the file COPYING for a complete text of the license.
+*
+**************************************************************************/
 
 #ifndef _MOOF_SPHERE_HH_
 #define _MOOF_SPHERE_HH_
 
 #ifndef _MOOF_SPHERE_HH_
 #define _MOOF_SPHERE_HH_
@@ -36,6 +19,7 @@
 #include <Moof/OpenGL.hh>
 #include <Moof/Shape.hh>
 
 #include <Moof/OpenGL.hh>
 #include <Moof/Shape.hh>
 
+// TODO this needs work
 
 namespace Mf {
 
 
 namespace Mf {
 
@@ -106,30 +90,30 @@ struct Sphere : public Cullable, public Drawable, public Shape<D>
        //void draw(Scalar alpha = 0.0) const;
        //bool isVisible(const Frustum& frustum) const;
 
        //void draw(Scalar alpha = 0.0) const;
        //bool isVisible(const Frustum& frustum) const;
 
-void encloseVertices(const Vector vertices[], unsigned count)
-{
-       // TODO
-}
+       void encloseVertices(const Vector vertices[], unsigned count)
+       {
+               // TODO
+       }
 
 
-void draw(Scalar alpha = 0.0) const;
-//{
-       //GLUquadricObj* sphereObj = gluNewQuadric();
-       //gluQuadricDrawStyle(sphereObj, GLU_LINE);
+       void draw(Scalar alpha = 0.0) const;
+       //{
+               //GLUquadricObj* sphereObj = gluNewQuadric();
+               //gluQuadricDrawStyle(sphereObj, GLU_LINE);
 
 
-       //glPushMatrix();
+               //glPushMatrix();
 
 
-       //glTranslate(point);
-       //gluSphere(sphereObj, GLdouble(radius), 16, 16);
+               //glTranslate(point);
+               //gluSphere(sphereObj, GLdouble(radius), 16, 16);
 
 
-       //glPopMatrix();
+               //glPopMatrix();
 
 
-       //gluDeleteQuadric(sphereObj);
-//}
+               //gluDeleteQuadric(sphereObj);
+       //}
 
 
-bool isVisible(const Frustum& frustum) const
-{
-       return true;
-}
+       bool isVisible(const Frustum& frustum) const
+       {
+               return true;
+       }
 };
 
 
 };
 
 
@@ -183,5 +167,3 @@ inline bool checkCollision(const Sphere<D>& a, const Sphere<D>& b)
 
 #endif // _MOOF_SPHERE_HH_
 
 
 #endif // _MOOF_SPHERE_HH_
 
-/** vim: set ts=4 sw=4 tw=80: *************************************************/
-
index f4bd967a2c86cfcde22cabb24da4caeb03efa8b8..34d2f61a72addb98bd2252a7f3f8a06e4bbb76ab 100644 (file)
@@ -1,41 +1,25 @@
 
 
-/*******************************************************************************
-
- Copyright (c) 2009, Charles McGarvey
- All rights reserved.
- Redistribution   and   use  in  source  and  binary  forms,  with  or  without
- modification, are permitted provided that the following conditions are met:
-   * Redistributions  of  source  code  must retain the above copyright notice,
-     this list of conditions and the following disclaimer.
-   * Redistributions  in binary form must reproduce the above copyright notice,
-     this  list of conditions and the following disclaimer in the documentation
-     and/or other materials provided with the distribution.
- THIS  SOFTWARE  IS  PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND  ANY  EXPRESS  OR  IMPLIED  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED.  IN  NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- FOR  ANY  DIRECT,  INDIRECT,  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES  (INCLUDING,  BUT  NOT  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- SERVICES;  LOSS  OF  USE,  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- CAUSED  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-*******************************************************************************/
+/*]  Copyright (c) 2009-2010, Charles McGarvey  [**************************
+**]  All rights reserved.
+*
+* vi:ts=4 sw=4 tw=75
+*
+* Distributable under the terms and conditions of the 2-clause BSD license;
+* see the file COPYING for a complete text of the license.
+*
+**************************************************************************/
 
 #include <stdexcept>
 
 #include "ConvertUTF.h"
 
 #include <stdexcept>
 
 #include "ConvertUTF.h"
-
 #include "StringTools.hh"
 
 
 namespace Mf {
 
 
 #include "StringTools.hh"
 
 
 namespace Mf {
 
 
+// TODO this code is ugly
+
 std::wstring multiToWide(const std::string& multiStr)
 {
        size_t length = multiStr.length();
 std::wstring multiToWide(const std::string& multiStr)
 {
        size_t length = multiStr.length();
@@ -155,5 +139,3 @@ std::string wideToMulti(const std::wstring& wideStr)
 
 } // namespace Mf
 
 
 } // namespace Mf
 
-/** vim: set ts=4 sw=4 tw=80: *************************************************/
-
index 44bd74f49c4dd34ed901ea918759df8702b452a8..7b69bb07676eb5a5d736e611e43d8cf31491d877 100644 (file)
@@ -1,30 +1,13 @@
 
 
-/*******************************************************************************
-
- Copyright (c) 2009, Charles McGarvey
- All rights reserved.
- Redistribution   and   use  in  source  and  binary  forms,  with  or  without
- modification, are permitted provided that the following conditions are met:
-   * Redistributions  of  source  code  must retain the above copyright notice,
-     this list of conditions and the following disclaimer.
-   * Redistributions  in binary form must reproduce the above copyright notice,
-     this  list of conditions and the following disclaimer in the documentation
-     and/or other materials provided with the distribution.
- THIS  SOFTWARE  IS  PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND  ANY  EXPRESS  OR  IMPLIED  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED.  IN  NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- FOR  ANY  DIRECT,  INDIRECT,  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES  (INCLUDING,  BUT  NOT  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- SERVICES;  LOSS  OF  USE,  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- CAUSED  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-*******************************************************************************/
+/*]  Copyright (c) 2009-2010, Charles McGarvey  [**************************
+**]  All rights reserved.
+*
+* vi:ts=4 sw=4 tw=75
+*
+* Distributable under the terms and conditions of the 2-clause BSD license;
+* see the file COPYING for a complete text of the license.
+*
+**************************************************************************/
 
 #ifndef _MOOF_STRINGTOOLS_HH_
 #define _MOOF_STRINGTOOLS_HH_
 
 #ifndef _MOOF_STRINGTOOLS_HH_
 #define _MOOF_STRINGTOOLS_HH_
@@ -42,5 +25,3 @@ std::string wideToMulti(const std::wstring& wideStr);
 
 #endif // _MOOF_STRINGTOOLS_HH_
 
 
 #endif // _MOOF_STRINGTOOLS_HH_
 
-/** vim: set ts=4 sw=4 tw=80: *************************************************/
-
index 801acbae227f89d7a58970a1e97ed836a008391a..48e6e1b6193909766df411c85757ab6393201a41 100644 (file)
@@ -1,30 +1,13 @@
 
 
-/*******************************************************************************
-
- Copyright (c) 2009, Charles McGarvey
- All rights reserved.
- Redistribution   and   use  in  source  and  binary  forms,  with  or  without
- modification, are permitted provided that the following conditions are met:
-   * Redistributions  of  source  code  must retain the above copyright notice,
-     this list of conditions and the following disclaimer.
-   * Redistributions  in binary form must reproduce the above copyright notice,
-     this  list of conditions and the following disclaimer in the documentation
-     and/or other materials provided with the distribution.
- THIS  SOFTWARE  IS  PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND  ANY  EXPRESS  OR  IMPLIED  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED.  IN  NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- FOR  ANY  DIRECT,  INDIRECT,  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES  (INCLUDING,  BUT  NOT  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- SERVICES;  LOSS  OF  USE,  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- CAUSED  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-*******************************************************************************/
+/*]  Copyright (c) 2009-2010, Charles McGarvey  [**************************
+**]  All rights reserved.
+*
+* vi:ts=4 sw=4 tw=75
+*
+* Distributable under the terms and conditions of the 2-clause BSD license;
+* see the file COPYING for a complete text of the license.
+*
+**************************************************************************/
 
 #include <cstdio>              // FILE
 #include <cstring>             // strncmp
 
 #include <cstdio>              // FILE
 #include <cstring>             // strncmp
@@ -46,12 +29,13 @@ namespace Mf {
 
 
 /**
 
 
 /**
- * The texture implementation just contains all the information about the image
- * which is worth having in memory.  The image data itself is not worth keeping
- * in memory if the texture has been loaded to GL, but the name of the resource
- * is retained so that it can be reloaded if necessary.  The implementation is a
- * manager so that multiple texture objects can share the same internal objects
- * and avoid having duplicate textures loaded to GL.
+ * The texture implementation just contains all the information about the
+ * image which is worth having in memory.  The image data itself is not
+ * worth keeping in memory if the texture has been loaded to GL, but the
+ * name of the resource is retained so that it can be reloaded if
+ * necessary.  The implementation is a manager so that multiple texture
+ * objects can share the same internal objects and avoid having duplicate
+ * textures loaded to GL.
  */
 
 class Texture::Impl : public Manager<Impl>
  */
 
 class Texture::Impl : public Manager<Impl>
@@ -76,9 +60,9 @@ class Texture::Impl : public Manager<Impl>
        }
 
        /**
        }
 
        /**
-        * If the GL context was recreated, we need to reload the texture.  This may
-        * involve reading it from disk again, but hopefully the OS was smart enough
-        * to cache it if the client has plenty of RAM.
+        * If the GL context was recreated, we need to reload the texture.
+        * This may involve reading it from disk again, but hopefully the OS
+        * was smart enough to cache it if the client has plenty of RAM.
         */
 
        void contextRecreated()
         */
 
        void contextRecreated()
@@ -88,8 +72,9 @@ class Texture::Impl : public Manager<Impl>
        }
 
        /**
        }
 
        /**
-        * This is a helper method used by some of the texture loading code.  It
-        * returns the first power of two which is greater than the input value.
+        * This is a helper method used by some of the texture loading code.
+        * It returns the first power of two which is greater than the input
+        * value.
         */
 
        static int powerOfTwo(int input)
         */
 
        static int powerOfTwo(int input)
@@ -110,10 +95,14 @@ class Texture::Impl : public Manager<Impl>
                script.push(GL_REPEAT); script.set("REPEAT");
                script.push(GL_LINEAR); script.set("LINEAR");
                script.push(GL_NEAREST); script.set("NEAREST");
                script.push(GL_REPEAT); script.set("REPEAT");
                script.push(GL_LINEAR); script.set("LINEAR");
                script.push(GL_NEAREST); script.set("NEAREST");
-               script.push(GL_LINEAR_MIPMAP_LINEAR); script.set("LINEAR_MIPMAP_LINEAR");
-               script.push(GL_LINEAR_MIPMAP_NEAREST); script.set("LINEAR_MIPMAP_NEAREST");
-               script.push(GL_NEAREST_MIPMAP_LINEAR); script.set("NEAREST_MIPMAP_LINEAR");
-               script.push(GL_NEAREST_MIPMAP_NEAREST); script.set("NEAREST_MIPMAP_NEAREST");
+               script.push(GL_LINEAR_MIPMAP_LINEAR);
+               script.set("LINEAR_MIPMAP_LINEAR");
+               script.push(GL_LINEAR_MIPMAP_NEAREST);
+               script.set("LINEAR_MIPMAP_NEAREST");
+               script.push(GL_NEAREST_MIPMAP_LINEAR);
+               script.set("NEAREST_MIPMAP_LINEAR");
+               script.push(GL_NEAREST_MIPMAP_NEAREST);
+               script.set("NEAREST_MIPMAP_NEAREST");
        }
 
 public:
        }
 
 public:
@@ -132,7 +121,8 @@ public:
                mObject(0)
        {
                // make sure we have a video context
                mObject(0)
        {
                // make sure we have a video context
-               ASSERT(video && "cannot load textures without a current video context");
+               ASSERT(video &&
+                          "cannot load textures without a current video context");
 
                // we want to know when the GL context is recreated
                mDispatchHandler = core.addHandler("video.newcontext",
 
                // we want to know when the GL context is recreated
                mDispatchHandler = core.addHandler("video.newcontext",
@@ -146,10 +136,10 @@ public:
 
 
        /**
 
 
        /**
-        * Adapted from some public domain code.  This stuff is common enough that
-        * it really should be included in SDL_image...  We need this because images
-        * loaded with SDL_image aren't exactly GL-ready right out of the box.  This
-        * method makes them ready.
+        * Adapted from some public domain code.  This stuff is common enough
+        * that it really should be included in SDL_image...  We need this
+        * because images loaded with SDL_image aren't exactly GL-ready right
+        * out of the box.  This method makes them ready.
         */
 
        /*
         */
 
        /*
@@ -158,16 +148,17 @@ public:
                int w = powerOfTwo(surface->w);
                int h = powerOfTwo(surface->h);
 
                int w = powerOfTwo(surface->w);
                int h = powerOfTwo(surface->h);
 
-               // 2. OpenGL textures make more sense within the coordinate system when
-               // they are "upside down," so let's flip it.
+               // 2. OpenGL textures make more sense within the coordinate system
+               // when they are "upside down," so let's flip it.
 
                flipSurface(surface);
 
 
                flipSurface(surface);
 
-               // 1. OpenGL images must (generally) have dimensions of a power-of-two.
-               // If this one doesn't, we can at least be more friendly by expanding
-               // the dimensions so that they are, though there will be some empty
-               // space within the range of normal texture coordinates.  It's better if
-               // textures are the right size to begin with.
+               // 1. OpenGL images must (generally) have dimensions of a
+               // power-of-two.  If this one doesn't, we can at least be more
+               // friendly by expanding the dimensions so that they are, though
+               // there will be some empty space within the range of normal
+               // texture coordinates.  It's better if textures are the right size
+               // to begin with.
 
                SDL_Surface* image = SDL_CreateRGBSurface
                (
 
                SDL_Surface* image = SDL_CreateRGBSurface
                (
@@ -216,8 +207,8 @@ public:
        */
 
        /**
        */
 
        /**
-        * Use SDL_image to load images from file.  A surface with the image data is
-        * returned.
+        * Use SDL_image to load images from file.  A surface with the image
+        * data is returned.
         * @return Image data.
         */
 
         * @return Image data.
         */
 
@@ -247,7 +238,8 @@ public:
                }
                else
                {
                }
                else
                {
-                       Mf::logInfo << "loading tiles from texture " << path << std::endl;
+                       Mf::logInfo << "loading tiles from texture " << path
+                                               << std::endl;
 
                        Mf::Script::Slot globals = script.getGlobalTable();
                        Mf::Script::Slot top = script[-1];
 
                        Mf::Script::Slot globals = script.getGlobalTable();
                        Mf::Script::Slot top = script[-1];
@@ -309,8 +301,8 @@ public:
 
 
        /**
 
 
        /**
-        * Sets some texture properties such as the filters and external coordinate
-        * behavior.
+        * Sets some texture properties such as the filters and external
+        * coordinate behavior.
         */
 
        void setProperties()
         */
 
        void setProperties()
@@ -373,8 +365,7 @@ public:
                Scalar h = 1.0 / Scalar(mTilesT);
 
                coords[0] = Scalar(index % mTilesS) * w;
                Scalar h = 1.0 / Scalar(mTilesT);
 
                coords[0] = Scalar(index % mTilesS) * w;
-               coords[1] = (Scalar(mTilesT - 1) -
-                               Scalar(index / mTilesS)) * h;
+               coords[1] = (Scalar(mTilesT - 1) - Scalar(index / mTilesS)) * h;
                coords[2] = coords[0] + w;
                coords[3] = coords[1];
                coords[4] = coords[2];
                coords[2] = coords[0] + w;
                coords[3] = coords[1];
                coords[4] = coords[2];
@@ -387,15 +378,15 @@ public:
 
        ImageP                          mImage;
 
 
        ImageP                          mImage;
 
-       GLuint                          mMinFilter;             ///< Minification filter.
-       GLuint                          mMagFilter;             ///< Magnification filter.
-       GLuint                          mWrapS;                 ///< Wrapping behavior horizontally.
-       GLuint                          mWrapT;                 ///< Wrapping behavior vertically.
+       GLuint                          mMinFilter;     ///< Minification filter.
+       GLuint                          mMagFilter;     ///< Magnification filter.
+       GLuint                          mWrapS;         ///< Wrapping behavior horizontally.
+       GLuint                          mWrapT;         ///< Wrapping behavior vertically.
        unsigned                        mTilesS;
        unsigned                        mTilesT;
 
        unsigned                        mTilesS;
        unsigned                        mTilesT;
 
-       GLuint                          mObject;                ///< GL texture handle.
-       static GLuint           gObject;                ///< Global GL texture handle.
+       GLuint                          mObject;        ///< GL texture handle.
+       static GLuint           gObject;        ///< Global GL texture handle.
 
        Dispatch::Handler       mDispatchHandler;
 };
 
        Dispatch::Handler       mDispatchHandler;
 };
@@ -516,5 +507,3 @@ std::string Texture::getPath(const std::string& name)
 
 } // namespace Mf
 
 
 } // namespace Mf
 
-/** vim: set ts=4 sw=4 tw=80: *************************************************/
-
index 41add2bca92638f135dc1b58abea615cb32f3d72..27ec414369c8bdb2493c30f25c1563fbaa4479db 100644 (file)
@@ -1,30 +1,13 @@
 
 
-/*******************************************************************************
-
- Copyright (c) 2009, Charles McGarvey
- All rights reserved.
- Redistribution   and   use  in  source  and  binary  forms,  with  or  without
- modification, are permitted provided that the following conditions are met:
-   * Redistributions  of  source  code  must retain the above copyright notice,
-     this list of conditions and the following disclaimer.
-   * Redistributions  in binary form must reproduce the above copyright notice,
-     this  list of conditions and the following disclaimer in the documentation
-     and/or other materials provided with the distribution.
- THIS  SOFTWARE  IS  PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND  ANY  EXPRESS  OR  IMPLIED  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED.  IN  NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- FOR  ANY  DIRECT,  INDIRECT,  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES  (INCLUDING,  BUT  NOT  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- SERVICES;  LOSS  OF  USE,  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- CAUSED  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-*******************************************************************************/
+/*]  Copyright (c) 2009-2010, Charles McGarvey  [**************************
+**]  All rights reserved.
+*
+* vi:ts=4 sw=4 tw=75
+*
+* Distributable under the terms and conditions of the 2-clause BSD license;
+* see the file COPYING for a complete text of the license.
+*
+**************************************************************************/
 
 #ifndef _MOOF_TEXTURE_HH_
 #define _MOOF_TEXTURE_HH_
 
 #ifndef _MOOF_TEXTURE_HH_
 #define _MOOF_TEXTURE_HH_
@@ -34,6 +17,8 @@
  * Image-loading and OpenGL texture loading.
  */
 
  * Image-loading and OpenGL texture loading.
  */
 
+#include <string>
+
 #include <boost/shared_ptr.hpp>
 
 #include <Moof/Image.hh>
 #include <boost/shared_ptr.hpp>
 
 #include <Moof/Image.hh>
@@ -86,14 +71,16 @@ public:
 
 
        /**
 
 
        /**
-        * Calculate texture coordinates for a tile at a certain index.  Tiles are
-        * indexed start with zero as the to-left tile and moving across, then down.
+        * Calculate texture coordinates for a tile at a certain index.  Tiles
+        * are indexed start with zero as the to-left tile and moving across,
+        * then down.
         * @param index The tile index.
         * @param index The tile index.
-        * @param coords An array of scalars where the texture coordinates will be
-        * stored after this call.  The first coordinate (u,v) will be in the first
-        * two places and so on until all four coordinates are stored, therefore
-        * requiring enough room for an array of eight scalars.  The winding of the
-        * coordinates is always counter-clockwise (the GL default).
+        * @param coords An array of scalars where the texture coordinates will
+        * be stored after this call.  The first coordinate (u,v) will be in
+        * the first two places and so on until all four coordinates are
+        * stored, therefore requiring enough room for an array of eight
+        * scalars.  The winding of the coordinates is always counter-clockwise
+        * (the GL default).
         * @return True if index is valid, false otherwise.
         */
 
         * @return True if index is valid, false otherwise.
         */
 
@@ -101,14 +88,16 @@ public:
 
 
        /**
 
 
        /**
-        * This version let's you specify an orientation that will be reflected in
-        * the texture coordinates.  This allows you to easily map a texture
+        * This version let's you specify an orientation that will be reflected
+        * in the texture coordinates.  This allows you to easily map a texture
         * backwards or upside-down.
         * backwards or upside-down.
-        * @param what The orientation; can be flip, reverse, or flip_and_reverse.
+        * @param what The orientation; can be flip, reverse, or
+        * flip_and_reverse.
         * @return True if index is valid, false otherwise.
         */
 
         * @return True if index is valid, false otherwise.
         */
 
-       bool getTileCoords(TileIndex index, Scalar coords[8], Orientation what) const;
+       bool getTileCoords(TileIndex index, Scalar coords[8],
+                                          Orientation what) const;
 
 
        static std::string getPath(const std::string& name);
 
 
        static std::string getPath(const std::string& name);
@@ -124,5 +113,3 @@ private:
 
 #endif // _MOOF_TEXTURE_HH_
 
 
 #endif // _MOOF_TEXTURE_HH_
 
-/** vim: set ts=4 sw=4 tw=80: *************************************************/
-
index 74952fa3411e99e211c971ce005ac36e406dcbb0..52a878a553d68ebf26d33320dfebb2494a9af457 100644 (file)
@@ -1,30 +1,13 @@
 
 
-/*******************************************************************************
-
- Copyright (c) 2009, Charles McGarvey
- All rights reserved.
- Redistribution   and   use  in  source  and  binary  forms,  with  or  without
- modification, are permitted provided that the following conditions are met:
-   * Redistributions  of  source  code  must retain the above copyright notice,
-     this list of conditions and the following disclaimer.
-   * Redistributions  in binary form must reproduce the above copyright notice,
-     this  list of conditions and the following disclaimer in the documentation
-     and/or other materials provided with the distribution.
- THIS  SOFTWARE  IS  PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND  ANY  EXPRESS  OR  IMPLIED  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED.  IN  NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- FOR  ANY  DIRECT,  INDIRECT,  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES  (INCLUDING,  BUT  NOT  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- SERVICES;  LOSS  OF  USE,  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- CAUSED  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-*******************************************************************************/
+/*]  Copyright (c) 2009-2010, Charles McGarvey  [**************************
+**]  All rights reserved.
+*
+* vi:ts=4 sw=4 tw=75
+*
+* Distributable under the terms and conditions of the 2-clause BSD license;
+* see the file COPYING for a complete text of the license.
+*
+**************************************************************************/
 
 #ifndef _MOOF_THREAD_HH_
 #define _MOOF_THREAD_HH_
 
 #ifndef _MOOF_THREAD_HH_
 #define _MOOF_THREAD_HH_
@@ -35,7 +18,6 @@
  */
 
 #include <boost/function.hpp>
  */
 
 #include <boost/function.hpp>
-
 #include <SDL/SDL.h>
 
 
 #include <SDL/SDL.h>
 
 
@@ -98,7 +80,7 @@ inline unsigned getThreadIdentifier(Thread thread)
 }
 
 
 }
 
 
-// =============================================================================
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 class Mutex
 {
 
 class Mutex
 {
@@ -198,7 +180,8 @@ public:
     bool wait(Mutex::Lock& lock, unsigned ms)
        {
                // TODO for consistency, this function should take seconds
     bool wait(Mutex::Lock& lock, unsigned ms)
        {
                // TODO for consistency, this function should take seconds
-        return (SDL_CondWaitTimeout(condition_, lock.mMutex->mMutex, ms) == 0);
+        return (SDL_CondWaitTimeout(condition_,
+                                                                       lock.mMutex->mMutex, ms) == 0);
        }
 
     bool notify()
        }
 
     bool notify()
@@ -301,8 +284,5 @@ private:
 
 } // namespace Mf
 
 
 } // namespace Mf
 
-
 #endif // _MOOF_THREAD_HH_
 
 #endif // _MOOF_THREAD_HH_
 
-/** vim: set ts=4 sw=4 tw=80: *************************************************/
-
index 69d2405622f7031cf134715b053304b39afb5ea2..3e42818962d5df7e124f7edc96ed4384ca3dc171 100644 (file)
@@ -1,30 +1,13 @@
 
 
-/*******************************************************************************
-
- Copyright (c) 2009, Charles McGarvey
- All rights reserved.
- Redistribution   and   use  in  source  and  binary  forms,  with  or  without
- modification, are permitted provided that the following conditions are met:
-   * Redistributions  of  source  code  must retain the above copyright notice,
-     this list of conditions and the following disclaimer.
-   * Redistributions  in binary form must reproduce the above copyright notice,
-     this  list of conditions and the following disclaimer in the documentation
-     and/or other materials provided with the distribution.
- THIS  SOFTWARE  IS  PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND  ANY  EXPRESS  OR  IMPLIED  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED.  IN  NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- FOR  ANY  DIRECT,  INDIRECT,  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES  (INCLUDING,  BUT  NOT  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- SERVICES;  LOSS  OF  USE,  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- CAUSED  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-*******************************************************************************/
+/*]  Copyright (c) 2009-2010, Charles McGarvey  [**************************
+**]  All rights reserved.
+*
+* vi:ts=4 sw=4 tw=75
+*
+* Distributable under the terms and conditions of the 2-clause BSD license;
+* see the file COPYING for a complete text of the license.
+*
+**************************************************************************/
 
 #include <cerrno>
 #include <ctime>
 
 #include <cerrno>
 #include <ctime>
@@ -173,12 +156,12 @@ void Timer::fireIfExpired(Scalar t)
 
 #if HAVE_CLOCK_GETTIME
 
 
 #if HAVE_CLOCK_GETTIME
 
-// Since the monotonic clock will provide us with the time since the computer
-// started, the number of seconds since that time could easily become so large
-// that it cannot be accurately stored in a float (even with as little two days
-// uptime), therefore we need to start from a more recent reference (when the
-// program starts).  Of course this isn't much of an issue if scalar is a
-// double-precision number.
+// Since the monotonic clock will provide us with the time since the
+// computer started, the number of seconds since that time could easily
+// become so large that it cannot be accurately stored in a float (even
+// with as little two days uptime), therefore we need to start from a more
+// recent reference (when the program starts).  Of course this isn't much
+// of an issue if scalar is a double-precision number.
 
 static time_t setReference_()
 {
 
 static time_t setReference_()
 {
@@ -202,7 +185,8 @@ Scalar Timer::getTicks()
        int result = clock_gettime(CLOCK_MONOTONIC, &ts);
        ASSERT(result == 0 && "cannot access clock");
 
        int result = clock_gettime(CLOCK_MONOTONIC, &ts);
        ASSERT(result == 0 && "cannot access clock");
 
-       return Scalar(ts.tv_sec - reference) + Scalar(ts.tv_nsec) / 1000000000.0;
+       return Scalar(ts.tv_sec - reference) +
+                  Scalar(ts.tv_nsec) / 1000000000.0;
 }
 
 void Timer::sleep(Scalar seconds, Mode mode)
 }
 
 void Timer::sleep(Scalar seconds, Mode mode)
@@ -225,9 +209,9 @@ void Timer::sleep(Scalar seconds, Mode mode)
 #else // ! HAVE_CLOCK_GETTIME
 
 
 #else // ! HAVE_CLOCK_GETTIME
 
 
-// If we don't have posix timers, we'll have to use a different timing method.
-// SDL only promises centisecond accuracy, but that's better than a kick in the
-// butt.
+// If we don't have posix timers, we'll have to use a different timing
+// method.  SDL only promises centisecond accuracy, but that's better than
+// a kick in the pants.
 
 Scalar Timer::getTicks()
 {
 
 Scalar Timer::getTicks()
 {
@@ -246,5 +230,3 @@ void Timer::sleep(Scalar seconds, Mode mode)
 
 } // namespace Mf
 
 
 } // namespace Mf
 
-/** vim: set ts=4 sw=4 tw=80: *************************************************/
-
index 246b4b1e0188974ea4dc3b600dd988a2d5bb95d1..4cc848048c5655d38aabe2e89b47d9a9bc9669e4 100644 (file)
@@ -1,30 +1,13 @@
 
 
-/*******************************************************************************
-
- Copyright (c) 2009, Charles McGarvey
- All rights reserved.
- Redistribution   and   use  in  source  and  binary  forms,  with  or  without
- modification, are permitted provided that the following conditions are met:
-   * Redistributions  of  source  code  must retain the above copyright notice,
-     this list of conditions and the following disclaimer.
-   * Redistributions  in binary form must reproduce the above copyright notice,
-     this  list of conditions and the following disclaimer in the documentation
-     and/or other materials provided with the distribution.
- THIS  SOFTWARE  IS  PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND  ANY  EXPRESS  OR  IMPLIED  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED.  IN  NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- FOR  ANY  DIRECT,  INDIRECT,  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES  (INCLUDING,  BUT  NOT  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- SERVICES;  LOSS  OF  USE,  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- CAUSED  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-*******************************************************************************/
+/*]  Copyright (c) 2009-2010, Charles McGarvey  [**************************
+**]  All rights reserved.
+*
+* vi:ts=4 sw=4 tw=75
+*
+* Distributable under the terms and conditions of the 2-clause BSD license;
+* see the file COPYING for a complete text of the license.
+*
+**************************************************************************/
 
 #ifndef _MOOF_TIMER_HH_
 #define _MOOF_TIMER_HH_
 
 #ifndef _MOOF_TIMER_HH_
 #define _MOOF_TIMER_HH_
@@ -73,7 +56,8 @@ public:
                invalidate();
        }
 
                invalidate();
        }
 
-       void init(const Function& function, Scalar seconds, Mode mode = NORMAL);
+       void init(const Function& function, Scalar seconds,
+                         Mode mode = NORMAL);
 
        bool isValid() const;
        void invalidate();
 
        bool isValid() const;
        void invalidate();
@@ -86,7 +70,8 @@ public:
 
 
        /**
 
 
        /**
-        * Get the number of seconds since a fixed, arbitrary point in the past.
+        * Get the number of seconds since a fixed, arbitrary point in the
+        * past.
         * @return Seconds.
         */
 
         * @return Seconds.
         */
 
@@ -94,12 +79,13 @@ public:
 
 
        /**
 
 
        /**
-        * Put the thread to sleep for a certain period of time.  If absolute is true,
-        * then it will sleep until seconds after the fixed time in the past.  If
-        * absolute is false, it will sleep for seconds starting now.  Unlike system
-        * sleep functions, this one automatically resumes sleep if sleep was
-        * interrupted by a signal.  Therefore, calling this function is guaranteed to
-        * sleep for the requested amount of time (and maybe longer).
+        * Put the thread to sleep for a certain period of time.  If absolute
+        * is true, then it will sleep until seconds after the fixed time in
+        * the past.  If absolute is false, it will sleep for seconds starting
+        * now.  Unlike system sleep functions, this one automatically resumes
+        * sleep if sleep was interrupted by a signal.  Therefore, calling this
+        * function is guaranteed to sleep for the requested amount of time
+        * (and maybe longer).
         */
 
        static void sleep(Scalar seconds, Mode mode = NORMAL);
         */
 
        static void sleep(Scalar seconds, Mode mode = NORMAL);
@@ -131,8 +117,5 @@ private:
 
 } // namespace Mf
 
 
 } // namespace Mf
 
-
 #endif // _MOOF_TIMER_HH_
 
 #endif // _MOOF_TIMER_HH_
 
-/** vim: set ts=4 sw=4 tw=80: *************************************************/
-
index dfc2602ec988bbe3bb6fd692a2cd56bd86ed036e..d65d82d20bd17321ac4288f2c651978f955aa017 100644 (file)
@@ -1,30 +1,13 @@
 
 
-/*******************************************************************************
-
- Copyright (c) 2009, Charles McGarvey
- All rights reserved.
- Redistribution   and   use  in  source  and  binary  forms,  with  or  without
- modification, are permitted provided that the following conditions are met:
-   * Redistributions  of  source  code  must retain the above copyright notice,
-     this list of conditions and the following disclaimer.
-   * Redistributions  in binary form must reproduce the above copyright notice,
-     this  list of conditions and the following disclaimer in the documentation
-     and/or other materials provided with the distribution.
- THIS  SOFTWARE  IS  PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND  ANY  EXPRESS  OR  IMPLIED  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED.  IN  NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- FOR  ANY  DIRECT,  INDIRECT,  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES  (INCLUDING,  BUT  NOT  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- SERVICES;  LOSS  OF  USE,  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- CAUSED  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-*******************************************************************************/
+/*]  Copyright (c) 2009-2010, Charles McGarvey  [**************************
+**]  All rights reserved.
+*
+* vi:ts=4 sw=4 tw=75
+*
+* Distributable under the terms and conditions of the 2-clause BSD license;
+* see the file COPYING for a complete text of the license.
+*
+**************************************************************************/
 
 #ifndef _MOOF_TRANSITION_HH_
 #define _MOOF_TRANSITION_HH_
 
 #ifndef _MOOF_TRANSITION_HH_
 #define _MOOF_TRANSITION_HH_
@@ -165,5 +148,3 @@ public:
 
 #endif // _MOOF_TRANSITION_HH_
 
 
 #endif // _MOOF_TRANSITION_HH_
 
-/** vim: set ts=4 sw=4 tw=80: *************************************************/
-
index e0716091fcc7a4e4ce1d07a48328d9a1a77a66e3..9f6258652a374c5753d564326617176f88b42692 100644 (file)
@@ -1,30 +1,13 @@
 
 
-/*******************************************************************************
-
- Copyright (c) 2009, Charles McGarvey
- All rights reserved.
- Redistribution   and   use  in  source  and  binary  forms,  with  or  without
- modification, are permitted provided that the following conditions are met:
-   * Redistributions  of  source  code  must retain the above copyright notice,
-     this list of conditions and the following disclaimer.
-   * Redistributions  in binary form must reproduce the above copyright notice,
-     this  list of conditions and the following disclaimer in the documentation
-     and/or other materials provided with the distribution.
- THIS  SOFTWARE  IS  PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND  ANY  EXPRESS  OR  IMPLIED  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED.  IN  NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- FOR  ANY  DIRECT,  INDIRECT,  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES  (INCLUDING,  BUT  NOT  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- SERVICES;  LOSS  OF  USE,  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- CAUSED  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-*******************************************************************************/
+/*]  Copyright (c) 2009-2010, Charles McGarvey  [**************************
+**]  All rights reserved.
+*
+* vi:ts=4 sw=4 tw=75
+*
+* Distributable under the terms and conditions of the 2-clause BSD license;
+* see the file COPYING for a complete text of the license.
+*
+**************************************************************************/
 
 #include "Dispatch.hh"
 #include "Error.hh"
 
 #include "Dispatch.hh"
 #include "Error.hh"
@@ -85,23 +68,40 @@ void Video::recreateContext()
 
 void Video::setOpenGLAttributes()
 {
 
 void Video::setOpenGLAttributes()
 {
-       SDL_GL_SetAttribute(SDL_GL_RED_SIZE,           mAttribs.colorBuffer[0]);
-       SDL_GL_SetAttribute(SDL_GL_GREEN_SIZE,         mAttribs.colorBuffer[1]);
-       SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE,          mAttribs.colorBuffer[2]);
-       SDL_GL_SetAttribute(SDL_GL_ALPHA_SIZE,         mAttribs.colorBuffer[3]);
-       SDL_GL_SetAttribute(SDL_GL_BUFFER_SIZE,        mAttribs.frameBuffer);
-       SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER,       mAttribs.doubleBuffer);
-       SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE,         mAttribs.depthBuffer);
-       SDL_GL_SetAttribute(SDL_GL_STENCIL_SIZE,       mAttribs.stencilBuffer);
-       SDL_GL_SetAttribute(SDL_GL_ACCUM_RED_SIZE,     mAttribs.accumBuffer[0]);
-       SDL_GL_SetAttribute(SDL_GL_ACCUM_GREEN_SIZE,   mAttribs.accumBuffer[1]);
-       SDL_GL_SetAttribute(SDL_GL_ACCUM_BLUE_SIZE,    mAttribs.accumBuffer[2]);
-       SDL_GL_SetAttribute(SDL_GL_ACCUM_ALPHA_SIZE,   mAttribs.accumBuffer[3]);
-       SDL_GL_SetAttribute(SDL_GL_STEREO,             mAttribs.stereo);
-       SDL_GL_SetAttribute(SDL_GL_MULTISAMPLEBUFFERS, mAttribs.multisampleBuffers);
-       SDL_GL_SetAttribute(SDL_GL_MULTISAMPLESAMPLES, mAttribs.multisampleSamples);
-       SDL_GL_SetAttribute(SDL_GL_SWAP_CONTROL,       mAttribs.swapControl);
-       SDL_GL_SetAttribute(SDL_GL_ACCELERATED_VISUAL, mAttribs.hardwareOnly);
+       SDL_GL_SetAttribute(SDL_GL_RED_SIZE,
+                                               mAttribs.colorBuffer[0]);
+       SDL_GL_SetAttribute(SDL_GL_GREEN_SIZE,
+                                               mAttribs.colorBuffer[1]);
+       SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE,
+                                               mAttribs.colorBuffer[2]);
+       SDL_GL_SetAttribute(SDL_GL_ALPHA_SIZE,
+                                               mAttribs.colorBuffer[3]);
+       SDL_GL_SetAttribute(SDL_GL_BUFFER_SIZE,
+                                               mAttribs.frameBuffer);
+       SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER,
+                                               mAttribs.doubleBuffer);
+       SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE,
+                                               mAttribs.depthBuffer);
+       SDL_GL_SetAttribute(SDL_GL_STENCIL_SIZE,
+                                               mAttribs.stencilBuffer);
+       SDL_GL_SetAttribute(SDL_GL_ACCUM_RED_SIZE,
+                                               mAttribs.accumBuffer[0]);
+       SDL_GL_SetAttribute(SDL_GL_ACCUM_GREEN_SIZE,
+                                               mAttribs.accumBuffer[1]);
+       SDL_GL_SetAttribute(SDL_GL_ACCUM_BLUE_SIZE,
+                                               mAttribs.accumBuffer[2]);
+       SDL_GL_SetAttribute(SDL_GL_ACCUM_ALPHA_SIZE,
+                                               mAttribs.accumBuffer[3]);
+       SDL_GL_SetAttribute(SDL_GL_STEREO,
+                                               mAttribs.stereo);
+       SDL_GL_SetAttribute(SDL_GL_MULTISAMPLEBUFFERS,
+                                               mAttribs.multisampleBuffers);
+       SDL_GL_SetAttribute(SDL_GL_MULTISAMPLESAMPLES,
+                                               mAttribs.multisampleSamples);
+       SDL_GL_SetAttribute(SDL_GL_SWAP_CONTROL,
+                                               mAttribs.swapControl);
+       SDL_GL_SetAttribute(SDL_GL_ACCELERATED_VISUAL,
+                                               mAttribs.hardwareOnly);
 }
 
 
 }
 
 
@@ -363,7 +363,8 @@ Video::Attributes::Attributes()
        }
        else if (fullscreen && Backend::isInitialized())
        {
        }
        else if (fullscreen && Backend::isInitialized())
        {
-               SDL_Rect** modes = SDL_ListModes(NULL, SDL_FULLSCREEN | SDL_HWSURFACE);
+               SDL_Rect** modes = SDL_ListModes(NULL,
+                                                                                SDL_FULLSCREEN | SDL_HWSURFACE);
 
                if (modes == (SDL_Rect**)0)
                {
 
                if (modes == (SDL_Rect**)0)
                {
@@ -371,7 +372,8 @@ Video::Attributes::Attributes()
                }
                else if (modes == (SDL_Rect**)-1)
                {
                }
                else if (modes == (SDL_Rect**)-1)
                {
-                       Mf::logWarning("any resolution allowed; choosing default 800x600");
+                       Mf::logWarning("any resolution allowed; "
+                                                  "choosing default 800x600");
                        mode[0] = 800;
                        mode[1] = 600;
                }
                        mode[0] = 800;
                        mode[1] = 600;
                }
@@ -387,10 +389,8 @@ Video::Attributes::Attributes()
 }
 
 
 }
 
 
-Video* video = 0;
+Video* video = 0;      // most recently instantiated instance
 
 
 } // namespace Mf
 
 
 
 } // namespace Mf
 
-/** vim: set ts=4 sw=4 tw=80: *************************************************/
-
index 0cc1a4e66687c8c33ea7c7a8d7ea89e983142c20..9b1a092332203b3e31291109413cb31e6abaa8bf 100644 (file)
@@ -2,7 +2,7 @@
 /*]  Copyright (c) 2009-2010, Charles McGarvey  [**************************
 **]  All rights reserved.
 *
 /*]  Copyright (c) 2009-2010, Charles McGarvey  [**************************
 **]  All rights reserved.
 *
-* vi:ts=8 sw=4 tw=75
+* vi:ts=4 sw=4 tw=75
 *
 * Distributable under the terms and conditions of the 2-clause BSD license;
 * see the file COPYING for a complete text of the license.
 *
 * Distributable under the terms and conditions of the 2-clause BSD license;
 * see the file COPYING for a complete text of the license.
@@ -15,7 +15,6 @@
 #include <string>
 
 #include <boost/shared_ptr.hpp>
 #include <string>
 
 #include <boost/shared_ptr.hpp>
-
 #include <SDL/SDL.h>
 
 #include <Moof/Core.hh>
 #include <SDL/SDL.h>
 
 #include <Moof/Core.hh>
index 45fc3a0ac9bc6f70397206fc49646546c1006614..7b23ab6431e7a88da48ae3a5fdd38fc7e41a6b3d 100644 (file)
@@ -1,30 +1,13 @@
 
 
-/*******************************************************************************
-
- Copyright (c) 2009, Charles McGarvey
- All rights reserved.
- Redistribution   and   use  in  source  and  binary  forms,  with  or  without
- modification, are permitted provided that the following conditions are met:
-   * Redistributions  of  source  code  must retain the above copyright notice,
-     this list of conditions and the following disclaimer.
-   * Redistributions  in binary form must reproduce the above copyright notice,
-     this  list of conditions and the following disclaimer in the documentation
-     and/or other materials provided with the distribution.
- THIS  SOFTWARE  IS  PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND  ANY  EXPRESS  OR  IMPLIED  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED.  IN  NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- FOR  ANY  DIRECT,  INDIRECT,  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES  (INCLUDING,  BUT  NOT  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- SERVICES;  LOSS  OF  USE,  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- CAUSED  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-*******************************************************************************/
+/*]  Copyright (c) 2009-2010, Charles McGarvey  [**************************
+**]  All rights reserved.
+*
+* vi:ts=4 sw=4 tw=75
+*
+* Distributable under the terms and conditions of the 2-clause BSD license;
+* see the file COPYING for a complete text of the license.
+*
+**************************************************************************/
 
 #include <map>
 
 
 #include <map>
 
@@ -314,7 +297,8 @@ struct Scene::Impl : public Mf::Manager<Impl>
                Mf::Scalar value;
                script[2].requireNumber().get(value);
 
                Mf::Scalar value;
                script[2].requireNumber().get(value);
 
-               cml::matrix_rotate_about_world_axis(mTransform, index, cml::rad(value));
+               cml::matrix_rotate_about_world_axis(mTransform,
+                                                                                       index, cml::rad(value));
 
                return 0;
        }
 
                return 0;
        }
@@ -339,15 +323,19 @@ struct Scene::Impl : public Mf::Manager<Impl>
                script.pop();
 
                nTiles = table.getLength();
                script.pop();
 
                nTiles = table.getLength();
-               if (nTiles % width != 0) table.throwError("invalid number of tiles");
+               if (nTiles % width != 0)
+               {
+                       table.throwError("invalid number of tiles");
+               }
 
                if (width == 0) table.throwError("width field must not be zero");
                height = nTiles / width;
 
                Mf::Vector3             vertices[height+1][width+1];
 
 
                if (width == 0) table.throwError("width field must not be zero");
                height = nTiles / width;
 
                Mf::Vector3             vertices[height+1][width+1];
 
-               // the indices are stored upside-down in the scene file so that they are
-               // easier to edit as text, so we'll need to load them last row first
+               // the indices are stored upside-down in the scene file so that
+               // they are easier to edit as text, so we'll need to load them last
+               // row first
 
                // do first row and first column of vertices
 
 
                // do first row and first column of vertices
 
@@ -514,7 +502,8 @@ void Scene::draw(Mf::Scalar alpha) const
        mImpl->mBounds.draw();
 }
 
        mImpl->mBounds.draw();
 }
 
-void Scene::drawIfVisible(Mf::Scalar alpha, const Mf::Frustum& frustum) const
+void Scene::drawIfVisible(Mf::Scalar alpha,
+                                                 const Mf::Frustum& frustum) const
 {
        std::list< boost::shared_ptr<Impl::Quad> >& objects = mImpl->mObjects;
        std::list< boost::shared_ptr<Impl::Quad> >::const_iterator it;
 {
        std::list< boost::shared_ptr<Impl::Quad> >& objects = mImpl->mObjects;
        std::list< boost::shared_ptr<Impl::Quad> >::const_iterator it;
@@ -537,7 +526,7 @@ void Scene::drawIfVisible(Mf::Scalar alpha, const Mf::Frustum& frustum) const
 
 
 bool Scene::castRay(const Mf::Ray<2>& ray,
 
 
 bool Scene::castRay(const Mf::Ray<2>& ray,
-               std::list<Mf::Ray<2>::Intersection>& hits) const
+                                       std::list<Mf::Ray<2>::Intersection>& hits) const
 {
        std::list< Mf::Line<2> >& lines = mImpl->mLines;
        std::list< Mf::Line<2> >::const_iterator it;
 {
        std::list< Mf::Line<2> >& lines = mImpl->mLines;
        std::list< Mf::Line<2> >::const_iterator it;
@@ -625,6 +614,3 @@ std::string Scene::getPath(const std::string& name)
        return Mf::Resource::getPath("scenes/" + name + ".lua");
 }
 
        return Mf::Resource::getPath("scenes/" + name + ".lua");
 }
 
-
-/** vim: set ts=4 sw=4 tw=80: *************************************************/
-
index 7558e3a6fce7af7a09587dffd15860a04b34996f..85a6716953109c9739c7b0c6ba97108c18a01912 100644 (file)
@@ -1,30 +1,13 @@
 
 
-/*******************************************************************************
-
- Copyright (c) 2009, Charles McGarvey
- All rights reserved.
- Redistribution   and   use  in  source  and  binary  forms,  with  or  without
- modification, are permitted provided that the following conditions are met:
-   * Redistributions  of  source  code  must retain the above copyright notice,
-     this list of conditions and the following disclaimer.
-   * Redistributions  in binary form must reproduce the above copyright notice,
-     this  list of conditions and the following disclaimer in the documentation
-     and/or other materials provided with the distribution.
- THIS  SOFTWARE  IS  PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND  ANY  EXPRESS  OR  IMPLIED  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED.  IN  NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- FOR  ANY  DIRECT,  INDIRECT,  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES  (INCLUDING,  BUT  NOT  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- SERVICES;  LOSS  OF  USE,  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- CAUSED  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-*******************************************************************************/
+/*]  Copyright (c) 2009-2010, Charles McGarvey  [**************************
+**]  All rights reserved.
+*
+* vi:ts=4 sw=4 tw=75
+*
+* Distributable under the terms and conditions of the 2-clause BSD license;
+* see the file COPYING for a complete text of the license.
+*
+**************************************************************************/
 
 #ifndef _SCENE_HH_
 #define _SCENE_HH_
 
 #ifndef _SCENE_HH_
 #define _SCENE_HH_
@@ -77,5 +60,3 @@ public:
 
 #endif // _SCENE_HH_
 
 
 #endif // _SCENE_HH_
 
-/** vim: set ts=4 sw=4 tw=80: *************************************************/
-
index 48b0fc3951d7655f4c657cdc5f1b053616a37d80..14cfa2c28d0605956354b0aec21edec38649a9e4 100644 (file)
@@ -1,30 +1,13 @@
 
 
-/*******************************************************************************
-
- Copyright (c) 2009, Charles McGarvey
- All rights reserved.
- Redistribution   and   use  in  source  and  binary  forms,  with  or  without
- modification, are permitted provided that the following conditions are met:
-   * Redistributions  of  source  code  must retain the above copyright notice,
-     this list of conditions and the following disclaimer.
-   * Redistributions  in binary form must reproduce the above copyright notice,
-     this  list of conditions and the following disclaimer in the documentation
-     and/or other materials provided with the distribution.
- THIS  SOFTWARE  IS  PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND  ANY  EXPRESS  OR  IMPLIED  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED.  IN  NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- FOR  ANY  DIRECT,  INDIRECT,  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES  (INCLUDING,  BUT  NOT  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- SERVICES;  LOSS  OF  USE,  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- CAUSED  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-*******************************************************************************/
+/*]  Copyright (c) 2009-2010, Charles McGarvey  [**************************
+**]  All rights reserved.
+*
+* vi:ts=4 sw=4 tw=75
+*
+* Distributable under the terms and conditions of the 2-clause BSD license;
+* see the file COPYING for a complete text of the license.
+*
+**************************************************************************/
 
 #include <iostream>
 
 
 #include <iostream>
 
@@ -56,6 +39,3 @@ void TilemapFont::getTileCoords(char symbol, Mf::Scalar coords[8],
        Mf::Texture::getTileCoords(index, coords, what);
 }
 
        Mf::Texture::getTileCoords(index, coords, what);
 }
 
-
-/** vim: set ts=4 sw=4 tw=80: *************************************************/
-
index 89cb062ad8cedbc0539b3ea45f89a45146ab77e7..c0a8ea6b774f1efd43055526206c2b93660d2b04 100644 (file)
@@ -1,30 +1,13 @@
 
 
-/*******************************************************************************
-
- Copyright (c) 2009, Charles McGarvey
- All rights reserved.
- Redistribution   and   use  in  source  and  binary  forms,  with  or  without
- modification, are permitted provided that the following conditions are met:
-   * Redistributions  of  source  code  must retain the above copyright notice,
-     this list of conditions and the following disclaimer.
-   * Redistributions  in binary form must reproduce the above copyright notice,
-     this  list of conditions and the following disclaimer in the documentation
-     and/or other materials provided with the distribution.
- THIS  SOFTWARE  IS  PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND  ANY  EXPRESS  OR  IMPLIED  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED.  IN  NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- FOR  ANY  DIRECT,  INDIRECT,  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES  (INCLUDING,  BUT  NOT  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- SERVICES;  LOSS  OF  USE,  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- CAUSED  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-*******************************************************************************/
+/*]  Copyright (c) 2009-2010, Charles McGarvey  [**************************
+**]  All rights reserved.
+*
+* vi:ts=4 sw=4 tw=75
+*
+* Distributable under the terms and conditions of the 2-clause BSD license;
+* see the file COPYING for a complete text of the license.
+*
+**************************************************************************/
 
 #ifndef _TILEMAPFONT_HH_
 #define _TILEMAPFONT_HH_
 
 #ifndef _TILEMAPFONT_HH_
 #define _TILEMAPFONT_HH_
@@ -44,11 +27,9 @@ public:
        TilemapFont();
 
        void getTileCoords(char symbol, Mf::Scalar coords[8],
        TilemapFont();
 
        void getTileCoords(char symbol, Mf::Scalar coords[8],
-                       Mf::Texture::Orientation what = Mf::Texture::NORMAL);
+                                          Mf::Texture::Orientation what = Mf::Texture::NORMAL);
 };
 
 
 #endif // _TILEMAPFONT_HH_
 
 };
 
 
 #endif // _TILEMAPFONT_HH_
 
-/** vim: set ts=4 sw=4 tw=80: *************************************************/
-
index afe13e91771a5f3ac2e7b7edb3639e2a1a124d91..d31fe8702bff754e376a9cfd0cdc4d4ca2cd5a00 100644 (file)
@@ -1,30 +1,13 @@
 
 
-/*******************************************************************************
-
- Copyright (c) 2009, Charles McGarvey
- All rights reserved.
- Redistribution   and   use  in  source  and  binary  forms,  with  or  without
- modification, are permitted provided that the following conditions are met:
-   * Redistributions  of  source  code  must retain the above copyright notice,
-     this list of conditions and the following disclaimer.
-   * Redistributions  in binary form must reproduce the above copyright notice,
-     this  list of conditions and the following disclaimer in the documentation
-     and/or other materials provided with the distribution.
- THIS  SOFTWARE  IS  PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND  ANY  EXPRESS  OR  IMPLIED  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED.  IN  NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- FOR  ANY  DIRECT,  INDIRECT,  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES  (INCLUDING,  BUT  NOT  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- SERVICES;  LOSS  OF  USE,  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- CAUSED  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-*******************************************************************************/
+/*]  Copyright (c) 2009-2010, Charles McGarvey  [**************************
+**]  All rights reserved.
+*
+* vi:ts=4 sw=4 tw=75
+*
+* Distributable under the terms and conditions of the 2-clause BSD license;
+* see the file COPYING for a complete text of the license.
+*
+**************************************************************************/
 
 #include <Moof/Core.hh>
 #include <Moof/OpenGL.hh>
 
 #include <Moof/Core.hh>
 #include <Moof/OpenGL.hh>
@@ -69,7 +52,8 @@ bool TitleLayer::handleEvent(const Mf::Event& event)
                        interp.init(0.0, 1.0);
 
                        Mf::Transition<Mf::Lerp>::Ptr transition =
                        interp.init(0.0, 1.0);
 
                        Mf::Transition<Mf::Lerp>::Ptr transition =
-                               Mf::Transition<Mf::Lerp>::alloc(mGameLayer, titleLayer, interp);
+                               Mf::Transition<Mf::Lerp>::alloc(mGameLayer, titleLayer,
+                                                                                               interp);
                        Mf::core.push(transition);
 
                        return true;
                        Mf::core.push(transition);
 
                        return true;
@@ -78,6 +62,3 @@ bool TitleLayer::handleEvent(const Mf::Event& event)
        return false;
 }
 
        return false;
 }
 
-
-/** vim: set ts=4 sw=4 tw=80: *************************************************/
-
index fe745ee7a4656a83542060db08767613d96ef11b..90041ee5b7a6b6482f793281d106bd33886e7ca1 100644 (file)
@@ -1,30 +1,13 @@
 
 
-/*******************************************************************************
-
- Copyright (c) 2009, Charles McGarvey
- All rights reserved.
- Redistribution   and   use  in  source  and  binary  forms,  with  or  without
- modification, are permitted provided that the following conditions are met:
-   * Redistributions  of  source  code  must retain the above copyright notice,
-     this list of conditions and the following disclaimer.
-   * Redistributions  in binary form must reproduce the above copyright notice,
-     this  list of conditions and the following disclaimer in the documentation
-     and/or other materials provided with the distribution.
- THIS  SOFTWARE  IS  PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND  ANY  EXPRESS  OR  IMPLIED  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED.  IN  NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- FOR  ANY  DIRECT,  INDIRECT,  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES  (INCLUDING,  BUT  NOT  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- SERVICES;  LOSS  OF  USE,  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- CAUSED  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-*******************************************************************************/
+/*]  Copyright (c) 2009-2010, Charles McGarvey  [**************************
+**]  All rights reserved.
+*
+* vi:ts=4 sw=4 tw=75
+*
+* Distributable under the terms and conditions of the 2-clause BSD license;
+* see the file COPYING for a complete text of the license.
+*
+**************************************************************************/
 
 #ifndef _TITLELAYER_HH_
 #define _TITLELAYER_HH_
 
 #ifndef _TITLELAYER_HH_
 #define _TITLELAYER_HH_
@@ -63,5 +46,3 @@ private:
 
 #endif // _TITLELAYER_HH_
 
 
 #endif // _TITLELAYER_HH_
 
-/** vim: set ts=4 sw=4 tw=80: *************************************************/
-
index 26929194d613d45b730337fdac6adeb786e914a7..1b21f76ea404ff99091b1a790e36502f5251161e 100644 (file)
@@ -1,30 +1,13 @@
 
 
-/*******************************************************************************
-
- Copyright (c) 2009, Charles McGarvey
- All rights reserved.
- Redistribution   and   use  in  source  and  binary  forms,  with  or  without
- modification, are permitted provided that the following conditions are met:
-   * Redistributions  of  source  code  must retain the above copyright notice,
-     this list of conditions and the following disclaimer.
-   * Redistributions  in binary form must reproduce the above copyright notice,
-     this  list of conditions and the following disclaimer in the documentation
-     and/or other materials provided with the distribution.
- THIS  SOFTWARE  IS  PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND  ANY  EXPRESS  OR  IMPLIED  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED.  IN  NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- FOR  ANY  DIRECT,  INDIRECT,  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES  (INCLUDING,  BUT  NOT  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- SERVICES;  LOSS  OF  USE,  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- CAUSED  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-*******************************************************************************/
+/*]  Copyright (c) 2009-2010, Charles McGarvey  [**************************
+**]  All rights reserved.
+*
+* vi:ts=4 sw=4 tw=75
+*
+* Distributable under the terms and conditions of the 2-clause BSD license;
+* see the file COPYING for a complete text of the license.
+*
+**************************************************************************/
 
 #include <algorithm>
 #include <cstdarg>
 
 #include <algorithm>
 #include <cstdarg>
@@ -47,6 +30,3 @@ void Typesetter::print(const std::string& format, ...)
        nPrinted = std::min(nPrinted, (int)sizeof(buffer) - 1);
 }
 
        nPrinted = std::min(nPrinted, (int)sizeof(buffer) - 1);
 }
 
-
-/** vim: set ts=4 sw=4 tw=80: *************************************************/
-
index 82d94fac1aebb3eb13e595105bff9dd7a9950ddd..cbb54eb2620cc70b8685f1432113700fc9933cf2 100644 (file)
@@ -1,30 +1,13 @@
 
 
-/*******************************************************************************
-
- Copyright (c) 2009, Charles McGarvey
- All rights reserved.
- Redistribution   and   use  in  source  and  binary  forms,  with  or  without
- modification, are permitted provided that the following conditions are met:
-   * Redistributions  of  source  code  must retain the above copyright notice,
-     this list of conditions and the following disclaimer.
-   * Redistributions  in binary form must reproduce the above copyright notice,
-     this  list of conditions and the following disclaimer in the documentation
-     and/or other materials provided with the distribution.
- THIS  SOFTWARE  IS  PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND  ANY  EXPRESS  OR  IMPLIED  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED.  IN  NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- FOR  ANY  DIRECT,  INDIRECT,  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES  (INCLUDING,  BUT  NOT  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- SERVICES;  LOSS  OF  USE,  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- CAUSED  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-*******************************************************************************/
+/*]  Copyright (c) 2009-2010, Charles McGarvey  [**************************
+**]  All rights reserved.
+*
+* vi:ts=4 sw=4 tw=75
+*
+* Distributable under the terms and conditions of the 2-clause BSD license;
+* see the file COPYING for a complete text of the license.
+*
+**************************************************************************/
 
 #ifndef _TYPESETTER_HH_
 #define _TYPESETTER_HH_
 
 #ifndef _TYPESETTER_HH_
 #define _TYPESETTER_HH_
@@ -54,5 +37,3 @@ private:
 
 #endif // _TYPESETTER_HH_
 
 
 #endif // _TYPESETTER_HH_
 
-/** vim: set ts=4 sw=4 tw=80: *************************************************/
-
index 9e78b78b99cead57d1466dc16b88bbab2afdaf15..a69ff33b529943cbbca7bddaf7cccdf9e964995d 100644 (file)
@@ -1,30 +1,13 @@
 
 
-/*******************************************************************************
-
- Copyright (c) 2009, Charles McGarvey
- All rights reserved.
- Redistribution   and   use  in  source  and  binary  forms,  with  or  without
- modification, are permitted provided that the following conditions are met:
-   * Redistributions  of  source  code  must retain the above copyright notice,
-     this list of conditions and the following disclaimer.
-   * Redistributions  in binary form must reproduce the above copyright notice,
-     this  list of conditions and the following disclaimer in the documentation
-     and/or other materials provided with the distribution.
- THIS  SOFTWARE  IS  PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND  ANY  EXPRESS  OR  IMPLIED  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED.  IN  NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- FOR  ANY  DIRECT,  INDIRECT,  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES  (INCLUDING,  BUT  NOT  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- SERVICES;  LOSS  OF  USE,  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- CAUSED  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-*******************************************************************************/
+/*]  Copyright (c) 2009-2010, Charles McGarvey  [**************************
+**]  All rights reserved.
+*
+* vi:ts=4 sw=4 tw=75
+*
+* Distributable under the terms and conditions of the 2-clause BSD license;
+* see the file COPYING for a complete text of the license.
+*
+**************************************************************************/
 
 #include "version.h"
 
 
 #include "version.h"
 
@@ -35,6 +18,3 @@ const char* COMPILE_TIME = __DATE__" "__TIME__;
 const char* COMPILE_TIME = "Unknown";
 #endif
 
 const char* COMPILE_TIME = "Unknown";
 #endif
 
-
-/** vim: set ts=4 sw=4 tw=80: *************************************************/
-
index a6e48d5acc66dc3dbb1f2089f70219dd2ce454e4..1a6eafdfe9825ac9a186c93cfdbc38a0e05eaba5 100644 (file)
@@ -1,30 +1,13 @@
 
 
-/*******************************************************************************
-
- Copyright (c) 2009, Charles McGarvey
- All rights reserved.
- Redistribution   and   use  in  source  and  binary  forms,  with  or  without
- modification, are permitted provided that the following conditions are met:
-   * Redistributions  of  source  code  must retain the above copyright notice,
-     this list of conditions and the following disclaimer.
-   * Redistributions  in binary form must reproduce the above copyright notice,
-     this  list of conditions and the following disclaimer in the documentation
-     and/or other materials provided with the distribution.
- THIS  SOFTWARE  IS  PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND  ANY  EXPRESS  OR  IMPLIED  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED.  IN  NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- FOR  ANY  DIRECT,  INDIRECT,  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES  (INCLUDING,  BUT  NOT  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- SERVICES;  LOSS  OF  USE,  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- CAUSED  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-*******************************************************************************/
+/*]  Copyright (c) 2009-2010, Charles McGarvey  [**************************
+**]  All rights reserved.
+*
+* vi:ts=4 sw=4 tw=75
+*
+* Distributable under the terms and conditions of the 2-clause BSD license;
+* see the file COPYING for a complete text of the license.
+*
+**************************************************************************/
 
 #ifndef _VERSION_H_
 #define _VERSION_H_
 
 #ifndef _VERSION_H_
 #define _VERSION_H_
@@ -84,5 +67,3 @@ extern const char* COMPILE_TIME;
 
 #endif // _VERSION_H_
 
 
 #endif // _VERSION_H_
 
-/** vim: set ts=4 sw=4 tw=80: *************************************************/
-
index 02ab6e2d5fb28e01c67e480183f85a1033b68c21..8d626fc7b75496e9f0e7a62e1ddefc0b85deadc8 100644 (file)
@@ -27,7 +27,7 @@ BEGIN
                        VALUE "FileDescription", "Alien-smashing action game"
                        VALUE "FileVersion", PACKAGE_VERSION
                        VALUE "InternalName", "Yoink"
                        VALUE "FileDescription", "Alien-smashing action game"
                        VALUE "FileVersion", PACKAGE_VERSION
                        VALUE "InternalName", "Yoink"
-                       VALUE "LegalCopyright", "Copyright 2009 Charles McGarvey et al."
+                       VALUE "LegalCopyright", "Copyright 2010 Charles McGarvey et al."
                        VALUE "OriginalFilename", "yoink.exe"
                        VALUE "ProductName", "Yoink"
                        VALUE "ProductVersion", PACKAGE_VERSION
                        VALUE "OriginalFilename", "yoink.exe"
                        VALUE "ProductName", "Yoink"
                        VALUE "ProductVersion", PACKAGE_VERSION
This page took 0.225435 seconds and 4 git commands to generate.