forked from len0rd/rockbox
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
This commit is contained in:
parent
c0682e0944
commit
046cc497ad
5 changed files with 6 additions and 16 deletions
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue