4 #include "FileManager.h" 6 #include "util/mutex.h" 7 #include <boost/thread.hpp> 8 #include <boost/shared_ptr.hpp> 29 void setMinX(
int minX );
30 void setMinY(
int minY );
31 void setMaxX(
int maxX );
32 void setMaxY(
int maxY );
35 SWFRect(
int minX,
int minY,
int maxX,
int maxY );
39 void Init(
CParaFile& in,
bool bUnsigned=
false);
82 void LoadMovie(
const char* filename);
87 void PutFlashVars(
const char* args);
113 const char* CallFlashFunction(
const char* sFunc);
118 void SetFlashReturnValue(
const char* sResult);
121 const char* GetFlashReturnValue();
127 void InvalidateDeviceObjects();
132 void RenderFrameMove(
float fCurTime);
140 bool GetTextureInfo(
int* width,
int* height);
146 LRESULT SendMessage( UINT Msg,WPARAM wParam,LPARAM lParam);
151 LRESULT PostMessage( UINT Msg,WPARAM wParam,LPARAM lParam);
154 const char* GetFileName();
164 void SetWindowMode(
bool bIsWindowMode);
167 void MoveWindow(
int x,
int y,
int width,
int height,
bool bRepaint=
true);
175 void SetWindowVisible(
bool bVisible);
186 HWND GetWindowHandle();
191 void UpdatePixelsBuffer();
196 HRESULT CreateTexture(LPDIRECT3DTEXTURE9 *ppTexture);
200 HRESULT UpdateTexture(LPDIRECT3DTEXTURE9 pTexture);
206 HRESULT StartWindowThread();
207 void DefaultWinThreadProc();
210 bool MsgProcCustom(UINT message,WPARAM wParam,LPARAM lParam);
213 bool PostWinThreadMessage(UINT message,WPARAM wParam,LPARAM lParam);
217 bool SetParentWindow(HWND hWnd);
223 LPDIRECT3DTEXTURE9 GetTexture();
236 D3DFORMAT m_TextureFormat;
237 bool m_bUseDynamicTextures;
258 int m_nTextureHeight;
269 bool m_bFlipVertical;
275 string m_sFlashReturnValue;
278 Boost_Thread_ptr_type m_win_thread;
280 bool m_bWindowCreated;
281 bool m_bWinThreadMovieLoaded;
283 DWORD m_dwWinThreadID;
285 string m_sCurrentFlashFunc;
286 string m_sCurrentFlashFuncResponse;
302 HRESULT InitDeviceObjects();
303 HRESULT RestoreDeviceObjects();
304 HRESULT InvalidateDeviceObjects();
305 HRESULT DeleteDeviceObjects();
314 void GarbageCollectAll();
323 void SetMaxFlashPlayerNum(
int nNum);
327 int GetMaxFlashPlayerNum();
344 int GetFlashPlayerIndex(
const char* sFileName);
350 LPDIRECT3DTEXTURE9 GetTexture(
const char* sFileName);
352 bool GetTextureInfo(
const char* sFileName,
int* width,
int* height);
358 bool UnloadTexture(
const char* sFileName);
364 void RenderFrameMove(
float fElapsedTime);
369 string FindFile(
const string& filename,
bool bFindInSearchPaths);
379 void RenderFlashWindows(
SceneState& sceneState);
383 bool SetParentWindow(HWND hWnd);
386 static bool HasFocus();
388 vector <CFlashPlayer*> m_FlashPlayers;
390 static bool m_bHasFocus;
HWND m_hwndFlashPlayerControl
flash control handle
Definition: FlashTextureManager.h:249
It's used as parameter to Draw method of each scene object.
Definition: SceneState.h:284
float m_fTimeOut
if a flash player is never used for this number of time, it will be deleted.
Definition: FlashTextureManager.h:228
bool m_bTextureUpdatedThisFrame
whether the texture has been update in this rendering frame.
Definition: FlashTextureManager.h:241
different physics engine has different winding order.
Definition: EventBinding.h:32
string m_filename
file name that the current texture is associated with.
Definition: FlashTextureManager.h:226
bool m_bWindowMode
if true, we use a real win32 window.
Definition: FlashTextureManager.h:272
bool IsFree()
whether the current player is free to load a new movie.
Definition: FlashTextureManager.h:79
an instance of flash player.
Definition: FlashTextureManager.h:69
bool IsWindowMode()
whether this player is using a real win32 window for display.
Definition: FlashTextureManager.h:161
bool m_bNeedFlashUpdate
this flag is set to true every frame move. and set to false when the flash image is saved to temp buf...
Definition: FlashTextureManager.h:268
LPDIRECT3DTEXTURE9 m_pTexture
dynamic d3d texture
Definition: FlashTextureManager.h:235
search path manager interface and implementation.
Definition: FilePath.h:106
bool m_bTransparent
There are two modes of rendering are supported:
Definition: FlashTextureManager.h:247
for SWF rect
Definition: FlashTextureManager.h:16
it presents a real or virtual file in ParaEngine.
Definition: ParaFile.h:31
bool m_bFree
whether the current player is free.
Definition: FlashTextureManager.h:243
int m_nFlashPlayerIndex
index of this flash player
Definition: FlashTextureManager.h:232
A linear, 32-bit/component floating point RGBA color.
Definition: ParaColor.h:12
cross platform mutex
Definition: mutex.h:95
managing flash textures.
Definition: FlashTextureManager.h:295
int GetIndex()
get unique index of this flash player .
Definition: FlashTextureManager.h:157
float m_fLastUsedTime
last time the GetTexture() is called.
Definition: FlashTextureManager.h:230