Slick Forums

Discuss the Slick 2D Library
It is currently Fri May 24, 2013 8:39 pm

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: BUG: Tiled Map Init
PostPosted: Wed Jan 11, 2012 2:18 am 
Offline

Joined: Thu Nov 17, 2011 4:58 pm
Posts: 20
Location: Spring Valley, OH
Not sure if this is an intended function so I just wanted to point out to others when making a TiledMap I init it like so:
Code:
map1 = new TiledMap("Resources/map1.tmx", "");


And it works properly with no absolute pathname.Also an absolute filename works for single parameter.
Code:
map1 = new TiledMap("G:/MagicLampShade/workspace/TheMagicLampshade/LampSource/Resources/map1.tmx");

But if no empty second parameter is given like so:
Code:
map1 = new TiledMap("Resources/map1.tmx");

I get this stacktrace(snippet):
Code:
Tue Jan 10 21:07:59 EST 2012 ERROR:Resource not found: Resources/G:/MagicLampShade/workspace/TheMagicLampshade/LampSource/Resources/myTileset.png


Wouldn't it make sense to adjust the single parameter TiledMap init so it worked essentialy like the second parameter was blank?

_________________
//I understand everything I will do has been done before.


Top
 Profile  
 
 Post subject: Re: BUG: Tiled Map Init
PostPosted: Thu Jan 12, 2012 9:52 am 
Offline
Site Admin
User avatar

Joined: Thu Jan 01, 1970 12:00 am
Posts: 3143
Nope, the second parameter is the relative directory. If you don't specify you're saying resolve it based on the tmx expectation. If you're passing blank you're saying resolve it at the base of the resources path.

Cheers,

Kev


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group