gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] gnash ChangeLog gui/Makefile.am gui/Player.cpp ...


From: Sandro Santilli
Subject: [Gnash-commit] gnash ChangeLog gui/Makefile.am gui/Player.cpp ...
Date: Fri, 24 Nov 2006 11:52:18 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  06/11/24 11:52:18

Modified files:
        .              : ChangeLog 
        gui            : Makefile.am Player.cpp 
        server         : impl.cpp sprite_instance.cpp 
        utilities      : Makefile.am processor.cpp 

Log message:
                * gui/: Makefile.am, Player.cpp:
                  use the new VM interface for initialization.
                * server/impl.cpp: deprecate set_current_root(), implement
                  get_current_root() with a call to the VM singleton.
                * server/sprite_instance.cpp (ctor): assert that a VM has
                  been initialized (for debugging)
                * utilities/: Makefile.am, processor.cpp
                  use the new VM interface for initialization.
         
        NOTE: I didn't touch klash.cpp, which surely needs update (I can't 
build it)

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.1739&r2=1.1740
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/Makefile.am?cvsroot=gnash&r1=1.46&r2=1.47
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/Player.cpp?cvsroot=gnash&r1=1.30&r2=1.31
http://cvs.savannah.gnu.org/viewcvs/gnash/server/impl.cpp?cvsroot=gnash&r1=1.76&r2=1.77
http://cvs.savannah.gnu.org/viewcvs/gnash/server/sprite_instance.cpp?cvsroot=gnash&r1=1.85&r2=1.86
http://cvs.savannah.gnu.org/viewcvs/gnash/utilities/Makefile.am?cvsroot=gnash&r1=1.39&r2=1.40
http://cvs.savannah.gnu.org/viewcvs/gnash/utilities/processor.cpp?cvsroot=gnash&r1=1.38&r2=1.39

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.1739
retrieving revision 1.1740
diff -u -b -r1.1739 -r1.1740
--- ChangeLog   24 Nov 2006 11:49:17 -0000      1.1739
+++ ChangeLog   24 Nov 2006 11:52:18 -0000      1.1740
@@ -1,5 +1,13 @@
 2006-11-24 Sandro Santilli <address@hidden>
 
+       * gui/: Makefile.am, Player.cpp:
+         use the new VM interface for initialization.
+       * server/impl.cpp: deprecate set_current_root(), implement
+         get_current_root() with a call to the VM singleton.
+       * server/sprite_instance.cpp (ctor): assert that a VM has
+         been initialized (for debugging)
+       * utilities/: Makefile.am, processor.cpp
+         use the new VM interface for initialization.
        * server/vm/: Makefile.am, VM.{cpp,h}: new class aimed at
          holding VM-related globals.
 

Index: gui/Makefile.am
===================================================================
RCS file: /sources/gnash/gnash/gui/Makefile.am,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -b -r1.46 -r1.47
--- gui/Makefile.am     24 Nov 2006 08:42:44 -0000      1.46
+++ gui/Makefile.am     24 Nov 2006 11:52:18 -0000      1.47
@@ -17,7 +17,7 @@
 
 # 
 
-# $Id: Makefile.am,v 1.46 2006/11/24 08:42:44 strk Exp $
+# $Id: Makefile.am,v 1.47 2006/11/24 11:52:18 strk Exp $
 
 AUTOMAKE_OPTIONS = 
 
@@ -25,6 +25,7 @@
         -I$(top_srcdir) \
         -I$(top_srcdir)/server \
         -I$(top_srcdir)/server/parser \
+        -I$(top_srcdir)/server/vm \
         -I$(top_srcdir)/libbase \
         -I$(top_srcdir)/backend \
         -I$(top_srcdir)/libgeometry \

Index: gui/Player.cpp
===================================================================
RCS file: /sources/gnash/gnash/gui/Player.cpp,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -b -r1.30 -r1.31
--- gui/Player.cpp      21 Nov 2006 00:25:46 -0000      1.30
+++ gui/Player.cpp      24 Nov 2006 11:52:18 -0000      1.31
@@ -60,6 +60,7 @@
 #include "rc.h"
 #include "GnashException.h"
 #include "noseek_fd_adapter.h"
+#include "VM.h"
 
 #include "log.h"
 #include <iostream>
@@ -302,7 +303,8 @@
     // Now that we know about movie size, create gui window.
     _gui->createWindow(infile, width, height);
 
