DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   C (http://www.daniweb.com/forums/forum118.html)
-   -   Using sprites... (http://www.daniweb.com/forums/thread21509.html)

YoungCoder Apr 5th, 2005 4:23 pm
Using sprites...
 
Hi there,

I have an image that is split into lots of little images that when flipped through would effectively animate the character. :cool:

How would i go about playing through the images, i assume i would somehow map the image into a two-dimensional array and then just run through the required parts, how would i do this?

Regards,
YoungCoder

YoungCoder Apr 6th, 2005 2:15 pm
Re: Using sprites...
 
I assume there is a simple bitblt way of doing this :cool:

BountyX Apr 6th, 2005 3:00 pm
Re: Using sprites...
 
Are the images dynamically loaded or static (resource)? What image format are you using for the images?

YoungCoder Apr 6th, 2005 3:18 pm
Re: Using sprites...
 
Quote:

Originally Posted by BountyX
Are the images dynamically loaded or static (resource)? What image format are you using for the images?

Loading from a .gif allthough i can easily convert it to .bmp or other formats to make it easier :mrgreen:

1o0oBhP Apr 7th, 2005 8:16 pm
Re: Using sprites...
 
You want to load them into a one dimension array really as then each array index represents a frame of animation. This could be done using windows functions quite easily (BitBlt function and the WM_TIMER message are two things to research). Curiously the win32 function LoadImage can take either bmps or gifs take your pick!

YoungCoder Apr 8th, 2005 7:14 am
Re: Using sprites...
 
Quote:

Originally Posted by 1o0oBhP
You want to load them into a one dimension array really as then each array index represents a frame of animation. This could be done using windows functions quite easily (BitBlt function and the WM_TIMER message are two things to research). Curiously the win32 function LoadImage can take either bmps or gifs take your pick!

Cheers :) Out of curiosity is there any kind of resource like the php.net of the win32 API :p I'm always looking to find new functions :D


All times are GMT -4. The time now is 9:24 am.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC