yashsingh1/xdaforums huggingface dataset:
[Windows Mobile Software Development] smotrs:
Don't recall it being an issue, I'll check tomorrow when I get back to that computer.
[Windows Mobile Software Development] vHaB:
Not to slow down your existing work anymore than I need to, but what about in lieu of a proper compare tool a simple export of the pseudo-XML you're using to populate the treeview?

I don't even care about an import, I'm just impatient for some way to compare 2 files. :)

Anyway, thanks heaps! The latest version rocks and the Copy To/Delete has already come in handy a few times.
[Windows Mobile Software Development] 6Fg8:
Interesting approach, maybe i got some idea to speed things up :)
[Windows Mobile Software Development] 12aon:
You could always write a debug file and compare these with something like diffmerge, 12
[Windows Mobile Software Development] 6Fg8:
Version 3.1.0 available, as always, here
[Windows Mobile Software Development] 6Fg8:
bug fixed, please download 3.1.0.1
[Windows Mobile Software Development] sztupy:
Is there an automated way to extract all (embedded) scripts to the script directory?
[Windows Mobile Software Development] smotrs:
Oooh, I like that idea. :)
[Windows Mobile Software Development] smotrs:
Sorry, I forgot to post what the main window looked like on this computer. The Find text is overlapping the search field a little bit in both locations. Next buttons only display the "nex" portion of the text
[Windows Mobile Software Development] 6Fg8:
Ok, expected that. I'll set the font explicitly, that should fix it.
[Windows Mobile Software Development] 6Fg8:
I had that in previous versions but its outdated so i disabled it. I'll revise the code and make it work again.
[Windows Mobile Software Development] vHaB:
Just gave 3.1.0.1 a test drive - it's awesome. Thanks so much. The compare thing RULES. :)
[Windows Mobile Software Development] 12aon:
NUTS!

Ok can someone tell me what I'm doing wrong here, because it's driving me nuts. I'm trying to add this code:

<Object>Type="GLESSprite2D"
<Property> Name=Instance Name Value="BottomBar"
<Property> Name=Position Value="PosX=0 PosY=0 PosZ=0"
<Property> Name=Texture Path Value="\Windows\Bbar.png"
<Property> Name=Size Value="Width=640 Height=77"

So that this bar:

Will get inserted in this landscape mode:

To avoid the slider from acting weird and to make it look nice, this as much of the m9editor tree as I could get in the picture, I really hope that someone knows what I'm doing wrong bcecause I havn't been able to edit anything in this landscape mode9 (that didn't cause it to restart, 12
[Windows Mobile Software Development] 12aon:
Creating qtc from png

In older versions this did work, but now when I try to create a qtc from a png it just converts to png (after I found out that the files needed o be in the graphic directory). However png files converted from manila files do get rightfully converted into qtc, so I guess there is something different with my png. Any thought? 12
[Windows Mobile Software Development] 6Fg8:
name the png file like xxxxxxxx_manila.png, and use P>Q . It will create a QTC format with name xxxxxxxx_manila. The UI is not optimized for single file conversion, will build a "save as" button in the pictureview area (that was already on my todo, but lost it somehow)
[Windows Mobile Software Development] vHaB:
NisseDILLAGAF suggested I ask this here.

His first response:

I got those values since I notice a 256x256 image has 65280 for both, and 256 x 255 = 65280, so I was hoping it was just as simple as X x 255 = uvX. Apparently not. :(

Which raises the questions: what coordinate system is that using? Is it relative to the parent group it's contained in or to the entire viewport? Is 1 pixel = 255 UV "units" correct?
[Windows Mobile Software Development] D-MAN666:
vHaB, just divide these values by 65536 and you will get actual UV values.

6Fg8, you should treat these numbers as Q16.16 just like in LUA files :)
[Windows Mobile Software Development] vHaB:
I'm sorry. Divide which values by 65536?
[Windows Mobile Software Development] D-MAN666:
X, Y, Width, Height

So,

<Property> Name=UV Value="X=0 Y=0 Width=24990 Height=11730"

will turn into

<Property> Name=UV Value="X=0 Y=0 Width=0.381317138671875 Height=0.178985595703125"

Oh, yeah, these are

relative

UV coords (do not depend on texture size)
[Windows Mobile Software Development] 6Fg8:
Had that some time ago, looked weird to me. But actually i've no idea what UV is used for. Can you shed some light?
[Windows Mobile Software Development] NisseDILLIGAF:
So I'm way of on this??

http://xdaforums.com/showpost.php?p=3355638&postcount=4

Sorry if I misled anyone ... I realy thought this was right... :o
[Windows Mobile Software Development] D-MAN666:
Sure! :D

It's how texture is mapped into sprite. X, Y is where top-left sprite's corner will be mapped. Width, Height is the same for bottom-right corner.

Partially you were right: about howto read hex values (lil endian byte sex, signed), but we have another story here (Q16.16 fixed number encoding) :)
[Windows Mobile Software Development] NisseDILLIGAF:
I have no idea what Q16.16 is?? :rolleyes:

