Heroes of Might and Magic Community
visiting hero! Register | Today's Posts | Games | Search! | FAQ/Rules | AvatarList | MemberList | Profile


Age of Heroes Headlines:  
5 Oct 2016: Heroes VII development comes to an end.. - read more
6 Aug 2016: Troubled Heroes VII Expansion Release - read more
26 Apr 2016: Heroes VII XPack - Trial by Fire - Coming out in June! - read more
17 Apr 2016: Global Alternative Creatures MOD for H7 after 1.8 Patch! - read more
7 Mar 2016: Romero launches a Piano Sonata Album Kickstarter! - read more
19 Feb 2016: Heroes 5.5 RC6, Heroes VII patch 1.7 are out! - read more
13 Jan 2016: Horn of the Abyss 1.4 Available for Download! - read more
17 Dec 2015: Heroes 5.5 update, 1.6 out for H7 - read more
23 Nov 2015: H7 1.4 & 1.5 patches Released - read more
31 Oct 2015: First H7 patches are out, End of DoC development - read more
5 Oct 2016: Heroes VII development comes to an end.. - read more
[X] Remove Ads
LOGIN:     Username:     Password:         [ Register ]
New Server | HOMM1: info forum | HOMM2: info forum | HOMM3: info forum | HOMM4: info forum | HOMM5: info forum | MMH6: wiki forum | MMH7: wiki forum
Heroes Community > Heroes 4 - Lands of Axeoth > Thread: H4ResourceEditor
Thread: H4ResourceEditor This thread is 5 pages long: 1 2 3 4 5 · «PREV
Karmakeld
Karmakeld


Famous Hero
posted June 29, 2018 08:54 AM

I think the 3 options would be great.
Not sure if 'objects' makes more sense than data? But I think you're spot on about the 1st -image description being the intire image with transparent areas an all..

Or you go 1) entire image 2) image data only..?

Please send me a link to updated version

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
iliveinabox05
iliveinabox05


Adventuring Hero
posted June 29, 2018 05:25 PM
Edited by iliveinabox05 at 19:40, 29 Jun 2018.

Karmakeld said:
I think the 3 options would be great.
Not sure if 'objects' makes more sense than data? But I think you're spot on about the 1st -image description being the intire image with transparent areas an all..

Or you go 1) entire image 2) image data only..?

Please send me a link to updated version


I can also add tool tips so hovering your mouse over each option gives more information. That or I could even add an icon with the "i" information symbol like a help feature to explain each option

I'll get you a copy of what I'm currently working with once I get home from work. What it basically does is checks for the existence of a "base_frame" and uses the width and height of that if found, otherwise it just uses the width and height of the entire object's frame for the width and height to resize the image being imported.

Edit. What it should probably be for now is to check if the image's width is bigger than the base_frame width or the total object frame with, and only resize if that's the case. I will make that small update before I send it off to you later.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Karmakeld
Karmakeld


Famous Hero
posted June 30, 2018 11:18 AM

iliveinabox05 said:
Karmakeld said:
I think the 3 options would be great.
Not sure if 'objects' makes more sense than data? But I think you're spot on about the 1st -image description being the intire image with transparent areas an all..

Or you go 1) entire image 2) image data only..?

Please send me a link to updated version


I can also add tool tips so hovering your mouse over each option gives more information. That or I could even add an icon with the "i" information symbol like a help feature to explain each option



I thought of that too, but thought I didn't wanna causebyou the extra work

iliveinabox05 said:

I'll get you a copy of what I'm currently working with once I get home from work. What it basically does is checks for the existence of a "base_frame" and uses the width and height of that if found, otherwise it just uses the width and height of the entire object's frame for the width and height to resize the image being imported.

Edit. What it should probably be for now is to check if the image's width is bigger than the base_frame width or the total object frame with, and only resize if that's the case. I will make that small update before I send it off to you later.


I recall there are a few of the game objects that doesn't have a base_frame but starts off with frame 001 - guess this could also be the case with new animations. So perhaps you should also set up a  conditional action that in case a base_frame isn't present it should check if the image's width is bigger than frame 001's?

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
iliveinabox05
iliveinabox05


Adventuring Hero
posted June 30, 2018 08:12 PM
Edited by iliveinabox05 at 21:54, 13 Jul 2018.

Karmakeld said:
I recall there are a few of the game objects that doesn't have a base_frame but starts off with frame 001 - guess this could also be the case with new animations. So perhaps you should also set up a  conditional action that in case a base_frame isn't present it should check if the image's width is bigger than frame 001's?


That is certainly an option, as long as that is the only image in the object, but it won't matter anyway once I add in resizing options

Edit. Finally got a new form created and I can finally move onto pulling out the settings entered by the user, and then to actually inserting the image.

I do still need to do a little input verification for things like making sure a file was selected, but mostly simple stuff.

Edit2. I have the cases for resizing the frame to the grid width and custom dimensions working. Oh, and the case for not resizing at all

Now the slightly more difficult case of cropping out transparent pixels to the left and right of the image data.

Edit3. The cropping out of transparent pixels to the left, right, top, and bottom of an image was actually pretty easy, and I got that done a little bit ago, but I had some issues importing an image in this manner.

And when I say trouble, I mean trouble getting the H4 Editor to allow me to add the object to the palette for use.

What I need to do now is go back to the sawmill that I have been using and try it there. I just haven't had much time recently.

Edit4. It seems I also need to do a little startup stuff for my program since - obviously - some things are platform dependent, like how much heap space is allocated for the program when it is started up.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Jump To: « Prev Thread . . . Next Thread » This thread is 5 pages long: 1 2 3 4 5 · «PREV
Post New Poll    Post New Topic    Post New Reply

Page compiled in 0.0270 seconds