diff options
author | Ian C <ianc@noddybox.co.uk> | 2007-03-01 00:36:54 +0000 |
---|---|---|
committer | Ian C <ianc@noddybox.co.uk> | 2007-03-01 00:36:54 +0000 |
commit | 6be2806499299bb13edde3481803f28416429902 (patch) | |
tree | ee80944e5af4f9ab002fb91c73f032ee6d385de8 /source/keyboard.c | |
parent | b7fc2934d2cd1e593fe5d1c99678321a21d0948d (diff) |
Changed lower screen to 8-bits and added overlayed text mode. Monitor stub in place. Text mode helpers being developed.
Diffstat (limited to 'source/keyboard.c')
-rw-r--r-- | source/keyboard.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/source/keyboard.c b/source/keyboard.c index 37ae4ef..8853dd1 100644 --- a/source/keyboard.c +++ b/source/keyboard.c @@ -29,8 +29,6 @@ /* ---------------------------------------- STATIC DATA */ -static uint16 white = FB_RGB(31, 31, 31); -static uint16 black = FB_RGB(0, 0, 0); static struct { @@ -238,7 +236,8 @@ static int GetEvent(SoftKeyEvent *ev, int map) x = 3 + (f % 10) * 25; y = 37 + (f / 10) * 30; - FB_Box(x, y, 25, 18, key_state[f].new_state ? white:black); + FB_Box(x, y, 25, 18, key_state[f].new_state ? + COL_WHITE : COL_BLACK); } } } @@ -270,11 +269,16 @@ static int GetEvent(SoftKeyEvent *ev, int map) */ void SK_DisplayKeyboard(uint16 *vram) { - sImage img; + static sImage img; + static int loaded; - loadPCX(keyb_bin,&img); - image8to16(&img); - dmaCopy(img.image.data8,vram,SCREEN_WIDTH*SCREEN_HEIGHT*2); + if (!loaded) + { + loadPCX(keyb_bin,&img); + loaded = true; + } + + FB_Blit(&img,0,0,110); } |