clintbellanger / flare

Free Libre Action Roleplaying Engine
http://clintbellanger.net/rpg/
GNU General Public License v3.0
166 stars 41 forks source link

Animations: Fix type warning messages. #842

Closed stefanbeller closed 12 years ago

stefanbeller commented 12 years ago

Fixes #832.

A new animation is created when the previous section is complete. That's exactly the case when a new section starts: parser.new_section is set. But it is not the case when dealing with the very first section, because there we have no section before which should be added.

I suspect that the line setting back "parser.new_section = false;" after reading the first line should have prevented the case, but that would only work if the first section started in the first line. If we have a layout of animation config files like the following, in which we configure some common things for all sections, the previous solution would not work:

render_size_x=128
render_size_y=128
render_offset_x=64
render_offset_y=96

[stance]
position=0
frames=4
duration=180
type=back_forth

[run]
position=4
...