Sign in to follow this  

Recommended Posts

I wish to make vector HUD for use as minipanel replacement.And in process of working on subject, i'm found two entries in gauges.h// HUD settings#define HUD_ON 0x1#define HUD_METRIC 0x2the question is in - when and with what to use it?

Share this post


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

Hello Litvinov.I don't know for sure, but it appears to me as this might be related to the 4 or 5 instruments that appear when you hit "W" to get rid of the main panel, which has nothing really to do with a real HUD.

Share this post


Link to post
Share on other sites

Warning: As far as I know, it is impossible to make a transparent vector gauge is FS2002, I have already tried this for the HUD I have developed. I have used the SDK macros, and wanted to transform it into vectorial.I hope it will be possible in FS2004-CoF.Eric

Share this post


Link to post
Share on other sites

Hey Eric.I have not attempted this, but thinking about it doesn't tell me it is impossible. What were the problems you ran into?

Share this post


Link to post
Share on other sites

For vectorial drawing, the SDK sample shows a static image created with MAKE_STATIC, using the image flags IMAGE_USE_ERASE|IMAGE_CREATE_DIBSECTION, and this works fine.To create a transparent vector gauge, I thought I would just have to make it transparent using the image flags IMAGE_USE_ERASE|IMAGE_USE_TRANSPARENCY|IMAGE_CREATE_DIBSECTIONBut it doesn't work !! This simply crashes FS2002...Any other suggestion?

Share this post


Link to post
Share on other sites

Damn, Eric, you got me on that one. Guess I wasn't thinking very well ;-).I have not tried to USE_TRANSPARENCY with my vector canvas, but as soon as I get this new machine setup, which should be tonight, I will, and will let you know if I get the crash here too.

Share this post


Link to post
Share on other sites

Hi,Just so you know, the AFG HGS (my favorite hud ;-) ) is currently a freeware and quality HUD that works on the mini panel. Just goto www.alliedfsgroup.com Anyway as for your vector hud, you might try making a transparent icon into a direct draw surface then you could blit from another surcface on which you draw your hud. There was an sdk for FS98 that gave a device context( the hdc we need for gdi and gdi+) to an icon by making it a direct draw surface but you will have to do some work to track it down. I also believe it used an older version of Direct X before DirectDraw merged with Direct 3d so finding this sdk may be more trouble then its worth because you may not even be able to use it. Anyway its just an idea. Also I heard that Reality XP is making a new transparent HUD with their drawing API so you may try and make your own drawing API but that is a lot of time and effort too. Anyway those would be my first two choices for making a vector hud and I hope they may be of some help to you.ThanksJon

Share this post


Link to post
Share on other sites

Hi All!>Hey Eric.>>I have not attempted this, but thinking about it doesn't tell>me it is impossible. What were the problems you ran into?I step already on rake :D1. If you use:IMAGE_USE_ERASE | IMAGE_USE_BRIGHT | IMAGE_CREATE_DIBSECTIONand black rectangle as static image gauge drawing is ok.2. but if you place this gauge on panel withchild_3d=1- or -render_3d_window=1you get your drawing transparent (it is sees like cutten in background and you see outside throught it)3. If you add IMAGE_USE_TRANSPARENCY you get transp. back. with transp. drawing and can't see all your HUD just 3D world.

Share this post


Link to post
Share on other sites

Hi Jon!>Just so you know, the AFG HGS (my favorite hud ;-) ) isThanks. I try it... but i not only want to use it for long time, but to develope such gauge myself ;) just for experience.>Anyway as for your vector hud, you might try making a>transparent icon into a direct draw surface then you could>blit from another surcface on which you draw your hud. I talk about this problem with other russian developer and we thinking that problem lays in format of transparent bitmap 1-5-5-5, just may be GDI doesn't propertly work with it... And i thinking of creating inmemory 24bit bitmap, draw all on it, then convert myself to 1-5-5-5 and BitBlt to .hbmp or image_data.final->image>Anyway those would be my first two choices for making a vector>hud and I hope they may be of some help to you.>Thanks>Jon Anyway thanx for hints, it's very helpfully.

Share this post


Link to post
Share on other sites

Anyway we have some extensive bunch of HUD-entries in gauges.h#define IDENT_AIRCRAFT_HUD_3D_PANEL 20000#define IDENT_HELICOPTER_HUD_3D_PANEL 20001#define IDENT_CONTROLS_HUD_3D_PANEL 20002#define IDENT_TEXT_HUD_3D_PANEL 20003#define IDENT_DAMAGE_HUD_3D_PANEL 20004#define IDENT_SCORE_HUD_3D_PANEL 20005#define IDENT_LSO_WINDOW 22000what is LSO means by-the-way? // HUD settings#define HUD_ON 0x1#define HUD_METRIC 0x2 // PANEL STATES//#define PS_HELICOPTER_HUD_VISIBLE BIT5#define PS_AIRCRAFT_HUD_VISIBLE BIT6#define PS_AIRCRAFT_HUD_ON BIT7#define PS_HUD_METRIC_OUTPUT BIT9#define PS_CONTROLS_HUD_VISIBLE BIT11#define PS_AIRCRAFT_HUD_EXIST BIT14#define PS_HELICOPTER_HUD_EXIST BIT15#define PS_HUD_EXIST (PS_AIRCRAFT_HUD_EXIST|PS_HELICOPTER_HUD_EXIST)#define PS_HUD_LOAD_VISIBLE BIT17#define PS_HUD_PANEL_VISIBLE BIT19typedef enum { .... PANEL_TYPE_HUD, // Aircraft HUD ...} PANEL_TYPE;#define IMAGE_PRESERVE_COLOR_IN_HUD BIT8#define IMAGE_HUD_COLOR_MAP BIT28#define HELPID_GAUGE_HSI_HUD (HELPID_GAUGE + 0x0037)#define KEY_HUD_UNITS (KEY_ID_MIN + 673)#define KEY_HUD_COLOR (KEY_ID_MIN + 674)#define KEY_PANEL_HUD_TOGGLE (KEY_ID_MIN + 868)---And no one example in SDK's how to use this. :(

Share this post


Link to post
Share on other sites

A nice review of Jon's hud is now on flightsim.com.I downloaded it this afternoon and replaced all of the "default" panels you get when you press the "W". Information is available at the link Jon provied. VVery nicely done. QUESTION:Can a gauge like this be moved inside the cockpit to a 2d panel, resized and using "as is" and then cover/mask the unwanted frame with a new frame? For example, a Chelton Sierra frame with black as the screen so the "hud" will show through? Will probably have to put the correct background as well for the green display to show?I shall try. ;-)Regards,Bob

Share this post


Link to post
Share on other sites

Hey Litvinov.I have not had the time to try USE_TRANSPARENCY yet, but from your report I understand it runs, withouth crashing, but even the vectors are now transparent?The only meaning I can think of for LSO, although it does not make much sense here, so it is possibly wrong, is Landing Signal Officer, the guy who says if a plane is in good flight path to land at an aircraft carrier. Oh well.By the way, no documentation is MS's trademark, they could not have done any worse with the SDK.

Share this post


Link to post
Share on other sites

Hello Eric.I did not have the time tonight to test it out, although it seems Litvinov did, and his results are interesting, but a bit confusing. For my sake, I will test it anyways, and report on it, since it seems at least he didn't have a crash when using USE_TRANSPARENCY, as you did.

Share this post


Link to post
Share on other sites

LSO refers to landing signal officer and comes from CFSII which uses the same gauge structure, maybe the HUD references are also related to CFSII.Arne Bartels

Share this post


Link to post
Share on other sites

Hey Arne.You as usual shine some good light onto this matter. This would start to make more sense if one was thinking about CFSII, where there is a "HUD" mode, even named that in the manual, where you turn the 2D panel off, and all you see is the scenery, but with some overlays, as in a sort of radar, a couple gauges like Altimeter and ASI, etc.

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