gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] [SCM] Gnash branch, master, updated. 7c83f92bd211ab5bdaa9


From: Benjamin Wolsey
Subject: [Gnash-commit] [SCM] Gnash branch, master, updated. 7c83f92bd211ab5bdaa9195806093ab6abc465f2
Date: Wed, 20 Oct 2010 08:41:39 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnash".

The branch, master has been updated
       via  7c83f92bd211ab5bdaa9195806093ab6abc465f2 (commit)
       via  fb05b4ea936e738c625556bd275a42394aec217c (commit)
       via  199617ed58e061d02bb476cdfb53eeab13dec88a (commit)
       via  69a9449030dc1707f78629c59e718a3876b739eb (commit)
       via  177595fd9cfa15572abdbefdf5e7618889292a44 (commit)
      from  a3762a940db807c813b20420043e9a9eabd56079 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit//commit/?id=7c83f92bd211ab5bdaa9195806093ab6abc465f2


commit 7c83f92bd211ab5bdaa9195806093ab6abc465f2
Merge: fb05b4e a3762a9
Author: Benjamin Wolsey <address@hidden>
Date:   Wed Oct 20 10:40:36 2010 +0200

    Merge branch 'master' of git.sv.gnu.org:/srv/git/gnash


http://git.savannah.gnu.org/cgit//commit/?id=fb05b4ea936e738c625556bd275a42394aec217c


commit fb05b4ea936e738c625556bd275a42394aec217c
Author: Benjamin Wolsey <address@hidden>
Date:   Wed Oct 20 10:39:38 2010 +0200

    Minor makefile cleanups.

diff --git a/libcore/Makefile.am b/libcore/Makefile.am
index 9a4bcaa..5b921de 100644
--- a/libcore/Makefile.am
+++ b/libcore/Makefile.am
@@ -154,7 +154,7 @@ noinst_HEADERS = \
        debugger.h \
        TextField.h \
        Filters.h \
-        parser/filter_factory.h \
+       parser/filter_factory.h \
        Font.h \
        fontlib.h \
        Shape.h \
diff --git a/libcore/vm/Makefile.am b/libcore/vm/Makefile.am
index 844ad0b..22408c6 100644
--- a/libcore/vm/Makefile.am
+++ b/libcore/vm/Makefile.am
@@ -62,7 +62,6 @@ EXTENSIONS_API = \
        CallStack.h \
        SafeStack.h \
        VM.h \
-       Machine.h \
        $(NULL)
 
 if ENABLE_AVM2

http://git.savannah.gnu.org/cgit//commit/?id=199617ed58e061d02bb476cdfb53eeab13dec88a


commit 199617ed58e061d02bb476cdfb53eeab13dec88a
Author: Benjamin Wolsey <address@hidden>
Date:   Wed Oct 20 10:28:20 2010 +0200

    Tidy up filters.

