From: jim <ji...@ma...> - 2002-10-18 17:18:54
|
These are quite hirsute. Recall that a shade command in an Underworld model definition has 2 (16-bit) parameters, colour and shade (darkness). The shade value is straightforward, but I couldn't for the life of me figure out how colour is encoded. And no wonder. The colour word is not in fact a colour index. It is the ADDRESS, in the model segment (remember segments?) of a location where the colour index is to be found. These are set up on the fly (in fact, rendering commands to set them are queued) when the model is encountered. So of course they are different for different models. The actual values are stored in a different table, not even in the model segment! These tables are of course in different places for Underworld and Underworld II. In fact, the colour table has a different field size (5 vs 4) for Underworld II. The file offsets are different for different builds (there are several builds extant) but I think the layout of the segments is the same within each game. I think it might be a good idea to throw out the sodding thing entirely, and rather than fishing in the exe to extract the things once and for all to a text file or some simple format. How does uwadv handle models? Cheers, jim -- http://madeira.physiol.ucl.ac.uk/people/jim/ - Bill Stickers is innocent! |