Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: bmp support in the build system

bmp support in the build system

From: Dave Chapman <dave_at_dchapman.com>
Date: 2005-12-26

Hi,

I've been working on adding support for the use of bmp files directly in
the Rockbox source - i.e. putting .bmp files in CVS instead of including
bitmaps in .c files.

An initial work-in-progress patch is here:

http://www.davechapman.f2s.com/rockbox/buildbmp.diff
http://www.davechapman.f2s.com/rockbox/bitmaps.zip

The zip file contains two new directories - apps/bitmaps/ and
apps/plugins/bitmaps/ - containing bmp files for the Rockbox logo and
Sudoku as a proof of concept test.

Each of those two bitmaps/ directories contains a standard Rockbox
"SOURCES" file and a Makefile which creates libbitmaps.a and
libpluginbitmaps.a respectively.

The configure script has been modified to create a BMP2RB variable
containing the bmp2rb command for native bitmaps for that target - e.g.
"$(toolsdir)/bmp2rb -f 2" for iriver h1x0.

This has turned out to be more complicated than I thought. Some
unresolved (or poorly resolved) problems are:

1) Each target uses multiple bitmaps formats - potentially we could have
three different formats - mono, native (main unit), and native (remote).
  These could potentially requre different parameters passed to bmp2rb.c

In the current patch, this has been resolved by adding a "-m" option to
bmp2rb. For non-mono targets, this causes bmp2rb to ignore the -f
option and output a "-f 0" bitmap if the input bitmap has depth 1.

But maybe we need a less hackish and more flexible solution. Any ideas?

2) Moving the #ifs into the bitmap SOURCES file simplifies the code a
lot, but currently the sizes of the bitmaps still need to be defined in
the C file itself - the size isn't taken from the output from bmp2rb.
I've ignored this for now.

Any comments/suggestions welcome.

Dave.
Received on Mon Dec 26 14:10:33 2005


Page was last modified "Jan 10 2012" The Rockbox Crew
aaa