Would you implement animated Sprites in this way:
class Animation{
LPDIRECTDRAWSURFACE7 lpDDSgraphic;
RECT StartFrame,EndFrame,CurrentFrame,VisiblePart;
int frameDelay;
public:
bool Create(LPDIRECTDRAWSURFACE7 lpDDSx,int LinesOnSurf,
int RowsOnSurf,int StartXindex,int StartYindex,int EndXindex,
int EndYindex, int framedelay,int Colorkey=RGB(255,255,255));
bool Draw(LPDIRECTDRAWSURFACE7 lpDDSbackbuffer,
RECT WhereToDrawThere,RECT WhatToDrawThere);
};
class ComplexSprite{
Animation* AvailableAnimations; // Will be initialized with
// actual Animation-array
int Status; // f.e. jumping, smiling, doesn't matter what
// but I'm hoping to control the Animation shown with this
// member
//
// Rest is something like SetXY() any easy Sprite-functions
};
Do I have to 'invent' a class hierarchy on my own or are there
resources somewhere on the internet I can learn from?
Oh - my very first 'game' is attached, you'll need DirectX 8.1- I guess (and a 800x600x16-able screen)