summaryrefslogtreecommitdiff
path: root/apps/gui/skin_engine/skin_buffer.c
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2010-01-29 07:52:13 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2010-01-29 07:52:13 +0000
commiteee5423fe10f247f74d69404924edf3a0d54e8cd (patch)
treedf46391368a2ad7930a926c59f53796229a933ab /apps/gui/skin_engine/skin_buffer.c
parente3e436e2b5519637981b2667f79c42b2e4ed110b (diff)
downloadrockbox-eee5423fe10f247f74d69404924edf3a0d54e8cd.tar.gz
rockbox-eee5423fe10f247f74d69404924edf3a0d54e8cd.zip
skin rework (FS#10922) notable changes:
- simplify the setting/skin relationship. settings are used as the fallback if it's not specified in the skin - backdrop buffers are now in the skin buffer (which has also increased slightly to accomodate 1 backdrop for each skin and 2 full colour screens for bmps (up for 1.5)) - if no %X is specified in a skin then the backdrop setting will be used. use %Xd to explicitly disable a skin from displaying a backdrop - the base skin can now specify a backdrop. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24366 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui/skin_engine/skin_buffer.c')
-rw-r--r--apps/gui/skin_engine/skin_buffer.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/apps/gui/skin_engine/skin_buffer.c b/apps/gui/skin_engine/skin_buffer.c
index e647fc3f1d..a15ad10bee 100644
--- a/apps/gui/skin_engine/skin_buffer.c
+++ b/apps/gui/skin_engine/skin_buffer.c
@@ -27,6 +27,7 @@
27#include "buffer.h" 27#include "buffer.h"
28#include "settings.h" 28#include "settings.h"
29#include "screen_access.h" 29#include "screen_access.h"
30#include "skin_engine.h"
30#include "wps_internals.h" 31#include "wps_internals.h"
31#include "skin_tokens.h" 32#include "skin_tokens.h"
32#include "skin_buffer.h" 33#include "skin_buffer.h"
@@ -46,7 +47,7 @@
46 * items with unknown sizes get allocated from the start (0->) (data) 47 * items with unknown sizes get allocated from the start (0->) (data)
47 * items with known sizes get allocated from the end (<-buf_size) (tokens) 48 * items with known sizes get allocated from the end (<-buf_size) (tokens)
48 * After loading 2 skins the buffer will look like this: 49 * After loading 2 skins the buffer will look like this:
49 * |tokens skin1|images skin2|---SPACE---|data skin2|data skin1| 50 * |tokens skin1|images skin1|tokens s2|images s2|---SPACE---|data skin2|data skin1|
50 * Make sure to never start allocating from the beginning before letting us know 51 * Make sure to never start allocating from the beginning before letting us know
51 * how much was used. and RESPECT THE buf_free RETURN VALUES! 52 * how much was used. and RESPECT THE buf_free RETURN VALUES!
52 * 53 *
@@ -54,12 +55,12 @@
54 55
55 56
56#ifdef HAVE_LCD_BITMAP 57#ifdef HAVE_LCD_BITMAP
57#define MAIN_BUFFER ((LCD_HEIGHT*LCD_WIDTH*LCD_DEPTH/8) \ 58#define MAIN_BUFFER ((2*LCD_HEIGHT*LCD_WIDTH*LCD_DEPTH/8) \
58 + (2*LCD_HEIGHT*LCD_WIDTH/8)) 59 + (SKINNABLE_SCREENS_COUNT * LCD_BACKDROP_BYTES))
59 60
60#if (NB_SCREENS > 1) 61#if (NB_SCREENS > 1)
61#define REMOTE_BUFFER ((LCD_REMOTE_HEIGHT*LCD_REMOTE_WIDTH*LCD_REMOTE_DEPTH/8) \ 62#define REMOTE_BUFFER (2*(LCD_REMOTE_HEIGHT*LCD_REMOTE_WIDTH*LCD_REMOTE_DEPTH/8) \
62 + (2*LCD_REMOTE_HEIGHT*LCD_REMOTE_WIDTH/8)) 63 + (SKINNABLE_SCREENS_COUNT * REMOTE_LCD_BACKDROP_BYTES))
63#else 64#else
64#define REMOTE_BUFFER 0 65#define REMOTE_BUFFER 0
65#endif 66#endif