00001 /* 00002 =========================================================================== 00003 Copyright (C) 1999-2005 Id Software, Inc. 00004 00005 This file is part of Quake III Arena source code. 00006 00007 Quake III Arena source code is free software; you can redistribute it 00008 and/or modify it under the terms of the GNU General Public License as 00009 published by the Free Software Foundation; either version 2 of the License, 00010 or (at your option) any later version. 00011 00012 Quake III Arena source code is distributed in the hope that it will be 00013 useful, but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 GNU General Public License for more details. 00016 00017 You should have received a copy of the GNU General Public License 00018 along with Foobar; if not, write to the Free Software 00019 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00020 =========================================================================== 00021 */ 00022 // PlugIn.h: interface for the CPlugIn class. 00023 // 00025 00026 #if !defined(AFX_PLUGIN_H__B501A832_5755_11D2_B084_00AA00A410FC__INCLUDED_) 00027 #define AFX_PLUGIN_H__B501A832_5755_11D2_B084_00AA00A410FC__INCLUDED_ 00028 00029 #if _MSC_VER >= 1000 00030 #pragma once 00031 #endif // _MSC_VER >= 1000 00032 00033 class CPlugIn : public CObject 00034 { 00035 private: 00036 HMODULE m_hDLL; 00037 PFN_QERPLUG_INIT m_pfnInit; 00038 PFN_QERPLUG_GETNAME m_pfnGetName; 00039 PFN_QERPLUG_GETCOMMANDLIST m_pfnGetCommandList; 00040 PFN_QERPLUG_DISPATCH m_pfnDispatch; 00041 PFN_QERPLUG_GETFUNCTABLE m_pfnGetFuncTable; 00042 PFN_QERPLUG_GETTEXTUREINFO m_pfnGetTextureInfo; 00043 PFN_QERPLUG_LOADTEXTURE m_pfnLoadTexture; 00044 PFN_QERPLUG_GETSURFACEFLAGS m_pfnGetSurfaceFlags; 00045 PFN_QERPLUG_REGISTERPLUGINENTITIES m_pfnRegisterPluginEntities; 00046 PFN_QERPLUG_INITSURFACEPROPERTIES m_pfnInitSurfaceProperties; 00047 PFN_QERPLUG_REQUESTINTERFACE m_pfnRequestInterface; 00048 CWordArray m_CommandIDs; 00049 CStringArray m_CommandStrings; 00050 CString m_strName; 00051 CString m_strVersion; 00052 00053 // for plugins that provide plugin entities 00054 _QERPlugEntitiesFactory* m_pQERPlugEntitiesFactory; 00055 00056 public: 00057 void InitBSPFrontendPlugin(); 00058 IPluginEntity * CreatePluginEntity( entity_t * ); 00059 HMODULE GetDLLModule() { return m_hDLL; } 00060 void InitSurfacePlugin(); 00061 void RegisterPluginEntities(); 00062 void* getFuncTable(); 00063 bool ownsCommandID(int n); 00064 void addMenuID(int n); 00065 CPlugIn(); 00066 virtual ~CPlugIn(); 00067 bool load(const char *p); 00068 void free(); 00069 const char* getVersionStr(); 00070 const char* getMenuName(); 00071 int getCommandCount(); 00072 const char* getCommand(int n); 00073 void dispatchCommand(const char* p, vec3_t vMin, vec3_t vMax, BOOL bSingleBrush); 00074 00075 _QERTextureInfo *getTextureInfo(); 00076 void loadTexture(LPCSTR pFilename); 00077 00078 LPVOID getSurfaceFlags(); 00079 00080 }; 00081 00082 #endif // !defined(AFX_PLUGIN_H__B501A832_5755_11D2_B084_00AA00A410FC__INCLUDED_)
1.3.9.1