Difference between revisions of "VESSEL2::clbkLoadStateEx"

From OrbiterWiki
Jump to navigation Jump to search
 
Line 28: Line 28:
  
 
==See also==
 
==See also==
 +
* [[Vessel module sequence diagram]]
 
* [[ovcLoadStateEx]]
 
* [[ovcLoadStateEx]]
 
* [[ovcLoadState]]
 
* [[ovcLoadState]]

Revision as of 21:12, 8 January 2007

Callback function to read the current vessel state from a scenario file.

Syntax

virtual void clbkLoadStateEx(FILEHANDLE scn, void* vs);

scn
File handle to the current scenario file
vs
VESSELSTATUS2 structure with the current default state, used for processing default parameters.

Example

void MAYFLY::clbkLoadStateEx(FILEHANDLE scn, void* vs)
{
	char* pLine;
	while(oapiReadScenario_nextline(scn, pLine))
	{
		if(!strnicmp(pLine, "LIFETIME", 8))
		{
			sscanf(pLine + 8, "%lf", &fRemainingLifeTime);
		}
		else 
		{
			ParseScenarioLineEx(pLine, vs);
		}
	}
}

See also


Callback functions in VESSEL2

edit

clbkADCtrlMode - clbkAnimate - clbkConsumeBufferedKey - clbkConsumeDirectKey - clbkDockEvent - clbkDrawHUD - clbkHUDMode - clbkLoadGenericCockpit - clbkLoadPanel - clbkLoadStateEx - clbkLoadVC - clbkMFDMode - clbkNavMode - clbkPanelMouseEvent - clbkPanelRedrawEvent - clbkPostCreation - clbkPostStep - clbkPreStep - clbkRCSMode - clbkSaveState - clbkSetClassCaps - clbkSetStateEx - clbkVCMouseEvent - clbkVCRedrawEvent - clbkVisualCreated - clbkVisualDestroyed