summaryrefslogtreecommitdiff
path: root/apps/plugins/lua/rocklib.c
diff options
context:
space:
mode:
authorMaurus Cuelenaere <mcuelenaere@gmail.com>2009-06-15 13:46:10 +0000
committerMaurus Cuelenaere <mcuelenaere@gmail.com>2009-06-15 13:46:10 +0000
commit153ac73c04ec06a2402c78cf24b8a8908749c70d (patch)
tree6f9014dad17ca80c163fcf079f74b7b6e8517e7c /apps/plugins/lua/rocklib.c
parente55bdff3509fa978f4a8c9b7a62c662bba401d33 (diff)
downloadrockbox-153ac73c04ec06a2402c78cf24b8a8908749c70d.tar.gz
rockbox-153ac73c04ec06a2402c78cf24b8a8908749c70d.zip
Fix helloworld.lua for mono targets (+ add lcd_mono_bitmap() & lcd_mono_bitmap_part() to Lua API)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21291 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/lua/rocklib.c')
-rw-r--r--apps/plugins/lua/rocklib.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/apps/plugins/lua/rocklib.c b/apps/plugins/lua/rocklib.c
index d501694b46..c64275c5b6 100644
--- a/apps/plugins/lua/rocklib.c
+++ b/apps/plugins/lua/rocklib.c
@@ -414,6 +414,33 @@ RB_WRAP(lcd_fillrect)
414 return 0; 414 return 0;
415} 415}
416 416
417RB_WRAP(lcd_mono_bitmap_part)
418{
419 struct rocklua_image *src = rli_checktype(L, 1);
420 int src_x = luaL_checkint(L, 2);
421 int src_y = luaL_checkint(L, 3);
422 int stride = luaL_checkint(L, 4);
423 int x = luaL_checkint(L, 5);
424 int y = luaL_checkint(L, 6);
425 int width = luaL_checkint(L, 7);
426 int height = luaL_checkint(L, 8);
427
428 rb->lcd_mono_bitmap_part(src->data, src_x, src_y, stride, x, y, width, height);
429 return 0;
430}
431
432RB_WRAP(lcd_mono_bitmap)
433{
434 struct rocklua_image *src = rli_checktype(L, 1);
435 int x = luaL_checkint(L, 2);
436 int y = luaL_checkint(L, 3);
437 int width = luaL_checkint(L, 4);
438 int height = luaL_checkint(L, 5);
439
440 rb->lcd_mono_bitmap(src->data, x, y, width, height);
441 return 0;
442}
443
417#if LCD_DEPTH > 1 444#if LCD_DEPTH > 1
418RB_WRAP(lcd_set_foreground) 445RB_WRAP(lcd_set_foreground)
419{ 446{
@@ -871,6 +898,8 @@ static const luaL_Reg rocklib[] =
871 R(lcd_vline), 898 R(lcd_vline),
872 R(lcd_drawrect), 899 R(lcd_drawrect),
873 R(lcd_fillrect), 900 R(lcd_fillrect),
901 R(lcd_mono_bitmap_part),
902 R(lcd_mono_bitmap),
874#if LCD_DEPTH > 1 903#if LCD_DEPTH > 1
875 R(lcd_set_foreground), 904 R(lcd_set_foreground),
876 R(lcd_get_foreground), 905 R(lcd_get_foreground),