aha... so x, y, width, hight in UV is like this...?

EDIT See post further down... :)
[Windows Mobile Software Development] D-MAN666:
Exactly! (apart from the fact that you mixed up x/width with y/height ;))
[Windows Mobile Software Development] NisseDILLIGAF:
:D ok .. better now?
[Windows Mobile Software Development] D-MAN666:
Nono, "x" <-> "y" / "width" <-> height"

I.e. x/width are horizontal values; y/height are vertical ones
[Windows Mobile Software Development] smotrs:
So it would be like this? The X & Y being the Start Location (coordinate location) and the Width & Height being the dimensions in either positive or negative values from the X & Y location.

So to draw the RED box, the X & Y would be the start location and the Height would be a negative value to go downward (positive to go up) and the Width a positive value to go to the right (negative to go to the left).
[Windows Mobile Software Development] D-MAN666:
Partly

right again :) Mostly because that i used the wrong term "relative", sorry for that. They're "normalized" indeed.

So, at your pic they would be like: x = 0.5, width = 0.7, y = 0.6, height = 0.8 (approximately)

Also, you can use "greater-than-1" values to tile texture
[Windows Mobile Software Development] smotrs:
And the Width and Height are based on where the X,Y point are located or based on 0,0? I'm assuming the former based on value examples you just provided.

Was I right you can use negative values, or do the Width and Height always go Right and Down from the X,Y location?
[Windows Mobile Software Development] D-MAN666:
Width/height go from 0, 0 (absolute), i've put approx numbers to the last post to show you that :)
[Windows Mobile Software Development] smotrs:
Ok, so the X,Y are based on 0,0 and the Width,Height are based on 0,0 but in UV values for the Width,Height?
[Windows Mobile Software Development] 12aon:
Nope that just turns it into xxxxxxxx_manila.png or it does nothing because I still have the same files. I think something might have changed in the conversion. Anyone have an idea about what I'm doing wrong in the landscape mode9?, 12
[Windows Mobile Software Development] NisseDILLIGAF:
I would like to help ... but I don't know how to get landscape on my diamond to test it...

But In this picture...

What is the squares that seems to be in front of the slider (the sides)

and behind the icons..?
[Windows Mobile Software Development] vHaB:
:confused:

I get how they are used now, but m9editor rounds those decimal values to 0 if I try to use them. I'm still not getting how to get the big (1 - 65536) numbers.

So if I am trying to place a (98 x 46) (w x h) texture at:

(61, -144) (top, left)

Walk me through figuring out the UV values for those numbers.
[Windows Mobile Software Development] D-MAN666:
just divide a big number by 65536 and you will get UV values. These values are normalized, i.e. 1 - rightt/bottom side, 0.5 - middle of the texture, 0 - left/top side, etc. Then, school math says, if you multiply em by appropriate texture dimesions, you will get real texture coords. Reverse steps to get "big numbers" from texture coords.

This task is missing some input values :) These should be: texture size (s/b a power of 2 btw), 2 mapping coords (4 numbers) for sprite corners in texture coordinate space
[Windows Mobile Software Development] vHaB:
sorry...the texture is a power of 2 (128x64) but the actual visible area of the texture is only 98x46.

Here's what I mean:

Point A is where I want the texture to go: 61, -144

The rectangle from A to B is the actual visible area(sprite size?) of the texture (98x46)

And from A to C is the entire texture itself (128x64)

The question is:

Do I need the UV value for B or for C, and how do I compute them based on the above values for A, B and C to arrive at the large (1-65536) numbers?
[Windows Mobile Software Development] showaco:
I'm guessing 12's added a background image to his unselected icons which makes each icon look like it has a square behind it. If that's true, then the unselected icons must be drawn after the tab slider bg causing them to overlay the tab slider? 12 can also make the icons back to only icon without bg, and then his earlier post where he added png image should work. It probably didn't show because it was hidden behind the fake background he had made using each icon.
[Windows Mobile Software Development] 6Fg8:
I did it this way and it works here. Anyway next version is in the pipeline and will have a button for that. If something has changed in the conversion, i would know :)
[Windows Mobile Software Development] 6Fg8:
Version 3.2.0 available, as always, here
[Windows Mobile Software Development] Hawaiian80:
Thank you for the apps...WISH ME LUCK as I explore the operating-core system of the phone. I appreciate not only the apps, but also the time and patience everyone takes to educate people like me.

My thanks goes out to all of you who dedicate your time teaching others...
[Windows Mobile Software Development] 12aon:
I added the bar in the icon behind the slider, I think bepe and alphazero & swtos had created something to get landscape in diamond to work. I don't know if It's compatible with my landscape though...

No the problem is not that is doesn't show, the manila won't accept this files every time I change something it keeps restarting. I figured I must be doing something wrong but even simple thing as changing the color back to white from black causes it to restart. I have no clue what I'm doing wrong, 12

Edit: I have attached the edited manila plus png and qtc
[Windows Mobile Software Development] showaco:
Do you have another copy to work off of? I've noticed that some times the manila files after being opened by m9editor can be saved without any changes and still cause tf3d not to start. When this happened to me(on calendar mode9), I noticed that the unedited file when saved had changed file size slightly(slightly smaller if I remember correctly). So maybe its not your editing, but just an bug in m9editor.
[Windows Mobile Software Development] 12aon:
Well, let's check that out, I'll get back to you on that, 12
[Windows Mobile Software Development] 6Fg8:
I remember that being a problem in earlier versions, so i did a quick test for that: loaded landscape.mode9 in m9editor, saved to a different directory and copied the saved file over to the device. Restart manila - works.

Found a couple of things though that i would have a closer look:

- in the "TabBar" instance, the property name for the png is "Texture", i suspect it must be "Texture Path" as its everywhere else

- not sure if absolute pathnames like "\Windows\BBar.png" are supported, from what i saw all references to textures are relative: ".\....."

- how did you name the png file on the device? According to the name used in the texture property, it must be 11C470B2_manila.
[Windows Mobile Software Development] 12aon:
You are absolutly right about the "texture path". The thing with these relative references is that I understand why these files are named that way ( e.g. \Assets\Images\LandscapeMenu\actionMenu_bkg.qtc instead \"Something"\xxxxxxxx_manila.qtc) but I can't change the name of a qtc file or any other file for that matter (at least the in m9editor it seems to lose the name after editing). What I'm realy trying to say is I have no idea how to properly reference to any kind of image file, I hope someone has an idea about this. Maybe it's because I don't understand this that I also don't seem to understand you last remark about the "texture property", because I didn't create a qtc but just a png, but I think I don't understand correct, thanks for the new editor conversion is great (was probably just me before:confused:), 12
[Windows Mobile Software Development] 6Fg8:
You cant change the xxxxxxxx_manila name because it's calculated by a manilahash function. You have to do it the other way round, name your file how the function would search for it. The key to this is the value of the texture path property. The string is used as an input to the function which outputs a hexnumber - thats what m9editor does as well when it stumbles over a texture path property (and show it in the tooltip). So when you enter the property name correctly, m9editor will show you the name to use in the tooltip.

BTW property names are case sensitive (at least in m9editor). The hashes are calculated immediately after changing a value.

BTW2: no matter what the fileformat is, manila will usually use the hash to search a file (there might be exceptions though)
[Windows Mobile Software Development] showaco:
Yeah, I haven't had issue in last few versions, just thought I would mention it.

Absolute pathnames do work though, I've added new images to tabs already by simply using a png. I've used it to add some music notes to music tab so they appear to be part of background. Makes for away to easily customize individual tab backgrounds. I've noticed that there is a slow down though on files outside of windows directory being used.
[Windows Mobile Software Development] 12aon:
Thanks for the swift reply, let me see if I understand. Texture Path \Windows\Bbar.png (is this is even possible, maybe I could try .\Assets\Images\LandscapeMenu\Bbar.qtc) then when I put my mouse on the image files, I see 4e975138_manila. Thus I should now create a 4e975138_manila.qtc right? I'm not completely sure how to connect the Bbar.png with the 4e975138_manila or is this done automatically? Thanks for the information, 12
[Windows Mobile Software Development] smotrs:
Comparing LUA files

