]> Dogcows Code - chaz/yoink/commitdiff
renamed mippleton to library
authorCharles McGarvey <chazmcgarvey@brokenzipper.com>
Tue, 24 Nov 2009 05:18:44 +0000 (22:18 -0700)
committerCharles McGarvey <chazmcgarvey@brokenzipper.com>
Tue, 24 Nov 2009 05:18:44 +0000 (22:18 -0700)
Doxyfile
doc/yoink.6.in
src/Animation.cc
src/Makefile.am
src/Moof/Library.hh [moved from src/Moof/Mippleton.hh with 78% similarity]
src/Moof/Sound.cc
src/Moof/Texture.cc
src/Tilemap.cc
win32/build-installer.sh.in

index c2c8319f407962b5cbcd413064c1c4ff52127197..524296633b6c2e85b772f2bdee5792b201a2dca7 100644 (file)
--- a/Doxyfile
+++ b/Doxyfile
@@ -763,7 +763,7 @@ GENERATE_HTML          = YES
 # If a relative path is entered the value of OUTPUT_DIRECTORY will be 
 # put in front of it. If left blank `html' will be used as the default path.
 
-HTML_OUTPUT            = doc/doxygen
+HTML_OUTPUT            = doxygen
 
 # The HTML_FILE_EXTENSION tag can be used to specify the file extension for 
 # each generated HTML page (for example: .htm,.php,.asp). If it is left blank 
index 809faab292e91b7a0d49d1c94753424fd46ce61e..ece0fa5b474108bbbde5a81c5682d245c5018b31 100644 (file)
@@ -127,13 +127,13 @@ as the numbers 1024 and 768.  The video size will be 1024x768.
 Here is a list of some of the options available:
 .TP
 .B detail
-The level of detail.  Possible values are 1, 2, or 3, 1 meaning the least amount
-of detail and 3 meaning the most.  This effects the number of objects drawn to
-the screen.  A high level of detail will draw everything but could cause poor
+The level of detail.  Possible values are 1, 2, or 3 where 1 means the least
+amount of detail and 3 means the most.  This effects the number of objects drawn
+to the screen.  A high level of detail will draw everything but could cause poor
 frame rates if the graphics driver can't keep up with the load.  Lower levels
 will omit certain details which aren't crucial for playing the game with the
-benefit of higher frame rates.  See the Notes for more ways to increase the
-game's performance.  The default value is 3.
+possible benefit of higher frame rates.  See the Notes for more ways to increase
+the game's performance.  The default value is 3.
 .TP
 .B doublebuffer
 If true, double-buffering will be used to help minimize distortion and artifacts
index aa754cebd7decf94f7d27d628859a363c20457a5..c694aecc44b0b3ef8df581c0a85d0efa8ac17f5e 100644 (file)
@@ -29,8 +29,8 @@
 #include <map>
 #include <vector>
 
+#include <Moof/Library.hh>
 #include <Moof/Log.hh>
-#include <Moof/Mippleton.hh>
 #include <Moof/Script.hh>
 
 #include "Animation.hh"
@@ -55,10 +55,10 @@ class Animation::Impl
         * which wants to use these loaded sequences.
         */
 
