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::Manager Class Reference

Manager to support the playing of Flash files. More...

Collaboration diagram for Burger::Flash::Manager:

Public Member Functions

 Manager (GameApp *pApp)
 Initialize a Flash file manager.
 
 ~Manager ()
 
GameAppGetGameApp (void) const
 Dispose of a Flash file manager.
 
FSCommandProc GetFSCallback (void) const
 Get the Flash FSCommand handler.
 
void SetFSCallback (FSCommandProc pFSCommand)
 Set the Flash FSCommand handler.
 
RootObject * GetRootObject (void) const
 Get the pointer to the movie file that has focus.
 
void SetRootObject (RootObject *pObject)
 Set the pointer to the movie file that has focus.
 
RandomGetRandomGenerator (void)
 Accessor to the random number generator.
 
FilenameGetDataDirectory (void)
 Get the data directory.
 
void SetDataDirectory (const char *pDirectory)
 Set the data directory.
 
float GetLODBias (void) const
 Get the texture Level of Detail bias.
 
void SetLODBias (float fTextureLODBias=-1.2f)
 Set the texture Level of Detail bias.
 
float GetCurvePixelError (void) const
 Get the curve detail level.
 
void SetCurvePixelError (float fCurvePixelError=1.0f)
 Set the texture Level of Detail bias.
 
uint_t GetRealtimeFrameRateFlag (void) const
 Get the real time frame rate flag.
 
void SetRealtimeFrameRateFlag (uint_t bUseRealtimeFrameRateFlag)
 Set the real time frame rate flag.
 
uint_t GetVerboseActionFlag (void) const
 Get the verbose action script debug flag.
 
void SetVerboseActionFlag (uint_t bVerboseActionFlag)
 Set the verbose action script debug flag.
 
uint_t GetVerboseParsingFlag (void) const
 Get the verbose data parsing debug flag.
 
void SetVerboseParsingFlag (uint_t bVerboseParsingFlag)
 Set the verbose action script debug flag.
 
uint_t GetVerboseBitmapInfoFlag (void) const
 Get the bitmap generation debug flag.
 
void SetVerboseBitmapInfoFlag (uint_t bVerboseBitmapInfoFlag)
 Set the bitmap generation debug flag.
 
uint_t GetAllowMultithreadingFlag (void) const
 Get the multithreading flag.
 
void SetAllowMultithreadingFlag (uint_t bAllowMultithreadingFlag)
 Set the multithreading flag.
 
CodeLibraryLoadCodeLibrary (const String *pName)
 Load a code library.
 
void ReleaseCodeLibraries (void)
 Release all of the loaded code libraries.
 
const StringGetGlobalEnvironmentVariables (void) const
 Get the global environment variables.
 
void SetGlobalEnvironmentVariables (const char *pInput)
 Set the global environment variables.
 
const StringGetConstructorName (void) const
 Get the string constant "__constructor__".
 
void Lock (void)
 Lock the global Mutex.
 
void Unlock (void)
 Lock the global Mutex.
 

Private Member Functions

 Manager (const Manager &)=delete
 
Manageroperator= (const Manager &)=delete
 
 Manager (Manager &&)=delete
 
Manageroperator= (Manager &&)=delete
 

Private Attributes

GameAppm_pGameApp
 Pointer to the application instance.
 
FSCommandProc m_pFSCommmand
 Callback for FSCommand support.
 
WeakPointer< RootObject > m_pCurrentObject
 
float m_fTextureLODBias
 Texture Level of detail bias.
 
float m_fCurvePixelError
 Allowable error on generating curves. Higher numbers means coarser curves.
 
uint_t m_bUseRealtimeFrameRateFlag
 Set to TRUE if flash logic MUST be called once per frame in slow situations.
 
uint_t m_bVerboseActionFlag
 Print debug messages for Action Script.
 
uint_t m_bVerboseParsingFlag
 Print debug messages for data parsing.
 
uint_t m_bVerboseBitmapInfoFlag
 Print debug messages for bitmap information.
 
uint_t m_bAllowMultithreadingFlag
 TRUE if multithreading is allowed
 
Random m_Random
 Random number generator instance.
 
Filename m_BaseDirectory
 Directory to load files from.
 
HashMapString< CodeLibrary * > m_CodeLibraryHash
 Hash of code libraries and pointers to their data.
 
String m_GlobalEnvironmentVariables
 A list of environment variables to pass to all Flash movies.
 
const String m_ConstructorName
 "__constructor__" global for internal use
 
Mutex m_CriticalSection
 Critical section for the flash player.
 

Detailed Description

