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