QE3.H 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670
  1. /*
  2. ===========================================================================
  3. Copyright (C) 1999-2005 Id Software, Inc.
  4. This file is part of Quake III Arena source code.
  5. Quake III Arena source code is free software; you can redistribute it
  6. and/or modify it under the terms of the GNU General Public License as
  7. published by the Free Software Foundation; either version 2 of the License,
  8. or (at your option) any later version.
  9. Quake III Arena source code is distributed in the hope that it will be
  10. useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with Foobar; if not, write to the Free Software
  15. Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  16. ===========================================================================
  17. */
  18. #ifndef __QE3_H__
  19. #define __QE3_H__
  20. // disable data conversion warnings for gl
  21. #pragma warning(disable : 4244) // MIPS
  22. #pragma warning(disable : 4136) // X86
  23. #pragma warning(disable : 4051) // ALPHA
  24. #include <windows.h>
  25. extern "C"
  26. {
  27. #include "qgl.h"
  28. }
  29. #include <math.h>
  30. #include <stdlib.h>
  31. #include <malloc.h>
  32. // this define to use HTREEITEM and MFC stuff in the headers
  33. #define QERTYPES_USE_MFC
  34. #include "qertypes.h"
  35. #include "../libs/cmdlib.h"
  36. #include "mathlib.h"
  37. #include "parse.h"
  38. #include "lbmlib.h"
  39. #include <commctrl.h>
  40. #include "afxres.h"
  41. #include "resource.h"
  42. #include "qedefs.h"
  43. #include "qfiles.h"
  44. #include "textures.h"
  45. #include "brush.h"
  46. #include "entity.h"
  47. #include "map.h"
  48. #include "select.h"
  49. #include "splines/splines.h"
  50. #include "camera.h"
  51. #include "xy.h"
  52. #include "z.h"
  53. #include "mru.h"
  54. #include "undo.h"
  55. #include "terrain.h"
  56. // the dec offsetof macro doesn't work very well...
  57. #define myoffsetof(type,identifier) ((size_t)&((type *)0)->identifier)
  58. // set these before calling CheckParm
  59. extern int myargc;
  60. extern char **myargv;
  61. double I_FloatTime (void);
  62. void Error (char *error, ...);
  63. void Warning (char *error, ...);
  64. int CheckParm (char *check);
  65. void ParseCommandLine (char *lpCmdLine);
  66. int ParseNum (char *str);
  67. char *COM_Parse (char *data);
  68. extern char com_token[1024];
  69. extern qboolean com_eof;
  70. #define MAX_NUM_ARGVS 32
  71. extern int argc;
  72. extern char *argv[MAX_NUM_ARGVS];
  73. typedef struct
  74. {
  75. int p1, p2;
  76. face_t *f1, *f2;
  77. } pedge_t;
  78. typedef struct
  79. {
  80. int iSize;
  81. int iTexMenu; // nearest, linear, etc
  82. float fGamma; // gamma for textures
  83. char szProject[256]; // last project loaded
  84. vec3_t colors[COLOR_LAST];
  85. qboolean show_names;
  86. qboolean show_coordinates;
  87. int exclude;
  88. int m_nTextureTweak;
  89. } SavedInfo_t;
  90. //
  91. // system functions
  92. //
  93. // TTimo NOTE: WINAPI funcs can be accessed by plugins
  94. void Sys_UpdateStatusBar( void );
  95. void WINAPI Sys_UpdateWindows (int bits);
  96. void Sys_Beep (void);
  97. void Sys_ClearPrintf (void);
  98. void Sys_Printf (char *text, ...);
  99. double Sys_DoubleTime (void);
  100. void Sys_GetCursorPos (int *x, int *y);
  101. void Sys_SetCursorPos (int x, int y);
  102. void Sys_SetTitle (char *text);
  103. void Sys_BeginWait (void);
  104. void Sys_EndWait (void);
  105. void Sys_Status(const char *psz, int part);
  106. /*
  107. ** most of the QE globals are stored in this structure
  108. */
  109. typedef struct
  110. {
  111. qboolean d_showgrid;
  112. int d_gridsize;
  113. int d_num_entities;
  114. entity_t *d_project_entity;
  115. float d_new_brush_bottom_z,
  116. d_new_brush_top_z;
  117. HINSTANCE d_hInstance;
  118. HGLRC d_hglrcBase;
  119. HDC d_hdcBase;
  120. HWND d_hwndMain;
  121. HWND d_hwndCamera;
  122. HWND d_hwndEdit;
  123. HWND d_hwndEntity;
  124. HWND d_hwndTexture;
  125. HWND d_hwndXY;
  126. HWND d_hwndZ;
  127. HWND d_hwndStatus;
  128. HWND d_hwndGroup;
  129. HWND d_hwndMedia;
  130. vec3_t d_points[MAX_POINTS];
  131. int d_numpoints;
  132. pedge_t d_edges[MAX_EDGES];
  133. int d_numedges;
  134. // terrain variables
  135. float d_terrainBrushSize;
  136. terrainnoise_t d_terrainNoiseType;
  137. terrainfalloff_t d_terrainFalloff;
  138. terrainbrush_t d_terrainBrush;
  139. int d_terrainWidth;
  140. int d_terrainHeight;
  141. terrainVert_t *d_terrapoints[MAX_TERRA_POINTS];
  142. int d_numterrapoints;
  143. int d_num_move_points;
  144. float *d_move_points[4096];
  145. qtexture_t *d_qtextures;
  146. texturewin_t d_texturewin;
  147. int d_pointfile_display_list;
  148. xy_t d_xyOld;
  149. LPMRUMENU d_lpMruMenu;
  150. SavedInfo_t d_savedinfo;
  151. int d_workcount;
  152. // connect entities uses the last two brushes selected
  153. int d_select_count;
  154. brush_t *d_select_order[2];
  155. vec3_t d_select_translate; // for dragging w/o making new display lists
  156. select_t d_select_mode;
  157. idPointListInterface *selectObject; //
  158. int d_font_list;
  159. int d_parsed_brushes;
  160. qboolean show_blocks;
  161. // Timo
  162. // tells if we are internally using brush primitive (texture coordinates and map format)
  163. // this is a shortcut for IntForKey( g_qeglobals.d_project_entity, "brush_primit" )
  164. // NOTE: must keep the two ones in sync
  165. BOOL m_bBrushPrimitMode;
  166. // used while importing brush data from file or memory buffer
  167. // tells if conversion between map format and internal preferences ( m_bBrushPrimitMode ) is needed
  168. qboolean bNeedConvert;
  169. qboolean bOldBrushes;
  170. qboolean bPrimitBrushes;
  171. vec3_t d_vAreaTL;
  172. vec3_t d_vAreaBR;
  173. // tells if we are using .INI files for prefs instead of registry
  174. qboolean use_ini;
  175. // even in .INI mode we use the registry for all void* prefs
  176. char use_ini_registry[64];
  177. //Timo
  178. // tells we have surface properties plugin
  179. qboolean bSurfacePropertiesPlugin;
  180. // tells we are using a BSP frontend plugin
  181. qboolean bBSPFrontendPlugin;
  182. qboolean dontDrawSelectedOutlines;
  183. } QEGlobals_t;
  184. //void *qmalloc (size_t size);
  185. char *copystring (char *s);
  186. char *ExpandReletivePath (char *p);
  187. void Pointfile_Delete (void);
  188. void WINAPI Pointfile_Check (void);
  189. void Pointfile_Next (void);
  190. void Pointfile_Prev (void);
  191. void Pointfile_Clear (void);
  192. void Pointfile_Draw( void );
  193. void Pointfile_Load( void );
  194. //
  195. // drag.c
  196. //
  197. void Drag_Begin (int x, int y, int buttons,
  198. vec3_t xaxis, vec3_t yaxis,
  199. vec3_t origin, vec3_t dir);
  200. void Drag_MouseMoved (int x, int y, int buttons);
  201. void Drag_MouseUp (int nButtons = 0);
  202. //
  203. // csg.c
  204. //
  205. void CSG_MakeHollow (void);
  206. void CSG_Subtract (void);
  207. void CSG_Merge (void);
  208. //
  209. // vertsel.c
  210. //
  211. void SetupVertexSelection (void);
  212. void SelectEdgeByRay (vec3_t org, vec3_t dir);
  213. void SelectVertexByRay (vec3_t org, vec3_t dir);
  214. void ConnectEntities (void);
  215. extern int update_bits;
  216. extern int screen_width;
  217. extern int screen_height;
  218. extern HANDLE bsp_process;
  219. extern HANDLE g_hBSPOutput;
  220. extern HANDLE g_hBSPInput;
  221. char *TranslateString (char *buf);
  222. void ProjectDialog (void);
  223. void FillTextureMenu (CStringArray* pArray = NULL);
  224. void FillBSPMenu (void);
  225. BOOL CALLBACK Win_Dialog (
  226. HWND hwndDlg, // handle to dialog box
  227. UINT uMsg, // message
  228. WPARAM wParam, // first message parameter
  229. LPARAM lParam // second message parameter
  230. );
  231. //
  232. // win_cam.c
  233. //
  234. void WCam_Create (HINSTANCE hInstance);
  235. //
  236. // win_xy.c
  237. //
  238. void WXY_Create (HINSTANCE hInstance);
  239. //
  240. // win_z.c
  241. //
  242. void WZ_Create (HINSTANCE hInstance);
  243. //
  244. // win_ent.c
  245. //
  246. //
  247. // win_main.c
  248. //
  249. void Main_Create (HINSTANCE hInstance);
  250. extern BOOL SaveWindowState(HWND hWnd, const char *pszName);
  251. extern BOOL LoadWindowState(HWND hWnd, const char *pszName);
  252. extern BOOL SaveRegistryInfo(const char *pszName, void *pvBuf, long lSize);
  253. extern BOOL LoadRegistryInfo(const char *pszName, void *pvBuf, long *plSize);
  254. //
  255. // entityw.c
  256. //
  257. BOOL CreateEntityWindow(HINSTANCE hInstance);
  258. void FillClassList (void);
  259. BOOL UpdateEntitySel(eclass_t *pec);
  260. void SetInspectorMode(int iType);
  261. int DrawTexControls(HWND hWnd);
  262. void SetSpawnFlags(void);
  263. void GetSpawnFlags(void);
  264. void SetKeyValuePairs(bool bClearMD3 = false);
  265. extern void BuildGammaTable(float g);
  266. BOOL GetSelectAllCriteria(CString &strKey, CString &strVal);
  267. // win_dlg.c
  268. void DoGamma(void);
  269. void DoFind(void);
  270. void DoRotate(void);
  271. void DoSides(bool bCone = false, bool bSphere = false, bool bTorus = false);
  272. void DoAbout(void);
  273. void DoSurface();
  274. /*
  275. ** QE function declarations
  276. */
  277. void QE_CheckAutoSave( void );
  278. void WINAPI QE_ConvertDOSToUnixName( char *dst, const char *src );
  279. void QE_CountBrushesAndUpdateStatusBar( void );
  280. void WINAPI QE_CheckOpenGLForErrors(void);
  281. void QE_ExpandBspString (char *bspaction, char *out, char *mapname, bool useTemps);
  282. void QE_Init (void);
  283. qboolean QE_KeyDown (int key, int nFlags = 0);
  284. qboolean QE_LoadProject (char *projectfile);
  285. qboolean QE_SingleBrush (bool bQuiet = false);
  286. // sys stuff
  287. void Sys_MarkMapModified (void);
  288. /*
  289. ** QE Win32 function declarations
  290. */
  291. int WINAPI QEW_SetupPixelFormat(HDC hDC, qboolean zbuffer );
  292. void QEW_StopGL( HWND hWnd, HGLRC hGLRC, HDC hDC );
  293. /*
  294. ** extern declarations
  295. */
  296. extern QEGlobals_t g_qeglobals;
  297. //++timo clean (moved into qertypes.h)
  298. //enum VIEWTYPE {YZ, XZ, XY};
  299. qboolean IsBrushSelected(brush_t* bSel);
  300. // curve brushes
  301. void Curve_MakeCurvedBrush (qboolean negative, qboolean top, qboolean bottom,
  302. qboolean s1, qboolean s2, qboolean s3, qboolean s4);
  303. void Curve_Invert (void);
  304. void Curve_AddFakePlanes( brush_t *B );
  305. void Curve_StripFakePlanes( brush_t *B );
  306. void Curve_BuildPoints (brush_t *b);
  307. void Curve_XYDraw (brush_t *b);
  308. void Curve_CameraDraw (brush_t *b);
  309. void Curve_WriteFile (char *name);
  310. // patch stuff
  311. extern bool g_bSameView;
  312. extern int g_nPatchClickedView;
  313. bool within(vec3_t vTest, vec3_t vTL, vec3_t vBR);
  314. void Brush_RebuildBrush(brush_t *b, vec3_t vMins, vec3_t vMaxs );
  315. patchMesh_t* MakeNewPatch();
  316. brush_t* AddBrushForPatch(patchMesh_t *pm, bool bLinkToWorld = true);
  317. brush_t* Patch_GenericMesh(int nWidth, int nHeight, int nOrientation = 2, bool bDeleteSource = true, bool bOverride = false);
  318. void Patch_ReadFile (char *name);
  319. void Patch_WriteFile (char *name);
  320. void Patch_BuildPoints (brush_t *b);
  321. void Patch_Move(patchMesh_t *p, const vec3_t vMove, bool bRebuild = false);
  322. //++timo had to add a default value for bSnap (see Patch_ApplyMatrix call from Select_ApplyMatrix in select.cpp)
  323. void Patch_ApplyMatrix(patchMesh_t *p, const vec3_t vOrigin, const vec3_t vMatrix[3], bool bSnap = false);
  324. void Patch_EditPatch();
  325. void Patch_Deselect();
  326. void Patch_Deselect(patchMesh_t *p);
  327. void Patch_Delete(patchMesh_t *p);
  328. int Patch_MemorySize(patchMesh_t *p);
  329. void Patch_Select(patchMesh_t *p);
  330. void Patch_Scale(patchMesh_t *p, const vec3_t vOrigin, const vec3_t vAmt, bool bRebuilt = true);
  331. void Patch_Cleanup();
  332. void Patch_SetView(int n);
  333. void Patch_SetTexture(patchMesh_t *p, texdef_t *tex_def, IPluginTexdef* pPlugTexdef = NULL);
  334. void Patch_BrushToMesh(bool bCone = false, bool bBevel = false, bool bEndcap = false, bool bSquare = false, int nHeight = 3);
  335. bool Patch_DragScale(patchMesh_t *p, vec3_t vAmt, vec3_t vMove);
  336. void Patch_ReadBuffer(char* pBuff, bool bSelect = false);
  337. void Patch_WriteFile (CMemFile* pMemFile);
  338. void Patch_UpdateSelected(vec3_t vMove);
  339. void Patch_AddRow(patchMesh_t *p);
  340. brush_t* Patch_Parse(bool bOld);
  341. void Patch_Write (patchMesh_t *p, FILE *f);
  342. void Patch_Write (patchMesh_t *p, CMemFile *file);
  343. void Patch_AdjustColumns(patchMesh_t *p, int nCols);
  344. void Patch_AdjustRows(patchMesh_t *p, int nRows);
  345. void Patch_AdjustSelected(bool bInsert, bool bColumn, bool bFlag);
  346. patchMesh_t* Patch_Duplicate(patchMesh_t *pFrom);
  347. void Patch_RotateTexture(patchMesh_t *p, float fAngle);
  348. void Patch_ScaleTexture(patchMesh_t *p, float fx, float fy, bool bFixup = true);
  349. void Patch_ShiftTexture(patchMesh_t *p, float fx, float fy);
  350. void Patch_DrawCam(patchMesh_t *p);
  351. void Patch_DrawXY(patchMesh_t *p);
  352. void Patch_InsertColumn(patchMesh_t *p, bool bAdd);
  353. void Patch_InsertRow(patchMesh_t *p, bool bAdd);
  354. void Patch_RemoveRow(patchMesh_t *p, bool bFirst);
  355. void Patch_RemoveColumn(patchMesh_t *p, bool bFirst);
  356. void Patch_ToggleInverted();
  357. void Patch_Restore(patchMesh_t *p);
  358. void Patch_Save(patchMesh_t *p);
  359. void Patch_SetTextureInfo(texdef_t* pt);
  360. void Patch_NaturalTexturing();
  361. void Patch_ResetTexturing(float fx, float fy);
  362. void Patch_FitTexturing();
  363. void Patch_BendToggle();
  364. void Patch_StartInsDel();
  365. void Patch_BendHandleTAB();
  366. void Patch_BendHandleENTER();
  367. void Patch_SelectBendNormal();
  368. void Patch_SelectBendAxis();
  369. bool WINAPI OnlyPatchesSelected();
  370. bool WINAPI AnyPatchesSelected();
  371. patchMesh_t* SinglePatchSelected();
  372. void Patch_CapCurrent(bool bInvertedBevel = false, bool bInvertedEndcap = false);
  373. void Patch_DisperseRows();
  374. void Patch_DisperseColumns();
  375. void Patch_NaturalizeSelected(bool bCap = false, bool bCycleCap = false);
  376. void Patch_SelectAreaPoints();
  377. void Patch_InvertTexture(bool bY);
  378. void Patch_InsDelToggle();
  379. void Patch_InsDelHandleTAB();
  380. void Patch_InsDelHandleENTER();
  381. void Patch_SetOverlays();
  382. void Patch_ClearOverlays();
  383. void Patch_Thicken(int nAmount, bool bSeam);
  384. void Patch_Transpose();
  385. void Patch_Freeze();
  386. void Patch_UnFreeze(bool bAll);
  387. const char* Patch_GetTextureName();
  388. void Patch_FindReplaceTexture(brush_t *pb, const char *pFind, const char *pReplace, bool bForce);
  389. void Patch_ReplaceQTexture(brush_t *pb, qtexture_t *pOld, qtexture_t *pNew);
  390. void Select_SnapToGrid();
  391. extern bool g_bPatchShowBounds;
  392. extern bool g_bPatchWireFrame;
  393. extern bool g_bPatchWeld;
  394. extern bool g_bPatchDrillDown;
  395. extern bool g_bPatchInsertMode;
  396. extern bool g_bPatchBendMode;
  397. extern vec3_t g_vBendOrigin;
  398. void Patch_FromTriangle(vec5_t vx, vec5_t vy, vec5_t vz);
  399. const char* Patch_GetKeyValue(patchMesh_t *p, const char *pKey);
  400. void Patch_SetEpair(patchMesh_t *p, const char *pKey, const char *pValue);
  401. // group stuff
  402. // group_t are loaded / saved through "group_info" entities
  403. // they hold epairs for group settings and additionnal access info (tree nodes)
  404. typedef struct group_s
  405. {
  406. struct group_s *next;
  407. epair_t *epairs;
  408. HTREEITEM itemOwner;
  409. } group_t;
  410. // NOTES: grouping only enabled in brush primitives mode
  411. // grouping works by naming brushes and setting display properties
  412. // the group hierarchy is not related with the map hierarchy (entity list, brushes etc.)
  413. // brushes with no group are under the "world" node (default for all brushes)
  414. // void Group_GetListFromWorld(CStringArray *pArray);
  415. void Group_RemoveListFromWorld();
  416. // void Group_SetListToWorld(CStringArray *pArray);
  417. // void Group_BuildTree(CTreeCtrl *pTree);
  418. // void Group_DecomposeTree(CTreeCtrl *pTree);
  419. // save group_t as "classname" "group_info" things
  420. void Group_Save(FILE *f);
  421. // clean the brushes ownerItem, clean the treeview and rebuild everything
  422. // is usually called when loading a new map, but may be called anytime
  423. void Group_Init();
  424. void Group_Add(entity_t *e);
  425. // remove a brush from it's current group, will erase the "group" epair if any, and delete the tree control node
  426. void Group_RemoveBrush(brush_t *b);
  427. void Group_AddToWorld(brush_t *b);
  428. // will remove brush of it's current group if any, and will add it wherever needed according to it's "group" key
  429. void Group_AddToProperGroup(brush_t *b);
  430. void Group_AddToSelected(brush_t *b);
  431. // allocate a new group, set name
  432. group_t* Group_Alloc(const char *name);
  433. // we use entities to store information about the groups
  434. // these entities are not linked into the world, and they have no brushes
  435. // only loaded / saved in map file
  436. group_t* Group_ForName(const char *name);
  437. // Timo
  438. // new brush primitive stuff
  439. void ComputeAxisBase(vec3_t normal,vec3_t texS,vec3_t texT );
  440. void FaceToBrushPrimitFace(face_t *f);
  441. void EmitBrushPrimitTextureCoordinates(face_t *, winding_t *);
  442. // EmitTextureCoordinates, is old code used for brush to brush primitive conversion
  443. void EmitTextureCoordinates ( float *xyzst, qtexture_t *q, face_t *f);
  444. void BrushPrimit_Parse(brush_t *);
  445. // compute a fake shift scale rot representation from the texture matrix
  446. void TexMatToFakeTexCoords( vec_t texMat[2][3], float shift[2], float *rot, float scale[2] );
  447. void FakeTexCoordsToTexMat( float shift[2], float rot, float scale[2], vec_t texMat[2][3] );
  448. void ConvertTexMatWithQTexture( brushprimit_texdef_t *texMat1, qtexture_t *qtex1, brushprimit_texdef_t *texMat2, qtexture_t *qtex2 );
  449. // texture locking
  450. void Face_MoveTexture_BrushPrimit(face_t *f, vec3_t delta);
  451. void Select_ShiftTexture_BrushPrimit( face_t *f, int x, int y );
  452. void RotateFaceTexture_BrushPrimit(face_t *f, int nAxis, float fDeg, vec3_t vOrigin );
  453. // used in CCamWnd::ShiftTexture_BrushPrimit
  454. void ComputeBest2DVector( vec3_t v, vec3_t X, vec3_t Y, int &x, int &y );
  455. //
  456. // eclass.cpp
  457. //
  458. extern qboolean parsing_single;
  459. extern qboolean eclass_found;
  460. extern eclass_t *eclass_e;
  461. void Eclass_ScanFile( char *filename );
  462. // for interfaces, we require main plugin header included
  463. #include "qerplugin.h"
  464. //
  465. // SurfaceDlg.cpp and surface properties plugin
  466. //
  467. //++timo some patch in/out stuff is in there, needs to be moved out in a dedicated interface
  468. void WINAPI Patch_Rebuild(patchMesh_t *p);
  469. #include "isurfaceplugin.h"
  470. extern _QERPlugSurfaceTable g_SurfaceTable;
  471. //
  472. // OpenGL interface
  473. //
  474. #include "igl.h"
  475. HGLRC WINAPI QERApp_GetQeglobalsHGLRC();
  476. void WINAPI QERApp_HookXYGLWindow(IGLWindow* pGLW);
  477. void WINAPI QERApp_UnHookGLWindow(IGLWindow* pGLW);
  478. void DrawPluginEntities( VIEWTYPE vt );
  479. //
  480. // ISelectedFace interface
  481. //
  482. #include "ISelectedFace.h"
  483. int WINAPI QERApp_ISelectedFace_GetTextureNumber();
  484. int WINAPI QERApp_GetFaceInfo(_QERFaceData *pFaceData, winding_t *pWinding);
  485. int WINAPI QERApp_SetFaceInfo(_QERFaceData *pFaceData);
  486. void WINAPI QERApp_GetTextureSize( int Size[2] );
  487. //
  488. // IEpairs interface
  489. //
  490. #include "IEpairs.h"
  491. #include "EpairsWrapper.h"
  492. //
  493. // IPluginEntities interface
  494. //
  495. #include "IPluginEntities.h"
  496. int WINAPI QERApp_EClassScanDir( char *dir, HMODULE plugID );
  497. //
  498. // ShaderInfo.cpp
  499. //
  500. #include "ShaderInfo.h"
  501. //
  502. // TexWnd.cpp
  503. //
  504. CShaderInfo* hasShader(const char *pName);
  505. //
  506. // IScripLib interface
  507. // GetToken, UnGetToken, etc.
  508. #include "IScriplib.h"
  509. extern FILE *g_File;
  510. void WINAPI QERApp_MapPrintf_FILE( char *text, ... );
  511. //
  512. // ISurfacePlugin interface
  513. //
  514. void WINAPI QERApp_GetTwoSelectedPatch( patchMesh_t **p1, patchMesh_t **p2 );
  515. //
  516. // IBSPFrontend interface
  517. //
  518. #include "IBSPFrontend.h"
  519. extern _QERPlugBSPFrontendTable g_BSPFrontendTable;
  520. extern CStringArray g_BSPFrontendCommands;
  521. //
  522. // IMessaging interface
  523. #include "IMessaging.h"
  524. #include "Messaging.h"
  525. void WINAPI QERApp_HookWindow(IWindowListener* pListen);
  526. void WINAPI QERApp_UnHookWindow(IWindowListener* pListen);
  527. IXYWndWrapper* WINAPI QERApp_GetXYWndWrapper();
  528. void WINAPI QERApp_HookListener(IListener* pListen, int Msg);
  529. int WINAPI QERApp_UnHookListener(IListener* pListen);
  530. void DispatchRadiantMsg( int Msg );
  531. // dispatch for IWindowListener entities
  532. void DispatchOnMouseMove(UINT nFlags, int x, int y);
  533. bool DispatchOnLButtonDown(UINT nFlags, int x, int y);
  534. bool DispatchOnLButtonUp(UINT nFlags, int x, int y);
  535. //
  536. // IShaders interface
  537. CShaderInfo* SetNameShaderInfo(qtexture_t* q, const char* pPath, const char* pName);
  538. qtexture_t* Texture_LoadTGATexture (unsigned char* pPixels, int nWidth, int nHeight, char* pPath, int nFlags, int nContents, int nValue );
  539. #include "IShaders.h"
  540. qtexture_t* WINAPI QERApp_TryTextureForName(const char* name);
  541. #endif