Commit Graph

11 Commits

Author SHA1 Message Date
Solomon Peachy 658026e626 [4/4] Remove HAVE_LCD_BITMAP, as it's now the only choice.
Note:  I left behind lcd_bitmap in features.txt, because removing it
would require considerable work in the manual and the translations.

Change-Id: Ia8ca7761f610d9332a0d22a7d189775fb15ec88a
2020-07-24 21:20:13 +00:00
William Wilgus 138a4f9d3d lua rocklib_img optimize functions with multiple checkint calls
Uses int arrays and calls luaL_checkint in a loop

Change-Id: Ib73dab886f018c787bd995f64d990981d194069f
2019-07-29 05:54:27 -05:00
William Wilgus 90118f14cf lua add demo scripts, atexit handler, gui_scrollbar_draw
Change-Id: Ie8794e8a487f73952dae43e036787b6972fdbbee
2019-07-29 02:51:29 -05:00
William Wilgus bb025e3962 lua fix rlimage FB_SCALARPACK()
FB_SCALARPACK(lua_tointeger()) was calling lua_tointeger 3x on color targets

Change-Id: I7b3d73bba5dbc0aa4388b123de11410572fe67c5
2018-11-02 00:42:57 -04:00
William Wilgus df8233e4ab Lua expand multiple screen support
Some of the lcd functions had support for multiple screens but this wasn't
very safe since the screen number wasn't bounded within the screens[] array
This adds support for all the lcd functions along with checking that screen#
is bounded properly, adds around 600 bytes to devices with a remote screen
devices without a remote screen lock to SCREEN_MAIN

Change-Id: I618bbc7b3919c7b0ff375fb2d71949d7cab43c87
2018-10-30 04:16:23 +01:00
William Wilgus 80352c2c2d Lua rliimage optimize rli_marshal, rli_copy, lcd_xxx_bitmap
rli_marshal and rli_copy allow the use of a custom lua function
instead of the built-ins, this custom function can signal to stop
before the whole image is iterated.

Originally it was checking for a return of 0
which was additional overhead for the built-in functions
(which never stop early) as well.
Now custom_transform sets the x & y deltas to 0 to indicate early
exit removing an extra 'if' per cycle and return from all of the
rli_transform functions

The lcd_xxx_bitmap functions all require x, y, w, h, screen these calls
have been consolidated into a single function get_bmp_bounds()

Change-Id: I88de3149c58d1bfb40e9d1a91341fb86cbd63b51
2018-10-30 04:16:23 +01:00
William Wilgus 5449500a67 Lua Rlimage metatable
Put rliimage functions into the rb.image metatable instead of the rb. table

Change-Id: Iecdc564c2ea9739656e2025b51bb5d5c62e3dbc1
2018-10-25 07:10:46 -04:00
William Wilgus 948984309a lua move rocklib_img to its own separate loadable module
allows rocklib_img to be excluded if needed

stops rocklib_aux from generating redundant prototypes for
lcd_mono_bitmap[_part]

Change-Id: Ie208ad71ab5f9a7deb026dc01a5b0a0631a0d29c
2018-10-22 14:00:58 -04:00
William Wilgus 046cc497ad 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
2018-10-08 19:59:50 -04:00
William Wilgus c0682e0944 Clean up rocklib_img
optimize both size and speed
fix invert for color screens

Change-Id: I7edecae32dcb3daf5b3ed984a0e5b3d463269e60
2018-10-09 01:02:25 +02:00
William Wilgus 733c20d5d3 lua move RLIMAGE to own file
Change-Id: Icd10e4c348deec7729d4a6e2bf1152e1dfc70243
2018-09-14 01:00:35 +02:00