====== GIF to sprites ====== By Mace This is a Kick Assembler script that turns a GIF into separate sprites. The order is represented by strings that contain letters, enabling you to make a sprite font with only the letters that you use, but distributed into memory where the sprite pointers have screen code offset. To clearify: if you have the A as your first letter in the top left of your GIF, it will be transfered to spriteMemory + 1*64 (where 1 is the screencode of the letter A). So if spriteMemory is $4000, the 64x21 top left pixels will be transfered to $4040. The GIF could look something like the one below. The script assumes black letters on a white background. Compare the content of the GIF with the strings in lines 13 and 14 of the script and you'll see the resemblance. {{:base:halloweed_sprite_set_single_color.gif?400|}} .label spriteMemory = $4000 * = spriteMemory // spriteMemory is where you want your sprites // Load the GIF with the sprite font, each letter in a 64x21 grid .var spriteFont = LoadPicture("spritefont.gif",List().add($ffffff,$000000)) // Create a List() that contains the letters in your font // in the order as they appear in the GIF .var fontMap = List() // Add strings that contains all the letters for each line in the GIF .eval fontMap.add("abcdefghijklmnopqrstuvwxyz") // content of 1st line .eval fontMap.add(@"0123456789\$27-+?!,.") // content of 2nd line // (@ indicates escape code) // Parse the strings (var l = lines) in the fontMap List() .for (var l=0; l