TMX map and layer properties

  ... the case you feel the need for a new feature or want to submit one.

Re: TMX map and layer properties

Postby moraes » Tue Oct 12, 2010 10:49 pm

Maybe I'm missing something, but I think there's a mistake here:

http://code.google.com/p/andengine/sour ... r.java#119

this.mInMap will most of the time be true (the whole xml is inside <map>), so it should be checked last otherwise it will be populated with all <property>'s in the map, and the other tags won't have any property. Am I wrong?
moraes
 
Posts: 9
Joined: Wed Oct 06, 2010 10:04 am
Location: Brazil

Re: TMX map and layer properties

Postby Nicolas Gramlich » Tue Oct 12, 2010 11:19 pm

Argh stupid me, I should have left a comment there why I initially "reverse-ordered" that :lol:

Big thanks for keeping your eyes more open than me :o

Best Regards,
Nicolas
Nicolas Gramlich
Site Admin
 
Posts: 1734
Joined: Mon Jun 07, 2010 6:20 pm
Location: Schriesheim, Germany

Re: TMX map and layer properties

Postby Nicolas Gramlich » Tue Oct 12, 2010 11:24 pm

Changeset: http://code.google.com/p/andengine/sour ... 70767a4dcb

Should be fine now. :roll:

Order of conditions is now back to "small-to-big":
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. if(this.mInTile) {
  2. } else if(this.mInLayer) {
  3. } else if(this.mInObject) {
  4. } else if(this.mInObjectGroup) {
  5. } else if(this.mInMap) {
  6. }  
Parsed in 0.013 seconds, using GeSHi 1.0.8.4


Best Regards,
Nicolas
Nicolas Gramlich
Site Admin
 
Posts: 1734
Joined: Mon Jun 07, 2010 6:20 pm
Location: Schriesheim, Germany

Previous

Return to Features

Who is online

Users browsing this forum: No registered users and 6 guests