diff --git a/src/tools/gif2c.rb b/src/tools/gif2c.rb index ac19add..2d14d5f 100755 --- a/src/tools/gif2c.rb +++ b/src/tools/gif2c.rb @@ -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:"