   Design Issues
  Powers that be!I am currently working on a few software demo''s to help build up a better understanding and a small portfolio of small game demonstrations. However I often seem to be going back onto myself in a bid to better design my code!My question you ask!? Well it is simple, one of my demos involve a player sprite drawing itself to screen. To achieve this I have designed a Bitmap manager to handle the loading of bmp files after reading a txt file. This then stores their file address, and any details relevent from the txt file into an array of sprite class''s. The player class then on initialzing recieves a pointer to his relevent graphic.So !?...I have a design question! I need an animation class? Where would you see best to place this? The animation is simply calculated by numbering my cells in the bitmap, then drawing the required cell number to screen from its x,y coords in the source bmp (texture file)(Nothing new here!).At the moment I aim for the player object to simply call draw() and perhaps pass some details such as location and his state. The rest is magic!! So how is the best way to implement an animation class!?  Perhaps completly re-design the structure you will !?(sorry to sound like yoda!) Any ideas if u have any would be more than welcome. Many thanks pete.  
  what I did is (assume that u use OO) make animation class which is inherited from the same abtstract class as your sprite class and inherit it to the player and magic class.The abstract class should contain virtual function such as draw() and LoadFormFile().My animation class also contain animate(time) function to calculate or update the animation. to be more flexible and better performance,U can create Animation manager class which contain information of all animation stuffs in the game and control them.But i never use this method because i though it is not necessary for a small game I made and it may make me more problems. 