// Set SRB class specs void Atlantis_SRB::clbkSetClassCaps (FILEHANDLE cfg) { extern PARTICLESTREAMSPEC srb_contrail, srb_exhaust; PARTICLESTREAMSPEC srb_bolt = { 0, 8.0, 20, 0.0, 0.1, 0.3, 16, 3.0, PARTICLESTREAMSPEC::EMISSIVE, PARTICLESTREAMSPEC::LVL_LIN, 0, 1, PARTICLESTREAMSPEC::ATM_FLAT, 1, 1 }; SetEnableFocus (false); // SRB cannot receive input focus // *********************** physical parameters ********************************* SetSize (23.0); SetEmptyMass (SRB_EMPTY_MASS); SetCW (0.1, 0.3, 1.4, 1.4); SetCrossSections (_V(162.1,162.1,26.6)); SetRotDrag (_V(0.7,0.7,0.1)); SetPMI (_V(154.3,154.3,1.83)); //SetGravityGradientDamping (10.0); SetTouchdownPoints (tdvtx, ntdvtx); SetLiftCoeffFunc (0); // ************************* docking port ************************************** CreateDock (_V(1.95,0,5),_V(1,0,0),_V(0,0,1)); // ET attachment // ************************* propellant specs ********************************** ph_main = CreatePropellantResource (SRB_MAX_PROPELLANT_MASS); // *********************** thruster definitions ******************************** // main engine th_main = CreateThruster (_V(0,0,-21), THRUSTGIMBAL_LAUNCH, SRB_THRUST_MAX, ph_main, SRB_ISP0, SRB_ISP1); SURFHANDLE tex = oapiRegisterExhaustTexture ("Exhaust2"); srb_exhaust.tex = oapiRegisterParticleTexture ("Contrail2"); AddExhaust (th_main, 16.0, 2.0, tex); AddExhaustStream (th_main, _V(0,0,-30), &srb_contrail); AddExhaustStream (th_main, _V(0,0,-25), &srb_exhaust); // separation bolts th_bolt = CreateThruster (_V(0,0,3.0), _V(-1,0,0), 3e6, ph_main, 1e7); // for simplicity, the separation bolts directly use SRB propellant. We give // them an insanely high ISP to avoid significant propellant drainage AddExhaust (th_bolt, 0.7, 0.1, _V(2.1,0,-8), _V(-1,0,0)); AddExhaust (th_bolt, 0.7, 0.1, _V(2.1,0,11), _V(-1,0,0)); AddExhaustStream (th_bolt, _V(2.1,0,0), &srb_bolt); // ************************ visual parameters ********************************** AddMesh (hSRBMesh); bMainEngine = false; bSeparationEngine = false; bGimbalCmd = false; srbpos = SRB_UNDEFINED; }
//Plugin extern function void __declspec(dllexport) Capture(PLUGINDATA *pd) { pd->dwSupport|=PDS_SUPPORTALL; if (pd->dwSupport & PDS_GETSUPPORT) return; if (!bInitCommon) InitCommon(pd); else if (!bInitCapture) ReadOptions(OF_CAPTURE); if (bInitCapture) { DestroyDock(hWndCaptureDlg, DKT_KEEPAUTOLOAD); //Stay in memory and show as non-active pd->nUnload=UD_NONUNLOAD_NONACTIVE; } else { InitMain(); InitCapture(); pfCapture=pd->lpPluginFunction; bCaptureDockWaitResize=pd->bOnStart; CreateDock(&hWndCaptureDlg, &dkCaptureDlg, !bCaptureDockWaitResize); //Stay in memory, and show as active pd->nUnload=UD_NONUNLOAD_ACTIVE; } }
/** Parse a dock tray component. */ void ParseDock(const TokenNode *tp, TrayType *tray) { TrayComponentType *cp; int width; char *str; Assert(tp); Assert(tray); str = FindAttribute(tp->attributes, WIDTH_ATTRIBUTE); if(str) { width = ParseUnsigned(tp, str); } else { width = 0; } cp = CreateDock(width); if(JLIKELY(cp)) { AddTrayComponent(tray, cp); } }
int main(int argc, char *argv[]) { int i; GetArg(argc, argv); glibtop_init(); CreateDock(argc, argv); gettimeofday(&timev, NULL); pList = GetProcList(); posProc = pList; ZoneCreate(4, 50, 8, 8, UP); ZoneCreate(54, 50, 8, 8, DOWN); for (i = NB_LINE; i; i--) ZoneCreate(X_PROC + 1, Y_PROC + (i - 1) * 10 + 2, 48, 7, i); DoEvents(); return 0; }