View Single Post
Old 09-04-08, 08:45 AM   #10
onelifecrisis
Maverick Modder
 
Join Date: Aug 2007
Location: England
Posts: 3,895
Downloads: 65
Uploads: 3
Default

LOL @ privateer

On topic, here's some info I posted to Joe and Hitman in the U-Jagd forum during the concurrent development of OLC GUI and U-Jadg Tools. It's the only info I have which is written down anywhere. Note that since writing this I discovered that the tips I gave do not always work. For every "rule" that governs the menu file, there's an exception somewhere.

This post is related to one thing: how to make an image look right in the menu file.

Quote:
Originally Posted by onelifecrisis
Image Types and BmpState=1

There are two image types. Type=1030 will not trap the mouse; when you click on it, the mouse will interact with whatever is behind the image. Type=1031 will trap the mouse, even where it is transparent!

Correction: Whether or not the mouse is trapped depends on the BmpState=1 flag! Setting this flag will cause the image to trap the mouse (note that this flag is required for dials to work). However, Type=1030 images will ignore this flag and will therefore never catch the mouse.

So, an image can only catch the mouse if it is Type=1031 and it has BmpState=1.

MatFlags=0x$$

$$ is a decimal number between 0 and 31, which represents 5 flags which affect the way in which an image is displayed. There is some interaction between the MatFlags and the Display setting - in particular, some flags only affect stretched (or rotated) images, and others only affect non-stretched images.

I hope you already know binary to decimal conversion - if not just ask and I'll explain. I've called the flags A (0/1), B (0/2), C (0/4), D (0/8), and E (0/16).
  • Flag A controls transparency. If A is off (0) then the alpha channel will be ignored. If A is on (1) then the image will be transparent but will also lose some colour depth; colours seem to be reduced to 16bit, and there is no dithering either so it can look quite bad! Adding noise to the original image can provide a slight improvement by effectively forcing a bit of dithering, but I'm trying to find a better way. This flag works for stretched and non-stretched images. Update: TexFmt=0x9 fixes the "low colour depth" problem. I recommend using this setting on all images!
  • Flag B doesn't seem to do anything... I'm still trying to work out what it's for.
  • For a non-stretched image (Display=0) using C (4) and E (16) in combination (i.e. 20) will cause the image to be displayed pixel for pixel (instead of the default which, for reasons unknown, seems to be about 0.8 pixels per pixel). These flags don't seem to have an effect on stretched images, but I need to do more testing...
Update: While the C and E flags seem to have little effect on a stretched image without the D flag set, using them both with the D flag gets even better results than with the D flag alone. This was unexpected because most of the stretched images in menu_1024_768.ini do not use the C and E flags. Perhaps setting these flags uses more memory or impacts on performance in some other way? At any rate, I've edited the summary below.
  • For a stretched image, using flag D (8) will "smooth out" the stretch. If you don't use this flag your stretched image will look very bad indeed. It seems to have no effect on unstretched (Display=0) images.
So, in summary, these settings should be used for just about all new images:
TexFmt=0x9
MatFlags=0x29

OLC

Last edited by onelifecrisis; 09-04-08 at 09:02 AM.
onelifecrisis is offline   Reply With Quote