Cheers for the help guys.
I'm working through your code taron, trying to understand it all, but I have ran into a few issues and questions.
How do I declare or reference these within my main code ? (I've tried animation.IDLE, animation[IDLE], Animation.animation[IDLE] but none work, unless as its a struct it works differently to the way I done my enum keys.)
I'm assuming these would be where I code my variables for different animations. I haven't done this or seen this before.
Eg if ATTACK, use animationRow 1, and animationColumns = 12
if IDLE, use animation Row 2 etc.
Then I have added this into my Player struct
4 // Hold the animation data;
5 Animation animation;
However I do get the following errors
C2146: syntax error: missing ';' before identifier 'animation'
C4430: missing type specifier - int assumed.Note C++ does not support default-int
C2039: 'animation' : is not a member of 'Player'(previously all my Player struct worked) And my Player struct is in a objects.h file, if this makes any difference.
I can place this in my main body of code although this would stop PlayerAttack from working as it would no longer reference to player (I think).
I do like the way you wrote this aswell, I understand most of it can see how it works and how it does the animations