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

📄 dpex.h

📁 关于windows游戏编程的一些文章还有相关图形
💻 H
字号:
#define NAME "dpex"
#define TITLE "DirectPlay Example"

#define WIN32_LEAN_AND_MEAN

#include <windows.h>
#include <windowsx.h>
#include <ddraw.h>
#include <dplay.h>
#include <dplobby.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdarg.h>
#include <mmsystem.h>

#include "resource.h"
//#include "ddutil.h"
//#include "ddtools.h"
//#include "utility.h"
//#include "sprites.h"
#include "dptools.h"
//#include "gameutil.h"

// Externals


// Keyboard commands

#define KEY_THRUST 0x0001 // Thrust with the "5" key
#define KEY_LEFT   0x0004 // Turn left with left arrow
#define KEY_RIGHT  0x0008 // Turn right with right arrow
#define KEY_FIRE   0x0020 // Fire with space bar

#define SYNCKEYS   0x000D

// Game constants

#define SCREEN_X    639
#define SCREEN_Y    479
#define SHIP_X      ( SCREEN_X - 32 )
#define SHIP_Y      ( SCREEN_Y - 32 )
#define SHOT_X      ( SCREEN_X - 3 )
#define SHOT_Y      ( SCREEN_Y - 3 )

#define SAMPLE_RATE		25		// 40 frames per second (ms)
#define SHOTLIFE		2000	// lifetime of shote (ms)
#define SHOTFREQ		500		// time between shots (ms)
#define DISABLEDTIME	4000	// time disabled after hit
#define SYNC_INTERVAL	1000	// time between sync messages
#define INPUT_RATE		25		// 40 times per second (ms)



// Prototypes

//BOOL DDInit( void );


⌨️ 快捷键说明

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