Sign in to follow this  
badderjet

XML Night Lighting in FSX default gauges???

Recommended Posts

Hi all,there is one thing I don't quite understand with FSX's new default XML gauges... First of all, I am no XML gauge designer, but I am still curious about this for a certain reason (see below).Opening up any of these CABs you will find a bunch of bitmaps inside, and many of them with a _night.bmp suffix. But inside the actual XML files I was not able to find any kind of reference to these bitmaps, but they do still work once you activate panel lighting.Basically, the only reason why this bothers me is that I was trying to rewrite certain gauges (in C++) but I just have no clue how to find out if the night bitmaps are loaded or not (that is if panel lights are active or not). Obviously I am not asking about the switch state of panel lights (there is the known TokenVar for that), but for the actual state of the lighting itself - e. g. you could turn up your panel lights during daytime, the switch and TokenVar would sure be in a TRUE or ON state but the panel itself would still show day bitmaps.So that's what I for heaven's sake can't figure out.If you have anything to contribute, do not hesitate to do so. :)Thanks,Etienne

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

Hi EtienneHave a look here, it was for FS9 and positively it doesn't work for FSX, but it can give you a clue. This is C language.http://forums.avsim.net/dcboard.php?az=sho...ing_type=searchIn XML and for FSX you can check the state of lightning with(P:TIME OF DAY, enum)0- Dawn1- Day2- Dusk3- NightYou can make an invisible XML gauge and send a variable from it to C gauges.Hope this helps.Germ

Share this post


Link to post
Share on other sites

I did know about that post (although it didn't come to my mind for it's been so long) ;), and yes it positively would not work for I would not even have a clue where to look for - global.dll is no longer there. :)I had also tried the XML approach before, not via the actual dedicated XML gauge way but rather using execute_calculator_code, which worked, but also revealed that actual panel lighting does not directly rely on that time of day variable, unfortunately. :(Ok, then I might have to look or wait for a different solution.Still, if some one has a clue about the _night.bmp bitmap thing mentioned above, please share your thoughts if you like. :)Thanks for your quick reply! :)Etienne

Share this post


Link to post
Share on other sites

Hi Etienne,_night bitmap is called automatically by FSX. For C gauges, I think it has to be at the ressource ID of the day bitmap + 40000 (or maybe +4000)It works in the same way than the ID+500 for the low res bitmaps.hope this helps!

Share this post


Link to post
Share on other sites

I've gotta try, never even thought of that. I will keep you updated. :)Cheers, :-beerchugEtienne :-wave

Share this post


Link to post
Share on other sites

>Hi Etienne,>>_night bitmap is called automatically by FSX. For C gauges, I>think it has to be at the ressource ID of the day bitmap +>40000 (or maybe +4000)>>It works in the same way than the ID+500 for the low res>bitmaps.>>hope this helps!IIRC, Susan Ashlock said +40000 for the resource ID...Yep... "Actually, the delta for night images is 40,000 (decimal)."But, to be quite honest, I still prefer to have absolute manual control over the lighting, thank you... ;)

Share this post


Link to post
Share on other sites

Oh, did she indeed say that (presumably at some 'other place')? ;) I believe I musta overlooked that one big time...>But, to be quite honest, I still prefer to have absolute>manual control over the lighting, thank you... ;)Well, what would I say. ;) But in my case I wanted to replace parts/expand some default panel, which is obviously working their way - i. e. the 'automatic' one which loads night bitmaps when it thinks it is appropriate.Thanks anyways for confirming, you've been of great help! :) Now if only my IDE wasn't messed up on BOTH machines I could just go ahead and give it an immediate shot... *:-*Cheers! :-beerchugEtienne :-wave

Share this post


Link to post
Share on other sites

Argh, I can't believe it is actually that simple and does not even require one single line of code (except for specifing the additional resource... lol).You guys made my day. :-hahNow if I could only find a way to play sounds from within a gauge that simple. *:-*Cheers, :-beerchugEtienne :-wave

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this