|
Post by gendor on Aug 13, 2014 6:18:32 GMT -8
Hi there! I've been trying to find documentation for the Python asset converter, but apart from this post from James I haven't been able to turn up anything. I have an animation with 12 cells that I'm loading from a .png file (works fine), but now I just want to add a graphic (to be loaded from the SD card). I've been browsing prep.py, but haven't anything apart from load_handle that could be useful: import Image import gameduino2 as gd2
class Spinner(gd2.prep.AssetBin):
def addall(self): spinner = gd2.prep.split(90, 30, Image.open("720.png")) self.load_handle("SPINNER", spinner, gd2.ARGB1555)
self.load_handle("SYRINGE",Image.open("syringe.png"),gd2.ARGB4)
if __name__ == '__main__': Spinner().make() Using gd2asset to create another header file doesn't seem to work as it creates two "0" handles, so I'd prefer to generate everything using the Python script. Cheers!
|
|