summaryrefslogtreecommitdiffstats
path: root/apps/plugins/fire.c
AgeCommit message (Collapse)AuthorFilesLines
2022-12-29plugins: Improve usability of iPod keymapsChristian Soffke1-1/+8
- Reduce need to press multiple buttons at the same time to quit a plugin - Have "Menu" be default way to quit plugins or to access plugin menu - Fall back to (Long) "Select" or Long "Menu" in cases where Menu button isn't available (e.g. in ImageViewer and many games) out of scope: boomshine, lua_scripts, Rockpaint, Doom, Duke3D, Pacbox, Quake, Sgt-Puzzles, Wolf3D, XWorld, Minesweeper, Pixel Painter, Spacerocks Change-Id: I6d4dc7174695fe4b8ee9cbaccb21bdbfe6af5c48
2022-11-23plugins HAVE_BACKLIGHT helper remove ifdefs in favor of dummy functionsWilliam Wilgus1-4/+2
lessen the ifdef hell Change-Id: I52f830284e4599f3fc3a75c27dda27058b8de1a3
2020-10-26LCD core move buf ptr and address look up function viewport structWilliam Wilgus1-1/+4
I'm currently running up against the limitations of the lcd_draw functions I want these functions to be able to be used on any size buffer not just buffers with a stride matching the underlying device [DONE] allow the framebuffer to be decoupled from the device framebuffer [DONE need examples] allow for some simple blit like transformations [DONE] remove the device framebuffer from the plugin api [DONE}ditto remote framebuffer [DONE] remove _viewport_get_framebuffer you can call struct *vp = lcd_set_viewport(NULL) and vp->buffer->fb_ptr while remote lcds may compile (and work in the sim) its not been tested on targets [FIXED] backdrops need work to be screen agnostic [FIXED] screen statusbar is not being combined into the main viewport correctly yet [FIXED] screen elements are displayed incorrectly after switch to void* [FIXED] core didn't restore proper viewport on splash etc. [NEEDS TESTING] remote lcd garbled data [FIXED] osd lib garbled screen on bmp_part [FIXED] grey_set_vp needs to return old viewport like lcd_set_viewport [FIXED] Viewport update now handles viewports with differing buffers/strides by copying to the main buffer [FIXED] splash on top of WPS leaves old framebuffer data (doesn't redraw) [UPDATE] refined this a bit more to have clear_viewport set the clean bit and have skin_render do its own screen clear scrolling viewports no longer trigger wps refresh also fixed a bug where guisyncyesno was displaying and then disappearing [ADDED!] New LCD macros that allow you to create properly size frame buffers in you desired size without wasting bytes (LCD_ and LCD_REMOTE_) LCD_STRIDE(w, h) same as STRIDE_MAIN LCD_FBSTRIDE(w, h) returns target specific stride for a buffer W x H LCD_NBELEMS(w, h) returns the number of fb_data sized elemenst needed for a buffer W x H LCD_NATIVE_STRIDE(s) conversion between rockbox native vertical and lcd native stride (2bitH) test_viewports.c has an example of usage [FIXED!!] 2bit targets don't respect non-native strides [FIXED] Few define snags Change-Id: I0d04c3834e464eca84a5a715743a297a0cefd0af
2020-10-26make the plugin API frambuffer agnosticMoshe Piekarski1-1/+1
Change-Id: I5abdc231093054c517ff53b9a456997e440e3f6e
2020-10-23fire: exit out of the plugin with both PLA_EXIT and PLA_CANCELSolomon Peachy1-1/+3
Change-Id: I553fc5d02b7ee7004d791ba40cbd655f98c88f19
2020-07-24plugins: More HAVE_BACKLIGHT cleanupSolomon Peachy1-1/+5
Change-Id: I70cf700f5bc3d4375c025efa62ef40fd2bd70293
2014-06-21lcd-24bit: Introduce a 24-bit mid-level LCD driverThomas Martitz1-8/+8
With LCD driver all calculation will be performed on RGB888 and the hardware/OS can display from our 24bit framebuffer. It is not yet as performance optimized as the existing drivers but should be good enough.The vast number of small changes is due to the fact that fb_data can be a struct type now, while most of the code expected a scalar type. lcd-as-memframe ASM code does not work with 24bit currently so the with 24bit it enforces the generic C code. All plugins are ported over. Except for rockpaint. It uses so much memory that it wouldnt fit into the 512k plugin buffer anymore (patches welcome). Change-Id: Ibb1964545028ce0d8ff9833ccc3ab66be3ee0754
2013-04-26Make fixepoint.c as a shared library (libfixedpoint.a).Michael Sevakis1-1/+1
Change-Id: Icc10d6e85f890c432f191233a4d64e09f00be43d Reviewed-on: http://gerrit.rockbox.org/456 Reviewed-by: Michael Sevakis <jethead71@rockbox.org> Tested-by: Michael Sevakis <jethead71@rockbox.org>
2011-10-15Fix warningsBertrik Sikken1-1/+1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30759 a1c6a512-1295-4272-9138-f99709370657
2011-10-15plugins: another round of making local functions staticBertrik Sikken1-5/+5
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30758 a1c6a512-1295-4272-9138-f99709370657
2011-01-24* Rename backlight_force_on to backlight_ignore_timeout to make it clear ↵Teruaki Kawashima1-2/+2
what the function does. * Add backlight_force_on() which forces to turn on backlight even when the setting is set to Off. use this in lamp. No functional change except lamp. See aslo FS#9883. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29128 a1c6a512-1295-4272-9138-f99709370657
2010-08-25Remove build conditions inside .c plugin filesRafaël Carré1-3/+0
Rather use the Makefile to specify which files must be built Fix color builds with test plugins enabled (test_scanrate gave an empty .o file) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27886 a1c6a512-1295-4272-9138-f99709370657
2010-08-24Second try: Introduce plugin_crt0.c that every plugin links.Thomas Martitz1-2/+0
It handles exit() properly, calling the handler also when the plugin returns normally (also make exit() more standard compliant while at it). It also holds PLUGIN_HEADER, so that it doesn't need to be in each plugin anymore. To work better together with callbacks passed to rb->default_event_handler_ex() introduce exit_on_usb() which will call the exit handler before showing the usb screen and exit() after it. In most cases rb->default_event_handler_ex() was passed a callback which was manually called at all other return points. This can now be done via atexit(). In future plugin_crt0.c could also handle clearing bss, initializing iram and more. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27873 a1c6a512-1295-4272-9138-f99709370657
2010-08-23Revert "Introduce plugin_crt0.c that every plugin links."Thomas Martitz1-0/+2
Too much errors and no time to fix them now. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27863 a1c6a512-1295-4272-9138-f99709370657
2010-08-23Introduce plugin_crt0.c that every plugin links.Thomas Martitz1-2/+0
It handles exit() properly, calling the handler also when the plugin returns normally (also it makes exit() more standard compliant while at it). It also holds PLUGIN_HEADER, so that it doesn't need to be in each plugin anymore. To work better together with callbacks passed to rb->default_event_handler_ex introduce exit_on_usb() which will call the exit handler before showing the usb screen and exit() after it. In most cases it was passed a callback which was manually called at all other return points. This can now be done via atexit(). In future plugin_crt0.c could also handle clearing bss, initializing iram and more. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27862 a1c6a512-1295-4272-9138-f99709370657
2010-05-20S#10387 - Rework pluginlib actionsThomas Martitz1-11/+19
It changes pluginlib actions to contain only a single and simple context (and other one for remote directional buttons), consisting of 7(9) buttons: up/down/left/right, select OR short select and long select, exit and cancel (plus 2 for scrollwheel targets). This ensures contexts don't clash with other contexts and simplifies them, at the expense of reduced versatility. However, the versatility made it largely unusable due to the great number of targets. This should allow for using pluginlib actions safely for the most simple plugins (e.g. almost all demos). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26202 a1c6a512-1295-4272-9138-f99709370657
2009-09-04Fix STRIDE macro for multiscreen and add stride support for picture lib.Karl Kurbjun1-1/+1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22615 a1c6a512-1295-4272-9138-f99709370657
2009-09-02Fire: Add support for 256 color hardware pallete modeKarl Kurbjun1-0/+17
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22601 a1c6a512-1295-4272-9138-f99709370657
2009-01-16loader-initialized global plugin API:Andrew Mahone1-8/+5
struct plugin_api *rb is declared in PLUGIN_HEADER, and pointed to by __header.api the loader uses this pointer to initialize rb before calling entry_point entry_point is no longer passed a pointer to the plugin API all plugins, and pluginlib functions, are modified to refer to the global rb pluginlib functions which only served to copy the API pointer are removed git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19776 a1c6a512-1295-4272-9138-f99709370657
2008-11-20New makefile solution: A single invocation of 'make' to build the entire ↵Björn Stenberg1-4/+4
tree. Fully controlled dependencies give faster and more correct recompiles. Many #include lines adjusted to conform to the new standards. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19146 a1c6a512-1295-4272-9138-f99709370657
2008-06-28Updated our source code header to explicitly mention that we are GPL v2 orDaniel Stenberg1-2/+4
later. We still need to hunt down snippets used that are not. 1324 modified files... http://www.rockbox.org/mail/archive/rockbox-dev-archive-2008-06/0060.shtml git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17847 a1c6a512-1295-4272-9138-f99709370657
2008-05-13Plugin parameters should be const.Steve Bavin1-2/+2
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17492 a1c6a512-1295-4272-9138-f99709370657
2008-04-06Adapt the remaining plugins to put the greyscale isr on cop. Now they can be ↵Jens Arnold1-1/+2
used while playing music without making the audio stutter. Needs the new SHAREDBSS_ATTR. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16987 a1c6a512-1295-4272-9138-f99709370657
2008-03-02Greyscale library: Preparations for a gamma measurement plugin.Jens Arnold1-1/+1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16492 a1c6a512-1295-4272-9138-f99709370657
2008-02-24The fire plugin got slightly too big for the Archos plugin buffer with one ↵Marianne Arnold1-2/+2
of the recent changes again, so save some bytes by reducing FIRE_WIDTH slightly. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16408 a1c6a512-1295-4272-9138-f99709370657
2008-01-23Fixed the problems on the new version of the fire plugin (so repush it), ↵Kevin Ferrare1-277/+187
added new actions to the pluginlib_actions to fix the keymaps on the Sansa e200 for the clock and fire plugins. Also slightly simplified the metronome plugin's key mapping with those new actions. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16148 a1c6a512-1295-4272-9138-f99709370657
2008-01-22Revert today's fire commits because it crashed all the targets I could test ↵Marianne Arnold1-151/+233
with (OndioFM, M5, C250). The plugin action conversion also caused problems (e.g. in a c200 sim which was working) I couldn't control flame type and movement and couldn't exit. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16142 a1c6a512-1295-4272-9138-f99709370657
2008-01-22A commit without a single warning is not really funKevin Ferrare1-2/+2
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16139 a1c6a512-1295-4272-9138-f99709370657
2008-01-22Fire plugin : initializes palettes with a function instead of storing them ↵Kevin Ferrare1-233/+151
in static arrays, changed the color LCD's palette to make it look nicer, switched the button API to the action API, reorganized code a little bit git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16138 a1c6a512-1295-4272-9138-f99709370657
2008-01-13Greyscale library: Plugins can now put the management structure in IRAM for ↵Jens Arnold1-0/+1
higher update speed. Use this in doom, mpegplayer, and zxbox. Made the api pointer part of the struct. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16066 a1c6a512-1295-4272-9138-f99709370657
2008-01-10woopsJonathan Gordon1-2/+2
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16046 a1c6a512-1295-4272-9138-f99709370657
2008-01-10Accept FS#8341 - rename BUTTON_SCROLL_UP/DOWN to FWD/BACK on the e200 to ↵Jonathan Gordon1-2/+2
make it consistant with the ipods. apart from removing a bit of confusion, it fixes the wheel in pictureflow and possibly elsewhere. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16045 a1c6a512-1295-4272-9138-f99709370657
2008-01-07Forgot to commit the adaption of 'fire' to the new greylib.Jens Arnold1-36/+47
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16010 a1c6a512-1295-4272-9138-f99709370657
2007-09-22Fix empty commit: Add grayscale support for ARM in vertical packing format.Tomasz Malesinski1-0/+7
Enable grayscale for Iriver ifp. Fix timer_unregister for PNX0101. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14825 a1c6a512-1295-4272-9138-f99709370657
2007-09-20Enable plugins on the Sansa C200. Large parts taken from patch FS#7749 by ↵Marianne Arnold1-1/+2
Max Kelley with tweaks, bit of cleanup and additional bitmaps by me. Some of the now enabled plugins could still be improved in regard to screen size adaptation or keymaps but this way it can easily be done later and one by one. The rather ugly 'ifndef's I added temporaryly in plugins/SOURCES will also go one by one. Plugin button actions cause some quirks in a few plugins (e.g. 'clock') but since it's not critical , the bitmaps were already done and it makes a good example for discussing plugin button actions, I thought it could go in. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14771 a1c6a512-1295-4272-9138-f99709370657
2007-08-16Pass plugin api pointer to funtion directly, fixes crashes when doing ↵Peter D'Hoye1-2/+2
incremental builds. Fix incorrect backlight changes in rockblox introduced recently. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14373 a1c6a512-1295-4272-9138-f99709370657
2007-08-15Bring mpegplayer backlight fix to the other plugins, this also fixes some ↵Peter D'Hoye1-3/+5
wrongly ifdef'd backlight calls. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14352 a1c6a512-1295-4272-9138-f99709370657
2007-07-27Rockbox compiles and boots now on the 2nd gen, but doesn't work properly yet.Jens Arnold1-1/+2
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14021 a1c6a512-1295-4272-9138-f99709370657
2007-05-19attempt to make the Gigabeat button mappings in the plugins more logical and ↵Marcoen Hirschberg1-1/+1
in line with the mapping in rockbox itself git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13436 a1c6a512-1295-4272-9138-f99709370657
2007-04-21General housekeeping: Make plugin buffer functions take size_t * instead of ↵Michael Sevakis1-1/+1
int * to match the parameter type of the buffer functions called in the core. Get rid of unsafe int * <==> size_t * casting. Use ssize_t where int was used and size_t where unsigned int was used in the buffer calls to not alter signedness in the plugins. No API version change since it should only be an issue for 64-bit sim builds. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13233 a1c6a512-1295-4272-9138-f99709370657
2007-03-16Rename some macros to account for the recently added M5 port. No code changes.Jens Arnold1-1/+1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12809 a1c6a512-1295-4272-9138-f99709370657
2007-03-16Get rid of the 'center' parameter for splashes. There were only 2 of almost ↵Jens Arnold1-1/+1
500 splashes which were not centered. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12807 a1c6a512-1295-4272-9138-f99709370657
2007-01-14Start of work on a port to the Archos 'AV300' (AV320/340/380) - a working UI ↵Dave Chapman1-0/+7
simulator (but with a dummy background image for now) and the beginnings of the target-specific firmare code. Port is temporarily using a 2bpp LCD buffer format - the AV300 has a 320x240 colour (YCbCr-based) LCD which will need a new framebuffer format and drawing routines, but the LCD is also capable of various paletted bitmap modes, one of which has an identical framebuffer format to the greyscale ipods. Buttons (and hence the button mappings) are identical to the Archos Recorder, with the exception that the PLAY button on the Recorder is replaced by pressing the joystick on the AV300 (which I call BUTTON_SELECT). The initial port will begin by being strictly HWCODEC, but will evolve to be a hybrid SWCODEC/HWCODEC platform - it has a MAS3587F but also a main CPU (54MHz arm7tdmi plus DSP) capable of software decoding of at least some formats. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12008 a1c6a512-1295-4272-9138-f99709370657
2006-11-15Hopefully clean up some errorsKarl Kurbjun1-0/+2
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11528 a1c6a512-1295-4272-9138-f99709370657
2006-11-15Don't need to remove the backdrop for all plugins - leave it up for some.Karl Kurbjun1-0/+1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11526 a1c6a512-1295-4272-9138-f99709370657
2006-10-26Allow the Sansa e200 UI simulator to be built. Thanks to Andre Smith for the ↵Barry Wardell1-0/+7
nice image of the Sansa. Lots more to be done including testing and tweaking the keymaps and modifying the plugins for the Sansa's 176x220 LCD. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11351 a1c6a512-1295-4272-9138-f99709370657
2006-09-08Fire: * Improved greyscale palette. * Fixed colour mode (palette was ↵Jens Arnold1-103/+97
inverted, an d the multiplication factor was chosen in a way that the 'flames' heated up infinitely (avalanche effect). * Better adjustment to the various LCD sizes. * Tweaks and cleanup. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10902 a1c6a512-1295-4272-9138-f99709370657
2006-08-07Grayscale library ported to the grayscale iPods, first version. Added C ↵Jens Arnold1-1/+1
reference versions of gray_update_rect() for both horizontal and vertical pixel packing. gray_update_rect() and gray_ub_gray_bitmap_part() not yet assembler optimised. Grayscale screendump doesn't work yet. * Fixed button assignments for iPod in grayscale.c git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10468 a1c6a512-1295-4272-9138-f99709370657
2006-08-03Barry Wardell's keymappings for H10Daniel Stenberg1-0/+7
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10446 a1c6a512-1295-4272-9138-f99709370657
2006-08-02Grayscale library: LCD linearisation and gamma correction.Jens Arnold1-1/+1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10402 a1c6a512-1295-4272-9138-f99709370657