Added Sun keyboard theme by Sirea (Martina Smejkalova)

This commit is contained in:
pelya
2012-05-30 21:35:29 +03:00
parent 2106847381
commit 2e52b4488d
32 changed files with 28877 additions and 2174 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

View File

@@ -0,0 +1,23 @@
=== Abstract Sun Icon Set ===
By: Sirea - Martina Šmejkalová (http://www.sireasgallery.com/)
Contact: m.smejkalova@gmail.com
Download: http://www.sireasgallery.com/iconset/abstractsun/
Description: Abstract icon set with Sun theme.
==========
Attribution Required (CC by)
You are free:
To Share - To copy, distribute and transmit the work.
To Remix - To adapt the work.
Under the following conditions:
Attribution - You must attribute the work in the manner specified
by the author or licensor (but not in any way that suggests that
they endorse you or your use of the work). For example, if you are
making the work available on the Internet, you must link to the original source.

View File

@@ -3,7 +3,3 @@ all: converter
converter: *.cpp
g++ -g3 -o $@ $? `sdl-config --cflags` `sdl-config --libs` -lSDL_image
editor.exe: *.cpp
i586-mingw32msvc-g++ -o $@ $? -I ../sdl-1.2/include -L. -lSDL
i586-mingw32msvc-strip $@

View File

@@ -4,10 +4,11 @@
for f in ../UltimateDroid/*.png; do
newname=`echo $f | sed 's@.*/@@' | tr '[A-Z]' '[a-z]'`.raw
./converter $f ../../res/raw/$newname 1
./converter $f ../../res/raw/$newname 16
done
rm -f ../../res/raw/ultimatedroid.raw
printf '\000\000\000\030' > ../../res/raw/ultimatedroid.raw # size, 030 = 24
for F in \
dpadbutton \
@@ -59,10 +60,11 @@ echo "};" >> ../touchscreentheme.h
for f in ../SimpleTheme/*.png; do
newname=simpletheme`echo $f | sed 's@.*/@@' | tr '[A-Z]' '[a-z]'`.raw
./converter $f ../../res/raw/$newname 1
./converter $f ../../res/raw/$newname 16
done
rm -f ../../res/raw/simpletheme.raw
printf '\000\000\000\030' > ../../res/raw/simpletheme.raw # size, 030 = 24
for F in \
dpad \
@@ -107,3 +109,44 @@ mv -f ../../res/raw/simpletheme.raw.gz ../../res/raw/simpletheme.raw
echo "unsigned char * SimpleTheme[] = { 00 // Dummy byte, skip it" >> ../touchscreentheme.h
cat ../../res/raw/simpletheme.raw | od -t x1 -v -A n | tr " " "," >> ../touchscreentheme.h
echo "};" >> ../touchscreentheme.h
# Abstract Sun Icon Set by Sirea (Martina Šmejkalová)
for f in ../Sun/*.png; do
newname=`echo $f | sed 's@.*/@@' | tr '[A-Z]' '[a-z]'`.raw
./converter $f ../../res/raw/$newname 32
done
rm -f ../../res/raw/sun.raw
printf '\000\000\000\012' > ../../res/raw/sun.raw # size, 012 = 10
for F in \
sun-2.ico-10 \
\
sun-6.ico-10 \
sun-7.ico-10 \
sun-4.ico-10 \
sun-5.ico-10 \
\
sun-3.ico-10 \
sun-9.ico-10 \
sun-1.ico-10 \
sun-8.ico-10 \
\
sun-mouse_pointer \
; do
if [ \! -e ../../res/raw/$F.png.raw ]; then
echo Cannot find ../../res/raw/$F.png.raw - check if all files are in place
exit 1
fi
cat ../../res/raw/$F.png.raw >> ../../res/raw/sun.raw
done
rm ../../res/raw/sun*.png.raw
gzip -9 < ../../res/raw/sun.raw > ../../res/raw/sun.raw.gz
mv -f ../../res/raw/sun.raw.gz ../../res/raw/sun.raw
echo "unsigned char * SunTheme[] = { 00 // Dummy byte, skip it" >> ../touchscreentheme.h
cat ../../res/raw/sun.raw | od -t x1 -v -A n | tr " " "," >> ../touchscreentheme.h
echo "};" >> ../touchscreentheme.h

Binary file not shown.

View File

@@ -14,13 +14,18 @@ int
main(int argc, char *argv[])
{
if(argc < 3)
{
printf("Usage: converter source.png target.raw [target bpp = 16 or 32]\n");
return 1;
}
SDL_Surface * src = IMG_Load(argv[1]);
if(!src)
return 1;
bool perPixeAlpha = false;
if( argc >= 4 )
perPixeAlpha = true;
bool perPixeAlpha = true;
bool target32bpp = false;
if( argc >= 3 && strcmp(argv[3], "32") == 0 )
target32bpp = true;
/*
if( src->format->BitsPerPixel == 32 )
{
for( int i = 0; i < src->h; i++ )
@@ -38,10 +43,13 @@ main(int argc, char *argv[])
}
}
}
printf("Converter: %s BPP %d %dx%d perPixeAlpha %d\n", argv[1], src->format->BitsPerPixel, src->w, src->h, (int)perPixeAlpha);
*/
printf("Converter: %s BPP %d %dx%d perPixeAlpha %d target %d bpp\n", argv[1], src->format->BitsPerPixel, src->w, src->h, (int)perPixeAlpha, target32bpp ? 32 : 16);
SDL_Surface * format1 = SDL_CreateRGBSurface( SDL_SWSURFACE|SDL_SRCALPHA, 1, 1, 16, 0xF800, 0x7C0, 0x3E, 0x1 );
if( perPixeAlpha )
format1 = SDL_CreateRGBSurface( SDL_SWSURFACE|SDL_SRCALPHA, 1, 1, 16, 0xF000, 0xF00, 0xF0, 0xF );
if( target32bpp )
format1 = SDL_CreateRGBSurface( SDL_SWSURFACE|SDL_SRCALPHA, 1, 1, 32, 0xFF000000, 0xFF0000, 0xFF00, 0xFF );
if(!format1)
return 1;
SDL_Surface * dst = SDL_ConvertSurface(src, format1->format, SDL_SWSURFACE|SDL_SRCALPHA);
@@ -54,15 +62,16 @@ main(int argc, char *argv[])
fwrite( &w, 1, 4, ff );
int h = htonl(dst->h);
fwrite( &h, 1, 4, ff );
int format = htonl(perPixeAlpha ? 1 : 0);
int format = htonl(target32bpp ? 2 : (perPixeAlpha ? 1 : 0));
fwrite( &format, 1, 4, ff );
for( int i = 0; i < dst->h; i++ )
{
for( int ii = 0; ii < dst->w; ii++ )
{
if(* (Uint16 *) ((Uint8 *)dst->pixels + i*dst->pitch + ii*2) & 0x1 == 0 && ! perPixeAlpha)
if( (!target32bpp) && (
* (Uint16 *) ((Uint8 *)dst->pixels + i*dst->pitch + ii*2) & 0x1 == 0 && ! perPixeAlpha) )
* (Uint16 *) ((Uint8 *)dst->pixels + i*dst->pitch + ii*2) = 0;
fwrite( (Uint8 *)dst->pixels + i*dst->pitch + ii*2, 1, 2, ff );
fwrite( (Uint8 *)dst->pixels + i*dst->pitch + ii*(target32bpp?4:2), 1, (target32bpp?4:2), ff );
}
}
fclose(ff);

File diff suppressed because it is too large Load Diff