00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifndef _CATOverlayDirect3D_H_
00014 #define _CATOverlayDirect3D_H_
00015
00016 #include "CATOverlay.h"
00017 #ifdef CAT_CONFIG_WIN32
00018
00019 struct IDirect3DDevice9;
00020 struct _D3DPRESENT_PARAMETERS_;
00021 struct IDirect3DTexture9;
00022 struct ID3DXSprite;
00023
00024
00025
00026
00027 class CATOverlayDirect3D9 : public CATOverlay
00028 {
00029 public:
00030 CATOverlayDirect3D9();
00031 virtual ~CATOverlayDirect3D9();
00032
00033 CATResult HookFunctions();
00034
00035 protected:
00036 static void DeviceLost( CATHOOK* hookInst, IDirect3DDevice9* device);
00037 static void DeviceOk ( CATHOOK* hookInst, IDirect3DDevice9* device);
00038
00039 void DrawToScene( IDirect3DDevice9* device);
00040 void Reset( IDirect3DDevice9* device,
00041 _D3DPRESENT_PARAMETERS_* presParams);
00042
00043 static CATINTERCEPT_COM_TABLE_ENTRY kDirect3DDeviceInterceptTable9[];
00044
00045
00046 static void OnReset9( CATHOOK* hookInst,
00047 IDirect3DDevice9* device,
00048 _D3DPRESENT_PARAMETERS_* presParams);
00049
00050 static void OnPresent9 ( CATHOOK* hookInst,
00051 IDirect3DDevice9* device,
00052 const RECT* sourceRect,
00053 const RECT* destRect,
00054 HWND destWindow,
00055 const RGNDATA* pDirtyRgn);
00056
00057 static void OnEndScene ( CATHOOK* hookInst,
00058 IDirect3DDevice9* device);
00059
00060 protected:
00061 bool fDeviceLost;
00062 CATFloat32 fTexScaleX;
00063 CATFloat32 fTexScaleY;
00064 IDirect3DTexture9* fBackTexture;
00065 IDirect3DTexture9* fTexture;
00066 HMODULE fD3d9DLL;
00067 };
00068
00069 #endif // CAT_CONFIG_WIN32
00070 #endif // _CATOverlayDirect3D_H_