Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Geeman

General VC++ help

This topic is 5937 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi im currently learning myself to make some kind of a game engine, and im at a stage where i have to start to code some sprite routines. Now the sprite routine has to be a Class but im not sure actually how to implement it. I know how to code it but i dont know WHERE to put it ie i got my main.cpp and few headers.h i made and coded a Class called CSprite now where do i put the Class? Do u put it in its own cpp like CSprite.cpp ? if so how do i use it? thanks

Share this post


Link to post
Share on other sites
Advertisement
yes. create a CSprite.cpp and a CSprite.h. CSprite.h will contain your class declaration (class CSprite { CSprite() ... }; ) and CSprite.cpp will contain the actual method definitions. To use it all you have to do is #include <CSprite.h> and declare a CSprite object. That should get you started since you said you already know how to do the routines and stuff. Good luck.

[edited by - BitBlt on June 24, 2002 2:26:15 PM]

Share this post


Link to post
Share on other sites
At this stage I dont think you should be worrying about game engines and sprites. Learn to walk before you run the New York Marathon.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!