Manager to support the playing of Flash files.


Adobe flash requires subsystems to support ActionScript, textures, fonts and vectors to be able to play Flash files. This manager is the main dispatcher to load, manager and play Flash files. The application must supply a renderer (Usually OpenGL or DirectX) for the low level draw functions and this manager and player will do the rest.

Constructor & Destructor Documentation

◆ Manager() [1/3]

Burger::Flash::Manager::Manager ( const Manager & )
privatedelete

◆ Manager() [2/3]

Burger::Flash::Manager::Manager ( Manager && )
privatedelete

◆ Manager() [3/3]

Burger::Flash::Manager::Manager ( GameApp * pApp)

Initialize a Flash file manager.


Init to power up defaults

Parameters
pAppPointer to the master application to the player can use low level systems

◆ ~Manager()

Burger::Flash::Manager::~Manager ( )

Member Function Documentation

◆ GetAllowMultithreadingFlag()

uint_t Burger::Flash::Manager::GetAllowMultithreadingFlag ( void ) const
inline

Get the multithreading flag.


If non-zero, the player will use multiple threads for background processing

Returns
Zero if FALSE or non-zero for TRUE
See also
SetAllowMultithreadingFlag(uint_t)

◆ GetConstructorName()

const String * Burger::Flash::Manager::GetConstructorName ( void ) const
inline

Get the string constant "__constructor__".


This constant is used by ActionScript for invoking data constructors

Returns
Pointer to a String "__constructor__"

◆ GetCurvePixelError()

float Burger::Flash::Manager::GetCurvePixelError ( void ) const
inline

Get the curve detail level.


1.0f is the default, higher numbers generate courser curves which speeds up rendering, and lower number generates finer curves which can slow down rendering.

Returns
The current curve pixel resolution value.
See also
SetCurvePixelError(float)

◆ GetDataDirectory()

Filename * Burger::Flash::Manager::GetDataDirectory ( void )
inline

Get the data directory.


Retrieve the directory that the flash player is using to load data files that the flash file is requesting.

Returns
A pointer to the filename record
See also
SetDataDirectory(const char *)

◆ GetFSCallback()

FSCommandProc Burger::Flash::Manager::GetFSCallback ( void ) const
inline

Get the Flash FSCommand handler.


Returns
Pointer to the FSCommand handler
See also
SetFSCallback(FSCommandProc)

◆ GetGameApp()

GameApp * Burger::Flash::Manager::GetGameApp ( void ) const
inline

Dispose of a Flash file manager.


Release everything that had been allocated and managed by the Adobe compatible Flash player.


Get the main application

Returns
Pointer to the application to render the scene

◆ GetGlobalEnvironmentVariables()

const String * Burger::Flash::Manager::GetGlobalEnvironmentVariables ( void ) const
inline

Get the global environment variables.


Retrieves the pointer to the internal copy of the global environment variables.

Returns
Pointer to a String with list of environment variables
See also
SetGlobalEnvironmentVariables(const char *)

◆ GetLODBias()

float Burger::Flash::Manager::GetLODBias ( void ) const
inline

Get the texture Level of Detail bias.


Returns
The current Mip Map Z bias value.
See also
SetLODBias(float)

◆ GetRandomGenerator()

Random * Burger::Flash::Manager::GetRandomGenerator ( void )
inline

Accessor to the random number generator.


Returns
A pointer to the random number generator used by the Flash system

◆ GetRealtimeFrameRateFlag()

uint_t Burger::Flash::Manager::GetRealtimeFrameRateFlag ( void ) const
inline

Get the real time frame rate flag.


If non-zero, the player will call the update logic once or more times per frame to ensure that the logic is called as many times per second as the requested frame rate. On slow machines, frames may skip but the logic will work at the requested speed.

Returns
Zero if FALSE or non-zero for TRUE
See also
SetRealtimeFrameRateFlag(uint_t)

◆ GetRootObject()

RootObject * Burger::Flash::Manager::GetRootObject ( void ) const
inline

Get the pointer to the movie file that has focus.


Returns
Pointer to the main flash movie object
See also
SetRootObject(RootObject *)

◆ GetVerboseActionFlag()

uint_t Burger::Flash::Manager::GetVerboseActionFlag ( void ) const
inline

Get the verbose action script debug flag.


If non-zero, the action script interpreter will output logging text to the console for debugging.

Returns
Zero if FALSE or non-zero for TRUE
See also
SetVerboseActionFlag(uint_t)

◆ GetVerboseBitmapInfoFlag()

uint_t Burger::Flash::Manager::GetVerboseBitmapInfoFlag ( void ) const
inline

Get the bitmap generation debug flag.


If non-zero, bitmap generation will output logging text to the console for debugging.

Returns
Zero if FALSE or non-zero for TRUE
See also
SetVerboseBitmapInfoFlag(uint_t)

◆ GetVerboseParsingFlag()

uint_t Burger::Flash::Manager::GetVerboseParsingFlag ( void ) const
inline

Get the verbose data parsing debug flag.


If non-zero, internal data parsing will output logging text to the console for debugging.

Returns
Zero if FALSE or non-zero for TRUE
See also
SetVerboseParsingFlag(uint_t)

◆ LoadCodeLibrary()

Burger::CodeLibrary * Burger::Flash::Manager::LoadCodeLibrary ( const String * pName)

Load a code library.


If a code library is in the cache, return the reference otherwise, load the library from the file system and if successful, add it to the cache.

Parameters
pNamePointer to a String with the filename of the code library
Returns
NULL if the library couldn't be loaded or a valid CodeLibrary to pull functions from.
See also
ReleaseCodeLibraries(void)

◆ Lock()

void Burger::Flash::Manager::Lock ( void )
inline

Lock the global Mutex.


The Flash player may spawn multiple threads, this Mutex is used to keep the threads in sync by locking.

See also
Unlock(void)

◆ operator=() [1/2]

Manager & Burger::Flash::Manager::operator= ( const Manager & )
privatedelete

◆ operator=() [2/2]

Manager & Burger::Flash::Manager::operator= ( Manager && )
privatedelete

◆ ReleaseCodeLibraries()

void Burger::Flash::Manager::ReleaseCodeLibraries ( void )

Release all of the loaded code libraries.


If any code libraries were loaded during the execution of the Flash movie, this function will release all of them

See also
LoadCodeLibrary(const String *)

◆ SetAllowMultithreadingFlag()

void Burger::Flash::Manager::SetAllowMultithreadingFlag ( uint_t bAllowMultithreadingFlag)
inline

Set the multithreading flag.


If non-zero, the player will use multiple CPU threads to spread out the processing of the Flash movie.

Parameters
bAllowMultithreadingFlagThe new flag
See also
GetAllowMultithreadingFlag(void) const

◆ SetCurvePixelError()

void BURGER_API Burger::Flash::Manager::SetCurvePixelError ( float fCurvePixelError = 1.0f)

Set the texture Level of Detail bias.


For Flash files that use vector graphics, this constant changes the resolution and refinement of the generation of curves. Larger numbers generate fewer vertices and smaller numbers generate more vertices.

The default is 1.0f

Parameters
fCurvePixelErrorThe new curve detail level.
See also
GetCurvePixelError(void) const

◆ SetDataDirectory()

void Burger::Flash::Manager::SetDataDirectory ( const char * pDirectory)
inline

Set the data directory.


Set the directory that the flash player will use to load data files that the flash file is requesting. The directory must be in Burgerlib format

Parameters
pDirectoryA pointer to the "C" string with the directory name
See also
GetDataDirectory(void)

◆ SetFSCallback()

void Burger::Flash::Manager::SetFSCallback ( FSCommandProc pFSCommand)
inline

Set the Flash FSCommand handler.


Parameters
pFSCommandPointer to the FSCommand handler
See also
GetFSCallback(void) const

◆ SetGlobalEnvironmentVariables()

void Burger::Flash::Manager::SetGlobalEnvironmentVariables ( const char * pInput)

Set the global environment variables.


Action script can access "global" variables that the interpreter generates to pass information from the host system to the movie. This function sets those variables so information can be passed to the movie before it's started up.

The string is in the format of a variable name, followed by an '=' (Equals) character, and then the variable itself. Multiple variables are separated by commas.

Example: VARIABLENAME=DATA,NEXTVARIABLE=DATA

Note
This function makes an internal copy of the string. If changes are desired, call this function again with the updated data.
Parameters
pInputPointer to a "C" string with list of environment variables
See also
GetGlobalEnvironmentVariables(void) const

◆ SetLODBias()

void BURGER_API Burger::Flash::Manager::SetLODBias ( float fTextureLODBias = -1.2f)

Set the texture Level of Detail bias.


For Flash files that use 3D graphics, this value is passed to the low level 3D system to set the Z bias for mip mapping.

The default is -1.2f

Parameters
fTextureLODBiasThe new level of detail bias
See also
GetLODBias(void) const

◆ SetRealtimeFrameRateFlag()

void Burger::Flash::Manager::SetRealtimeFrameRateFlag ( uint_t bUseRealtimeFrameRateFlag)
inline

