Manager to support the playing of Flash files. More...
Public Member Functions | |
Manager (GameApp *pApp) | |
Initialize a Flash file manager. | |
~Manager () | |
GameApp * | GetGameApp (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. | |
Random * | GetRandomGenerator (void) |
Accessor to the random number generator. | |
Filename * | GetDataDirectory (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. | |
CodeLibrary * | LoadCodeLibrary (const String *pName) |
Load a code library. | |
void | ReleaseCodeLibraries (void) |
Release all of the loaded code libraries. | |
const String * | GetGlobalEnvironmentVariables (void) const |
Get the global environment variables. | |
void | SetGlobalEnvironmentVariables (const char *pInput) |
Set the global environment variables. | |
const String * | GetConstructorName (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 | |
Manager & | operator= (const Manager &)=delete |
Manager (Manager &&)=delete | |
Manager & | operator= (Manager &&)=delete |
Private Attributes | |
GameApp * | m_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. | |
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.
|
privatedelete |
|
privatedelete |
Burger::Flash::Manager::Manager | ( | GameApp * | pApp | ) |
Initialize a Flash file manager.
Init to power up defaults
pApp | Pointer to the master application to the player can use low level systems |
Burger::Flash::Manager::~Manager | ( | ) |
|
inline |
Get the multithreading flag.
If non-zero, the player will use multiple threads for background processing
|
inline |
Get the string constant "__constructor__".
This constant is used by ActionScript for invoking data constructors
|
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.
|
inline |
Get the data directory.
Retrieve the directory that the flash player is using to load data files that the flash file is requesting.
|
inline |
Get the Flash FSCommand handler.
|
inline |
|
inline |
Get the global environment variables.
Retrieves the pointer to the internal copy of the global environment variables.
|
inline |
Get the texture Level of Detail bias.
|
inline |
Accessor to the random number generator.
|
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.
|
inline |
Get the pointer to the movie file that has focus.
|
inline |
Get the verbose action script debug flag.
If non-zero, the action script interpreter will output logging text to the console for debugging.
|
inline |
Get the bitmap generation debug flag.
If non-zero, bitmap generation will output logging text to the console for debugging.
|
inline |
Get the verbose data parsing debug flag.
If non-zero, internal data parsing will output logging text to the console for debugging.
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.
pName | Pointer to a String with the filename of the code library |
|
inline |
Lock the global Mutex.
The Flash player may spawn multiple threads, this Mutex is used to keep the threads in sync by locking.
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
|
inline |
Set the multithreading flag.
If non-zero, the player will use multiple CPU threads to spread out the processing of the Flash movie.
bAllowMultithreadingFlag | The new flag |
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
fCurvePixelError | The new curve detail level. |
|
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
pDirectory | A pointer to the "C" string with the directory name |
|
inline |
Set the Flash FSCommand handler.
pFSCommand | Pointer to the FSCommand handler |
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
pInput | Pointer to a "C" string with list of environment variables |
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
fTextureLODBias | The new level of detail bias |
|
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.
bUseRealtimeFrameRateFlag | The new flag |
void Burger::Flash::Manager::SetRootObject | ( | RootObject * | pObject | ) |
Set the pointer to the movie file that has focus.
pObject | Pointer to the movie object to contain focus |
|
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.
bVerboseActionFlag | The new flag |
|
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.
bVerboseBitmapInfoFlag | The new flag |
|
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.
m_bVerboseParsingFlag | The new flag |
|
inline |
Lock the global Mutex.
The Flash player may spawn multiple threads, this Mutex is used to keep the threads in sync by unlocking.
|
private |
Directory to load files from.
|
private |
Set to TRUE if flash logic MUST be called once per frame in slow situations.
|
private |
Print debug messages for Action Script.
|
private |
Print debug messages for bitmap information.
|
private |
Print debug messages for data parsing.
|
private |
Hash of code libraries and pointers to their data.
|
private |
"__constructor__" global for internal use
|
private |
Critical section for the flash player.
|
private |
Allowable error on generating curves. Higher numbers means coarser curves.
|
private |
Texture Level of detail bias.
|
private |
A list of environment variables to pass to all Flash movies.
|
private |
|
private |
Callback for FSCommand support.
|
private |
Pointer to the application instance.