SUBSIM Radio Room Forums



SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997

Go Back   SUBSIM Radio Room Forums > Silent Hunter 3 - 4 - 5 > SH4 Mods Workshop
Forget password? Reset here

Reply
 
Thread Tools Display Modes
Old 03-30-12, 02:12 AM   #1
AOTD_MadMax
Seasoned Skipper
 
Join Date: Jun 2007
Location: Bremen/Germany
Posts: 749
Downloads: 71
Uploads: 1
Default [Req]Color of bearingline

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
__________________
AOTD is gone, iam the last survivor ........
AOTD_MadMax is offline   Reply With Quote
Old 03-30-12, 09:42 AM   #2
CapnScurvy
Admiral
 
CapnScurvy's Avatar
 
Join Date: Apr 2005
Location: Dayton, Ohio
Posts: 2,292
Downloads: 474
Uploads: 64


Default

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.
__________________


The HMS Shannon vs. USS Chesapeake outside Boston Harbor June 1, 1813

USS Chesapeake Captain James Lawrence lay mortally wounded...
Quote:
.."tell the men to fire faster, fight 'till she sinks,..boys don't give up the ship!"
CapnScurvy is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 09:49 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Copyright © 1995- 2026 Subsim®
"Subsim" is a registered trademark, all rights reserved.