Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Treat tiles < 0 as 0 for compatibility with certain map formats (like ogmo) #1166

Merged
merged 1 commit into from
Jun 9, 2014
Merged

Conversation

SeiferTim
Copy link
Member

No description provided.

@@ -229,7 +229,8 @@ class FlxBaseTilemap<Tile:FlxObject> extends FlxObject

if (curTile < 0)
{
throw 'Negative values ($curTile) for tile indices are not allowed.';
// anything < 0 should be treated as 0 - allows compatibility with certain map formats
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm... last time I tried Ogmo I didn't see any negative indices, however, I've seen .oel data with them..

@Gama11
Copy link
Member

Gama11 commented Jun 9, 2014

I guess this might be a better way to handle things then.. as long as negative values also always mean "no tile".

Gama11 added a commit that referenced this pull request Jun 9, 2014
Treat tiles < 0 as 0 for compatibility with certain map formats (like ogmo)
@Gama11 Gama11 merged commit e6e0fbc into HaxeFlixel:dev Jun 9, 2014
@SeiferTim
Copy link
Member Author

At first glance, all of my maps have -1 for 'empty' tiles... and I just now realized why that is... even though I have my '0'th tile empty, I didn't paint with it at all... if that makes sense...
I could fix this by changing all my maps around, and I may do that anyway, but I think it's better to allow it to build than break it.
...which I think you just said as I was typing this lol...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants