gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] /srv/bzr/gnash/avm2 r9452: Move SymbolClassTag loader int


From: Tom Stellard
Subject: [Gnash-commit] /srv/bzr/gnash/avm2 r9452: Move SymbolClassTag loader into its own class.
Date: Tue, 12 Aug 2008 11:27:42 +0800
User-agent: Bazaar (1.5)

------------------------------------------------------------
revno: 9452
committer: Tom Stellard <address@hidden>
branch nick: gnash_dev
timestamp: Tue 2008-08-12 11:27:42 +0800
message:
  Move SymbolClassTag loader into its own class.
added:
  libcore/swf/SymbolClassTag.h
modified:
  libcore/impl.cpp
  libcore/swf/tag_loaders.cpp
  libcore/swf/tag_loaders.h
=== modified file 'libcore/impl.cpp'
--- a/libcore/impl.cpp  2008-08-09 13:20:40 +0000
+++ b/libcore/impl.cpp  2008-08-12 03:27:42 +0000
@@ -53,6 +53,7 @@
 #include "SetBackgroundColorTag.h"
 #include "StartSoundTag.h"
 #include "StreamSoundBlockTag.h"
+#include "SymbolClassTag.h"
 #include "swf/tag_loaders.h" // for all tag loaders..
 #include "sound_handler.h" // for get_sound_handler
 #ifdef GNASH_USE_GC
@@ -239,7 +240,7 @@
 
     register_tag_loader(SWF::CSMTEXTSETTINGS, fixme_loader); // 74
     register_tag_loader(SWF::DEFINEFONT3, define_font_loader); // 75
-    register_tag_loader(SWF::SYMBOLCLASS, symbol_class_loader); // 76 
+    register_tag_loader(SWF::SYMBOLCLASS, SymbolClassTag::loader); // 76 
     register_tag_loader(SWF::METADATA, metadata_loader); // 77
     register_tag_loader(SWF::DEFINESCALINGGRID, fixme_loader); // 78
     register_tag_loader(SWF::DOABCDEFINE, DoABCTag::doABCLoader); // 82 -- AS3 
codeblock.

=== added file 'libcore/swf/SymbolClassTag.h'
--- a/libcore/swf/SymbolClassTag.h      1970-01-01 00:00:00 +0000
+++ b/libcore/swf/SymbolClassTag.h      2008-08-12 03:27:42 +0000
@@ -0,0 +1,72 @@
+// 
+//   Copyright (C) 2007, 2008 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_SWF_SYMBOLCLASSTAG_H
+#define GNASH_SWF_SYMBOLCLASSTAG_H
+
+#include "ControlTag.h" // for inheritance
+#include "swf.h" // for tag_type definition
+#include "action_buffer.h" // for composition
+#include "sprite_instance.h" // for inlines
+#include "stream.h" // for inlines
+
+// Forward declarations
+namespace gnash {
+       class movie_definition;
+}
+
+namespace gnash {
+namespace SWF {
+
+/// SWF Tag SymbolClass (76) 
+//
+class SymbolClassTag : public ControlTag
+{
+public:
+
+       SymbolClassTag()
+
+       {}
+
+       static void loader(SWFStream& in,tag_type tag, movie_definition* m)
+       {
+               assert(tag == SYMBOLCLASS); //76
+
+               log_unimpl(_("%s tag parsed but not yet used"), "SYMBOLCLASS");
+               boost::uint16_t num_symbols = in.read_u16();
+               log_debug("There are %u symbols.",num_symbols);
+               for(unsigned int i = 0;i<num_symbols;i++){
+                       boost::uint16_t character = in.read_u16();
+                       std::string name;
+                       in.read_string(name);
+                       log_debug("Symbol %u name=%s tag=%u",i,name,character);
+               }
+       }
+       
+};
+
+} // namespace gnash::SWF
+} // namespace gnash
+
+
+#endif // GNASH_SWF_SYMBOLCLASSTAG_H
+
+
+// Local Variables:
+// mode: C++
+// indent-tabs-mode: t
+// End:

=== modified file 'libcore/swf/tag_loaders.cpp'
--- a/libcore/swf/tag_loaders.cpp       2008-08-12 03:04:21 +0000
+++ b/libcore/swf/tag_loaders.cpp       2008-08-12 03:27:42 +0000
@@ -1645,24 +1645,6 @@
 }
 
 void
-symbol_class_loader(SWFStream& in, tag_type tag, movie_definition* /*m*/){
-
-       assert(tag == SYMBOLCLASS); //76
-
-       log_unimpl(_("%s tag parsed but not yet used"), "SYMBOLCLASS");
-       boost::uint16_t num_symbols = in.read_u16();
-       log_debug("There are %u symbols.",num_symbols);
-       for(unsigned int i = 0;i<num_symbols;i++){
-               //Skip the Tag.  I am not sure what this.
-               boost::uint16_t character = in.read_u16();
-               std::string name;
-               in.read_string(name);
-               log_debug("Symbol %u name=%s tag=%u",i,name,character);
-       }
-}
-
-
-void
 define_scene_frame_label_loader(SWFStream& in, tag_type tag, movie_definition* 
/*m*/)
 {
     assert(tag == SWF::DEFINESCENEANDFRAMELABELDATA); //86

=== modified file 'libcore/swf/tag_loaders.h'
--- a/libcore/swf/tag_loaders.h 2008-08-12 03:04:21 +0000
+++ b/libcore/swf/tag_loaders.h 2008-08-12 03:27:42 +0000
@@ -157,9 +157,6 @@
 void
 define_scene_frame_label_loader(SWFStream& in, tag_type tag, movie_definition* 
/*m*/);
 
-void
-symbol_class_loader(SWFStream& in, tag_type tag, movie_definition* /*m*/);
-
 
 } // namespace gnash::SWF::tag_loaders
 } // namespace gnash::SWF


reply via email to

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