Sign in to follow this  

RECT, CRect & sprite gfx

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

This topic is 4513 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this