1IceBreaker themes are simple to create. They're are definined in text files 2with the extension .ibt (that's _I_ce_B_reaker _T_heme) in the IceBreaker 3data directory. The filename is the name of the theme itself, which must be 4seven characters or less -- not because of the DOS 8.3 limit but because 5more than seven requires the options menubox to be really big and ugly and 6we don't want that. 7 8The file consists mostly of color definitions, and also gives the location 9of the two sound files and the one sprite bitmap. Color definitions begin 10with a keyword ("Background", "NormalText", etc.) and then give decimal 11values from 0-255 for red, green, and blue, respectively. 12 13The sound and image defintions are just the keyword followed by a filename. 14More info on file formats in a bit. 15 16The keywords aren't case sensitive, and you can use any amount of whitespace 17you want. If you leave out a particular keyword, IceBreaker will use the 18default but spit out a complaint on stderr -- so don't do that. (There's 19currently one exception -- SpriteMirrorBitmap, which I'll get to in a bit.) 20 21 22The default theme is "linux", and the file linux.ibt looks approximately 23like this: 24 25 Background 0 64 128 26 NormalText 255 255 255 27 BoardFillMin 224 224 224 28 BoardFillMax 255 255 255 29 Gridline 192 192 192 30 GridHighlight 192 192 192 31 Line1 0 0 0 32 Line2 192 0 64 33 MenuHighlight 255 255 255 34 GameoverText 192 0 64 35 ScorescrollText 0 0 0 36 BonusscrollText 192 0 64 37 TextentryBox 0 0 0 38 TextentryText 255 255 255 39 CopyrightText 192 192 192 40 SpriteTransparent 255 0 0 41 SpriteBitmap penguin.bmp 42 SoundOuch ouch.wav 43 SoundCrash crash.wav 44 45The names should mostly be self-explanatory. If something is unclear, let me 46know, and I'll either change the name in a future version or write better 47documentation here. A few things bear mentioning: 48 49BoardFillMin and BoardFillMax define the colors of the game play area. The 50values will be randomly selected from the range given, but there's a twist 51-- if two (or three) of the red, green, or blue values have identical Min 52*and* identical Max values, those two will be "locked" together. This way, 53you can produce grey or monotone backgrounds instead of having every theme 54look like the mutant love child of Rainbow Brite and the Swamp Thing. 55 56SpriteTransparent is the color value which will be treated as clear when 57drawing the bitmap. In the above example, the penguin.bmp has a bright red 58background, and since SpriteTransparent is set to the matching value, the 59background isn't shown. 60 61The bitmap file should be a 24-bit MS-Windows-style .bmp format. I know that 62this is Lame(tm) but the SDL library which IceBreaker uses understands this 63format natively, and so using it allows us to avoid having a whole extra 64library just to load some really tiny bitmaps. They should be 14x14, by the 65way. If you want, you can make them as small as 12x12, but that's basically 66treated as the top-left of 14x14, and support for that may vanish in a 67future version. (If you want smaller, just mask out most of the image.) 68 69Don't underestimate how hard it is to make a sprite image look good at such 70a tiny size. Making a theme which represents something in real life rather 71than being abstract or iconic is a challenge. A future version of IceBreaker 72may allow you to include background and playing board graphics instead of 73just colors -- but don't hold your breath for that. 74 75In addition to SpriteBitmap, you may also set SpriteMirrorBitmap. If this 76tag exists, the given image will be used when the sprite is moving to the 77right, and the main SpriteBitmap when it's moving to the left. If you leave 78out this tag, there will be no warning -- the main bitmap will be used for 79both. In fact, leaving it out is the best thing to do if you don't want your 80image to flip, because it saves, like, 500 bytes of RAM over defining the 81same image twice. And we all know how important those few bytes of RAM are 82these days, right? 83 84The sound files are 8 bit mono PCM at 22050. They should also be really 85short -- under a second. This'll mean the total size will be easily less 86than 30k -- if it's not, something's not right. 87 88If you do produce a good theme, let me know -- send it to 89<mattdm@mattdm.org>, and I'll consider including it with the main 90distribution. All themes must be licensed under the GPL. 91