diff --git a/libcore/BevelFilter.h b/libcore/BevelFilter.h
deleted file mode 100644
index 9d972bd..0000000
--- a/libcore/BevelFilter.h
+++ /dev/null
@@ -1,77 +0,0 @@
-// 
-//   Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
-// 
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 3 of the License, or
-// (at your option) any later version.
-// 
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-// 
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-
-
-#ifndef GNASH_BEVELFILTER_H
-#define GNASH_BEVELFILTER_H
-
-#include "BitmapFilter.h"
-
-#include <boost/cstdint.hpp> // for XintXX_t
-
-namespace gnash {
-
-// A bevel effect filter.
-class BevelFilter : public BitmapFilter
-{
-public:
-    typedef enum
-    {
-        OUTER_BEVEL = 1,
-        INNER_BEVEL = 2,
-        FULL_BEVEL = 3
-    } bevel_type;
-
-    // Fill from a SWFStream. See parser/filter_factory.cpp for the 
implementations.
-    virtual bool read(SWFStream& in);
-
-    virtual ~BevelFilter() { return; }
-
-    BevelFilter() : 
-        m_distance(0.0f), m_angle(0.0f), m_highlightColor(0),
-        m_highlightAlpha(0), m_shadowColor(0), m_shadowAlpha(0),
-        m_blurX(0.0f), m_blurY(0.0f),  m_strength(0.0f), m_quality(0),
-        m_type(FULL_BEVEL), m_knockout(false)
-    { return; }
-
-    BevelFilter(float distance, float angle, boost::uint32_t hcolor,
-        boost::uint8_t halpha, boost::uint32_t scolor, boost::uint8_t salpha,
-        float blurX, float blurY, float strength,
-        boost::uint8_t quality, bevel_type type, bool knockout) :
-        m_distance(distance), m_angle(angle), m_highlightColor(hcolor),
-        m_highlightAlpha(halpha), m_shadowColor(scolor), m_shadowAlpha(salpha),
-        m_blurX(blurX), m_blurY(blurY), m_strength(strength),
-        m_quality(quality), m_type(type), m_knockout(knockout)
-    { return; }
-
-    float m_distance; // Distance of the filter in pixels.
-    float m_angle; // Angle of the filter.
-    boost::uint32_t m_highlightColor; // Color of the highlight.
-    boost::uint8_t m_highlightAlpha; // Alpha of the highlight.
-    boost::uint32_t m_shadowColor; // RGB color.
-    boost::uint8_t m_shadowAlpha; // Alpha strength, as a percentage(?)
-    float m_blurX; // horizontal blur
-    float m_blurY; // vertical blur
-    float m_strength; // How strong is the filter.
-    boost::uint8_t m_quality; // How many times to apply the filter.
-    bevel_type m_type; // The type of filter. (Rendered as string in AS)
-    bool m_knockout; // If true, render only the filter effect.
-};
-
-} // Namespace gnash
-
-#endif // GNASH_BEVELFILTER_H
diff --git a/libcore/BitmapFilter.h b/libcore/BitmapFilter.h
deleted file mode 100644
index 39278fb..0000000
--- a/libcore/BitmapFilter.h
+++ /dev/null
@@ -1,43 +0,0 @@
-// 
-//   Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
-// 
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 3 of the License, or
-// (at your option) any later version.
-// 
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-// 
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-
-
-#ifndef GNASH_BITMAPFILTER_H
-#define GNASH_BITMAPFILTER_H
-
-#include <boost/shared_ptr.hpp>
-
-namespace gnash {
-
-class SWFStream;
-class BitmapFilter;
-typedef boost::shared_ptr<BitmapFilter> Filter;
-
-// The common base class for AS display filters.
-class BitmapFilter
-{
-public:
-    // Fill from a stream. See parser/filter_factory.cpp for the 
implementations.
-    virtual bool read(SWFStream& /*in*/) { return true; }
-
-    BitmapFilter() { return; }
-    virtual ~BitmapFilter() { return; }
-};
-
-} // Namespace gnash
-
-#endif // GNASH_BITMAPFILTER_H
diff --git a/libcore/BlurFilter.h b/libcore/BlurFilter.h
deleted file mode 100644
index 2f968ac..0000000
--- a/libcore/BlurFilter.h
+++ /dev/null
@@ -1,52 +0,0 @@
-// 
-//   Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
-// 
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 3 of the License, or
-// (at your option) any later version.
-// 
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-// 
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-
-
-#ifndef GNASH_BLURFILTER_H
-#define GNASH_BLURFILTER_H
-
-#include "BitmapFilter.h"
-
-#include <boost/cstdint.hpp> // for boost::uint8_t
-
-namespace gnash {
-
-// A blur effect filter.
-class BlurFilter : public BitmapFilter
-{
-public:
-    // Fill from a SWFStream. See parser/filter_factory.cpp for the 
implementations.
-    virtual bool read(SWFStream& in);
-
-    virtual ~BlurFilter() { return; }
-
-    BlurFilter() : 
-        m_blurX(0.0f), m_blurY(0.0f), m_quality(0)
-    { return; }
-
-    BlurFilter(float blurX, float blurY, boost::uint8_t quality) :
-        m_blurX(blurX), m_blurY(blurY), m_quality(quality)
-    { return; }
-
-    float m_blurX; // How much horizontal blur.
-    float m_blurY; // How much vertical blur.
-    boost::uint8_t m_quality; // How many passes to take.
-};
-
-} // Namespace gnash
-
-#endif // GNASH_BLURFILTER_H
diff --git a/libcore/ColorMatrixFilter.h b/libcore/ColorMatrixFilter.h
deleted file mode 100644
index 48fc57b..0000000
--- a/libcore/ColorMatrixFilter.h
+++ /dev/null
@@ -1,50 +0,0 @@
-// 
-//   Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
-// 
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 3 of the License, or
-// (at your option) any later version.
-// 
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-// 
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-
-
-#ifndef GNASH_COLORMATRIXFILTER_H
-#define GNASH_COLORMATRIXFILTER_H
-
-#include "BitmapFilter.h"
-#include <vector>
-
-namespace gnash {
-
-// A color SWFMatrix effect filter.
-class ColorMatrixFilter : public BitmapFilter
-{
-public:
-    // Fill from a SWFStream. See parser/filter_factory.cpp for the 
implementations.
-    virtual bool read(SWFStream& in);
-
-    virtual ~ColorMatrixFilter() { return; }
-
-    ColorMatrixFilter() : 
-        m_matrix()
-    { return; }
-
-    ColorMatrixFilter(std::vector<float> a_matrix) :
-        m_matrix(a_matrix)
-    { return; }
-
-protected:
-    std::vector<float> m_matrix; // The color SWFMatrix
-};
-
-} // Namespace gnash
-
-#endif // GNASH_CONVOLUTIONFILTER_H
diff --git a/libcore/ConvolutionFilter.h b/libcore/ConvolutionFilter.h
deleted file mode 100644
index f0f2d0a..0000000
--- a/libcore/ConvolutionFilter.h
+++ /dev/null
@@ -1,82 +0,0 @@
-// 
-//   Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
-// 
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 3 of the License, or
-// (at your option) any later version.
-// 
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-// 
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-
-
-#ifndef GNASH_CONVOLUTIONFILTER_H
-#define GNASH_CONVOLUTIONFILTER_H
-
-#include "BitmapFilter.h"
-
-#include <vector>
-#include <boost/cstdint.hpp> // for XintXX_t
-
-namespace gnash {
-
-// A convolution effect filter.
-class ConvolutionFilter : public BitmapFilter
-{
-public:
-    // Fill from a SWFStream. See parser/filter_factory.cpp for
-    // the implementations.
-    virtual bool read(SWFStream& in);
-
-    virtual ~ConvolutionFilter() {}
-
-    ConvolutionFilter()
-        :
-        _matrixX(),
-        _matrixY(),
-        _matrix(),
-        _divisor(),
-        _bias(),
-        _preserveAlpha(false),
-        _clamp(false),
-        _color(),
-        _alpha()
-    {}
-
-    ConvolutionFilter(boost::uint8_t matrixX, boost::uint8_t matrixY, 
-        const std::vector<float>& _matrix, float divisor, float bias,
-        bool preserveAlpha, bool clamp, boost::uint32_t color,
-        boost::uint8_t alpha)
-        :
-        _matrixX(matrixX),
-        _matrixY(matrixY),
-        _matrix(_matrix),
-        _divisor(divisor),
-        _bias(bias),
-        _preserveAlpha(preserveAlpha),
-        _clamp(clamp),
-        _color(color),
-        _alpha(alpha)
-    {}
-
-protected:
-    boost::uint8_t _matrixX; // Number of columns
-    boost::uint8_t _matrixY; // Number of rows
-    std::vector<float> _matrix; // The convolution matrix
-    float _divisor;
-    float _bias;
-    bool _preserveAlpha; // If true, don't convolute the alpha channel
-    bool _clamp; // Whether or not to clamp
-    boost::uint32_t _color; // For off-image pixels
-    boost::uint8_t _alpha; // For off-image pixels
-};
-
-} // Namespace gnash
-
-#endif // GNASH_CONVOLUTIONFILTER_H
diff --git a/libcore/DropShadowFilter.h b/libcore/DropShadowFilter.h
deleted file mode 100644
index 17f2f95..0000000
--- a/libcore/DropShadowFilter.h
+++ /dev/null
@@ -1,67 +0,0 @@
-// 
-//   Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
-// 
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 3 of the License, or
-// (at your option) any later version.
-// 
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-// 
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-
-
-#ifndef GNASH_DROPSHADOWFILTER_H
-#define GNASH_DROPSHADOWFILTER_H
-
-#include "BitmapFilter.h"
-
-#include <boost/cstdint.hpp> // for XintXX_t
-
-namespace gnash {
-
-// A drop shadow effect filter.
-class DropShadowFilter : public BitmapFilter
-{
-public:
-    // Fill from a SWFStream. See parser/filter_factory.cpp for the 
implementations.
-    virtual bool read(SWFStream& in);
-
-    virtual ~DropShadowFilter() { return; }
-
-    DropShadowFilter() : 
-        m_distance(0.0f), m_angle(0.0f), m_color(0), m_alpha(0),
-        m_blurX(0.0f), m_blurY(0.0f),  m_strength(0.0f), m_quality(0),
-        m_inner(false), m_knockout(false), m_hideObject(false)
-    { return; }
-
-    DropShadowFilter(float distance, float angle, boost::uint32_t color,
-        boost::uint8_t alpha, float blurX, float blurY, float strength,
-        boost::uint8_t quality, bool inner, bool knockout, bool hideObject) :
-        m_distance(distance), m_angle(angle), m_color(color),
-        m_alpha(alpha), m_blurX(blurX), m_blurY(blurY), m_strength(strength),
-        m_quality(quality), m_inner(inner), m_knockout(knockout),
-        m_hideObject(hideObject)
-    { return; }
-
-    float m_distance; // Distance of the filter in pixels.
-    float m_angle; // Angle of the filter.
-    boost::uint32_t m_color; // RGB color.
-    boost::uint8_t m_alpha; // Alpha strength, as a percentage(?)
-    float m_blurX; // horizontal blur
-    float m_blurY; // vertical blur
-    float m_strength; // How strong is the filter.
-    boost::uint8_t m_quality; // How many times to apply the filter.
-    bool m_inner; // Is this an inner shadow?
-    bool m_knockout; // If true, render only the filter effect.
-    bool m_hideObject; // Does this hide the object?
-};
-
-} // Namespace gnash
-
-#endif // GNASH_DROPSHADOWFILTER_H
diff --git a/libcore/Filters.h b/libcore/Filters.h
new file mode 100644
index 0000000..5cb72c5
--- /dev/null
+++ b/libcore/Filters.h
@@ -0,0 +1,359 @@
+// 
+//   Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+// 
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 3 of the License, or
+// (at your option) any later version.
+// 
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+// 
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+
+
+#ifndef GNASH_FILTERS_H
+#define GNASH_FILTERS_H
+
+#include <boost/cstdint.hpp> 
+#include <vector>
+
+namespace gnash {
+    class SWFStream;
+}
+
+namespace gnash {
+
+// The common base class for AS display filters.
+class BitmapFilter
+{
+public:
+    virtual bool read(SWFStream& /*in*/) {
+        return true;
+    }
+    BitmapFilter() {}
+    virtual ~BitmapFilter() {}
+};
+
+// A bevel effect filter.
+class BevelFilter : public BitmapFilter
+{
+public:
+    enum bevel_type
+    {
+        OUTER_BEVEL = 1,
+        INNER_BEVEL = 2,
+        FULL_BEVEL = 3
+    };
+
+    // Fill from a SWFStream. See parser/filter_factory.cpp for the 
implementations.
+    virtual bool read(SWFStream& in);
+
+    virtual ~BevelFilter() {}
+
+    BevelFilter()
+        : 
+        m_distance(0.0f),
+        m_angle(0.0f),
+        m_highlightColor(0),
+        m_highlightAlpha(0),
+        m_shadowColor(0),
+        m_shadowAlpha(0),
+        m_blurX(0.0f),
+        m_blurY(0.0f),
+        m_strength(0.0f),
+        m_quality(0),
+        m_type(FULL_BEVEL),
+        m_knockout(false)
+    {}
+
+    BevelFilter(float distance, float angle, boost::uint32_t hcolor,
+        boost::uint8_t halpha, boost::uint32_t scolor, boost::uint8_t salpha,
+        float blurX, float blurY, float strength,
+        boost::uint8_t quality, bevel_type type, bool knockout) :
+        m_distance(distance), m_angle(angle), m_highlightColor(hcolor),
+        m_highlightAlpha(halpha), m_shadowColor(scolor), m_shadowAlpha(salpha),
+        m_blurX(blurX), m_blurY(blurY), m_strength(strength),
+        m_quality(quality), m_type(type), m_knockout(knockout)
+    {}
+
+    float m_distance; // Distance of the filter in pixels.
+    float m_angle; // Angle of the filter.
+    boost::uint32_t m_highlightColor; // Color of the highlight.
+    boost::uint8_t m_highlightAlpha; // Alpha of the highlight.
+    boost::uint32_t m_shadowColor; // RGB color.
+    boost::uint8_t m_shadowAlpha; // Alpha strength, as a percentage(?)
+    float m_blurX; // horizontal blur
+    float m_blurY; // vertical blur
+    float m_strength; // How strong is the filter.
+    boost::uint8_t m_quality; // How many times to apply the filter.
+    bevel_type m_type; // The type of filter. (Rendered as string in AS)
+    bool m_knockout; // If true, render only the filter effect.
+};
+
+// A blur effect filter.
+class BlurFilter : public BitmapFilter
+{
+public:
+    // Fill from a SWFStream. See parser/filter_factory.cpp for the 
implementations.
+    virtual bool read(SWFStream& in);
+
+    virtual ~BlurFilter() {}
+
+    BlurFilter() : 
+        m_blurX(0.0f), m_blurY(0.0f), m_quality(0)
+    {}
+
+    BlurFilter(float blurX, float blurY, boost::uint8_t quality) :
+        m_blurX(blurX), m_blurY(blurY), m_quality(quality)
+    {}
+
+    float m_blurX; // How much horizontal blur.
+    float m_blurY; // How much vertical blur.
+    boost::uint8_t m_quality; // How many passes to take.
+};
+
+// A color SWFMatrix effect filter.
+class ColorMatrixFilter : public BitmapFilter
+{
+public:
+    // Fill from a SWFStream. See parser/filter_factory.cpp for the 
implementations.
+    virtual bool read(SWFStream& in);
+
+    virtual ~ColorMatrixFilter() {}
+
+    ColorMatrixFilter() : 
+        m_matrix()
+    {}
+
+    ColorMatrixFilter(std::vector<float> a_matrix) :
+        m_matrix(a_matrix)
+    {}
+
+protected:
+    std::vector<float> m_matrix; // The color SWFMatrix
+};
+
+// A convolution effect filter.
+class ConvolutionFilter : public BitmapFilter
+{
+public:
+    // Fill from a SWFStream. See parser/filter_factory.cpp for
+    // the implementations.
+    virtual bool read(SWFStream& in);
+
+    virtual ~ConvolutionFilter() {}
+
+    ConvolutionFilter()
+        :
+        _matrixX(),
+        _matrixY(),
+        _matrix(),
+        _divisor(),
+        _bias(),
+        _preserveAlpha(false),
+        _clamp(false),
+        _color(),
+        _alpha()
+    {}
+
+    ConvolutionFilter(boost::uint8_t matrixX, boost::uint8_t matrixY, 
+        const std::vector<float>& _matrix, float divisor, float bias,
+        bool preserveAlpha, bool clamp, boost::uint32_t color,
+        boost::uint8_t alpha)
+        :
+        _matrixX(matrixX),
+        _matrixY(matrixY),
+        _matrix(_matrix),
+        _divisor(divisor),
+        _bias(bias),
+        _preserveAlpha(preserveAlpha),
+        _clamp(clamp),
+        _color(color),
+        _alpha(alpha)
+    {}
+
+protected:
+    boost::uint8_t _matrixX; // Number of columns
+    boost::uint8_t _matrixY; // Number of rows
+    std::vector<float> _matrix; // The convolution matrix
+    float _divisor;
+    float _bias;
+    bool _preserveAlpha; // If true, don't convolute the alpha channel
+    bool _clamp; // Whether or not to clamp
+    boost::uint32_t _color; // For off-image pixels
+    boost::uint8_t _alpha; // For off-image pixels
+};
+
+// A drop shadow effect filter.
+class DropShadowFilter : public BitmapFilter
+{
+public:
+    // Fill from a SWFStream. See parser/filter_factory.cpp for the 
implementations.
+    virtual bool read(SWFStream& in);
+
+    virtual ~DropShadowFilter() {}
+
+    DropShadowFilter() : 
+        m_distance(0.0f), m_angle(0.0f), m_color(0), m_alpha(0),
+        m_blurX(0.0f), m_blurY(0.0f),  m_strength(0.0f), m_quality(0),
+        m_inner(false), m_knockout(false), m_hideObject(false)
+    {}
+
+    DropShadowFilter(float distance, float angle, boost::uint32_t color,
+        boost::uint8_t alpha, float blurX, float blurY, float strength,
+        boost::uint8_t quality, bool inner, bool knockout, bool hideObject) :
+        m_distance(distance), m_angle(angle), m_color(color),
+        m_alpha(alpha), m_blurX(blurX), m_blurY(blurY), m_strength(strength),
+        m_quality(quality), m_inner(inner), m_knockout(knockout),
+        m_hideObject(hideObject)
+    {}
+
+    float m_distance; // Distance of the filter in pixels.
+    float m_angle; // Angle of the filter.
+    boost::uint32_t m_color; // RGB color.
+    boost::uint8_t m_alpha; // Alpha strength, as a percentage(?)
+    float m_blurX; // horizontal blur
+    float m_blurY; // vertical blur
+    float m_strength; // How strong is the filter.
+    boost::uint8_t m_quality; // How many times to apply the filter.
+    bool m_inner; // Is this an inner shadow?
+    bool m_knockout; // If true, render only the filter effect.
+    bool m_hideObject; // Does this hide the object?
+};
+
+
+// A glow effect filter.
+class GlowFilter : public BitmapFilter
+{
+public:
+    // Fill from a SWFStream. See parser/filter_factory.cpp for the 
implementations.
+    virtual bool read(SWFStream& in);
+
+    virtual ~GlowFilter() {}
+
+    GlowFilter() : 
+        m_color(0), m_alpha(0),
+        m_blurX(0.0f), m_blurY(0.0f),  m_strength(0.0f), m_quality(0),
+        m_inner(false), m_knockout(false)
+    {}
+
+    GlowFilter(boost::uint32_t color,
+        boost::uint8_t alpha, float blurX, float blurY, float strength,
+        boost::uint8_t quality, bool inner, bool knockout) :
+        m_color(color),
+        m_alpha(alpha), m_blurX(blurX), m_blurY(blurY), m_strength(strength),
+        m_quality(quality), m_inner(inner), m_knockout(knockout)
+    {}
+
+    boost::uint32_t m_color; // RGB color.
+    boost::uint8_t m_alpha; // Alpha strength, as a percentage(?)
+    float m_blurX; // horizontal blur
+    float m_blurY; // vertical blur
+    float m_strength; // How strong is the filter.
+    boost::uint8_t m_quality; // How many times to apply the filter.
+    bool m_inner; // Is this an inner shadow?
+    bool m_knockout; // If true, render only the filter effect.
+};
+
+
+// A gradient bevel effect filter.
+class GradientBevelFilter : public BitmapFilter
+{
+public:
+    enum glow_types
+    {
+        INNER_BEVEL = 2,
+        OUTER_BEVEL = 1,
+        FULL_BEVEL = 3
+    };
+
+    // Fill from a SWFStream. See parser/filter_factory.cpp for the 
implementations.
+    virtual bool read(SWFStream& in);
+
+    virtual ~GradientBevelFilter() {}
+
+    GradientBevelFilter() : 
+        m_distance(0.0f), m_angle(0.0f), m_colors(), m_alphas(), m_ratios(),
+        m_blurX(0.0f), m_blurY(0.0f),  m_strength(0.0f), m_quality(0),
+        m_type(INNER_BEVEL), m_knockout(false)
+    {}
+
+    GradientBevelFilter(float distance, float angle,
+        std::vector<boost::uint32_t> colors,
+        std::vector<boost::uint8_t> alphas,
+        std::vector<boost::uint8_t> ratios,
+        float blurX, float blurY, float strength,
+        boost::uint8_t quality, glow_types type, bool knockout) :
+        m_distance(distance), m_angle(angle),
+        m_colors(colors), m_alphas(alphas), m_ratios(ratios),
+        m_blurX(blurX), m_blurY(blurY), m_strength(strength),
+        m_quality(quality), m_type(type), m_knockout(knockout)
+    {}
+
+    float m_distance; // Distance of the filter in pixels.
+    float m_angle; // Angle of the filter.
+    std::vector<boost::uint32_t> m_colors; // Colors of the gradients.
+    std::vector<boost::uint8_t> m_alphas; // Alphas of the gradients.
+    std::vector<boost::uint8_t> m_ratios; // Ratios of the gradients.
+    float m_blurX; // horizontal blur
+    float m_blurY; // vertical blur
+    float m_strength; // How strong is the filter.
+    boost::uint8_t m_quality; // How many times to apply the filter.
+    glow_types m_type; // What type of effect.
+    bool m_knockout; // If true, render only the filter effect.
+};
+
+// A gradient glow effect filter.
+class GradientGlowFilter : public BitmapFilter
+{
+public:
+    enum glow_types
+    {
+        INNER_GLOW = 2,
+        OUTER_GLOW = 1,
+        FULL_GLOW = 3
+    };
+
+    // Fill from a SWFStream. See parser/filter_factory.cpp for the 
implementations.
+    virtual bool read(SWFStream& in);
+
+    virtual ~GradientGlowFilter() {}
+
+    GradientGlowFilter() : 
+        m_distance(0.0f), m_angle(0.0f), m_colors(), m_alphas(), m_ratios(),
+        m_blurX(0.0f), m_blurY(0.0f),  m_strength(0.0f), m_quality(0),
+        m_type(INNER_GLOW), m_knockout(false)
+    {}
+
+    GradientGlowFilter(float distance, float angle,
+        std::vector<boost::uint32_t> colors,
+        std::vector<boost::uint8_t> alphas,
+        std::vector<boost::uint8_t> ratios,
+        float blurX, float blurY, float strength,
+        boost::uint8_t quality, glow_types type, bool knockout) :
+        m_distance(distance), m_angle(angle), m_colors(colors), 
m_alphas(alphas),
+        m_ratios(ratios), m_blurX(blurX), m_blurY(blurY), m_strength(strength),
+        m_quality(quality), m_type(type), m_knockout(knockout)
+    {}
+
+    float m_distance; // Distance of the filter in pixels.
+    float m_angle; // Angle of the filter.
+    std::vector<boost::uint32_t> m_colors; // Colors of the gradients.
+    std::vector<boost::uint8_t> m_alphas; // Alphas of the gradients.
+    std::vector<boost::uint8_t> m_ratios; // Ratios of the gradients.
+    float m_blurX; // horizontal blur
+    float m_blurY; // vertical blur
+    float m_strength; // How strong is the filter.
+    boost::uint8_t m_quality; // How many times to apply the filter.
+    glow_types m_type; // What type of effect.
+    bool m_knockout; // If true, render only the filter effect.
+};
+
+} // Namespace gnash
+
+#endif
diff --git a/libcore/GlowFilter.h b/libcore/GlowFilter.h
deleted file mode 100644
index 7498fb6..0000000
--- a/libcore/GlowFilter.h
+++ /dev/null
@@ -1,63 +0,0 @@
-// 
-//   Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
-// 
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 3 of the License, or
-// (at your option) any later version.
-// 
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-// 
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-
-
-#ifndef GNASH_GLOWFILTER_H
-#define GNASH_GLOWFILTER_H
-
-#include "BitmapFilter.h"
-
-#include <boost/cstdint.hpp> // for boost::uint32_t
-
-namespace gnash {
-
-// A glow effect filter.
-class GlowFilter : public BitmapFilter
-{
-public:
-    // Fill from a SWFStream. See parser/filter_factory.cpp for the 
implementations.
-    virtual bool read(SWFStream& in);
-
-    virtual ~GlowFilter() { return; }
-
-    GlowFilter() : 
-        m_color(0), m_alpha(0),
-        m_blurX(0.0f), m_blurY(0.0f),  m_strength(0.0f), m_quality(0),
-        m_inner(false), m_knockout(false)
-    { return; }
-
-    GlowFilter(boost::uint32_t color,
-        boost::uint8_t alpha, float blurX, float blurY, float strength,
-        boost::uint8_t quality, bool inner, bool knockout) :
-        m_color(color),
-        m_alpha(alpha), m_blurX(blurX), m_blurY(blurY), m_strength(strength),
-        m_quality(quality), m_inner(inner), m_knockout(knockout)
-    { return; }
-
-    boost::uint32_t m_color; // RGB color.
-    boost::uint8_t m_alpha; // Alpha strength, as a percentage(?)
-    float m_blurX; // horizontal blur
-    float m_blurY; // vertical blur
-    float m_strength; // How strong is the filter.
-    boost::uint8_t m_quality; // How many times to apply the filter.
-    bool m_inner; // Is this an inner shadow?
-    bool m_knockout; // If true, render only the filter effect.
-};
-
-} // Namespace gnash
-
-#endif // GNASH_GLOWFILTER_H
diff --git a/libcore/GradientBevelFilter.h b/libcore/GradientBevelFilter.h
deleted file mode 100644
index 221faac..0000000
--- a/libcore/GradientBevelFilter.h
+++ /dev/null
@@ -1,78 +0,0 @@
-// 
-//   Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
-// 
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 3 of the License, or
-// (at your option) any later version.
-// 
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-// 
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-
-
-#ifndef GNASH_GRADIENTBEVELFILTER_H
-#define GNASH_GRADIENTBEVELFILTER_H
-
-#include "BitmapFilter.h"
-
-#include <vector>
-#include <boost/cstdint.hpp> // for C99 int types
-
-namespace gnash {
-
-// A gradient bevel effect filter.
-class GradientBevelFilter : public BitmapFilter
-{
-public:
-    typedef enum
-    {
-        INNER_BEVEL = 2,
-        OUTER_BEVEL = 1,
-        FULL_BEVEL = 3
-    } glow_types;
-
-    // Fill from a SWFStream. See parser/filter_factory.cpp for the 
implementations.
-    virtual bool read(SWFStream& in);
-
-    virtual ~GradientBevelFilter() { return; }
-
-    GradientBevelFilter() : 
-        m_distance(0.0f), m_angle(0.0f), m_colors(), m_alphas(), m_ratios(),
-        m_blurX(0.0f), m_blurY(0.0f),  m_strength(0.0f), m_quality(0),
-        m_type(INNER_BEVEL), m_knockout(false)
-    { return; }
-
-    GradientBevelFilter(float distance, float angle,
-        std::vector<boost::uint32_t> colors,
-        std::vector<boost::uint8_t> alphas,
-        std::vector<boost::uint8_t> ratios,
-        float blurX, float blurY, float strength,
-        boost::uint8_t quality, glow_types type, bool knockout) :
-        m_distance(distance), m_angle(angle),
-        m_colors(colors), m_alphas(alphas), m_ratios(ratios),
-        m_blurX(blurX), m_blurY(blurY), m_strength(strength),
-        m_quality(quality), m_type(type), m_knockout(knockout)
-    { return; }
-
-    float m_distance; // Distance of the filter in pixels.
-    float m_angle; // Angle of the filter.
-    std::vector<boost::uint32_t> m_colors; // Colors of the gradients.
-    std::vector<boost::uint8_t> m_alphas; // Alphas of the gradients.
-    std::vector<boost::uint8_t> m_ratios; // Ratios of the gradients.
-    float m_blurX; // horizontal blur
-    float m_blurY; // vertical blur
-    float m_strength; // How strong is the filter.
-    boost::uint8_t m_quality; // How many times to apply the filter.
-    glow_types m_type; // What type of effect.
-    bool m_knockout; // If true, render only the filter effect.
-};
-
-} // Namespace gnash
-
-#endif // GNASH_GRADIENTBEVELFILTER_H
diff --git a/libcore/GradientGlowFilter.h b/libcore/GradientGlowFilter.h
deleted file mode 100644
index dc9599e..0000000
--- a/libcore/GradientGlowFilter.h
+++ /dev/null
@@ -1,78 +0,0 @@
-// 
-//   Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
-// 
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 3 of the License, or
-// (at your option) any later version.
-// 
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-// 
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-
-
-#ifndef GNASH_GRADIENTGLOWFILTER_H
-#define GNASH_GRADIENTGLOWFILTER_H
-
-#include "BitmapFilter.h"
-
-#include <vector>
-#include <boost/cstdint.hpp> // For C99 int types
-
-
-namespace gnash {
-
-// A gradient glow effect filter.
-class GradientGlowFilter : public BitmapFilter
-{
-public:
-    typedef enum
-    {
-        INNER_GLOW = 2,
-        OUTER_GLOW = 1,
-        FULL_GLOW = 3
-    } glow_types;
-
-    // Fill from a SWFStream. See parser/filter_factory.cpp for the 
implementations.
-    virtual bool read(SWFStream& in);
-
-    virtual ~GradientGlowFilter() { return; }
-
-    GradientGlowFilter() : 
-        m_distance(0.0f), m_angle(0.0f), m_colors(), m_alphas(), m_ratios(),
-        m_blurX(0.0f), m_blurY(0.0f),  m_strength(0.0f), m_quality(0),
-        m_type(INNER_GLOW), m_knockout(false)
-    { return; }
-
-    GradientGlowFilter(float distance, float angle,
-        std::vector<boost::uint32_t> colors,
-        std::vector<boost::uint8_t> alphas,
-        std::vector<boost::uint8_t> ratios,
-        float blurX, float blurY, float strength,
-        boost::uint8_t quality, glow_types type, bool knockout) :
-        m_distance(distance), m_angle(angle), m_colors(colors), 
m_alphas(alphas),
-        m_ratios(ratios), m_blurX(blurX), m_blurY(blurY), m_strength(strength),
-        m_quality(quality), m_type(type), m_knockout(knockout)
-    { return; }
-
-    float m_distance; // Distance of the filter in pixels.
-    float m_angle; // Angle of the filter.
-    std::vector<boost::uint32_t> m_colors; // Colors of the gradients.
-    std::vector<boost::uint8_t> m_alphas; // Alphas of the gradients.
-    std::vector<boost::uint8_t> m_ratios; // Ratios of the gradients.
-    float m_blurX; // horizontal blur
-    float m_blurY; // vertical blur
-    float m_strength; // How strong is the filter.
-    boost::uint8_t m_quality; // How many times to apply the filter.
-    glow_types m_type; // What type of effect.
-    bool m_knockout; // If true, render only the filter effect.
-};
-
-} // Namespace gnash
-
-#endif // GNASH_GRADIENTGLOWFILTER_H
diff --git a/libcore/Makefile.am b/libcore/Makefile.am
index ec5311e..9a4bcaa 100644
--- a/libcore/Makefile.am
+++ b/libcore/Makefile.am
@@ -153,15 +153,7 @@ noinst_HEADERS = \
        Button.h \
        debugger.h \
        TextField.h \
