diff options
author | Thomas Günther <tom@toms-cafe.de> | 2005-05-16 16:11:51 +0200 |
---|---|---|
committer | Thomas Günther <tom@toms-cafe.de> | 2005-05-16 16:11:51 +0200 |
commit | edb972c60dbd5f7fb0f69ef8283fb1b46b8bc3fb (patch) | |
tree | 0f9a6f694c607a92b86f0e87a89fafdb66896fe3 | |
parent | 8b7dc89da106ed4584ba8e16e0f9ea9fcf819c28 (diff) | |
download | vdr-plugin-spider-edb972c60dbd5f7fb0f69ef8283fb1b46b8bc3fb.tar.gz vdr-plugin-spider-edb972c60dbd5f7fb0f69ef8283fb1b46b8bc3fb.tar.bz2 |
Reduced flickering on VDR >= 1.3.7
-rw-r--r-- | HISTORY | 1 | ||||
-rw-r--r-- | TODO | 3 | ||||
-rw-r--r-- | game.c | 10 |
3 files changed, 11 insertions, 3 deletions
@@ -9,3 +9,4 @@ XXXX-XX-XX: Version 0.1.1 - Fixed compilation with woody - Improved cover.xpm +- Reduced flickering on VDR >= 1.3.7 @@ -1,7 +1,6 @@ To-do list for the spider plugin ================================ -- reduce flickering -- user-defined variantions +- user-defined variations - hiding pack and final heaps - varying card distance in piles - resume a game @@ -3,7 +3,7 @@ * * See the README file for copyright information and how to reach the author. * - * $Id: game.c 2 2005-05-14 22:25:56Z tom $ + * $Id: game.c 7 2005-05-16 14:11:51Z tom $ */ #include "game.h" @@ -30,6 +30,8 @@ a->bpp, true) #define clrGray50 clrBackground #define Color GetColor + #define savePalette(bitmap) savePalette(2) + #define SetPalette(palette, area) Width('X') #endif @@ -283,7 +285,13 @@ void SpiderGame::paint() int x2 = xPos + width - 1; int y1 = yPos; int y2 = yPos + height - 1; + + // Save and restore palette to reduce flickering + cPalette savePalette(*osd->GetBitmap(0)); osd->DrawRectangle(x1, y1, x2, y2, clrGray50); + osd->SetPalette(savePalette, 0); + + // Paint red frame osd->DrawRectangle(x1, y1, x2, y1 + 1, clrRed); osd->DrawRectangle(x1, y1, x1 + 1, y2, clrRed); osd->DrawRectangle(x1, y2 - 1, x2, y2, clrRed); |