summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bitmap.c12
-rw-r--r--bitmap.h4
-rw-r--r--render.c7
3 files changed, 12 insertions, 11 deletions
diff --git a/bitmap.c b/bitmap.c
index c600a47..a75a407 100644
--- a/bitmap.c
+++ b/bitmap.c
@@ -1,5 +1,5 @@
/*
- * $Id: bitmap.c,v 1.2 2004/12/21 20:26:25 lordjaxom Exp $
+ * $Id: bitmap.c,v 1.3 2004/12/28 01:54:02 lordjaxom Exp $
*/
#include "bitmap.h"
@@ -90,18 +90,18 @@ cText2SkinBitmap::~cText2SkinBitmap() {
mBitmaps.clear();
}
-cBitmap &cText2SkinBitmap::Get(uint &UpdateIn) {
+cBitmap &cText2SkinBitmap::Get(uint &UpdateIn, uint Now) {
if (mBitmaps.size() == 1)
return *mBitmaps[0];
- time_t upd, cur = time_ms();
+ time_t upd;
int diff;
if (mLastGet == 0) {
- mLastGet = cur;
+ mLastGet = Now;
upd = mDelay;
- } else if ((diff = cur - mLastGet) >= mDelay) {
+ } else if ((diff = Now - mLastGet) >= mDelay) {
mCurrent = (mCurrent + 1) % mBitmaps.size();
- mLastGet = cur;
+ mLastGet = Now;
upd = mDelay - diff > 1 ? mDelay - diff : 1;
} else {
upd = mDelay - diff;
diff --git a/bitmap.h b/bitmap.h
index f09d6cc..9d8e8f6 100644
--- a/bitmap.h
+++ b/bitmap.h
@@ -1,5 +1,5 @@
/*
- * $Id: bitmap.h,v 1.2 2004/12/21 20:26:25 lordjaxom Exp $
+ * $Id: bitmap.h,v 1.3 2004/12/28 01:54:02 lordjaxom Exp $
*/
#ifndef VDR_TEXT2SKIN_BITMAP_H
@@ -30,7 +30,7 @@ public:
virtual ~cText2SkinBitmap();
void Reset(void) { mCurrent = 0; mLastGet = 0; }
- cBitmap &Get(uint &UpdateIn);
+ cBitmap &Get(uint &UpdateIn, uint Now);
void SetColor(int Index, tColor Color);
void SetAlpha(int Alpha);
diff --git a/render.c b/render.c
index cac24e7..1d5ed04 100644
--- a/render.c
+++ b/render.c
@@ -1,5 +1,5 @@
/*
- * $Id: render.c,v 1.5 2004/12/28 01:29:35 lordjaxom Exp $
+ * $Id: render.c,v 1.6 2004/12/28 01:54:02 lordjaxom Exp $
*/
#include "render.h"
@@ -278,7 +278,7 @@ void cText2SkinRender::DrawImage(const txPoint &Pos, const txSize &Size, const t
//Dprintf("success loading image\n");
if (Bg) bmp->SetColor(0, *Bg);
if (Fg) bmp->SetColor(1, *Fg);
- mScreen->DrawBitmap(Pos.x, Pos.y, bmp->Get(mUpdateIn));
+ mScreen->DrawBitmap(Pos.x, Pos.y, bmp->Get(mUpdateIn, mNow));
}
}
@@ -457,7 +457,8 @@ void cText2SkinRender::DrawScrolltext(const txPoint &Pos, const txSize &Size, co
{
//Dprintf("trying to draw scrolltext %s\n", Text.c_str());
if (mScroller == NULL)
- mScroller = new cText2SkinScroller(mScreen, Pos.x, Pos.y, Size.w, Size.h, Text.c_str(), Font, Fg ? *Fg : 0, clrTransparent);
+ mScroller = new cText2SkinScroller(mScreen, Pos.x, Pos.y, Size.w, Size.h, Text.c_str(),
+ Font, Fg ? *Fg : 0, clrTransparent);
else
mScroller->DrawText();
}