gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] gnash ChangeLog server/parser/sprite_definition... [relea


From: Sandro Santilli
Subject: [Gnash-commit] gnash ChangeLog server/parser/sprite_definition... [release_0_7_2]
Date: Mon, 06 Nov 2006 13:24:00 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Branch:         release_0_7_2
Changes by:     Sandro Santilli <strk>  06/11/06 13:23:59

Modified files:
        .              : ChangeLog 
        server/parser  : sprite_definition.h 
        testsuite/actionscript.all: MovieClip.as 

Log message:
                * server/parser/sprite_definition.h: dirty patch for dirtier
                  programmatically-created MovieClip implementation.
                * testsuite/actionscript.all/MovieClip.as: expect failures.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&only_with_tag=release_0_7_2&r1=1.1412.2.92&r2=1.1412.2.93
http://cvs.savannah.gnu.org/viewcvs/gnash/server/parser/sprite_definition.h?cvsroot=gnash&only_with_tag=release_0_7_2&r1=1.4.2.1&r2=1.4.2.2
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/MovieClip.as?cvsroot=gnash&only_with_tag=release_0_7_2&r1=1.5.2.4&r2=1.5.2.5

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.1412.2.92
retrieving revision 1.1412.2.93
diff -u -b -r1.1412.2.92 -r1.1412.2.93
--- ChangeLog   6 Nov 2006 11:35:02 -0000       1.1412.2.92
+++ ChangeLog   6 Nov 2006 13:23:59 -0000       1.1412.2.93
@@ -1,5 +1,8 @@
 2006-11-06 Sandro Santilli <address@hidden>
 
+       * server/parser/sprite_definition.h: dirty patch for dirtier
+         programmatically-created MovieClip implementation.
+       * testsuite/actionscript.all/MovieClip.as: expect failures.
        * testsuite/actionscript.all/MovieClip.as: added more tests
          for createEmtyMovieClip - expose the segfault bug in it.
        * testsuite/misc-ming.all/: DefineEditTextVariableNameTest-Runner.cpp,

Index: server/parser/sprite_definition.h
===================================================================
RCS file: /sources/gnash/gnash/server/parser/sprite_definition.h,v
retrieving revision 1.4.2.1
retrieving revision 1.4.2.2
diff -u -b -r1.4.2.1 -r1.4.2.2
--- server/parser/sprite_definition.h   30 Oct 2006 14:28:55 -0000      1.4.2.1
+++ server/parser/sprite_definition.h   6 Nov 2006 13:23:59 -0000       1.4.2.2
@@ -100,7 +100,7 @@
        ///
        virtual size_t get_bytes_total() const
        {
-               return m_movie_def->get_bytes_total();
+               return m_movie_def ? m_movie_def->get_bytes_total() : 0;
        }
 
        /// \brief
@@ -109,15 +109,25 @@
        ///
        virtual size_t get_bytes_loaded() const
        {
-               return m_movie_def->get_bytes_loaded();
+               return m_movie_def ? m_movie_def->get_bytes_loaded() : 0;
        }
 
-       virtual float   get_frame_rate() const { return 
m_movie_def->get_frame_rate(); }
+       virtual float   get_frame_rate() const
+       {
+               // or should we assert(0) here ?
+               return m_movie_def ? m_movie_def->get_frame_rate() : 0.0;
+       }
 
        // Return number of frames loaded (of current sprite)
        virtual size_t  get_loading_frame() const { return m_loading_frame; }
 
-       virtual int     get_version() const { return 
m_movie_def->get_version(); }
+       virtual int     get_version() const
+       {
+               // how do we tell version if we don't have a refenrece
+               // to the topmost movie ??
+               assert(m_movie_def);
+               return m_movie_def->get_version();
+       }
 
        virtual void add_font(int /*id*/, font* /*ch*/)
        {
@@ -125,7 +135,12 @@
                        "Malformed SWF?\n");
        }
 
