Gnash
0.8.11dev
|
Holds the immutable data for a sprite, as read from as SWF stream. @ should not derive from movie_definition, probably! More...
#include <sprite_definition.h>
Public Member Functions | |
sprite_definition (movie_definition &m, SWFStream &in, const RunResources &runResources, std::uint16_t id) | |
Read the sprite info from input stream. More... | |
~sprite_definition () | |
Destructor, releases playlist data. More... | |
virtual void | incrementLoadedFrames () |
virtual size_t | get_width_pixels () const |
Frame width in pixels. More... | |
virtual size_t | get_height_pixels () const |
Frame height in pixels. More... | |
virtual size_t | get_frame_count () const |
virtual size_t | get_bytes_total () const |
Return total bytes of the movie from which this sprite has been read. More... | |
virtual size_t | get_bytes_loaded () const |
Return the number of bytes loaded from the stream of the the movie from which this sprite is being read. More... | |
virtual float | get_frame_rate () const |
const SWFRect & | get_frame_size () const |
Return size of frame, in TWIPS. More... | |
virtual size_t | get_loading_frame () const |
Returns 1 based index. Ex: if 1 then 1st frame as been fully loaded. More... | |
virtual int | get_version () const |
virtual void | add_font (int, boost::intrusive_ptr< Font >) |
Overridden just for complaining about malformed SWF. More... | |
virtual Font * | get_font (int id) const |
Delegate call to associated root movie. More... | |
virtual CachedBitmap * | getBitmap (int id) const |
Delegate call to associated root movie. More... | |
virtual void | addBitmap (int, boost::intrusive_ptr< CachedBitmap >) |
Overridden just for complaining about malformed SWF. More... | |
virtual sound_sample * | get_sound_sample (int id) const |
Delegate call to associated root movie. More... | |
virtual void | add_sound_sample (int id, sound_sample *sam) |
Overridden just for complaining about malformed SWF. More... | |
virtual void | set_loading_sound_stream_id (int id) |
Set the currently being loaded sound stream. More... | |
virtual int | get_loading_sound_stream_id () const |
Get the currently being loaded sound stream, if any. More... | |
virtual std::uint16_t | exportID (const std::string &symbol) const |
Get the id that corresponds to a symbol. More... | |
virtual void | registerExport (const std::string &s, std::uint16_t id) |
Register a symbol to refer to a character id. More... | |
virtual SWF::DefinitionTag * | getDefinitionTag (std::uint16_t id) const |
Get a SWF::DefinitionTag from this Sprite's root movie CharacterDictionary. More... | |
virtual void | addDisplayObject (std::uint16_t id, SWF::DefinitionTag *c) |
Delegate call to associated root movie. More... | |
virtual DisplayObject * | createDisplayObject (Global_as &gl, DisplayObject *parent) const |
Create a DisplayObject with the given parent. More... | |
virtual void | addControlTag (boost::intrusive_ptr< SWF::ControlTag > c) |
Add an ControlTag to this movie_definition's playlist. More... | |
![]() | |
virtual Movie * | createMovie (Global_as &, DisplayObject *=nullptr) |
Create a movie instance from a def. More... | |
virtual void | importResources (boost::intrusive_ptr< movie_definition >, const Imports &) |
Import resources. More... | |
virtual void | addDisplayObject (std::uint16_t, DefinitionTag *) |
Add a DefinitionTag with given ID to the CharactersDictionary. More... | |
virtual Font * | get_font (const std::string &, bool, bool) const |
Find a font from the movie (not shared) lib. More... | |
virtual void | set_jpeg_loader (std::unique_ptr< image::JpegInput >) |
virtual image::JpegInput * | get_jpeg_loader () const |
Get the jpeg input loader, to load a DefineBits image (one without table info). More... | |
virtual void | setAS3 () |
Set whether the SWFMovie should use AVM2 or AVM1. More... | |
virtual bool | isAS3 () const |
True if the SWFMovie should use AVM2. More... | |
virtual bool | completeLoad () |
![]() | |
virtual | ~DefinitionTag () |
virtual DSOTEXPORT void | executeState (MovieClip *m, DisplayList &) const |
Executing a DefinitionTag adds its id to list of known characters. More... | |
std::uint16_t | id () const |
The immutable id of the DefinitionTag. More... | |
![]() | |
virtual | ~ControlTag () |
virtual void | executeActions (MovieClip *, DisplayList &) const |
Execute Action tags. More... | |
![]() | |
ref_counted () | |
ref_counted (const ref_counted &) | |
void | add_ref () const |
void | drop_ref () const |
long | get_ref_count () const |
Additional Inherited Members | |
![]() | |
typedef std::vector< boost::intrusive_ptr< SWF::ControlTag > > | PlayList |
typedef std::pair< int, std::string > | ImportSpec |
typedef std::vector< ImportSpec > | Imports |
![]() | |
enum | Type { TAG_ACTION = 1 << 0, TAG_DLIST = 1 << 1 } |
Type of ControlTag. More... | |
![]() | |
movie_definition (std::uint16_t id=0) | |
virtual | ~movie_definition () |
![]() | |
DefinitionTag (std::uint16_t id) | |
![]() | |
virtual | ~ref_counted () |
Holds the immutable data for a sprite, as read from as SWF stream. @ should not derive from movie_definition, probably!
gnash::sprite_definition::sprite_definition | ( | movie_definition & | m, |
SWFStream & | in, | ||
const RunResources & | runResources, | ||
std::uint16_t | id | ||
) |
Read the sprite info from input stream.
A sprite definition consists of a series control tags.
m | the Top-Level movie_definition this sprite is read from (not a sprite_definition!) |
in | The stream associated with the sprite. It is assumed to be already positioned right before the frame count |
gnash::sprite_definition::~sprite_definition | ( | ) |
Destructor, releases playlist data.
References _, gnash::SWFStream::ensureBytes(), gnash::SWFStream::get_tag_end_position(), IF_VERBOSE_MALFORMED_SWF, IF_VERBOSE_PARSE, gnash::log_parse(), gnash::log_swferror(), name, gnash::SWFParser::read(), gnash::SWFStream::read_u16(), and gnash::SWFStream::tell().
|
inlinevirtual |
Overridden just for complaining about malformed SWF.
Reimplemented from gnash::movie_definition.
References _, IF_VERBOSE_MALFORMED_SWF, and gnash::log_swferror().
|
inlinevirtual |
Overridden just for complaining about malformed SWF.
Reimplemented from gnash::movie_definition.
References gnash::movie_definition::add_sound_sample().
|
inlinevirtual |
Overridden just for complaining about malformed SWF.
Reimplemented from gnash::movie_definition.
References _, IF_VERBOSE_MALFORMED_SWF, and gnash::log_swferror().
|
inlinevirtual |
Add an ControlTag to this movie_definition's playlist.
The default implementation is a no-op.
tag | The tag to add in the list of executable tags for the frame currently being loaded. Ownership is transferred to the SWFMovieDefinition. |
Reimplemented from gnash::movie_definition.
References _, gnash::movie_definition::get_url(), gnash::log_debug(), and name.
Referenced by gnash::SWF::SymbolClassTag::loader().
|
inlinevirtual |
Delegate call to associated root movie.
References gnash::movie_definition::addDisplayObject(), and createDisplayObject().
|
virtual |
Create a DisplayObject with the given parent.
This function will determine the correct prototype and associated object using the passed global.
gl | The global object used to set prototype and associated object. Calling this function creates a new DisplayObject from the DefinitionTag and adds it as a child of the specified parent DisplayObject. |
Implements gnash::SWF::DefinitionTag.
References gnash::NSV::CLASS_MOVIE_CLIP, gnash::DisplayObject::get_root(), and gnash::getObjectWithPrototype().
Referenced by addDisplayObject().
|
inlinevirtual |
Get the id that corresponds to a symbol.
Reimplemented from gnash::movie_definition.
References gnash::movie_definition::exportID().
|
inlinevirtual |
Return the number of bytes loaded from the stream of the the movie from which this sprite is being read.
Implements gnash::movie_definition.
References gnash::movie_definition::get_bytes_loaded().
|
inlinevirtual |
Return total bytes of the movie from which this sprite has been read.
Implements gnash::movie_definition.
References gnash::movie_definition::get_bytes_total().
|
inlinevirtual |
Delegate call to associated root movie.
Reimplemented from gnash::movie_definition.
References gnash::movie_definition::get_font().
|
inlinevirtual |
Implements gnash::movie_definition.
|
inlinevirtual |
Implements gnash::movie_definition.
References gnash::movie_definition::get_frame_rate().
|
inlinevirtual |
Return size of frame, in TWIPS.
Implements gnash::movie_definition.
|
inlinevirtual |
Frame height in pixels.
The frame size is in twips and may be rounded up.
Implements gnash::movie_definition.
|
inlinevirtual |
Returns 1 based index. Ex: if 1 then 1st frame as been fully loaded.
Implements gnash::movie_definition.
|
inlinevirtual |
Get the currently being loaded sound stream, if any.
The default implementation returns -1
Reimplemented from gnash::movie_definition.
|
inlinevirtual |
Delegate call to associated root movie.
Reimplemented from gnash::movie_definition.
References gnash::movie_definition::get_sound_sample().
|
inlinevirtual |
Implements gnash::movie_definition.
References gnash::movie_definition::get_version().
|
inlinevirtual |
Frame width in pixels.
The frame size is in twips and may be rounded up.
Implements gnash::movie_definition.
|
inlinevirtual |
Delegate call to associated root movie.
Reimplemented from gnash::movie_definition.
References gnash::movie_definition::getBitmap().
|
inlinevirtual |
Get a SWF::DefinitionTag from this Sprite's root movie CharacterDictionary.
Reimplemented from gnash::movie_definition.
References gnash::movie_definition::getDefinitionTag().
|
inlinevirtual |
Reimplemented from gnash::movie_definition.
|
inlinevirtual |
Register a symbol to refer to a character id.
The default implementation does nothing.
Reimplemented from gnash::movie_definition.
References gnash::movie_definition::registerExport().
|
inlinevirtual |
Set the currently being loaded sound stream.
The default implementation is a no-op
Reimplemented from gnash::movie_definition.
References gnash::SWF::DefinitionTag::id().