View Single Post
Old 10-10-18, 06:42 AM   #8
Tycho
Sonar Guy
 
Join Date: Oct 2009
Location: Sofia, Bg
Posts: 384
Downloads: 264
Uploads: 1


Default

I make this not on my computer with SH3, result is not checked, but must be right.

1. First I'll find the draggable chrono in this menu_1024_768.ini file sended me by Anvar, let's use the word "chronometer".

2. Found it: [G3F I400], if you don't find it with this word try with "0x3FF00000".
I think that every draggable chrono in every gui have this ItemID, by inheritance from the first one made by Jonz.
 

3. Let's look over it:
In this particular gui, graphics for the chrono is taken from the file "data/menu/gui/Periscope.tga".
But, because this file contain many things, is used crop function, to take only the chrono.
I open the Periscope.tga with Paint.net and I look over the Crop 0=digits.
The resolution of the file is 1024x1024, the first number of the "crop 0=" is for horizontal direction:
1024 x 0.00292969 = 3,00000256, so 3 pixels from left to right.
The second number is for vertical direction:
1024 x 0.767578 = 785,999872, so 786 pixels from up to down.
This is where cropping start, the next two numbers: are how many pixels will be cropping to the right and down from this position.
In this case this is equal to the resolution of the chrono, I see this in: third and fourth numbers of "Pos=", 163x213.
So, with this information I will crop it from the Periscope.tga with the Paint.net.
 

4. I did that only because I need to measure the right parameters for the "Pos=" of the new Item that I must add.
From ChronoPatch I know that this item must be "Type=1031" and "ItemID=0x3F310005", the [G3F I400] also is Type=1031,
so I will copy it and will paste it immediately after [G3F I400], and will renumber it to [G3F I401].
I make "Name=Activation" , "ItemID=0x3F310005" and "ParentID=0x3FF00000", and delete "Mat 0=" and "Crop 0=", don't need these.

Now, over the graphics of the chrono that I cropped, I decide what will be the area for activation of the chrono, and will make the proper "Pos=" of the new item.
 

So, from the upper left corner of the chronometer the position will be "36,-79" and resolution will be 101,101.
"Pos=36,-79,101,101"
 

5. Now, I need to renumber all of the rest of G3F items. Happily, the chrono is close to the end of G3F, the last item is [G3F I417], so I do it manually.
I raised with one the number of every G3F item after my new one, so the last one come to 418.
If the case was to renumber too many items, I would have to use the Hsie menu renumbering tool.

6. Finally, I apply ChronoPatch over sh3.exe, and now when I click over this new menu item, the draggable chronometer will start/stop or reset.
Just like the original one on the periscopes screen.
__________________
If you ride like lightning, you're gonna crash like thunder.

Last edited by Tycho; 10-11-18 at 02:57 AM.
Tycho is offline   Reply With Quote