-    gnash::sprite_instance *m = create_library_movie_inst(_movie_def);
+    gnash::sprite_instance* m = VM::init(*_movie_def).getRoot();
+    //gnash::sprite_instance *m = create_library_movie_inst(_movie_def);
     assert(m);
 
     // Parse parameters
@@ -322,7 +324,7 @@
     }
 
 
-    gnash::set_current_root(m);
+    assert(m == VM::get().getRoot());
 
     movie_root* root = dynamic_cast<movie_root*>(m);
     assert(root);

Index: server/impl.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/impl.cpp,v
retrieving revision 1.76
retrieving revision 1.77
diff -u -b -r1.76 -r1.77
--- server/impl.cpp     23 Nov 2006 16:19:22 -0000      1.76
+++ server/impl.cpp     24 Nov 2006 11:52:18 -0000      1.77
@@ -18,7 +18,7 @@
 //
 //
 
-/* $Id: impl.cpp,v 1.76 2006/11/23 16:19:22 strk Exp $ */
+/* $Id: impl.cpp,v 1.77 2006/11/24 11:52:18 strk Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -54,6 +54,7 @@
 #include "URL.h"
 #include "StreamProvider.h"
 #include "sprite_instance.h"
+#include "VM.h"
 
 #include <string>
 #include <map>
@@ -631,11 +632,15 @@
 sprite_instance* get_current_root()
 {
 //    assert(s_current_root != NULL);
-    return s_current_root;
+       return VM::get().getRoot();
 }
 
+// Obsoleted !
 void set_current_root(sprite_instance* m)
 {
+       log_error("set_current_root is obsolete! Use 
VM::init(movie_definition&) instead");
+       assert(0);
+
     assert(m != NULL);
 
     // We don't want to change root, do we ?

Index: server/sprite_instance.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/sprite_instance.cpp,v
retrieving revision 1.85
retrieving revision 1.86
diff -u -b -r1.85 -r1.86
--- server/sprite_instance.cpp  24 Nov 2006 09:04:24 -0000      1.85
+++ server/sprite_instance.cpp  24 Nov 2006 11:52:18 -0000      1.86
@@ -39,6 +39,7 @@
 #include "swf_event.h"
 #include "sprite_definition.h"
 #include "ActionExec.h"
+#include "VM.h"
 
 #include <vector>
 #include <string>
@@ -802,6 +803,9 @@
        assert(m_def != NULL);
        assert(m_root != NULL);
                        
+       // A virtual machine must be initialized at this point
+       assert(VM::get().getSWFVersion());
+                       
        //m_root->add_ref();    // @@ circular!
        m_as_environment.set_target(this);
 

Index: utilities/Makefile.am
===================================================================
RCS file: /sources/gnash/gnash/utilities/Makefile.am,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -b -r1.39 -r1.40
--- utilities/Makefile.am       19 Nov 2006 17:39:01 -0000      1.39
+++ utilities/Makefile.am       24 Nov 2006 11:52:18 -0000      1.40
@@ -44,6 +44,7 @@
         -I$(top_srcdir)/libbase \
         -I$(top_srcdir)/server \
         -I$(top_srcdir)/server/parser \
+        -I$(top_srcdir)/server/vm \
        $(BOOST_CFLAGS) \
         $(LIBXML_CFLAGS) \
        $(NULL)

Index: utilities/processor.cpp
===================================================================
RCS file: /sources/gnash/gnash/utilities/processor.cpp,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -b -r1.38 -r1.39
--- utilities/processor.cpp     21 Nov 2006 00:25:47 -0000      1.38
+++ utilities/processor.cpp     24 Nov 2006 11:52:18 -0000      1.39
@@ -17,7 +17,7 @@
 //
 //
 
-/* $Id: processor.cpp,v 1.38 2006/11/21 00:25:47 strk Exp $ */
+/* $Id: processor.cpp,v 1.39 2006/11/24 11:52:18 strk Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -32,6 +32,7 @@
 #include "rc.h"
 #include "URL.h"
 #include "GnashException.h"
+#include "VM.h"
 
 #include <iostream>
 #include <cstdio>
@@ -252,11 +253,8 @@
        fprintf(stderr, "error: can't play movie '%s'\n", filename);
        exit(1);
     }
-    gnash::sprite_instance* m = md->create_instance();
-    if (m == NULL) {
-       fprintf(stderr, "error: can't create instance of movie '%s'\n", 
filename);
-       exit(1);
-    }
+
+    gnash::sprite_instance* m = VM::init(*md).getRoot();
     
     int        kick_count = 0;
     




reply via email to

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