summaryrefslogtreecommitdiff
path: root/apps/plugins/dice.c (follow)
Commit message (Collapse)AuthorAge
* Changed the FOR_NB_SCREENS macro to always be a for loop that declares its ↵Björn Stenberg2011-10-15
| | | | | | own loop variable. This removes the need to declare this variable in the outer scope. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30756 a1c6a512-1295-4272-9138-f99709370657
* plugins: make local functions static for a subset of pluginsBertrik Sikken2011-09-17
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30564 a1c6a512-1295-4272-9138-f99709370657
* Second try: Introduce plugin_crt0.c that every plugin links.Thomas Martitz2010-08-24
| | | | | | | | | | | | | 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
* Revert "Introduce plugin_crt0.c that every plugin links."Thomas Martitz2010-08-23
| | | | | | 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
* Introduce plugin_crt0.c that every plugin links.Thomas Martitz2010-08-23
| | | | | | | | | | | | | 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
* S#10387 - Rework pluginlib actionsThomas Martitz2010-05-20
| | | | | | | | | | | | | 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
* Dice: Prevent a divide by 0Karl Kurbjun2009-12-04
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23842 a1c6a512-1295-4272-9138-f99709370657
* add playback control to more menu of plugins.Teruaki Kawashima2009-08-05
| | | | | | | although it doesn't make much sense for some plugins like dice as the menu is only shown when you start that plugin. change star plugin to go back to menu when exit game instead of closing plugin so that above change makes useful. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22171 a1c6a512-1295-4272-9138-f99709370657
* unify pointers to value for configfile, and add TYPE_BOOL type, used byAndrew Mahone2009-01-17
| | | | | | pictureflow git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19786 a1c6a512-1295-4272-9138-f99709370657
* loader-initialized global plugin API:Andrew Mahone2009-01-16
| | | | | | | | | | | | | | | | | 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
* New makefile solution: A single invocation of 'make' to build the entire ↵Björn Stenberg2008-11-20
| | | | | | | | | 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
* Remove a viewport ambiguity by changing the screens width/heigth members ↵Peter D'Hoye2008-06-28
| | | | | | into lcdwidth/lcdheight. Normal usercode should always use getwidth()/getheigth() as that returns the viewport width/height. Fixes issues that would have appeared in many places when introducing viewports with sizes != lcd sizes. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17857 a1c6a512-1295-4272-9138-f99709370657
* Updated our source code header to explicitly mention that we are GPL v2 orDaniel Stenberg2008-06-28
| | | | | | | | | 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
* Plugin parameters should be const.Steve Bavin2008-05-13
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17492 a1c6a512-1295-4272-9138-f99709370657
* the menu and list now accepts a parent viewport to draw in (and the menu can ↵Jonathan Gordon2008-03-26
| | | | | | be told to not show status/button bars). This lays the groundwork to fix colour problems with plugin menus (see star.c for an example.) This hopefully fixes some button bar issues as well as theme problems. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16812 a1c6a512-1295-4272-9138-f99709370657
* Fixed the Total being out of screen with huge fonts like ter-u32bKevin Ferrare2007-10-26
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15317 a1c6a512-1295-4272-9138-f99709370657
* FS#7478 (heavily modified by me).Jonathan Gordon2007-07-25
| | | | | | | Dice now saves your config git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13984 a1c6a512-1295-4272-9138-f99709370657
* Fixes red hopefullyKevin Ferrare2007-07-20
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13936 a1c6a512-1295-4272-9138-f99709370657
* Dice plugin now works on remote and uses the action api ; cleaned up the ↵Kevin Ferrare2007-07-20
| | | | | | code a little bit as well git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13935 a1c6a512-1295-4272-9138-f99709370657
* Update some comments in menu.h to be hopefully more helpful.Jonathan Gordon2007-05-20
| | | | | | | Fix all the wrong usage of rb->do_menu() (my fault, sorry) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13439 a1c6a512-1295-4272-9138-f99709370657
* attempt to make the Gigabeat button mappings in the plugins more logical and ↵Marcoen Hirschberg2007-05-19
| | | | | | in line with the mapping in rockbox itself git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13436 a1c6a512-1295-4272-9138-f99709370657
* Now charcell displays require lcd_update() for updating the main lcd content ↵Jens Arnold2007-04-06
| | | | | | like bitmap displays. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13050 a1c6a512-1295-4272-9138-f99709370657
* Adjust plugins to use the new menu API. Int settings still use the old API. ↵Tom Ross2007-03-28
| | | | | | Remove a nasty global in Star and add some error checking. Add a work-around for the gigabeat so that Star doesn't crash on target. The transition works fine on the sim and I see nothing obviously wrong with the code but it manages to crash on target everytime. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12946 a1c6a512-1295-4272-9138-f99709370657
* Rename some macros to account for the recently added M5 port. No code changes.Jens Arnold2007-03-16
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12809 a1c6a512-1295-4272-9138-f99709370657
* Start of work on a port to the Archos 'AV300' (AV320/340/380) - a working UI ↵Dave Chapman2007-01-14
| | | | | | 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
* Allow the Sansa e200 UI simulator to be built. Thanks to Andre Smith for the ↵Barry Wardell2006-10-26
| | | | | | 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
* Barry Wardell's keymappings for H10Daniel Stenberg2006-08-03
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10446 a1c6a512-1295-4272-9138-f99709370657
* To avoid having to use the main unit when accidentally launching a plugin ↵Kevin Ferrare2006-06-30
| | | | | | from the remote, plugins now support remote quit git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10157 a1c6a512-1295-4272-9138-f99709370657
* Fix dice on the player (sim at least, my player is acting up)Brandon Low2006-03-12
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9014 a1c6a512-1295-4272-9138-f99709370657
* add gigabeat keysMarcoen Hirschberg2006-03-09
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8975 a1c6a512-1295-4272-9138-f99709370657
* Dice rolling plugin by me with help from Paul_the_Nerd on some keypadsBrandon Low2006-03-05
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8924 a1c6a512-1295-4272-9138-f99709370657