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