954,498 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

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
Junior Poster
193 posts since Aug 2004
Reputation Points: 13
Solved Threads: 2
 

I assume there is a simple bitblt way of doing this :cool:

YoungCoder
Junior Poster
193 posts since Aug 2004
Reputation Points: 13
Solved Threads: 2
 

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

BountyX
Posting Whiz in Training
230 posts since Mar 2004
Reputation Points: 28
Solved Threads: 9
 
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:

YoungCoder
Junior Poster
193 posts since Aug 2004
Reputation Points: 13
Solved Threads: 2
 

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!

1o0oBhP
Posting Pro in Training
445 posts since Dec 2004
Reputation Points: 16
Solved Threads: 6
 
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

YoungCoder
Junior Poster
193 posts since Aug 2004
Reputation Points: 13
Solved Threads: 2
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You