BOOL CQuickView::OnInitDialog() { CDialog::OnInitDialog(); CRStatic* s=GETDLGITEM(IDC_CURRMISS); s->SetString(RESLIST(QUICK_1, CSQuick1::currquickmiss)); targtype=0,targentry=0; for (int t=0;t<4;t++) for (int e=0;e<4;e++) if(CSQuick1::quickdef.targets[t][e]==CSQuick1::quickdef.target) targtype=t,targentry=e; s=GETDLGITEM(IDC_TARGTYPE); s->SetString(LoadResString(CSQuick1::quickdef.targtypeIDs[targtype])); s=GETDLGITEM(IDC_TARGNAME); s->SetString(GetTargName(CSQuick1::quickdef.targets[targtype][targentry])); s=GETDLGITEM(IDC_WEATHER); s->SetString(RESLIST(WEATHER_CLEAR, CSQuick1::quickdef.weather)); s=GETDLGITEM(IDC_CLOUD); s->SetString(CSprintf("%i", 5000 + 1000 * CSQuick1::quickdef.cloudbaseK)); return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE }
BOOL CCommsDeathMatchAc::OnInitDialog() { CDialog::OnInitDialog(); int index; CRCombo* combo=GETDLGITEM(IDC_CURRENTAC); combo->SetCircularStyle(TRUE); int maxindex = 0; if (_DPlay.GameType == DPlay::DEATHMATCH) { for (char i = 0; i < PT_BRIT_NONFLY;i++) combo->AddString(RESLIST(SPIT_A,i)); for (i = PT_GER_FLYABLE; i < PT_GER_NONFLY;i++) combo->AddString(RESLIST(SPIT_A,i)); maxindex = PT_BRIT_NONFLY + PT_GER_NONFLY - PT_GER_FLYABLE - 1; index = DPlay::H2H_Player[_DPlay.mySlot].squadron; if (index >= PT_BRIT_NONFLY) index -= (PT_GER_FLYABLE-PT_BRIT_NONFLY); if (index > maxindex) index = 0; }else if(_DPlay.Side) { for (char i = 0; i < PT_BRIT_NONFLY;i++) combo->AddString(RESLIST(SPIT_A,i)); index = DPlay::H2H_Player[_DPlay.mySlot].squadron; if (index >= PT_BRIT_NONFLY) index = 0; }else { for (char i = PT_GER_FLYABLE; i < PT_GER_NONFLY;i++) combo->AddString(RESLIST(SPIT_A,i)); index = DPlay::H2H_Player[_DPlay.mySlot].squadron; if (index >= PT_GER_FLYABLE) index -= (PT_GER_FLYABLE); //-SQ_B_NONFLYABLE); else index = 0; if (index >= (PT_GER_NONFLY - PT_GER_FLYABLE)) index = 0; } combo->SetIndex(index); (DPlay::H2H_Player+_DPlay.mySlot)->status=DPlay::CPS_FRAG; acselect_timer=SetTimer(DPlay::TIMER_ACSELECT,0,NULL); return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE }
CString GetDateName(int date,DateFormat form,int time) { //Save_Data.dateorder SWord month = 0; SWord day = 0,year = 0; CString cdate; Math_Lib.DateFromSecs (date,day,month,year); year += 1901; switch (form) { case DATE_SHORT: { //DEADCODE RDH 15/06/99 cdate.Format("%i/%i/%i",day,month+1,year - 1900); cdate.Format("%i/%i/%i",month+1,day,year - 1900); //use US format //RDH 15/06/99 return(cdate); } case DATE_LONG: { cdate.Format("%s %i, %i",RESLIST(JANUARY, month),day,year); return(cdate); } default: case DATE_PERIOD: return "12th of Never, afternoon"; } }
void CDamage::FillList() { //DeadCode JIM 20Oct00 int setindex=-1; //DeadCode JIM 20Oct00 int listlen=0; CRListBox* l=GETDLGITEM(IDC_LIST_ELEMENTS); l->Clear(); //Find damage info for group int de=numdamagedelts; while(de-->0) breakif (damagedelements[de].loadedid==groupnum); if (de>=0) { int specificeltdamage=de; UniqueID startpoint=UID_NULL; UniqueID findpoint=(UniqueID)wavenum; if (wavenum!=groupnum) { if (!DeadStream::MainWorldBand(UniqueID(groupnum))) startpoint=findpoint; findpoint=damagedelements[specificeltdamage].memberid; } DeadStream::DeadBlockItterator itt(Dead_Stream.firstblock,startpoint); itt.SkipToItem(findpoint); //list elements l->AddColumn(TARGETFIELDWIDTH+50); l->AddColumn(50); for (GroupItterator si(damagedelements[specificeltdamage].shape,&itt);si;si++) { if (si.DamageWeight()>IGNOREDAMAGEBELOWTHIS && si.shape!=CTRPTC && si.shape!=CRKPTC) { l->AddString(GetShapeName(si.shape)+" "+GetEltDeltaName(si.delta),0); l->AddString(RESLIST(DAMAGESTAT_ALIVE,((MinAnimData&)si.AnimDataByte()).itemstate),1); } } } else { l->AddColumn(TARGETFIELDWIDTH+100); info_itemS* p = *Persons2::SlowConvertPtrUID(UniqueID(groupnum)); if (p) if (p->Status.size>=MOBILESIZE) { EventVal& type=p->shape; int max=(info_grndgrpPtr(*p)->inform); for (int i=0;i<max;i++) l->AddString(GetShapeName(ShapeNum(type.Evaluate(i))),0); } else for (GroupItterator si(ShapeNum(p->shape.Evaluate()));si;si++) { if (si.DamageWeight()>IGNOREDAMAGEBELOWTHIS && si.shape!=CTRPTC && si.shape!=CRKPTC) { l->AddString(GetShapeName(si.shape)+" "+GetEltDeltaName(si.delta),0); } } } }
/* ARGSUSED */ Bool SMGR_free(SMGR_Handle handle, IALG_Handle alg, Int resourceId, Int num, Int scratchId) { Bool status = TRUE; Int i; #if DEBUG SMGR_Counter * res = (SMGR_Counter *)(RESLIST(resourceId)); #endif //DBC_require(smgr != NULL); //DBC_require(size > 0); GT_assert(CURTRACE, handle != NULL); GT_assert(CURTRACE, resourceId < handle->numResources); GT_assert(CURTRACE, scratchId < handle->numGroups); /* Ensure resource being freed is actually owned by this scratch group */ if (scratchId == -1) { for (i = 0 ; i < num; i++) { GT_assert(CURTRACE, ((RESSTAT(resourceId + i) != SMGR_RESAVAILABLE) && (RESSTAT(resourceId + i) == scratchId))); /* Persistent resources when freed are marked as available */ RESSTAT(resourceId + i) = SMGR_RESAVAILABLE; RESCOUNT(resourceId + i)--; GT_assert(CURTRACE, RESCOUNT(resourceId + i) == 0); } } else { for ( i = 0 ; i < num; i++) { GT_assert(CURTRACE, ((RESSTAT(resourceId + i) != SMGR_RESAVAILABLE) && (RESSTAT(resourceId + i) == scratchId))); /* Decrement counter for scratch resources */ RESCOUNT(resourceId + i)--; /* Last guy to use this resource, just freed it, shouldn't use that alg anymore to track the owner */ RESALG(resourceId + i) = NULL; /* If count goes to zero, resource is marked available */ if (0 == RESCOUNT(resourceId + i)) { RESSTAT(resourceId + i) = SMGR_RESAVAILABLE; } } } return (status); }
void CMiscToolbar::OnClickedDirectivetoggle() { if (RDialog::m_pView->m_currentpage != 0) //RJS 29Oct00 return; //RJS 29Oct00 if (MMC.directivespopup) MMC.directivespopup = false; else MMC.directivespopup = true; m_dialids[DIRECTIVESTOGGLE].SetHintString(RESSTRING(DIRECTIVES)+": "+RESLIST(OFF,!MMC.directivespopup)); //DEADCODE 18/02/00 if (RFullPanelDial::gameside == RFullPanelDial::SIDE_LW) //DEADCODE 18/02/00 OpenDirectivetoggle(NULL); //DEADCODE 18/02/00 else //DEADCODE 18/02/00 OpenRAFDirectivetoggle(NULL); }
/* * ======== _alloc ======== * Allocates the resourceId to scratchId and alg * Assumes this resource is free */ static inline Void _alloc(SMGR_Handle handle, Int resourceId, Int scratchId, IALG_Handle alg) { #if DEBUG SMGR_Counter * res = (SMGR_Counter *)(RESLIST(resourceId)); #endif if ( SMGR_RESAVAILABLE == RESSTAT(resourceId) ) { /* Resource is free. Mark is busy */ RESSTAT(resourceId) = ((scratchId == -1) ? SMGR_RESPERSISTENT: scratchId); } /* Scratch resources need to stow the alg that req. them */ RESALG(resourceId) = alg; /* Increment counter */ RESCOUNT(resourceId)++; }
/* * ======== _match ======== * Function checks if the resourceId is available to scratchGroupId, and alg */ static inline Bool _match(SMGR_Handle handle, Int resourceId, Int scratchId, IALG_Handle alg) { Bool status = TRUE; #if DEBUG SMGR_Counter * res = (SMGR_Counter *)(RESLIST(resourceId)); #endif /* Check if resource is free */ if (SMGR_RESAVAILABLE != RESSTAT(resourceId)) { /* Needs to be available for -1 */ if (scratchId == -1) { status = FALSE; } else { /* For scratch resources, should be available to the same group */ if (!((scratchId == RESSTAT(resourceId)) &&(RESALG(resourceId) != alg))) { status = FALSE; } } } return (status); }
///////////////////////////////////////////////////////////////////////////// // PilotLogBook message handlers void PilotLogBook::RAFRefreshList() { CRListBox* rlistbox; rlistbox=GETDLGITEM(IDC_RLISTBOXCTRL1); //DeadCode RDH 31Oct00 rlistbox->AddString("",0); rlistbox->Clear(); //rlistbox->AddColumn(70); //MIKE //rlistbox->AddColumn(60); //RDH 02/06/99 //rlistbox->AddColumn(80); //RDH 02/06/99 //rlistbox->AddColumn(90); //RDH 02/06/99 //rlistbox->AddColumn(280); //rlistbox->AddColumn(45); //RDH 02/06/99 //DeadCode JIM 18Oct00 rlistbox->AddColumn(30); //RDH 02/06/99 rlistbox->AddString(RESSTRING(DATE),0); rlistbox->AddString(RESSTRING(HOUR),1); rlistbox->AddString(RESSTRING(ACTYPE),2); rlistbox->AddString(RESSTRING(DUTY),3); rlistbox->AddString(RESSTRING(REMARKS),4); rlistbox->AddString(RESSTRING(CLAIMS),5); //DeadCode JIM 18Oct00 rlistbox->AddString(RESSTRING(FLYINGHOURS),6); Diary::Player* pptr; //TEMPCODE RDH 05/04/00 //###temp //TEMPCODE RDH 05/04/00 int pack=0; //TEMPCODE RDH 05/04/00 while ( pack < Profile::MAX_PACKS) //TEMPCODE RDH 05/04/00 { //TEMPCODE RDH 05/04/00 if (Todays_Packages.pack[pack].packagestatus!=Profile::PS_SPARE) //TEMPCODE RDH 05/04/00 { //TEMPCODE RDH 05/04/00 Profile& pk = Todays_Packages.pack[pack]; //TEMPCODE RDH 05/04/00 if (pk.attackmethod < Profile::AM_LWPACKS) //TEMPCODE RDH 05/04/00 break; //TEMPCODE RDH 05/04/00 } //TEMPCODE RDH 05/04/00 pack++; //TEMPCODE RDH 05/04/00 } //TEMPCODE RDH 05/04/00 RDialog::m_pView->SetHiLightInfo(pack, 0,UID_Null); //TEMPCODE RDH 05/04/00 //TEMPCODE RDH 05/04/00 if (Todays_Packages[pack][0].diaryentry == -1) //RJS 27Jan00 //TEMPCODE RDH 05/04/00 Squad_Diary.CreateEntry(Todays_Packages,pack); //RJS 27Jan00 //TEMPCODE RDH 05/04/00 //TEMPCODE RDH 05/04/00 Squad_Diary.CreatePlayer(Todays_Packages); //RJS 27Jan00 //TEMPCODE RDH 05/04/00 pptr = Squad_Diary.GetFirstPlayer(); //TEMPCODE RDH 05/04/00 pptr->howendedmission = EFS_LandedOK; //TEMPCODE RDH 05/04/00 //###end temp pptr = Squad_Diary.GetFirstPlayer(); while(pptr) { SquadronBase* squad = Squad_Diary.GetSquadron(pptr); if (squad) { Diary::RaidGroup* raidgroup; Diary::RaidPack* raidpack; Diary::Intercept* intercept; intercept = Squad_Diary.GetIntercept(squad); raidgroup = Squad_Diary.GetRaidGroup(intercept); if (raidgroup) { raidpack = Squad_Diary.GetRaidPack(raidgroup); if (raidpack) { //date rlistbox->AddString(GetDateName(raidpack->date * SECSPERDAY, DATE_LONG),0); int t; //RJS 12Nov00 if (intercept->intercepttime) //RJS 12Nov00 t = intercept->intercepttime; //RJS 12Nov00 else //RJS 12Nov00 t = intercept->takeofftime; //RJS 12Nov00 t /= 60; //RJS 12Nov00 rlistbox->AddString(CSprintf("%02i:%02i",t/60,t%60),1); Squadron* sq = Node_Data[(SquadNum)squad->squadnum]; rlistbox->AddString(RESLIST(SPIT_A, sq->AcType()),2); //mission int cnt = int(!intercept->waspatrolinitially); rlistbox->AddString(RESLIST(AM_PATROL, cnt),3); CString remarkstring; //RJS 9Nov00 //RJS 9Nov00 pptr->DamageReport(remarkstring); //RJS 9Nov00 //RJS 9Nov00 rlistbox->AddString(remarkstring,4); //RJS 9Nov00 int kills = 0; for (int k = 0; k < 6; k++) kills += pptr->kills[k]; rlistbox->AddString(CSprintf("%i", kills),5); } } } pptr = Squad_Diary.GetNextPlayerAll(pptr); } }
void LWDiaryDetails::Refresh() { CRRadio* pradio; pradio=GETDLGITEM(IDC_RRADIODISPLAY); if (quickmission) pradio->ShowWindow(false); else pradio->ShowWindow(true); pradio->AddButton(RESSTRING(VIEWSINGLE)); pradio->AddButton(RESSTRING(ALL)); pradio->SetCurrentSelection(0); CRListBox* rlistbox; rlistbox=GETDLGITEM(IDC_RLISTBOXCTRL1); rlistbox->Clear(); rlistbox->AddColumn(60); rlistbox->AddColumn(80); //RDH 02/06/99 rlistbox->AddColumn(60); //RDH 02/06/99 rlistbox=GETDLGITEM(IDC_RLISTBOXOTHERS); rlistbox->Clear(); rlistbox->AddColumn(60); rlistbox->AddColumn(60); //RDH 02/06/99 rlistbox->AddString(RESSTRING(GRUPPE),0); rlistbox->AddString(RESSTRING(TASK),1); CRStatic* s; if ( (*currentptr >= 0) && (grdtlsptr[*currentptr]) ) { Diary::RaidGroup* raidgroup; Diary::Gruppen* grentry; raidgroup = Squad_Diary.GetRaidGroup(grdtlsptr[*currentptr]); Diary::Gruppen* othergr = Squad_Diary.GetFirstSquadron(raidgroup); rlistbox=GETDLGITEM(IDC_RLISTBOXOTHERS); while (othergr) { if (othergr != grdtlsptr[*currentptr] && othergr->noaclaunched) { Squadron* sq = &Node_Data[(SquadNum)othergr->squadnum]; CString name = sq->ShortName() + "/"; name = name + sq->SubName(); rlistbox->AddString(name,0); raidgroup = Squad_Diary.GetRaidGroup(othergr); int cnt = (int) raidgroup->misstype; rlistbox->AddString(RESLIST(MT_RAID, cnt),1); } othergr = Squad_Diary.GetNextSquadron(othergr); } //DeadCode RJS 4Sep00 raidgroup = Squad_Diary.GetRaidGroup(grdtlsptr[*currentptr]); raidgroup = Squad_Diary.GetRaidGroup(grdtlsptr[*currentptr]); if (raidgroup) { int theTime = 0; //RJS 4Sep00 //raid s=GETDLGITEM(IDC_RSTATICDIARYDATE); Diary::RaidPack* raidpack = Squad_Diary.GetRaidPack(raidgroup); if (raidpack) { s->SetString(GetDateName(raidpack->date * SECSPERDAY, DATE_LONG)); int strikeac = 0, attachedac = 0, detachedac = 0,myrole=0; TotalUpAc( strikeac, attachedac, detachedac ,myrole); s=GETDLGITEM(IDC_RSTATICMAIN); myrole&=Profile::AM_GROUPMASK; if (myrole==Profile::AM_LWPACKS) s->SetString(CSprintf("%i/%i",grdtlsptr[*currentptr]->noaclaunched,strikeac)); else s->SetString(CSprintf("%i",strikeac)); s=GETDLGITEM(IDC_RSTATICDETACHED); if (myrole==Profile::AM_DETACHED) s->SetString(CSprintf("%i/%i",grdtlsptr[*currentptr]->noaclaunched,detachedac)); else s->SetString(CSprintf("%i",detachedac)); s=GETDLGITEM(IDC_RSTATICATTACHED); if (myrole>=Profile::AM_ATTACHED) s->SetString(CSprintf("%i/%i",grdtlsptr[*currentptr]->noaclaunched,attachedac)); else s->SetString(CSprintf("%i",attachedac)); EncounteredAcType seenac[3]={{PT_BADMAX}}; int hurrseen = 0, spitseen = 0, hurrkilled = 0, spitkilled = 0; TotalEncounteredAc(seenac); CRListBox* rlistbox; rlistbox=GETDLGITEM(IDC_RLISTBOXCTRL1); rlistbox->AddString(RESSTRING(TYPE),0); rlistbox->AddString(RESSTRING(ENCOUNTERED),1); rlistbox->AddString(RESSTRING(CLAIMS),2); //DeadCode JIM 23Oct00 if (seenac[2].totalkilled) //DeadCode JIM 23Oct00 if (seenac[0].encountered==0) //DeadCode JIM 23Oct00 seenac[2].localkilled = seenac[0].localkilled; //DeadCode JIM 23Oct00 else //DeadCode JIM 23Oct00 if (seenac[1].encountered==0) //DeadCode JIM 23Oct00 seenac[2].localkilled = seenac[1].localkilled; for (int i=0;i<3;i++) if (seenac[i].encountered) { if (seenac[i].localkilled>seenac[i].totalkilled) seenac[i].localkilled=seenac[i].totalkilled; rlistbox->AddString(RESLIST(SPIT_A,seenac[i].type),0); rlistbox->AddString(CSprintf("%i",seenac[i].encountered),1); rlistbox->AddString(CSprintf("%i/%i",seenac[i].localkilled,seenac[i].totalkilled),2); } rlistbox->AddString(RESSTRING(TOTAL),0); rlistbox->AddString(CSprintf("%i", seenac[0].encountered+seenac[1].encountered+seenac[2].encountered),1); rlistbox->AddString(CSprintf("%i/%i", seenac[0].localkilled+seenac[1].localkilled+seenac[2].localkilled, seenac[0].totalkilled+seenac[1].totalkilled+seenac[2].totalkilled ),2); theTime = raidpack->takeofftime; //RJS 4Sep00 } else { s->SetString(""); s=GETDLGITEM(IDC_RSTATICMAIN); s->SetString(""); s=GETDLGITEM(IDC_RSTATICDETACHED); s->SetString(""); s=GETDLGITEM(IDC_RSTATICATTACHED); s->SetString(""); } s=GETDLGITEM(IDC_RSTATICPERSONNEL); s->SetString(""); s=GETDLGITEM(IDC_RSTATICTARGET); if(!raidgroup->target) { s->SetString(""); s=GETDLGITEM(IDC_RSTATICRESULT); s->SetString(""); } else { s->SetString(GetTargName(raidgroup->target)); s=GETDLGITEM(IDC_RSTATICRESULT); //DeadCode JIM 20Oct00 TargetNoDetail* trg = Node_Data[raidgroup->target]; CString missString; //RJS 9Nov00 Squad_Diary.GetMissResult(grdtlsptr[*currentptr],raidgroup,missString); s->SetString(missString); //RJS 9Nov00 //DeadCode RJS 09Nov00 s->SetString(RESLIST(MR_NULL,raidgroup->missresult)); //DeadCode JIM 13Oct00 int j = trg->PlayerStatus(); //DeadCode JIM 13Oct00 if ( (j == Target::TS_FLAG_UNKNOWN)) //DeadCode JIM 13Oct00 s->SetString(RESSTRING(TT_UNKNOWN)); //DeadCode JIM 13Oct00 else //DeadCode JIM 13Oct00 { //DeadCode JIM 13Oct00 if (j >= Target::TS_NEARLYDESTROYED) j = 3; //DeadCode JIM 13Oct00 elseif (j>Target::TS_BADDAMAGE) j=2; //DeadCode JIM 13Oct00 elseif (j>Target::TS_LIGHTDAMAGE) j=1; //DeadCode JIM 13Oct00 else j=0; //DeadCode JIM 13Oct00 s->SetString(RESLIST(UNDAMAGED, j)); //DeadCode JIM 13Oct00 } } s=GETDLGITEM(IDC_RSTATICTASK); s->SetString(RESLIST(MT_RAID, raidgroup->misstype)); s=GETDLGITEM(IDC_RSTATICTIME); if (raidgroup->targettime) //RJS 4Sep00 theTime = raidgroup->targettime; //RJS 4Sep00 //RJS 4Sep00 theTime/=60; //RJS 4Sep00 s->SetString(CSprintf("%02i:%02i",theTime/60,theTime%60)); //RJS 4Sep00 s=GETDLGITEM(IDC_RSTATICAIRCRAFT); Squadron* sq = Node_Data[*grnumptr]; s->SetString(RESLIST(SPIT_A, sq->AcType())); } s=GETDLGITEM(IDC_RSTATICDAMAGED); s->SetString(CSprintf("%i",grdtlsptr[*currentptr]->numacdamaged)); s=GETDLGITEM(IDC_RSTATICDESTROYED); s->SetString(CSprintf("%i",grdtlsptr[*currentptr]->numlosses)); s=GETDLGITEM(IDC_RSTATICAIRCREW); s->SetString(CSprintf("%i",grdtlsptr[*currentptr]->numpilotslost)); }else { s=GETDLGITEM(IDC_RSTATICDIARYDATE); s->SetString(""); s=GETDLGITEM(IDC_RSTATICTASK); s->SetString(""); s=GETDLGITEM(IDC_RSTATICTIME); s->SetString(""); s=GETDLGITEM(IDC_RSTATICAIRCRAFT); s->SetString(""); s=GETDLGITEM(IDC_RSTATICRESULT); s->SetString(""); s=GETDLGITEM(IDC_RSTATICTARGET); s->SetString(""); s=GETDLGITEM(IDC_RSTATICMAIN); s->SetString(""); s=GETDLGITEM(IDC_RSTATICDETACHED); s->SetString(""); s=GETDLGITEM(IDC_RSTATICATTACHED); s->SetString(""); s=GETDLGITEM(IDC_RSTATICPERSONNEL); s->SetString(""); s=GETDLGITEM(IDC_RSTATICDAMAGED); s->SetString(""); s=GETDLGITEM(IDC_RSTATICDESTROYED); s->SetString(""); s=GETDLGITEM(IDC_RSTATICAIRCREW); s->SetString(""); } RefreshButtons(); }
BOOL CRIP_List::OnInitDialog() { CDialog::OnInitDialog(); RDialog* parent=(RDialog*)GetParent(); // parent->SetMaxSize(CRect(0,0,350,350)); CRStatic* s; s=GETDLGITEM(IDC_RIPDATE); s->SetString(GetDateName(MMC.ripdate, DATE_LONG)); // s->SetString(cdate); CRListBox* rlistbox; rlistbox=GETDLGITEM(IDC_RLISTBOXCTRL1); rlistbox->Clear(); rlistbox->AddColumn(150); rlistbox->AddColumn(60); rlistbox->AddColumn(70); rlistbox->AddColumn(50); rlistbox->AddString(RESSTRING(NAME),0); rlistbox->AddString(RESSTRING(KILLS),1); rlistbox->AddString(RESSTRING(DATE),2); rlistbox->AddString(RESSTRING(STATUS),3); char buffer[10]; int i = MMC.nextdeadpilot - 1; while (i >= 0) { rlistbox->AddString( MakePilotName(MMC.dead_pilots[i].name),0); _itoa(MMC.dead_pilots[i].kills,buffer,10); rlistbox->AddString((buffer),1); rlistbox->AddString(GetDateName(MMC.dead_pilots[i].lastdate, DATE_SHORT),2); rlistbox->AddString(RESLIST(NOTFLYING,MMC.dead_pilots[i].status),3); i--; } i = CASUALTYLIST-1; while (i >= MMC.nextdeadpilot) { if (MMC.dead_pilots[i].lastdate != 0) { rlistbox->AddString( MakePilotName(MMC.dead_pilots[i].name),0); _itoa(MMC.dead_pilots[i].kills,buffer,10); rlistbox->AddString((buffer),1); rlistbox->AddString(GetDateName(MMC.dead_pilots[i].lastdate, DATE_SHORT),2); rlistbox->AddString(RESLIST(NOTFLYING,MMC.dead_pilots[i].status),3); } i--; } // rlistbox->AddString("20/2/51",0); // rlistbox->AddString("20/2/51",0); // rlistbox->AddString("20/2/51",0); // rlistbox->AddString("M.I.A",1); // rlistbox->AddString("W.I.A",1); // rlistbox->AddString("K.I.A",1); // rlistbox->AddString("Blah Blah",2); // rlistbox->AddString("Blah Blah",2); // rlistbox->AddString("Blah Blah",2); return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE }
BOOL AirfieldDetails::OnInitDialog() { CDialog::OnInitDialog(); TargetFighterField* af; af = Node_Data[afuid]; CRStatic* s; s= GETDLGITEM(IDC_RSTATICSECTOROPS); TargetSectorField* sectorfield = af->getsectoraf(); UniqueID uid = sectorfield->primarycontrolcentre; TargetGroup* sector; sector = Node_Data[uid]; if ((sector) && (sector->truestatus >= Target::TS_DESTROYED)) uid = sectorfield->secondarycontrolcentre; s->SetString(GetTargName(uid)); UByte damage; s= GETDLGITEM(IDC_RSTATICREFUEL); damage = af->subdamagelevels[TargetFighterField::SDL_FUEL]; damage = damage/25; if (damage >3) damage = 3; #ifndef NDEBUG #define SHOWNUMDEBUG(val) +CSprintf(" (%i%%)",val) #else #define SHOWNUMDEBUG(val) #endif s->SetString(RESLIST(UNDAMAGED,damage) SHOWNUMDEBUG(af->subdamagelevels[TargetFighterField::SDL_FUEL])); s= GETDLGITEM(IDC_RSTATICREPAIR); damage = af->subdamagelevels[TargetFighterField::SDL_REPAIR]; damage = damage/25; if (damage >3) damage = 3; s->SetString(RESLIST(UNDAMAGED,damage) SHOWNUMDEBUG(af->subdamagelevels[TargetFighterField::SDL_REPAIR])); s= GETDLGITEM(IDC_RSTATICFIELD); damage = af->subdamagelevels[TargetFighterField::SDL_RUNWAY]; damage = damage/25; if (damage >3) damage = 3; s->SetString(RESLIST(UNDAMAGED,damage) SHOWNUMDEBUG(af->subdamagelevels[TargetFighterField::SDL_RUNWAY])); s= GETDLGITEM(IDC_RSTATICSTAFF); damage = af->subdamagelevels[TargetFighterField::SDL_STAFF]; damage = damage/25; if (damage >3) damage = 3; s->SetString(RESLIST(UNDAMAGED,damage) SHOWNUMDEBUG(af->subdamagelevels[TargetFighterField::SDL_STAFF])); //DeadCode JIM 20Oct00 int ac = 16; s= GETDLGITEM(IDC_RSTATICMAXSQUAD); s->SetString(CSprintf("%i", af->maxsquads)); int k=0, spitsq = 0, hurrsq = 0; while (Node_Data.squadron[k].squadron != SQ_ZERO) { if (Node_Data.squadron[k].homeairfield == afuid) { BritSquadron* sq = Node_Data.squadron[k]; PlaneTypeSelect type = sq->AcType(); if ( (type == PT_SPIT_A) || (type == PT_SPIT_B) ) spitsq++; else hurrsq++; } k++; } s= GETDLGITEM(IDC_RSTATICSPITSQUAD); s->SetString(CSprintf("%i", spitsq)); s= GETDLGITEM(IDC_RSTATICHURRSQUAD); s->SetString(CSprintf("%i", hurrsq)); CString notes=""; for (int pack = Profile::MAX_PACKS-1,lines=3;lines>0 && pack>=0;pack--) { if (Todays_Packages.pack[pack].packagestatus!=Profile::PS_SPARE) { Profile *pk = &Todays_Packages.pack[pack]; bool packfound; if (pk->raidnumentries[0].raidnum) for(int targetnum = 0;(pk->packagetarget[targetnum].currentid);targetnum++ ) { packfound=false; if (pk->packagetarget[targetnum].currentid == afuid) packfound=true; else if (pk->packagetarget[targetnum].currentid <= SagBANDEND) { int tp,ts; if (Todays_Packages.GetACSquadEntry(pk->packagetarget[targetnum].currentid,tp,ts)) if (Todays_Packages[tp].SquadTarget(ts)==afuid) packfound=true; } if (packfound) { notes=CString(" ")+ RESLIST(AM_PATROL,pk->attackmethod)+": "+RESLIST(PS_SPARE,pk->packagestatus)+"\n"+notes; lines--; } } } } s= GETDLGITEM(IDC_DOSSNOTES); #ifndef NDEBUG notes+=CSprintf("Damage Levels: True: %i%% LWIntel: %i%%\n",af->truestatus,af->knownstatus); #endif if (notes!="") s->SetString(RESSTRING(MISSIONS)+":\n"+notes); else s->SetString(notes); return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE }
void RAFDiaryList::Refresh() { //DEADCODE 10/02/00 FindDetails(); CRRadio* pradio; pradio=GETDLGITEM(IDC_RRADIODISPLAY); pradio->AddButton(RESSTRING(VIEWSINGLE)); pradio->AddButton(RESSTRING(ALL)); pradio->SetCurrentSelection(1); CRListBox* rlistbox; rlistbox=GETDLGITEM(IDC_RLISTBOXCTRL1); rlistbox->Clear(); rlistbox->AddColumn(100); rlistbox->AddColumn(1); rlistbox->AddColumn(60); rlistbox->AddColumn(60); rlistbox->AddColumn(70); rlistbox->AddColumn(TARGETFIELDWIDTH+50); //RDH 02/06/99 rlistbox->AddColumn(60); rlistbox->AddString(RESSTRING(DATE),0); rlistbox->AddString("",1); rlistbox->AddString(RESSTRING(SIZE),2); rlistbox->AddString(RESSTRING(TO),3); rlistbox->AddString(RESSTRING(MISSION),4); rlistbox->AddString(RESSTRING(TARGET),5); rlistbox->AddString(RESSTRING(TALLY),6); Diary::RaidGroup* raidgroup; Diary::Intercept* intercept; Diary::Squadron* sqentry; int i = 0; while ( (i < RAFDiary::MAX_SQDETAILS) && (sqdtlsptr[i])) { sqentry = (Diary::Squadron*)sqdtlsptr[i]; intercept = Squad_Diary.GetIntercept(sqdtlsptr[i]); if (intercept) { raidgroup = Squad_Diary.GetRaidGroup(intercept); //date if (raidgroup) { Diary::RaidPack* raidpack = Squad_Diary.GetRaidPack(raidgroup); if (raidpack) rlistbox->AddString(GetDateName(raidpack->date * SECSPERDAY, DATE_LONG),0); } //TIME! NOT raid //DeadCode JIM 15Oct00 char* raidletter="F%03i"; //DeadCode JIM 15Oct00 rlistbox->AddString(GetTimeName(intercept->takeofftime),1); //DEADCODE RDH 15/05/00 rlistbox->AddString(CSprintf("F%i", intercept->diaryraidindex),1); //size rlistbox->AddString(CSprintf("%i",sqentry->noaclaunched),2); //to int t=intercept->takeofftime/60; rlistbox->AddString(CSprintf("%02i:%02i",t/60,t%60),3); //mission int cnt = int(!intercept->waspatrolinitially); //RJS 29Aug00 rlistbox->AddString(RESLIST(AM_PATROL, cnt),4); //target if(!intercept->interceptloc) rlistbox->AddString(RESSTRING(DASH),5); //tally int kills = 0; for (int k = 0; k < 5; k++) kills += sqentry->kills[k]; rlistbox->AddString(CSprintf("+%i -%i", kills, sqdtlsptr[i]->numlosses),6); } i++; } rlistbox->SetHilightRow(*currentptr+1); }
void Geschwader::RefreshLW() { CRListBox* rlistbox; rlistbox=GETDLGITEM(IDC_RLISTBOXCTRL1); rlistbox->Clear(); rlistbox->AddColumn(100); rlistbox->AddColumn(40); rlistbox->AddColumn(40); rlistbox->AddColumn(60); rlistbox->AddColumn(100); rlistbox->AddColumn(40); rlistbox->AddColumn(40); rlistbox->AddColumn(40); rlistbox->AddString(RESSTRING(LUFTFLOTTE2),0); rlistbox->AddString("I",1); rlistbox->AddString("II",2); rlistbox->AddString("III",3); rlistbox->AddString(RESSTRING(LUFTFLOTTE3),4); rlistbox->AddString("I",5); rlistbox->AddString("II",6); rlistbox->AddString("III",7); FindGeschwader(); for(int flotte = 0; flotte <2;flotte++) for (int name = 0; name <MAX_GESCH; name++) { CString string; if(geschwaderarray[flotte][geschwadertype][name] != -1) { int wader = geschwaderarray[flotte][geschwadertype][name]; int wadernum = Node_Data.geschwader[wader].wadernum; //CSprintf("%i", wadernum) if (Node_Data.geschwader[wader].reconn) string = CSprintf("%s%i<%s>", RESLIST(J, Node_Data.geschwader[wader].wadername), wadernum, RESLIST(SPIT_A,Node_Data.geschwader[wader].aircrafttype)); else string = CSprintf("%s%i(%s)", RESLIST(J, Node_Data.geschwader[wader].wadername), wadernum, RESLIST(SPIT_A,Node_Data.geschwader[wader].aircrafttype)); rlistbox->AddString(string,flotte*4); int i = 0, numsquad = 0; int sq, w; while (Node_Data.gruppe[i].squadron != SQ_ZERO) { sq = Node_Data.gruppe[i].squadron; w =Node_Data.gruppe[i].wadernum; if (Node_Data.gruppe[i].wadernum == wader) { string = CSprintf("%i", Node_Data.gruppe[i].acavail); if (Node_Data.gruppe[i].periodsuntilready == Gruppen::BUSY_IN_EUROPE) rlistbox->AddString("",flotte*4+numsquad+1); else if (Node_Data.gruppe[i].periodsuntilready == 0) rlistbox->AddString(string,flotte*4+numsquad+1); else rlistbox->AddString(CSprintf("(%s)", string),flotte*4+numsquad+1); numsquad++; } i++; } } } }
void LWTaskFighter::Refresh() { CRStatic* s; PackageList::AMType* amtype; switch (attackmethod) { case Profile::AM_DETACHED: { amtype = &Todays_Packages.taskdata.detached; tab = 3; break; } case Profile::AM_ATTACHED: { amtype = &Todays_Packages.taskdata.attached; tab = 2; break; } case Profile::AM_RETURNESCORT: { amtype = &Todays_Packages.taskdata.returned; tab = 4; break; } default_neverreferenced; } s=GETDLGITEM(IDC_RSTATICFIGHTERSALLOCATED); CString string = RESSTRING(AIRCRAFT); int acnum; if (amtype->acnum == 1) acnum = 1; else if (amtype->acnum > 1) { acnum = amtype->acnum; string = RESSTRING(AIRCRAFT_PLURAL); }else { acnum = amtype->squadnum; if (acnum < 2) string = RESSTRING(STAFFEL); else if (acnum <3) string = RESSTRING(L_STAFFELN); else if (acnum <6) { acnum = acnum/3; string = RESSTRING(GRUPPE); }else if (acnum <18) { acnum = acnum/3; string = RESSTRING(GRUPPEN); }else { acnum = acnum/9; string = RESSTRING(GESCHWADER); } } s->SetString(CSprintf("%i %s", acnum, string)); CRCombo* combo; int form = (amtype->formtype & FORMTYPE_SQUAD)>>FORMTYPE_SQUAD_SH; if (form > 6) form = 6; if (form < 0) form = 0; combo=GETDLGITEM(IDC_RCOMBOFORMATION); combo->Clear()->RESCOMBO(AUTO,1)-> SetIndex(0); //DeadCode JIM 14Nov00 combo->Clear()->RESCOMBO(ECHELONL,7)-> SetIndex(form); combo=GETDLGITEM(IDC_RCOMBOUNITTYPE); combo->Clear()->RESCOMBO(GESCHWADER,3)-> SetIndex(unitdisplaylevel); CRListBox* rlistbox; rlistbox=GETDLGITEM(IDC_RLISTBOXCTRL1); rlistbox->Clear(); rlistbox->AddColumn(120); rlistbox->AddColumn(TARGETFIELDWIDTH); //RDH 02/06/99 rlistbox->AddColumn(80); rlistbox->AddString(RESSTRING(UNIT),0); rlistbox->AddString(RESSTRING(TARGET),1); rlistbox->AddString(RESSTRING(STATUS),2); if (attackmethod == Profile::AM_DETACHED) { GETDLGITEM(IDC_RSTATICCTRL00)->SetString(RESSTRING(L_CEILING)); GETDLGITEM(IDC_RSTATICCTRL01)->SetString(RESSTRING(LHIGH)); GETDLGITEM(IDC_RSTATICCTRL02)->SetString(RESSTRING(FORWARDHIGH)); GETDLGITEM(IDC_RSTATICCTRL03)->SetString(RESSTRING(FORWARD)); GETDLGITEM(IDC_RSTATICCTRL04)->SetString(RESSTRING(FORWARDLOW)); GETDLGITEM(IDC_RSTATICCTRL05)->SetString(RESSTRING(LATE)); }else { GETDLGITEM(IDC_RSTATICCTRL00)->SetString(RESSTRING(BEHIND)); GETDLGITEM(IDC_RSTATICCTRL01)->SetString(RESSTRING(INFRONT)); GETDLGITEM(IDC_RSTATICCTRL02)->SetString(RESSTRING(PORT)); GETDLGITEM(IDC_RSTATICCTRL03)->SetString(RESSTRING(STARBOARD)); GETDLGITEM(IDC_RSTATICCTRL04)->SetString(RESSTRING(ABOVE)); GETDLGITEM(IDC_RSTATICCTRL05)->SetString(RESSTRING(BELOW)); } { for (int i=1; i< PackageList::MAX_METHODS-1;i++) { CRButton* b = GETDLGITEM(IDC_TICK1+i-1); b->SetPressed(amtype->attackmethods[i]); } } Profile& pk = Todays_Packages.pack[Todays_Packages.hipack]; CRButton* b = GETDLGITEM(IDC_STRAFTARGET); //DEADCODE RDH 02/04/00 straf = false; //DEADCODE RDH 02/04/00 for (int num=pk.squadlist.Max()-1;num>=0;num--) //DEADCODE RDH 02/04/00 if ( ((pk.squadlist[num].method&Profile::AM_GROUPMASK)==attackmethod) //DEADCODE RDH 02/04/00 && (pk.squadlist[num].submethod == Profile::SM_DOSTRAFFEGROUND) //DEADCODE RDH 02/04/00 ) //DEADCODE RDH 02/04/00 straf = true; //DEADCODE RDH 02/04/00 b->SetPressed(straf); //DEADCODE RDH 02/04/00 b->SetPressed(pk.StraffRequired(attackmethod)); int i=0; //DEADCODE 15/02/00 maxunits = 0; //DEADCODE 15/02/00 while (i < pk.squadlist) //DEADCODE 15/02/00 { //DEADCODE 15/02/00 int am = pk[i].method; //DEADCODE 15/02/00 //DEADCODE 15/02/00 if (pk[i].method == attackmethod) //DEADCODE 15/02/00 { //DEADCODE 15/02/00 Squadron* sq = Node_Data[(SquadNum)pk[i].squadnum]; //DEADCODE 15/02/00 CString name = sq->ShortName() + "/"; //DEADCODE 15/02/00 name = name + sq->SubName(); //DEADCODE 15/02/00 rlistbox->AddString(name,0); //DEADCODE 15/02/00 rlistbox->AddString(GetTargName(pk.packagetarget[pk[i].targetindex].currentid),1); //DEADCODE 15/02/00 rlistbox->AddString(RESLIST(PS_SPARE,pk.packagestatus),2); //DEADCODE 15/02/00 maxunits++; //DEADCODE 15/02/00 } //DEADCODE 15/02/00 i++; //DEADCODE 15/02/00 } FillList(); if ((UnitList[0] >= 0) && (maxunits > 0)) { i = 0; UByte gruppennum; Gruppen* sq = Node_Data[(SquadNum)pk[UnitList[0]].squadnum]; gruppennum = (SquadNum)pk[UnitList[0]].squadnum; int staffel = 0; while (i < maxunits) { Gruppen* sq = Node_Data[(SquadNum)pk[UnitList[i]].squadnum]; CString name = sq->ShortName(); if (unitdisplaylevel != PackageList::DISPLAY_GESCHWADER) { name = name + "/" + sq->SubName(); } if (unitdisplaylevel == PackageList::DISPLAY_STAFFEL) { if (gruppennum == (SquadNum)pk[UnitList[i]].squadnum) staffel++; else { gruppennum = (SquadNum)pk[UnitList[i]].squadnum; staffel =1; } name = name + CSprintf(" (%i)", staffel + (sq->gruppennum*3)); } rlistbox->AddString(name,0); int ti=pk[UnitList[i]].targetindex; if (ti<0) ti=0; rlistbox->AddString(GetTargName(pk.packagetarget[ti].currentid),1); rlistbox->AddString(RESLIST(PS_SPARE,pk.packagestatus),2); i++; } } int maxsquad = Todays_Packages.SquadronsPlanned(NAT_LUF); if ( (Todays_Packages.taskdata.attached.maxac != -1) || ( (maxsquad < 93) ) ) rlistbox->AddString(RESSTRING(NEXTAVAILABLE),0); }
void LWTaskSummary::Refresh() { //DeadCode JIM 30Oct00 MakeFighterSpinLists(false); CRSpinBut* spinbut; //DEADCODE RDH 12/01/00 spinbut=GETDLGITEM(IDC_RSPINBUT_TARGETS); //DEADCODE RDH 12/01/00 spinbut->Clear()->MakeNumList(10,1,1)->SetIndex(Todays_Packages.taskdata.targetnum-1); //DEADCODE RDH 12/01/00 //DEADCODE RDH 12/01/00 spinbut=GETDLGITEM(IDC_RSPINBUT_PERCENTFIGHTERS); //DEADCODE RDH 12/01/00 int fighters = Todays_Packages.taskdata.acttached_no + Todays_Packages.taskdata.detached_no; //DEADCODE RDH 12/01/00 int percent = fighters/(fighters+Todays_Packages.taskdata.strike_no); //DEADCODE RDH 12/01/00 spinbut->Clear()->MakeNumList(100,0,1)->SetIndex(percent); CRStatic* s; s=GETDLGITEM(IDC_TARGETS); s->SetString(CSprintf("%i", Todays_Packages.taskdata.targetnum)); int fighters = Todays_Packages.taskdata.totalfighter.acnum; int fightersquads = Todays_Packages.taskdata.totalfighter.squadnum; //DEADCODE RDH 24/03/00 bool squads = false; //DEADCODE RDH 24/03/00 //DEADCODE RDH 24/03/00 if (Todays_Packages.taskdata.returned.acnum == -1) //DEADCODE RDH 24/03/00 { //DEADCODE RDH 24/03/00 fightersquads +=Todays_Packages.taskdata.returned.squadnum; //DEADCODE RDH 24/03/00 squads = true; //DEADCODE RDH 24/03/00 }else //DEADCODE RDH 24/03/00 fighters +=Todays_Packages.taskdata.returned.acnum; //DEADCODE RDH 24/03/00 //DEADCODE RDH 24/03/00 if (Todays_Packages.taskdata.attached.acnum == -1) //DEADCODE RDH 24/03/00 { //DEADCODE RDH 24/03/00 fightersquads +=Todays_Packages.taskdata.attached.squadnum; //DEADCODE RDH 24/03/00 squads = true; //DEADCODE RDH 24/03/00 }else //DEADCODE RDH 24/03/00 fighters +=Todays_Packages.taskdata.attached.acnum; //DEADCODE RDH 24/03/00 //DEADCODE RDH 24/03/00 if (Todays_Packages.taskdata.detached.acnum == -1) //DEADCODE RDH 24/03/00 { //DEADCODE RDH 24/03/00 fightersquads +=Todays_Packages.taskdata.detached.squadnum; //DEADCODE RDH 24/03/00 squads = true; //DEADCODE RDH 24/03/00 }else //DEADCODE RDH 24/03/00 fighters +=Todays_Packages.taskdata.detached.acnum; //DEADCODE RDH 24/03/00 //DEADCODE RDH 24/03/00 if (squads) //DEADCODE RDH 24/03/00 { //DEADCODE RDH 24/03/00 fighters = -1; //DEADCODE RDH 24/03/00 if (Todays_Packages.taskdata.returned.acnum > 0) //DEADCODE RDH 24/03/00 fightersquads ++; //DEADCODE RDH 24/03/00 //DEADCODE RDH 24/03/00 if (Todays_Packages.taskdata.attached.acnum > 0) //DEADCODE RDH 24/03/00 fightersquads ++; //DEADCODE RDH 24/03/00 //DEADCODE RDH 24/03/00 if (Todays_Packages.taskdata.detached.acnum > 0) //DEADCODE RDH 24/03/00 fightersquads ++; //DEADCODE RDH 24/03/00 } //DEADCODE RDH 04/04/00 int strikeac = Todays_Packages.taskdata.strike.realacnum; //DEADCODE RDH 04/04/00 int fighter_pc = fighters; //DEADCODE RDH 04/04/00 if ((strikeac == -1) || (fighters == -1)) //DEADCODE RDH 04/04/00 { //DEADCODE RDH 04/04/00 if (fightersquads <= 0) //DEADCODE RDH 04/04/00 fightersquads = 1; //DEADCODE RDH 04/04/00 if (strikesquads <= 0 ) //DEADCODE RDH 04/04/00 strikesquads = 1; //DEADCODE RDH 04/04/00 strike_pc = strikesquads; //DEADCODE RDH 04/04/00 fighter_pc = fightersquads; //DEADCODE RDH 04/04/00 } //DEADCODE RDH 04/04/00 int percent = 100* Todays_Packages.taskdata.totalfighter.realacnum /(Todays_Packages.taskdata.totalfighter.realacnum+Todays_Packages.taskdata.strike.realacnum); s=GETDLGITEM(IDC_PC_FIGHTERS); s->SetString(CSprintf("%i", percent)); //DeadCode JIM 30Oct00 if (fighters) //DeadCode JIM 30Oct00 { //DeadCode JIM 30Oct00 s=GETDLGITEM(IDC_PC_ATTACHED); //DeadCode JIM 30Oct00 s->SetString(CSprintf("%i", 100 * Todays_Packages.taskdata.attached.realacnum //DeadCode JIM 30Oct00 /Todays_Packages.taskdata.totalfighter.realacnum )); //DeadCode JIM 30Oct00 //DeadCode JIM 30Oct00 s=GETDLGITEM(IDC_PC_DETACHED); //DeadCode JIM 30Oct00 s->SetString(CSprintf("%i", 100 * Todays_Packages.taskdata.detached.realacnum //DeadCode JIM 30Oct00 /Todays_Packages.taskdata.totalfighter.realacnum )); //DeadCode JIM 30Oct00 //DeadCode JIM 30Oct00 s=GETDLGITEM(IDC_PC_RETURNING); //DeadCode JIM 30Oct00 s->SetString(CSprintf("%i", 100 * Todays_Packages.taskdata.returned.realacnum //DeadCode JIM 30Oct00 /Todays_Packages.taskdata.totalfighter.realacnum )); //DeadCode JIM 30Oct00 }else //DeadCode JIM 30Oct00 { //DeadCode JIM 30Oct00 s=GETDLGITEM(IDC_PC_ATTACHED); //DeadCode JIM 30Oct00 s->SetString(RESSTRING(NA)); //DeadCode JIM 30Oct00 //DeadCode JIM 30Oct00 s=GETDLGITEM(IDC_PC_DETACHED); //DeadCode JIM 30Oct00 s->SetString(RESSTRING(NA)); //DeadCode JIM 30Oct00 //DeadCode JIM 30Oct00 s=GETDLGITEM(IDC_PC_RETURNING); //DeadCode JIM 30Oct00 s->SetString(RESSTRING(NA)); //DeadCode JIM 30Oct00 //DeadCode JIM 30Oct00 } spinbut=GETDLGITEM(IDC_RSPINBUT_BOMBERS); spinbut->Clear(); int maxac =12; //..strike.maxac should either be <12 or -1. -1 means that we are counting in squads if (Todays_Packages.taskdata.strike.maxac != -1) maxac = Todays_Packages.taskdata.strike.maxac; //DeadCode JIM 16Oct00 if (maxac>12*3*3*5) //DeadCode JIM 16Oct00 maxac=12*3*3*5; int index = 0; int entry = 0; while (AcSpin[entry] <= maxac) { spinbut->AddString(CSprintf("%i %s", AcSpin[entry], RESSTRING(AIRCRAFT))); if ( (Todays_Packages.taskdata.strike.acnum != -1) && (Todays_Packages.taskdata.strike.acnum >= AcSpin[entry]) ) spinbut->SetIndex(index); index++; entry++; } if (Todays_Packages.taskdata.strike.maxac == -1) { entry = 0; if (Todays_Packages.taskdata.strike.maxsquad>3*3*5) //JIM 16Oct00 Todays_Packages.taskdata.strike.maxsquad=3*3*5; while (squadinfo[entry].numofsquads <= Todays_Packages.taskdata.strike.maxsquad) { spinbut->AddString(CSprintf("%i %s", squadinfo[entry].number, LoadResString(squadinfo[entry].name))); if ( (Todays_Packages.taskdata.strike.acnum == -1) && (Todays_Packages.taskdata.strike.squadnum >= squadinfo[entry].numofsquads) ) spinbut->SetIndex(index); entry++; index++; } } spinbut=GETDLGITEM(IDC_RSPINBUT_FIGHTERS); spinbut->Clear(); maxac =12; if (Todays_Packages.taskdata.attached.maxac != -1) maxac = Todays_Packages.taskdata.attached.maxac; index = 0; entry = 0; while (FighterSpin[entry] <= maxac) { spinbut->AddString(CSprintf("%i %s", FighterSpin[entry], RESSTRING(AIRCRAFT))); if ( (fighters != -1) && (fighters >= FighterSpin[entry]) ) { spinbut->SetIndex(index); oldindex = index; } index++; entry++; } if (Todays_Packages.taskdata.attached.maxac == -1) { entry = 0; while (squadinfo[entry].numofsquads <= Todays_Packages.taskdata.attached.maxsquad) { spinbut->AddString(CSprintf("%i %s", squadinfo[entry].number, LoadResString(squadinfo[entry].name))); if ( (fighters == -1) && (fightersquads >= squadinfo[entry].numofsquads) ) { spinbut->SetIndex(index); oldindex = index; } entry++; index++; } } CRCombo* combo; combo=GETDLGITEM(IDC_RCOMBOBOMBERTYPE); combo->Clear(); int i = 0; while ( i < PackageList::STRIKEOPTIONS) { if (Todays_Packages.taskdata.strikeactypes[i] != PackageList::NOTDEFINED) { if (Todays_Packages.taskdata.strikeactypes[i] == PackageList::MIXED) combo->AddString(RESSTRING(MIXED)); else combo->AddString(RESLIST(SPIT_A, Todays_Packages.taskdata.strikeactypes[i])); } i++; }; combo->SetIndex(0); combo=GETDLGITEM(IDC_RCOMBOFIGHTERTYPE); if (fighters) { combo->Clear(); int i = 0; while ( ( i < PackageList::ESCORTOPTIONS) && (Todays_Packages.taskdata.escortactypes[i] != PackageList::NOTDEFINED) ) { if (Todays_Packages.taskdata.escortactypes[i] == PackageList::MIXED) combo->AddString(RESSTRING(MIXED)); else combo->AddString(RESLIST(SPIT_A, Todays_Packages.taskdata.escortactypes[i])); i++; }; combo->SetIndex(0); }else { combo->Clear()->SetList(IDS_NO_AIRCRAFT,1)-> SetIndex(0); } }
void PilotLogBook::LWRefreshList() { CRListBox* rlistbox; rlistbox=GETDLGITEM(IDC_RLISTBOXCTRL1); //DeadCode RDH 31Oct00 rlistbox->AddString("",0); rlistbox->Clear(); //rlistbox->AddColumn(70); //rlistbox->AddColumn(60); //RDH 02/06/99 //rlistbox->AddColumn(80); //RDH 02/06/99 //rlistbox->AddColumn(90); //RDH 02/06/99 //rlistbox->AddColumn(280); //rlistbox->AddColumn(45); //RDH 02/06/99 //DeadCode JIM 18Oct00 rlistbox->AddColumn(30); //RDH 02/06/99 rlistbox->AddString(RESSTRING(DATE),0); rlistbox->AddString(RESSTRING(HOUR),1); rlistbox->AddString(RESSTRING(ACTYPE),2); rlistbox->AddString(RESSTRING(DUTY),3); rlistbox->AddString(RESSTRING(REMARKS),4); rlistbox->AddString(RESSTRING(CLAIMS),5); //DeadCode JIM 18Oct00 rlistbox->AddString(RESSTRING(FLYINGHOURS),6); Diary::Player* pptr; //TEMPCODE RDH 05/04/00 //###temp //TEMPCODE RDH 05/04/00 int pack=0; //TEMPCODE RDH 05/04/00 while ( pack < Profile::MAX_PACKS) //TEMPCODE RDH 05/04/00 { //TEMPCODE RDH 05/04/00 if (Todays_Packages.pack[pack].packagestatus!=Profile::PS_SPARE) //TEMPCODE RDH 05/04/00 { //TEMPCODE RDH 05/04/00 Profile& pk = Todays_Packages.pack[pack]; //TEMPCODE RDH 05/04/00 if (pk.attackmethod >= Profile::AM_LWPACKS) //TEMPCODE RDH 05/04/00 break; //TEMPCODE RDH 05/04/00 } //TEMPCODE RDH 05/04/00 pack++; //TEMPCODE RDH 05/04/00 } //TEMPCODE RDH 05/04/00 RDialog::m_pView->SetHiLightInfo(pack, 0,UID_Null); //TEMPCODE RDH 05/04/00 //TEMPCODE RDH 05/04/00 if (Todays_Packages[pack][0].diaryentry == -1) //RJS 27Jan00 //TEMPCODE RDH 05/04/00 Squad_Diary.CreateEntry(Todays_Packages,pack); //RJS 27Jan00 //TEMPCODE RDH 05/04/00 //TEMPCODE RDH 05/04/00 Squad_Diary.CreatePlayer(Todays_Packages); //RJS 27Jan00 //TEMPCODE RDH 05/04/00 pptr = Squad_Diary.GetFirstPlayer(); //TEMPCODE RDH 05/04/00 pptr->howendedmission = EFS_LandedOK; //TEMPCODE RDH 05/04/00 //###end temp pptr = Squad_Diary.GetFirstPlayer(); while(pptr) { SquadronBase* squad = Squad_Diary.GetSquadron(pptr); if (squad) { Diary::RaidGroup* raidgroup; Diary::RaidPack* raidpack; raidgroup = Squad_Diary.GetRaidGroup(squad); if (raidgroup) { raidpack = Squad_Diary.GetRaidPack(raidgroup); if (raidpack) { //date rlistbox->AddString(GetDateName(raidpack->date * SECSPERDAY, DATE_LONG),0); int t=raidgroup->targettime/60; rlistbox->AddString(CSprintf("%02i:%02i",t/60,t%60),1); Squadron* sq = Node_Data[(SquadNum)squad->squadnum]; rlistbox->AddString(RESLIST(SPIT_A, sq->AcType()),2); rlistbox->AddString(RESLIST(MT_RAID, raidgroup->misstype),3); CString remarkstring; //RJS 9Nov00 //RJS 9Nov00 pptr->DamageReport(remarkstring); //RJS 9Nov00 //RJS 9Nov00 rlistbox->AddString(remarkstring,4); //RJS 9Nov00 //DeadCode RJS 9Nov00 bool acdamage = false; //DeadCode RJS 9Nov00 int maxdam = 0, maxdamtype; //DeadCode RJS 9Nov00 for(int i = 0; i < DIARY_MAXDAMAGE; i++) //DeadCode RJS 9Nov00 if (pptr->specificdamage[i] >50) //DeadCode RJS 9Nov00 { //DeadCode RJS 9Nov00 acdamage = true; //DeadCode RJS 9Nov00 if (pptr->specificdamage[i] > maxdam) //DeadCode RJS 9Nov00 { //DeadCode RJS 9Nov00 maxdam = pptr->specificdamage[i]; //DeadCode RJS 9Nov00 maxdamtype = i; //DeadCode RJS 9Nov00 } //DeadCode RJS 9Nov00 } //DeadCode RJS 9Nov00 //DeadCode RJS 9Nov00 if ( acdamage //RJS 9Nov00 //DeadCode RJS 9Nov00 && (pptr->howendedmission < EFS_BadCrashAF) ) //RJS 9Nov00 //DeadCode RJS 9Nov00 { //DeadCode RJS 9Nov00 if (maxdam < 200) //DeadCode RJS 9Nov00 rlistbox->AddString(RESLIST(DIARYDAM_LEFTWING, maxdamtype),4); //RJS 9Nov00 //DeadCode RJS 9Nov00 else //DeadCode RJS 9Nov00 rlistbox->AddString(RESLIST(DIARYDEST_LEFTWING, maxdamtype),4); //RJS 9Nov00 //DeadCode RJS 9Nov00 //DeadCode RJS 9Nov00 }else //DeadCode RJS 9Nov00 rlistbox->AddString(RESLIST(EFS_NULL, pptr->howendedmission),4); int kills = pptr->kills[0] + pptr->kills[1]; rlistbox->AddString(CSprintf("%i", kills),5); } } } pptr = Squad_Diary.GetNextPlayerAll(pptr); } }
BOOL CWeather::OnInitDialog() { CDialog::OnInitDialog(); RDialog* parent=(RDialog*)GetParent(); // parent->SetMaxSize(CRect(0,0,350,430)); // parent->SetMinSize(CRect(0,0,150,150)); CRStatic* s=GETDLGITEM(IDC_CONDITIONS); s->SetString(RESLIST(CLEAR,MMC.Sky.Conditions)); s=GETDLGITEM(IDC_SPECIALNOTES); if (MMC.Sky.MistInValley) s->SetString(RESSTRING(MISTINVALLEYS)); else s->SetString(RESSTRING(NONE_SPECIALS)); s=GETDLGITEM(IDC_GUSTS); int mag = MMC.Sky.MaxMagnitude; if (mag > 2) mag = 2; s->SetString(RESLIST(LIGHT,mag)); s=GETDLGITEM(IDC_VISIBILITY); int v = 0.5 + MMC.Sky.Visibility/(30.48*6080); s->SetString(CSprintf("%i", v)); s=GETDLGITEM(IDC_TEMPERATURE); int t = MMC.Sky.Temp0 - 272.65; s->SetString(CSprintf("%i", t)); s=GETDLGITEM(IDC_PRESSURE); int p = (MMC.Sky.Press0 + 0.5); s->SetString(CSprintf("%i", p)); s=GETDLGITEM(IDC_CLOUDLAYER); t= MMC.Sky.CloudLayer/30.48; s->SetString(CSprintf("%i", t)); s=GETDLGITEM(IDC_CONTRAIL_BASE); t = MMC.Sky.ContrailBandCentre - MMC.Sky.ContrailBandWidth/2; t = t/30.48; s->SetString(CSprintf("%i", t)); s=GETDLGITEM(IDC_CONTRAIL_TOP); t = MMC.Sky.ContrailBandCentre + MMC.Sky.ContrailBandWidth/2; t = t/30.48; s->SetString(CSprintf("%i", t)); s=GETDLGITEM(IDC_WINDSPEED0); t = MMC.Sky.wind0; s->SetString(CSprintf("%i", t)); s=GETDLGITEM(IDC_WINDDIRECTION0); t = MMC.Sky.dir0; s->SetString(CSprintf("%i", t)); s=GETDLGITEM(IDC_WINDSPEED1); t = MMC.Sky.windalt; s->SetString(CSprintf("%i", t)); s=GETDLGITEM(IDC_WINDDIRECTION1); t = MMC.Sky.diralt; s->SetString(CSprintf("%i", t)); // CRect rect; // parent->GetParent()->GetWindowRect(rect); // GetClientRect(rect); // parent->SetMaxSize(CRect(0,0,rect.Width(),rect.Height())); return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE }
void CMainFrame::UpdateToolbars(bool hideall) { for (int t=0,i=0;t<TB_TOTAL;t++) { if (toolbars[t]) if (hideall) toolbars[t]->ReAttach(false,false); else if (Save_Data.toolbars[ToolBars(t)]) toolbars[t]->ReAttach(true,false,i++); else toolbars[t]->ReAttach(false,false); } //DeadCode MS 21Nov00 __asm {int 3 //DeadCode MS 21Nov00 }; RecalcLayout(); //DeadCode MS 21Nov00 __asm {int 3 //DeadCode MS 21Nov00 }; MainToolBar().TailorHints(); //DeadCode MS 21Nov00 __asm {int 3 //DeadCode MS 21Nov00 }; m_toolbar3.m_dialids[m_toolbar3.DIRECTIVESTOGGLE].SetPressed(!MMC.directivespopup); m_toolbar3.m_dialids[m_toolbar3.DIRECTIVESTOGGLE].SetHintString(RESSTRING(DIRECTIVES)+": "+RESLIST(OFF,!MMC.directivespopup)); //DEADCODE RDH 08/11/99 #ifndef BOB_DEMO_VER //DEADCODE RDH 08/11/99 if (m_oldindebrief==MMC.indebrief) return; //DEADCODE RDH 08/11/99 m_oldindebrief=MMC.indebrief; //DEADCODE RDH 08/11/99 if (MMC.indebrief)// && m_toolbar2.IsWindowVisible()) //DEADCODE RDH 08/11/99 { //DEADCODE RDH 08/11/99 m_toolbar5.ShowWindow(SW_SHOW); //DEADCODE RDH 08/11/99 m_toolbar2.Replace(&m_toolbar5); //DEADCODE RDH 08/11/99 } //DEADCODE RDH 08/11/99 else// if (!MMC.indebrief && m_toolbar5.IsWindowVisible()) //DEADCODE RDH 08/11/99 { //DEADCODE RDH 08/11/99 m_toolbar2.ShowWindow(SW_SHOW); //DEADCODE RDH 08/11/99 m_toolbar5.Replace(&m_toolbar2); //DEADCODE RDH 08/11/99 } //DEADCODE RDH 08/11/99 #endif }
BOOL CWeather::OnInitDialog() { CDialog::OnInitDialog(); //DeadCode JIM 20Oct00 RDialog* parent=(RDialog*)GetParent(); // parent->SetMaxSize(CRect(0,0,350,430)); // parent->SetMinSize(CRect(0,0,150,150)); if (!Node_Data.GotBadWeatherPeriod()) { CRStatic* s; bool layerpresent = false; int index = 0; SLong lowalt = 0x7ffffff; for (int i =0; i < 3; i++) { if (MMC.Sky.Layer[i].Cover >= 32) { layerpresent = true; s=GETDLGITEM(IDC_CLOUD_0+index); index ++; if (MMC.Sky.Layer[i].AltBase < lowalt) lowalt = MMC.Sky.Layer[i].AltBase; int alt= (MMC.Sky.Layer[i].AltBase*10)/Save_Data.alt.mediummm; alt = 100*((alt + 50)/100); s->SetString(CSprintf("%i%s (%i/8)", alt,LoadResString(Save_Data.alt.mediumabbr), MMC.Sky.Layer[i].Cover/32)); } } if (!layerpresent) { s=GETDLGITEM(IDC_CLOUD_0); s->SetString(RESSTRING(NONE)); index ++; } for (index; index < 3; index++) { s=GETDLGITEM(IDC_CLOUD_0+index); s->SetString(""); } s=GETDLGITEM(IDC_CONDITIONS); if (layerpresent) { if ( lowalt < FT_5000) s->SetString(RESSTRING(OVERCAST)); else if ( lowalt < FT_10000) s->SetString(RESSTRING(LOWCLOUD)); else s->SetString(RESSTRING(CLOUDY)); }else { if (MMC.Sky.FluffyCloud.Cover > 32) s->SetString(RESSTRING(PATCHYCLOUD)); else s->SetString(RESSTRING(L_CLEAR)); } //DEADCODE RDH 25/02/00 //DEADCODE RDH 25/02/00 s=GETDLGITEM(IDC_SPECIALNOTES); //DEADCODE RDH 25/02/00 if (MMC.Sky.MistInValley) //DEADCODE RDH 25/02/00 s->SetString(RESSTRING(MISTINVALLEYS)); //DEADCODE RDH 25/02/00 else //DEADCODE RDH 25/02/00 s->SetString(RESSTRING(NONE_SPECIALS)); s=GETDLGITEM(IDC_GUSTS); int mag = MMC.Sky.MaxMagnitude; if (mag > 2) mag = 2; s->SetString(RESLIST(LIGHT,mag)); //DEADCODE RDH 25/02/00 s=GETDLGITEM(IDC_VISIBILITY); //DEADCODE RDH 25/02/00 int v = 0.5 + MMC.Sky.Visibility/(30.48*6080); //DEADCODE RDH 25/02/00 s->SetString(CSprintf("%i", v)); s=GETDLGITEM(IDC_TEMPERATURE); int t = MMC.Sky.Temp0 - 272.65; s->SetString(CSprintf("%i", t)); s=GETDLGITEM(IDC_PRESSURE); int p = (MMC.Sky.Press0 + 0.5); s->SetString(CSprintf("%i", p)); //DEADCODE RDH 25/02/00 s=GETDLGITEM(IDC_CONTRAIL_BASE); //DEADCODE RDH 25/02/00 t = MMC.Sky.ContrailBandCentre - MMC.Sky.ContrailBandWidth/2; //DEADCODE RDH 25/02/00 t = t/30.48; //DEADCODE RDH 25/02/00 s->SetString(CSprintf("%i", t)); //DEADCODE RDH 25/02/00 //DEADCODE RDH 25/02/00 s=GETDLGITEM(IDC_CONTRAIL_TOP); //DEADCODE RDH 25/02/00 t = MMC.Sky.ContrailBandCentre + MMC.Sky.ContrailBandWidth/2; //DEADCODE RDH 25/02/00 t = t/30.48; //DEADCODE RDH 25/02/00 s->SetString(CSprintf("%i", t)); s=GETDLGITEM(IDC_WINDSPEED0); t = MMC.Sky.wind0; s->SetString(CSprintf("%i", t)); s=GETDLGITEM(IDC_WINDDIRECTION0); t = MMC.Sky.dir0; s->SetString(CSprintf("%i", t)); s=GETDLGITEM(IDC_WINDSPEED1); t = MMC.Sky.windalt; s->SetString(CSprintf("%i", t)); s=GETDLGITEM(IDC_WINDDIRECTION1); t = MMC.Sky.diralt; s->SetString(CSprintf("%i", t)); } else { GETDLGITEM(IDC_CLOUD_0)->SetString(CSprintf("%i%s (%i/8)", 1000,LoadResString(Save_Data.alt.mediumabbr), 7)); for (int index=1; index < 3; index++) { GETDLGITEM(IDC_CLOUD_0+index)->SetString(""); } GETDLGITEM(IDC_CONDITIONS)->SetString(RESSTRING(OVERCAST)); GETDLGITEM(IDC_GUSTS)->SetString(RESLIST(LIGHT,2)); GETDLGITEM(IDC_TEMPERATURE)->SetString(CSprintf("%i", 10)); GETDLGITEM(IDC_PRESSURE)->SetString(CSprintf("%i", 970)); GETDLGITEM(IDC_WINDSPEED0)->SetString(CSprintf("%i", 25)); GETDLGITEM(IDC_WINDDIRECTION0)->SetString(CSprintf("%i", MMC.Sky.dir0)); GETDLGITEM(IDC_WINDSPEED1)->SetString(CSprintf("%i", 45)); GETDLGITEM(IDC_WINDDIRECTION1)->SetString(CSprintf("%i", MMC.Sky.diralt)); } // CRect rect; // parent->GetParent()->GetWindowRect(rect); // GetClientRect(rect); // parent->SetMaxSize(CRect(0,0,rect.Width(),rect.Height())); return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE }
void HostilesList::RefreshList() { CRListBox* rlistbox; rlistbox=GETDLGITEM(IDC_RLISTBOXCTRL1); rlistbox->Clear(); //DeadCode RDH 27Oct00 rlistbox->AddColumn(30); //46 //DeadCode RDH 27Oct00 rlistbox->AddColumn(28); //RDH 02/06/99 //DeadCode RDH 27Oct00 rlistbox->AddColumn(42); //50 //RDH 02/06/99 //DeadCode RDH 27Oct00 rlistbox->AddColumn(48); //60 //RDH 02/06/99 //DeadCode RDH 27Oct00 rlistbox->AddColumn(46); //RDH 02/06/99 //DeadCode RDH 27Oct00 rlistbox->AddColumn(80); //DeadCode RDH 27Oct00 rlistbox->AddIconColumn(28); //RDH 02/06/99 //DeadCode RDH 27Oct00 rlistbox->AddColumn(TARGETFIELDWIDTH); //RDH 02/06/99 //DeadCode RDH 27Oct00 rlistbox->AddColumn(24); //RDH 02/06/99 //DeadCode JIM 11Nov00 //DeadCode RDH 31Oct00 rlistbox->AddColumn(32); //RDH 02/06/99 //DeadCode JIM 11Nov00 //DeadCode RDH 31Oct00 rlistbox->AddColumn(20); //RDH 02/06/99 //DeadCode JIM 11Nov00 //DeadCode RDH 31Oct00 rlistbox->AddColumn(2); //DEADCODE RDH 20/01/00 rlistbox->AddColumn(50); //RDH 02/06/99 rlistbox->AddString(RESSTRING(RAID),0); rlistbox->AddString(RESSTRING(HL_SIZE),1); rlistbox->AddString(RESSTRING(TYPE),2); rlistbox->AddString(RESSTRING(HL_ESCORT),3); rlistbox->AddString(RESSTRING(ALT),4); rlistbox->AddString(RESSTRING(HL_STATUS),5); rlistbox->AddString("",6); rlistbox->AddString(RESSTRING(HL_TARGET),7); rlistbox->AddString(RESSTRING(OUT),8); rlistbox->AddString(RESSTRING(CMBT),9); rlistbox->AddString(RESSTRING(IN),10); //DEADCODE RDH 20/01/00 rlistbox->AddString(RESSTRING(HL_STATUS),6); //DEADCODE RDH 20/01/00 rlistbox->AddString(RESSTRING(HL_RESPONSE),6); //DEADCODE RDH 20/01/00 rlistbox->AddString(RESSTRING(HL_INTERCEPT),8); rlistbox->AddString(RESSTRING(HL_TALLY),11); int p=0; int t; while (packlist[p].pack != 65535) { Profile& pk = Todays_Packages.pack[packlist[p].pack]; if (packlist[p].method < Profile::AM_DETACHED) { //DEADCODE RDH 12/04/00 rlistbox->AddString(CSprintf("R%03i", pk.raidnumentries[packlist[p].raidline].raidnum),0); char* raidletter = Todays_Packages.RaidFormatString(packlist[p].pack,packlist[p].raidline); rlistbox->AddString(CSprintf(raidletter, pk.raidnumentries[packlist[p].raidline].raidnum),0); //DEADCODE RDH 12/04/00 rlistbox->AddString(CSprintf("R%03i", packlist[p].raidline),0); rlistbox->AddString(CSprintf("%i", packlist[p].numofac),1); Squadron* sq = Node_Data[(SquadNum)packlist[p].strikegruppe]; rlistbox->AddString(RESLIST(SPIT_A, sq->AcType()),2); if (packlist[p].escortgruppe >= 0) { sq = Node_Data[(SquadNum)packlist[p].escortgruppe]; rlistbox->AddString(RESLIST(SPIT_A, sq->AcType()),3); }else rlistbox->AddString(RESSTRING(NONE_NOAIRCRAFT),3); int firstsq = pk.raidnumentries[packlist[p].raidline].squadliststart; ItemBasePtr item = Persons2::ConvertPtrUID(pk[firstsq].instance); if (item) { int alt = item->World.Y; if (alt < 0 ) alt = 0; alt = alt*10/Save_Data.alt.mediummm; alt = 100*((alt + 50)/100); rlistbox->AddString(CSprintf("%i%s",alt,LoadResString(Save_Data.alt.mediumabbr)),4); }else rlistbox->AddString(" ",4); //DeadCode RJS 12Nov00 info_airgrpPtr item = Persons2::ConvertPtrUID(pk[firstsq].instance); //DeadCode RJS 12Nov00 if (item) //DeadCode RJS 12Nov00 { //DeadCode RJS 12Nov00 int alt = item->knownposition.Y; //DeadCode RJS 12Nov00 if (alt < 0 ) //DeadCode RJS 12Nov00 alt = 0; //DeadCode RJS 12Nov00 alt = alt*10/Save_Data.alt.mediummm; //DeadCode RJS 12Nov00 alt = 100*((alt + 50)/100); //DeadCode RJS 12Nov00 rlistbox->AddString(CSprintf("%i%s",alt,LoadResString(Save_Data.alt.mediumabbr)),4); //DeadCode RJS 12Nov00 }else //DeadCode RJS 12Nov00 rlistbox->AddString(" ",4); rlistbox->AddString(RESLIST(PS_SPARE,pk.packagestatus),5); TargetNoDetail* trg = NULL; if (packlist[p].target) { trg=Node_Data[packlist[p].target]; rlistbox->AddString(GetTargName(packlist[p].target),7); } else rlistbox->AddString("",7); if (trg) { int j = trg->truestatus; if (j >= Target::TS_NEARLYDESTROYED) j = 3; elseif (j>Target::TS_BADDAMAGE) j=2; elseif (j>Target::TS_LIGHTDAMAGE) j=1; else j=0; //DeadCode JON 4Sep00 if (j >= 100) //DeadCode JON 4Sep00 j = 3; //DeadCode JON 4Sep00 else //DeadCode JON 4Sep00 { //DeadCode JON 4Sep00 j = j/4; //DeadCode JON 4Sep00 if (j >= 3) //DeadCode JON 4Sep00 j =2; //DeadCode JON 4Sep00 } FileNum filenum = GetIconFileNum(packlist[p].target); rlistbox->AddIcon(filenum,6); //DEADCODE RDH 21/01/00 rlistbox->AddIcon((FileNum)ICON_AF_FIGHTER,5); //DEADCODE RDH 20/01/00 rlistbox->AddString(RESLIST(UNDAMAGED, j),5); } else