Jump to content
  • Advertisement
Sign in to follow this  
templewulf

RECT, CRect & sprite gfx

This topic is 4849 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

I've been tooling around with a basic RPG in C++ using DirectX, and I wanted to move toward OOP, so I'm replacing my RECT / POINT / SIZE structs with CRect, CPoint, etc. My first problem is that it gives me the C2065 error 'CRect' : undeclared identifier, but when I hover over "CRect" with my cursor, the tooltip pops up to tell me what it is and Intellisense completes member functions. So, it appears that MSVC7 knows what CRect is in this file, but when I compile it's an undeclared identifier! My second problem is that instead of the tile-like sprites of Final Fantasy clones, I want to user fuller, richer sprites like you'd find in Street Fighter 2. The problem I'm stumbling on here is that the sprites aren't always the same size when they move. For example: in a fighting game a character might be 40px by 100px, but they make a forward lunge and their sprite is now 70px by 60px or so. Is there any consistent, (and preferrably OOP compatible) solution to variable graphics? Does anyone know much about how to manage sprites or resolve my CRect problem? I have some other questions about sprite graphics, but I already feel like a jerk for talking so much in one post! lol Thanks for your help

Share this post


Link to post
Share on other sites
Advertisement
CRect, CPoint, etc. are classes defined by MFC and WTL/ATL. MSVC++ knows their members because there is most likely a precompiled Intellisense index of sorts for the files that ship with the IDE. To use them you'll have to use MFC or WTL/ATL

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!