From ed9b7a9265fac00fc11a6d464f1953744d53390b Mon Sep 17 00:00:00 2001 From: mattn Date: Sun, 16 Mar 2008 08:46:02 +0000 Subject: [PATCH] * added basic code for ufoai plugin (this still needs the pending filter api patch - that's why it's not included in the build chain yet) git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/branches/ZeroRadiant@207 8a3a26a2-13c4-0310-b231-cf6edde360e5 --- contrib/ufoai/bitmaps/ufoai_actorclip.bmp | Bin 0 -> 1014 bytes contrib/ufoai/bitmaps/ufoai_level1.bmp | Bin 0 -> 198 bytes contrib/ufoai/bitmaps/ufoai_level2.bmp | Bin 0 -> 198 bytes contrib/ufoai/bitmaps/ufoai_level3.bmp | Bin 0 -> 198 bytes contrib/ufoai/bitmaps/ufoai_level4.bmp | Bin 0 -> 198 bytes contrib/ufoai/bitmaps/ufoai_level5.bmp | Bin 0 -> 198 bytes contrib/ufoai/bitmaps/ufoai_level6.bmp | Bin 0 -> 198 bytes contrib/ufoai/bitmaps/ufoai_level7.bmp | Bin 0 -> 198 bytes contrib/ufoai/bitmaps/ufoai_level8.bmp | Bin 0 -> 198 bytes contrib/ufoai/bitmaps/ufoai_nodraw.bmp | Bin 0 -> 1014 bytes contrib/ufoai/bitmaps/ufoai_stepon.bmp | Bin 0 -> 1014 bytes contrib/ufoai/bitmaps/ufoai_weaponclip.bmp | Bin 0 -> 1014 bytes contrib/ufoai/plugin.cpp | 285 +++++++++++++++++++++ contrib/ufoai/plugin.h | 67 +++++ contrib/ufoai/ufoai.def | 8 + contrib/ufoai/ufoai.vcproj | 69 +++++ contrib/ufoai/ufoai_filters.cpp | 105 ++++++++ contrib/ufoai/ufoai_filters.h | 16 ++ 18 files changed, 550 insertions(+) create mode 100644 contrib/ufoai/bitmaps/ufoai_actorclip.bmp create mode 100644 contrib/ufoai/bitmaps/ufoai_level1.bmp create mode 100644 contrib/ufoai/bitmaps/ufoai_level2.bmp create mode 100644 contrib/ufoai/bitmaps/ufoai_level3.bmp create mode 100644 contrib/ufoai/bitmaps/ufoai_level4.bmp create mode 100644 contrib/ufoai/bitmaps/ufoai_level5.bmp create mode 100644 contrib/ufoai/bitmaps/ufoai_level6.bmp create mode 100644 contrib/ufoai/bitmaps/ufoai_level7.bmp create mode 100644 contrib/ufoai/bitmaps/ufoai_level8.bmp create mode 100644 contrib/ufoai/bitmaps/ufoai_nodraw.bmp create mode 100644 contrib/ufoai/bitmaps/ufoai_stepon.bmp create mode 100644 contrib/ufoai/bitmaps/ufoai_weaponclip.bmp create mode 100644 contrib/ufoai/plugin.cpp create mode 100644 contrib/ufoai/plugin.h create mode 100644 contrib/ufoai/ufoai.def create mode 100644 contrib/ufoai/ufoai.vcproj create mode 100644 contrib/ufoai/ufoai_filters.cpp create mode 100644 contrib/ufoai/ufoai_filters.h diff --git a/contrib/ufoai/bitmaps/ufoai_actorclip.bmp b/contrib/ufoai/bitmaps/ufoai_actorclip.bmp new file mode 100644 index 0000000000000000000000000000000000000000..43bdf933ef5cc94894002cf993526f9e78802b68 GIT binary patch literal 1014 zcmZ?r{l?4y24+A~1BeBHm>-B485Dpd1H%EJybw18g9X6E|NjgOxN$?n|NrOk~XAnpR<79gGr#Hjj{l8*dOPCoj-wDc9&{?yb{|NZ=C1Jzvu;ypmT35Y>< suLNRH7@_KixdWYssl!F1t4HVK(gzbqSC7tzsl!F1t4HVK(gza<0AuYzS^xk5 literal 0 HcmV?d00001 diff --git a/contrib/ufoai/bitmaps/ufoai_level1.bmp b/contrib/ufoai/bitmaps/ufoai_level1.bmp new file mode 100644 index 0000000000000000000000000000000000000000..80a4b2996e9dbcf76cec18e761c746dfb15c3fb2 GIT binary patch literal 198 zcmZ?rJ;ne5en3hChy{R{ABY(lSb!u0Lj@2EaYHa0kPX5h@c;jR1`xCb!Z#vs82--s e3y}bljDlbwfS`eH1V76Jf4u@TV# literal 0 HcmV?d00001 diff --git a/contrib/ufoai/bitmaps/ufoai_level2.bmp b/contrib/ufoai/bitmaps/ufoai_level2.bmp new file mode 100644 index 0000000000000000000000000000000000000000..e84e254434fe221653da07189d16146fa36aa9ba GIT binary patch literal 198 zcmYj~!3}^g3&148an7_`^KR!az*Z6{=t-svwbbt&=GG@gU+PRw`2?mC&&Q z7c~!|o^MHEW>9X-vJ}+2MuRm?9{Ho2{CkVc;Dq`zL>ZzCC(Dn%DGO~*`|aQhD#j6R literal 0 HcmV?d00001 diff --git a/contrib/ufoai/bitmaps/ufoai_level3.bmp b/contrib/ufoai/bitmaps/ufoai_level3.bmp new file mode 100644 index 0000000000000000000000000000000000000000..141c32457872bce1579e51417c3b8afa73c0b01f GIT binary patch literal 198 zcmY*Su?>JQ409#K!a##Kf+twm;T~?`Ag<{PRd5n2gd@kbqomt@BXCd_GLs{j(6Iw2 zISs*{Z=*p~VYRZ#Tu`qX1NJ12{3)-B&?jq=HVF}a literal 0 HcmV?d00001 diff --git a/contrib/ufoai/bitmaps/ufoai_level6.bmp b/contrib/ufoai/bitmaps/ufoai_level6.bmp new file mode 100644 index 0000000000000000000000000000000000000000..418fdd280dc849add3cc4d3d307e245e0ef77906 GIT binary patch literal 198 zcmZ?rJ;ne5en3hChy{R{ABY(lSb!u0Lj@2EaYHa0kPX5h@c;jR1`xCb!Z#vs82--s y3y}bljDlbwfJ8Ge2nquE0*qin5XfTy@iAzaJWM^vAcz)_W}q&JIS}(<76Je$4-s1c literal 0 HcmV?d00001 diff --git a/contrib/ufoai/bitmaps/ufoai_level7.bmp b/contrib/ufoai/bitmaps/ufoai_level7.bmp new file mode 100644 index 0000000000000000000000000000000000000000..d82dab61c387a5f974bad9a52dde617aaf298b81 GIT binary patch literal 198 zcmZ?rJ;ne5en3hChy{R{ABY(lSb!u0Lj@2EaYHa0kPX5h@c;jR1`xCb!Z#vs82--s y3y}bljDlbwfJ8F@ML>Lz9EgTvpafVQoMwdZfr4Oh7%j*E;)AS!h=a_7SqK0^mJzT3 literal 0 HcmV?d00001 diff --git a/contrib/ufoai/bitmaps/ufoai_level8.bmp b/contrib/ufoai/bitmaps/ufoai_level8.bmp new file mode 100644 index 0000000000000000000000000000000000000000..c3809538b01aa2cc6b430fa75a63c18c842e401c GIT binary patch literal 198 zcmZ?rJ;ne5en3hChy{R{ABY(lSb!u0Lj@2EaYHa0kPX5h@c;jR1`xCb!Z#vs82--s r3y}bljDlbwfS`e-B485Dpd1H%EJybw18g9U)Ze}?-1cyYu2|NrsfVWR&I zL*D=O4B`I|G9>)p$q@7ZAw$9c!wiZ4_r~{u@v6}J|Ch7o{h#ES`~OeHbd_J0*hcE4*6eg8}q-_Dfxerq38cosnap^gVe5L2>X8k zXvTJi=>Kbh?6(YM{|_fl`hPfS(*Lc|?f=(?H~xQGyc*1h$BD!I|Nkk$SmJhjOy~b^ zH9P*#@hkm*nj!W7R)(nmPZ$cZrxPst8yph;&+sYyUuGQv3=8}JUm2?YcQLpUt$$~1 h_y23z3;u)XvkYlq`=2os5v?B{HXyeRlk|zp9{{z5lzjjI literal 0 HcmV?d00001 diff --git a/contrib/ufoai/bitmaps/ufoai_stepon.bmp b/contrib/ufoai/bitmaps/ufoai_stepon.bmp new file mode 100644 index 0000000000000000000000000000000000000000..828449efa53df7b96b9fd81427b686e52a89f5b7 GIT binary patch literal 1014 zcmZ?r{l?4y24+A~1BeBHm>-B485Dpd1H%EJybw18g9SiD!h-+!aNV9~|M6jbdO>pd z^n&C@y#9c;{|qjL{}~*z{xf*hK(I;pe+JL0{|v50|NTn)|Cg=5{y(T{>i?L|6=2#m zz3zW_)BOJ+S~0TzzhO}3f4kZh|Mjycfw6*n(trDkdH?lOJOAsXcK?@mjsFi8>pcXf z#Oc-M}`?*Qiy0PGP{y8r+H literal 0 HcmV?d00001 diff --git a/contrib/ufoai/bitmaps/ufoai_weaponclip.bmp b/contrib/ufoai/bitmaps/ufoai_weaponclip.bmp new file mode 100644 index 0000000000000000000000000000000000000000..fe6b3485852ca68332315bc63597fea01b897579 GIT binary patch literal 1014 zcmZ?r{l?4y24+A~1BeBHm>-B485Dpd1H%EJybw18g9Si@{r~^?aKrrn|M6jbdO>pd z^n&CDoqppB{~5G5{%0_~@t;Ay?tf13v;TWWPyAms{WFGtFx;;)`9Fi@i~kI^ z-~KZwG=SAR1T_3NbI$p1hu0H=%y&tUZ$$i4{-pX(Umfu7zl;s-6gqpL^f4|e?k)Tv>r literal 0 HcmV?d00001 diff --git a/contrib/ufoai/plugin.cpp b/contrib/ufoai/plugin.cpp new file mode 100644 index 00000000..83562902 --- /dev/null +++ b/contrib/ufoai/plugin.cpp @@ -0,0 +1,285 @@ +/* +Copyright (C) 1999-2007 id Software, Inc. and contributors. +For a list of contributors, see the accompanying CONTRIBUTORS file. + +This file is part of GtkRadiant. + +GtkRadiant is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +GtkRadiant is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GtkRadiant; if not, write to the Free Software +Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include "plugin.h" +#include "ufoai_filters.h" + +#define CMD_SEP "-" +#define CMD_ABOUT "About..." +// ============================================================================= +// Globals + +// function tables +_QERFuncTable_1 g_FuncTable; +_QERQglTable g_QglTable; +_QERFileSystemTable g_FileSystemTable; +_QEREntityTable g_EntityTable; +_QERAppDataTable g_DataTable; + +// the gtk widget +void *g_pMainWidget; + +// ============================================================================= +// plugin implementation + +#define PLUGIN_NAME "UFO:AI plugin" +#define PLUGIN_VERSION "0.1" + +//backwards for some reason +static const char *PLUGIN_COMMANDS = CMD_ABOUT ";" CMD_SEP; +static const char *PLUGIN_ABOUT = "UFO: Alien Invasion plugin " PLUGIN_VERSION "\nby Martin Gerhardy"; + +#define NUM_TOOLBAR_BUTTONS 12 +typedef struct toolbar_button_info_s +{ + char *image; + char *text; + char *tip; + void (*func)(); + IToolbarButton::EType type; +} toolbar_button_info_t; + +static const toolbar_button_info_t toolbar_buttons[NUM_TOOLBAR_BUTTONS] = +{ + { + "ufoai_level1.bmp", + "Filter level1", + "Level 1", + DoLevel1Filtering, + IToolbarButton::eToggleButton + }, + { + "ufoai_level2.bmp", + "Filter level2", + "Level 2", + DoLevel2Filtering, + IToolbarButton::eToggleButton + }, + { + "ufoai_level3.bmp", + "Filter level3", + "Level 3", + DoLevel3Filtering, + IToolbarButton::eToggleButton + }, + { + "ufoai_level4.bmp", + "Filter level4", + "Level 4", + DoLevel4Filtering, + IToolbarButton::eToggleButton + }, + { + "ufoai_level5.bmp", + "Filter level5", + "Level 5", + DoLevel5Filtering, + IToolbarButton::eToggleButton + }, + { + "ufoai_level6.bmp", + "Filter level6", + "Level 6", + DoLevel6Filtering, + IToolbarButton::eToggleButton + }, + { + "ufoai_level7.bmp", + "Filter level7", + "Level 7", + DoLevel7Filtering, + IToolbarButton::eToggleButton + }, + { + "ufoai_level8.bmp", + "Filter level8", + "Level 8", + DoLevel8Filtering, + IToolbarButton::eToggleButton + }, + { + "ufoai_actorclip.bmp", + "Filter actorclip", + "Actorclip", + DoActorClipFiltering, + IToolbarButton::eToggleButton + }, + { + "ufoai_stepon.bmp", + "Filter stepon", + "Stepon", + DoSteponFiltering, + IToolbarButton::eToggleButton + }, + { + "ufoai_weaponclip.bmp", + "Filter weaponclip", + "Weaponclip", + DoWeaponClipFiltering, + IToolbarButton::eToggleButton + }, + { + "ufoai_nodraw.bmp", + "Filter nodraw", + "NoDraw", + DoNoDrawFiltering, + IToolbarButton::eToggleButton + }, +}; + +class UFOAIButton : public IToolbarButton +{ +public: + const toolbar_button_info_s *bi; + virtual const char* getImage() const + { + return bi->image; + } + virtual const char* getText() const + { + return bi->text; + } + virtual const char* getTooltip() const + { + return bi->tip; + } + virtual void activate() const + { + bi->func(); + return ; + } + virtual EType getType() const + { + return bi->type; + } +}; + +UFOAIButton g_ufoaibuttons[NUM_TOOLBAR_BUTTONS]; + +unsigned int ToolbarButtonCount (void) +{ + return NUM_TOOLBAR_BUTTONS; +} + +const IToolbarButton* GetToolbarButton (unsigned int index) +{ + g_ufoaibuttons[index].bi = &toolbar_buttons[index]; + return &g_ufoaibuttons[index]; +} + +extern "C" const char* QERPlug_Init (void *hApp, void* pMainWidget) +{ + g_pMainWidget = pMainWidget; + + UFOAIFilterInit(); + + return PLUGIN_NAME; +} + +extern "C" const char* QERPlug_GetName (void) +{ + return (char *) PLUGIN_NAME; +} + +extern "C" const char* QERPlug_GetCommandList (void) +{ + return (char *) PLUGIN_COMMANDS; +} + +extern "C" void QERPlug_Dispatch (const char *p, vec3_t vMin, vec3_t vMax, bool bSingleBrush) +{ + if (!strcmp(p, CMD_ABOUT)) { + g_FuncTable.m_pfnMessageBox(NULL, PLUGIN_ABOUT, "About", MB_OK, NULL); + } else { + Sys_Printf("Message: %s\n", p); + } +} + +// ============================================================================= +// SYNAPSE + +CSynapseServer* g_pSynapseServer = NULL; +CSynapseClientUFOAI g_SynapseClient; + +#if __GNUC__ >= 4 +#pragma GCC visibility push(default) +#endif +extern "C" CSynapseClient* SYNAPSE_DLL_EXPORT Synapse_EnumerateInterfaces (const char *version, CSynapseServer *pServer) +{ +#if __GNUC__ >= 4 +#pragma GCC visibility pop +#endif + if (strcmp(version, SYNAPSE_VERSION)) { + Syn_Printf("ERROR: synapse API version mismatch: should be '" SYNAPSE_VERSION "', got '%s'\n", version); + return NULL; + } + g_pSynapseServer = pServer; + g_pSynapseServer->IncRef(); + Set_Syn_Printf(g_pSynapseServer->Get_Syn_Printf()); + + g_SynapseClient.AddAPI(TOOLBAR_MAJOR, UFOAI_MINOR, sizeof(_QERPlugToolbarTable)); + g_SynapseClient.AddAPI(PLUGIN_MAJOR, UFOAI_MINOR, sizeof(_QERPluginTable)); + + g_SynapseClient.AddAPI(RADIANT_MAJOR, NULL, sizeof(g_FuncTable), SYN_REQUIRE, &g_FuncTable); + g_SynapseClient.AddAPI(QGL_MAJOR, NULL, sizeof(g_QglTable), SYN_REQUIRE, &g_QglTable); + g_SynapseClient.AddAPI(VFS_MAJOR, "*", sizeof(g_FileSystemTable), SYN_REQUIRE, &g_FileSystemTable); + // get worldspawn + g_SynapseClient.AddAPI(ENTITY_MAJOR, NULL, sizeof(g_EntityTable), SYN_REQUIRE, &g_EntityTable); + // selected brushes + g_SynapseClient.AddAPI(DATA_MAJOR, NULL, sizeof(g_DataTable), SYN_REQUIRE, &g_DataTable); + + return &g_SynapseClient; +} + +bool CSynapseClientUFOAI::RequestAPI (APIDescriptor_t *pAPI) +{ + if (!strcmp(pAPI->major_name, PLUGIN_MAJOR)) { + _QERPluginTable* pTable= static_cast<_QERPluginTable*>(pAPI->mpTable); + + pTable->m_pfnQERPlug_Init = QERPlug_Init; + pTable->m_pfnQERPlug_GetName = QERPlug_GetName; + pTable->m_pfnQERPlug_GetCommandList = QERPlug_GetCommandList; + pTable->m_pfnQERPlug_Dispatch = QERPlug_Dispatch; + return true; + } else if (!strcmp(pAPI->major_name, TOOLBAR_MAJOR)) { + _QERPlugToolbarTable* pTable= static_cast<_QERPlugToolbarTable*>(pAPI->mpTable); + + pTable->m_pfnToolbarButtonCount = &ToolbarButtonCount; + pTable->m_pfnGetToolbarButton = &GetToolbarButton; + return true; + } + + Syn_Printf("ERROR: RequestAPI( '%s' ) not found in '%s'\n", pAPI->major_name, GetInfo()); + return false; +} + +#include "version.h" + +const char* CSynapseClientUFOAI::GetInfo() +{ + return PLUGIN_NAME " plugin built " __DATE__ " " RADIANT_VERSION; +} + +const char* CSynapseClientUFOAI::GetName() +{ + return PLUGIN_NAME; +} + diff --git a/contrib/ufoai/plugin.h b/contrib/ufoai/plugin.h new file mode 100644 index 00000000..09c84b98 --- /dev/null +++ b/contrib/ufoai/plugin.h @@ -0,0 +1,67 @@ +/* +Copyright (C) 1999-2007 id Software, Inc. and contributors. +For a list of contributors, see the accompanying CONTRIBUTORS file. + +This file is part of GtkRadiant. + +GtkRadiant is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +GtkRadiant is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GtkRadiant; if not, write to the Free Software +Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#ifndef _PLUGIN_H_ +#define _PLUGIN_H_ + +/*! +\todo need general notice about lib purpose etc. +and the external dependencies (such as GLib, STL, mathlib etc.) +*/ + +#include +// for CPtrArray for idata.h +#include "missing.h" + +#include "synapse.h" +#include "iplugin.h" +#include "itoolbar.h" +#define USE_QERTABLE_DEFINE +#include "qerplugin.h" +#include "igl.h" +#include "ifilesystem.h" +#include "ientity.h" +#include "idata.h" + +extern _QERFuncTable_1 g_FuncTable; +extern _QERQglTable g_QglTable; +extern _QERFileSystemTable g_FileSystemTable; +extern _QEREntityTable g_EntityTable; +extern _QERAppDataTable g_DataTable; +extern void *g_pMainWidget; + +extern CSynapseServer* g_pSynapseServer; + +class CSynapseClientUFOAI : public CSynapseClient +{ +public: + // CSynapseClient API + bool RequestAPI(APIDescriptor_t *pAPI); + const char* GetInfo(); + const char* GetName(); + + CSynapseClientUFOAI() { } + virtual ~CSynapseClientUFOAI() { } +}; + +#define UFOAI_MINOR "ufo:ai" + +#endif // _PLUGIN_H_ diff --git a/contrib/ufoai/ufoai.def b/contrib/ufoai/ufoai.def new file mode 100644 index 00000000..764cbb4f --- /dev/null +++ b/contrib/ufoai/ufoai.def @@ -0,0 +1,8 @@ +; ufoai.def : Declares the module parameters for the DLL. + +LIBRARY "UFOAI" +DESCRIPTION 'UFOAI Windows Dynamic Link Library' + +EXPORTS + ; Explicit exports can go here + Synapse_EnumerateInterfaces @1 diff --git a/contrib/ufoai/ufoai.vcproj b/contrib/ufoai/ufoai.vcproj new file mode 100644 index 00000000..901a3898 --- /dev/null +++ b/contrib/ufoai/ufoai.vcproj @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/contrib/ufoai/ufoai_filters.cpp b/contrib/ufoai/ufoai_filters.cpp new file mode 100644 index 00000000..3cce5893 --- /dev/null +++ b/contrib/ufoai/ufoai_filters.cpp @@ -0,0 +1,105 @@ + +#include "plugin.h" +#include "ifilters.h" + +#define FilterAdd g_FuncTable.m_pfnFilterAdd + +enum FILTERS { + FILTER_ACTORCLIP, + FILTER_WEAPONCLIP, + FILTER_NODRAW, + FILTER_STEPON, + FILTER_LEVEL1, + FILTER_LEVEL2, + FILTER_LEVEL3, + FILTER_LEVEL4, + FILTER_LEVEL5, + FILTER_LEVEL6, + FILTER_LEVEL7, + FILTER_LEVEL8, + + FILTER_MAX +}; + +static bfilter_t* filters[FILTER_MAX]; + +void UFOAIFilterInit (void) +{ + filters[FILTER_LEVEL1] = FilterAdd(1, 0, "level1", (0x10 << 0)); + filters[FILTER_LEVEL2] = FilterAdd(1, 0, "level2", (0x10 << 1)); + filters[FILTER_LEVEL3] = FilterAdd(1, 0, "level3", (0x10 << 2)); + filters[FILTER_LEVEL4] = FilterAdd(1, 0, "level4", (0x10 << 3)); + filters[FILTER_LEVEL5] = FilterAdd(1, 0, "level5", (0x10 << 4)); + filters[FILTER_LEVEL6] = FilterAdd(1, 0, "level6", (0x10 << 5)); + filters[FILTER_LEVEL7] = FilterAdd(1, 0, "level7", (0x10 << 6)); + filters[FILTER_LEVEL8] = FilterAdd(1, 0, "level8", (0x10 << 7)); +} + +void PerformFiltering (int type) +{ + switch (type) { + default: + Sys_Printf("TODO: Implement filters"); + break; + } +} + +void DoSteponFiltering(void) +{ + PerformFiltering(FILTER_STEPON); +} + +void DoWeaponClipFiltering(void) +{ + PerformFiltering(FILTER_WEAPONCLIP); +} + +void DoActorClipFiltering(void) +{ + PerformFiltering(FILTER_ACTORCLIP); +} + +void DoNoDrawFiltering(void) +{ + PerformFiltering(FILTER_NODRAW); +} + +void DoLevel1Filtering(void) +{ + PerformFiltering(FILTER_LEVEL1); +} + +void DoLevel2Filtering(void) +{ + PerformFiltering(FILTER_LEVEL2); +} + +void DoLevel3Filtering(void) +{ + PerformFiltering(FILTER_LEVEL3); +} + +void DoLevel4Filtering(void) +{ + PerformFiltering(FILTER_LEVEL4); +} + +void DoLevel5Filtering(void) +{ + PerformFiltering(FILTER_LEVEL5); +} + +void DoLevel6Filtering(void) +{ + PerformFiltering(FILTER_LEVEL6); +} + +void DoLevel7Filtering(void) +{ + PerformFiltering(FILTER_LEVEL7); +} + +void DoLevel8Filtering(void) +{ + PerformFiltering(FILTER_LEVEL8); +} diff --git a/contrib/ufoai/ufoai_filters.h b/contrib/ufoai/ufoai_filters.h new file mode 100644 index 00000000..847bd3fb --- /dev/null +++ b/contrib/ufoai/ufoai_filters.h @@ -0,0 +1,16 @@ + +void DoSteponFiltering(void); +void DoWeaponClipFiltering(void); +void DoActorClipFiltering(void); +void DoNoDrawFiltering(void); +void DoLevel1Filtering(void); +void DoLevel2Filtering(void); +void DoLevel3Filtering(void); +void DoLevel4Filtering(void); +void DoLevel5Filtering(void); +void DoLevel6Filtering(void); +void DoLevel7Filtering(void); +void DoLevel8Filtering(void); + +// add the ufoai filters +void UFOAIFilterInit(void);