Set the real time frame rate flag.


If non-zero, the player will call the update logic once or more times per frame to ensure that the logic is called as many times per second as the requested frame rate. On slow machines, frames may skip but the logic will work at the requested speed.

Parameters
bUseRealtimeFrameRateFlagThe new flag
See also
GetRealtimeFrameRateFlag(void) const

◆ SetRootObject()

void Burger::Flash::Manager::SetRootObject ( RootObject * pObject)

Set the pointer to the movie file that has focus.


Parameters
pObjectPointer to the movie object to contain focus
See also
GetRootObject(void) const

◆ SetVerboseActionFlag()

void Burger::Flash::Manager::SetVerboseActionFlag ( uint_t bVerboseActionFlag)
inline

Set the verbose action script debug flag.


If non-zero, the action script interpreter will output logging text to the console for debugging. This should not be set for shipping code, it's a performance hit.

Parameters
bVerboseActionFlagThe new flag
See also
GetVerboseActionFlag(void) const

◆ SetVerboseBitmapInfoFlag()

void Burger::Flash::Manager::SetVerboseBitmapInfoFlag ( uint_t bVerboseBitmapInfoFlag)
inline

Set the bitmap generation debug flag.


If non-zero, bitmap generation parsing will output logging text to the console for debugging. This should not be set for shipping code, it's a performance hit.

Parameters
bVerboseBitmapInfoFlagThe new flag
See also
GetVerboseBitmapInfoFlag(void) const

◆ SetVerboseParsingFlag()

void Burger::Flash::Manager::SetVerboseParsingFlag ( uint_t m_bVerboseParsingFlag)
inline

Set the verbose action script debug flag.


If non-zero, internal data parsing will output logging text to the console for debugging. This should not be set for shipping code, it's a performance hit.

Parameters
m_bVerboseParsingFlagThe new flag
See also
GetVerboseParsingFlag(void) const

◆ Unlock()

void Burger::Flash::Manager::Unlock ( void )
inline

Lock the global Mutex.


The Flash player may spawn multiple threads, this Mutex is used to keep the threads in sync by unlocking.

See also
Lock(void)

Member Data Documentation

◆ m_bAllowMultithreadingFlag

uint_t Burger::Flash::Manager::m_bAllowMultithreadingFlag
private

TRUE if multithreading is allowed

◆ m_BaseDirectory

Filename Burger::Flash::Manager::m_BaseDirectory
private

Directory to load files from.

◆ m_bUseRealtimeFrameRateFlag

uint_t Burger::Flash::Manager::m_bUseRealtimeFrameRateFlag
private

Set to TRUE if flash logic MUST be called once per frame in slow situations.

◆ m_bVerboseActionFlag

uint_t Burger::Flash::Manager::m_bVerboseActionFlag
private

Print debug messages for Action Script.

◆ m_bVerboseBitmapInfoFlag

uint_t Burger::Flash::Manager::m_bVerboseBitmapInfoFlag
private

Print debug messages for bitmap information.

◆ m_bVerboseParsingFlag

uint_t Burger::Flash::Manager::m_bVerboseParsingFlag
private

Print debug messages for data parsing.

◆ m_CodeLibraryHash

HashMapString<CodeLibrary*> Burger::Flash::Manager::m_CodeLibraryHash
private

Hash of code libraries and pointers to their data.

◆ m_ConstructorName

const String Burger::Flash::Manager::m_ConstructorName
private

"__constructor__" global for internal use

◆ m_CriticalSection

Mutex Burger::Flash::Manager::m_CriticalSection
private

Critical section for the flash player.

◆ m_fCurvePixelError

float Burger::Flash::Manager::m_fCurvePixelError
private

Allowable error on generating curves. Higher numbers means coarser curves.

◆ m_fTextureLODBias

float Burger::Flash::Manager::m_fTextureLODBias
private

Texture Level of detail bias.

◆ m_GlobalEnvironmentVariables

String Burger::Flash::Manager::m_GlobalEnvironmentVariables
private

A list of environment variables to pass to all Flash movies.

◆ m_pCurrentObject

WeakPointer<RootObject> Burger::Flash::Manager::m_pCurrentObject
private

◆ m_pFSCommmand

FSCommandProc Burger::Flash::Manager::m_pFSCommmand
private

Callback for FSCommand support.

◆ m_pGameApp

GameApp* Burger::Flash::Manager::m_pGameApp
private

Pointer to the application instance.

◆ m_Random

Random Burger::Flash::Manager::m_Random
private

Random number generator instance.