I'm really liking the compare function. Any chance you can add a right click Compare option when selecting a LUA file? Dump it to a SRC and select another LUA file to compare it too which also get's dumped to a SRC.
[Windows Mobile Software Development] smotrs:
Also, quick question about manila files themselves. The m9editor does a great job at recognizing the Manila Names of the various manila files. But I'm seeing a number that don't get recognized. Now, the files I'm looking for could be one of those not recognized, or it could be something else.

When looking through various LUA files, I'm seeing various requires like this,

require("common")

require("dynamic")

require("hitfeedback")

etc..
​

And I can scroll through and locate them with the Manila Name. But I'm also seeing references to SVC files like this,

require("machine_status_svc")

require("sprint_bootstrap_svc")

require("weather_svc")

etc..​

What I'm not sure of though is, are those actual manila files or some other type of file like a DLL or something?
[Windows Mobile Software Development] 6Fg8:
.\Assets\Images\LandscapeMenu\Bbar.qtc calculates to 486D31AD_manila. There's nothing to connect here, simply convert the png to a qtc and name it 486D31AD_manila.
[Windows Mobile Software Development] sztupy:
svc's might be built in modules built in mode9.dll didn't do a research on them yet...
[Windows Mobile Software Development] 6Fg8:
Should be possible without headache, i'll add it to the planned features.
[Windows Mobile Software Development] Rustys:
I have changed the weather mode-9 and have killed the wiper animation. I have done several test to be sure, but you can test your self. Copy the file 72ac571f_manila from your phone to your desktop open in your m9editor make no changes, save overwriting the origional or creating a new file(tried both ways) copy the new file to the phone and the wiper doesn't work. any thoughts? By the By this is a good piece of work, Thanks.:cool:
[Windows Mobile Software Development] 12aon:
Don't know anymore...

I tried adding this code:

<Object>Type="GLESSprite2D"
<Property> Name=Instance Name Value="BottomBar"
<Property> Name=Position Value="PosX=0 PosY=0 PosZ=0"
<Property> Name=Texture Path Value="(.).\HTC\Assets\Images\LandscapeMenu(or Common)\Bbar.qtc"
<Property> Name=Size Value="Width=640 Height=77"

