diff options
author | William Wilgus <me.theuser@yahoo.com> | 2018-10-08 19:52:01 -0400 |
---|---|---|
committer | William Wilgus <me.theuser@yahoo.com> | 2018-10-08 19:59:50 -0400 |
commit | 046cc497ad15222974201bef443109165973e3b9 (patch) | |
tree | e3d505e01b63727fe77480db8ca8e7cf176eb3c0 | |
parent | c0682e094414d0748456d0b01000727039ff701c (diff) | |
download | rockbox-046cc497ad15222974201bef443109165973e3b9.tar.gz 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
-rw-r--r-- | apps/plugins/lua/include_lua/color.lua | 4 | ||||
-rw-r--r-- | apps/plugins/lua/include_lua/draw.lua | 4 | ||||
-rw-r--r-- | apps/plugins/lua/include_lua/lcd.lua | 10 | ||||
-rw-r--r-- | apps/plugins/lua/include_lua/print.lua | 2 | ||||
-rw-r--r-- | apps/plugins/lua/rocklib_img.c | 2 |
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 | |||
44 | local _NIL = nil -- _NIL placeholder | 44 | local _NIL = nil -- _NIL placeholder |
45 | 45 | ||
46 | local maxstate = (bit.lshift(1, rb.LCD_DEPTH) - 1) | 46 | local maxstate = (bit.lshift(1, rb.LCD_DEPTH) - 1) |
47 | 47 | ||
48 | if rb.LCD_DEPTH > 24 then -- no alpha channels | 48 | if rb.LCD_DEPTH > 24 then -- no alpha channels |
49 | maxstate = (bit.lshift(1, 24) - 1) | 49 | maxstate = (bit.lshift(1, 24) - 1) |
50 | end | 50 | end |
@@ -89,7 +89,7 @@ local _clr = {} do | |||
89 | r, g, b = (r or 0), (g or 0), (b or 0) | 89 | r, g, b = (r or 0), (g or 0), (b or 0) |
90 | ru = ru + r; gu = gu + g; bu = bu + b | 90 | ru = ru + r; gu = gu + g; bu = bu + b |
91 | else | 91 | else |
92 | ru = ru + inc; gu = gu + inc; bu = bu + inc | 92 | ru = ru + inc; gu = gu + inc; bu = bu + inc |
93 | end | 93 | end |
94 | 94 | ||
95 | color = rb.lcd_rgbpack(ru, gu, bu) | 95 | 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 | |||
268 | if targetclr == _get(img, x, y, true) then -- north | 268 | if targetclr == _get(img, x, y, true) then -- north |
269 | qtail = qtail + 2 | 269 | qtail = qtail + 2 |
270 | qpt[qtail - 1] = x | 270 | qpt[qtail - 1] = x |
271 | qpt[qtail] = y | 271 | qpt[qtail] = y |
272 | end | 272 | end |
273 | y = y + 2 | 273 | y = y + 2 |
274 | if targetclr == _get(img, x, y, true) then -- south | 274 | if targetclr == _get(img, x, y, true) then -- south |
275 | qtail = qtail + 2 | 275 | qtail = qtail + 2 |
276 | qpt[qtail - 1] = x | 276 | qpt[qtail - 1] = x |
277 | qpt[qtail] = y | 277 | qpt[qtail] = y |
278 | end | 278 | end |
279 | return fillclr | 279 | return fillclr |
280 | end | 280 | 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 | |||
132 | end | 132 | end |
133 | 133 | ||
134 | --expose functions to the outside through _lcd table | 134 | --expose functions to the outside through _lcd table |
135 | --[[ | ||
136 | _lcd.text_extent = text_extent | ||
137 | _lcd.set_viewport = set_viewport | ||
138 | _lcd.duplicate = duplicate | ||
139 | _lcd.update = _update | ||
140 | _lcd.update_rect = update_rect | ||
141 | _lcd.clear = clear | ||
142 | _lcd.splashf = splashf | ||
143 | _lcd.image = image | ||
144 | ]] | ||
145 | _lcd.update = rb.lcd_update | 135 | _lcd.update = rb.lcd_update |
146 | _lcd.DEPTH = rb.LCD_DEPTH | 136 | _lcd.DEPTH = rb.LCD_DEPTH |
147 | _lcd.W = rb.LCD_WIDTH | 137 | _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 | |||
152 | -- if bByRef is _NIL or false then a copy is returned | 152 | -- if bByRef is _NIL or false then a copy is returned |
153 | local function get_settings(bByRef) | 153 | local function get_settings(bByRef) |
154 | _p_opts = _p_opts or set_defaults() | 154 | _p_opts = _p_opts or set_defaults() |
155 | if not bByRef then | 155 | if not bByRef then |
156 | -- shallow copy of table | 156 | -- shallow copy of table |
157 | local copy = {} | 157 | local copy = {} |
158 | for k, v in pairs(_p_opts) do | 158 | 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) | |||
1152 | { | 1152 | { |
1153 | rli_trans = custom_transform; | 1153 | rli_trans = custom_transform; |
1154 | lua_settop(L, 11); /* ensure lua function on top of stack */ | 1154 | lua_settop(L, 11); /* ensure lua function on top of stack */ |
1155 | clr = 0; | 1155 | clr = FB_SCALARPACK(0); |
1156 | op = 0; | 1156 | op = 0; |
1157 | } | 1157 | } |
1158 | else | 1158 | else |