-        BitmapFilter.h \
-        BlurFilter.h \
-        BevelFilter.h \
-        GradientBevelFilter.h \
-        GlowFilter.h \
-        GradientGlowFilter.h \
-        DropShadowFilter.h \
-        ConvolutionFilter.h \
-        ColorMatrixFilter.h \
+       Filters.h \
         parser/filter_factory.h \
        Font.h \
        fontlib.h \
diff --git a/libcore/asobj/flash/filters/BevelFilter_as.cpp 
b/libcore/asobj/flash/filters/BevelFilter_as.cpp
index 64d69db..d3d0323 100644
--- a/libcore/asobj/flash/filters/BevelFilter_as.cpp
+++ b/libcore/asobj/flash/filters/BevelFilter_as.cpp
@@ -15,13 +15,14 @@
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
+#include "BevelFilter_as.h"
 
 #include "as_object.h"
-#include "BevelFilter.h"
 #include "VM.h"
 #include "builtin_function.h"
 #include "Global_as.h"
 #include "BitmapFilter_as.h"
+#include "Filters.h"
 
 namespace gnash {
 
diff --git a/libcore/asobj/flash/filters/BevelFilter_as.h 
b/libcore/asobj/flash/filters/BevelFilter_as.h
index f1ea857..ce99cb1 100644
--- a/libcore/asobj/flash/filters/BevelFilter_as.h
+++ b/libcore/asobj/flash/filters/BevelFilter_as.h
@@ -16,8 +16,8 @@
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 //
 
-#ifndef __GNASH_ASOBJ_BEVELFILTER_H__
-#define __GNASH_ASOBJ_BEVELFILTER_H__
+#ifndef GNASH_ASOBJ_BEVELFILTER_H
+#define GNASH_ASOBJ_BEVELFILTER_H
 
 namespace gnash {
 
@@ -28,7 +28,5 @@ struct ObjectURI;
 void bevelfilter_class_init(as_object& where, const ObjectURI& uri);
 
 } // end of gnash namespace
-
-// __GNASH_ASOBJ_BEVELFILTER_H__
 #endif
 
diff --git a/libcore/asobj/flash/filters/BitmapFilterQuality_as.cpp 
b/libcore/asobj/flash/filters/BitmapFilterQuality_as.cpp
deleted file mode 100644
index 1872705..0000000
--- a/libcore/asobj/flash/filters/BitmapFilterQuality_as.cpp
+++ /dev/null
@@ -1,57 +0,0 @@
-// BitmapFilterQuality_as.cpp:  ActionScript "BitmapFilterQuality" class, for 
Gnash.
-//
-//   Copyright (C) 2009, 2010 Free Software Foundation, Inc.
-//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-
-#include "filters/BitmapFilterQuality_as.h"
-#include "log.h"
-#include "fn_call.h"
-#include "Global_as.h"
-#include "smart_ptr.h" // for boost intrusive_ptr
-#include "builtin_function.h" // need builtin_function
-#include "GnashException.h" // for ActionException
-
-namespace gnash {
-
-// Forward declarations
-namespace {
-    void attachBitmapFilterQualityStaticInterface(as_object& o);
-
-}
-
-// extern (used by Global.cpp)
-void bitmapfilterquality_class_init(as_object& where, const ObjectURI& uri)
-{
-    registerBuiltinObject(where, attachBitmapFilterQualityStaticInterface, 
uri);
-}
-
-namespace {
-
-void
-attachBitmapFilterQualityStaticInterface(as_object& /*o*/)
-{
-}
-
-} // anonymous namespace 
-} // gnash namespace
-
-// local Variables:
-// mode: C++
-// indent-tabs-mode: t
-// End:
-
diff --git a/libcore/asobj/flash/filters/BitmapFilterQuality_as.h 
b/libcore/asobj/flash/filters/BitmapFilterQuality_as.h
deleted file mode 100644
index fb6e1f3..0000000
--- a/libcore/asobj/flash/filters/BitmapFilterQuality_as.h
+++ /dev/null
@@ -1,43 +0,0 @@
-// BitmapFilterQuality_as.h:  ActionScript 3 "BitmapFilterQuality" class, for 
Gnash.
-//
-//   Copyright (C) 2009, 2010 Free Software Foundation, Inc.
-//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-#ifndef GNASH_ASOBJ3_BITMAPFILTERQUALITY_H
-#define GNASH_ASOBJ3_BITMAPFILTERQUALITY_H
-
-
-
-namespace gnash {
-
-// Forward declarations
-class as_object;
-struct ObjectURI;
-
-/// Initialize the global BitmapFilterQuality class
-void bitmapfilterquality_class_init(as_object& where, const ObjectURI& uri);
-
-} // gnash namespace
-
-// GNASH_ASOBJ3_BITMAPFILTERQUALITY_H
-#endif
-
-// local Variables:
-// mode: C++
-// indent-tabs-mode: t
-// End:
-
diff --git a/libcore/asobj/flash/filters/BitmapFilterType_as.cpp 
b/libcore/asobj/flash/filters/BitmapFilterType_as.cpp
deleted file mode 100644
index 2180797..0000000
--- a/libcore/asobj/flash/filters/BitmapFilterType_as.cpp
+++ /dev/null
@@ -1,58 +0,0 @@
-// BitmapFilterType_as.cpp:  ActionScript "BitmapFilterType" class, for Gnash.
-//
-//   Copyright (C) 2009, 2010 Free Software Foundation, Inc.
-//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-
-#include "filters/BitmapFilterType_as.h"
-#include "log.h"
-#include "fn_call.h"
-#include "Global_as.h"
-#include "smart_ptr.h" // for boost intrusive_ptr
-#include "builtin_function.h" // need builtin_function
-#include "GnashException.h" // for ActionException
-
-namespace gnash {
-
-// Forward declarations
-namespace {
-    void attachBitmapFilterTypeStaticInterface(as_object& o);
-}
-
-// extern (used by Global.cpp)
-void
-bitmapfiltertype_class_init(as_object& where, const ObjectURI& uri)
-{
-    registerBuiltinObject(where, attachBitmapFilterTypeStaticInterface, uri);
-}
-
-namespace {
-
-void
-attachBitmapFilterTypeStaticInterface(as_object& /*o*/)
-{
-    // TODO: attach constants.
-}
-
-} // anonymous namespace 
-} // gnash namespace
-
-// local Variables:
-// mode: C++
-// indent-tabs-mode: t
-// End:
-
diff --git a/libcore/asobj/flash/filters/BitmapFilterType_as.h 
b/libcore/asobj/flash/filters/BitmapFilterType_as.h
deleted file mode 100644
index 0be3253..0000000
--- a/libcore/asobj/flash/filters/BitmapFilterType_as.h
+++ /dev/null
@@ -1,43 +0,0 @@
-// BitmapFilterType_as.h:  ActionScript 3 "BitmapFilterType" class, for Gnash.
-//
-//   Copyright (C) 2009, 2010 Free Software Foundation, Inc.
-//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-#ifndef GNASH_ASOBJ3_BITMAPFILTERTYPE_H
-#define GNASH_ASOBJ3_BITMAPFILTERTYPE_H
-
-
-
-namespace gnash {
-
-// Forward declarations
-class as_object;
-struct ObjectURI;
-
-/// Initialize the global BitmapFilterType class
-void bitmapfiltertype_class_init(as_object& where, const ObjectURI& uri);
-
-} // gnash namespace
-
-// GNASH_ASOBJ3_BITMAPFILTERTYPE_H
-#endif
-
-// local Variables:
-// mode: C++
-// indent-tabs-mode: t
-// End:
-
diff --git a/libcore/asobj/flash/filters/BitmapFilter_as.cpp 
b/libcore/asobj/flash/filters/BitmapFilter_as.cpp
index 97f831a..4b2aeae 100644
--- a/libcore/asobj/flash/filters/BitmapFilter_as.cpp
+++ b/libcore/asobj/flash/filters/BitmapFilter_as.cpp
@@ -15,14 +15,15 @@
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
+#include "BitmapFilter_as.h"
 
 #include "namedStrings.h"
 #include "as_object.h"
-#include "BitmapFilter.h"
 #include "VM.h"
 #include "builtin_function.h"
 #include "NativeFunction.h"
 #include "Global_as.h"
+#include "Filters.h"
 
 namespace gnash {
 
diff --git a/libcore/asobj/flash/filters/BitmapFilter_as.h 
b/libcore/asobj/flash/filters/BitmapFilter_as.h
index e511359..9636fe1 100644
--- a/libcore/asobj/flash/filters/BitmapFilter_as.h
+++ b/libcore/asobj/flash/filters/BitmapFilter_as.h
@@ -19,20 +19,20 @@
 #ifndef GNASH_ASOBJ_BITMAPFILTER_H
 #define GNASH_ASOBJ_BITMAPFILTER_H
 
-
 #include "Global_as.h"
 
 namespace gnash {
+    class as_object;
+    struct ObjectURI;
+}
 
-class as_object;
-struct ObjectURI;
+namespace gnash {
 
 /// Initialize the global BitmapFilter class
 void bitmapfilter_class_init(as_object& where, const ObjectURI& uri);
 
 void registerBitmapFilterNative(as_object& global);
 
-
 /// Convenience function only for BitmapFilter subclasses.
 //
 /// This implements the AS code necessary for defining subclasses of
diff --git a/libcore/asobj/flash/filters/BlurFilter_as.cpp 
b/libcore/asobj/flash/filters/BlurFilter_as.cpp
index e66cd38..f8962e9 100644
--- a/libcore/asobj/flash/filters/BlurFilter_as.cpp
+++ b/libcore/asobj/flash/filters/BlurFilter_as.cpp
@@ -15,13 +15,14 @@
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
+#include "BlurFilter_as.h"
 
 #include "as_object.h"
-#include "BlurFilter.h"
 #include "VM.h"
 #include "builtin_function.h"
 #include "Global_as.h"
 #include "BitmapFilter_as.h"
+#include "Filters.h"
 
 namespace gnash {
 
diff --git a/libcore/asobj/flash/filters/BlurFilter_as.h 
b/libcore/asobj/flash/filters/BlurFilter_as.h
index 791c1c2..063dc0b 100644
--- a/libcore/asobj/flash/filters/BlurFilter_as.h
+++ b/libcore/asobj/flash/filters/BlurFilter_as.h
@@ -29,6 +29,5 @@ void blurfilter_class_init(as_object& where, const ObjectURI& 
uri);
 
 } // end of gnash namespace
 
-// __GNASH_ASOBJ_BLURFILTER_H__
 #endif
 
diff --git a/libcore/asobj/flash/filters/ColorMatrixFilter_as.cpp 
b/libcore/asobj/flash/filters/ColorMatrixFilter_as.cpp
index b028e9a..4df176b 100644
--- a/libcore/asobj/flash/filters/ColorMatrixFilter_as.cpp
+++ b/libcore/asobj/flash/filters/ColorMatrixFilter_as.cpp
@@ -15,13 +15,14 @@
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
+#include "ColorMatrixFilter_as.h"
 
 #include "as_object.h"
-#include "ColorMatrixFilter.h"
 #include "VM.h"
 #include "builtin_function.h"
 #include "Global_as.h"
 #include "BitmapFilter_as.h"
+#include "Filters.h"
 
 namespace gnash {
 
diff --git a/libcore/asobj/flash/filters/ColorMatrixFilter_as.h 
b/libcore/asobj/flash/filters/ColorMatrixFilter_as.h
index 2428edf..4eeb939 100644
--- a/libcore/asobj/flash/filters/ColorMatrixFilter_as.h
+++ b/libcore/asobj/flash/filters/ColorMatrixFilter_as.h
@@ -16,8 +16,8 @@
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 //
 
-#ifndef __GNASH_ASOBJ_COLORMATRIXFILTER_H__
-#define __GNASH_ASOBJ_COLORMATRIXFILTER_H__
+#ifndef GNASH_ASOBJ_COLORMATRIXFILTER_H
+#define GNASH_ASOBJ_COLORMATRIXFILTER_H
 
 namespace gnash {
 
@@ -29,6 +29,5 @@ void colormatrixfilter_class_init(as_object& where, const 
ObjectURI& uri);
 
 } // end of gnash namespace
 
-// __GNASH_ASOBJ_COLORMATRIXFILTER_H__
 #endif
 
diff --git a/libcore/asobj/flash/filters/ConvolutionFilter_as.cpp 
b/libcore/asobj/flash/filters/ConvolutionFilter_as.cpp
index 2aa8cde..1de0fc8 100644
--- a/libcore/asobj/flash/filters/ConvolutionFilter_as.cpp
+++ b/libcore/asobj/flash/filters/ConvolutionFilter_as.cpp
@@ -15,13 +15,14 @@
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
+#include "ConvolutionFilter_as.h"
 
 #include "as_object.h"
-#include "ConvolutionFilter.h"
 #include "VM.h"
 #include "Global_as.h"
-#include "BitmapFilter_as.h"
 #include "builtin_function.h"
+#include "BitmapFilter_as.h"
+#include "Filters.h"
 
 namespace gnash {
 
diff --git a/libcore/asobj/flash/filters/ConvolutionFilter_as.h 
b/libcore/asobj/flash/filters/ConvolutionFilter_as.h
index 8fd85de..ad8fb96 100644
--- a/libcore/asobj/flash/filters/ConvolutionFilter_as.h
+++ b/libcore/asobj/flash/filters/ConvolutionFilter_as.h
@@ -16,8 +16,8 @@
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 //
 
-#ifndef __GNASH_ASOBJ_CONVOLUTIONFILTER_H__
-#define __GNASH_ASOBJ_CONVOLUTIONFILTER_H__
+#ifndef GNASH_ASOBJ_CONVOLUTIONFILTER_H
+#define GNASH_ASOBJ_CONVOLUTIONFILTER_H
 
 namespace gnash {
 
@@ -29,6 +29,5 @@ void convolutionfilter_class_init(as_object& where, const 
ObjectURI& uri);
 
 } // end of gnash namespace
 
-// __GNASH_ASOBJ_CONVOLUTIONFILTER_H__
 #endif
 
diff --git a/libcore/asobj/flash/filters/DisplacementMapFilterMode_as.cpp 
b/libcore/asobj/flash/filters/DisplacementMapFilterMode_as.cpp
deleted file mode 100644
index 12fd616..0000000
--- a/libcore/asobj/flash/filters/DisplacementMapFilterMode_as.cpp
+++ /dev/null
@@ -1,60 +0,0 @@
-// DisplacementMapFilterMode_as.cpp:  ActionScript "DisplacementMapFilterMode" 
class, for Gnash.
-//
-//   Copyright (C) 2009, 2010 Free Software Foundation, Inc.
-//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-
-#include "filters/DisplacementMapFilterMode_as.h"
-#include "log.h"
-#include "fn_call.h"
-#include "Global_as.h"
-#include "smart_ptr.h" // for boost intrusive_ptr
-#include "builtin_function.h" // need builtin_function
-#include "GnashException.h" // for ActionException
-
-namespace gnash {
-
-// Forward declarations
-namespace {
-    void attachDisplacementMapFilterModeStaticInterface(as_object& o);
-
-}
-
-// extern (used by Global.cpp)
-void displacementmapfiltermode_class_init(as_object& where,
-        const ObjectURI& uri)
-{
-    registerBuiltinObject(where, 
attachDisplacementMapFilterModeStaticInterface,
-            uri);
-}
-
-namespace {
-
-void
-attachDisplacementMapFilterModeStaticInterface(as_object& /*o*/)
-{
-
-}
-
-} // anonymous namespace 
-} // gnash namespace
-
-// local Variables:
-// mode: C++
-// indent-tabs-mode: t
-// End:
-
diff --git a/libcore/asobj/flash/filters/DisplacementMapFilterMode_as.h 
b/libcore/asobj/flash/filters/DisplacementMapFilterMode_as.h
deleted file mode 100644
index 914813d..0000000
--- a/libcore/asobj/flash/filters/DisplacementMapFilterMode_as.h
+++ /dev/null
@@ -1,43 +0,0 @@
-// DisplacementMapFilterMode_as.h:  ActionScript 3 "DisplacementMapFilterMode" 
class, for Gnash.
-//
-//   Copyright (C) 2009, 2010 Free Software Foundation, Inc.
-//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-#ifndef GNASH_ASOBJ3_DISPLACEMENTMAPFILTERMODE_H
-#define GNASH_ASOBJ3_DISPLACEMENTMAPFILTERMODE_H
-
-
-
-namespace gnash {
-
-// Forward declarations
-class as_object;
-struct ObjectURI;
-
-/// Initialize the global DisplacementMapFilterMode class
-void displacementmapfiltermode_class_init(as_object& where, const ObjectURI& 
uri);
-
-} // gnash namespace
-
-// GNASH_ASOBJ3_DISPLACEMENTMAPFILTERMODE_H
-#endif
-
-// local Variables:
-// mode: C++
-// indent-tabs-mode: t
-// End:
-
diff --git a/libcore/asobj/flash/filters/DisplacementMapFilter_as.cpp 
b/libcore/asobj/flash/filters/DisplacementMapFilter_as.cpp
index 3260a6c..76aecba 100644
--- a/libcore/asobj/flash/filters/DisplacementMapFilter_as.cpp
+++ b/libcore/asobj/flash/filters/DisplacementMapFilter_as.cpp
@@ -20,6 +20,7 @@
 
 
 #include "DisplacementMapFilter_as.h"
+
 #include "as_object.h" // for inheritance
 #include "log.h"
 #include "fn_call.h"
@@ -27,6 +28,7 @@
 #include "smart_ptr.h" // for boost intrusive_ptr
 #include "builtin_function.h" // need builtin_function
 #include "BitmapFilter_as.h"
+#include "Filters.h"
 
 #include <sstream>
 
diff --git a/libcore/asobj/flash/filters/DisplacementMapFilter_as.h 
b/libcore/asobj/flash/filters/DisplacementMapFilter_as.h
index ece5c07..a5d4bf7 100644
--- a/libcore/asobj/flash/filters/DisplacementMapFilter_as.h
+++ b/libcore/asobj/flash/filters/DisplacementMapFilter_as.h
@@ -18,10 +18,8 @@
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 //
 
-#ifndef __GNASH_ASOBJ_DISPLACEMENTMAPFILTER_H__
-#define __GNASH_ASOBJ_DISPLACEMENTMAPFILTER_H__
-
-
+#ifndef GNASH_ASOBJ_DISPLACEMENTMAPFILTER_H
+#define GNASH_ASOBJ_DISPLACEMENTMAPFILTER_H
 
 namespace gnash {
 
@@ -31,10 +29,6 @@ struct ObjectURI;
 /// Initialize the global DisplacementMapFilter class
 void displacementmapfilter_class_init(as_object& where, const ObjectURI& uri);
 
-/// Return a DisplacementMapFilter instance (in case the core lib needs it)
-//std::auto_ptr<as_object> init_DisplacementMapFilter_instance();
-
 } // end of gnash namespace
 
-// __GNASH_ASOBJ_DISPLACEMENTMAPFILTER_H__
 #endif
diff --git a/libcore/asobj/flash/filters/DropShadowFilter_as.cpp 
b/libcore/asobj/flash/filters/DropShadowFilter_as.cpp
index 43663f4..8bdcc3e 100644
--- a/libcore/asobj/flash/filters/DropShadowFilter_as.cpp
+++ b/libcore/asobj/flash/filters/DropShadowFilter_as.cpp
@@ -15,13 +15,14 @@
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
+#include "DropShadowFilter_as.h"
 
 #include "as_object.h"
-#include "DropShadowFilter.h"
 #include "VM.h"
 #include "Global_as.h"
-#include "BitmapFilter_as.h"
 #include "builtin_function.h"
+#include "BitmapFilter_as.h"
+#include "Filters.h"
 
 namespace gnash {
 
diff --git a/libcore/asobj/flash/filters/DropShadowFilter_as.h 
b/libcore/asobj/flash/filters/DropShadowFilter_as.h
index 4d0bf1c..edc2a5b 100644
--- a/libcore/asobj/flash/filters/DropShadowFilter_as.h
+++ b/libcore/asobj/flash/filters/DropShadowFilter_as.h
@@ -16,8 +16,8 @@
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 //
 
-#ifndef __GNASH_ASOBJ_DROPSHADOWFILTER_H__
-#define __GNASH_ASOBJ_DROPSHADOWFILTER_H__
+#ifndef GNASH_ASOBJ_DROPSHADOWFILTER_H
+#define GNASH_ASOBJ_DROPSHADOWFILTER_H
 
 namespace gnash {
 
@@ -29,6 +29,5 @@ void dropshadowfilter_class_init(as_object& where, const 
ObjectURI& uri);
 
 } // end of gnash namespace
 
-// __GNASH_ASOBJ_DROPSHADOWFILTER_H__
 #endif
 
diff --git a/libcore/asobj/flash/filters/GlowFilter_as.cpp 
b/libcore/asobj/flash/filters/GlowFilter_as.cpp
index 7e6fac8..19e3990 100644
--- a/libcore/asobj/flash/filters/GlowFilter_as.cpp
+++ b/libcore/asobj/flash/filters/GlowFilter_as.cpp
@@ -15,13 +15,14 @@
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
+#include "GlowFilter_as.h"
 
 #include "as_object.h"
-#include "GlowFilter.h"
 #include "VM.h"
 #include "Global_as.h"
 #include "builtin_function.h"
 #include "BitmapFilter_as.h"
+#include "Filters.h"
 
 namespace gnash {
 
diff --git a/libcore/asobj/flash/filters/GlowFilter_as.h 
b/libcore/asobj/flash/filters/GlowFilter_as.h
index 52ffb4b..f02fae7 100644
--- a/libcore/asobj/flash/filters/GlowFilter_as.h
+++ b/libcore/asobj/flash/filters/GlowFilter_as.h
@@ -16,8 +16,8 @@
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 //
 
-#ifndef __GNASH_ASOBJ_GLOWFILTER_H__
-#define __GNASH_ASOBJ_GLOWFILTER_H__
+#ifndef GNASH_ASOBJ_GLOWFILTER_H
+#define GNASH_ASOBJ_GLOWFILTER_H
 
 namespace gnash {
 
@@ -29,6 +29,5 @@ void glowfilter_class_init(as_object& where, const ObjectURI& 
uri);
 
 } // end of gnash namespace
 
-// __GNASH_ASOBJ_GLOWFILTER_H__
 #endif
 
diff --git a/libcore/asobj/flash/filters/GradientBevelFilter_as.cpp 
b/libcore/asobj/flash/filters/GradientBevelFilter_as.cpp
index 214c760..d49449d 100644
--- a/libcore/asobj/flash/filters/GradientBevelFilter_as.cpp
+++ b/libcore/asobj/flash/filters/GradientBevelFilter_as.cpp
@@ -15,13 +15,14 @@
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
+#include "GradientBevelFilter_as.h"
 
 #include "as_object.h"
-#include "GradientBevelFilter.h"
 #include "VM.h"
 #include "builtin_function.h"
 #include "Global_as.h"
 #include "BitmapFilter_as.h"
+#include "Filters.h"
 
 namespace gnash {
 
diff --git a/libcore/asobj/flash/filters/GradientBevelFilter_as.h 
b/libcore/asobj/flash/filters/GradientBevelFilter_as.h
index 90abe0e..88fddaa 100644
--- a/libcore/asobj/flash/filters/GradientBevelFilter_as.h
+++ b/libcore/asobj/flash/filters/GradientBevelFilter_as.h
@@ -16,8 +16,8 @@
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 //
 
-#ifndef __GNASH_ASOBJ_GRADIENTBEVELFILTER_H__
-#define __GNASH_ASOBJ_GRADIENTBEVELFILTER_H__
+#ifndef GNASH_ASOBJ_GRADIENTBEVELFILTER_H
+#define GNASH_ASOBJ_GRADIENTBEVELFILTER_H
 
 namespace gnash {
 
@@ -29,6 +29,5 @@ void gradientbevelfilter_class_init(as_object& where, const 
ObjectURI& uri);
 
 } // end of gnash namespace
 
-// __GNASH_ASOBJ_GRADIENTBEVELFILTER_H__
 #endif
 
diff --git a/libcore/asobj/flash/filters/GradientGlowFilter_as.cpp 
b/libcore/asobj/flash/filters/GradientGlowFilter_as.cpp
index 1797244..380f97d 100644
--- a/libcore/asobj/flash/filters/GradientGlowFilter_as.cpp
+++ b/libcore/asobj/flash/filters/GradientGlowFilter_as.cpp
@@ -15,12 +15,13 @@
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
+#include "GradientGlowFilter_as.h"
 
+#include "Filters.h"
+#include "BitmapFilter_as.h"
 #include "as_object.h"
-#include "GradientGlowFilter.h"
 #include "VM.h"
 #include "Global_as.h"
-#include "BitmapFilter_as.h"
 #include "builtin_function.h"
 
 namespace gnash {
diff --git a/libcore/asobj/flash/filters/GradientGlowFilter_as.h 
b/libcore/asobj/flash/filters/GradientGlowFilter_as.h
index ccbd48e..b289225 100644
--- a/libcore/asobj/flash/filters/GradientGlowFilter_as.h
+++ b/libcore/asobj/flash/filters/GradientGlowFilter_as.h
@@ -16,8 +16,8 @@
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 //
 
-#ifndef __GNASH_ASOBJ_GRADIENTGLOWFILTER_H__
-#define __GNASH_ASOBJ_GRADIENTGLOWFILTER_H__
+#ifndef GNASH_ASOBJ_GRADIENTGLOWFILTER_H
+#define GNASH_ASOBJ_GRADIENTGLOWFILTER_H
 
 namespace gnash {
 
@@ -29,6 +29,5 @@ void gradientglowfilter_class_init(as_object& where, const 
ObjectURI& uri);
 
 } // end of gnash namespace
 
-// __GNASH_ASOBJ_GRADIENTGLOWFILTER_H__
 #endif
 
diff --git a/libcore/asobj/flash/filters/filters.am 
b/libcore/asobj/flash/filters/filters.am
index e384ea0..b6c0dc5 100644
--- a/libcore/asobj/flash/filters/filters.am
+++ b/libcore/asobj/flash/filters/filters.am
@@ -17,73 +17,32 @@
 
 FILTERSdir = $(includedir)/gnash
 
-FILTERS_SOURCES = asobj/flash/filters/filters_pkg.cpp
-FILTERS_HEADERS = asobj/flash/filters/filters_pkg.h
-
-if BUILD_BEVELFILTER_AS3
-FILTERS_SOURCES += asobj/flash/filters/BevelFilter_as.cpp
-FILTERS_HEADERS += asobj/flash/filters/BevelFilter_as.h
-endif
-
-if BUILD_BITMAPFILTERQUALITY_AS3
-FILTERS_SOURCES += asobj/flash/filters/BitmapFilterQuality_as.cpp
-FILTERS_HEADERS += asobj/flash/filters/BitmapFilterQuality_as.h
-endif
-
-if BUILD_BITMAPFILTERTYPE_AS3
-FILTERS_SOURCES += asobj/flash/filters/BitmapFilterType_as.cpp
-FILTERS_HEADERS += asobj/flash/filters/BitmapFilterType_as.h
-endif
-
-if BUILD_BITMAPFILTER_AS3
-FILTERS_SOURCES += asobj/flash/filters/BitmapFilter_as.cpp
-FILTERS_HEADERS += asobj/flash/filters/BitmapFilter_as.h
-endif
-
-if BUILD_BLURFILTER_AS3
-FILTERS_SOURCES += asobj/flash/filters/BlurFilter_as.cpp
-FILTERS_HEADERS += asobj/flash/filters/BlurFilter_as.h
-endif
-
-if BUILD_COLORMATRIXFILTER_AS3
-FILTERS_SOURCES += asobj/flash/filters/ColorMatrixFilter_as.cpp
-FILTERS_HEADERS += asobj/flash/filters/ColorMatrixFilter_as.h
-endif
-
-if BUILD_CONVOLUTIONFILTER_AS3
-FILTERS_SOURCES += asobj/flash/filters/ConvolutionFilter_as.cpp
-FILTERS_HEADERS += asobj/flash/filters/ConvolutionFilter_as.h
-endif
-
-if BUILD_DISPLACEMENTMAPFILTERMODE_AS3
-FILTERS_SOURCES += asobj/flash/filters/DisplacementMapFilterMode_as.cpp
-FILTERS_HEADERS += asobj/flash/filters/DisplacementMapFilterMode_as.h
-endif
-
-if BUILD_DISPLACEMENTMAPFILTER_AS3
-FILTERS_SOURCES += asobj/flash/filters/DisplacementMapFilter_as.cpp
-FILTERS_HEADERS += asobj/flash/filters/DisplacementMapFilter_as.h
-endif
-
-if BUILD_DROPSHADOWFILTER_AS3
-FILTERS_SOURCES += asobj/flash/filters/DropShadowFilter_as.cpp
-FILTERS_HEADERS += asobj/flash/filters/DropShadowFilter_as.h
-endif
-
-if BUILD_GLOWFILTER_AS3
-FILTERS_SOURCES += asobj/flash/filters/GlowFilter_as.cpp
-FILTERS_HEADERS += asobj/flash/filters/GlowFilter_as.h
-endif
-
-if BUILD_GRADIENTBEVELFILTER_AS3
-FILTERS_SOURCES += asobj/flash/filters/GradientBevelFilter_as.cpp
-FILTERS_HEADERS += asobj/flash/filters/GradientBevelFilter_as.h
-endif
-
-if BUILD_GRADIENTGLOWFILTER_AS3
-FILTERS_SOURCES += asobj/flash/filters/GradientGlowFilter_as.cpp
-FILTERS_HEADERS += asobj/flash/filters/GradientGlowFilter_as.h
-endif
+FILTERS_SOURCES = asobj/flash/filters/filters_pkg.cpp \
+       asobj/flash/filters/BevelFilter_as.cpp \
+       asobj/flash/filters/BitmapFilter_as.cpp \
+       asobj/flash/filters/BlurFilter_as.cpp \
+       asobj/flash/filters/ColorMatrixFilter_as.cpp \
+       asobj/flash/filters/ConvolutionFilter_as.cpp \
+       asobj/flash/filters/DropShadowFilter_as.cpp \
+       asobj/flash/filters/GlowFilter_as.cpp \
+       asobj/flash/filters/GradientBevelFilter_as.cpp \
+       asobj/flash/filters/GradientGlowFilter_as.cpp \
+       asobj/flash/filters/DisplacementMapFilter_as.cpp \
+    $(NULL)
+    
+
+FILTERS_HEADERS = asobj/flash/filters/filters_pkg.h \
+       asobj/flash/filters/BevelFilter_as.h \
+       asobj/flash/filters/BitmapFilter_as.h \
+       asobj/flash/filters/BlurFilter_as.h \
+       asobj/flash/filters/ColorMatrixFilter_as.h \
+       asobj/flash/filters/ConvolutionFilter_as.h \
+       asobj/flash/filters/DropShadowFilter_as.h \
+       asobj/flash/filters/GlowFilter_as.h \
+       asobj/flash/filters/GradientBevelFilter_as.h \
+       asobj/flash/filters/GradientGlowFilter_as.h \
+       asobj/flash/filters/DisplacementMapFilter_as.h \
+    $(NULL)
 
 libgnashasobjs_la_SOURCES += $(FILTERS_SOURCES)
 noinst_HEADERS +=  $(FILTERS_HEADERS)
diff --git a/libcore/parser/filter_factory.cpp 
b/libcore/parser/filter_factory.cpp
index f280fc8..3624e10 100644
--- a/libcore/parser/filter_factory.cpp
+++ b/libcore/parser/filter_factory.cpp
@@ -17,18 +17,10 @@
 
 
 #include "filter_factory.h"
-#include "BitmapFilter.h"
-#include "BlurFilter.h"
-#include "DropShadowFilter.h"
-#include "GlowFilter.h"
-#include "BevelFilter.h"
-#include "GradientGlowFilter.h"
-#include "ConvolutionFilter.h"
-#include "ColorMatrixFilter.h"
-#include "GradientBevelFilter.h"
 
 #include "log.h"
 #include "SWFStream.h"
+#include "Filters.h"
 
 namespace gnash {
 
@@ -102,7 +94,7 @@ filter_factory::read(SWFStream& in, bool read_multiple, 
Filters* store)
         }
 
         // Protect against exceptions and such by storing before we read.
-        Filter p(the_filter);
+        boost::shared_ptr<BitmapFilter> p(the_filter);
         if (!p->read(in))
         {
             IF_VERBOSE_MALFORMED_SWF(
diff --git a/libcore/parser/filter_factory.h b/libcore/parser/filter_factory.h
index bc67bfc..1f37056 100644
--- a/libcore/parser/filter_factory.h
+++ b/libcore/parser/filter_factory.h
@@ -19,13 +19,16 @@
 #define GNASH_FILTER_FACTORY_H
 
 #include <vector>
-#include "BitmapFilter.h"
+#include <boost/shared_ptr.hpp>
 
 namespace gnash {
+    class SWFStream;
+    class BitmapFilter;
+}
 
-class SWFStream;
+namespace gnash {
 
-typedef std::vector<Filter> Filters;
+typedef std::vector<boost::shared_ptr<BitmapFilter> > Filters;
 
 class filter_factory
 {
diff --git a/libcore/swf/PlaceObject2Tag.cpp b/libcore/swf/PlaceObject2Tag.cpp
index 88b4ba0..311b8d5 100644
--- a/libcore/swf/PlaceObject2Tag.cpp
+++ b/libcore/swf/PlaceObject2Tag.cpp
@@ -386,8 +386,7 @@ PlaceObject2Tag::readPlaceObject3(SWFStream& in)
         m_clip_depth = DisplayObject::noClipDepthValue;
     }
 
-    if ( hasFilters() )
-    {
+    if (hasFilters()) {
         Filters v; // TODO: Attach the filters to the display object.
         filter_factory::read(in, true, &v);
            // at time of writing no renderer supports bitmap filters

http://git.savannah.gnu.org/cgit//commit/?id=69a9449030dc1707f78629c59e718a3876b739eb


commit 69a9449030dc1707f78629c59e718a3876b739eb
Author: Benjamin Wolsey <address@hidden>
Date:   Wed Oct 20 09:26:07 2010 +0200

    Split long line.

diff --git a/libcore/vm/ASHandlers.cpp b/libcore/vm/ASHandlers.cpp
index 6c5423a..6b19df6 100644
--- a/libcore/vm/ASHandlers.cpp
+++ b/libcore/vm/ASHandlers.cpp
@@ -1664,7 +1664,8 @@ ActionMbChr(ActionExec& thread)
     }
 
     // Cut to uint16, as characters above 65535 'wrap around'
-    const boost::uint16_t i = static_cast<boost::uint16_t> (toInt(env.top(0), 
getVM(env)));
+    const boost::uint16_t i = 
+        static_cast<boost::uint16_t>(toInt(env.top(0), getVM(env)));
     
     std::string out = utf8::encodeUnicodeCharacter(i);
     

http://git.savannah.gnu.org/cgit//commit/?id=177595fd9cfa15572abdbefdf5e7618889292a44


commit 177595fd9cfa15572abdbefdf5e7618889292a44
Author: Benjamin Wolsey <address@hidden>
Date:   Wed Oct 20 09:21:59 2010 +0200

    Coding style, const correctness; no change in functionality.

diff --git a/libcore/vm/ASHandlers.cpp b/libcore/vm/ASHandlers.cpp
index 9bd7004..6c5423a 100644
--- a/libcore/vm/ASHandlers.cpp
+++ b/libcore/vm/ASHandlers.cpp
@@ -28,7 +28,7 @@
 #include "SWF.h"
 #include "rc.h"
 #include "ASHandlers.h"
-#include "movie_definition.h"
+
 #include "NativeFunction.h"
 #include "Function.h"
 #include "as_function.h"
@@ -43,7 +43,6 @@
 #include "drag_state.h"
 #include "VM.h" // for getting the root
 #include "movie_root.h" // for set_drag_state (ActionStartDragMovie)
-#include "debugger.h"
 #include "sound_handler.h"
 #include "namedStrings.h"
 #include "utf8.h"
@@ -72,12 +71,6 @@
 # define GNASH_PARANOIA_LEVEL 1
 #endif
 
-namespace {
-#ifdef USE_DEBUGGER
-static gnash::Debugger& debugger = gnash::Debugger::getDefaultInstance();
-#endif
-}
-
 namespace gnash {
 
 namespace {
@@ -447,7 +440,7 @@ SWFHandlers::~SWFHandlers()
 const SWFHandlers&
 SWFHandlers::instance()
 {
-    static SWFHandlers instance;
+    static const SWFHandlers instance;
     return instance;
 }
 
@@ -460,10 +453,6 @@ SWFHandlers::execute(ActionType type, ActionExec& thread) 
const
     catch (ActionParserException& e) {
         log_swferror(_("Malformed action code: %s"), e.what());
     }
-    catch (std::bad_cast&) {
-       log_error(_("bad_cast caught"));
-       std::abort();
-    }
 }
 
 } // namespace SWF
@@ -474,11 +463,9 @@ namespace {
 void
 ActionEnd(ActionExec& thread)
 {
-
 #if GNASH_PARANOIA_LEVEL > 1
     assert(thread.atActionTag(SWF::ACTION_END));
 #endif
-
     log_error (_("%s: CHECKME: was broken"), __PRETTY_FUNCTION__);
     thread.skipRemainingBuffer();
 }
@@ -487,7 +474,6 @@ ActionEnd(ActionExec& thread)
 void
 ActionNextFrame(ActionExec& thread)
 {
-
     as_environment& env = thread.env;
 
 #if GNASH_PARANOIA_LEVEL > 1
@@ -496,14 +482,13 @@ ActionNextFrame(ActionExec& thread)
 
     DisplayObject* tgtch = env.get_target();
     MovieClip* tgt = tgtch ? tgtch->to_movie() : 0;
-    if ( tgt ) tgt->goto_frame(tgt->get_current_frame() + 1);
+    if (tgt) tgt->goto_frame(tgt->get_current_frame() + 1);
     else log_debug(_("ActionNextFrame: as_environment target is null or not a 
sprite"));
 }
 
 void
 ActionPrevFrame(ActionExec& thread)
 {
-
     as_environment& env = thread.env;
 
 #if GNASH_PARANOIA_LEVEL > 1
@@ -512,14 +497,13 @@ ActionPrevFrame(ActionExec& thread)
 
     DisplayObject* tgtch = env.get_target();
     MovieClip* tgt = tgtch ? tgtch->to_movie() : 0;
-    if ( tgt ) tgt->goto_frame(tgt->get_current_frame() - 1);
+    if (tgt) tgt->goto_frame(tgt->get_current_frame() - 1);
     else log_debug(_("ActionPrevFrame: as_environment target is null or not a 
sprite"));
 }
 
 void
 ActionPlay(ActionExec& thread)
 {
-
     as_environment& env = thread.env;
 
 #if GNASH_PARANOIA_LEVEL > 1
@@ -528,14 +512,13 @@ ActionPlay(ActionExec& thread)
 
     DisplayObject* tgtch = env.get_target();
     MovieClip* tgt = tgtch ? tgtch->to_movie() : 0;
-    if ( tgt ) tgt->setPlayState(MovieClip::PLAYSTATE_PLAY);
+    if (tgt) tgt->setPlayState(MovieClip::PLAYSTATE_PLAY);
     else log_debug(_("ActionPlay: as_environment target is null or not a 
sprite"));
 }
 
 void
 ActionStop(ActionExec& thread)
 {
-
     as_environment& env = thread.env;
 
 #if GNASH_PARANOIA_LEVEL > 1
@@ -544,37 +527,26 @@ ActionStop(ActionExec& thread)
 
     DisplayObject* tgtch = env.get_target();
     MovieClip* tgt = tgtch ? tgtch->to_movie() : 0;
-    if ( tgt ) tgt->setPlayState(MovieClip::PLAYSTATE_STOP);
+    if (tgt) tgt->setPlayState(MovieClip::PLAYSTATE_STOP);
     else log_debug(_("ActionStop: as_environment target is null or not a 
sprite"));
 }
 
 void
-ActionToggleQuality(ActionExec&
-#if GNASH_PARANOIA_LEVEL > 1
-    thread
-#endif
-)
+ActionToggleQuality(ActionExec&)
 {
-
-#if GNASH_PARANOIA_LEVEL > 1
-    assert(thread.atActionTag(SWF::ACTION_TOGGLEQUALITY));
-#endif
-
-    LOG_ONCE( log_unimpl (__PRETTY_FUNCTION__) );
+    LOG_ONCE(log_unimpl("ActionToggleQuality"));
 }
 
 void
 ActionStopSounds(ActionExec& thread)
 {
-
 #if GNASH_PARANOIA_LEVEL > 1
     assert(thread.atActionTag(SWF::ACTION_STOPSOUNDS));
 #endif
 
     VM& vm = getVM(thread.env);
     sound::sound_handler* s = vm.getRoot().runResources().soundHandler();
-    if (s)
-    {
+    if (s) {
         s->stop_all_sounds();
     }
 }
@@ -582,7 +554,6 @@ ActionStopSounds(ActionExec& thread)
 void
 ActionGotoFrame(ActionExec& thread)
 {
-
     as_environment& env = thread.env;
     const action_buffer& code = thread.code;
 
@@ -606,7 +577,6 @@ ActionGotoFrame(ActionExec& thread)
 void
 ActionGetUrl(ActionExec& thread)
 {
-
     as_environment& env = thread.env;
     const action_buffer& code = thread.code;
 
@@ -642,7 +612,6 @@ ActionGetUrl(ActionExec& thread)
 void
 ActionWaitForFrame(ActionExec& thread)
 {
-
     as_environment& env = thread.env;
     const action_buffer& code = thread.code;
 
@@ -651,12 +620,11 @@ ActionWaitForFrame(ActionExec& thread)
 #endif
 
     // SWF integrity check
-    size_t tag_len = code.read_int16(thread.getCurrentPC()+1);
-    if ( tag_len != 3 )
-    {
+    const size_t tag_len = code.read_int16(thread.getCurrentPC() + 1);
+    if (tag_len != 3) {
         IF_VERBOSE_MALFORMED_SWF (
             log_swferror(_("ActionWaitForFrame (0x%X) tag length == %d "
-                           "(expected 3)"), SWF::ACTION_WAITFORFRAME, tag_len);
+                   "(expected 3)"), SWF::ACTION_WAITFORFRAME, tag_len);
         );
     }
 
@@ -668,16 +636,14 @@ ActionWaitForFrame(ActionExec& thread)
 
     DisplayObject* target = env.get_target();
     MovieClip* target_sprite = target ? target->to_movie() : 0;
-    if ( ! target_sprite )
-    {
+    if (!target_sprite) {
         log_error(_("%s: environment target is null or not a MovieClip"),
                 __FUNCTION__);
         return;
     }
 
-    unsigned int totframes = target_sprite->get_frame_count();
-    if ( framenum > totframes )
-    {
+    const size_t totframes = target_sprite->get_frame_count();
+    if (framenum > totframes) {
         IF_VERBOSE_ASCODING_ERRORS(
         log_aserror(_("ActionWaitForFrame(%d): "
                        "target (%s) has only %d frames"),
@@ -687,8 +653,7 @@ ActionWaitForFrame(ActionExec& thread)
     }
 
     // Actually *wait* for target frame, and never skip any action
-
-    size_t lastloaded = target_sprite->get_loaded_frames();
+    const size_t lastloaded = target_sprite->get_loaded_frames();
     if (lastloaded < framenum) {
         // better delegate this to ActionExec
         thread.skip_actions(skip);
@@ -812,7 +777,7 @@ ActionEqual(ActionExec& thread)
     env.top(1).set_bool(op2 == op1);
 
     // Flash4 used 1 and 0 as return from this tag
-    if ( env.get_version() < 5 ) convertToNumber(env.top(1), getVM(env));
+    if (env.get_version() < 5) convertToNumber(env.top(1), getVM(env));
 
     env.drop(1);
 }
@@ -890,13 +855,11 @@ ActionStringLength(ActionExec& thread)
     //       SWF version. Just not automated yet.
     //
     const int version = thread.code.getDefinitionVersion();
-    if ( version > 5 )
-    {
+    if (version > 5) {
         // when SWF version is > 5 we compute the multi-byte length
         ActionMbLength(thread);
     }
-    else
-    {
+    else {
         env.top(0).set_double(env.top(0).to_string(version).size());
     }
 }
@@ -907,7 +870,6 @@ ActionSubString(ActionExec& thread)
     // substring("string",  base,  size) 
     // SWF4 function, deprecated in favour of String.substring.
     // 1-based (String object methods are 0-based).
-
     as_environment& env = thread.env;
     
     const as_value& strval = env.top(2);
@@ -947,7 +909,7 @@ ActionSubString(ActionExec& thread)
 
     // If start is longer than the string length, return empty
     // string
-    else if (static_cast<unsigned int>(start) > wstr.length() ) {
+    else if (static_cast<unsigned int>(start) > wstr.length()) {
         IF_VERBOSE_ASCODING_ERRORS (
             log_aserror(_("Start goes beyond input string in ActionSubString, "
             "returning the empty string."));
@@ -999,34 +961,26 @@ ActionGetVariable(ActionExec& thread)
     as_environment& env = thread.env;
 
     as_value& top_value = env.top(0);
-    std::string var_string = top_value.to_string();
-    if ( var_string.empty() )
-    {
+    const std::string& var_string = top_value.to_string();
+    if (var_string.empty()) {
         top_value.set_undefined();
         return;
     }
 
     top_value = thread.getVariable(var_string);
-    if ( env.get_version() < 5 && top_value.is_sprite() )
-    {
+    if (env.get_version() < 5 && top_value.is_sprite()) {
         // See http://www.ferryhalim.com/orisinal/g2/penguin.htm
         IF_VERBOSE_ASCODING_ERRORS(
-        log_aserror(_("Can't assign a sprite/DisplayObject to a variable in 
SWF%d. "
-                    "We'll return undefined instead of %s."),
-                    env.get_version(), top_value);
+            log_aserror(_("Can't assign a sprite/DisplayObject to a "
+                "variable in SWF%d. We'll return undefined instead of %s."),
+                env.get_version(), top_value);
         );
         top_value.set_undefined();
     }
 
-    IF_VERBOSE_ACTION
-    (
-        log_action(_("-- get var: %s=%s"),
-                var_string,
-                top_value);
+    IF_VERBOSE_ACTION(
+        log_action(_("-- get var: %s=%s"), var_string, top_value);
     );
-#ifdef USE_DEBUGGER
-    debugger.matchWatchPoint(var_string, Debugger::READS);
-#endif
 }
 
 void
@@ -1035,27 +989,20 @@ ActionSetVariable(ActionExec& thread)
     as_environment& env = thread.env;
 
     const std::string& name = env.top(1).to_string();
-    if ( name.empty() )
-    {
+    if (name.empty()) {
         IF_VERBOSE_ASCODING_ERRORS (
             // Invalid object, can't set.
             log_aserror(_("ActionSetVariable: %s=%s: variable name "
                     "evaluates to invalid (empty) string"),
-                env.top(1),
-                env.top(0));
+                    env.top(1), env.top(0));
         );
     }
     thread.setVariable(name, env.top(0));
 
-    IF_VERBOSE_ACTION (
+    IF_VERBOSE_ACTION(
         log_action(_("-- set var: %s = %s"), name, env.top(0));
     );
 
-    // TODO: move this to ActionExec::setVariable !
-#ifdef USE_DEBUGGER
-    debugger.matchWatchPoint(name, Debugger::WRITES);
-#endif
-
     env.drop(2);
 }
 
@@ -1250,7 +1197,6 @@ ActionTrace(ActionExec& thread)
 void
 ActionStartDragMovie(ActionExec& thread)
 {
-
     as_environment& env = thread.env;
 
 #if GNASH_PARANOIA_LEVEL > 1
@@ -1312,7 +1258,6 @@ ActionStartDragMovie(ActionExec& thread)
 void
 ActionStopDragMovie(ActionExec& thread)
 {
-    
     as_environment& env = thread.env;
     DisplayObject* tgtch = env.get_target();
     MovieClip *root_movie = tgtch ? tgtch->get_root() : 0;
@@ -1323,7 +1268,6 @@ ActionStopDragMovie(ActionExec& thread)
 void
 ActionStringCompare(ActionExec& thread)
 {
-    
     as_environment& env = thread.env;
     
     const int ver = env.get_version();
@@ -1336,7 +1280,6 @@ ActionStringCompare(ActionExec& thread)
 void
 ActionThrow(ActionExec& thread)
 {
-    
     as_environment& env = thread.env;
 
     // Throw the value on the top of the stack.
@@ -1349,7 +1292,6 @@ ActionThrow(ActionExec& thread)
 void
 ActionCastOp(ActionExec& thread)
 {
-
     as_environment& env = thread.env;
 
     // Get the "instance"
@@ -1359,8 +1301,7 @@ ActionCastOp(ActionExec& thread)
     as_object* super = safeToObject(getVM(thread.env), env.top(1));
 
     // Invalid args!
-    if (!super || ! instance)
-    {
+    if (!super || !instance) {
         IF_VERBOSE_ASCODING_ERRORS (
         log_aserror(_("-- %s cast_to %s (invalid args?)"),
             env.top(1),
@@ -1368,25 +1309,18 @@ ActionCastOp(ActionExec& thread)
         );
 
         env.drop(1);
-        env.top(0).set_null(); // null, not undefined 
+        env.top(0).set_null(); 
         return;
     }
 
     env.drop(1);
-    if (instance->instanceOf(super))
-    {
+    if (instance->instanceOf(super)) {
         env.top(0) = as_value(instance);
     }
-    else
-    {
-        env.top(0).set_null(); // null, not undefined.
+    else {
+        env.top(0).set_null(); 
     }
 
-    static bool warned=false;
-    if ( ! warned ) {
-        log_debug(_("ActionCastOp TESTING"));
-        warned=true;
-    }
 }
 
 
@@ -1400,7 +1334,6 @@ ActionCastOp(ActionExec& thread)
 void
 ActionImplementsOp(ActionExec& thread)
 {
-    
     as_environment& env = thread.env;
 
     as_value objval = env.pop();
@@ -1479,7 +1412,6 @@ ActionImplementsOp(ActionExec& thread)
 void
 ActionFscommand2(ActionExec& thread)
 {
-
 #if GNASH_PARANOIA_LEVEL > 1
     assert(thread.atActionTag(SWF::ACTION_FSCOMMAND2)); // 0x0E
 #endif
@@ -1513,13 +1445,12 @@ ActionFscommand2(ActionExec& thread)
 void
 ActionRandom(ActionExec& thread)
 {
+    as_environment& env = thread.env;
 
     // Action random(n) should return an integer from 0 up to (not
     // including) n.
     // It was introduced in SWF4 and deprecated in favour of
     // Math.random() in SWF5.
-    
-    as_environment& env = thread.env;
 
     int max = toInt(env.top(0), getVM(env));
 
@@ -1539,22 +1470,18 @@ ActionRandom(ActionExec& thread)
 void
 ActionMbLength(ActionExec& thread)
 {
-    
     as_environment& env = thread.env;
-
     
     std::string str = env.top(0).to_string();
 
-    if (str.empty())
-    {
+    if (str.empty()) {
         env.top(0).set_double(0);
     }
-    else
-    {
+    else {
         int length;
         std::vector<int> unused;
         unused.resize(str.length()+1);
-        (void) guessEncoding(str, length, unused);
+        guessEncoding(str, length, unused);
         env.top(0).set_double(length);
     }
 }
@@ -1562,18 +1489,14 @@ ActionMbLength(ActionExec& thread)
 void
 ActionOrd(ActionExec& thread)
 {
-    
     as_environment& env = thread.env;
     
-    
     // Should return 0 
-
     const int swfVersion = thread.code.getDefinitionVersion();
     
     std::string str = env.top(0).to_string();
     
-    if (str.empty())
-    {
+    if (str.empty()) {
         env.top(0).set_double(0);
         return;
     }
@@ -1588,7 +1511,6 @@ ActionOrd(ActionExec& thread)
 void
 ActionChr(ActionExec& thread)
 {
-
     as_environment& env = thread.env;
     
     // Only handles values up to 65535
@@ -1597,15 +1519,13 @@ ActionChr(ActionExec& thread)
 
     // If the argument to chr() is '0', we return
     // nothing, not NULL
-    if (c == 0)
-    {
+    if (c == 0) {
         env.top(0).set_string("");
         return;
     }
     
-    int swfVersion = thread.code.getDefinitionVersion();
-    if (swfVersion > 5)
-    {
+    const int swfVersion = thread.code.getDefinitionVersion();
+    if (swfVersion > 5) {
         env.top(0).set_string(utf8::encodeUnicodeCharacter(c));
         return;
     }
@@ -1630,7 +1550,6 @@ void
 ActionGetTimer(ActionExec& thread)
 {
     as_environment& env = thread.env;
-
     const VM& vm = getVM(env);
     env.push(vm.getTime());
 }
@@ -1650,7 +1569,7 @@ ActionMbSubString(ActionExec& thread)
     as_value& string_val = env.top(2);
 
     IF_VERBOSE_ACTION(
-    log_action(" ActionMbSubString(%s, %d, %d)", string_val, arg0, arg1);
+        log_action(" ActionMbSubString(%s, %d, %d)", string_val, arg0, arg1);
     );
 
     env.drop(2);
@@ -1662,8 +1581,7 @@ ActionMbSubString(ActionExec& thread)
 
     as_encoding_guess_t encoding = guessEncoding(str, length, offsets);
 
-    if (size < 0)
-    {
+    if (size < 0) {
         IF_VERBOSE_ASCODING_ERRORS(
             log_aserror(_("Negative size passed to ActionSubString, "
             "taking as whole length"));
@@ -1671,47 +1589,40 @@ ActionMbSubString(ActionExec& thread)
         size = length;
     }
 
-    if (start < 1)
-    {
+    if (start < 1) {
         IF_VERBOSE_ASCODING_ERRORS(
             log_aserror(_("Base is less then 1 in ActionMbSubString, "
             "setting to 1."));
         );
         start = 1;
     }
-
-    else if ( start > length)
-    {
-    IF_VERBOSE_ASCODING_ERRORS (
-        log_aserror(_("base goes beyond input string in ActionMbSubString, "
-        "returning the empty string."));
-    );
+    else if ( start > length) {
+        IF_VERBOSE_ASCODING_ERRORS (
+            log_aserror(_("base goes beyond input string in ActionMbSubString, 
"
+            "returning the empty string."));
+        );
         env.top(0).set_string("");
-    return;
+        return;
     }
 
     // Adjust the start for our own use.
     --start;
 
-    if (size + start > length)
-    {
+    if (size + start > length) {
         IF_VERBOSE_ASCODING_ERRORS(
-        log_aserror(_("base+size goes beyond input string in 
ActionMbSubString, "
-            "adjusting size based on length:%d and start:%d"), length, start);
+            log_aserror(_("base+size goes beyond input string in 
ActionMbSubString, "
+                "adjusting size based on length:%d and start:%d"), length, 
start);
         );
         size = length - start;
     }
 
-    if (encoding == ENCGUESS_OTHER)
-    {
+    if (encoding == ENCGUESS_OTHER) {
         env.top(0).set_string(str.substr(start, size));
     }
-    else
-    {
+    else {
         env.top(0).set_string(str.substr(offsets.at(start),
-                            offsets.at(start + size) - offsets.at(start)));
+                        offsets.at(start + size) - offsets.at(start)));
     }
-    return;
 }
 
 void
@@ -1720,11 +1631,9 @@ ActionMbOrd(ActionExec& thread)
     /// This only deals with UTF-8 characters.
     /// TODO: what else is possible?
     /// TODO: fix for SWF5
-
     as_environment& env = thread.env;
 
-    if (env.get_version() == 5)
-    {
+    if (env.get_version() == 5) {
         log_unimpl("Not properly implemented for SWF5");
         // No need to return - it works a bit.
     }
@@ -1749,8 +1658,7 @@ ActionMbChr(ActionExec& thread)
     /// TODO: fix for SWF5
     as_environment& env = thread.env;
     
-    if (env.get_version() == 5)
-    {
+    if (env.get_version() == 5) {
         log_unimpl(_("Not properly implemented for SWF5"));
         // No need to return.
     }
@@ -1806,8 +1714,7 @@ ActionWaitForFrameExpression(ActionExec& thread)
     }
 
     size_t framenum;
-    if ( ! target_sprite->get_frame_number(framespec, framenum) )
-    {
+    if (!target_sprite->get_frame_number(framespec, framenum)) {
         IF_VERBOSE_ASCODING_ERRORS(
         log_aserror(_("Frame spec found on stack "
             "at ActionWaitForFrame doesn't evaluate "
@@ -1828,68 +1735,67 @@ ActionWaitForFrameExpression(ActionExec& thread)
 void
 ActionPushData(ActionExec& thread)
 {
-    
     as_environment& env = thread.env;
 
     enum {
-        pushString,    // 0
-        pushFloat,    // 1
-        pushNull,    // 2
-        pushUndefined,    // 3
-        pushRegister,    // 4
-        pushBool,    // 5
-        pushDouble,    // 6
-        pushInt32,    // 7
-        pushDict8,    // 8
-        pushDict16,    // 9
-        pushLast    // 10 - sentinel
+        pushString,  
+        pushFloat,
+        pushNull,
+        pushUndefined,
+        pushRegister,
+        pushBool,
+        pushDouble,
+        pushInt32,
+        pushDict8,
+        pushDict16
     };
     const char* pushType[] = {
-        "string",    // 0
-        "float",    // 1
-        "null",        // 2
-        "undefined",    // 3
-        "register",    // 4
-        "bool",        // 5
-        "double",    // 6
-        "int",    // 7
-        "dict8",    // 8
-        "dict16"    // 9
+        "string",
+        "float",
+        "null",
+        "undefined",
+        "register",
+        "bool",
+        "double",
+        "int",
+        "dict8",
+        "dict16"
     };
 
-
     const action_buffer& code = thread.code;
 
-    size_t pc = thread.getCurrentPC();
-    boost::uint16_t length = code.read_uint16(pc+1);
+    const size_t pc = thread.getCurrentPC();
+    const boost::uint16_t length = code.read_uint16(pc + 1);
 
     //---------------
     size_t i = pc;
     size_t count = 0;
     while (i - pc < length) {
-        int id=0; // for dict (constant pool) lookup
-                  // declared here because also used
-              // by verbose action output
-        boost::uint8_t type = code[3 + i];
-        i++;
+
+        const boost::uint8_t type = code[3 + i];
+        ++i;
+
+        IF_VERBOSE_ACTION(
+            log_action(_("\t%d) type=%s, value=%s"),
+                count, pushType[type], env.top(0));
+            ++count;
+        );
 
         switch (type)
         {
             default:
             {
                 IF_VERBOSE_MALFORMED_SWF(
-                    log_swferror(_("Unknown push type %d."
-                        " Execution will continue "
-                        "but it is likely to fail "
-                        "due to lost sync."), type);
+                    log_swferror(_("Unknown push type %d. Execution will "
+                        "continue but it is likely to fail due to lost "
+                        "sync."), +type);
                 );
                 continue;
             }
 
-            case  pushString: // 0
+            case pushString: // 0
             {
-                const char* cstr = code.read_string(i+3);
-                const std::string str(cstr);
+                const std::string str(code.read_string(i + 3));
                 i += str.size() + 1; 
                 env.push(str);
                 break;
@@ -1897,7 +1803,7 @@ ActionPushData(ActionExec& thread)
 
             case pushFloat: // 1
             {
-                float f = code.read_float_little(i+3);
+                const float f = code.read_float_little(i + 3);
                 i += 4;
                 env.push(f);
                 break;
@@ -1912,10 +1818,8 @@ ActionPushData(ActionExec& thread)
             }
 
             case pushUndefined: // 3
-            {
                 env.push(as_value());
                 break;
-            }
 
             case pushRegister: // 4
             {
@@ -1935,15 +1839,15 @@ ActionPushData(ActionExec& thread)
 
             case pushBool: // 5
             {
-                bool    bool_val = code[i+3] ? true : false;
-                i++;
+                const bool bool_val = code[i + 3];
+                ++i;
                 env.push(bool_val);
                 break;
             }
 
             case pushDouble: // 6
             {
-                double d = code.read_double_wacky(i+3);
+                const double d = code.read_double_wacky(i + 3);
                 i += 8;
                 env.push(d);
                 break;
@@ -1951,7 +1855,7 @@ ActionPushData(ActionExec& thread)
 
             case pushInt32: // 7
             {
-                boost::int32_t val = code.read_int32(i+3);
+                const boost::int32_t val = code.read_int32(i + 3);
                 i += 4;
                 env.push(val);
                 break;
@@ -1959,17 +1863,14 @@ ActionPushData(ActionExec& thread)
 
             case pushDict8: // 8
             {
-                id = code[3 + i];
-                i++;
-                if (static_cast<size_t>(id) < code.dictionary_size())
-                {
-                    env.push( code.dictionary_get(id) );
+                const boost::uint8_t id = code[3 + i];
+                ++i;
+                if (id < code.dictionary_size()) {
+                    env.push(code.dictionary_get(id));
                 }
-                else
-                {
+                else {
                     IF_VERBOSE_MALFORMED_SWF(
-                    log_swferror(_("dict_lookup %d "
-                    "is out of bounds"), id);
+                        log_swferror(_("dict entry %d is out of bounds"), +id);
                     );
                     env.push(as_value());
                 }
@@ -1978,17 +1879,14 @@ ActionPushData(ActionExec& thread)
 
             case pushDict16: // 9
             {
-                id = code.read_int16(i+3);
+                const boost::uint16_t id = code.read_int16(i + 3);
                 i += 2;
-                if ( static_cast<size_t>(id) < code.dictionary_size())
-                {
-                    env.push( code.dictionary_get(id) );
+                if (id < code.dictionary_size()) {
+                    env.push(code.dictionary_get(id));
                 }
-                else
-                {
+                else {
                     IF_VERBOSE_MALFORMED_SWF(
-                    log_swferror(_("dict_lookup %d "
-                    "is out of bounds"), id);
+                        log_swferror(_("dict entry %d is out of bounds"), id);
                     );
                     env.push(as_value());
                 }
@@ -1996,18 +1894,6 @@ ActionPushData(ActionExec& thread)
             }
         }
 
-        IF_VERBOSE_ACTION(
-            if (type == pushDict8 || type == pushDict16) {
-                log_action(_("\t%d) type=%s (%d), value=%s"),
-                    count, pushType[type], id, env.top(0));
-            }
-            else
-            {
-                log_action(_("\t%d) type=%s, value=%s"),
-                    count, pushType[type], env.top(0));
-            }
-            ++count;
-        );
     }
 }
 
@@ -2030,7 +1916,7 @@ ActionGetUrl2(ActionExec& thread)
     assert(thread.atActionTag(SWF::ACTION_GETURL2));
 #endif
 
-    boost::uint8_t method = code[thread.getCurrentPC() + 3];
+    const boost::uint8_t method = code[thread.getCurrentPC() + 3];
 
     as_value url_val = env.top(1);
     if (url_val.is_undefined()) {
@@ -2259,7 +2145,6 @@ ActionDelete(ActionExec& thread)
 void
 ActionDelete2(ActionExec& thread)
 {
-
     as_environment& env = thread.env;
 
 #if GNASH_PARANOIA_LEVEL > 1
@@ -2279,10 +2164,7 @@ ActionDelete2(ActionExec& thread)
     
     // Otherwise see if it's an object and delete it.
     as_value target = thread.getVariable(path);
-    if ( ! target.is_object() )
-    {
-        // Don't syntetize one !!
-
+    if (!target.is_object()) {
         IF_VERBOSE_ASCODING_ERRORS(
             log_aserror(_("delete2 called with a path that does not resolve "
                     "to an object"), env.top(1), env.top(0));
@@ -2299,15 +2181,14 @@ ActionDelete2(ActionExec& thread)
 void
 ActionVarEquals(ActionExec& thread)
 {
-    
     as_environment& env = thread.env;
 
     as_value& value = env.top(0);
     as_value& varname = env.top(1);
     thread.setLocalVariable(varname.to_string(), value);
 
-    IF_VERBOSE_ACTION (
-    log_action(_("-- set local var: %s = %s"), varname.to_string(), value);
+    IF_VERBOSE_ACTION(
+        log_action(_("-- set local var: %s = %s"), varname.to_string(), value);
     );
 
     env.drop(2);
@@ -2316,7 +2197,6 @@ ActionVarEquals(ActionExec& thread)
 void
 ActionCallFunction(ActionExec& thread)
 {
-
     as_environment& env = thread.env;
 
     // Let's consider it a as a string and lookup the function.
@@ -2365,11 +2245,6 @@ ActionCallFunction(ActionExec& thread)
         nargs = available_args;
     }
 
-#ifdef USE_DEBUGGER
-    debugger.callStackPush(function_name);
-    debugger.matchBreakPoint(function_name, true);
-#endif
-
     fn_call::Args args;
     for (size_t i = 0; i < nargs; ++i) {
         args += env.pop();
@@ -2390,7 +2265,6 @@ ActionCallFunction(ActionExec& thread)
 void
 ActionReturn(ActionExec& thread)
 {
-
     as_environment& env = thread.env;
 
     // Put top of stack in the provided return slot, if
@@ -2398,10 +2272,6 @@ ActionReturn(ActionExec& thread)
     thread.pushReturn(env.top(0));
     env.drop(1);
 
-#ifdef USE_DEBUGGER
-        debugger.callStackPop();
-#endif
-
     // Skip the rest of this buffer (return from this action_buffer).
     thread.skipRemainingBuffer();
 
@@ -2410,7 +2280,6 @@ ActionReturn(ActionExec& thread)
 void
 ActionModulo(ActionExec& thread)
 {
-    
     as_environment& env = thread.env;
 
     const double y = toNumber(env.pop(), getVM(env));
@@ -2425,7 +2294,6 @@ ActionModulo(ActionExec& thread)
 void
 ActionNew(ActionExec& thread)
 {
-    
     as_environment& env = thread.env;
 
     as_value val = env.pop();
@@ -2456,13 +2324,10 @@ ActionNew(ActionExec& thread)
     // some circumstances.
     try {
         as_object* newobj = construct_object(constructor, env, nargs);
-#ifdef USE_DEBUGGER
-        debugger.addSymbol(newobj, classname);
-#endif
         env.push(newobj);
         return;
     }
-    catch (GnashException& ) {
+    catch (const GnashException& ) {
         env.push(as_value());
         return;
     }
@@ -2472,7 +2337,6 @@ ActionNew(ActionExec& thread)
 void
 ActionVar(ActionExec& thread)
 {
-    
     as_environment& env = thread.env;
     
     const std::string& varname = env.top(0).to_string();
@@ -2484,8 +2348,8 @@ ActionVar(ActionExec& thread)
     }
     else {
        IF_VERBOSE_ASCODING_ERRORS(
-       log_aserror(_("The 'var whatever' syntax in timeline context is a "
-               "no-op."));
+           log_aserror(_("The 'var whatever' syntax in timeline context is a "
+                   "no-op."));
        );
     }
     env.drop(1);
@@ -2494,7 +2358,6 @@ ActionVar(ActionExec& thread)
 void
 ActionInitArray(ActionExec& thread)
 {
-    
     as_environment& env = thread.env;
 
     const int array_size = toInt(env.pop(), getVM(env));
@@ -2519,7 +2382,6 @@ ActionInitArray(ActionExec& thread)
 void
 ActionInitObject(ActionExec& thread)
 {
-
     as_environment& env = thread.env;
 
     //
@@ -2565,7 +2427,6 @@ ActionTypeOf(ActionExec& thread)
 void
 ActionTargetPath(ActionExec& thread)
 {
-
     as_environment& env = thread.env;
 
     DisplayObject* sp = env.top(0).toDisplayObject();
@@ -2596,7 +2457,6 @@ enumerateObject(as_environment& env, const as_object& obj)
 void
 ActionEnumerate(ActionExec& thread)
 {
-    
     as_environment& env = thread.env;
 
     // Get the object
@@ -2710,20 +2570,17 @@ ActionSwap(ActionExec& thread)
 void
 ActionGetMember(ActionExec& thread)
 {
-        
     as_environment& env = thread.env;
 
     as_value member_name = env.top(0);
     as_value target = env.top(1);
 
     as_object* obj = safeToObject(getVM(thread.env), target);
-    if (!obj)
-    {
+    if (!obj) {
         IF_VERBOSE_ASCODING_ERRORS(
-        log_aserror(_("getMember called against "
-            "a value that does not cast "
-            "to an as_object: %s"),
-            target));
+            log_aserror(_("getMember called against a value that does not "
+                    "cast to an as_object: %s"), target)
+        );
         env.top(1).set_undefined();
         env.drop(1);
         return;
@@ -2738,30 +2595,24 @@ ActionGetMember(ActionExec& thread)
     const string_table::key k = st.find(member_name.to_string());
 
     if (!obj->get_member(k, &env.top(1))) {
-
         IF_VERBOSE_ASCODING_ERRORS(
-        log_aserror("Reference to undefined member %s of object %s",
-            member_name,
-            target);
+            log_aserror("Reference to undefined member %s of object %s",
+                member_name, target);
         );
         env.top(1).set_undefined();
-        }
+    }
 
     IF_VERBOSE_ACTION (
         log_action(_("-- get_member %s.%s=%s"),
-           target,
-                   member_name,
-                   env.top(1));
+           target, member_name, env.top(1));
     );
 
     env.drop(1);
-
 }
 
 void
 ActionSetMember(ActionExec& thread)
 {
-    
     as_environment& env = thread.env;
 
     as_object* obj = safeToObject(getVM(thread.env), env.top(2));
@@ -2787,12 +2638,11 @@ ActionSetMember(ActionExec& thread)
                 member_value);
         );
     }
-    else
-    {
+    else {
         // Malformed SWF ? (don't think this is possible to do with
         // ActionScript syntax)
         // FIXME, should this be log_swferror?
-        IF_VERBOSE_ASCODING_ERRORS (
+        IF_VERBOSE_ASCODING_ERRORS(
             // Invalid object, can't set.
             log_aserror(_("-- set_member %s.%s=%s on invalid object!"),
                 env.top(2), member_name, member_value);
@@ -2898,8 +2748,7 @@ ActionCallMethod(ActionExec& thread)
     if (noMeth) {
         method_obj = obj;
     }
-    else
-    {
+    else {
 
         string_table& st = getStringTable(env);
         method_key = st.find(method_string);
@@ -2941,17 +2790,6 @@ ActionCallMethod(ActionExec& thread)
         if (thread.isFunction()) this_ptr = thread.getThisPointer();
     }
 
-#ifdef USE_DEBUGGER
-    if (! method_name.is_undefined()) {
-        debugger.callStackPush(method_name.to_string());
-        debugger.matchBreakPoint(method_name.to_string(), true);
-    }
-    else {
-        LOG_ONCE( log_unimpl(_("FIXME: debugger doesn't deal with "
-            "anonymous function calls")) );
-    }
-#endif
-
     fn_call::Args args;
     for (size_t i = 0; i < nargs; ++i) {
         args += env.pop();
@@ -2959,14 +2797,12 @@ ActionCallMethod(ActionExec& thread)
 
     as_object* super;
     as_function* func = method_obj->to_function();
-    if ( func && func->isBuiltin() )
-    {
+    if (func && func->isBuiltin()) {
         // Do not construct super if method is a builtin
         // TODO: check if this is correct!!
         super = 0;
     }
-    else
-    {
+    else {
         super = obj->get_super(method_key);
     }
 
@@ -2976,7 +2812,8 @@ ActionCallMethod(ActionExec& thread)
     as_value result;
     try {
         result = method_obj->call(call);
-    } catch (ActionTypeError& e) {
+    } 
+    catch (const ActionTypeError& e) {
         IF_VERBOSE_ASCODING_ERRORS(
             log_aserror("ActionCallMethod: %s", e.what());
         );
@@ -2992,19 +2829,18 @@ ActionCallMethod(ActionExec& thread)
 void
 ActionNewMethod(ActionExec& thread)
 {
-
     as_environment& env = thread.env;
 
 #if GNASH_PARANOIA_LEVEL > 1
     assert(thread.atActionTag(SWF::ACTION_NEWMETHOD));
 #endif
 
-    as_value method_name = env.pop();
-    as_value obj_val = env.pop();
+    const as_value method_name = env.pop();
+    const as_value obj_val = env.pop();
 
     // Get number of args, modifying it if not enough values are on the stack.
     unsigned nargs = toNumber(env.pop(), getVM(env));
-    unsigned available_args = env.stack_size(); // previous 3 entries popped
+    const size_t available_args = env.stack_size(); // previous 3 entries 
popped
     if (available_args < nargs) {
         IF_VERBOSE_MALFORMED_SWF(
         log_swferror(_("Attempt to call a constructor with %u arguments "
@@ -3027,7 +2863,7 @@ ActionNewMethod(ActionExec& thread)
         return;
     }
 
-    std::string method_string = method_name.to_string();
+    const std::string& method_string = method_name.to_string();
     as_value method_val;
     if (method_name.is_undefined() || method_string.empty()) {
         method_val = obj_val;
@@ -3067,7 +2903,7 @@ ActionNewMethod(ActionExec& thread)
         env.push(newobj);
         return;
     }
-    catch (GnashException& ) {
+    catch (const GnashException&) {
         env.push(as_value());
         return;
     }
@@ -3089,8 +2925,7 @@ ActionInstanceOf(ActionExec& thread)
     if (!super || ! instance) {
         IF_VERBOSE_ASCODING_ERRORS(
         log_aserror(_("-- %s instanceof %s (invalid args?)"),
-                env.top(1),
-                env.top(0));
+                env.top(1), env.top(0));
         );
 
         env.drop(1);
@@ -3125,7 +2960,6 @@ ActionEnum2(ActionExec& thread)
     }
 
     enumerateObject(env, *obj);
-
 }
 
 void
@@ -3167,7 +3001,6 @@ ActionBitwiseXor(ActionExec& thread)
 void
 ActionShiftLeft(ActionExec& thread)
 {
-
     as_environment& env = thread.env;
 
     /// A left shift of more than or equal to the size in
@@ -3187,7 +3020,6 @@ ActionShiftLeft(ActionExec& thread)
 void
 ActionShiftRight(ActionExec& thread)
 {
-
     as_environment& env = thread.env;
 
     boost::uint32_t amount = toInt(env.top(0), getVM(env));
@@ -3245,7 +3077,6 @@ ActionStringGreater(ActionExec& thread)
 void
 ActionExtends(ActionExec& thread)
 {
-
     as_environment& env = thread.env;
 
     as_object* super = toObject(env.top(0), getVM(thread.env));
@@ -3290,7 +3121,6 @@ ActionConstantPool(ActionExec& thread)
 void
 ActionDefineFunction2(ActionExec& thread)
 {
-
     as_environment& env = thread.env;
     const action_buffer& code = thread.code;
 
@@ -3401,7 +3231,6 @@ ActionDefineFunction2(ActionExec& thread)
 void
 ActionTry(ActionExec& thread)
 {
-
     const action_buffer& code = thread.code;
 
 #if GNASH_PARANOIA_LEVEL > 1
@@ -3456,7 +3285,6 @@ ActionTry(ActionExec& thread)
 void
 ActionWith(ActionExec& thread)
 {
-
     as_environment& env = thread.env;
     const action_buffer& code = thread.code;
     size_t pc = thread.getCurrentPC();
@@ -3506,8 +3334,7 @@ ActionWith(ActionExec& thread)
     // where does the 'with' block end?
     const size_t block_end = thread.getNextPC() + block_length;
 
-    if (!thread.pushWith(With(with_obj, block_end)))
-    {
+    if (!thread.pushWith(With(with_obj, block_end))) {
         // skip the full block
         thread.adjustNextPC(block_length);
     }
@@ -3582,24 +3409,19 @@ ActionDefineFunction(ActionExec& thread)
     // If we have a name, then save the function in this
     // environment under that name.
     as_value function_value(func);
-    if (!name.empty())
-    {
+    if (!name.empty()) {
         IF_VERBOSE_ACTION(
             log_action("DefineFunction: named function '%s' starts at "
                         "PC %d", name, func->getStartPC());
         );
-
         thread.setVariable(name, function_value);
     }
-
-    // Otherwise push the function literal on the stack
-    else
-    {
+    else {
+        // Otherwise push the function literal on the stack
         IF_VERBOSE_ACTION(
-        log_action("DefineFunction: anonymous function starts at "
-                    "PC %d", func->getStartPC());
+            log_action("DefineFunction: anonymous function starts at "
+                        "PC %d", func->getStartPC());
         );
-
         env.push(function_value);
     }
 }
@@ -3608,11 +3430,8 @@ void
 ActionSetRegister(ActionExec& thread)
 {
     as_environment& env = thread.env;
-
     const action_buffer& code = thread.code;
-
     const size_t reg = code[thread.getCurrentPC() + 3];
-
     // Save top of stack in specified register.
     getVM(env).setRegister(reg, env.top(0));
 }
@@ -3628,14 +3447,12 @@ ActionUnsupported(ActionExec& thread)
 as_object*
 safeToObject(VM& vm, const as_value& val)
 {
-
     try {
         return toObject(val, vm);
     }
     catch (const GnashException&) {
         return 0;
     }
-
 }
 
 // Utility: construct an object using given constructor.
@@ -3682,7 +3499,6 @@ void
 commonGetURL(as_environment& env, as_value target,
         const std::string& url, boost::uint8_t method)
 {
-
     if (url.empty()) {
         log_error(_("Bogus empty GetUrl url in SWF file, skipping"));
         return;
@@ -3700,8 +3516,9 @@ commonGetURL(as_environment& env, as_value target,
             " in SWF file (both GET and POST requested). Using GET"));
         sendVarsMethod = MovieClip::METHOD_GET;
     }
-    else sendVarsMethod =
-        static_cast<MovieClip::VariablesMethod>(method & 3);
+    else {
+        sendVarsMethod = static_cast<MovieClip::VariablesMethod>(method & 3);
+    }
 
     std::string target_string;
     if (!target.is_undefined() && !target.is_null()) {
@@ -3714,16 +3531,14 @@ commonGetURL(as_environment& env, as_value target,
     // If the url starts with "FSCommand:", then this is
     // a message for the host app.
     StringNoCaseEqual noCaseCompare;
-    if (noCaseCompare(url.substr(0, 10), "FSCommand:"))
-    {
+    if (noCaseCompare(url.substr(0, 10), "FSCommand:")) {
         m.handleFsCommand(url.substr(10), target_string);
         return;
     }
 
     // If the url starts with "print:", then this is
     // a print request.
-    if (noCaseCompare(url.substr(0, 6), "print:"))
-    {
+    if (noCaseCompare(url.substr(0, 6), "print:")) {
         log_unimpl("print: URL");
         return;
     }
@@ -3752,19 +3567,16 @@ commonGetURL(as_environment& env, as_value target,
     DisplayObject* target_ch = env.find_target(target.to_string());
     MovieClip* target_movie = target_ch ? target_ch->to_movie() : 0;
 
-    if (loadVariableFlag)
-    {
+    if (loadVariableFlag) {
         log_debug(_("getURL2 loadVariable"));
 
-        if (!target_ch)
-        {
+        if (!target_ch) {
             log_error(_("getURL: target %s not found"), target_string);
             // might want to invoke the external url opener here...
             return;
         }
 
-        if (!target_movie)
-        {
+        if (!target_movie) {
             log_error(_("getURL: target %s is not a sprite"), target_string);
             // might want to invoke the external url opener here...
             return;
@@ -3776,8 +3588,7 @@ commonGetURL(as_environment& env, as_value target,
     }
 
     std::string varsToSend;
-    if (sendVarsMethod != MovieClip::METHOD_NONE)
-    {
+    if (sendVarsMethod != MovieClip::METHOD_NONE) {
 
         // TESTED: variables sent are those in current target,
         //         no matter the target found on stack (which
@@ -3792,24 +3603,21 @@ commonGetURL(as_environment& env, as_value target,
     }
 
 
-    if ( loadTargetFlag )
-    {
+    if (loadTargetFlag) {
         log_debug(_("getURL2 target load"));
 
-        if (!target_ch)
-        {
+        if (!target_ch) {
+
             unsigned int levelno;
-            if (isLevelTarget(getSWFVersion(env), target_string, levelno))
-            {
+            if (isLevelTarget(getSWFVersion(env), target_string, levelno)) {
                 log_debug(_("Testing _level loading (level %u)"), levelno);
- 
                 m.loadMovie(url, target_string, varsToSend, sendVarsMethod);
                 return;
             }
 
             IF_VERBOSE_ASCODING_ERRORS(
-            log_aserror(_("Unknown loadMovie target: %s"),
-                target_string);
+                log_aserror(_("Unknown loadMovie target: %s"),
+                    target_string);
             );
 
             // TESTED: Even if the target is created right-after 
@@ -3821,29 +3629,26 @@ commonGetURL(as_environment& env, as_value target,
             return;
         }
 
-        if (!target_movie)
-        {
+        if (!target_movie) {
             log_error(_("get url: target %s is not a sprite"), target_string);
             return;
         }
 
-        std::string s = target_movie->getTarget(); // or getOrigTarget ?
-        if (s != target_movie->getOrigTarget())
-        {
+        const std::string s = target_movie->getTarget(); // or getOrigTarget ?
+        if (s != target_movie->getOrigTarget()) {
             log_debug(_("TESTME: target of a loadMovie changed its target "
                         "path"));
         }
         
         // TODO: try to trigger this !
-        assert(m.findCharacterByTarget(s) == target_movie );
+        assert(m.findCharacterByTarget(s) == target_movie);
 
         m.loadMovie(url, s, varsToSend, sendVarsMethod); 
         return;
     }
 
     unsigned int levelno;
-    if (isLevelTarget(getSWFVersion(env), target_string, levelno))
-    {
+    if (isLevelTarget(getSWFVersion(env), target_string, levelno)) {
         log_debug(_("Testing _level loading (level %u)"), levelno);
         m.loadMovie(url, target_string, varsToSend, sendVarsMethod);
         return;
@@ -3868,17 +3673,15 @@ commonSetTarget(ActionExec& thread, const std::string& 
target_name)
     // see swfdec's settarget-relative-*.swf
     env.reset_target();
 
-    DisplayObject *new_target;
-
     // if the string is blank, we reset the target to its original value
-    if ( target_name.empty() ) return;
+    if (target_name.empty()) return;
 
     // TODO: pass thread.getScopeStack()
-    new_target = env.find_target(target_name); 
+    DisplayObject* new_target = env.find_target(target_name); 
     if (!new_target) {
         IF_VERBOSE_ASCODING_ERRORS (
-        log_aserror(_("Couldn't find movie \"%s\" to set target to!"
-            " Setting target to NULL..."), target_name);
+            log_aserror(_("Couldn't find movie \"%s\" to set target to!"
+                " Setting target to NULL..."), target_name);
         );
     }
     
@@ -3897,8 +3700,7 @@ guessEncoding(const std::string &str, int &length, 
std::vector<int>& offsets)
     length = 0;
     
     // First, assume it's UTF8 and try to be wrong.
-    while (it != e && is_sought)
-    {
+    while (it != e && is_sought) {
         ++length;
 
         offsets.push_back(it - str.begin()); // current position
@@ -3906,8 +3708,7 @@ guessEncoding(const std::string &str, int &length, 
std::vector<int>& offsets)
         // Advances the iterator to point to the next 
         boost::uint32_t c = utf8::decodeNextUnicodeCharacter(it, e);
 
-        if (c == utf8::invalid)
-        {
+        if (c == utf8::invalid) {
             is_sought = false;
             break;
         }
@@ -3915,8 +3716,7 @@ guessEncoding(const std::string &str, int &length, 
std::vector<int>& offsets)
 
     offsets.push_back(it - str.begin()); // current position
 
-    if (it == e && is_sought)
-    {
+    if (it == e && is_sought) {
         // No characters left, so it's almost certainly UTF8.
         return ENCGUESS_UNICODE;
     }
@@ -3929,16 +3729,13 @@ guessEncoding(const std::string &str, int &length, 
std::vector<int>& offsets)
     bool was_odd = true;
     bool was_even = true;
     // Now, assume it's SHIFT_JIS and try to be wrong.
-    while (it != e && is_sought)
-    {
+    while (it != e && is_sought) {
         int c = static_cast<int> (*it);
 
-        if (width)
-        {
+        if (width) {
             --width;
             if ((c < 0x40) || ((c < 0x9F) && was_even) ||
-                ((c > 0x9E) && was_odd) || (c == 0x7F))
-            {
+                ((c > 0x9E) && was_odd) || (c == 0x7F)) {
                 is_sought = false;
             }
             continue;
@@ -3947,14 +3744,12 @@ guessEncoding(const std::string &str, int &length, 
std::vector<int>& offsets)
         ++length;
         offsets.push_back(index); // [length - 1] = index;
 
-        if ((c == 0x80) || (c == 0xA0) || (c >= 0xF0))
-        {
+        if ((c == 0x80) || (c == 0xA0) || (c >= 0xF0)) {
             is_sought = false;
             break;
         }
 
-        if (((c >= 0x81) && (c <= 0x9F)) || ((c >= 0xE0) && (c <= 0xEF)))
-        {
+        if (((c >= 0x81) && (c <= 0x9F)) || ((c >= 0xE0) && (c <= 0xEF))) {
             width = 1;
             was_odd = c & 0x01;
             was_even = !was_odd;
@@ -3965,8 +3760,7 @@ guessEncoding(const std::string &str, int &length, 
std::vector<int>& offsets)
     }
     offsets.push_back(index); // [length - 1] = index;
     
-    if (!width && is_sought)
-    {
+    if (!width && is_sought) {
         // No width left, so it's probably SHIFT_JIS.
         return ENCGUESS_JIS;
     }

-----------------------------------------------------------------------

Summary of changes:
 libcore/BevelFilter.h                              |   77 ---
 libcore/BitmapFilter.h                             |   43 --
 libcore/BlurFilter.h                               |   52 --
 libcore/ColorMatrixFilter.h                        |   50 --
 libcore/ConvolutionFilter.h                        |   82 ---
 libcore/DropShadowFilter.h                         |   67 ---
 libcore/Filters.h                                  |  359 ++++++++++++
 libcore/GlowFilter.h                               |   63 ---
 libcore/GradientBevelFilter.h                      |   78 ---
 libcore/GradientGlowFilter.h                       |   78 ---
 libcore/Makefile.am                                |   12 +-
 libcore/asobj/flash/filters/BevelFilter_as.cpp     |    3 +-
 libcore/asobj/flash/filters/BevelFilter_as.h       |    6 +-
 .../asobj/flash/filters/BitmapFilterQuality_as.cpp |   57 --
 .../asobj/flash/filters/BitmapFilterQuality_as.h   |   43 --
 .../asobj/flash/filters/BitmapFilterType_as.cpp    |   58 --
 libcore/asobj/flash/filters/BitmapFilterType_as.h  |   43 --
 libcore/asobj/flash/filters/BitmapFilter_as.cpp    |    3 +-
 libcore/asobj/flash/filters/BitmapFilter_as.h      |    8 +-
 libcore/asobj/flash/filters/BlurFilter_as.cpp      |    3 +-
 libcore/asobj/flash/filters/BlurFilter_as.h        |    1 -
 .../asobj/flash/filters/ColorMatrixFilter_as.cpp   |    3 +-
 libcore/asobj/flash/filters/ColorMatrixFilter_as.h |    5 +-
 .../asobj/flash/filters/ConvolutionFilter_as.cpp   |    5 +-
 libcore/asobj/flash/filters/ConvolutionFilter_as.h |    5 +-
 .../flash/filters/DisplacementMapFilterMode_as.cpp |   60 --
 .../flash/filters/DisplacementMapFilterMode_as.h   |   43 --
 .../flash/filters/DisplacementMapFilter_as.cpp     |    2 +
 .../asobj/flash/filters/DisplacementMapFilter_as.h |   10 +-
 .../asobj/flash/filters/DropShadowFilter_as.cpp    |    5 +-
 libcore/asobj/flash/filters/DropShadowFilter_as.h  |    5 +-
 libcore/asobj/flash/filters/GlowFilter_as.cpp      |    3 +-
 libcore/asobj/flash/filters/GlowFilter_as.h        |    5 +-
 .../asobj/flash/filters/GradientBevelFilter_as.cpp |    3 +-
 .../asobj/flash/filters/GradientBevelFilter_as.h   |    5 +-
 .../asobj/flash/filters/GradientGlowFilter_as.cpp  |    5 +-
 .../asobj/flash/filters/GradientGlowFilter_as.h    |    5 +-
 libcore/asobj/flash/filters/filters.am             |   93 +---
 libcore/parser/filter_factory.cpp                  |   12 +-
 libcore/parser/filter_factory.h                    |    9 +-
 libcore/swf/PlaceObject2Tag.cpp                    |    3 +-
 libcore/vm/ASHandlers.cpp                          |  571 +++++++-------------
 libcore/vm/Makefile.am                             |    1 -
 43 files changed, 622 insertions(+), 1422 deletions(-)
 delete mode 100644 libcore/BevelFilter.h
 delete mode 100644 libcore/BitmapFilter.h
 delete mode 100644 libcore/BlurFilter.h
 delete mode 100644 libcore/ColorMatrixFilter.h
 delete mode 100644 libcore/ConvolutionFilter.h
 delete mode 100644 libcore/DropShadowFilter.h
 create mode 100644 libcore/Filters.h
 delete mode 100644 libcore/GlowFilter.h
 delete mode 100644 libcore/GradientBevelFilter.h
 delete mode 100644 libcore/GradientGlowFilter.h
 delete mode 100644 libcore/asobj/flash/filters/BitmapFilterQuality_as.cpp
 delete mode 100644 libcore/asobj/flash/filters/BitmapFilterQuality_as.h
 delete mode 100644 libcore/asobj/flash/filters/BitmapFilterType_as.cpp
 delete mode 100644 libcore/asobj/flash/filters/BitmapFilterType_as.h
 delete mode 100644 libcore/asobj/flash/filters/DisplacementMapFilterMode_as.cpp
 delete mode 100644 libcore/asobj/flash/filters/DisplacementMapFilterMode_as.h


hooks/post-receive
-- 
Gnash



reply via email to

[Prev in Thread] Current Thread [Next in Thread]