AOTD_MadMax
03-30-12, 02:12 AM
Hello,
i got an question about the color of the bearingline in periskope and uzo.
In the night the color is green and at day the color is black.
Where can a find the function for that colorswitch cause the texture for both colors is the same ( Bearing.DDS ) ???
I want to rework the periskope and the uzo in that way the the color of the crosshair should change the color in the same way like the bearingline do.
Regards
Maddy
CapnScurvy
03-30-12, 09:42 AM
I'll try answering the best I can.
There are two different functions going on with the scope/TBT line illumination. The telemeter divisions and center line (no matter how you draw it) are a function of the Alpha Channel on the .tga or .dds image. I've had these in circles, long lines, short lines, red, green, fat, skinny, whatever. You pretty much draw what you want, placing them where you want, with any image drawing application. Because their a drawn line(s) they do not change with the time of day. What's on the alpha channel image is what gets placed into the game. The stock image file for the American TBT is in the Data/Menu/Gui/Layout/TBT_1024.dds image. This "mask" creates the background and division lines for the UZO_camera (used for both American and German side of play). Again, this image has no relationship to the hard coded implementation of changing color when night or day. What you draw, is what you see.
On the other hand, there are images that illuminate depending on the state of time the game is in. One of these is the compass bearing found on the scopes/TBT. In the menu_1024_768.ini file, the stock UZO/TBT compass bearing is found at the below entry.
[G28 I122]
Name=Compass
Type=1030;Static bmp
ItemID=0x28000004
ParentID=0x28000000
Pos=428,-202,169,16
Zone= 428 566 169 16 0 1 0x28000002 0.5 -0.4 0x28000004 -0.5 0 0 0
Color=0x66B26680<<<<<
Materials=1
Display=0;No stretch
Mat 0=data/menu/gui/bearing.tga
MatFlags=0x1
TexFmt=0x0
Notice the "Color=" hex parameter of 0x66B26680. I'm no expert in color definations for hex entries, but you'll find the same entry for the German lines that make up the divisions lines running to the left and top of the scope view (as below....).
[G28 I126]
Name=Marking lines
Type=1026;Menu group
ItemID=0x28060000
ParentID=0x28000000
Pos=82,-89,860,590
Zone= 82 679 860 590 1 1 0x28000001 0.5 -0.5 0x28060000 -0.5 0.5 0 0
Color=0xFFFFFFFF
[G28 I127]
Name=Zoom
Type=1029;Static text
ItemID=0x28060009
ParentID=0x28060000
Pos=54,-274,46,19
Zone= 136 405 46 19 0 1 0x28060000 0.0627119 -0.464407 0x28060009 0 0 0 0
Color=0x66B26680<<<<<
Font=1
TextFlags=0x14
[G28 I128]
Name=DegHL
Type=1029;Static text
ItemID=0x28060008
ParentID=0x28060000
Pos=211,-89,20,18
Zone= 293 590 20 18 0 1 0x28060000 0.245763 -0.150847 0x28060008 0 0 0 0
Color=0x66B26680<<<<<
Font=1
Text=2015
TextFlags=0x11
[G28 I129]
Name=DegHR
Type=1029;Static text
ItemID=0x28060007
ParentID=0x28060000
Pos=627,-89,20,18
Zone= 709 590 20 18 0 1 0x28060000 0.728814 -0.150847 0x28060007 0 0 0 0
Color=0x66B26680<<<<<
Font=1
Text=2015
TextFlags=0x11
[G28 I130]
Name=DegVB
Type=1029;Static text
ItemID=0x28060006
ParentID=0x28060000
Pos=136,-428,20,18
Zone= 218 251 20 18 0 1 0x28060000 0.157627 -0.725424 0x28060006 0 0 0 0
Color=0x66B26680<<<<<
Font=1
Text=2015
TextFlags=0x14
My idea is this color entry, coupled with a hard coded command, changes the image color when the time state changes. Would this color hex parameter allow any image to change with the time? I don't know. Would be interesting to make an image of say, an "+" and add a menu_1024_768 entry with the above elements and see what you get. It might change with the time state, might not.
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.