Replace hardcoded frame number in plDTProgressMgr.
@ -157,7 +157,7 @@ void plDTProgressMgr::Draw( plPipeline *p )
if ((currentMs - fLastDraw) > 30)
{
fCurrentImage++;
if (fCurrentImage >= 18)
if (fCurrentImage >= plProgressMgr::NumLoadingFrames())
fCurrentImage = 0;
fLastDraw = currentMs;
@ -246,6 +246,11 @@ char* plProgressMgr::GetLoadingFrameID(int index)
return fImageRotation[0];
}
uint32_t plProgressMgr::NumLoadingFrames() const
return LOADING_RES_COUNT;
const char* plProgressMgr::GetStaticTextID(StaticText staticTextType)
return fStaticTextIDs[staticTextType];
@ -236,6 +236,7 @@ class plProgressMgr
static plProgressMgr* GetInstance() { return fManager; }
static char* GetLoadingFrameID(int index);
uint32_t plProgressMgr::NumLoadingFrames() const;
static const char* GetStaticTextID(StaticText staticTextType);
virtual void Draw( plPipeline *p ) { }