[xoreos-devel] Jade Empire GUI

Sven Hesse drmccoy at drmccoy.de
Sat Aug 10 13:41:30 CEST 2013


Hej hej!

Just some minor things I found out about the Jade Empire GUI:

1) The wrong company logos in maingame: That's actually a problem with
   xoreos' ResourceManager. The Windows version of Jade Empire
   overrides the default ui_logo_01.txb (in the game archives) with
   ui_logo_01.tga (in the override/ folder).
   xoreos however priorizes extension over higher-priority sources
   (i.e. a TXB is always considered before a TGA, even if the TGA is
   in the override folder). The reason for that is that is that
   Neverwinter Nights, many textures exist in two versions: TGA and
   DDS. The TGA are (often low-res) fallback textures for cards that
   don't support DXT compression.
   Switching ResourceManager::getRes() to return the higher-priority
   source instead the higher-priority extension does display the
   correct company logo image, but might have weird consequences for
   NWN. I can't really test that right now, because for some reason,
   on-the-fly texture level switching is currently broken. :P

2) From what it looks like in the disasm, like in KotOR, the menus are
   mainly hard-coded. The game takes the GUI files, looks for specific
   elements by label and takes their properties as a guideline on how
   to display them. They're still modified and switched around and
   stuff in the code.
   So yes, maingame.gui seems to be still the correct GUI file to use,
   only that, for example, the menu options are hard-codedly added
   (there's a function calling calling functions with the StrRef for
   "New Game", "Load Game", etc.  and their longer help texts, like
   "Start a new game." as arguments, for example).

3) The menu code is hard to follow in the disasm, because apparently
   running the menus works by the way of function pointers that are
   called when something has been clicked. For example, the function
   that creates the "Are you sure you want to quit?" dialog, which I
   found by searching for the StrRef 1FCC8h, isn't directly called,
   but just put into a structure in a function that's called in the
   function that creates the mainmenu.

4) The starting point of any of the menu code is also hard to follow,
   because the creation of the menus happens in 100 tiny functions
   that are called in one function with a switch(arg_0) over 109
   cases. :P
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://xoreos.org/pipermail/xoreos-devel/attachments/20130810/415dd534/attachment.pgp>


More information about the xoreos-devel mailing list