![]() |
| ||
| 新浪首页 > 游戏世界 > 游民论谈 > 文章内容 |
M$新型快速图形API的实用观点
游民部落网友品雪
1.unzip–d解开文件包。 2.用VisualC++4.x编译程序。degug build使用dll版mfc,release build使用表态链接。 3.DirectDraw库和头文件目录应加入搜索路径。图片存在media目录中。 有许多种另人激动的方法使用C++的威力,尤其将VisualC++4.x与DirectDraw结合时。因为DirectDraw和所有其它GamesSDK构件均基于COM对象,使得进行C++封装更为容易。我们希望本文提供的代码能加快你的工作进展。 Gyorgy Grell is on a quest for the perfect it map-editing/color-reduction/palette-editing program for Windows。He can be reached at ggrell@gsoftinc.com。Paul Modzelewski is an independent consult ant specializing in C++ inter active multimedia development for Windows95。He can be reached at pmodz@mnsinc.com。The actual implement at ion of Updat egame is fairly simple, since all the complex work is farmed out tohel perfunctions。There are many exciting ways to use the power of C++,particularly when combining Visual C++ with Direct Draw。 关于调试 使用M$ DevStudio调试DirectDraw应用程序的最好方法是在第二台计算机上使用远程调试特性。当然, 我们中的多数只有一台可用,幸好,我们发现了一个简单的方法以调试程序。 当在debug模式编译应用程序时,窗口属性应该设成这样,以使单步通过多数程序成为可能(除了DirectDrawSurfaceLock()和Unlock()之间的代码)。在调试期间,我们在InitGraphic()函数的第一行放一个断点。一旦运行到该点,我们单步运行每行代码,直到SetDisplayMode()代码。因为我们单步分别运行每一行,DirectDraw将不会扩展接管GDI,我们甚至看不见调试器。这时,得要最大化主窗口,因为屏幕分辨会改变。从这以后,你就可以在代码里放置代码并确实使得调试窗口可见。
|