Thanks. How close is the actual IUS to be being ready?here are the IUS ase files:
if (GetAttachmentStatus(ToASE) == NULL) //NOT ATTACHED TO ASE SO START TIMER
{
sprintf(oapiDebugString(), "starttime %d ", starttimeASE);
starttimeASE = starttimeASE + 1;
if (starttimeASE < 94) //94 SECONDS PAST DETTACHMENT TURN RSC ON
Post the sources and maybe someone could check it over.Close. I need to add sound 4.0 and fix this:
If not attached to ASE start timer. But the starttimeASE doesn't moveCode:if (GetAttachmentStatus(ToASE) == NULL) //NOT ATTACHED TO ASE SO START TIMER { sprintf(oapiDebugString(), "starttime %d ", starttimeASE); starttimeASE = starttimeASE + 1; if (starttimeASE < 94) //94 SECONDS PAST DETTACHMENT TURN RSC ON
Should I check in the source code to the SSU repository?
It's better than the code for CRTMFD. It's very understandable and looks clean. So to me it should go in.Does it have some source code quality that it could be used for open-source development? Like it is properly documented source code and is using similar architectures and variable name schemes as the rest of the SSU repository does? If not, then no, IMHO.
It's better than the code for CRTMFD. It's very understandable and looks clean. So to me it should go in.
Addition of particle streams to the RCS/SRM exhausts to make them resemble their real counterparts better. As well as downscaled meshes as they're currently too big.So what is next?
Addition of particle streams to the RCS/SRM exhausts to make them resemble their real counterparts better. As well as downscaled meshes as they're currently too big.
And a dialog window that looks like the real IUS Power Control Panel for proper control of the Airborne Support Equipment.
Yes.Just starting to dialog box. Would the dialog control the ASE vessel?
Like this:What does it look like?
class IUSASE : public VESSEL3 {
friend class PayloadBayOp;// not sure about this?
public:
IUSASE(OBJHANDLE hObj, int fmodel);
~IUSASE();
void clbkSetClassCaps(FILEHANDLE cfg);
int clbkConsumeBufferedKey(DWORD key, bool down, char *kstate);
void clbkVisualCreated(VISHANDLE vis, int refcount);
void DefineAnimations(void);
void clbkVisualDestroyed(VISHANDLE vis, int refcount);
void clbkPostStep(double simtt, double simdt, double mjd);
void clbkLoadStateEx(FILEHANDLE scn, void *status);
void clbkSaveState(FILEHANDLE scn);
PayloadBayOp *plop; // control and status of payload bay operations
private:
enum NOZZLE { TILT_UP, TILT_DOWN, STOW ,STOP}TILT_IUS;
VECTOR3 xp1, xr1, IUSTIP[3];
ANIMATIONCOMPONENT_HANDLE hAC_arm;
MGROUP_TRANSFORM *rms_anim[2];
ATTACHMENTHANDLE IUS;
double IUS_TILT_PROC, TILTANGLE, NEWANGLE;
UINT anim_IUS_TILT;
UINT anim_IUS_TILT1;
};
// Constructor
// --------------------------------------------------------------
IUSASE::IUSASE(OBJHANDLE hObj, int fmodel)
: VESSEL3(hObj, fmodel)
{
plop = new PayloadBayOp(this);
TILT_IUS = STOW;
IUS_TILT_PROC = .2;
IUSTIP[0] = _V(0,2,0);
IUSTIP[1] = _V(0,1,0);
IUSTIP[2] = _V(0,2,1);
DefineAnimations();
}
PayloadBayOp::PayloadBayOp(IUSASE *_sts) : sts(_sts)
{
sts_dlg = sts;
hDlg = NULL;
}
void PayloadBayOp::UpdateDialog(HWND hWnd)
{
char cbuf[256];
//int i;
sprintf(cbuf, "IUSASE %s: Payload Bay Operation", sts->GetName());
SetWindowText(hWnd, cbuf);
{
int plbd_ctrl[1] = { IDC_PLBD3 };
bool switchstatus = (PYROPRI == BD_ON);
oapiSetSwitchState(GetDlgItem(hWnd, plbd_ctrl[1]), switchstatus ? 0 : 1, true);
}
oapiSetSwitchState(GetDlgItem(hWnd, IDC_PLBD3), PYROPRI == BD_ON ? 0 : PYROPRI == BD_OFF ? 1 : 2, true);
static char *PLBDstr[2] = { " ", "\\\\\\\\\\", };
SetWindowText(GetDlgItem(hWnd, IDC_PLBD_TLKBK7), PLBDstr[0]);
}
void PayloadBayOp::OpenDialog()
{
if (hDlg) return; // dialog already open
hDlg = oapiOpenDialogEx(g_Param.hDLL, IDD_PLBAY, PlOp_DlgProc, DLG_CAPTIONCLOSE | DLG_CAPTIONHELP, this);
}
BOOL PayloadBayOp::DlgProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
bool action = false;
switch (uMsg) {
case WM_INITDIALOG: {
SWITCHPARAM sp = { SWITCHPARAM::THREESTATE, SWITCHPARAM::VERTICAL };
UpdateDialog(hWnd);
} return TRUE;
case IDC_PLBD3:
if (HIWORD(wParam) == BN_CLICKED) {
int idx = (LOWORD(wParam) == IDC_PLBD3 ? 0 : 1);
switch (lParam) {
case 0:
PYROPRI = BD_ON;
break;
case 1:
PYROPRI = BD_OFF;
break;
}
}
break;
}
return oapiDefDialogProc(hWnd, uMsg, wParam, lParam);
}
class PayloadBayOp {
friend class IUSASE;
public:
PayloadBayOp(IUSASE *_sts);
void OpenDialog();
bool ParseScenarioLine(char *line);
void SaveState(FILEHANDLE scn);
private:
IUSASE *sts; // vessel instance pointer
HWND hDlg; // control dialog handle
BOOL DlgProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
friend BOOL CALLBACK PlOp_DlgProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
void UpdateDialog(HWND hWnd);
enum { BD_ON, BD_OFF } PYROPRI;
};