⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 geneditpreviewdlg.h

📁 3D游戏场景编辑器
💻 H
字号:
/****************************************************************************************/
/*  GenEditPreviewDlg.h																	*/
/*                                                                                      */
/*  Author:       Tom Morris															*/
/*  Description:  QuickViewer for viewing *.bsp files with the engine					*/
/*                                                                                      */
/*  The contents of this file are subject to the Genesis3D Public License               */
/*  Version 1.01 (the "License"); you may not use this file except in                   */
/*  compliance with the License. You may obtain a copy of the License at                */
/*  http://www.genesis3d.com                                                            */
/*                                                                                      */
/*  Software distributed under the License is distributed on an "AS IS"                 */
/*  basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.  See                */
/*  the License for the specific language governing rights and limitations              */
/*  under the License.                                                                  */
/*                                                                                      */
/*  The Original Code is Genesis3D, released March 25, 1999.                            */
/*	Genesis3D Version 1.1 released November 15, 1999				                    */
/*  Copyright (C) 1999 WildTangent, Inc. All Rights Reserved							*/
/*                                                                                      */
/*  Prepared for GenEdit-Classic ver. 0.5, Dec. 15, 2000								*/
/****************************************************************************************/


#if !defined(AFX_GENEDITPREVIEWDLG_H__EE526980_C9BC_11D4_9554_B04EBC493420__INCLUDED_)
#define AFX_GENEDITPREVIEWDLG_H__EE526980_C9BC_11D4_9554_B04EBC493420__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// GenEditPreviewDlg.h : header file
//
#include "genesis.h"
/////////////////////////////////////////////////////////////////////////////
// CGenEditPreviewDlg dialog

class CGenEditPreviewDlg : public CDialog
{
// Construction
public:
	CGenEditPreviewDlg(CWnd* pParent = NULL);   // standard constructor

// Dialog Data
	//{{AFX_DATA(CGenEditPreviewDlg)
	enum { IDD = IDD_GENEDIT_PREVIEW };
	CButton	m_zeroCameraBtn;
	CSliderCtrl	m_cameraSliderZ;
	CSliderCtrl	m_cameraSliderY;
	CSliderCtrl	m_cameraSliderX;
	CStatic	m_softwareText;
	CButton	m_previewWithEngineBtn;
	CListCtrl	m_previewLevelList;
	int		m_cameraXPos;
	int		m_cameraYPos;
	int		m_cameraZPos;
	//}}AFX_DATA


// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CGenEditPreviewDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	virtual void CalcWindowRect(LPRECT lpClientRect, UINT nAdjustType = adjustBorder);
	virtual void OnOK();
	//}}AFX_VIRTUAL

// Implementation
protected:

	// Generated message map functions
	//{{AFX_MSG(CGenEditPreviewDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnShowPreviewBtn();
	afx_msg void OnClose();
	afx_msg void OnPreviewBrowseBtn();
	afx_msg void OnRadio640();
	afx_msg void OnRadio1024();
	afx_msg void OnRadio800();
	afx_msg void OnRadioCollide();
	afx_msg void OnRadioNocollide();
	afx_msg void OnSoftwareRadio();
	afx_msg void OnDirect3dRadio();
	afx_msg void OnGlideRadio();
	afx_msg void OnKillfocusCameraX();
	afx_msg void OnKillfocusCameraY();
	afx_msg void OnKillfocusCameraZ();
	afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CSliderCtrl* pScrollBar);
	afx_msg void OnGetMinMaxInfo( MINMAXINFO FAR* lpMMI );
	afx_msg void OnPaint();
	afx_msg UINT OnNcHitTest(CPoint point);
	afx_msg void OnSize(UINT nType, int cx, int cy);
	afx_msg void OnZeroCameraBtn();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
	//Ok here we go...First thing we need to do is declare some varibles.  These variables reflect the different
	//objects in Genesis.
//	HWND						hWnd;			//The window
	geEngine					*Engine;		//The engine object
	geDriver_System				*DrvSys;		//Genesis Driver System
	geDriver					*Driver;		//Your driver (DirectX, Glide, or Software)
	geDriver_Mode				*Mode;			//The mode you selected

	geSound_System				*SoundSys;		//The Genesis Sound System

	geCamera					*Camera;		//The camera object
	GE_Rect						Rect;			//For the camera object's rectangular view
	geXForm3d					XForm;			//Camera's XForm
	geVec3d						m_cameraIn, m_cameraLeft, m_cameraUp;
	geVec3d						m_cameraOldPos, m_cameraNewPos;
	geExtBox					CameraExtBox;
	geWorld						*World;			//World Object

	char						ourdriver;		//Driver we want to use
	CString						m_DriverName, driverString;
	int							Width;			//Width of the mode
	int							Height;			//Height of the mode
	int							run;
	float						OldTimeGetTime;
	float						deltaTime;
	CRect						m_previewRect;
	CWnd						*m_previewWnd;
	CString						m_previewLevelPath;
	bool						m_collisionDetection;
	CButton						*m_softwareRadioBtn, *m_direct3dRadioBtn, *m_glideRadioBtn,
								*m_640RadioBtn, *m_800RadioBtn, *m_1024RadioBtn,
								*m_collideRadioBtn, *m_noCollideRadioBtn;

	CRect						m_restoreRect;
	CRect						m_GripperRect;
	BOOL						m_bDrawGripper;

	//Here are the prototypes of some functions we are going to create
	void		SetDriverChoice();
	void		DisableDlgControls();
	void		EnableDlgControls();
	void		RestoreDialogBox();
	geBoolean	InitEngine(HWND hWnd);
	geBoolean	LoadDriver();		//	post 0.5
	geBoolean	LoadLevel(char *FileName);
	void		Shutdown();
	void		ControlCamera();
	void		MoveCamera(float speed, geVec3d *Direction);
	void		DetectCollisions();
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_GENEDITPREVIEWDLG_H__EE526980_C9BC_11D4_9554_B04EBC493420__INCLUDED_)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -