baylej / tmx

C tmx map loader
http://libtmx.rtfd.io/
BSD 2-Clause "Simplified" License
241 stars 54 forks source link

objectgroup linked list is reversed #81

Open brccabral opened 3 months ago

brccabral commented 3 months ago

Hi, I have the following group

<objectgroup id="7" name="Objects">
  <object id="2" gid="147" x="432" y="948" width="56" height="112"/>
  <object id="29" gid="149" x="242" y="886" width="56" height="116"/>
  <object id="95" gid="144" x="962" y="442" width="56" height="68"/>
</objectgroup>

My layer->content.objgr->head starts in id 95, then 29 and then 2.

Should it start in 2, then 29 and then 95?

baylej commented 3 months ago

Hello, Linked lists are created using insert at head, that's why they are in reversed order.