[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog backend/sound_handler.h backend...
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] gnash ChangeLog backend/sound_handler.h backend... |
Date: |
Thu, 24 May 2007 08:48:04 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 07/05/24 08:48:04
Modified files:
. : ChangeLog
backend : sound_handler.h sound_handler_gst.cpp
sound_handler_gst.h sound_handler_sdl.cpp
sound_handler_sdl.h
server : execute_tag.h sprite_instance.cpp
sprite_instance.h
server/parser : sound_definition.cpp sound_definition.h
server/swf : DisplayListTag.h PlaceObject2Tag.cpp
PlaceObject2Tag.h RemoveObjectTag.cpp
RemoveObjectTag.h tag_loaders.cpp
testsuite : sound_handler_test.cpp sound_handler_test.h
testsuite/misc-ming.all: loop_test7.c
Log message:
* backend/sound_handler.h, backend/sound_handler_gst.cpp,
backend/sound_handler_gst.h, backend/sound_handler_sdl.cpp,
backend/sound_handler_sdl.h, server/execute_tag.h,
server/sprite_instance.cpp, server/sprite_instance.h,
server/parser/sound_definition.cpp,
server/parser/sound_definition.h,
server/swf/DisplayListTag.h, server/swf/PlaceObject2Tag.cpp,
server/swf/PlaceObject2Tag.h, server/swf/RemoveObjectTag.cpp,
server/swf/RemoveObjectTag.h, server/swf/tag_loaders.cpp,
testsuite/sound_handler_test.cpp,
testsuite/sound_handler_test.h:
Const-corrected execute_tag::execute and execute_state, and
cascading changes
* testsuite/misc-ming.all/loop_test7.c: fix wrong expected
failures.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.3329&r2=1.3330
http://cvs.savannah.gnu.org/viewcvs/gnash/backend/sound_handler.h?cvsroot=gnash&r1=1.8&r2=1.9
http://cvs.savannah.gnu.org/viewcvs/gnash/backend/sound_handler_gst.cpp?cvsroot=gnash&r1=1.44&r2=1.45
http://cvs.savannah.gnu.org/viewcvs/gnash/backend/sound_handler_gst.h?cvsroot=gnash&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/gnash/backend/sound_handler_sdl.cpp?cvsroot=gnash&r1=1.64&r2=1.65
http://cvs.savannah.gnu.org/viewcvs/gnash/backend/sound_handler_sdl.h?cvsroot=gnash&r1=1.19&r2=1.20
http://cvs.savannah.gnu.org/viewcvs/gnash/server/execute_tag.h?cvsroot=gnash&r1=1.13&r2=1.14
http://cvs.savannah.gnu.org/viewcvs/gnash/server/sprite_instance.cpp?cvsroot=gnash&r1=1.275&r2=1.276
http://cvs.savannah.gnu.org/viewcvs/gnash/server/sprite_instance.h?cvsroot=gnash&r1=1.111&r2=1.112
http://cvs.savannah.gnu.org/viewcvs/gnash/server/parser/sound_definition.cpp?cvsroot=gnash&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/gnash/server/parser/sound_definition.h?cvsroot=gnash&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/gnash/server/swf/DisplayListTag.h?cvsroot=gnash&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/gnash/server/swf/PlaceObject2Tag.cpp?cvsroot=gnash&r1=1.11&r2=1.12
http://cvs.savannah.gnu.org/viewcvs/gnash/server/swf/PlaceObject2Tag.h?cvsroot=gnash&r1=1.7&r2=1.8
http://cvs.savannah.gnu.org/viewcvs/gnash/server/swf/RemoveObjectTag.cpp?cvsroot=gnash&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/gnash/server/swf/RemoveObjectTag.h?cvsroot=gnash&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/gnash/server/swf/tag_loaders.cpp?cvsroot=gnash&r1=1.108&r2=1.109
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/sound_handler_test.cpp?cvsroot=gnash&r1=1.7&r2=1.8
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/sound_handler_test.h?cvsroot=gnash&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/loop_test7.c?cvsroot=gnash&r1=1.1&r2=1.2
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.3329
retrieving revision 1.3330
diff -u -b -r1.3329 -r1.3330
--- ChangeLog 24 May 2007 07:31:44 -0000 1.3329
+++ ChangeLog 24 May 2007 08:48:01 -0000 1.3330
@@ -1,5 +1,21 @@
2007-05-24 Sandro Santilli <address@hidden>
+ * backend/sound_handler.h, backend/sound_handler_gst.cpp,
+ backend/sound_handler_gst.h, backend/sound_handler_sdl.cpp,
+ backend/sound_handler_sdl.h, server/execute_tag.h,
+ server/sprite_instance.cpp, server/sprite_instance.h,
+ server/parser/sound_definition.cpp,
+ server/parser/sound_definition.h,
+ server/swf/DisplayListTag.h, server/swf/PlaceObject2Tag.cpp,
+ server/swf/PlaceObject2Tag.h, server/swf/RemoveObjectTag.cpp,
+ server/swf/RemoveObjectTag.h, server/swf/tag_loaders.cpp,
+ testsuite/sound_handler_test.cpp, testsuite/sound_handler_test.h:
+ Const-corrected execute_tag::execute and execute_state, and
+ cascading changes
+ * testsuite/misc-ming.all/loop_test7.c: fix wrong expected failures.
+
+2007-05-24 Sandro Santilli <address@hidden>
+
* testsuite/misc-ming.all/: Makefile.am,
loop_test6.c, loop_test7.c:
Add a clone of "Jumping backward to the end of a character's
Index: backend/sound_handler.h
===================================================================
RCS file: /sources/gnash/gnash/backend/sound_handler.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- backend/sound_handler.h 18 May 2007 13:17:51 -0000 1.8
+++ backend/sound_handler.h 24 May 2007 08:48:02 -0000 1.9
@@ -17,7 +17,7 @@
//
//
-/* $Id: sound_handler.h,v 1.8 2007/05/18 13:17:51 martinwguy Exp $ */
+/* $Id: sound_handler.h,v 1.9 2007/05/24 08:48:02 strk Exp $ */
/// \page sound_handler_intro Sound handler introduction
///
@@ -99,7 +99,7 @@
// gnash calls this when it wants you to play the defined sound.
// loop_count == 0 means play the sound once (1 means play it twice,
etc)
- virtual void play_sound(int sound_handle, int loop_count, int
secondOffset, long start, std::vector<sound_envelope>* envelopes) = 0;
+ virtual void play_sound(int sound_handle, int loop_count, int
secondOffset, long start, const std::vector<sound_envelope>* envelopes) = 0;
// stops all sounds currently playing in a SWF file without
stopping the playhead.
// Sounds set to stream will resume playing as the playhead moves
over the frames they are in.
Index: backend/sound_handler_gst.cpp
===================================================================
RCS file: /sources/gnash/gnash/backend/sound_handler_gst.cpp,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -b -r1.44 -r1.45
--- backend/sound_handler_gst.cpp 18 May 2007 13:17:51 -0000 1.44
+++ backend/sound_handler_gst.cpp 24 May 2007 08:48:02 -0000 1.45
@@ -20,7 +20,7 @@
// Based on sound_handler_sdl.cpp by Thatcher Ulrich http://tulrich.com 2003
// which has been donated to the Public Domain.
-/* $Id: sound_handler_gst.cpp,v 1.44 2007/05/18 13:17:51 martinwguy Exp $ */
+/* $Id: sound_handler_gst.cpp,v 1.45 2007/05/24 08:48:02 strk Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -235,7 +235,7 @@
}
-void GST_sound_handler::play_sound(int sound_handle, int loop_count, int
/*offset*/, long start_position, std::vector<sound_envelope>* /*envelopes*/)
+void GST_sound_handler::play_sound(int sound_handle, int loop_count, int
/*offset*/, long start_position, const std::vector<sound_envelope>*
/*envelopes*/)
// Play the index'd sample.
{
Index: backend/sound_handler_gst.h
===================================================================
RCS file: /sources/gnash/gnash/backend/sound_handler_gst.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- backend/sound_handler_gst.h 18 May 2007 13:17:51 -0000 1.4
+++ backend/sound_handler_gst.h 24 May 2007 08:48:02 -0000 1.5
@@ -121,7 +121,7 @@
/// Play the index'd sample.
virtual void play_sound(int sound_handle, int loop_count, int offset,
- long start_position,
std::vector<sound_envelope>* envelopes);
+ long start_position, const
std::vector<sound_envelope>* envelopes);
/// Stop the index'd sample.
virtual void stop_sound(int sound_handle);
Index: backend/sound_handler_sdl.cpp
===================================================================
RCS file: /sources/gnash/gnash/backend/sound_handler_sdl.cpp,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -b -r1.64 -r1.65
--- backend/sound_handler_sdl.cpp 23 May 2007 11:38:22 -0000 1.64
+++ backend/sound_handler_sdl.cpp 24 May 2007 08:48:02 -0000 1.65
@@ -18,7 +18,7 @@
// Based on sound_handler_sdl.cpp by Thatcher Ulrich http://tulrich.com 2003
// which has been donated to the Public Domain.
-// $Id: sound_handler_sdl.cpp,v 1.64 2007/05/23 11:38:22 tgc Exp $
+// $Id: sound_handler_sdl.cpp,v 1.65 2007/05/24 08:48:02 strk Exp $
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -228,7 +228,7 @@
}
-void SDL_sound_handler::play_sound(int sound_handle, int loop_count, int
offset, long start_position, std::vector<sound_envelope>* envelopes)
+void SDL_sound_handler::play_sound(int sound_handle, int loop_count, int
offset, long start_position, const std::vector<sound_envelope>* envelopes)
// Play the index'd sample.
{
mutex::scoped_lock lock(_mutex);
Index: backend/sound_handler_sdl.h
===================================================================
RCS file: /sources/gnash/gnash/backend/sound_handler_sdl.h,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -b -r1.19 -r1.20
--- backend/sound_handler_sdl.h 18 May 2007 13:17:51 -0000 1.19
+++ backend/sound_handler_sdl.h 24 May 2007 08:48:02 -0000 1.20
@@ -14,7 +14,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: sound_handler_sdl.h,v 1.19 2007/05/18 13:17:51 martinwguy Exp $
+// $Id: sound_handler_sdl.h,v 1.20 2007/05/24 08:48:02 strk Exp $
#ifndef SOUND_HANDLER_SDL_H
#define SOUND_HANDLER_SDL_H
@@ -181,7 +181,7 @@
/// Play the index'd sample.
virtual void play_sound(int sound_handle, int loop_count, int offset,
- long start_position,
std::vector<sound_envelope>* envelopes);
+ long start_position, const
std::vector<sound_envelope>* envelopes);
/// Stop the index'd sample.
virtual void stop_sound(int sound_handle);
Index: server/execute_tag.h
===================================================================
RCS file: /sources/gnash/gnash/server/execute_tag.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -b -r1.13 -r1.14
--- server/execute_tag.h 23 May 2007 20:06:19 -0000 1.13
+++ server/execute_tag.h 24 May 2007 08:48:02 -0000 1.14
@@ -48,7 +48,7 @@
}
/// Execute this tag, whatever it is.
- virtual void execute(sprite_instance* /*m*/)
+ virtual void execute(sprite_instance* /*m*/) const
{
}
@@ -56,12 +56,12 @@
//
/// State tags include all tags except action tags.
///
- virtual void execute_state(sprite_instance* /*m*/)
+ virtual void execute_state(sprite_instance* /*m*/) const
{
}
/// Execute this tag but only if it is an action tag
- void execute_action(sprite_instance* m)
+ void execute_action(sprite_instance* m) const
{
if ( is_action_tag() ) execute(m);
}
Index: server/sprite_instance.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/sprite_instance.cpp,v
retrieving revision 1.275
retrieving revision 1.276
diff -u -b -r1.275 -r1.276
--- server/sprite_instance.cpp 23 May 2007 20:06:20 -0000 1.275
+++ server/sprite_instance.cpp 24 May 2007 08:48:03 -0000 1.276
@@ -98,7 +98,7 @@
// and a final call to .clear()
while ( ! action_list.empty() )
{
- action_buffer* ab = action_list.front();
+ const action_buffer* ab = action_list.front();
action_list.pop_front();
execute_action(*ab);
@@ -2151,7 +2151,7 @@
for(ActionList::iterator it=actions.begin(), itEnd=actions.end();
it != itEnd; ++it)
{
- action_buffer* buf = *it;
+ const action_buffer* buf = *it;
root.pushAction(*buf,
boost::intrusive_ptr<sprite_instance>(this));
}
}
@@ -2459,7 +2459,7 @@
}
void
-sprite_instance::execute_action(action_buffer& ab)
+sprite_instance::execute_action(const action_buffer& ab)
{
as_environment& env = m_as_environment; // just type less
Index: server/sprite_instance.h
===================================================================
RCS file: /sources/gnash/gnash/server/sprite_instance.h,v
retrieving revision 1.111
retrieving revision 1.112
diff -u -b -r1.111 -r1.112
--- server/sprite_instance.h 23 May 2007 20:06:20 -0000 1.111
+++ server/sprite_instance.h 24 May 2007 08:48:03 -0000 1.112
@@ -63,7 +63,7 @@
public:
- typedef std::list<action_buffer*> ActionList;
+ typedef std::list<const action_buffer*> ActionList;
// definition must match movie_definition::PlayList
typedef std::vector<execute_tag*> PlayList;
@@ -469,7 +469,7 @@
/// Add the given action buffer to the list of action
/// buffers to be processed at the end of the next
/// frame advance.
- void add_action_buffer(action_buffer* a)
+ void add_action_buffer(const action_buffer* a)
{
m_action_list.push_back(a);
}
@@ -822,7 +822,7 @@
void queueActions(ActionList& action_list);
/// Execute a single action buffer (DOACTION block)
- void execute_action(action_buffer& ab);
+ void execute_action(const action_buffer& ab);
/// Execute the actions in the action list
//
Index: server/parser/sound_definition.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/parser/sound_definition.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- server/parser/sound_definition.cpp 13 May 2007 12:20:36 -0000 1.3
+++ server/parser/sound_definition.cpp 24 May 2007 08:48:03 -0000 1.4
@@ -30,7 +30,6 @@
//
// SWF Tag StartSound (15)
//
-
void
start_sound_tag::read(stream* in, int /* tag_type */, movie_definition* m,
const sound_sample* sam)
@@ -76,7 +75,7 @@
void
-start_sound_tag::execute_state(sprite_instance* /* m */)
+start_sound_tag::execute_state(sprite_instance* /* m */) const
{
// Make static ?
sound_handler* handler = get_sound_handler();
@@ -112,7 +111,7 @@
void
-start_stream_sound_tag::execute_state(sprite_instance* m)
+start_stream_sound_tag::execute_state(sprite_instance* m) const
{
// Make static ?
sound_handler* handler = get_sound_handler();
Index: server/parser/sound_definition.h
===================================================================
RCS file: /sources/gnash/gnash/server/parser/sound_definition.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- server/parser/sound_definition.h 27 Feb 2007 09:10:20 -0000 1.1
+++ server/parser/sound_definition.h 24 May 2007 08:48:03 -0000 1.2
@@ -48,6 +48,9 @@
};
/// SWF Tag StartSound (15)
+//
+/// TODO: move in it's own StartSoundTag files...
+///
class start_sound_tag : public execute_tag
{
public:
@@ -77,11 +80,11 @@
movie_definition* m, const sound_sample* sam);
/// StartSound is a "state" tag.
- void execute_state(sprite_instance* m);
+ void execute_state(sprite_instance* m) const;
/// This implementation of 'execute' should likely
/// be the default one.
- void execute(sprite_instance* m)
+ void execute(sprite_instance* m) const
{
execute_state(m);
}
@@ -91,6 +94,9 @@
};
/// SWF Tag SoundStreamBlock (19)
+//
+/// TODO: move in it's own SoundStreamBlockTag files...
+///
class start_stream_sound_tag : public execute_tag
{
public:
@@ -115,9 +121,9 @@
void read(movie_definition* m, int handler_id, long start);
/// StartStreamSound is a "state" tag.
- void execute_state(sprite_instance* m);
+ void execute_state(sprite_instance* m) const;
- void execute(sprite_instance* m)
+ void execute(sprite_instance* m) const
{
execute_state(m);
}
Index: server/swf/DisplayListTag.h
===================================================================
RCS file: /sources/gnash/gnash/server/swf/DisplayListTag.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- server/swf/DisplayListTag.h 23 May 2007 21:55:05 -0000 1.2
+++ server/swf/DisplayListTag.h 24 May 2007 08:48:03 -0000 1.3
@@ -19,7 +19,7 @@
//
//
-/* $Id: DisplayListTag.h,v 1.2 2007/05/23 21:55:05 strk Exp $ */
+/* $Id: DisplayListTag.h,v 1.3 2007/05/24 08:48:03 strk Exp $ */
#ifndef GNASH_SWF_DISPLAYLISTTAG_H
#define GNASH_SWF_DISPLAYLISTTAG_H
@@ -63,9 +63,9 @@
virtual ~DisplayListTag() {}
- virtual void execute(sprite_instance* m)=0;
+ virtual void execute(sprite_instance* m) const=0;
- void execute_state(sprite_instance* m)
+ void execute_state(sprite_instance* m) const
{
execute(m);
}
Index: server/swf/PlaceObject2Tag.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/swf/PlaceObject2Tag.cpp,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- server/swf/PlaceObject2Tag.cpp 23 May 2007 21:55:05 -0000 1.11
+++ server/swf/PlaceObject2Tag.cpp 24 May 2007 08:48:03 -0000 1.12
@@ -17,7 +17,7 @@
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
//
-/* $Id: PlaceObject2Tag.cpp,v 1.11 2007/05/23 21:55:05 strk Exp $ */
+/* $Id: PlaceObject2Tag.cpp,v 1.12 2007/05/24 08:48:03 strk Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -310,7 +310,7 @@
/// Place/move/whatever our object in the given movie.
void
-PlaceObject2Tag::execute(sprite_instance* m)
+PlaceObject2Tag::execute(sprite_instance* m) const
{
switch (m_place_type) {
Index: server/swf/PlaceObject2Tag.h
===================================================================
RCS file: /sources/gnash/gnash/server/swf/PlaceObject2Tag.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- server/swf/PlaceObject2Tag.h 23 May 2007 21:55:05 -0000 1.7
+++ server/swf/PlaceObject2Tag.h 24 May 2007 08:48:03 -0000 1.8
@@ -18,7 +18,7 @@
//
//
-/* $Id: PlaceObject2Tag.h,v 1.7 2007/05/23 21:55:05 strk Exp $ */
+/* $Id: PlaceObject2Tag.h,v 1.8 2007/05/24 08:48:03 strk Exp $ */
#ifndef GNASH_SWF_PLACEOBJECT2TAG_H
#define GNASH_SWF_PLACEOBJECT2TAG_H
@@ -85,7 +85,7 @@
void read(stream* in, tag_type tag, int movie_version);
/// Place/move/whatever our object in the given movie.
- void execute(sprite_instance* m);
+ void execute(sprite_instance* m) const;
/// Return true if this tag places a character
bool isPlace() const { return m_place_type == PLACE; }
Index: server/swf/RemoveObjectTag.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/swf/RemoveObjectTag.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- server/swf/RemoveObjectTag.cpp 23 May 2007 21:55:06 -0000 1.2
+++ server/swf/RemoveObjectTag.cpp 24 May 2007 08:48:03 -0000 1.3
@@ -17,7 +17,7 @@
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
//
-/* $Id: RemoveObjectTag.cpp,v 1.2 2007/05/23 21:55:06 strk Exp $ */
+/* $Id: RemoveObjectTag.cpp,v 1.3 2007/05/24 08:48:03 strk Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -49,7 +49,7 @@
}
void
-RemoveObjectTag::execute(sprite_instance* m)
+RemoveObjectTag::execute(sprite_instance* m) const
{
m->remove_display_object(m_depth, m_id);
}
Index: server/swf/RemoveObjectTag.h
===================================================================
RCS file: /sources/gnash/gnash/server/swf/RemoveObjectTag.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- server/swf/RemoveObjectTag.h 23 May 2007 21:55:06 -0000 1.2
+++ server/swf/RemoveObjectTag.h 24 May 2007 08:48:03 -0000 1.3
@@ -19,7 +19,7 @@
//
//
-/* $Id: RemoveObjectTag.h,v 1.2 2007/05/23 21:55:06 strk Exp $ */
+/* $Id: RemoveObjectTag.h,v 1.3 2007/05/24 08:48:03 strk Exp $ */
#ifndef GNASH_SWF_REMOVEOBJECTTAG_H
#define GNASH_SWF_REMOVEOBJECTTAG_H
@@ -62,7 +62,7 @@
void read(stream* in, tag_type tag);
/// Remove object at specified depth from sprite_instance DisplayList.
- void execute(sprite_instance* m);
+ void execute(sprite_instance* m) const;
// See dox in execute_tag.h
bool isRemove() const { return true; }
Index: server/swf/tag_loaders.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/swf/tag_loaders.cpp,v
retrieving revision 1.108
retrieving revision 1.109
diff -u -b -r1.108 -r1.109
--- server/swf/tag_loaders.cpp 23 May 2007 21:55:06 -0000 1.108
+++ server/swf/tag_loaders.cpp 24 May 2007 08:48:03 -0000 1.109
@@ -17,7 +17,7 @@
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
//
-/* $Id: tag_loaders.cpp,v 1.108 2007/05/23 21:55:06 strk Exp $ */
+/* $Id: tag_loaders.cpp,v 1.109 2007/05/24 08:48:03 strk Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -92,6 +92,9 @@
/// Thin wrapper around action_buffer.
+//
+/// TODO: Move in its own DoActionTag files
+///
class do_action : public execute_tag
{
private:
@@ -102,15 +105,11 @@
m_buf.read(in);
}
- virtual void execute(sprite_instance* m)
+ virtual void execute(sprite_instance* m) const
{
m->add_action_buffer(&m_buf);
}
- // Don't override because actions should not be replayed when
- // seeking the movie.
- //void execute_state(movie* m) {}
-
// Tell the caller that we are an action tag.
virtual bool is_action_tag() const
{
@@ -171,20 +170,24 @@
}
/// SWF Tag SetBackgroundColor (9)
+//
+/// TODO: Move in it's own SetBackgroundColorTag files
+///
class set_background_color : public execute_tag
{
private:
rgba m_color;
public:
- void execute(sprite_instance* m)
+ void execute(sprite_instance* m) const
{
float current_alpha = m->get_background_alpha();
- m_color.m_a = frnd(current_alpha * 255.0f);
- m->set_background_color(m_color);
+ rgba newcolor = m_color; // to avoid making m_color mutable
+ newcolor.m_a = frnd(current_alpha * 255.0f);
+ m->set_background_color(newcolor);
}
- void execute_state(sprite_instance* m)
+ void execute_state(sprite_instance* m) const
{
execute(m);
}
Index: testsuite/sound_handler_test.cpp
===================================================================
RCS file: /sources/gnash/gnash/testsuite/sound_handler_test.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- testsuite/sound_handler_test.cpp 18 May 2007 13:17:51 -0000 1.7
+++ testsuite/sound_handler_test.cpp 24 May 2007 08:48:03 -0000 1.8
@@ -15,7 +15,7 @@
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
//
-// $Id: sound_handler_test.cpp,v 1.7 2007/05/18 13:17:51 martinwguy Exp $
+// $Id: sound_handler_test.cpp,v 1.8 2007/05/24 08:48:03 strk Exp $
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -125,7 +125,7 @@
}
-void TEST_sound_handler::play_sound(int sound_handle, int loop_count, int
offset, long start_position, std::vector<sound_envelope>* envelopes)
+void TEST_sound_handler::play_sound(int sound_handle, int loop_count, int
offset, long start_position, const std::vector<sound_envelope>* envelopes)
// Play the index'd sample.
{
mutex::scoped_lock lock(_mutex);
Index: testsuite/sound_handler_test.h
===================================================================
RCS file: /sources/gnash/gnash/testsuite/sound_handler_test.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- testsuite/sound_handler_test.h 18 May 2007 13:17:51 -0000 1.4
+++ testsuite/sound_handler_test.h 24 May 2007 08:48:03 -0000 1.5
@@ -14,7 +14,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: sound_handler_test.h,v 1.4 2007/05/18 13:17:51 martinwguy Exp $
+// $Id: sound_handler_test.h,v 1.5 2007/05/24 08:48:03 strk Exp $
#ifndef SOUND_HANDLER_TEST_H
#define SOUND_HANDLER_TEST_H
@@ -49,7 +49,7 @@
/// Sound envelopes for the current sound, which determine the volume
level
/// from a given position. Only used with sound events.
- std::vector<gnash::sound_handler::sound_envelope>* envelopes;
+ const std::vector<gnash::sound_handler::sound_envelope>* envelopes;
/// Index of current envelope.
uint32_t current_env;
@@ -140,7 +140,7 @@
/// Play the index'd sample.
virtual void play_sound(int sound_handle, int loop_count, int offset,
- long start_position,
std::vector<sound_envelope>* envelopes);
+ long start_position, const
std::vector<sound_envelope>* envelopes);
/// Stop the index'd sample.
virtual void stop_sound(int sound_handle);
Index: testsuite/misc-ming.all/loop_test7.c
===================================================================
RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/loop_test7.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- testsuite/misc-ming.all/loop_test7.c 24 May 2007 07:31:45 -0000
1.1
+++ testsuite/misc-ming.all/loop_test7.c 24 May 2007 08:48:04 -0000
1.2
@@ -111,7 +111,7 @@
), SWFACTION_UNLOAD);
check_equals(mo, "typeof(movieClip1)", "'movieclip'");
- xcheck_equals(mo, "_root.mc1Constructed", "1");
+ check_equals(mo, "_root.mc1Constructed", "1");
SWFMovie_nextFrame(mo);
@@ -130,8 +130,8 @@
SWFMovie_add(mo, (SWFBlock)newSWFAction( "gotoAndStop(4);"));
xcheck_equals(mo, "typeof(movieClip1)", "'movieclip'");
- // Gnash calls onConstruct again !!
- xcheck_equals(mo, "_root.mc1Constructed", "2");
+ // onConstruct is called twice
+ check_equals(mo, "_root.mc1Constructed", "2");
// this is due to action execution order, it's called twice, but
// the second time it's called *after* the end of *this* DOACTION block ..