k-kawa / aseprite

Automatically exported from code.google.com/p/aseprite
0 stars 0 forks source link

Export plugins #54

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Hello!
I just suggest you to make an API to make some plugins to export the sprites in 
many formats.

For example I'm a Calculator C Programmer, and I want to make sprite code 
directly from ASE.

The code would be like (C++ like, or what you want):

Export()
{
index = 0;
output = new File("export.c", "w+");
for each(line in sprite)
{
 for each(pixel in line)
 {
  output.write(sprite.pixel[index++].get16bitColor()); // yeah, that's sound like lua...
 }
}

}

That would be useful for manyn developpers who want directly htheir sprites in 
their game! :p

I can give you some code if you want my exemple won't work, but I've already 
made some tools, but for looping the operation, or just for many sprites, it's 
not prefered (if I have for example 151 sprites, do I really need to make the 
sames steps 151 times?)

Good reading/coding.
Eiyeron.

Original issue reported on code.google.com by Eiye...@gmail.com on 16 Dec 2011 at 4:28

GoogleCodeExporter commented 8 years ago
Hi! There are really old ASE versions (I don't remember the exact number) that 
supported Lua scripting, but then I removed it because it's a lot of work to 
keep scripts working when big refactor tasks are going on (also Lua syntax 
sucks).

I'm thinking in Python because there are a lot of code and libraries out there. 
I'll be investigating the possibility to create several kind of plugins.

Anyway, about your specific problem, I think that you need a Makefile with a 
rule to build your .c files from the .png files. So with a simple "make" you 
can convert only the modified .png files to .c

Example, a Makefile's rule like:

%.cimage: %.png
   my_convert_tool -in $< -out $@

Original comment by davidcapello on 17 Dec 2011 at 7:50

GoogleCodeExporter commented 8 years ago

Original comment by davidcapello on 21 Nov 2013 at 3:00

GoogleCodeExporter commented 8 years ago

Original comment by davidcapello on 17 Jul 2014 at 12:58