Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / How to use LoadSubImage

Author
Message
Funnell7
13
Years of Service
User Offline
Joined: 8th Sep 2011
Location: UK, England
Posted: 7th Feb 2012 16:09 Edited at: 7th Feb 2012 16:12
Hello, I wanted to experiment with the LoadSubImage command, but have no clue how to set it up. From the documentation I can make out that I need to load the main image first, then use LoadSubImage along with the subimages.txt file. The problem is, I do not know how to format the subimages.txt file, what do I write in it? Would anyone mind providing a basic example?

Thank you!

Edit: Tier 1 by the way...
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 8th Feb 2012 00:07
The subimages.txt file should be in the following format

imageName:X:Y:Width:Height



where X:Y is the pixel location of the top left corner of the sub image, and Width:Height is the size of that sub image.

Then you would load the image with LoadSubImage( NewID, MainID, "foreground.png" ) for example.
Funnell7
13
Years of Service
User Offline
Joined: 8th Sep 2011
Location: UK, England
Posted: 8th Feb 2012 12:57
Thanks Paul, I have got it to work now...

I also found that you have to rename the 'subimages.txt' file to '<name of original image> subimages.txt'. As an example, the subimages file for this:



Would be 'Test subimages.txt'

Thanks again...

Login to post a reply

Server time is: 2024-11-23 00:49:52
Your offset time is: 2024-11-23 00:49:52