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

📄 main.h

📁 <B>很多DirectX 9.0游戏编程源码例子</B>
💻 H
字号:
//-----------------------------------------------------------------------------
// Name: D3D_AnimationEditor
//
// Description: Example code showing how playback animations.
//
// File Function: Header file for the program (main.h)
//
// Code: 
//		Copyright (c) 2003 LostLogic Corporation. All rights reserved.
//
// Libraries Required:
//		d3d9.lib dxguid.lib d3dx9dt.lib d3dxof.lib comctl32.lib winmm.lib
//
// Local Files Required:
//		main.cpp
//		main.h
//		Object3DClass.cpp
//		Object3DClass.h
//		ExceptionClass.cpp
//		ExceptionClass.h
//		C3DAnimation.cpp
//		C3DAnimation.h
//
// DX Files: 
//		Copyright (c) 1997-2001 Microsoft Corporation. All rights reserved.
//-----------------------------------------------------------------------------
#ifndef MAIN_H
#define MAIN_H

// Set the direct input version
#define DIRECTINPUT_VERSION 0x0800

#define STRICT
#include <windows.h>
#include <stdio.h>
#include <D3DX9.h>
#include "C3DAnimation.h"

//-----------------------------------------------------------------------------
// Global variables
//-----------------------------------------------------------------------------
LPDIRECT3D9             g_pD3D				= NULL; // Used to create the D3DDevice
LPDIRECT3DDEVICE9       g_pd3dDevice		= NULL; // Our rendering device
D3DMATERIAL9			g_mtrlDefault;

// Global array to hold tiles
LPDIRECT3DTEXTURE9      g_pTexture[ 32 ];

// Viewable window offsets
int						g_iXOffset = 0;
int						g_iYOffset = 0;

// Window dimensions
int						g_iWindowWidth	= 640;
int						g_iWindowHeight = 480;

//-----------------------------------------------------------------------------
// Function headers
//-----------------------------------------------------------------------------
LRESULT WINAPI fnMessageProcessor( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam );
HRESULT InitD3D( HWND hWnd );
void vRender( void );
void vCleanup( void );
void vCreateLights(void);
void vSetupView( D3DXVECTOR3 origin, D3DXVECTOR3 target );

//
// 3D globals
//
D3DXVECTOR3	g_vecCameraOrigin;
D3DXVECTOR3	g_vecCameraTarget;

// Global handle to the game window
HWND	g_hWnd;

// Global animation object
C3DAnimation	animTest;

#endif

⌨️ 快捷键说明

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