RPTools.net

Discussion and Support

Skip to content

It is currently Fri Nov 24, 2017 5:18 pm 






Reply to topic  [ 3 posts ] 

Previous topic | Next topic 

  Print view

Author Message
 Offline
Kobold
 
Joined: Thu May 10, 2012 8:08 pm
Posts: 2
 Post subject: Token image display questions.
PostPosted: Thu May 10, 2012 8:20 pm 
I've been using MapTool for awhile. I'm taking some coding classes at uni, and we're doing java at the moment. So, I've started going through the MT source code, and I can't for the life of me figure out how MT handles images and displaying them. I get the MD5 references, but the actual image handlers seem to escape me. If someone could point me in the right direction, I'm really interested in learning more that I can use in the future when I get some more experience.

If this is the wrong forum, I apologize.


Top
 Profile  
 
User avatar  Offline
Site Admin
 
Joined: Mon Jun 12, 2006 12:20 pm
Posts: 12103
Location: Tampa, FL
 Post subject: Re: Token image display questions.
PostPosted: Thu May 10, 2012 11:59 pm 
If you have specific questions, I'll try to answer them.

In general, look for class whose names start with Image and/or Asset. For example, AssetManager keeps track of which assets are loaded and which need to be read from the assetcache. You can most easily see this by looking in the rplib project (a separate project from MapTool) and looking for the code that loads tokens or other images from external files, such as loadToken().

The ImageManager is more low-level and tends to handle image conversion to formats that are faster or easier for the JVM to work with, such as converting JPEGs into BufferedImage objects.

I think I've got those two right. I didn't write the code, I inherited it ;), so I could have them backwards.


Top
 Profile  
 
 Offline
Kobold
 
Joined: Thu May 10, 2012 8:08 pm
Posts: 2
 Post subject: Re: Token image display questions.
PostPosted: Fri May 11, 2012 2:22 am 
Thanks! The rplib part was what I was trying to find. I don't fully understand everything it's doing, but that at least puts me where I can start learning this stuff better.


Top
 Profile  
 
Display posts from previous:  Sort by  
Reply to topic  [ 3 posts ] 

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:

Who is online

In total there is 1 user online :: 0 registered, 0 hidden and 1 guest (based on users active over the past 5 minutes)
Most users ever online was 243 on Sun Nov 04, 2012 6:14 am

Users browsing this forum: No registered users and 1 guest





Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

Style based on Andreas08 by Andreas Viklund

Style by Elizabeth Shulman