[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog server/Makefile.am server/impl....
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] gnash ChangeLog server/Makefile.am server/impl.... |
Date: |
Wed, 21 Feb 2007 13:22:37 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 07/02/21 13:22:37
Modified files:
. : ChangeLog
server : Makefile.am impl.cpp stream.h
Added files:
server/swf : DefineFontAlignZonesTag.cpp
DefineFontAlignZonesTag.h
Log message:
* server/Makefile.am,
server/swf/DefineFontAlignZonesTag.{cpp,h}:
Initial implementation of DefineFontAlignZones
tag loader (unfinished).
* server/impl.cpp: use unfinished loader for
DEFINEFONTALIGNZONES.
* server/stream.h: add skip_to_tag_end() method.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2420&r2=1.2421
http://cvs.savannah.gnu.org/viewcvs/gnash/server/Makefile.am?cvsroot=gnash&r1=1.104&r2=1.105
http://cvs.savannah.gnu.org/viewcvs/gnash/server/impl.cpp?cvsroot=gnash&r1=1.95&r2=1.96
http://cvs.savannah.gnu.org/viewcvs/gnash/server/stream.h?cvsroot=gnash&r1=1.14&r2=1.15
http://cvs.savannah.gnu.org/viewcvs/gnash/server/swf/DefineFontAlignZonesTag.cpp?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/server/swf/DefineFontAlignZonesTag.h?cvsroot=gnash&rev=1.1
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.2420
retrieving revision 1.2421
diff -u -b -r1.2420 -r1.2421
--- ChangeLog 21 Feb 2007 11:35:51 -0000 1.2420
+++ ChangeLog 21 Feb 2007 13:22:36 -0000 1.2421
@@ -1,5 +1,15 @@
2007-02-21 Sandro Santilli <address@hidden>
+ * server/Makefile.am,
+ server/swf/DefineFontAlignZonesTag.{cpp,h}:
+ Initial implementation of DefineFontAlignZones
+ tag loader (unfinished).
+ * server/impl.cpp: use unfinished loader for
+ DEFINEFONTALIGNZONES.
+ * server/stream.h: add skip_to_tag_end() method.
+
+2007-02-21 Sandro Santilli <address@hidden>
+
* server/font.{cpp,h}, server/impl.cpp,
server/swf/tag_loaders.{cpp,h}:
Add support for DEFINEFONT3 tag (not much done,
Index: server/Makefile.am
===================================================================
RCS file: /sources/gnash/gnash/server/Makefile.am,v
retrieving revision 1.104
retrieving revision 1.105
diff -u -b -r1.104 -r1.105
--- server/Makefile.am 19 Feb 2007 11:08:22 -0000 1.104
+++ server/Makefile.am 21 Feb 2007 13:22:37 -0000 1.105
@@ -18,7 +18,7 @@
#
#
-# $Id: Makefile.am,v 1.104 2007/02/19 11:08:22 strk Exp $
+# $Id: Makefile.am,v 1.105 2007/02/21 13:22:37 strk Exp $
AUTOMAKE_OPTIONS =
@@ -68,6 +68,7 @@
sprite_instance.cpp \
swf/TagLoadersTable.cpp \
swf/tag_loaders.cpp \
+ swf/DefineFontAlignZonesTag.cpp \
swf_function.cpp \
video_stream_instance.cpp \
StreamProvider.cpp \
@@ -138,6 +139,7 @@
swf.h \
swf/TagLoadersTable.h \
swf/tag_loaders.h \
+ swf/DefineFontAlignZonesTag.h \
swf_event.h \
swf_function.h \
tesselate.h \
Index: server/impl.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/impl.cpp,v
retrieving revision 1.95
retrieving revision 1.96
diff -u -b -r1.95 -r1.96
--- server/impl.cpp 21 Feb 2007 11:35:51 -0000 1.95
+++ server/impl.cpp 21 Feb 2007 13:22:37 -0000 1.96
@@ -14,7 +14,7 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-/* $Id: impl.cpp,v 1.95 2007/02/21 11:35:51 strk Exp $ */
+/* $Id: impl.cpp,v 1.96 2007/02/21 13:22:37 strk Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -52,6 +52,7 @@
#include "sprite_instance.h"
#include "VM.h"
#include "BitmapMovieDefinition.h"
+#include "DefineFontAlignZonesTag.h"
#include <string>
#include <map>
@@ -217,7 +218,9 @@
register_tag_loader(SWF::FILEATTRIBUTES, file_attributes_loader); // 69
register_tag_loader(SWF::PLACEOBJECT3, fixme_loader); // 70
register_tag_loader(SWF::IMPORTASSETS2, fixme_loader); // 71
- register_tag_loader(SWF::DEFINEALIGNZONES, fixme_loader); // 73
+
+ register_tag_loader(SWF::DEFINEALIGNZONES,
DefineFontAlignZonesTag::loader); // 73
+
register_tag_loader(SWF::CSMTEXTSETTINGS, fixme_loader); // 74
register_tag_loader(SWF::DEFINEFONT3, define_font_loader); // 75
register_tag_loader(SWF::METADATA, metadata_loader); // 77
Index: server/stream.h
===================================================================
RCS file: /sources/gnash/gnash/server/stream.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- server/stream.h 14 Feb 2007 22:48:55 -0000 1.14
+++ server/stream.h 21 Feb 2007 13:22:37 -0000 1.15
@@ -129,6 +129,12 @@
set_position(curpos+num);
}
+ /// Discard all bytes up to end of tag
+ void skip_to_tag_end()
+ {
+ set_position(get_tag_end_position());
+ }
+
private:
int _current_tag_length;
Index: server/swf/DefineFontAlignZonesTag.cpp
===================================================================
RCS file: server/swf/DefineFontAlignZonesTag.cpp
diff -N server/swf/DefineFontAlignZonesTag.cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ server/swf/DefineFontAlignZonesTag.cpp 21 Feb 2007 13:22:37 -0000
1.1
@@ -0,0 +1,80 @@
+//
+// Copyright (C) 2007 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 2 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
+
+/* $Id: DefineFontAlignZonesTag.cpp,v 1.1 2007/02/21 13:22:37 strk Exp $ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "font.h"
+#include "log.h"
+#include "shape.h"
+#include "stream.h"
+#include "movie_definition.h"
+#include "DefineFontAlignZonesTag.h"
+
+namespace gnash {
+namespace SWF {
+namespace tag_loaders {
+
+DefineFontAlignZonesTag::DefineFontAlignZonesTag(movie_definition& m, stream&
in)
+{
+}
+
+/* public static */
+void
+DefineFontAlignZonesTag::loader(stream* in, tag_type tag, movie_definition* m)
+{
+ assert(tag == SWF::DEFINEALIGNZONES); // 73
+
+ unsigned short ref = in->read_u8(); // must reference a valid
DEFINEFONT3 tag
+ font* referencedFont = m->get_font(ref);
+ if ( ! referencedFont )
+ {
+ IF_VERBOSE_MALFORMED_SWF(
+ log_swferror("DefineFontAlignZones tag references an undefined
font %d", ref);
+ );
+ in->skip_to_tag_end();
+ return;
+ }
+
+ unsigned flags = in->read_u8(); // 2bits are cms table, 6bits are
reserved
+
+ // TODO:
+ // - parse swf_zone_array
+ // - construct a DefineFontAlignZonesTag class
+ // - register the tag with the referencedFont
+
+ IF_VERBOSE_PARSE (
+ log_parse(" DefinFontAlignZones: font=%d, flags=%d", ref, flags);
+ );
+
+ in->skip_to_tag_end();
+ log_error("FIXME: DefineFontAlignZoneTag unfinished ");
+
+
+}
+
+
+} // namespace gnash::SWF::tag_loaders
+} // namespace gnash::SWF
+} // namespace gnash
+
+// Local Variables:
+// mode: C++
+// indent-tabs-mode: t
+// End:
Index: server/swf/DefineFontAlignZonesTag.h
===================================================================
RCS file: server/swf/DefineFontAlignZonesTag.h
diff -N server/swf/DefineFontAlignZonesTag.h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ server/swf/DefineFontAlignZonesTag.h 21 Feb 2007 13:22:37 -0000
1.1
@@ -0,0 +1,72 @@
+//
+// Copyright (C) 2005, 2006 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 2 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
+
+//
+//
+//
+
+/* $Id: DefineFontAlignZonesTag.h,v 1.1 2007/02/21 13:22:37 strk Exp $ */
+
+#ifndef GNASH_SWF_DEFINEFONTALIGNZONESTAG_H
+#define GNASH_SWF_DEFINEFONTALIGNZONESTAG_H
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+// Forward declarations
+namespace gnash {
+ class movie_definition;
+ class stream;
+}
+
+namespace gnash {
+namespace SWF {
+namespace tag_loaders {
+
+class DefineFontAlignZonesTag {
+public:
+
+ enum {
+ THIN = 0,
+ MEDIUM = 1,
+ THICK = 2
+ };
+
+ DefineFontAlignZonesTag(movie_definition& m, stream& in);
+
+ static void loader(stream* in, tag_type tag, movie_definition* m);
+
+private:
+
+ unsigned short _font2_id_ref;
+
+ unsigned _csm_table_int:2;
+
+};
+
+} // namespace gnash::SWF::tag_loaders
+} // namespace gnash::SWF
+} // namespace gnash
+
+
+#endif // GNASH_SWF_DEFINEFONTALIGNZONESTAG_H
+
+
+// Local Variables:
+// mode: C++
+// indent-tabs-mode: t
+// End: