Closed Rybadour closed 13 years ago
Does the sprite object currently have a preset image size or does it allow for more variable sizes, like 48 by 32, or 64 by 64, and so on? Or is that not in the code yet, or even within the Sprite.cpp and SpriteManager.cpp but rather in the collision detection?
The player object might be of a standard size, but enemy objects could be variable when taking end-level bosses into account. The same could be said of bullets too.
At the moment the code just uses the size of the image. However, to make it expand or shrink the image to any size is not a hard thing to do. I didn't implement it because it wasn't necessary yet. If you would like to add that, please go ahead. Make a small task for it and when you're done mark it as "Needs Review".
I have assigned myself to this task and am fleshing out the sprite system a little bit more and will then close this issue. Further bugs and improvements to the sprite system can be opened as new issues.
commit 687c70e9a2258dc2a8a445be003cf64c2bd55042 in sprites branch finishes a basic implementation of the SpriteManager. I say finishes because now there are mechanisms in place to control the memory allocation for sprites and images.
Closing this issue as soon as someone peer-reviews and approves the changes made in the sprites branch.
This task is complete, the sprite branch was merged into Master.
I've committed some basic code towards handling sprites, but it's not tested and it still may need some work. Check over what's been and talk to me (Ryan) for questions.