Kicking it Olde Sküül! Burgerlib on Github Follow Olde Sküül on Twitter Burgerbecky on LinkedIn Burgerbecky on LinkedIn
Loading...
Searching...
No Matches
Burger::Flash Namespace Reference

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.
 

Detailed Description

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.

See also
Flash::Manager

Typedef Documentation

◆ ActionScriptCFunctionProc

typedef void( * Burger::Flash::ActionScriptCFunctionProc) (const FunctionCallParms *pParms)

Function prototype to implement an ActionScript command.

◆ FSCommandProc

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.

See also
Flash::Manager

Enumeration Type Documentation

◆ eActionScriptStandardMember

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.

◆ eFileType

Supported file type enumerations.


Enumeration of data files that are supported by the Flash player

Enumerator
UNKNOWN 

Unknown file.

SWF 

Flash file.

JPG 

Jpeg file format.

X3DS 

3D files

TXT 

Raw text file.

URL 

Web pages (XML)

Function Documentation

◆ DisassembleActionScript()

uintptr_t BURGER_API Burger::Flash::DisassembleActionScript ( const uint8_t * pInput)
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

Parameters
pInputPointer to ActionScript byte code
Returns
Number of bytes processed (To help skip the pointer to the next instruction)

◆ EnumerateStandardMember()

Burger::Flash::eActionScriptStandardMember BURGER_API Burger::Flash::EnumerateStandardMember ( const char * pName)
extern

Enumerate common class names.


Perform a case insensitive comparison to a list of class names and return an enumeration.

Parameters
pNamePointer to "C" string of name to enumerate
Returns
Enumeration of the string or M_INVALID_MEMBER if not found

◆ GetEncodedU32Length()

uintptr_t BURGER_API Burger::Flash::GetEncodedU32Length ( uint32_t * pOutput,
const uint8_t * pInput )
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.

Parameters
pOutputPointer to store the decoded uint32_t
pInputPointer to the byte stream
Returns
Number of bytes read in from the byte stream (1 through 5)

◆ GetFileType()

Burger::Flash::eFileType BURGER_API Burger::Flash::GetFileType ( const char * pFilename)
extern

Enumerate support file extensions.


Check the filename and determine what type of data is contained.

Parameters
pFilenamePointer to "C" string of the filename to test
Returns
Enumeration of the filetype or UNKNOWN if not found

◆ GetFullURL()

void BURGER_API Burger::Flash::GetFullURL ( Filename * pOutput,
const Filename * pDirectory,
const char * pInput )
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.

Parameters
pOutputPointer to the Filename to receive the output
pDirectoryPointer to the home directory
pInputPointer to "C" string of the filename to test

◆ GetVersion()

const char *BURGER_API Burger::Flash::GetVersion ( void )
extern

Return the version of the flash player.


The version is in Adobe format and it's currently "WIN 9.0.0.0".

Returns
"C" string with the current version of the Flash player

◆ PixelsToTwips() [1/2]

float Burger::Flash::PixelsToTwips ( float fInput)
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

Parameters
fInputValue in pixels
Returns
Value converted to Flash twips
See also
PixelsToTwips(Vector2D_t *) or TwipsToPixels(float)

◆ PixelsToTwips() [2/2]

void BURGER_API Burger::Flash::PixelsToTwips ( Vector2D_t * pInput)
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

Parameters
pInputPointer to a Vector2D_t to convert
See also
PixelsToTwips(float) or TwipsToPixels(Vector2D_t *)

◆ TextureSizePower2()

uint32_t BURGER_API Burger::Flash::TextureSizePower2 ( uint32_t uInput)
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.

Parameters
uInputValue to convert
See also
power_of_two(uint32_t)

◆ TwipsToPixels() [1/2]

float Burger::Flash::TwipsToPixels ( float fInput)
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

Parameters
fInputValue in Flash twips
Returns
Value converted to pixels
See also
TwipsToPixels(Vector2D_t *) or PixelsToTwips(float)

◆ TwipsToPixels() [2/2]

void BURGER_API Burger::Flash::TwipsToPixels ( Vector2D_t * pInput)
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

Parameters
pInputPointer to a Vector2D_t to convert
See also
TwipsToPixels(float) or PixelsToTwips(Vector2D_t *)