[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog server/Makefile.am server/movie...
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] gnash ChangeLog server/Makefile.am server/movie... |
Date: |
Wed, 23 Aug 2006 21:30:49 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 06/08/23 21:30:49
Modified files:
. : ChangeLog
server : Makefile.am movie_def_impl.cpp movie_root.cpp
sprite_instance.cpp sprite_instance.h
Added files:
server : movie_instance.cpp movie_instance.h
Log message:
* server/Makefile.am, server/movie_instance.cpp,
server/movie_instance.h, server/sprite_instance.cpp,
server/sprite_instance.h, server/movie_def_impl.cpp,
server/movie_root.cpp:
new 'movie_instance' class derived from 'sprite_instance'
and representing the "main" movie read from a SWF file.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.691&r2=1.692
http://cvs.savannah.gnu.org/viewcvs/gnash/server/Makefile.am?cvsroot=gnash&r1=1.57&r2=1.58
http://cvs.savannah.gnu.org/viewcvs/gnash/server/movie_def_impl.cpp?cvsroot=gnash&r1=1.31&r2=1.32
http://cvs.savannah.gnu.org/viewcvs/gnash/server/movie_root.cpp?cvsroot=gnash&r1=1.12&r2=1.13
http://cvs.savannah.gnu.org/viewcvs/gnash/server/sprite_instance.cpp?cvsroot=gnash&r1=1.40&r2=1.41
http://cvs.savannah.gnu.org/viewcvs/gnash/server/sprite_instance.h?cvsroot=gnash&r1=1.18&r2=1.19
http://cvs.savannah.gnu.org/viewcvs/gnash/server/movie_instance.cpp?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/server/movie_instance.h?cvsroot=gnash&rev=1.1
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.691
retrieving revision 1.692
diff -u -b -r1.691 -r1.692
--- ChangeLog 23 Aug 2006 20:56:22 -0000 1.691
+++ ChangeLog 23 Aug 2006 21:30:49 -0000 1.692
@@ -1,5 +1,11 @@
2006-08-23 Sandro Santilli <address@hidden>
+ * server/Makefile.am, server/movie_instance.cpp,
+ server/movie_instance.h, server/sprite_instance.cpp,
+ server/sprite_instance.h, server/movie_def_impl.cpp,
+ server/movie_root.cpp:
+ new 'movie_instance' class derived from 'sprite_instance'
+ and representing the "main" movie read from a SWF file.
* libamf/amf.cpp, server/dlist.cpp: fixed compiler warnings, or
added some notes about problems arised from them.
Index: server/Makefile.am
===================================================================
RCS file: /sources/gnash/gnash/server/Makefile.am,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -b -r1.57 -r1.58
--- server/Makefile.am 13 Aug 2006 15:54:16 -0000 1.57
+++ server/Makefile.am 23 Aug 2006 21:30:49 -0000 1.58
@@ -104,6 +104,7 @@
sound.cpp \
sprite_definition.cpp \
sprite_instance.cpp \
+ movie_instance.cpp \
stream.cpp \
StreamProvider.cpp \
styles.cpp \
@@ -162,6 +163,7 @@
Sprite.h \
sprite_definition.h \
sprite_instance.h \
+ movie_instance.h \
stream.h \
StreamProvider.h \
styles.h \
Index: server/movie_def_impl.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/movie_def_impl.cpp,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -b -r1.31 -r1.32
--- server/movie_def_impl.cpp 23 Aug 2006 18:14:50 -0000 1.31
+++ server/movie_def_impl.cpp 23 Aug 2006 21:30:49 -0000 1.32
@@ -43,6 +43,7 @@
#include "movie_def_impl.h"
#include "movie_definition.h" // for inheritance
+#include "movie_instance.h"
#include "tu_file.h"
#include "zlib_adapter.h"
#include "stream.h"
@@ -842,8 +843,7 @@
movie_root* m = new movie_root(this);
assert(m);
- sprite_instance* root_movie = new sprite_instance(this, m,
- NULL, -1);
+ sprite_instance* root_movie = new movie_instance(this, m, NULL);
assert(root_movie);
root_movie->set_name("_root");
Index: server/movie_root.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/movie_root.cpp,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -b -r1.12 -r1.13
--- server/movie_root.cpp 6 Aug 2006 02:00:54 -0000 1.12
+++ server/movie_root.cpp 23 Aug 2006 21:30:49 -0000 1.13
@@ -264,9 +264,10 @@
// onload event for child movieclip is executed before frame 1
actions.
// that's why advance for root movieclip and child movieclip
are different.
m_timer += delta_time;
- sprite_instance* current_root = (sprite_instance*)
m_movie.get_ptr();
+ sprite_instance* current_root = m_movie.get_ptr();
assert(current_root);
- current_root->advance_root(delta_time);
+ //current_root->advance_root(delta_time);
+ current_root->advance(delta_time);
}
Index: server/sprite_instance.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/sprite_instance.cpp,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -b -r1.40 -r1.41
--- server/sprite_instance.cpp 23 Aug 2006 15:53:31 -0000 1.40
+++ server/sprite_instance.cpp 23 Aug 2006 21:30:49 -0000 1.41
@@ -51,7 +51,7 @@
#include "log.h"
//#include "action.h"
#include "gnash.h"
-#include "Sprite.h"
+//#include "Sprite.h"
#include "sprite_instance.h"
#include "movie_definition.h"
#include "MovieClipLoader.h" // @@ temp hack for loading tests
@@ -59,7 +59,7 @@
#include "text.h"
#include "execute_tag.h"
#include "fn_call.h"
-#include "tu_random.h"
+//#include "tu_random.h"
#include "Key.h"
#include "movie_root.h"
@@ -383,9 +383,9 @@
m_update_frame(true),
m_has_looped(false),
m_accept_anim_moves(true),
- m_on_event_load_called(false),
m_frame_time(0.0f),
- m_has_keypress_event(false)
+ m_has_keypress_event(false),
+ m_on_event_load_called(false)
{
assert(m_def != NULL);
assert(m_root != NULL);
@@ -1243,6 +1243,7 @@
}
+#if 0
// _root movieclip advance
void sprite_instance::advance_root(float delta_time)
{
@@ -1286,6 +1287,7 @@
// log_msg("no time remained");
}
}
+#endif
// child movieclip advance
void sprite_instance::advance(float delta_time)
Index: server/sprite_instance.h
===================================================================
RCS file: /sources/gnash/gnash/server/sprite_instance.h,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -b -r1.18 -r1.19
--- server/sprite_instance.h 23 Aug 2006 12:04:24 -0000 1.18
+++ server/sprite_instance.h 23 Aug 2006 21:30:49 -0000 1.19
@@ -206,7 +206,7 @@
virtual movie* get_topmost_mouse_entity(float x, float y);
virtual void advance(float delta_time);
- virtual void advance_root(float delta_time);
+ //virtual void advance_root(float delta_time);
virtual void advance_sprite(float delta_time);
/// Execute the tags associated with the specified frame.
@@ -511,10 +511,13 @@
/// Increment m_current_frame, and take care of looping.
void increment_frame_and_check_for_loop();
- bool m_on_event_load_called;
float m_frame_time;
bool m_has_keypress_event;
+protected:
+
+ bool m_on_event_load_called;
+
};
Index: server/movie_instance.cpp
===================================================================
RCS file: server/movie_instance.cpp
diff -N server/movie_instance.cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ server/movie_instance.cpp 23 Aug 2006 21:30:49 -0000 1.1
@@ -0,0 +1,111 @@
+//
+// 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
+
+// Linking Gnash statically or dynamically with other modules is making a
+// combined work based on Gnash. Thus, the terms and conditions of the GNU
+// General Public License cover the whole combination.
+//
+// As a special exception, the copyright holders of Gnash give you
+// permission to combine Gnash with free software programs or libraries
+// that are released under the GNU LGPL and with code included in any
+// release of Talkback distributed by the Mozilla Foundation. You may
+// copy and distribute such a system following the terms of the GNU GPL
+// for all but the LGPL-covered parts and Talkback, and following the
+// LGPL for the LGPL-covered parts.
+//
+// Note that people who make modified versions of Gnash are not obligated
+// to grant this special exception for their modified versions; it is their
+// choice whether to do so. The GNU General Public License gives permission
+// to release a modified version without this exception; this exception
+// also makes it possible to release a modified version which carries
+// forward this exception.
+//
+//
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+// This needs to be included first for NetBSD systems or we get a weird
+// problem with pthread_t being defined too many times if we use any
+// STL containers.
+#ifdef HAVE_PTHREADS
+#include <pthread.h>
+#endif
+
+//#include "action.h"
+//#include "gnash.h"
+#include "movie_instance.h"
+#include "movie_definition.h"
+#include "movie_def_impl.h"
+#include "movie_root.h"
+#include "tu_random.h"
+#include "log.h"
+
+#include <vector>
+#include <string>
+#include <math.h>
+
+#include <functional> // for mem_fun, bind1st
+#include <algorithm> // for for_each
+
+using namespace std;
+
+namespace gnash {
+
+movie_instance::movie_instance(movie_def_impl* def,
+ movie_root* r, character* parent)
+ :
+ sprite_instance(def, r, parent, -1),
+ _def(def)
+{
+}
+
+// Advance of an SWF-defined movie instance
+void
+movie_instance::advance(float delta_time)
+{
+ //GNASH_REPORT_FUNCTION;
+
+ assert ( get_root()->get_root_movie() == this );
+
+ //_def->stopLoader();
+
+ // Load next frame if available (+2 as m_current_frame is 0-based)
+ //
+ // We do this inside advance_root to make sure
+ // it's only for a root sprite (not a sprite defined
+ // by DefineSprite!)
+ _def->ensure_frame_loaded(min(get_current_frame()+2,
+ get_frame_count()));
+
+ // Vitaly: random should go continuously that:
+ // 1. after restart of the player the situation has not repeated
+ // 2. by different machines the random gave different numbers
+ tu_random::next_random();
+
+ advance_sprite(delta_time);
+
+ if (m_on_event_load_called == false)
+ {
+ on_event(event_id::LOAD); // root onload
+ m_on_event_load_called = true;
+ }
+
+ //_def->resumeLoader();
+}
+
+} // namespace gnash
Index: server/movie_instance.h
===================================================================
RCS file: server/movie_instance.h
diff -N server/movie_instance.h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ server/movie_instance.h 23 Aug 2006 21:30:49 -0000 1.1
@@ -0,0 +1,83 @@
+//
+// 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
+
+// Linking Gnash statically or dynamically with other modules is making a
+// combined work based on Gnash. Thus, the terms and conditions of the GNU
+// General Public License cover the whole combination.
+//
+// As a special exception, the copyright holders of Gnash give you
+// permission to combine Gnash with free software programs or libraries
+// that are released under the GNU LGPL and with code included in any
+// release of Talkback distributed by the Mozilla Foundation. You may
+// copy and distribute such a system following the terms of the GNU GPL
+// for all but the LGPL-covered parts and Talkback, and following the
+// LGPL for the LGPL-covered parts.
+//
+// Note that people who make modified versions of Gnash are not obligated
+// to grant this special exception for their modified versions; it is their
+// choice whether to do so. The GNU General Public License gives permission
+// to release a modified version without this exception; this exception
+// also makes it possible to release a modified version which carries
+// forward this exception.
+//
+//
+
+// Stateful live Movie instance
+
+
+#ifndef GNASH_MOVIE_INSTANCE_H
+#define GNASH_MOVIE_INSTANCE_H
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <vector>
+
+#include "sprite_instance.h" // for inheritance
+
+// Forward declarations
+namespace gnash {
+ class movie_root;
+ class character;
+ class movie_def_impl;
+}
+
+namespace gnash
+{
+
+/// Stateful Movie object (a special kind of sprite)
+class movie_instance : public sprite_instance
+{
+
+public:
+
+ movie_instance(movie_def_impl* def,
+ movie_root* r, character* parent);
+
+ virtual ~movie_instance() {}
+
+ virtual void advance(float delta_time);
+
+private:
+
+ movie_def_impl* _def;
+};
+
+
+} // end of namespace gnash
+
+#endif // GNASH_MOVIE_INSTANCE_H
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] gnash ChangeLog server/Makefile.am server/movie...,
Sandro Santilli <=