![]() |
SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997 |
12-29-13, 09:44 AM
|
#12 | |||
|
Helmsman
![]() Join Date: Jun 2011
Posts: 105
Downloads: 181
Uploads: 0
|
![]() Quote:
Even more, customized UIs (i.e. MaGUI, not sure about OLC) may have "invalid" [Gxx Iyyy] entries that for example don't contain ItemID or ParentID: the IDs are either commented out or missing. I assume this was done to "remove" items without having to renumber the whole groups. The game just seems to ignore these entries (at least I didn't see any error messages pop up). Don't get me wrong. I'm not trying to convince you that my views regarding this are "correct". I'm just trying to understand if there are any gains in your approach that I don't see. Quote:
Quote:
--- Anyway, here's probably my final pre-New Year progress and discoveries. Material loading and rendering is mostly done. No font/text rendering yet. Fancy widgets like editboxes, listboxes, etc. are not rendered properly either, that for after the New Year. In one of the recent threads Seeadler mentioned that there are some hardcoded UI pages. I probably should ask him if he knows of any pages in particular to avoid any further "surprises"; Privateer, maybe you also have some insight on this? Here's what I found today (vanilla menu.ini): ![]() That's "Page barracks" (G67 or 0x67000000). Note a whole lot of gibberish where the U-boat compartments should be. I have one of those "items" selected in the tree (it's highlighted with yellow dashed line on the graphical display). At first I thought I had an error in my "Crop" computations, so I opened the tga those items are referencing (data/menu/data/comp-2.tga) and checked. Turns out that my app follows the Crop correctly, the regions just end up in the wrong areas of the image. Furthermore, the "comp-2.tga" is a compartments atlas for Type-II U-boat. There are other files for other types of boats, but they're not referenced anywhere in the menu.ini file. Also note that the item itself has an ID of 0x27A50009, even though it's inside page 0x67000000. Now, page 0x27000000 is "Page binoculars", and thus shouldn't have anything to do with barracks. There are other items here that have their ID start with 0x27, so there's definitely something fishy going on.This leads me to believe that this page is handled elsewhere (i.e. game code). If not completely, then at least item positions, material references and Crop parameters are ought to be changed by the game in order to display this page correctly for every type of U-boat. There are also pages named "Equipment Icon", "Typ2", "Typ7", "Typ9" and "Typ21", but they're empty and just reference file "data/menu/menu_UBoats.ini" which simply doesn't exist ![]() I'm not sure right now how to best deal with this. Now to another page, "Page attack periscope" (same goes for "Page obs periscope"): ![]() Note this "Glass" item in the Water Level group. It's laid out horizontally, even though in game it appears vertical. It has a Display mode of 5 ("Linear&Rotation"). Why exactly is it made like this, right now I only have a guess: the image itself is packed into the atlas in the bottom part of "data/menu/gui/periscope.tga", and it's laid out horizontally there. Since there's no way to turn horizontal image into vertical item (because instead of storing texture coordinates, the devs decided to store rectangles in the Crop parameter ), they probably had to rely on the game engine to "rotate" the item into correct position. Now, why exactly does it get rotated (it doesn't seem to be connected to any "dial" in dials.cfg), is a mystery to me (unless it's hard-coded as well).
|
|||
|
|
|
|
