diff options
author | Maurus Cuelenaere <mcuelenaere@gmail.com> | 2009-07-05 19:34:57 +0000 |
---|---|---|
committer | Maurus Cuelenaere <mcuelenaere@gmail.com> | 2009-07-05 19:34:57 +0000 |
commit | 3653aea4f81ef4e9aaf962cbef2663e81858e1f2 (patch) | |
tree | 7e0d64a2720aafd945a648b64b5ad5952945d67f /apps/plugins | |
parent | 80fbb4ec9995bca3c0bba5eb6ab4d9b110cf4fa9 (diff) |
Lua: use rb->screens[] to do painting
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21676 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins')
-rw-r--r-- | apps/plugins/lua/rocklib.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/apps/plugins/lua/rocklib.c b/apps/plugins/lua/rocklib.c index 8dd738e02a..b8d6eeb964 100644 --- a/apps/plugins/lua/rocklib.c +++ b/apps/plugins/lua/rocklib.c @@ -275,8 +275,9 @@ RB_WRAP(lcd_mono_bitmap_part) int y = luaL_checkint(L, 6); int width = luaL_checkint(L, 7); int height = luaL_checkint(L, 8); + int screen = luaL_optint(L, 9, SCREEN_MAIN); - rb->lcd_mono_bitmap_part((const unsigned char *)src->data, src_x, src_y, stride, x, y, width, height); + rb->screens[screen]->mono_bitmap_part((const unsigned char *)src->data, src_x, src_y, stride, x, y, width, height); return 0; } @@ -287,8 +288,9 @@ RB_WRAP(lcd_mono_bitmap) int y = luaL_checkint(L, 3); int width = luaL_checkint(L, 4); int height = luaL_checkint(L, 5); + int screen = luaL_optint(L, 6, SCREEN_MAIN); - rb->lcd_mono_bitmap((const unsigned char *)src->data, x, y, width, height); + rb->screens[screen]->mono_bitmap((const unsigned char *)src->data, x, y, width, height); return 0; } @@ -303,8 +305,9 @@ RB_WRAP(lcd_bitmap_part) int y = luaL_checkint(L, 6); int width = luaL_checkint(L, 7); int height = luaL_checkint(L, 8); + int screen = luaL_optint(L, 9, SCREEN_MAIN); - rb->lcd_bitmap_part(src->data, src_x, src_y, stride, x, y, width, height); + rb->screens[screen]->bitmap_part(src->data, src_x, src_y, stride, x, y, width, height); return 0; } @@ -315,8 +318,9 @@ RB_WRAP(lcd_bitmap) int y = luaL_checkint(L, 3); int width = luaL_checkint(L, 4); int height = luaL_checkint(L, 5); + int screen = luaL_optint(L, 6, SCREEN_MAIN); - rb->lcd_bitmap(src->data, x, y, width, height); + rb->screens[screen]->bitmap(src->data, x, y, width, height); return 0; } @@ -344,8 +348,9 @@ RB_WRAP(lcd_bitmap_transparent_part) int y = luaL_checkint(L, 6); int width = luaL_checkint(L, 7); int height = luaL_checkint(L, 8); + int screen = luaL_optint(L, 9, SCREEN_MAIN); - rb->lcd_bitmap_transparent_part(src->data, src_x, src_y, stride, x, y, width, height); + rb->screens[screen]->transparent_bitmap_part(src->data, src_x, src_y, stride, x, y, width, height); return 0; } @@ -356,8 +361,9 @@ RB_WRAP(lcd_bitmap_transparent) int y = luaL_checkint(L, 3); int width = luaL_checkint(L, 4); int height = luaL_checkint(L, 5); + int screen = luaL_optint(L, 6, SCREEN_MAIN); - rb->lcd_bitmap_transparent(src->data, x, y, width, height); + rb->screens[screen]->transparent_bitmap(src->data, x, y, width, height); return 0; } #endif /* LCD_DEPTH == 16 */ |