summaryrefslogtreecommitdiffstats
path: root/apps/plugins/lua
diff options
context:
space:
mode:
authorWilliam Wilgus <me.theuser@yahoo.com>2018-10-08 19:52:01 -0400
committerWilliam Wilgus <me.theuser@yahoo.com>2018-10-08 19:59:50 -0400
commit046cc497ad15222974201bef443109165973e3b9 (patch)
treee3d505e01b63727fe77480db8ca8e7cf176eb3c0 /apps/plugins/lua
parentc0682e094414d0748456d0b01000727039ff701c (diff)
downloadrockbox-046cc497ad15222974201bef443109165973e3b9.tar.gz
rockbox-046cc497ad15222974201bef443109165973e3b9.tar.bz2
rockbox-046cc497ad15222974201bef443109165973e3b9.zip
Fix red rocklib_img 32-24 bit targets
int is an incompatible type for targets that have 32bit fb_data need to use FB_SCALARPACK for them Change-Id: Ib3b5ff19c54d8d1bb76af33d0538a17a71301514
Diffstat (limited to 'apps/plugins/lua')
-rw-r--r--apps/plugins/lua/include_lua/color.lua4
-rw-r--r--apps/plugins/lua/include_lua/draw.lua4
-rw-r--r--apps/plugins/lua/include_lua/lcd.lua10
-rw-r--r--apps/plugins/lua/include_lua/print.lua2
-rw-r--r--apps/plugins/lua/rocklib_img.c2
5 files changed, 6 insertions, 16 deletions
diff --git a/apps/plugins/lua/include_lua/color.lua b/apps/plugins/lua/include_lua/color.lua
index fd321edd9d..7266c090f3 100644
--- a/apps/plugins/lua/include_lua/color.lua
+++ b/apps/plugins/lua/include_lua/color.lua
@@ -44,7 +44,7 @@ local _clr = {} do
local _NIL = nil -- _NIL placeholder
local maxstate = (bit.lshift(1, rb.LCD_DEPTH) - 1)
-
+
if rb.LCD_DEPTH > 24 then -- no alpha channels
maxstate = (bit.lshift(1, 24) - 1)
end
@@ -89,7 +89,7 @@ local _clr = {} do
r, g, b = (r or 0), (g or 0), (b or 0)
ru = ru + r; gu = gu + g; bu = bu + b
else
- ru = ru + inc; gu = gu + inc; bu = bu + inc
+ ru = ru + inc; gu = gu + inc; bu = bu + inc
end
color = rb.lcd_rgbpack(ru, gu, bu)
diff --git a/apps/plugins/lua/include_lua/draw.lua b/apps/plugins/lua/include_lua/draw.lua
index 7b239339ff..7bf71f0a6b 100644
--- a/apps/plugins/lua/include_lua/draw.lua
+++ b/apps/plugins/lua/include_lua/draw.lua
@@ -268,13 +268,13 @@ local _draw = {} do
if targetclr == _get(img, x, y, true) then -- north
qtail = qtail + 2
qpt[qtail - 1] = x
- qpt[qtail] = y
+ qpt[qtail] = y
end
y = y + 2
if targetclr == _get(img, x, y, true) then -- south
qtail = qtail + 2
qpt[qtail - 1] = x
- qpt[qtail] = y
+ qpt[qtail] = y
end
return fillclr
end
diff --git a/apps/plugins/lua/include_lua/lcd.lua b/apps/plugins/lua/include_lua/lcd.lua
index f4bb0db695..726ba9b30c 100644
--- a/apps/plugins/lua/include_lua/lcd.lua
+++ b/apps/plugins/lua/include_lua/lcd.lua
@@ -132,16 +132,6 @@ local _lcd = {} do
end
--expose functions to the outside through _lcd table
---[[
- _lcd.text_extent = text_extent
- _lcd.set_viewport = set_viewport
- _lcd.duplicate = duplicate
- _lcd.update = _update
- _lcd.update_rect = update_rect
- _lcd.clear = clear
- _lcd.splashf = splashf
- _lcd.image = image
-]]
_lcd.update = rb.lcd_update
_lcd.DEPTH = rb.LCD_DEPTH
_lcd.W = rb.LCD_WIDTH
diff --git a/apps/plugins/lua/include_lua/print.lua b/apps/plugins/lua/include_lua/print.lua
index 3a11e7c3dc..87fd11d4b6 100644
--- a/apps/plugins/lua/include_lua/print.lua
+++ b/apps/plugins/lua/include_lua/print.lua
@@ -152,7 +152,7 @@ local _print = {} do
-- if bByRef is _NIL or false then a copy is returned
local function get_settings(bByRef)
_p_opts = _p_opts or set_defaults()
- if not bByRef then
+ if not bByRef then
-- shallow copy of table
local copy = {}
for k, v in pairs(_p_opts) do
diff --git a/apps/plugins/lua/rocklib_img.c b/apps/plugins/lua/rocklib_img.c
index 35c2699b5d..39f6a51521 100644
--- a/apps/plugins/lua/rocklib_img.c
+++ b/apps/plugins/lua/rocklib_img.c
@@ -1152,7 +1152,7 @@ RLI_LUA rli_copy(lua_State *L)
{
rli_trans = custom_transform;
lua_settop(L, 11); /* ensure lua function on top of stack */
- clr = 0;
+ clr = FB_SCALARPACK(0);
op = 0;
}
else