-       virtual font* get_font(int id) { return m_movie_def->get_font(id); }
+       virtual font* get_font(int id)
+       {
+               // how do we resolve fonts if we don't have a reference
+               // to the topmost movie ??
+               return m_movie_def ? m_movie_def->get_font(id) : NULL;
+       }
 
        virtual void set_jpeg_loader(std::auto_ptr<jpeg::input> /*j_in*/)
        {
@@ -139,7 +154,12 @@
 
        virtual bitmap_character_def* get_bitmap_character_def(int id)
        {
-               return m_movie_def->get_bitmap_character_def(id);
+               // how do we query characters by id
+               // if we don't have a reference to the topmost movie ??
+               return m_movie_def ?
+                       m_movie_def->get_bitmap_character_def(id)
+                       :
+                       NULL;
        }
 
        virtual void add_bitmap_character_def(int /*id*/,
@@ -151,7 +171,9 @@
 
        virtual sound_sample* get_sound_sample(int id)
        {
-               return m_movie_def->get_sound_sample(id);
+               // how do we query sound samples by id
+               // if we don't have a reference to the topmost movie ??
+               return m_movie_def ? m_movie_def->get_sound_sample(id) : NULL;
        }
 
        virtual void add_sound_sample(int /*id*/, sound_sample* /*sam*/)
@@ -160,12 +182,21 @@
                        " Malformed SWF?");
        }
 
-       virtual void set_loading_sound_stream_id(int id) { 
-               return m_movie_def->set_loading_sound_stream_id(id);
+       virtual void set_loading_sound_stream_id(int id) 
+       {
+               if ( m_movie_def )
+               {
+                       m_movie_def->set_loading_sound_stream_id(id);
        }
 
-       virtual int get_loading_sound_stream_id() { 
-               return m_movie_def->get_loading_sound_stream_id();
+       }
+
+       virtual int get_loading_sound_stream_id()
+       { 
+               return m_movie_def ? 
+                       m_movie_def->get_loading_sound_stream_id()
+                       :
+                       -1;
        }
 
        
@@ -189,7 +220,10 @@
 
        virtual smart_ptr<resource> get_exported_resource(const tu_string& sym)
        {
-               return m_movie_def->get_exported_resource(sym);
+               return m_movie_def ? 
+                       m_movie_def->get_exported_resource(sym)
+                       :
+                       NULL;
        }
 
        virtual void add_import(const char* /*source_url*/, int /*id*/,
@@ -220,7 +254,10 @@
        ///
        virtual character_def*  get_character_def(int id)
        {
-           return m_movie_def->get_character_def(id);
+           return m_movie_def ?
+               m_movie_def->get_character_def(id)
+               :
+               NULL;
        }
 
        /// Calls to this function should only be made when
@@ -308,7 +345,11 @@
 
        virtual const std::string& get_url() const
        {
-           return m_movie_def->get_url();
+           static std::string null_url;
+           return m_movie_def ?
+               m_movie_def->get_url()
+               :
+               null_url;
        }
 
        /// \brief

Index: testsuite/actionscript.all/MovieClip.as
===================================================================
RCS file: /sources/gnash/gnash/testsuite/actionscript.all/MovieClip.as,v
retrieving revision 1.5.2.4
retrieving revision 1.5.2.5
diff -u -b -r1.5.2.4 -r1.5.2.5
--- testsuite/actionscript.all/MovieClip.as     6 Nov 2006 11:36:01 -0000       
1.5.2.4
+++ testsuite/actionscript.all/MovieClip.as     6 Nov 2006 13:23:59 -0000       
1.5.2.5
@@ -22,7 +22,7 @@
 // compile this test case with Ming makeswf, and then
 // execute it like this gnash -1 -r 0 -v out.swf
 
-rcsid="$Id: MovieClip.as,v 1.5.2.4 2006/11/06 11:36:01 strk Exp $";
+rcsid="$Id: MovieClip.as,v 1.5.2.5 2006/11/06 13:23:59 strk Exp $";
 
 #include "check.as"
 
@@ -146,10 +146,10 @@
 // Test movieclip creation
 var mc2 = createEmptyMovieClip("mc2_mc", 50, 0, 0, 0);
 xcheck(mc2 != undefined);
-check_equals(mc2_mc.getBytesLoaded(), 0);
-check_equals(mc2_mc.getBytesTotal(), 0);
-check_equals(mc2.getBytesLoaded(), 0);
-check_equals(mc2.getBytesTotal(), 0);
+xcheck_equals(mc2_mc.getBytesLoaded(), 0);
+xcheck_equals(mc2_mc.getBytesTotal(), 0);
+xcheck_equals(mc2.getBytesLoaded(), 0);
+xcheck_equals(mc2.getBytesTotal(), 0);
 
 var mc3 = createEmptyMovieClip("mc3_mc", 50);
 check(mc3 != undefined);




reply via email to

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