1 #include "RakNetTypes.h" 2 #include "FxGameDelegate.h" 3 4 class AutopatcherClient; 5 class FileListTransfer; 6 class PacketizedTCP; 7 8 // GFxPlayerTinyD3D9.cpp has an instance of this class, and callls the corresponding 3 function 9 // This keeps the patching code out of the GFx sample as much as possible 10 class AutopatcherClientGFx3Impl : public FxDelegateHandler 11 { 12 public: 13 AutopatcherClientGFx3Impl(); 14 ~AutopatcherClientGFx3Impl(); 15 void Init(const char *_pathToThisExe, GPtr<FxDelegate> pDelegate, GPtr<GFxMovieView> pMovie); 16 void Update(void); 17 void Shutdown(void); 18 19 // Callback from flash 20 static void PressedConnect(const FxDelegateArgs& pparams); 21 static void PressedOKBtn(const FxDelegateArgs& pparams); 22 static void PressedPatch(const FxDelegateArgs& pparams); 23 static void OpenSite(const FxDelegateArgs& pparams); 24 25 // Update all callbacks from flash 26 void Accept(CallbackProcessor* cbreg); 27 28 const char* Connect(const char *ip, unsigned short port); 29 void UpdateConnectResult(bool isConnected); 30 void SaveLastUpdateDate(void); 31 void LoadLastUpdateDate(char *out, const char *appDir); 32 void GotoMainMenu(void); 33 34 AutopatcherClient *autopatcherClient; 35 FileListTransfer *fileListTransfer; 36 PacketizedTCP *packetizedTCP; 37 SystemAddress serverAddress; 38 char pathToThisExe[512]; 39 char appDirectory[512]; 40 GPtr<FxDelegate> delegate; 41 GPtr<GFxMovieView> movie; 42 43 }; 44 45