Slick Forums

Discuss the Slick 2D Library
It is currently Mon Dec 10, 2018 12:40 am

All times are UTC




Post new topic Reply to topic  [ 7 posts ] 
Author Message
PostPosted: Sat Apr 07, 2012 3:44 pm 
Offline

Joined: Sat Mar 17, 2012 5:50 pm
Posts: 5
Hi there,

I just noticed that headless mode in TiledMap cannot be used: (TiledMap.java, line 43)
Code:
private static void setHeadless(boolean h) {

It can never be called because it is private instead of public.

Greetings,
Wilson


Top
 Profile  
 
PostPosted: Mon Jul 23, 2012 12:34 am 
Offline

Joined: Thu Jun 23, 2011 4:57 am
Posts: 4
Is this going to be fixed? I noticed the same topic was posted a year before this one.

I'm going to work around this by making my server extend BasicGame, but it's definitely overkill for this. :(


Top
 Profile  
 
PostPosted: Mon Jul 23, 2012 1:10 am 
Offline
Slick Zombie

Joined: Sat Jan 27, 2007 7:10 pm
Posts: 1482
I'm not familiar with the TiledMap package -- is there any reason why this should be private? What is a "headless" tiled map? I can expose the method as public, assuming that won't lead to any issues.


Top
 Profile  
 
PostPosted: Mon Jul 23, 2012 1:25 am 
Offline

Joined: Thu Jun 23, 2011 4:57 am
Posts: 4
"Headless" is useless in its current state because it can't be changed, and it's only read from a single line of code in TiledMap: here.

How it should work is by preventing image data from being loaded, which, for example, means a server wouldn't have to initialize any Slick-specific stuff just to load collision data from a Tiled map.

Based on what I've seen/read, making the static function that changes "headless" public should be perfect as a fix. Even the word "headless" onlyappears in this single java file, so it should be isolated.


Top
 Profile  
 
PostPosted: Tue Jul 31, 2012 6:09 am 
Offline

Joined: Thu Jun 23, 2011 4:57 am
Posts: 4
Hey davedes, is this on the radar to be fixed?


Top
 Profile  
 
PostPosted: Tue Jul 31, 2012 1:10 pm 
Offline
Slick Zombie

Joined: Sat Jan 27, 2007 7:10 pm
Posts: 1482
Fixed in dev branch.

In future if you see something like this which is easy to fix, you can always submit a pull request, make the patch, then one of the devs can approve it for you. :)


Top
 Profile  
 
PostPosted: Wed Aug 01, 2012 3:30 am 
Offline

Joined: Thu Jun 23, 2011 4:57 am
Posts: 4
Thank you very much, davedes. I haven't ever contributed to a project like this before, so I wasn't aware of the standard procedure. I'll definitely do that in the future if something like this comes up again.


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 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:  
cron
Powered by phpBB® Forum Software © phpBB Group