-       class Data : public Mf::Mippleton<Data>
+       class Data : public Mf::Library<Data>
        {
                friend class Impl;
-               friend class Mf::Mippleton<Data>;
+               friend class Mf::Library<Data>;
 
                /**
                 * A frame of an animation sequence.  A frame is merely an index which
@@ -214,7 +214,7 @@ class Animation::Impl
                 */
 
                explicit Data(const std::string& name) :
-                       Mf::Mippleton<Data>(name)
+                       Mf::Library<Data>(name)
                {
                        loadFromFile();
                }
index cecdac1c9b501fbd888e58a3baa57674f15dee6d..c10b58660c566f214cd5f2be93b85b76451373b6 100644 (file)
@@ -33,10 +33,10 @@ libmoof_a_SOURCES = \
                                        Moof/Hash.hh \
                                        Moof/Interpolator.hh \
                                        Moof/Layer.hh \
+                                       Moof/Library.hh \
                                        Moof/Log.cc \
                                        Moof/Log.hh \
                                        Moof/Math.hh \
-                                       Moof/Mippleton.hh \
                                        Moof/Octree.hh \
                                        Moof/OpenGL.hh \
                                        Moof/Plane.cc \
similarity index 78%
rename from src/Moof/Mippleton.hh
rename to src/Moof/Library.hh
index a27a6c5023645e049fe51cebe6055a34964cda9c..1d5af36c34b6f22cff945ad3e8be5bb9d6001434 100644 (file)
 
 *******************************************************************************/
 
-#ifndef _MOOF_MIPPLETON_HH_
-#define _MOOF_MIPPLETON_HH_
+#ifndef _MOOF_LIBRARY_HH_
+#define _MOOF_LIBRARY_HH_
 
 /**
- * @file Mippleton.hh
- * Related to singletons, a mippleton is an object which can be obtained
- * globally using a unique name.  Unlike singletons, there can be multiple
- * mippletons per class, each with a different name or identifier.  Mippletons
- * are create automatically when they are first requested (retained) and deleted
- * after the last interested code releases its hold on the object.
+ * @file Library.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.
  */
 
+#include <memory>
 #include <string>
 
 #include <boost/shared_ptr.hpp>
@@ -49,7 +48,7 @@ namespace Mf {
 
 
 template <class T>
-class Mippleton
+class Library
 {
        typedef std::pair<unsigned,T*>                                                  PtrValue;
        typedef stlplus::hash<std::string,PtrValue,getHash>             PtrMap;
@@ -68,8 +67,11 @@ class Mippleton
                }
                else
                {
-                       T* newObj = new T(name);
-                       mPtrMap.insert(std::make_pair(name, std::make_pair(1, newObj)));
+                       T* newObj(new T(name));
+                       if (newObj)
+                       {
+                               mPtrMap.insert(std::make_pair(name, std::make_pair(1, newObj)));
+                       }
                        return newObj; 
                }
        }
@@ -83,7 +85,8 @@ class Mippleton
        {
                typename PtrMap::iterator it;
 
-               if ((it = mPtrMap.find(name)) != mPtrMap.end() && --(*it).second.first == 0)
+               if ((it = mPtrMap.find(name)) != mPtrMap.end() &&
+                               --(*it).second.first == 0)
                {
                        delete (*it).second.second;
                        mPtrMap.erase((*it).first);
@@ -92,7 +95,7 @@ class Mippleton
 
 public:
 
-       explicit Mippleton(const std::string& name) :
+       explicit Library(const std::string& name) :
                mName(name) {}
 
        const std::string& getName() const
@@ -108,12 +111,12 @@ public:
 
 template <class T>
 stlplus::hash< std::string,std::pair<unsigned,T*>,getHash >
-       Mippleton<T>::mPtrMap;
+       Library<T>::mPtrMap;
 
 
 } // namespace Mf
 
-#endif // _MOOF_MIPPLETON_HH_
+#endif // _MOOF_LIBRARY_HH_
 
 /** vim: set ts=4 sw=4 tw=80: *************************************************/
 
index 27905ba4a1f4893e6f69f981ab0b7e7a2ed5cbf3..a04d29b814943de018f678a3425448053f17ab8f 100644 (file)
@@ -35,8 +35,8 @@
 #include <vorbis/codec.h>
 #include <vorbis/vorbisfile.h>
 
+#include "Library.hh"
 #include "Log.hh"
-#include "Mippleton.hh"
 #include "Sound.hh"
 #include "Timer.hh"
 
@@ -60,7 +60,7 @@ public:
        class Buffer;
        typedef boost::shared_ptr<Buffer> BufferP;
        
-       class Buffer : public Mippleton<Buffer>
+       class Buffer : public Library<Buffer>
        {
                OggVorbis_File                  mOggStream;
                ALenum                                  mFormat;
@@ -70,7 +70,7 @@ public:
        public:
 
                Buffer(const std::string& name) :
-                       Mippleton<Buffer>(name)
+                       Library<Buffer>(name)
                {
                        mOggStream.datasource = 0;
                        openFile();
index fc50cfadeffcc62535faae1cf80cee6e24ec2576..78dc0c8148b478c092f0375ac46c3ecff2d7f707 100644 (file)
@@ -34,8 +34,8 @@
 #include <SDL/SDL_image.h>
 
 #include "Dispatcher.hh"
+#include "Library.hh"
 #include "Log.hh"
-#include "Mippleton.hh"
 #include "OpenGL.hh"
 #include "Texture.hh"
 
@@ -52,7 +52,7 @@ namespace Mf {
  * objects and avoid having duplicate textures loaded to GL.
  */
 
-class Texture::Impl : public Mippleton<Impl>
+class Texture::Impl : public Library<Impl>
 {
 
        /**
@@ -131,7 +131,7 @@ public:
         */
 
        explicit Impl(const std::string& name) :
-               Mippleton<Impl>(name),
+               Library<Impl>(name),
                mContext(0),
                mWidth(0),
                mHeight(0),
@@ -296,10 +296,12 @@ public:
                glBindTexture(GL_TEXTURE_2D, mObject);
 
                glTexImage2D
+               //gluBuild2DMipmaps
                (
                        GL_TEXTURE_2D,
                        0,
                        mMode,
+                       //3,
                        mContext->w,
                        mContext->h,
                        0,
index 232d0034c72186ad4963d3cbdfae03fa6be979ee..b15d07f29a3900cb3e41e266491cf97482fdbb97 100644 (file)
 
 *******************************************************************************/
 
-#include <Moof/Mippleton.hh>
+#include <Moof/Library.hh>
 #include <Moof/OpenGL.hh>
 #include <Moof/Script.hh>
 
 #include "Tilemap.hh"
 
 
-struct Tilemap::Impl : public Mf::Mippleton<Impl>
+struct Tilemap::Impl : public Mf::Library<Impl>
 {
        Impl(const std::string& name) :
-               Mf::Mippleton<Impl>(name),
+               Mf::Library<Impl>(name),
                mMagFilter(GL_NEAREST),
                mMinFilter(GL_NEAREST),
                mTilesS(1),
index 5c3b5d96060c4e31e75dacbebb6662a55a54b189..115599d854c7b5450e36a6c0ee7bb9840d9d3c93 100644 (file)
@@ -265,7 +265,8 @@ Section "$SEC_INSTALL" SecInstallYoink
   File /r /x Makefile* /x *.desktop "$ROOT_DIR/data"
   ; documentation
   File "$ROOT_DIR/AUTHORS" "$ROOT_DIR/ChangeLog" "$ROOT_DIR/COPYING"
-  File "$ROOT_DIR/README" "$ROOT_DIR/TODO"
+  File "$ROOT_DIR/README" "$ROOT_DIR/TODO" "$ROOT_DIR/doc/screenshot.png"
+  File /r "$ROOT_DIR/doc/licenses"
   ; uninstall
   WriteUninstaller "uninstall.exe"
 EOF
This page took 0.036969 seconds and 4 git commands to generate.