Functions and classes to support playing Adobe Flash files. More...
Classes | |
class | ActionScriptProperty |
Shared data buffer. More... | |
class | ActionScriptValue |
class | BaseExecute |
Execution base class. More... | |
class | ClassInfo |
Data to represent class_info. More... | |
class | ColorTransform |
Color transform for Adobe Flash. More... | |
class | ExceptionInfo |
Data to represent exception_info. More... | |
class | InstanceInfo |
Data to represent instance_info. More... | |
struct | ItemInfo_t |
Optional key/value pairs. More... | |
class | Manager |
Manager to support the playing of Flash files. More... | |
class | Matrix23 |
2x3 matrix for two dimensional rotations More... | |
struct | MetadataInfo |
Data to represent metadata_info. More... | |
class | Multiname |
Data packet for Flash Multiname support. More... | |
class | Namespace |
Data packet for Flash Multiname support. More... | |
struct | OptionDetail_t |
Optional class parameters. More... | |
class | Rect |
Rectangle specialization for Adobe Flash. More... | |
class | RGBAWord8 |
RGBA color class for Flash. More... | |
class | ScriptInfo |
Data to represent script_info. More... | |
class | SharedBuffer |
Shared data buffer. More... | |
class | Stream |
Data stream manager for flash file parsing. More... | |
class | TraitsInfo |
Optional class traits. More... | |
Typedefs | |
typedef uint_t(* | FSCommandProc) (CharacterObject *pMovie, const char *pCommand, const char *pArgs) |
Function prototype for user supplied FSCommand function. | |
typedef void(* | ActionScriptCFunctionProc) (const FunctionCallParms *pParms) |
Function prototype to implement an ActionScript command. | |
Enumerations | |
enum | eFileType { UNKNOWN , SWF , JPG , X3DS , TXT , URL } |
Supported file type enumerations. More... | |
enum | eActionScriptStandardMember { M_INVALID_MEMBER = -1 , M_X , M_Y , M_XSCALE , M_YSCALE , M_CURRENTFRAME , M_TOTALFRAMES , M_ALPHA , M_VISIBLE , M_WIDTH , M_HEIGHT , M_ROTATION , M_TARGET , M_FRAMESLOADED , M_NAME , M_DROPTARGET , M_URL , M_HIGHQUALITY , M_FOCUSRECT , M_SOUNDBUFTIME , M_XMOUSE , M_YMOUSE , M_PARENT , M_TEXT , M_TEXTWIDTH , M_TEXTCOLOR , M_BORDER , M_MULTILINE , M_WORDWRAP , M_TYPE , M_BACKGROUNDCOLOR , M_THIS , MTHIS , M_ROOT , MDOT , MDOT2 , M_LEVEL0 , M_GLOBAL , M_ENABLED , M_PASSWORD , M_MOUSE_MOVE , ACTION_SCRIPT_STANDARD_MEMBER_COUNT } |
Supported file type enumerations. More... | |
Functions | |
const char * | GetVersion (void) |
Return the version of the flash player. | |
float | TwipsToPixels (float fInput) |
Convert a value from Flash Twips to Pixels. | |
float | PixelsToTwips (float fInput) |
Convert a value from Pixels to Flash Twips. | |
void | TwipsToPixels (Vector2D_t *pInput) |
Convert a 2D point from Flash Twips to Pixels. | |
void | PixelsToTwips (Vector2D_t *pInput) |
Convert a 2D point from Pixels to Flash Twips. | |
uint32_t | TextureSizePower2 (uint32_t uInput) |
Convert a texture width/height to a power of 2. | |
uintptr_t | GetEncodedU32Length (uint32_t *pOutput, const uint8_t *pInput) |
Extract a 32 bit unsigned integer from a byte stream. | |
eActionScriptStandardMember | EnumerateStandardMember (const char *pName) |
Enumerate common class names. | |
eFileType | GetFileType (const char *pFilename) |
Enumerate support file extensions. | |
void | GetFullURL (Filename *pOutput, const Filename *pDirectory, const char *pInput) |
Create a full pathname. | |
uintptr_t | DisassembleActionScript (const uint8_t *pInput) |
Disassemble a line of ActionScript. | |
Functions and classes to support playing Adobe Flash files.
Adobe flash requires subsystems to support ActionScript, textures, fonts and vectors to be able to play Flash files.
typedef void( * Burger::Flash::ActionScriptCFunctionProc) (const FunctionCallParms *pParms) |
Function prototype to implement an ActionScript command.
typedef uint_t( * Burger::Flash::FSCommandProc) (CharacterObject *pMovie, const char *pCommand, const char *pArgs) |
Function prototype for user supplied FSCommand function.
Functions and classes to support playing Adobe Flash files.
Adobe flash requires subsystems to support ActionScript, textures, fonts and vectors to be able to play Flash files.
Supported file type enumerations.
Enumeration of data files that are supported by the Flash player
Enumerator | |
---|---|
M_INVALID_MEMBER | Error in the function Burger::Flash::EnumerateStandardMember(const char *) |
M_X | "_x" |
M_Y | "_y" |
M_XSCALE | "_xscale" |
M_YSCALE | "_yscale" |
M_CURRENTFRAME | "_currentframe" |
M_TOTALFRAMES | "_totalframes" |
M_ALPHA | "_alpha" |
M_VISIBLE | "_visible" |
M_WIDTH | "_width" |
M_HEIGHT | "_height" |
M_ROTATION | "_rotation" |
M_TARGET | "_target" |
M_FRAMESLOADED | "_framesloaded" |
M_NAME | "_name" |
M_DROPTARGET | "_droptarget" |
M_URL | "_url" |
M_HIGHQUALITY | "_highquality" |
M_FOCUSRECT | "_focusrect" |
M_SOUNDBUFTIME | "_soundbuftime" |
M_XMOUSE | "_xmouse" |
M_YMOUSE | "_ymouse" |
M_PARENT | "_parent" |
M_TEXT | "text" |
M_TEXTWIDTH | "textWidth" |
M_TEXTCOLOR | "textColor" |
M_BORDER | "border" |
M_MULTILINE | "multiline" |
M_WORDWRAP | "wordWrap" |
M_TYPE | "type" |
M_BACKGROUNDCOLOR | "backgroundColor" |
M_THIS | "_this" |
MTHIS | "this" |
M_ROOT | "_root" |
MDOT | "." |
MDOT2 | ".." |
M_LEVEL0 | "_level0" |
M_GLOBAL | "_global" |
M_ENABLED | "enabled" |
M_PASSWORD | "password" |
M_MOUSE_MOVE | "onMouseMove" |
ACTION_SCRIPT_STANDARD_MEMBER_COUNT | Size of the array. |
|
extern |
Disassemble a line of ActionScript.
This debugging function will parse the data at the pointer as a single instruction of ActionScript and output it using the Debug::PrintString(const char *) function.
Documentation is found at http://www.adobe.com/content/dam/Adobe/en/devnet/swf/pdf/swf-file-format-spec.pdf
pInput | Pointer to ActionScript byte code |
|
extern |
Enumerate common class names.
Perform a case insensitive comparison to a list of class names and return an enumeration.
pName | Pointer to "C" string of name to enumerate |
|
extern |
Extract a 32 bit unsigned integer from a byte stream.
Adobe flash uses a byte stream encoding to save space when recording 32 bit unsigned integers. This function will decode up to 5 bytes from the stream and output the 32 bit unsigned value decoded.
This code was lovingly ripped off from the file http://wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/en/devnet/swf/pdf/swf-file-format-spec.pdf at page 17.
pOutput | Pointer to store the decoded uint32_t |
pInput | Pointer to the byte stream |
|
extern |
Enumerate support file extensions.
Check the filename and determine what type of data is contained.
pFilename | Pointer to "C" string of the filename to test |
|
extern |
Create a full pathname.
Check if the input is a fully qualified pathname or a web page URL and if it is, return as is. Otherwise, prefix the directory to the pathname.
pOutput | Pointer to the Filename to receive the output |
pDirectory | Pointer to the home directory |
pInput | Pointer to "C" string of the filename to test |
|
extern |
Return the version of the flash player.
The version is in Adobe format and it's currently "WIN 9.0.0.0".
|
inline |
Convert a value from Pixels to Flash Twips.
Flash uses a coordinate system of 20 twips per pixel. This function converts from pixels to twips by a multiplication of 20.0f
fInput | Value in pixels |
|
extern |
Convert a 2D point from Pixels to Flash Twips.
Flash uses a coordinate system of 20 twips per pixel. This function converts from pixels to twips by a multiplication of 20.0f
pInput | Pointer to a Vector2D_t to convert |
|
extern |
Convert a texture width/height to a power of 2.
Textures may need to be scaled to a power of two, this function will take a coordinate and scale it up to the nearest power of 2.
In the case where the scaling up would result in an excess of stretched pixels (60% stretching), it will be scaled to the next lower power of two.
uInput | Value to convert |
|
inline |
Convert a value from Flash Twips to Pixels.
Flash uses a coordinate system of 20 twips per pixel. This function converts from twips to pixels by a multiplication of 1.0f/20.0f
fInput | Value in Flash twips |
|
extern |
Convert a 2D point from Flash Twips to Pixels.
Flash uses a coordinate system of 20 twips per pixel. This function converts from twips to pixels by a multiplication of 1.0f/20.0f
pInput | Pointer to a Vector2D_t to convert |