SpriteAnimate

所属分类:图形图像处理
开发工具:C#
文件大小:38KB
下载次数:26
上传日期:2005-12-26 17:20:26
上 传 者jason98168
说明:  动画屏保,一个图标有十几个实例在屏幕中游动,遇到边界即反弹!可以作为屏保的参考实例。
(animated screensavers, icons have a dozen examples of the screen cursor, which encountered the border rebound! The screensaver can be used as reference case.)

文件列表:
SpriteAnimate\bin\Debug (0, 2005-12-26)
SpriteAnimate\bin (0, 2005-12-26)
SpriteAnimate\obj\Debug (0, 2005-12-26)
SpriteAnimate\obj (0, 2005-12-26)
SpriteAnimate\SpriteAnimate.cs (14003, 2002-11-12)
SpriteAnimate\SpriteAnimate.csproj (4823, 2005-12-26)
SpriteAnimate\SpriteAnimate.csproj.user (1804, 2005-12-26)
SpriteAnimate\SpriteAnimate.jpg (12089, 2002-11-12)
SpriteAnimate\SpriteAnimate.resx (5323, 2002-11-12)
SpriteAnimate\SpriteAnimate.sln (911, 2005-12-26)
SpriteAnimate\SpriteAnimate.sln.old (922, 2002-11-12)
SpriteAnimate\SpriteAnimate.suo (7680, 2005-12-26)
SpriteAnimate (0, 2005-12-26)

//----------------------------------------------------------------------------- // Sample Name: SpriteAnimate Sample // // Copyright (c) 1999-2000 Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- Description =========== SpriteAnimate demonstrates a simple technique to animate DirectDraw surfaces. Path ==== Source: DXSDK\Samples\C#\DirectDraw\SpriteAnimate Executable: DXSDK\Samples\C#\DirectDraw\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.

近期下载者

相关文件


收藏者