944,014 Members | Top Members by Rank

Ad:
  • C Discussion Thread
  • Unsolved
  • Views: 2125
  • C RSS
Apr 5th, 2005
0

Using sprites...

Expand Post »
Hi there,

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

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
Similar Threads
Reputation Points: 13
Solved Threads: 2
Junior Poster
YoungCoder is offline Offline
193 posts
since Aug 2004
Apr 6th, 2005
0

Re: Using sprites...

I assume there is a simple bitblt way of doing this
Reputation Points: 13
Solved Threads: 2
Junior Poster
YoungCoder is offline Offline
193 posts
since Aug 2004
Apr 6th, 2005
0

Re: Using sprites...

Are the images dynamically loaded or static (resource)? What image format are you using for the images?
Reputation Points: 28
Solved Threads: 9
Posting Whiz in Training
BountyX is offline Offline
222 posts
since Mar 2004
Apr 6th, 2005
0

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:
Reputation Points: 13
Solved Threads: 2
Junior Poster
YoungCoder is offline Offline
193 posts
since Aug 2004
Apr 7th, 2005
0

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!
Reputation Points: 16
Solved Threads: 6
Posting Pro in Training
1o0oBhP is offline Offline
445 posts
since Dec 2004
Apr 8th, 2005
0

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

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C Forum Timeline: Please can anybody give me an example
Next Thread in C Forum Timeline: Help with copying an array into a struct





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC