StdAfx.h 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  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. // stdafx.h : include file for standard system include files,
  19. // or project specific include files that are used frequently, but
  20. // are changed infrequently
  21. //
  22. #if !defined(AFX_STDAFX_H__330BBF08_731C_11D1_B539_00AA00A410FC__INCLUDED_)
  23. #define AFX_STDAFX_H__330BBF08_731C_11D1_B539_00AA00A410FC__INCLUDED_
  24. #if _MSC_VER >= 1000
  25. #pragma once
  26. #endif // _MSC_VER >= 1000
  27. #pragma warning(disable: 4305) // For: double to float
  28. #pragma warning(disable: 4800) // For: performance warning on bool conversions
  29. #define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
  30. #include <afxwin.h> // MFC core and standard components
  31. #include <afxext.h> // MFC extensions
  32. #include <afxdisp.h> // MFC OLE automation classes
  33. #ifndef _AFX_NO_AFXCMN_SUPPORT
  34. #include <afxcmn.h> // MFC support for Windows Common Controls
  35. #endif // _AFX_NO_AFXCMN_SUPPORT
  36. //{{AFX_INSERT_LOCATION}}
  37. // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
  38. #endif // !defined(AFX_STDAFX_H__330BBF08_731C_11D1_B539_00AA00A410FC__INCLUDED_)
  39. #include "MainFrm.h"
  40. #include "PrefsDlg.h"
  41. #include "FindTextureDlg.h"
  42. extern CMainFrame* g_pParentWnd;
  43. extern CString g_strAppPath;
  44. extern CPrefsDlg& g_PrefsDlg;
  45. extern CFindTextureDlg& g_dlgFind;
  46. // layout styles
  47. #define QR_SPLIT 0
  48. #define QR_QE4 1
  49. #define QR_4WAY 2
  50. #define QR_SPLITZ 3
  51. // externs
  52. extern void AddSlash(CString&);
  53. extern void DLLBuildDone();
  54. extern void CleanUpEntities();
  55. extern void MFCCreate(HINSTANCE);
  56. extern BOOL Init3Dfx();
  57. extern void FindReplace(CString& strContents, const char* pTag, const char* pValue);
  58. extern void CheckBspProcess();
  59. extern void QE_CountBrushesAndUpdateStatusBar();
  60. extern void QE_CheckAutoSave();
  61. extern qtexture_t *notexture;
  62. extern qtexture_t *current_texture;
  63. extern BOOL SaveWindowState(HWND hWnd, const char *pszName);
  64. extern BOOL DoMru(HWND, WORD);
  65. extern void RunBsp (char *command);
  66. extern void Map_Snapshot();
  67. extern void WXY_Print();
  68. extern void AddProp( void );
  69. extern qboolean DoColor(int iIndex);
  70. extern entity_t *edit_entity;
  71. extern int inspector_mode;
  72. extern bool g_bRotateMode;
  73. extern bool g_bClipMode;
  74. extern bool g_bScaleMode;
  75. extern int g_nScaleHow;
  76. extern bool g_bPathMode;
  77. extern bool ByeByeSurfaceDialog();
  78. extern void RunScript(char* pBuffer);
  79. extern bool ExtractPath_and_Filename(const char* pPath, CString& strPath, CString& strFilename);
  80. extern HINSTANCE g_hOpenGL32;
  81. extern void Select_Scale(float x, float y, float z);
  82. extern void Select_RotateTexture(int amt);
  83. extern void Select_ScaleTexture(int x, int y);
  84. extern void Select_ShiftTexture(int x, int y);
  85. extern void FindReplaceTextures(const char* pFind, const char* pReplace, bool bSelected, bool bForce);
  86. extern void DoProjectSettings();
  87. extern qboolean region_active;
  88. extern void Brush_Print(brush_t* b);
  89. extern void Texture_ShowDirectory (char* pPath, bool Linked = false);
  90. extern void Map_ImportFile (char *filename);
  91. extern void Map_SaveSelected(char* pFilename);
  92. extern void UpdateSurfaceDialog();
  93. extern bool g_bNewFace;
  94. extern void Select_GetTrueMid (vec3_t mid);
  95. extern bool g_bSwitch;
  96. extern brush_t g_brFrontSplits;
  97. extern brush_t g_brBackSplits;
  98. extern CClipPoint g_Clip1;
  99. extern CClipPoint g_Clip2;
  100. extern brush_t* g_pSplitList;
  101. extern CClipPoint g_PathPoints[256];
  102. extern void AcquirePath(int nCount, PFNPathCallback* pFunc);
  103. extern bool g_bScreenUpdates;
  104. extern SCommandInfo g_Commands[];
  105. extern int g_nCommandCount;
  106. extern SKeyInfo g_Keys[];
  107. extern int g_nKeyCount;
  108. extern int inspector_mode;
  109. extern char *bsp_commands[256];
  110. extern void RunScriptByName(char*, bool);
  111. extern void DoNewColor(int* i1, int* i2, int* i3);
  112. extern void UpdateSurfaceDialog();
  113. extern void CSG_SplitBrushByFace (brush_t *in, face_t *f, brush_t **front, brush_t **back);
  114. extern void HandlePopup(CWnd* pWindow, unsigned int uId);
  115. extern z_t z;
  116. extern void Select_Scale(float x, float y, float z);
  117. extern CString g_strProject;
  118. extern void TextureAxisFromPlane(plane_t *pln, vec3_t xv, vec3_t yv);
  119. extern void VectorRotate (vec3_t va, vec3_t vb, vec3_t out);
  120. extern void VectorRotate (vec3_t vIn, vec3_t vRotation, vec3_t vOrigin, vec3_t out);
  121. extern qboolean QE_SaveProject (const char* pProjectFile);
  122. extern void NewBSP(char* pCommandLine, HWND);
  123. extern void NewVIS(char* pCommandLine, HWND);
  124. extern void NewRAD(char* pCommandLine, HWND);
  125. extern void RunTools(char* pCommandLine, HWND, const char*);
  126. extern void Clamp(float& f, int nClamp);
  127. extern void MemFile_fprintf(CMemFile* pMemFile, const char* pText, ...);
  128. extern void SaveWindowPlacement(HWND hwnd, const char* pName);
  129. extern bool LoadWindowPlacement(HWND hwnd, const char* pName);
  130. extern qboolean ConfirmModified (void);
  131. extern void DoPatchInspector();
  132. void UpdatePatchInspector();
  133. extern int BuildShortPathName(const char* pPath, char* pBuffer, int nBufferLen);
  134. extern int g_nBrushId;