Sign in to follow this  
badderjet

Two C gauge questions.....

Recommended Posts

1. Image flags: I don't seem to get BIT7 (explained in sd2gau12.zip) working. I saved the image, as stated, as a 8 bit bitmap, but it's still having those ugly borders. Any idea what I'm doing wrong?2. I've just made a ASI from scratch for the C172. :-hmmm When I start FS and initially load up a flight with the C172, FS crashes. Anyway, when starting e. g. in the Extra and then switching over to the C172, the gauge works.Thank you for any (helpful) reply. :-)http://flightsimmers.net/airport/etti/signature_pro.jpg

Share this post


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

BIT7 is now known as IMAGE_BILINEAR_COLOR in FS2K2. There is no mention of it in the SDK, and there's no comments on it in gauges.h. Not much I can help you with there. :-hmmmFor the second problem. Are you using a Gauge Callback? If you are, and it's not being used, I would try getting rid of that. If that doesn't make any difference, try commenting out elements from the PELEMENT lists. Comment them out one by one, then check to see if it made a difference. If it didn't, go back and comment out the next one. Keep going until you get all the way to the background. Also, are you using GAUGE_HEADER_FS700 or GAUGE_HEADER_FS800? I have no idea if any of these will fix it, but I'm just throwing out some ideas that may help. It doesn't seem like many people program gauges in C anymore. They're all using XML these days. :-rollMatt

Share this post


Link to post
Share on other sites

Thanks a LOT for the reply...Well I gotta try it later today. Yeah there are callbacks in the gauge.Regarding the GAUGE_HEADER_FS700/800, I also recognized that is should be '800' in FS2002 (FS"8") but in the FS2002 there's still FS700, so... I'll try.> It doesn't seem like many people program gauges in C anymore.> They're all using XML these days.Hehe, well, just a few, and I'm just gettin started... :-hah I even think it's easier than XML, huh, at least I got more success than with my few XML tries hehe!Regards :-wavehttp://flightsimmers.net/airport/etti/signature_pro.jpg

Share this post


Link to post
Share on other sites

>Regarding the GAUGE_HEADER_FS700/800, I also recognized that >is should be '800' in FS2002 (FS"8") but in the FS2002 >there's still FS700, so... I'll try. GAUGE_HEADER_FS800 is actualy in gauges.h. I use it in all of my gauges now, just for compatability. It's not mentioned in the SDK, but I got it working based on the header file.GAUGE_HEADER_FS800(GAUGEHDR_VAR_NAME, default_size_mm, gauge_name, element_list, pmouse_rect, pgauge_callback, user_data, usage);for example: GAUGE_HEADER_FS800(gaugehdr_eicas, GAUGE_W, gauge_name, &Header_List, NULL, Gauge_Callback, 0, 0);Matt

Share this post


Link to post
Share on other sites

Yeah Ok but no change in the parameters so far.BTW Do you know how to make use of Alpha channels - IMAGE_USE_ALPHA, IMAGE_USE_LUMINOUS_PARTIAL etc.?And - another thing - I'm currently using the (FS2000) gauges.h for BCC from sd2gau12.zip - does this make any differents when using this or the SDK gauges.h?http://flightsimmers.net/airport/etti/signature_pro.jpg

Share this post


Link to post
Share on other sites

I don't know how to use Alpha channels.There are differences between the FS2000 and FS2002 gauges.h. You won't be able to use the new Gauge Header for FS800. There are also new variables that you won't be able to access. There's not much you can do though, except wait for someone to make the required changes for it to be compatible with BCC.Btw, there are differences in the parameters of the 2 gauge headers. FS700 has a "parameters" parameter (hehe), and FS800 has the gauge name as the first parameter.Matt

Share this post


Link to post
Share on other sites

>It doesn't seem like many people program gauges in C anymore. They're all using XML these days.I still prefer C gauges since they allow me more freedom of design. But it was nice to have a look on XML to decipher them.Arne BartelsP.S. As far as I know the new gauges.h is (almost?) also BCC compatible. I'll check again the next days.

Share this post


Link to post
Share on other sites

I do not remember if I've made serious changes to FS2k2gauges.h to make it compatible with BCC. As far as I remember it was ok. Just compile and if there is any error, it shouldn't be too hard to spot and correct them out anyhow.Besides, IMAGE_BILINEAR_COLOR is what makes the needles antialiased for example.Hope it helps!

Share this post


Link to post
Share on other sites

>Besides, IMAGE_BILINEAR_COLOR is what makes the needles >antialiased for example. IMAGE_BILINEAR_COLOR is the 7th bit.Matt

Share this post


Link to post
Share on other sites

Yes yes, thank you. The anti-aliasing works just fine!I just had a look in the new gauges.h (SDK) and whew, there are lotsa undocumented image flags... Hopefully Dai Griffiths will update his great sd2gau12.zip for use with FS8.And well, I've just tried to compile with the FS2002 SDK gauges.h and I got no errors so far, works fine too. :-)Greetings! :-wavehttp://flightsimmers.net/airport/etti/signature_pro.jpg

Share this post


Link to post
Share on other sites

I have to admit that I really like the xml style. C may offer slightly more options to coding preference, but when you have a compiled C gauge which differs from your personal view of how things should operate, you're pretty much stuck. I.e. some like BRIGHT graphics in all gauges for night lightning, some don't, or prefer luminous graphics. A gauge isn't hooked up correctly to the electrical system or doesn't respond to failures etc. In xml, it is just a matter of uncabbing the gauges and do your own changes as needed. With C you have to contact the author for a special set of gauges just for you, and he will most likely be to occupied with new projects. When did you last download an aircraft package with the C gauge source code embedded?Also with xml, there is a much improved learning curve (although it might look confusing for those not familiar with reverse polish notation, especially in the beginning). Since the code is all out in the open, all that is needed to get going is good examples, and some of the default ones are pretty good. With C, you're pretty much stuck with a few good "books" and a lot of questions asken in forums :)The biggest buggar with xml so far, is that there exist quite a number of missing events, making some stuff "impossible" to make. The panel and gaugeset I'm currently working on have a working electrical section (slightly improves from standard), a functional oxygen system, and a pressurization system. So all these things that are not supported by the FS system, is possible to make from scratch. With C, these "secrets" would stay with the author. With xml, it is "simply" a matter of understanding, then copy&paste. Result; the aircraft package released can be of much higher standard, and others may also improve on it.I also think this is the main reason Microsoft decided to go with the xml standard - they didn't have to you know; how can you possibly copyright xml source? You can't, and to me that is one MAJOR step from Microsoft in the right direction.Damn, I always get carried away :D

Share this post


Link to post
Share on other sites

Karl, I agree with you, regarding the thing with improvements and a real 'open source' system which is achieved by script based XML gauges. Yes they are really good if you want to make changes by your own without hacking, decompiling and disassembling (copyrighted) material.But well - maybe that's why some are still staying with C - is, as you already said, the more options you have. It's all expandable, so you can go a step further and make for example file input and output. Complex callback stuctures, own functions and calculations. Just have a look in some of these ultra long XML lines containing if-structures. They are sometimes four or five lines and can get quite unreadable...Multigauges. And letting single gauges interact with others is maybe easier in C, I don't really know (yet :-))So, in conclusion, both ways, XML and C, have their (dis)advantages, which let the author have to decide depending on his/her needs. And I don't wanna blame anyone just cos he uses this or that way, it's his own decision.Kind RegardsEtienne

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