rename item id
This commit is contained in:
parent
7126a5e350
commit
dda58ee6ce
@ -10,9 +10,9 @@ TinyEurocat::TinyEurocat(void) : CPlugIn ( COMPATIBILITY_CODE,
|
||||
"Future Sim Studio",
|
||||
"Copr. 2022 Future Sim Studio" )
|
||||
{
|
||||
RegisterTagItemType("Metric / Current Altitude", TAG_ITEM_MET_CURR_ALT);
|
||||
RegisterTagItemType("Metric / Cleared Altitude", TAG_ITEM_MET_ASS_ALT);
|
||||
RegisterTagItemType("Metric / Current Speed", TAG_ITEM_MET_CURR_SPD);
|
||||
RegisterTagItemType("Metric / Current Altitude", ITEM_MET_AFL);
|
||||
RegisterTagItemType("Metric / Cleared Altitude", ITEM_MET_CFL);
|
||||
RegisterTagItemType("Metric / Current Speed", ITEM_MET_GS);
|
||||
}
|
||||
|
||||
void TinyEurocat::OnGetTagItem( CFlightPlan FlightPlan,
|
||||
@ -24,11 +24,11 @@ void TinyEurocat::OnGetTagItem( CFlightPlan FlightPlan,
|
||||
COLORREF *pRGB,
|
||||
double *pFontSize )
|
||||
{
|
||||
int maalt, mcalt, mcspd;
|
||||
switch (ItemCode)
|
||||
{
|
||||
char tmpstr[15];
|
||||
case TAG_ITEM_MET_ASS_ALT:
|
||||
int maalt, mcalt, mcspd;
|
||||
char tmpstr[15];
|
||||
case ITEM_MET_CFL:
|
||||
maalt = FlightPlan.GetClearedAltitude() * 0.3048 / 10;
|
||||
if (maalt > 0)
|
||||
{
|
||||
@ -40,12 +40,12 @@ void TinyEurocat::OnGetTagItem( CFlightPlan FlightPlan,
|
||||
strcpy(sItemString, " ");
|
||||
}
|
||||
break;
|
||||
case TAG_ITEM_MET_CURR_ALT:
|
||||
case ITEM_MET_AFL:
|
||||
mcalt = RadarTarget.GetPosition().GetPressureAltitude() * 0.3048 / 10;
|
||||
itoa(mcalt, tmpstr, 10);
|
||||
sprintf(sItemString, "%04s", tmpstr);
|
||||
break;
|
||||
case TAG_ITEM_MET_CURR_SPD:
|
||||
case ITEM_MET_GS:
|
||||
mcspd = RadarTarget.GetPosition().GetReportedGS() * 1.852;
|
||||
mcspd /= 10;
|
||||
itoa(mcspd, tmpstr, 10);
|
||||
|
@ -3,9 +3,9 @@
|
||||
|
||||
using namespace EuroScopePlugIn;
|
||||
|
||||
const int TAG_ITEM_MET_CURR_ALT = 1;
|
||||
const int TAG_ITEM_MET_ASS_ALT = 2;
|
||||
const int TAG_ITEM_MET_CURR_SPD = 3;
|
||||
const int ITEM_MET_AFL = 1;
|
||||
const int ITEM_MET_CFL = 2;
|
||||
const int ITEM_MET_GS = 3;
|
||||
|
||||
class TinyEurocat : public CPlugIn
|
||||
{
|
||||
@ -13,13 +13,13 @@ class TinyEurocat : public CPlugIn
|
||||
TinyEurocat(void);
|
||||
~TinyEurocat(void);
|
||||
void OnGetTagItem( CFlightPlan FlightPlan,
|
||||
CRadarTarget RadarTarget,
|
||||
int ItemCode,
|
||||
int TagData,
|
||||
char sItemString [ 16 ],
|
||||
int *pColorCode,
|
||||
COLORREF *pRGB,
|
||||
double *pFontSize );
|
||||
CRadarTarget RadarTarget,
|
||||
int ItemCode,
|
||||
int TagData,
|
||||
char sItemString [ 16 ],
|
||||
int *pColorCode,
|
||||
COLORREF *pRGB,
|
||||
double *pFontSize );
|
||||
|
||||
};
|
||||
|
||||
|
@ -14,6 +14,7 @@
|
||||
<ProjectGuid>{E1145C92-0713-4553-85D3-1D20417C2989}</ProjectGuid>
|
||||
<RootNamespace>TinyEurocat</RootNamespace>
|
||||
<Keyword>MFCDLLProj</Keyword>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
|
Loading…
x
Reference in New Issue
Block a user