Changeset 362 for trunk/LocalPlayer/UnitStat.pas
- Timestamp:
- Apr 12, 2021, 10:18:18 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LocalPlayer/UnitStat.pas
r352 r362 150 150 dec(ecixShow); 151 151 assert(ecixShow >= 0); 152 end 152 end; 153 153 end; 154 154 case Kind of … … 296 296 result := (PPicture.HGr = PTestPicture.HGr) and 297 297 (PPicture.pix = PTestPicture.pix) and 298 (ModelHash(mox^) = ModelHash(MyRO.EnemyModel[emix])) 298 (ModelHash(mox^) = ModelHash(MyRO.EnemyModel[emix])); 299 299 end 300 300 else 301 301 result := (MyRO.EnemyModel[emix].owner = mox.owner) and 302 (MyRO.EnemyModel[emix].mix = mox.mix) 302 (MyRO.EnemyModel[emix].mix = mox.mix); 303 303 end; 304 304 … … 435 435 begin 436 436 case i of 437 0: 438 j := imWalls; 439 1: 440 j := imCoastalFort; 441 2: 442 j := imMissileBat; 443 3: 444 j := imBunker 437 0: j := imWalls; 438 1: j := imCoastalFort; 439 2: j := imMissileBat; 440 3: j := imBunker 445 441 end; 446 442 Frame(offscreen.Canvas, x - 1, yImp - 1, x + xSizeSmall, … … 450 446 SmallImp.Canvas, j mod 7 * xSizeSmall, 451 447 (j + SystemIconLines * 7) div 7 * ySizeSmall); 452 inc(x, xSizeSmall + 4) 448 inc(x, xSizeSmall + 4); 453 449 end; 454 450 end; … … 467 463 if IsToCount(MyRO.EnemyUn[MyRO.nEnemyUn + uix].emix) then 468 464 inc(Available); 469 end 465 end; 470 466 end 471 467 else // no supervisor -- can only count stack top units … … 510 506 begin 511 507 MakeUnitInfo(me, MyUn[uixShow], ui); 512 MakeModelInfo(me, MyUn[uixShow].mix, MyModel[MyUn[uixShow].mix], mi) 508 MakeModelInfo(me, MyUn[uixShow].mix, MyModel[MyUn[uixShow].mix], mi); 513 509 end 514 510 else … … 516 512 mi := mox^; 517 513 if Kind in [dkEnemyUnit, dkEnemyCityDefense] then 518 ui := MyRO.EnemyUn[euixShow] 514 ui := MyRO.EnemyUn[euixShow]; 519 515 end; 520 516 … … 539 535 begin 540 536 x := 1 + 2 * (xxt * 2 + 1); 541 y := 1 + yyt + 2 * (yyt * 3 + 1) 537 y := 1 + yyt + 2 * (yyt * 3 + 1); 542 538 end 543 539 else 544 540 begin 545 541 x := integer(MyMap[Loc] and fTerrain) * (xxt * 2 + 1) + 1; 546 y := 1 + yyt 542 y := 1 + yyt; 547 543 end; 548 544 for j := -1 to 1 do … … 592 588 (ClientWidth - BiColorTextWidth(offscreen.Canvas, s)) div 2, 593 589 yView + 80, s); 594 end 590 end; 595 591 end 596 592 else … … 673 669 ConscriptsBtn.ButtonIndex := 29; 674 670 ConscriptsBtn.Hint := Phrases.Lookup('BTN_ALLOWCONSCRIPTS'); 675 end 671 end; 676 672 end 677 673 else if Kind = dkEnemyModel then … … 683 679 NumberBar(offscreen, xTotal, yTotal + StatDown, 684 680 Phrases.Lookup('UNITKNOWN'), Available, MainTexture); 685 end 681 end; 686 682 end; 687 683 end; … … 703 699 procedure TUnitStatDlg.ModelBoxChange(Sender: TObject); 704 700 begin 705 SmartUpdateContent 701 SmartUpdateContent; 706 702 end; 707 703 … … 718 714 SwitchBtn.ButtonIndex := 11; 719 715 SwitchBtn.Hint := Phrases.Lookup('BTN_NONOBSOLETE'); 720 end 716 end; 721 717 end; 722 718 … … 733 729 ConscriptsBtn.ButtonIndex := 29; 734 730 ConscriptsBtn.Hint := Phrases.Lookup('BTN_ALLOWCONSCRIPTS'); 735 end 731 end; 736 732 end; 737 733 738 734 procedure TUnitStatDlg.HelpBtnClick(Sender: TObject); 739 735 begin 740 HelpDlg.ShowNewContent(wmPersistent, hkModel, 0) 736 HelpDlg.ShowNewContent(wmPersistent, hkModel, 0); 741 737 end; 742 738
Note:
See TracChangeset
for help on using the changeset viewer.