[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog server/parser/movie_def_impl.h ...
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] gnash ChangeLog server/parser/movie_def_impl.h ... |
Date: |
Mon, 04 Dec 2006 17:05:39 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 06/12/04 17:05:39
Modified files:
. : ChangeLog
server/parser : movie_def_impl.h movie_definition.h
sprite_definition.h
Log message:
* server/parser/: movie_def_impl.h, movie_definition.h,
sprite_definition.h: provided a default implementation
for most movie_definition methods, to make deriving
from it easier. Removed some unneeded overload from
sprite_definition (the new default implementations are
good enough). Cleaned up and improved doxygen comments.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.1850&r2=1.1851
http://cvs.savannah.gnu.org/viewcvs/gnash/server/parser/movie_def_impl.h?cvsroot=gnash&r1=1.25&r2=1.26
http://cvs.savannah.gnu.org/viewcvs/gnash/server/parser/movie_definition.h?cvsroot=gnash&r1=1.12&r2=1.13
http://cvs.savannah.gnu.org/viewcvs/gnash/server/parser/sprite_definition.h?cvsroot=gnash&r1=1.11&r2=1.12
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.1850
retrieving revision 1.1851
diff -u -b -r1.1850 -r1.1851
--- ChangeLog 3 Dec 2006 21:43:11 -0000 1.1850
+++ ChangeLog 4 Dec 2006 17:05:38 -0000 1.1851
@@ -1,3 +1,12 @@
+2006-12-04 Sandro Santilli <address@hidden>
+
+ * server/parser/: movie_def_impl.h, movie_definition.h,
+ sprite_definition.h: provided a default implementation
+ for most movie_definition methods, to make deriving
+ from it easier. Removed some unneeded overload from
+ sprite_definition (the new default implementations are
+ good enough). Cleaned up and improved doxygen comments.
+
2006-12-03 Sandro Santilli <address@hidden>
* testsuite/libgeometry/Range2dTest.cpp: add tests for
Index: server/parser/movie_def_impl.h
===================================================================
RCS file: /sources/gnash/gnash/server/parser/movie_def_impl.h,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -b -r1.25 -r1.26
--- server/parser/movie_def_impl.h 30 Nov 2006 13:32:45 -0000 1.25
+++ server/parser/movie_def_impl.h 4 Dec 2006 17:05:38 -0000 1.26
@@ -380,20 +380,18 @@
return m_bitmap_list[i].get();
}
- /// Expose one of our resources under the given symbol,
- /// for export. Other movies can import it.
+ // See docs in movie_definition.h
virtual void export_resource(const tu_string& symbol,
resource* res);
/// Get the named exported resource, if we expose it.
- /// Otherwise return NULL.
+ //
+ /// @return NULL if the label doesn't correspond to an exported
+ /// resource, or if a timeout occurs while scanning the movie.
+ ///
virtual boost::intrusive_ptr<resource> get_exported_resource(const
tu_string& symbol);
- /// Adds an entry to a table of resources that need to
- /// be imported from other movies. Client code must
- /// call resolve_import() later, when the source movie
- /// has been loaded, so that the actual resource can be
- /// used.
+ // see docs in movie_definition.h
virtual void add_import(const char* source_url, int id, const char*
symbol)
{
assert(in_import_table(id) == false);
@@ -409,7 +407,7 @@
/// import symbols from.
virtual void visit_imported_movies(import_visitor* visitor);
- /// Grabs the stuff we want from the source movie.
+ // see docs in movie_definition.h
virtual void resolve_import(const char* source_url,
movie_definition* source_movie);
@@ -422,19 +420,32 @@
///
character_def* get_character_def(int character_id);
- /// Returns 0-based frame #
+ // See dox in movie_definition
bool get_labeled_frame(const char* label, size_t* frame_number)
{
return m_named_frames.get(label, frame_number);
}
void add_font(int font_id, font* f);
+
font* get_font(int font_id);
+
+ // See dox in movie_definition.h
bitmap_character_def* get_bitmap_character_def(int character_id);
+
+ // See dox in movie_definition.h
void add_bitmap_character_def(int character_id,
bitmap_character_def* ch);
+
+ // See dox in movie_definition.h
sound_sample* get_sound_sample(int character_id);
+
+ // See dox in movie_definition.h
virtual void add_sound_sample(int character_id, sound_sample* sam);
+
+ // See dox in movie_definition.h
virtual void set_loading_sound_stream_id(int id) {
m_loading_sound_stream = id; }
+
+ // See dox in movie_definition.h
int get_loading_sound_stream_id() { return
m_loading_sound_stream; }
/// Add an execute_tag to this movie_definition's playlist
@@ -455,9 +466,7 @@
m_init_action_list[_frames_loaded].push_back(e);
}
- /// Labels the frame currently being loaded with the
- /// given name. A copy of the name string is made and
- /// kept in this object.
+ // See dox in movie_definition.h
void add_frame_name(const char* name)
{
assert(_frames_loaded < m_frame_count);
@@ -478,11 +487,7 @@
m_jpeg_in = j_in;
}
- /// Get the jpeg input loader, to load a DefineBits
- /// image (one without table info).
- //
- /// NOTE: ownership is NOT transferred
- ///
+ // See dox in movie_definition.h
jpeg::input* get_jpeg_loader()
{
return m_jpeg_in.get();
Index: server/parser/movie_definition.h
===================================================================
RCS file: /sources/gnash/gnash/server/parser/movie_definition.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -b -r1.12 -r1.13
--- server/parser/movie_definition.h 1 Dec 2006 16:35:39 -0000 1.12
+++ server/parser/movie_definition.h 4 Dec 2006 17:05:38 -0000 1.13
@@ -49,9 +49,11 @@
#include "container.h"
#include "timers.h" // for Timer
#include "fontlib.h"
-//#include "font.h"
#include "jpeg.h"
#include "tu_file.h"
+#include "gnash.h" // For create_bitmaps_flag and create_font_shapes_flag.
+ // Would be much better to have those two enums defined
+ // inside movie_definition instead, btw...
#include <string>
#include <memory> // for auto_ptr
@@ -91,8 +93,8 @@
///
virtual sprite_instance* create_instance() = 0;
- virtual void output_cached_data(tu_file* out, const cache_options&
options) = 0;
- virtual void input_cached_data(tu_file* in) = 0;
+ virtual void output_cached_data(tu_file* /*out*/, const
cache_options& /*options*/) {}
+ virtual void input_cached_data(tu_file* /*in*/) {}
/// \brief
/// Causes this movie def to generate texture-mapped
@@ -104,7 +106,7 @@
/// output/input_cached_data() calls, so you can
/// preprocess this if you load cached data.
///
- virtual void generate_font_bitmaps() = 0;
+ virtual void generate_font_bitmaps() {}
//
// (optional) API to support gnash::create_movie_no_recurse().
@@ -122,12 +124,19 @@
virtual ~import_visitor() {}
virtual void visit(const char* imported_movie_filename) = 0;
};
- virtual void visit_imported_movies(import_visitor* visitor) = 0;
+ virtual void visit_imported_movies(import_visitor* /*visitor*/) {}
/// Call this to resolve an import of the given movie.
+ //
/// Replaces the dummy placeholder with the real
/// movie_definition* given.
- virtual void resolve_import(const char* name, movie_definition* def)
= 0;
+ ///
+ /// The default implementation is a no-op.
+ ///
+ /// @see add_import
+ ///
+ virtual void resolve_import(const char* /*name*/,
+ movie_definition* /*def*/) {}
//
// (optional) API to support host-driven creation of textures.
@@ -163,27 +172,79 @@
// my_bitmap_info_subclass* bi = (my_bitmap_info_subclass*)
my_def->get_bitmap_info(i);
// bi->set_internal_texture_reference(my_precomputed_textures[i]);
// }
- virtual int get_bitmap_info_count() const = 0;
- virtual bitmap_info* get_bitmap_info(int i) const = 0;
+ //
+ virtual int get_bitmap_info_count() const { return 0; }
+
+ virtual bitmap_info* get_bitmap_info(int /*i*/) const { return NULL;
}
// From movie_definition_sub
+ /// Return the list of execute tags for given frame number
+ //
+ /// @param frame_number
+ /// Frame number, 0-based (ie: first frame is 0)
+ ///
virtual const PlayList& get_playlist(size_t frame_number) = 0;
- virtual const PlayList* get_init_actions(size_t frame_number) = 0;
- virtual boost::intrusive_ptr<resource> get_exported_resource(const
tu_string& symbol) = 0;
+
+ /// Return the list of init actions for given frame number
+ //
+ ///
+ /// @param frame_number
+ /// Frame number, 0-based (ie: first frame is 0)
+ ///
+ /// @return NULL if the given frame has no init actions associated
+ /// (this is the default behaviour)
+ ///
+ virtual const PlayList* get_init_actions(size_t /*frame_number*/) {
+ return NULL;
+ }
+
+ /// Get the named exported resource, if we expose it.
+ //
+ /// @return NULL if the label doesn't correspond to an exported
+ /// resource. This is the default behaviour.
+ ///
+ virtual boost::intrusive_ptr<resource> get_exported_resource(const
tu_string& /*symbol*/)
+ {
+ return NULL;
+ }
/// \brief
/// Get a character from the dictionary.
- ///
+ //
/// Note that only top-level movies (those belonging to a single
/// SWF stream) have a characters dictionary, thus our
/// movie_def_impl. The other derived class, sprite_definition
/// will seek for characters in it's base movie_def_impl.
///
- virtual character_def* get_character_def(int id) = 0;
+ /// @return NULL if no character with the given ID is found
+ /// (this is the default)
+ ///
+ virtual character_def* get_character_def(int /*id*/)
+ {
+ return NULL;
+ }
- virtual bool get_labeled_frame(const char* label, size_t* frame_number)
= 0;
+ /// Get 0-based index of the frame with given label.
+ //
+ ///
+ /// The default implementation is to always return false, as
+ /// if NO frame with given label was found.
+ ///
+ /// @param label
+ /// Label of the frame we're looking for.
+ ///
+ /// @param frame_number
+ /// Where to write frame number to (if a match is found).
+ /// A 0-based index will be written there.
+ ///
+ /// @return true if a frame with that label was found, false otherwise
+ ///
+ virtual bool get_labeled_frame(const char* /*label*/, size_t*
/*frame_number*/)
+ {
+ return false;
+ }
//
// For use during creation.
@@ -192,50 +253,223 @@
/// Returns 1 based index. Ex: if 1 then 1st frame as been fully loaded
virtual size_t get_loading_frame() const = 0;
- virtual void add_character(int id, character_def* ch) = 0;
-
- virtual void add_font(int id, font* ch) = 0;
+ /// Add a character with given ID to the CharactersDictionary.
+ //
+ /// This method is here to be called by DEFINE tags loaders.
+ /// The default implementation does nothing.
+ ///
+ virtual void add_character(int /*id*/, character_def* /*ch*/)
+ {
+ }
- virtual font* get_font(int id) = 0;
+ /// Add a font character with given ID to the CharacterDictionary.
+ //
+ /// This method is here to be called by DEFINEFONT tags loaders.
+ /// The default implementation does nothing.
+ ///
+ virtual void add_font(int /*id*/, font* /*ch*/)
+ {
+ }
- virtual void add_execute_tag(execute_tag* c) = 0;
+ /// Return the font with given character id
+ //
+ /// @returns NULL if the given id doesn't correspond
+ /// to any registered font (default).
+ ///
+ /// @see add_font
+ ///
+ virtual font* get_font(int /*id*/)
+ {
+ return NULL;
+ }
- // sprite_id was useless
- //virtual void add_init_action(int sprite_id, execute_tag* c) = 0;
- virtual void add_init_action(execute_tag* c) = 0;
+ /// Add an execute_tag to the frame currently being loaded
+ //
+ /// The default implementation is a no-op.
+ ///
+ virtual void add_execute_tag(execute_tag* /*c*/)
+ {
+ }
- virtual void add_frame_name(const char* name) = 0;
+ /// Add an init action to the frame currently being loaded
+ //
+ /// The default implementation is a no-op.
+ ///
+ virtual void add_init_action(execute_tag* /*c*/)
+ {
+ }
- virtual void set_jpeg_loader(std::auto_ptr<jpeg::input> j_in) = 0;
+ /// Labels the frame currently being loaded with the given name.
+ //
+ /// A copy of the name string is made and kept in this object.
+ ///
+ /// The default implementation is a no-op.
+ ///
+ virtual void add_frame_name(const char* /*name*/)
+ {
+ }
- virtual jpeg::input* get_jpeg_loader() = 0;
+ /// This method should probably not be there but in some higher-level
+ /// class, like a Parser class..
+ ///
+ /// The default implementation is a no-op. Actually, an implicit op
+ /// *is* performed, and it is deleting the jpeg::input instance since
+ /// it is passed in an auto_ptr...
+ ///
+ virtual void set_jpeg_loader(std::auto_ptr<jpeg::input> /*j_in*/)
+ {
+ }
- virtual bitmap_character_def* get_bitmap_character_def(int
character_id)=0;
+ /// \brief
+ /// Get the jpeg input loader, to load a DefineBits image
+ /// (one without table info).
+ ///
+ /// This method should probably not be there but in some higher-level
+ /// class, like a Parser class..
+ ///
+ /// The default implementation returns NULL
+ ///
+ /// NOTE: ownership of the returned object is NOT transferred
+ ///
+ virtual jpeg::input* get_jpeg_loader()
+ {
+ return NULL;
+ }
- virtual void add_bitmap_character_def(int character_id,
- bitmap_character_def* ch) = 0;
+ /// \brief
+ /// Get a bitmap character from the dictionary.
+ //
+ /// Note that only top-level movies (those belonging to a single
+ /// SWF stream) have a characters dictionary, thus our
+ /// movie_def_impl. The other derived class, sprite_definition
+ /// will seek for characters in it's base movie_def_impl.
+ ///
+ /// @return NULL if no character with the given ID is found, or
+ /// if the corresponding character is not a bitmap.
+ ///
+ /// The default implementation returns NULL.
+ ///
+ virtual bitmap_character_def* get_bitmap_character_def(int
/*character_id*/)
+ {
+ return NULL;
+ }
- virtual sound_sample* get_sound_sample(int character_id) = 0;
+ /// \brief
+ /// Add a bitmap character in the dictionary, with the specified
+ /// character id.
+ //
+ /// The default implementation is a no-op
+ ///
+ virtual void add_bitmap_character_def(int /*character_id*/,
+ bitmap_character_def* /*ch*/)
+ {
+ }
- virtual void add_sound_sample(int character_id, sound_sample* sam) = 0;
+ /// Get the sound sample with given ID.
+ //
+ /// @return NULL if the given character ID isn't found in the
+ /// dictionary or it is not a sound sample.
+ ///
+ /// The default implementation always returns NULL
+ ///
+ virtual sound_sample* get_sound_sample(int /*character_id*/)
+ {
+ return NULL;
+ }
- virtual void set_loading_sound_stream_id(int id) = 0;
+ /// \brief
+ /// Add a sound sample character in the dictionary, with the specified
+ /// character id.
+ //
+ /// The default implementation is a no-op
+ ///
+ virtual void add_sound_sample(int /*character_id*/, sound_sample*
/*sam*/)
+ {
+ }
- virtual int get_loading_sound_stream_id() = 0;
+ /// Set the currently being loaded sound stream
+ //
+ /// The default implementation is a no-op
+ ///
+ virtual void set_loading_sound_stream_id(int /*id*/)
+ {
+ }
+ /// Get the currently being loaded sound stream, if any
+ //
+ /// @see set_loading_sound_stream_id
+ ///
+ /// The default implementation returns -1
+ ///
+ /// @returns -1 if no sound stream is being currently loading
+ ///
+ virtual int get_loading_sound_stream_id()
+ {
+ return -1;
+ }
- virtual void export_resource(const tu_string& symbol,
- resource* res) = 0;
+ /// \brief
+ /// Mark the given resource as "exported" with the given
+ /// linkage name.
+ //
+ /// @see get_exported_resource
+ ///
+ /// The default implementation is a no-op
+ ///
+ virtual void export_resource(const tu_string& /*symbol*/,
+ resource* /*res*/)
+ {
+ }
- virtual void add_import(const char* source_url, int id,
- const char* symbol_name) = 0;
+ /// \brief
+ /// Adds an entry to a table of resources that need to
+ /// be imported from other movies.
+ //
+ /// Client code must call resolve_import() later, when the
+ /// source movie has been loaded, so that the actual resource
+ /// can be used.
+ ///
+ /// This mechanism (add_import/resolve_import) is only used
+ /// by the IMPORT tag loader if s_no_recurse_while_loading is
+ /// true, which currently NEVER happens using the standard
+ /// executables.
+ ///
+ /// The default implementation is a no-op.
+ ///
+ virtual void add_import(const char* /*source_url*/,
+ int /*id*/, const char* /*symbol_name*/)
+ {
+ }
- virtual void add_bitmap_info(bitmap_info* ch) = 0;
+ /// \brief
+ /// All bitmap_info's used by this movie should be
+ /// registered with this API.
+ //
+ /// This was likely used for 'caching' renderer-specific
+ /// versions of bitmaps. I'm not sure it is really needed
+ /// currently (caching on disk is broken).
+ ///
+ /// The default implementation is a no-op
+ ///
+ virtual void add_bitmap_info(bitmap_info* /*ch*/)
+ {
+ }
// ...
- virtual create_bitmaps_flag get_create_bitmaps() const = 0;
- virtual create_font_shapes_flag get_create_font_shapes() const = 0;
+ // This interface should be nice not to have in movie_definition
+ // The default returns DO_LOAD_BITMAPS.
+ virtual create_bitmaps_flag get_create_bitmaps() const
+ {
+ return DO_LOAD_BITMAPS;
+ }
+
+ // This interface should be nice not to have in movie_definition
+ // The default returns DO_LOAD_FONT_SHAPES.
+ virtual create_font_shapes_flag get_create_font_shapes() const
+ {
+ return DO_LOAD_FONT_SHAPES;
+ }
/// \brief
/// Return the URL of the SWF stream this definition has been read
@@ -258,8 +492,12 @@
/// \brief
/// Load next chunk of this movie/sprite frames if available.
+ //
+ /// The default implementation is a no-op
///
- virtual void load_next_frame_chunk() = 0;
+ virtual void load_next_frame_chunk()
+ {
+ }
};
} // namespace gnash
Index: server/parser/sprite_definition.h
===================================================================
RCS file: /sources/gnash/gnash/server/parser/sprite_definition.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- server/parser/sprite_definition.h 21 Nov 2006 00:25:47 -0000 1.11
+++ server/parser/sprite_definition.h 4 Dec 2006 17:05:38 -0000 1.12
@@ -137,12 +137,16 @@
return m_movie_def->get_version();
}
+ /// Overridden just for complaining about malformed SWF
virtual void add_font(int /*id*/, font* /*ch*/)
{
- log_error("add_font tag appears in sprite tags! "
+ IF_VERBOSE_MALFORMED_SWF (
+ log_warning("add_font tag appears in sprite tags! "
"Malformed SWF?\n");
+ );
}
+ /// Delegate call to associated root movie
virtual font* get_font(int id)
{
// how do we resolve fonts if we don't have a reference
@@ -150,16 +154,7 @@
return m_movie_def ? m_movie_def->get_font(id) : NULL;
}
- virtual void set_jpeg_loader(std::auto_ptr<jpeg::input> /*j_in*/)
- {
- assert(0);
- }
-
- virtual jpeg::input* get_jpeg_loader()
- {
- return NULL;
- }
-
+ /// Delegate call to associated root movie
virtual bitmap_character_def* get_bitmap_character_def(int id)
{
// how do we query characters by id
@@ -170,13 +165,17 @@
NULL;
}
+ /// Overridden just for complaining about malformed SWF
virtual void add_bitmap_character_def(int /*id*/,
bitmap_character_def* /*ch*/)
{
- log_error("add_bc appears in sprite tags!"
+ IF_VERBOSE_MALFORMED_SWF (
+ log_warning("add_bitmap_character_def appears in sprite tags!"
" Malformed SWF?");
+ );
}
+ /// Delegate call to associated root movie
virtual sound_sample* get_sound_sample(int id)
{
// how do we query sound samples by id
@@ -184,12 +183,16 @@
return m_movie_def ? m_movie_def->get_sound_sample(id) : NULL;
}
+ /// Overridden just for complaining about malformed SWF
virtual void add_sound_sample(int /*id*/, sound_sample* /*sam*/)
{
- log_error("add sam appears in sprite tags!"
+ IF_VERBOSE_MALFORMED_SWF (
+ log_warning("add sam appears in sprite tags!"
" Malformed SWF?");
+ );
}
+ /// Delegate call to associated root movie
virtual void set_loading_sound_stream_id(int id)
{
if ( m_movie_def )
@@ -199,6 +202,7 @@
}
+ /// Delegate call to associated root movie, or return -1
virtual int get_loading_sound_stream_id()
{
return m_movie_def ?
@@ -208,24 +212,16 @@
}
- // @@ would be nicer to not inherit these...
- virtual create_bitmaps_flag get_create_bitmaps() const
- { assert(0); return DO_LOAD_BITMAPS; }
- virtual create_font_shapes_flag get_create_font_shapes() const
- { assert(0); return DO_LOAD_FONT_SHAPES; }
- virtual int get_bitmap_info_count() const
- { assert(0); return 0; }
- virtual bitmap_info* get_bitmap_info(int /*i*/) const
- { assert(0); return NULL; }
- virtual void add_bitmap_info(bitmap_info* /*bi*/)
- { assert(0); }
-
+ /// Overridden just for complaining about malformed SWF
virtual void export_resource(const tu_string& /*symbol*/,
resource* /*res*/)
{
- log_error("can't export from sprite! Malformed SWF?");
+ IF_VERBOSE_MALFORMED_SWF (
+ log_warning("can't export from sprite! Malformed SWF?");
+ );
}
+ /// Delegate call to associated root movie
virtual boost::intrusive_ptr<resource> get_exported_resource(const
tu_string& sym)
{
return m_movie_def ?
@@ -234,31 +230,9 @@
NULL;
}
- virtual void add_import(const char* /*source_url*/, int /*id*/,
- const char* /*symbol*/)
- {
- assert(0);
- }
-
- virtual void visit_imported_movies(import_visitor* /*v*/)
- {
- assert(0);
- }
-
- virtual void resolve_import(const char* /*source_url*/,
- movie_definition* /*d*/)
- {
- assert(0);
- }
-
-
/// \brief
- /// Get a character_def from this Sprite's parent
- /// CharacterDictionary. NOTE that calling this
- /// method on the leaf Sprite of a movie_definition
- /// hierarchy will result in a recursive scan of
- /// all parents until the top-level movie_definition
- /// (movie_def_impl) is found.
+ /// Get a character_def from this Sprite's root movie
+ /// CharacterDictionary.
///
virtual character_def* get_character_def(int id)
{
@@ -268,6 +242,8 @@
NULL;
}
+ /// Overridden just for complaining about malformed SWF
+ //
/// Calls to this function should only be made when
/// an invalid SWF is being read, as it would mean
/// that a Definition tag is been found as part of
@@ -275,29 +251,13 @@
///
virtual void add_character(int /*id*/, character_def* /*ch*/)
{
- log_error("add_character tag appears in sprite tags!"
+ IF_VERBOSE_MALFORMED_SWF (
+ log_warning("add_character tag appears in sprite tags!"
" Maformed SWF?");
+ );
}
- virtual void generate_font_bitmaps()
- {
- assert(0);
- }
-
- virtual void output_cached_data(tu_file* /*out*/,
- const cache_options& /*options*/)
- {
- // Nothing to do.
- return;
- }
-
- virtual void input_cached_data(tu_file* /*in*/)
- {
- // Nothing to do.
- return;
- }
-
virtual sprite_instance* create_instance()
{
return NULL;
@@ -317,21 +277,20 @@
m_playlist[m_loading_frame].push_back(c);
}
- //virtual void add_init_action(int sprite_id, execute_tag* c)
+ /// Overridden just for complaining about malformed SWF
+ //
+ /// Sprite def's should not have do_init_action tags in them! (@@
correct?)
virtual void add_init_action(execute_tag* /*c*/)
{
- // Sprite def's should not have do_init_action tags in them! (@@
correct?)
- log_error("sprite_definition::add_init_action called! Ignored.
(Malformed SWF?)\n");
+ IF_VERBOSE_MALFORMED_SWF (
+ log_warning("sprite_definition::add_init_action called!
Ignored. (Malformed SWF?)\n");
+ );
}
- /// \brief
- /// Labels the frame currently being loaded with the
- /// given name. A copy of the name string is made and
- /// kept in this object.
- ///
+ // See dox in movie_definition.h
virtual void add_frame_name(const char* name);
- /// Returns 0-based frame #
+ // See dox in movie_definition
bool get_labeled_frame(const char* label, size_t* frame_number)
{
return m_named_frames.get(label, frame_number);
@@ -346,10 +305,8 @@
// Sprites do not have init actions in their
// playlists! Only the root movie
// (movie_def_impl) does (@@ correct?)
- virtual const PlayList* get_init_actions(size_t /*frame_number*/)
- {
- return NULL;
- }
+ // .. no need to override as returning NULL is the default behaviour ..
+ //virtual const PlayList* get_init_actions(size_t /*frame_number*/)
virtual const std::string& get_url() const
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] gnash ChangeLog server/parser/movie_def_impl.h ...,
Sandro Santilli <=