M
Michael Sgier
Hi
c++ is still very new to me so some questions:
---Declaration:
XPLMDataRef gPlaneV = NULL;
---in the main start function:
gPlaneV = XPLMFindDataRef("sim/graphics/view/view_type");
XPLMRegisterFlightLoopCallback( /*What is this function doing?*/
setView(), /* Callback */
1.0, /* Interval */
NULL); /* refcon not used. */
return 1; /* why?
---than outside the main function:
setView()
{
planeV = XPLMGetDatai(gPlaneV);
if (planeV != 1026)
XPLMSetDatai(gPlaneV, 1026);
return gPlaneV;
}
This documentation I can use:
http://www.xsquawkbox.net/xpsdk/phpwiki/index.php?XPLMDataAccess
I only want to loop the dll application and set the dataref:
"sim/graphics/view/view_type" to 1026.
It compiles but debugging stops at the end of the main function. So how
can i test the main loop and watch if gPlaneV is set?
return gPlaneV is correct? Sorry but coming from VB.NET i lack some
knowledges in c++.
Thanks indeed Michael
c++ is still very new to me so some questions:
---Declaration:
XPLMDataRef gPlaneV = NULL;
---in the main start function:
gPlaneV = XPLMFindDataRef("sim/graphics/view/view_type");
XPLMRegisterFlightLoopCallback( /*What is this function doing?*/
setView(), /* Callback */
1.0, /* Interval */
NULL); /* refcon not used. */
return 1; /* why?
---than outside the main function:
setView()
{
planeV = XPLMGetDatai(gPlaneV);
if (planeV != 1026)
XPLMSetDatai(gPlaneV, 1026);
return gPlaneV;
}
This documentation I can use:
http://www.xsquawkbox.net/xpsdk/phpwiki/index.php?XPLMDataAccess
I only want to loop the dll application and set the dataref:
"sim/graphics/view/view_type" to 1026.
It compiles but debugging stops at the end of the main function. So how
can i test the main loop and watch if gPlaneV is set?
return gPlaneV is correct? Sorry but coming from VB.NET i lack some
knowledges in c++.
Thanks indeed Michael