资源简介
打砖块C++源码,有兴趣的去看看

代码片段和文件信息
// BLACKBOX.CPP - Game Engine
// INCLUDES ///////////////////////////////////////////////////
#define WIN32_LEAN_AND_MEAN // make sure all macros are included
#include // include important windows stuff
#include
#include
#include // include important C/C++ stuff
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include // directX includes
#include “blackbox.h“ // game library includes
// DEFINES ////////////////////////////////////////////////////
// TYPES //////////////////////////////////////////////////////
// PROTOTYPES /////////////////////////////////////////////////
// EXTERNALS //////////////////////////////////////////////////
extern HWND main_window_handle; // save the window handle
extern HINSTANCE main_instance; // save the instance
// GLOBALS ////////////////////////////////////////////////////
LPDIRECTDRAW7 lpdd = NULL; // dd object
LPDIRECTDRAWSURFACE7 lpddsprimary = NULL; // dd primary surface
LPDIRECTDRAWSURFACE7 lpddsback = NULL; // dd back surface
LPDIRECTDRAWPALETTE lpddpal = NULL; // a pointer to the created dd palette
LPDIRECTDRAWCLIPPER lpddclipper = NULL; // dd clipper
PALETTEENTRY palette[256]; // color palette
PALETTEENTRY save_palette[256]; // used to save palettes
DDSURFACEDESC2 ddsd; // a direct draw surface description struct
DDBLTFX ddbltfx; // used to fill
DDSCAPS2 ddscaps; // a direct draw surface capabilities struct
HRESULT ddrval; // result back from dd calls
DWORD start_clock_count = 0; // used for timing
// these defined the general clipping rectangle
int min_clip_x = 0 // clipping rectangle
max_clip_x = SCREEN_WIDTH-1
min_clip_y = 0
max_clip_y = SCREEN_HEIGHT-1;
// these are overwritten globally by DD_Init()
int screen_width = SCREEN_WIDTH // width of screen
screen_height = SCREEN_HEIGHT // height of screen
screen_bpp = SCREEN_BPP; // bits per pixel
// FUNCTIONS //////////////////////////////////////////////////
int DD_Init(int width int height int bpp)
{
// this function initializes directdraw
int index; // looping variable
// create object and test for error
if (DirectDrawCreateEx(NULL (void **)&lpdd IID_IDirectDraw7 NULL)!=DD_OK)
return(0);
// set cooperation level to windowed mode normal
if (lpdd->SetCooperativeLevel(main_window_handle
DDSCL_ALLOWMODEX | DDSCL_FULLSCREEN |
DDSCL_EXCLUSIVE | DDSCL_ALLOWREBOOT)!=DD_OK)
return(0)
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 12469 2001-12-07 10:16 T3DCHAP01\blackbox.cpp
文件 3329 2001-12-07 10:10 T3DCHAP01\blackbox.h
文件 15916 1999-07-06 13:21 T3DCHAP01\freakout.cpp
文件 163909 2001-12-25 09:32 T3DCHAP01\freakout.exe
目录 0 2007-04-24 19:46 T3DCHAP01
----------- --------- ---------- ----- ----
195623 5
相关资源
- 基于MFC的TCP调试助手源码95706
- 移木块游戏,可以自编自玩,vc6.0编写
- C++纯文字DOS超小RPG游戏
- 安科瑞智能电能表MODBUS通讯程序 VC6
- 九齐单片机源码
- Qt画图工具源码(qgraphics draw)
- qt 串口助手源码
- modbus 主机源码
- 《LINUX C编程从初学到精通》光盘源码
- OLED驱动源码
- tm1650+stm32f103源码(board_tm1650.c)
- cheat engine 7.2源码
- CrySearch内存搜索器源码
- FTP客户端源码(c++)
- MFC视频播放器源码(支持avi/wma/mp3等格
- CreatBitmap图片合成源码
- vs2008 can总线通讯源码
- 宠物管理系统课程设计(源码+数据库
- Windows扩展命令程序(源码)
- c语言实现火车订票系统(控制台)源
- 鼠标连点器(附源码)
- c++ 简易贪吃蛇源码
- 杀毒软件源码
- 经典外汇智能交易程序Amazing3.1源码(
- 微型文件系统源码(FatFs)
- 海康私有流分析接口源码(附使用说
- VC6 USB开发源码
- SVM算法实现(源码+文档)
- 俄罗斯方块游戏源码(Tetris)
- 步进电机控制(源码+文档)
评论
共有 条评论