📄 qe3.h
字号:
#ifndef __QE3_H__
#define __QE3_H__
// disable data conversion warnings for gl
#pragma warning(disable : 4244) // MIPS
#pragma warning(disable : 4136) // X86
#pragma warning(disable : 4051) // ALPHA
#include <windows.h>
extern "C"
{
#include "qgl.h"
}
#include <math.h>
#include <stdlib.h>
#include <malloc.h>
// this define to use HTREEITEM and MFC stuff in the headers
#define QERTYPES_USE_MFC
#include "qertypes.h"
#include "../libs/cmdlib.h"
#include "mathlib.h"
#include "parse.h"
#include "lbmlib.h"
#include <commctrl.h>
#include "afxres.h"
#include "resource.h"
#include "qedefs.h"
#include "qfiles.h"
#include "textures.h"
#include "brush.h"
#include "entity.h"
#include "map.h"
#include "select.h"
#include "camera.h"
#include "xy.h"
#include "z.h"
#include "mru.h"
#include "undo.h"
// the dec offsetof macro doesn't work very well...
#define myoffsetof(type,identifier) ((size_t)&((type *)0)->identifier)
// set these before calling CheckParm
extern int myargc;
extern char **myargv;
double I_FloatTime (void);
void Error (char *error, ...);
void Warning (char *error, ...);
int CheckParm (char *check);
void ParseCommandLine (char *lpCmdLine);
int ParseNum (char *str);
char *COM_Parse (char *data);
extern char com_token[1024];
extern qboolean com_eof;
#define MAX_NUM_ARGVS 32
extern int argc;
extern char *argv[MAX_NUM_ARGVS];
typedef struct
{
int p1, p2;
face_t *f1, *f2;
} pedge_t;
typedef struct
{
int iSize;
int iTexMenu; // nearest, linear, etc
float fGamma; // gamma for textures
char szProject[256]; // last project loaded
vec3_t colors[COLOR_LAST];
qboolean show_names;
qboolean show_coordinates;
int exclude;
int m_nTextureTweak;
} SavedInfo_t;
//
// system functions
//
// TTimo NOTE: WINAPI funcs can be accessed by plugins
void Sys_UpdateStatusBar( void );
void WINAPI Sys_UpdateWindows (int bits);
void Sys_Beep (void);
void Sys_ClearPrintf (void);
void Sys_Printf (char *text, ...);
double Sys_DoubleTime (void);
void Sys_GetCursorPos (int *x, int *y);
void Sys_SetCursorPos (int x, int y);
void Sys_SetTitle (char *text);
void Sys_BeginWait (void);
void Sys_EndWait (void);
void Sys_Status(const char *psz, int part);
/*
** most of the QE globals are stored in this structure
*/
typedef struct
{
qboolean d_showgrid;
int d_gridsize;
int d_num_entities;
entity_t *d_project_entity;
float d_new_brush_bottom_z,
d_new_brush_top_z;
HINSTANCE d_hInstance;
HGLRC d_hglrcBase;
HDC d_hdcBase;
HWND d_hwndMain;
HWND d_hwndCamera;
HWND d_hwndEdit;
HWND d_hwndEntity;
HWND d_hwndTexture;
HWND d_hwndXY;
HWND d_hwndZ;
HWND d_hwndStatus;
HWND d_hwndGroup;
HWND d_hwndMedia;
vec3_t d_points[MAX_POINTS];
int d_numpoints;
pedge_t d_edges[MAX_EDGES];
int d_numedges;
int d_num_move_points;
float *d_move_points[4096];
qtexture_t *d_qtextures;
texturewin_t d_texturewin;
int d_pointfile_display_list;
xy_t d_xyOld;
LPMRUMENU d_lpMruMenu;
SavedInfo_t d_savedinfo;
int d_workcount;
// connect entities uses the last two brushes selected
int d_select_count;
brush_t *d_select_order[2];
vec3_t d_select_translate; // for dragging w/o making new display lists
select_t d_select_mode;
int d_font_list;
int d_parsed_brushes;
qboolean show_blocks;
// Timo
// tells if we are internally using brush primitive (texture coordinates and map format)
// this is a shortcut for IntForKey( g_qeglobals.d_project_entity, "brush_primit" )
// NOTE: must keep the two ones in sync
BOOL m_bBrushPrimitMode;
// used while importing brush data from file or memory buffer
// tells if conversion between map format and internal preferences ( m_bBrushPrimitMode ) is needed
qboolean bNeedConvert;
qboolean bOldBrushes;
qboolean bPrimitBrushes;
vec3_t d_vAreaTL;
vec3_t d_vAreaBR;
// tells if we are using .INI files for prefs instead of registry
qboolean use_ini;
// even in .INI mode we use the registry for all void* prefs
char use_ini_registry[64];
//Timo
// tells we have surface properties plugin
qboolean bSurfacePropertiesPlugin;
// tells we are using a BSP frontend plugin
qboolean bBSPFrontendPlugin;
qboolean dontDrawSelectedOutlines;
} QEGlobals_t;
//void *qmalloc (size_t size);
char *copystring (char *s);
char *ExpandReletivePath (char *p);
void Pointfile_Delete (void);
void WINAPI Pointfile_Check (void);
void Pointfile_Next (void);
void Pointfile_Prev (void);
void Pointfile_Clear (void);
void Pointfile_Draw( void );
void Pointfile_Load( void );
//
// drag.c
//
void Drag_Begin (int x, int y, int buttons,
vec3_t xaxis, vec3_t yaxis,
vec3_t origin, vec3_t dir);
void Drag_MouseMoved (int x, int y, int buttons);
void Drag_MouseUp (int nButtons = 0);
//
// csg.c
//
void CSG_MakeHollow (void);
void CSG_Subtract (void);
void CSG_Merge (void);
//
// vertsel.c
//
void SetupVertexSelection (void);
void SelectEdgeByRay (vec3_t org, vec3_t dir);
void SelectVertexByRay (vec3_t org, vec3_t dir);
void ConnectEntities (void);
extern int update_bits;
extern int screen_width;
extern int screen_height;
extern HANDLE bsp_process;
extern HANDLE g_hBSPOutput;
extern HANDLE g_hBSPInput;
char *TranslateString (char *buf);
void ProjectDialog (void);
void FillTextureMenu (CStringArray* pArray = NULL);
void FillBSPMenu (void);
BOOL CALLBACK Win_Dialog (
HWND hwndDlg, // handle to dialog box
UINT uMsg, // message
WPARAM wParam, // first message parameter
LPARAM lParam // second message parameter
);
//
// win_cam.c
//
void WCam_Create (HINSTANCE hInstance);
//
// win_xy.c
//
void WXY_Create (HINSTANCE hInstance);
//
// win_z.c
//
void WZ_Create (HINSTANCE hInstance);
//
// win_ent.c
//
//
// win_main.c
//
void Main_Create (HINSTANCE hInstance);
extern BOOL SaveWindowState(HWND hWnd, const char *pszName);
extern BOOL LoadWindowState(HWND hWnd, const char *pszName);
extern BOOL SaveRegistryInfo(const char *pszName, void *pvBuf, long lSize);
extern BOOL LoadRegistryInfo(const char *pszName, void *pvBuf, long *plSize);
//
// entityw.c
//
BOOL CreateEntityWindow(HINSTANCE hInstance);
void FillClassList (void);
BOOL UpdateEntitySel(eclass_t *pec);
void SetInspectorMode(int iType);
int DrawTexControls(HWND hWnd);
void SetSpawnFlags(void);
void GetSpawnFlags(void);
void SetKeyValuePairs(bool bClearMD3 = false);
extern void BuildGammaTable(float g);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -