Sign in to follow this  
Guest grb

Gauge Compilation...Some observations..for newbies....

Recommended Posts

Hi all,Firstly, if you are just starting out. And simply cannot get the set of SDK gauges for FS2K2 to compile. Read the stuff in a thread I started a few days ago CALLED:"Can someone help me with a Borland compilation problem."Read Arne and JeanLuc's answers and JeanLuc's solution carefully. It worked for me!OK. Some observations, now that I can succesfully compile the SDKpackage.********What I want to share here comes in two parts. *********First. I had been wondering if one can compile just one Gauge out fo the SDK package. By package I refere to all the dirs/files that are created from unziping the SDK Tool Kit download for the Aircraft_Panel SDK.OK the two questions I have been asking myself are as follows:Question 1. Can one compile just one gauge out of those found in the SDK? As apposed to having to compile all of them.Question 2. Can one rename the SDK.gau to something else, lets say PINK.gau, then using CFGEdit or hand editing add gauges to a panel?_______________________________________________________OK. In reverse order ....... Here are the answers.Yes. After succesful compilation of a SDK.gau (in this case it will be shown below what one I used.......that is the SDK.gau will ONLYhave ONE gauge in it). I simply renamed the SDK.gau to PINK.gau.Then in CFGEdit added that gauge from PINK.gau to a panel It works OK.OK. For the answer to question 1. Yes I was able to modify the files in the SDK package so that I only compile one of those gauges.The gauge I choose to compile into the SDK.gau ....which I then renamed afterward PINK.gau, is called "FlightMap".All I did was take all the information for the rest of the gauges other then this one out of the SDK.H, SDK.rc, and SDK.c files.Then simply did a make. It works correctly. I only find the FlightMap gauge in the SDK.gau file upon succesfull compilation.OK. So why would I want to do this? Well, as a beginner, I want to modify existing gauge files to gain some experience in gauge creation.So, by only having to work on one gauge I feel it makes the job easier. Plus, one can then compair their modified gauge, lets say they put it under the name PINK.gau or PINK2.gau, whatever based on the above stuff......... thereby allowing one to place a number of almost identical gauges into a panel to see how they look and differ etc..So I hope the following example may have some worth to someone reading this thread.Here are the modified three files to just compile the FlightMap gauge into SDK.gau when afterwards gets renamed to PINK.gau.SDK.H____________________________// SDK.h Modified for a single gauge by George// Copyright © 2000 Microsoft Corporation. All rights reserved.//#define VERSION_MAJOR 1#define VERSION_MINOR 0#define VERSION_BUILD 0// magic to get the preprocessor to do what we want#define lita(arg) #arg#define xlita(arg) lita(arg)#define cat3(w,x,z) w##.##x##.##z##000#define xcat3(w,x,z) cat3(w,x,z)#define VERSION_STRING xlita(xcat3(VERSION_MAJOR,VERSION_MINOR,VERSION_BUILD))#ifndef VS_VERSION_INFO#define VS_VERSION_INFO 0x0001#endif///////////////////////////////////////////////////////////////////////////////// FlightMap Bitmaps//#define BMP_FLIGHT_MAP_BACKGROUND 0x2600#define BMP_FLIGHT_MAP_BLANK 0x2601SDK.rc______________________________________// SDK.rc Modified for a single gauge by George// Copyright © 2000 Microsoft Corp. All Rights Reserved#include "sdk.h"///////////////////////////////////////////////////////////////////////////////// Version//VS_VERSION_INFO VERSIONINFO FILEVERSION VERSION_MAJOR,VERSION_MINOR,0,VERSION_BUILD PRODUCTVERSION VERSION_MAJOR,VERSION_MINOR,0,VERSION_BUILD FILEFLAGSMASK 0x3fL FILEFLAGS 0x0L FILEOS 0x10004L FILETYPE 0x1L FILESUBTYPE 0x0LBEGIN BLOCK "StringFileInfo" BEGIN BLOCK "040904b0" BEGIN VALUE "CompanyName", "HalfAss0" VALUE "FileDescription", "FlightMap Gauge0" VALUE "FileVersion", "ver10" VALUE "LegalCopyright", "Your Copyright.0" VALUE "ProductName", "FlightMap0" VALUE "ProductVersion", "ver10" END END BLOCK "VarFileInfo" BEGIN VALUE "Translation", 0x409, 1200 ENDEND///////////////////////////////////////////////////////////////////////////////// Flight Map Background//BMP_FLIGHT_MAP_BACKGROUND BITMAP DISCARDABLE "resSDK.FlightMap.BMP"BMP_FLIGHT_MAP_BLANK BITMAP DISCARDABLE "resSDK.FlightMap.Blank.BMP"SDK.C________________________________________// SDK.c Modified for a single gauge by George// Copyright © 2000 Microsoft Corp. All Rights Reserved// NOTICE**************GRB put in "0" after GAUGE_NAME per the sdk document..#include "gauges.h"#include "SDK.h"/////////////////////////////////////////////////////////////////////////////// FlightMap/////////////////////////////////////////////////////////////////////////////#define GAUGE_NAME "FlightMap0"#define GAUGEHDR_VAR_NAME gaugehdr_flightmap#define GAUGE_W 276#include "SDK.FlightMap.c"/////////////////////////////////////////////////////////////////////////////// Gauge table entries/////////////////////////////////////////////////////////////////////////////GAUGE_TABLE_BEGIN() GAUGE_TABLE_ENTRY(&gaugehdr_flightmap)GAUGE_TABLE_END()******************************END OF THREE FILES ***************So for anyone that would be using the modified JeanLuc MAKEFILE and his modified SDK package that can be downloaded from the Hyperlink in the thread I mention at the beginning of this topic, ... The above works exactly as I describe it here.DO NOT CHANGE THE GAUGE_NAME IN THE MAKEFILE. Leave it as SDK.And DO, look at my comments as how I changed the MAKEFILE in one spot,where it references where to move the SDK.gau file to. His Makefile was set up to send the SDK.gau to FS004.... If you are working in FS2K2, you would want to change that one line.Well I hope in some small way the above will have some use to someone just starting out. Again I must thank Arne and JeanLuc for their patience and help in seeing me through a rather brutal beginning as to trying to get the FS2K2 SDK tool kit files to actually compile correctly and then be able to display them into a panel.take care all,George

Share this post


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

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