but nothing seems to work (as in this is causing the manila to restart). I cannot add a image to the landscape mode9. This could either be because it isn't in the right place or that it isn't coded right. I hope anyone here has had any luck adding images to the manila and knows what I might be doing wrong. Is there anyone here that can confirm this is (other than in theory) even possible? I added the files and for those on raphael the link for the landscape mode I extracted is in my signature. I'm all out of idea's for today:(, 12
[Windows Mobile Software Development] smotrs:
I hate to say it, but, I can confirm this. :(

If you use winmerge on the original (attached) and the newfile you will see something changed at line 1268 (72ac571 from HD 1.19.831.0_ROM).
[Windows Mobile Software Development] 6Fg8:
You're right, there are 2 bytes different. Will check that tomorrow.
[Windows Mobile Software Development] John Ericson:
LuaConv doesn't seem to want to convert asc2uni for me

I'm trying to convert a compiled manila (lua) file from ASCII to unicode by using the LuaConv program but I always get this error:

C:\>LuaConv.exe

usage: LuaConv <infile> <outfile> <uni2asc|asc2uni>

C:\>LuaConv.exe 77faa36d_manila 77faa36d_manila.uni asc2uni

Unhandled Exception: System.OverflowException: Arithmetic operation resulted in an overflow.

at Microsoft.VisualBasic.CompilerServices.Conversions.ToInteger(Object Value)

at ConsoleApplication1.LuaConv.parseluafunc(FileStream luau, FileStream luaa, StreamWriter lualog, String towhat)

at ConsoleApplication1.LuaConv.luaspy(String ifile, String ofile, String towhat)

at ConsoleApplication1.LuaConv.Main(String[] args)

C:\>

Am I doing something wrong?
[Windows Mobile Software Development] showaco:
6Fg8,

I got the landscapemenu mode9 from 12aon's last cab, 755a84ef_manila which is attached below unaltered. I open it in latest version of m9editor(3.2.0.0) and expand, then I resave without even looking through it.

The result is a file that puts tf3d in the restart loop. It's file size changes from 34032 bytes to 34028 bytes just by opening and resaving. This apparently is enough to break tf3d from starting. I tried adding tab bar to home mode9 and it worked no problem, but never could get it on landscape, which is why I went back to check files sizes. I also tried in 3.0.0.0 version I still have with same results.
[Windows Mobile Software Development] 6Fg8:
77faa36d_manila is already unicode, converting unicode to unicode might cause that. LuaConv is pretty old in terms of development, better use the "convert to ANSI" function in m9editor for that.
[Windows Mobile Software Development] 6Fg8:
I checked that and found the reason. Similar to the weather.mode9 problem, there are values within the file which aren't recognized, so m9editor guesses data types which might not be correct, and thus produce unpredictable results when saving.

Thats the basic problem here. Leaving it to hexediting values would work fine for m9editor, but leave interpreting values to yourself. On the other hand if a definition is missing, it might fail. I could build a self-check function to at least warn you if such a situation arises.
[Windows Mobile Software Development] 6Fg8:
Version 3.2.0.1 available, as always, here

thanks to Rustys, 12aon, smotrs, showaco for help nailing that.

http://xdaforums.com/showpost.php?p=3095189&postcount=1
[Windows Mobile Software Development] nixx-X1:
Cool pdf included :D

keep up the good job!
[Windows Mobile Software Development] showaco:
Thanks to you for the great tool and always getting out the quick fixes for us!:)
[Windows Mobile Software Development] smotrs:
Hear hear, excellent work as usual. :)
[Windows Mobile Software Development] MoonNah:
Excuse for my bad English. Has found out such errors. If at decompiling in a script there are messages "Decompile error:" that the further work with this script is not possible. At recompilation there are errors and the script is not created. Drawing and a standard working file of Manila in which is more low enclosed the given errors are found out. Prompt what to do in the present state of affairs. In advance thanks.
[Windows Mobile Software Development] 12aon:
I don't speak Russian so I hope this translates ok. Script decompiling is done by luadec a program modified by Sztupy to work with the manila lua scripts. He just released Beta 3, which fixes most of the errors. Check this thread. There is one other thing though, you will some have fill all the loc_1 loc_2 etc or the script won't compile. I have no experience with that yet but you could always try to ask Sztupy, 12
[Windows Mobile Software Development] sztupy:
LuaDec 0.4 is released which (with a little bit of brute-force) could decompile 128 scripts out of 356 from TP2's manila. You might want to change the bundled luadec0.2 to this version.
[Windows Mobile Software Development] 6Fg8:
Thanks, that sounds great. Will try in the evening. And a good opportunity to bring a new m9editor version to life :)
[Windows Mobile Software Development] MoonNah:
luadec 0.4 it is much better previous, but all the same yet all decompiles there are errors "- DECOMPILER ERROR: Overwrote pending register. Missing locals? Creating them", and remove to compile a script it is impossible. We will wait for updatings.
[Windows Mobile Software Development] 6Fg8:
I'm already in contact with him :D, and he sent me the definitions for the properties.

And then there are many other definitions which i'd like to integrate into m9editor, plus a hundred improvements i think of. So little time, so slow brain and fingers on my part, and of course, so little time. Anyway it's still a young project and i'll keep it running and improving, so .... keep watching :)
[Windows Mobile Software Development] pcarvalho:
great! :D well changing these values in Hex (in picture) changes these values:

<Property Name="Viewport" Type="RectF" X="0" Y="0" Width="31457280" Height="35127296" Animated="False"/>

to

<Property Name="Viewport" Type="RectF" X="16777216" Y="16777216" Width="31391744" Height="1441792" Animated="False"/>

using his parser for now to see what changes and if its ok...gonna try to properly QVGA manila through this...

hope this helps u 2 :)

update: 8 last digits is height , next 8 width , next Y , next X , grouped by 8 digits
[Windows Mobile Software Development] 6Fg8:
From a technical point of view, the conversion seems correct. All numbers are little endian, that explains the big numbers.

From an applation view, i would suspect that the presentation is Int16 and not Int32, the rest filled with 0x0s. At least that would make more sense in respect to resolution and screensize of the THD.
[Windows Mobile Software Development] pcarvalho:
for now i'll guess the changes i have to make...if i had a diamond i could change the HD manila to VGA easy...so very good work!! keep it up ;)
[Windows Mobile Software Development] 6Fg8:
I created a little console app for converting lua-scripts between ASCII and Unicode. Tool and details as always, here
[Windows Mobile Software Development] pcarvalho:
bug report: cooked mode cant be used to edit as it makes the line vanish, or i'm doing something wrong :)