SpriteAnimate

所属分类:DirextX编程
开发工具:Visual C++
文件大小:192KB
下载次数:12
上传日期:2008-01-17 17:03:06
上 传 者kaka360
说明:  使用DirectX开发的屏幕保护程序,适合刚接触DirectX开发学习。主要用到了directshow
(Developed using the DirectX screen saver for the development of learning刚接触DirectX. The main use of DirectShow)

文件列表:
SpriteAnimate\animate.bmp (92216, 2002-12-16)
SpriteAnimate\directx.ico (1078, 2002-12-16)
SpriteAnimate\resource.h (641, 2002-12-16)
SpriteAnimate\spriteanimate.cpp (17421, 2006-05-14)
SpriteAnimate\spriteanimate.dsp (4570, 2002-12-16)
SpriteAnimate\spriteanimate.dsw (549, 2002-12-16)
SpriteAnimate\spriteanimate.mak (5656, 2002-12-16)
SpriteAnimate\spriteanimate.rc (1915, 2002-12-16)
SpriteAnimate\spriteanimate.sln (915, 2006-05-14)
SpriteAnimate\spriteanimate.suo (9728, 2006-05-14)
SpriteAnimate\spriteanimate.vcproj (4992, 2006-05-14)
SpriteAnimate\spriteanimate.ncb (207872, 2006-05-14)
SpriteAnimate\dxutil.cpp (23668, 2002-12-16)
SpriteAnimate\dxutil.h (5147, 2002-12-16)
SpriteAnimate\spriteanimate.aps (149144, 2006-05-14)
SpriteAnimate\Debug (0, 2006-05-14)
SpriteAnimate (0, 2006-05-14)

//----------------------------------------------------------------------------- // Sample Name: SpriteAnimate Sample // // Copyright (c) 1999-2001 Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- Description =========== SpriteAnimate demonstrates a simple technique to animate DirectDraw surfaces. Path ==== Source: DXSDK\Samples\Multimedia\DDraw\SpriteAnimate Executable: DXSDK\Samples\Multimedia\DDraw\Bin User's Guide ============ SpriteAnimate requires no user input. Press the ESC key to quit the program. Programming Notes ================= For details on how to setup a full-screen DirectDraw app, see the FullScreenMode sample. One simple method to animate sprites in DirectDraw is author a single bitmap file to contain many frames of animation. The program then stores the current frame indicator in each sprite's state. From this current frame indicator, it can progmatically derive a src rect that encompasses only a single frame of animation in the off-screen plain surface. The rect then is blited from the off-screen plain surface to the back buffer. InitDirectDraw() in the sample shows how to build an cached array of these source rects. DisplayFrame() then access this array based on each sprite's current frame.

近期下载者

相关文件


收藏者