gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] /srv/bzr/gnash/trunk r9570: Restore support for SWF2 (Pla


From: Benjamin Wolsey
Subject: [Gnash-commit] /srv/bzr/gnash/trunk r9570: Restore support for SWF2 (PlaceObject tag), which stopped working sometime
Date: Fri, 08 Aug 2008 13:57:18 +0200
User-agent: Bazaar (1.5)

------------------------------------------------------------
revno: 9570
committer: Benjamin Wolsey <address@hidden>
branch nick: trunk
timestamp: Fri 2008-08-08 13:57:18 +0200
message:
  Restore support for SWF2 (PlaceObject tag), which stopped working sometime
  between 2006 and now.
modified:
  libcore/parser/shape_character_def.cpp
  libcore/swf/PlaceObject2Tag.cpp
    ------------------------------------------------------------
    revno: 9568.2.1
    committer: Benjamin Wolsey <address@hidden>
    branch nick: work
    timestamp: Fri 2008-08-08 11:06:20 +0200
    message:
      Drop commented-out and useless code.
    modified:
      libcore/parser/shape_character_def.cpp
    ------------------------------------------------------------
    revno: 9568.2.2
    committer: Benjamin Wolsey <address@hidden>
    branch nick: work
    timestamp: Fri 2008-08-08 13:15:37 +0200
    message:
      Fix display of anything with a PlaceObject tag (SWF2).
    modified:
      libcore/swf/PlaceObject2Tag.cpp
=== modified file 'libcore/parser/shape_character_def.cpp'
--- a/libcore/parser/shape_character_def.cpp    2008-08-07 10:02:35 +0000
+++ b/libcore/parser/shape_character_def.cpp    2008-08-08 09:06:20 +0000
@@ -34,11 +34,6 @@
 #include <cfloat>
 #include <algorithm>
 
-//#ifdef __sgi
-//extern double round(double);
-//#pragma optional round
-//#endif
-
 // Define the macro below to always compute bounds for shape characters
 // and compare them with the bounds encoded in the SWF
 //#define GNASH_DEBUG_SHAPE_BOUNDS 1

=== modified file 'libcore/swf/PlaceObject2Tag.cpp'
--- a/libcore/swf/PlaceObject2Tag.cpp   2008-06-09 17:12:54 +0000
+++ b/libcore/swf/PlaceObject2Tag.cpp   2008-08-08 11:15:37 +0000
@@ -34,27 +34,38 @@
     // Original place_object tag; very simple.
     in.ensureBytes(2 + 2);
     m_character_id = in.read_u16();
-    m_depth = in.read_u16()+character::staticDepthOffset;
+    m_depth = in.read_u16() + character::staticDepthOffset;
     m_matrix.read(in);
 
     IF_VERBOSE_PARSE
     (
             log_parse(_("  PLACEOBJECT: depth=%d(%d) char=%d"),
-            m_depth, m_depth-character::staticDepthOffset,
+            m_depth, m_depth - character::staticDepthOffset,
             m_character_id);
-            log_parse("%s", m_matrix);
+            log_parse("  matrix: %s", m_matrix);
     );
 
+    // If these flags2 values aren't set here, nothing will
+    // ever be displayed.
+    m_has_flags2 |= ( HAS_CHARACTER_MASK
+                    | HAS_MATRIX_MASK );
+
+    // PlaceObject doesn't know about masks.
+    m_clip_depth = character::noClipDepthValue;
+
     if (in.tell() < in.get_tag_end_position())
     {
         m_color_transform.read_rgb(in);
 
+        m_has_flags2 |= HAS_CXFORM_MASK;
+
         IF_VERBOSE_PARSE
         (
             log_parse(_("  cxform: %s"), m_color_transform);
         );
 
     }
+    
 }
 
 // read placeObject2 actions


reply via email to

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