summaryrefslogtreecommitdiff
path: root/apps/plugins/lua/lua.make (follow)
Commit message (Collapse)AuthorAge
* Fix lua helpers -- supress line markers in preproc source generation scriptsWilliam Wilgus2018-12-24
| | | | | | | | | | | | | In newer builds line markers prevent lua helper scripts from grabbing some inputs especially _bool This patch adds the -P switch Inhibit generation of linemarkers in the output from the preprocessor. This might be useful when running the preprocessor on something that is not C code, and will be sent to a program which might be confused by the linemarkers. Change-Id: I66c3b099729f6651300f9fcf4670533a20cc90c1
* Lua Fix settings_helper for the gigaBeastSWilliam Wilgus2018-12-17
| | | | | | the gigabeatS has an embedded struct that needs to be parsed Change-Id: I88c9101afaaa95182f37ade1410cccb4fb768e33
* Lua add read/write access to global_status, global_settings, audio_current_trackWilliam Wilgus2018-12-16
| | | | | | | moved items to rb.system added read access to audio_current_track and audio_next_track Change-Id: Ia055b8cb3848e540067818f596ffd1058da057fb
* Lua optimize combine and rework similar functionsWilliam Wilgus2018-11-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | rb.strncasecmp strcasecmp just exclude count -> rb.strncasecmp(s1, s2) rb.backlight_brightness_set backlight_set_brightness -- redundant rb.backlight_brightness_use_setting -> rb.backlight_brightness_set() rb.buttonlight_brightness_set buttonlight_set_brightness -- redundant rb.buttonlight_brightness_use_setting -> rb.buttonlight_brightness_set() rb.mixer_frequency rb.mixer_set_frequency -> mixer_frequency(freq) rb.mixer_get_frequency -> mixer_frequency rb.backlight_onoff rb.backlight_on -> rb.backlight_onoff(true) rb.backlight_off -> rb.backlight_onoff(false) rb.touchscreen_mode rb.touchscreen_set_mode -> rb.touchscreen_mode(mode) rb.touchscreen_get_mode -> rb.touchscreen_mode() rb.schedule_cpu_boost rb.trigger_cpu_boost -> rb.schedule_cpu_boost(true) rb.cancel_cpu_boost -> rb.schedule_cpu_boost(false) Includes rbcompat.lua for backwards compatibility if your script is broken by this change you simply add `require("rbcompat")` to the top for the old functionality Change-Id: Ibffd79a0d9be6d7d6a65cc4af5c0a1c6a0f3f94d
* lua consolidate pcm_ functionsWilliam Wilgus2018-10-30
| | | | | | | | | | | | | | The way to call the pcm functions has changed rb.pcm("option", var) rb.pcm_set_frequency(freq) = becomes rb.pcm("pcmsetfrequency", freq) added pcm.lua to the includes for conversion to old functions if your script is broken by this change you simply add `require("pcm")` to the top for the old functionality added rb.pcm("calculatepeaks") Change-Id: I092057b0c0b5575e567862661f122da1ca2680e8
* lua consolidate playlist_ functionsWilliam Wilgus2018-10-25
| | | | | | | | | | | | | | | | The way to call the playlist functions has changed rb.playlist("option", var) rb.playlist_add(filename) = becomes rb.playlist("add", filename) added playlist.lua to the includes for conversion to old functions if your script is broken by this change you simply add `require("playlist")` to the top for the old functionality added rb.playlist_tracks(dir, filename) to playlist.lua this will allow you to add all tracks in a playlist.m3u8 to a lua table Change-Id: I87fcc56be365d8495d214f069331b6ddbfbef1db
* lua add audio_play consolidate audio_ functionsWilliam Wilgus2018-10-24
| | | | | | | | | | | | | | | | | | | | | audio_play was removed from the rocklib I assume due to inconsistent behavior I've readded it with a check for audio paused which instead uses rewind/ff and then resumes audio the way to call the audio functions has changed as well rb.audio("option", var) so rb.audio_play(0, 0) becomes rb.audio("play", 0, 0) audio_audio_flush_and_reload_tracks becomes rb.audio("flushandreloadtracks") all functions except audio("getfilepos") return the previous (or still current) status added audio.lua to the includes for conversion to old functions if your script is broken by this change you simply add `require("audio")` to the top for the old functionality Change-Id: I364adf0c85d9c12b98cde29c26fbe5ee05b9d331
* Try #4 for lua makeWilliam Wilgus2018-07-24
| | | | | | | Last commit was just a test to see if it work this one cleans it up a bit and should be a bit faster Change-Id: Ifdff5c5b78bcc6889506de607193246beccdde6b
* Try # 3 for lua make fileWilliam Wilgus2018-07-24
| | | | Change-Id: I888612f3339ffcde28602a4e739b08f630de9c28
* Lua Fix image saving for 32 bit targets -- update make fileWilliam Wilgus2018-07-24
| | | | | | Hopefully this will fix the build faliures for a few targets Change-Id: I68f6c85513ef589e5f6a50a8efc7bfae9fd62acd
* Rocklua -- Extend / Fix rliImageWilliam Wilgus2018-07-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some devices(1-bit / 2-bit displays) have packed bit formats that need to be unpacked in order to work on them at a pixel level. This caused a few issues on 1 & 2-bit devices: Greatly Oversized data arrays for bitmaps Improper handling of native image data Framebuffer data was near unusable without jumping through hoops Conversion between native addressing and per pixel addressing incurs extra overhead but it is much faster to do it on the 'C' side rather than in lua. Not to mention the advantage of a unified interface for the end programer ------------------------------------------------------------------- Adds a sane way to access each pixel of image data Adds: -------------------------------------------------------------------- img:clear([color],[x1],[y1],[x2],[y2]) (set whole image or a portion to a particular value) -------------------------------------------------------------------- img:invert([x1],[y1],[x2],[y2]) (inverts whole image or a portion) -------------------------------------------------------------------- img:marshal([x1],[y1],[x2],[y2],[funct]) (calls funct for each point defined by rect of x1,y1 x2,y2 returns value and allows setting value of each point return nil to terminate early) -------------------------------------------------------------------- img:points([x1],[y1],[x2],[y2],[dx],[dy]) (returns iterator function that steps delta-x and delta-y pixels each call returns value of pixel each call but doesn't allow setting to a new value compare to lua pairs method) -------------------------------------------------------------------- img:copy(src,[x1],[y1],[x2],[y2],[w],[h],[clip][operation][clr/funct]) (copies all or part of an image -- straight copy or special ops optionally calls funct for each point defined by rect of x1, y1, w, h and x2, y2, w, h for dest and src images returns value of dst and src and allows setting value of each point return nil to terminate early) -------------------------------------------------------------------- img:line(x1, y1, x2, y2, color) -------------------------------------------------------------------- img:ellipse(x1, y1, x2, y2, color, [fillcolor] -------------------------------------------------------------------- Fixed handling of 2-bit vertical integrated screens Added direct element access for saving / restoring native image etc. Added more data to tostring() handler and a way to access individual items Added equals method to see if two variables reference the same image address (doesn't check if two separate images contain the same 'picture') Optimized get and set routines Fixed out of bound x coord access shifting to next line Added lua include files to expose new functionality Finished image saving routine Static allocation of set_viewport struct faster + saves ram over dynamic Cleaned up code Fixed pixel get/set for 1/2 bit devices Fixed handling for 24-bit devices (32?) ------------------------------------------------------------------------- Example lua script to follow on forums ------------------------------------------------------------------------- Change-Id: I8a9ff0ff72aacf4b1662767ccb2b312fc355239c
* Revert "Rocklua -- Extend / Fix rliImage"William Wilgus2018-07-22
| | | | | | This reverts commit 2daec3d3c3d84e7176a22bc073ca5530e8e44c6d. Change-Id: I53ea1f491e3c6d6fb759f426f203f927bd26b1e9
* Rocklua -- Extend / Fix rliImageWilliam Wilgus2018-07-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some devices(1-bit / 2-bit displays) have packed bit formats that need to be unpacked in order to work on them at a pixel level. This caused a few issues on 1 & 2-bit devices: Greatly Oversized data arrays for bitmaps Improper handling of native image data Framebuffer data was near unusable without jumping through hoops Conversion between native addressing and per pixel addressing incurs extra overhead but it is much faster to do it on the 'C' side rather than in lua. Not to mention the advantage of a unified interface for the end programer ------------------------------------------------------------------- Adds a sane way to access each pixel of image data Adds: -------------------------------------------------------------------- img:clear([color],[x1],[y1],[x2],[y2]) (set whole image or a portion to a particular value) -------------------------------------------------------------------- img:invert([x1],[y1],[x2],[y2]) (inverts whole image or a portion) -------------------------------------------------------------------- img:marshal([x1],[y1],[x2],[y2],[funct]) (calls funct for each point defined by rect of x1,y1 x2,y2 returns value and allows setting value of each point return nil to terminate early) -------------------------------------------------------------------- img:points([x1],[y1],[x2],[y2],[dx],[dy]) (returns iterator function that steps delta-x and delta-y pixels each call returns value of pixel each call but doesn't allow setting to a new value compare to lua pairs method) -------------------------------------------------------------------- img:copy(src,[x1],[y1],[x2],[y2],[w],[h],[clip][operation][clr/funct]) (copies all or part of an image -- straight copy or special ops optionally calls funct for each point defined by rect of x1, y1, w, h and x2, y2, w, h for dest and src images returns value of dst and src and allows setting value of each point return nil to terminate early) -------------------------------------------------------------------- img:line(x1, y1, x2, y2, color) -------------------------------------------------------------------- img:ellipse(x1, y1, x2, y2, color, [fillcolor] -------------------------------------------------------------------- Fixed handling of 2-bit vertical integrated screens Added direct element access for saving / restoring native image etc. Added more data to tostring() handler and a way to access individual items Added equals method to see if two variables reference the same image address (doesn't check if two separate images contain the same 'picture') Optimized get and set routines Fixed out of bound x coord access shifting to next line Added lua include files to expose new functionality Finished image saving routine Static allocation of set_viewport struct faster + saves ram over dynamic Cleaned up code Fixed pixel get/set for 1/2 bit devices ------------------------------------------------------------------------- Example lua script to follow on forums ------------------------------------------------------------------------- Change-Id: I7b9c1fd699442fb683760f781021091786c18509
* lua: don't include rockbox-specific libc headers for the button helper tool.Frank Gevaerts2016-03-18
| | | | | | This fixes the "implicit declaration of function 'printf'" warning Change-Id: I97d247bcab26ddba4d22e0fd19af45fdb47b8cce
* lua: Switch memory allocator from dl to tlsfMarcin Bukat2013-08-26
| | | | | | | | | | | | | | | | | | Instead of providing yet another memory allocator implementation use tlsf and simply link tlsf library. Another small improvement is to *grow* memory pool by grabbing audiobuffer instead of just switching to use audiobuf exclusively. Tested with simple lua 'memory eater' script. This patch extends tlsf lib slightly. You can provide void *get_new_area(size_t * size) function which will override weak dummy implementation provided in lib itself. This allows to automaticaly initialize memory pool as well as grow memory pool if needed (for example grab audiobuffer when pluginbuffer is exhaused). Change-Id: I841af6b6b5bbbf546c14cbf139a7723fbb982f1b
* Refactor and unify objcopy calls in the build system. Also now properly ↵Thomas Martitz2012-04-04
| | | | | | handles DEBUG builds on hosted targets to keep debug symbols if necessary. Change-Id: I884031b79c6d49479e4d95752f35ced68872dd5d
* Lua: Add pluginlib_actions wrapper for lua scripts.Thomas Martitz2012-01-27
| | | | | | Scripts can now make use of PLA_* actions to be more target independant. Change-Id: I1b9f69e07f41b2187ecc1bad25a2c20eaaef92b4
* Rename/change SIMVER to APP_TYPE in the Makefiles.Thomas Martitz2010-07-10
| | | | | | | SIMVER was really only used to detect a simulator build. With APP_TYPE you can now differentiate between simulator, application, checkwps and database builds. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27372 a1c6a512-1295-4272-9138-f99709370657
* Lua: make actions.lua, buttons.lua and rocklib_aux.c depend on it generatorsMaurus Cuelenaere2010-06-18
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26911 a1c6a512-1295-4272-9138-f99709370657
* Use PLUGINFLAGS in lua.make, instead of only CFLAGS.Thomas Martitz2009-10-11
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23121 a1c6a512-1295-4272-9138-f99709370657
* Make sure to use $(CFLAGS) to get all defines when preprocessing actions.hFrank Gevaerts2009-10-11
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23119 a1c6a512-1295-4272-9138-f99709370657
* Also make rocklib_aux.c depend on $(LUA_OBJ)Maurus Cuelenaere2009-07-05
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21663 a1c6a512-1295-4272-9138-f99709370657
* Fix sim_* errors when compiling LuaMaurus Cuelenaere2009-07-05
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21660 a1c6a512-1295-4272-9138-f99709370657
* Fix actions.lua & buttons.lua make errorsMaurus Cuelenaere2009-07-05
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21659 a1c6a512-1295-4272-9138-f99709370657
* Lua: add script which wraps not-yet ported C functions to LuaMaurus Cuelenaere2009-07-05
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21657 a1c6a512-1295-4272-9138-f99709370657
* Lua: expose BUTTON_* definesMaurus Cuelenaere2009-06-24
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21500 a1c6a512-1295-4272-9138-f99709370657
* Lua: make sure action.h gets C preprocessed before processing itMaurus Cuelenaere2009-05-28
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21123 a1c6a512-1295-4272-9138-f99709370657
* Fix the 'cannot create /.../apps/plugins/lua/actions.lua: Directory ↵Maurus Cuelenaere2009-05-22
| | | | | | nonexistent' error git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21027 a1c6a512-1295-4272-9138-f99709370657
* Lua: add actions.lua to the zip fileMaurus Cuelenaere2009-05-21
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21023 a1c6a512-1295-4272-9138-f99709370657
* Commit FS#9174: Lua scripting language by Dan EvertonMaurus Cuelenaere2009-05-21
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21020 a1c6a512-1295-4272-9138-f99709370657