Commit graph

25 commits

Author SHA1 Message Date
Jonathan Gordon
2c71aa9feb lcd/skin_engine: Add the ability to draw onto the backdrop layer
The framebuffer the lcd driver uses can now be changed on the fly
which means that regular lcd_* drawing functions can draw onto the
"backdrop" buffer. The skin engine can use this to create layered
effects.

Add the tag %VB to a viewport to draw that viewport onto the
backdrop layer. If you want to draw an image onto the backdrop
framebuffer use %x(backdrop filename) instead of %X() inside
a viewport with %VB.

Change-Id: I741498e2af6d4f2d78932cabe8942317893e7cfc
2012-02-28 23:03:04 +11:00
Jonathan Gordon
fc5cdacafd slightly reaarange code to make fml happy :)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31071 a1c6a512-1295-4272-9138-f99709370657
2011-11-27 13:57:18 +00:00
Jonathan Gordon
494860cfd4 Free a handle when we try to load a backdrop file which doesnt exist or cant be loaded
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31070 a1c6a512-1295-4272-9138-f99709370657
2011-11-27 11:50:07 +00:00
Jonathan Gordon
0ca4b38b1b skinengine: Rework skin loading so skins can be un/loaded individually. This also means that loading a .cfg which doesnt change themes shouldnt have them reloaded
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31037 a1c6a512-1295-4272-9138-f99709370657
2011-11-21 10:02:23 +00:00
Jonathan Gordon
1252d0d540 Get rid of a really annoying #ifdef line to check if backdrop support should be enabled
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31027 a1c6a512-1295-4272-9138-f99709370657
2011-11-19 13:46:25 +00:00
Thomas Martitz
e126153687 Fix FS#12357 - New backdrop not displayed after set backdrop from context menu
The loaded flag wasn't set and skin_backdrop_show() call was missing.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30846 a1c6a512-1295-4272-9138-f99709370657
2011-10-28 17:09:38 +00:00
Björn Stenberg
0942e2a0f7 Changed the FOR_NB_SCREENS macro to always be a for loop that declares its 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
2011-10-15 19:35:02 +00:00
Jonathan Gordon
b6271900b0 Make sure to set the current lcd backdrop id so the buflib move callback can reset the correct backdrop
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30515 a1c6a512-1295-4272-9138-f99709370657
2011-09-13 13:20:17 +00:00
Jonathan Gordon
4f4e91e341 make some stuff static
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30477 a1c6a512-1295-4272-9138-f99709370657
2011-09-08 12:38:14 +00:00
Jonathan Gordon
a91fa97cd8 fix checkwps
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30476 a1c6a512-1295-4272-9138-f99709370657
2011-09-08 11:34:05 +00:00
Jonathan Gordon
070f6e1397 Use buflib for the skin backdrop images potentially allowing multiple images per skin in the future
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30475 a1c6a512-1295-4272-9138-f99709370657
2011-09-08 11:24:29 +00:00
Frank Gevaerts
d09f97880a Support loading backdrops from anywhere in the filesystem. Fixes FS#12041
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29700 a1c6a512-1295-4272-9138-f99709370657
2011-04-10 13:25:47 +00:00
Thomas Martitz
2c2416094f Get rid of get_user_file_path and do the path handling in wrappers for open() and friends.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28752 a1c6a512-1295-4272-9138-f99709370657
2010-12-06 22:26:31 +00:00
Jonathan Gordon
59cc0a9a14 Don't try to show a backdrop if the bmp wasnt loaded successfully
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28303 a1c6a512-1295-4272-9138-f99709370657
2010-10-18 07:38:36 +00:00
Jonathan Gordon
2c8204cd91 Hopefully fix FS#11630 where the wps backdrop would be shown instead of the menu one
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28116 a1c6a512-1295-4272-9138-f99709370657
2010-09-19 11:49:33 +00:00
Jonathan Gordon
9928e3418f Another major skin backend update/hopefully bugfix:
Skins are now more self contained in the skin manager which in the future might allow on demand skin loading (i.e smaller skin buffers)
Skin backdrops are also managed more intelegently (fixes a bug where you can get a crazy backdrop loaded if a .sbs fails to load)

the rockbox_default rescue theme is now called rockbox_failsafe to better express what it actually is.

This commit hopefully/maybe fixes the heavily reported data aborts, so please check if you are getting them

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28073 a1c6a512-1295-4272-9138-f99709370657
2010-09-14 11:56:50 +00:00
Thomas Martitz
e60de9e5bb Fix backdrops from sbs not being loaded correctly (caused by r27791).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27802 a1c6a512-1295-4272-9138-f99709370657
2010-08-13 15:09:20 +00:00
Thomas Martitz
71610fbf62 Backdrop dir needs to go through get_user_file_path()
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27791 a1c6a512-1295-4272-9138-f99709370657
2010-08-12 17:32:59 +00:00
Jonathan Gordon
2d31d77a8b FS#11470 - new skin code, finally svn uses the new parser from the theme editor. This means that a skin that passes the editor WILL pass svn and checkwps (unless the target runs out of skin buffer or something.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27613 a1c6a512-1295-4272-9138-f99709370657
2010-07-29 12:37:48 +00:00
Teruaki Kawashima
6e39dc9e27 Correct reusing buffers if the backdrop file is already loaded.
FS#11305 by myself.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26510 a1c6a512-1295-4272-9138-f99709370657
2010-06-03 13:32:12 +00:00
Thomas Martitz
50a6ca39ad Move c/h files implementing/defining standard library stuff into a new libc directory, also standard'ify some parts of the code base (almost entirely #include fixes).
This is to a) to cleanup firmware/common and firmware/include a bit, but also b) for Rockbox as an application which should use the host system's c library and headers, separating makes it easy to exclude our files from the build.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25850 a1c6a512-1295-4272-9138-f99709370657
2010-05-06 21:04:40 +00:00
Teruaki Kawashima
1fbdd91333 skin: don't calculate id3->elapsed+state->ff_rewind_count each time. remove trailing spaces.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25045 a1c6a512-1295-4272-9138-f99709370657
2010-03-06 14:14:44 +00:00
Nils Wallménius
722ae97836 Set missing svn properties
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24947 a1c6a512-1295-4272-9138-f99709370657
2010-02-27 18:07:38 +00:00
Thomas Martitz
a31624e76e Fix the mechanism to fail to parse skins if images fail to load and fix having no backdrop at all (neither %X nor backdrop setting, DancePuffDuo was broken).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24814 a1c6a512-1295-4272-9138-f99709370657
2010-02-21 19:29:33 +00:00
Jonathan Gordon
877d378710 Reuse the backdrop buffers if 2 skins use the same backdrop (on the same screen of course)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24690 a1c6a512-1295-4272-9138-f99709370657
2010-02-16 05:24:27 +00:00