gif2c: Produce nicer formatted C code.
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
60aacb0531
commit
0af76f2195
@ -166,7 +166,16 @@ puts "uint16_t animation_#{name}_delays[] = {#{times.join(",")}};"
|
||||
s=0
|
||||
puts "uint16_t animation_#{name}_offsets[] = {#{(data.map{|d| t=s; s+=d.count; t} + [s]).join(",")}};"
|
||||
|
||||
puts "AnimationData animation_#{name} = {&animation_#{name}_colors[0], &animation_#{name}_data[0], &animation_#{name}_offsets[0], &animation_#{name}_delays[0], #{individual_frame_times}, #{colors.count-2}, #{frames_data.count}, #{total_x}, #{total_y}};"
|
||||
puts "AnimationData animation_#{name} = {"
|
||||
puts " &animation_#{name}_colors[0],"
|
||||
puts " &animation_#{name}_data[0],"
|
||||
puts " &animation_#{name}_offsets[0],"
|
||||
puts " &animation_#{name}_delays[0],"
|
||||
puts " #{individual_frame_times}, /* individual_frame_times */"
|
||||
puts " #{colors.count-2}, /* color_count */"
|
||||
puts " #{frames_data.count}, /* frames_count */"
|
||||
puts " #{total_x}, #{total_y} /* width, height */"
|
||||
puts "};"
|
||||
puts
|
||||
STDERR.puts
|
||||
STDERR.puts "Space usage:"
|
||||
|
Loading…
Reference in New Issue
Block a user