MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / DrawExt

Method DrawExt

engine/Poseidon/UI/Map/UIMapExt.cpp:426–937  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

424void CStaticMapArcadeViewer::DrawObjects() {}
425
426void CStaticMapArcadeViewer::DrawExt(float alpha)
427{
428 CStaticMap::DrawExt(alpha);
429
430#if _ENABLE_CHEATS
431 if (!_show)
432 return;
433#endif
434
435 DrawObjects();
436
437 // update waypoint positions
438 int i, n = _template->groups.Size();
439 for (i = 0; i < n; i++)
440 {
441 ArcadeGroupInfo& gInfo = _template->groups[i];
442 int j, m = gInfo.waypoints.Size();
443 for (j = 0; j < m; j++)
444 {
445 ArcadeWaypointInfo& wpInfo = gInfo.waypoints[j];
446 if (wpInfo.id >= 0)
447 {
448 int idGroup, idUnit;
449 ArcadeUnitInfo* uInfo = _template->FindUnit(wpInfo.id, idGroup, idUnit);
450 if (uInfo)
451 {
452 wpInfo.position = uInfo->position;
453 }
454 }
455 }
456 }
457
458 // draw synchronizations
459 AutoArray<AutoArray<DrawCoord>> synchroMap;
460 AutoArray<AutoArray<bool>> synchroSel;
461 synchroMap.Resize(_template->nextSyncId);
462 synchroSel.Resize(_template->nextSyncId);
463 for (i = 0; i < n; i++)
464 {
465 ArcadeGroupInfo& gInfo = _template->groups[i];
466 int j, m = gInfo.waypoints.Size();
467 for (j = 0; j < m; j++)
468 {
469 ArcadeWaypointInfo& wpInfo = gInfo.waypoints[j];
470 bool isActive1 = wpInfo.selected;
471 DrawCoord ptMap = WorldToScreen(wpInfo.position);
472 ptMap.x *= _wScreen;
473 ptMap.y *= _hScreen;
474 int p = wpInfo.synchronizations.Size();
475 for (int l = 0; l < p; l++)
476 {
477 int sync = wpInfo.synchronizations[l];
478 PoseidonAssert(sync >= 0);
479 int o = synchroMap[sync].Size();
480 for (int k = 0; k < o; k++)
481 {
482 bool isActive2 = synchroSel[sync][k];
483

Callers

nothing calls this directly

Calls 15

DrawObjectsFunction · 0.85
Line2DPixelClass · 0.85
InvSqrtFunction · 0.85
DrawSignFunction · 0.85
DrawRectangleFunction · 0.85
saturateMaxFunction · 0.85
HDegreeFunction · 0.85
LocalizeFunction · 0.85
ColorClass · 0.85
HasEffectMethod · 0.80
FindMarkerMethod · 0.80
SquareFunction · 0.50

Tested by

no test coverage detected