[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog server/button_character_instanc...
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] gnash ChangeLog server/button_character_instanc... |
Date: |
Thu, 13 Sep 2007 16:26:14 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 07/09/13 16:26:13
Modified files:
. : ChangeLog
server : button_character_instance.cpp
button_character_instance.h movie_root.h
sprite_instance.cpp
Log message:
* server/sprite_instance.cpp (restart): don't call construct
again, to
avoid re-registering with the global instance list.
* server/movie_root.h (addLiveChar): assert the character being
registered is not already in the list
* server/button_character_instance.{cpp,h}: remove dead code
(restart_characters); (construct): don't call restart right
after construct.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.4306&r2=1.4307
http://cvs.savannah.gnu.org/viewcvs/gnash/server/button_character_instance.cpp?cvsroot=gnash&r1=1.56&r2=1.57
http://cvs.savannah.gnu.org/viewcvs/gnash/server/button_character_instance.h?cvsroot=gnash&r1=1.24&r2=1.25
http://cvs.savannah.gnu.org/viewcvs/gnash/server/movie_root.h?cvsroot=gnash&r1=1.75&r2=1.76
http://cvs.savannah.gnu.org/viewcvs/gnash/server/sprite_instance.cpp?cvsroot=gnash&r1=1.340&r2=1.341
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.4306
retrieving revision 1.4307
diff -u -b -r1.4306 -r1.4307
--- ChangeLog 13 Sep 2007 15:56:24 -0000 1.4306
+++ ChangeLog 13 Sep 2007 16:26:13 -0000 1.4307
@@ -1,5 +1,15 @@
2007-09-13 Sandro Santilli <address@hidden>
+ * server/sprite_instance.cpp (restart): don't call construct again, to
+ avoid re-registering with the global instance list.
+ * server/movie_root.h (addLiveChar): assert the character being
+ registered is not already in the list
+ * server/button_character_instance.{cpp,h}: remove dead code
+ (restart_characters); (construct): don't call restart right
+ after construct.
+
+2007-09-13 Sandro Santilli <address@hidden>
+
* server/movie_root.cpp: cleanup debugging of ever growing list
2007-09-13 Sandro Santilli <address@hidden>
Index: server/button_character_instance.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/button_character_instance.cpp,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -b -r1.56 -r1.57
--- server/button_character_instance.cpp 13 Sep 2007 15:41:49 -0000
1.56
+++ server/button_character_instance.cpp 13 Sep 2007 16:26:13 -0000
1.57
@@ -593,9 +593,6 @@
//IDLE_TO_OVER_DOWN = 1 << 7,
//OVER_DOWN_TO_IDLE = 1 << 8,
- // restart the characters of the new state.
- //restart_characters(c); --> <Udo> done by set_current_state() now
-
// From: "ActionScript - The Definiteve Guide" by Colin Moock
// (chapter 10: Events and Event Handlers)
@@ -717,40 +714,6 @@
}
-void
-button_character_instance::restart_characters(int condition)
-{
- // Restart our relevant characters
- for (size_t i = 0; i < m_def->m_button_records.size(); i++)
- {
- bool restart = false;
- button_record* rec = &m_def->m_button_records[i];
-
- switch (m_mouse_state)
- {
- case OVER:
- {
- if ((rec->m_over) && (condition &
button_action::IDLE_TO_OVER_UP))
- {
- restart = true;
- }
- break;
- }
- // @@ Hm, are there other cases where we restart stuff?
- default:
- {
- break;
- }
- }
-
- if (restart == true)
- {
- assert(m_record_character.size() > i);
- m_record_character[i]->restart();
- }
- }
-}
-
//
// ActionScript overrides
//
@@ -885,8 +848,6 @@
ch->set_name(instance_name.c_str());
}
- ch->restart();
-
}
// does a CONSTRUCT event even exist ?
Index: server/button_character_instance.h
===================================================================
RCS file: /sources/gnash/gnash/server/button_character_instance.h,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -b -r1.24 -r1.25
--- server/button_character_instance.h 13 Sep 2007 15:41:49 -0000 1.24
+++ server/button_character_instance.h 13 Sep 2007 16:26:13 -0000 1.25
@@ -21,7 +21,7 @@
// SWF buttons. Mouse-sensitive update/display, actions, etc.
-/* $Id: button_character_instance.h,v 1.24 2007/09/13 15:41:49 strk Exp $ */
+/* $Id: button_character_instance.h,v 1.25 2007/09/13 16:26:13 strk Exp $ */
#ifndef GNASH_BUTTON_CHARACTER_INSTANCE_H
#define GNASH_BUTTON_CHARACTER_INSTANCE_H
@@ -130,8 +130,6 @@
virtual void on_button_event(const event_id& event);
- void restart_characters(int condition);
-
//
// ActionScript overrides
//
Index: server/movie_root.h
===================================================================
RCS file: /sources/gnash/gnash/server/movie_root.h,v
retrieving revision 1.75
retrieving revision 1.76
diff -u -b -r1.75 -r1.76
--- server/movie_root.h 13 Sep 2007 14:39:21 -0000 1.75
+++ server/movie_root.h 13 Sep 2007 16:26:13 -0000 1.76
@@ -15,7 +15,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: movie_root.h,v 1.75 2007/09/13 14:39:21 strk Exp $ */
+/* $Id: movie_root.h,v 1.76 2007/09/13 16:26:13 strk Exp $ */
/// \page events_handling Handling of user events
///
@@ -574,6 +574,8 @@
///
void addLiveChar(boost::intrusive_ptr<character> ch)
{
+ // Don't register the object in the list twice
+ assert(std::find(_liveChars.begin(), _liveChars.end(), ch) ==
_liveChars.end());
_liveChars.push_front(ch);
}
Index: server/sprite_instance.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/sprite_instance.cpp,v
retrieving revision 1.340
retrieving revision 1.341
diff -u -b -r1.340 -r1.341
--- server/sprite_instance.cpp 13 Sep 2007 13:57:49 -0000 1.340
+++ server/sprite_instance.cpp 13 Sep 2007 16:26:13 -0000 1.341
@@ -3037,36 +3037,13 @@
void sprite_instance::restart()
{
- //GNASH_REPORT_FUNCTION;
-
- m_current_frame = 0;
-
- m_has_looped = false;
- m_play_state = PLAY;
-
// Stop all sounds
sound_handler* sh = get_sound_handler();
if (sh != NULL) sh->stop_all_sounds();
- // We're about to reset the displayList,
- // so take note of the current bounds
- // for the renderer to know what to
- // redraw.
- set_invalidated();
-
- // Clear current display list and
- // its backup
- m_display_list.clear();
-
- // TODO: wipe out all members !!
- clearProperties();
-
- // Construct the sprite again
- construct();
-
- // re-assign standard properties
- attachMovieClipProperties(*this);
+ restoreDisplayList(0); // seems OK to me.
+ m_play_state = PLAY;
}
character*