Changeset 211 for trunk/LocalPlayer
- Timestamp:
- May 9, 2020, 9:04:03 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LocalPlayer/CityScreen.pas
r209 r211 435 435 end; 436 436 end; 437 438 procedure MakeRed(X, Y, W, H: Integer);439 var440 XX, YY: Integer;441 Gray: Integer;442 PixelPtr: TPixelPointer;443 begin444 Offscreen.BeginUpdate;445 PixelPtr := PixelPointer(Offscreen, X, Y);446 for YY := 0 to H - 1 do begin447 for XX := 0 to W - 1 do begin448 Gray := (Integer(PixelPtr.Pixel^.B) + Integer(PixelPtr.Pixel^.G) +449 Integer(PixelPtr.Pixel^.R)) * 85 shr 8;450 PixelPtr.Pixel^.B := 0;451 PixelPtr.Pixel^.G := 0;452 PixelPtr.Pixel^.R := Gray; // 255-(255-gray) div 2;453 PixelPtr.NextPixel;454 end;455 PixelPtr.NextLine;456 end;457 Offscreen.EndUpdate;458 end;459 460 437 var 461 438 line, MessageCount: integer; … … 561 538 if not IsCityAlive then 562 539 begin 563 MakeRed( 18, 280, 298, 40);540 MakeRed(Offscreen, 18, 280, 298, 40); 564 541 if cGov = gAnarchy then 565 542 s := Phrases.Lookup('GOVERNMENT', gAnarchy) … … 697 674 else 698 675 begin 699 MakeRed( xHapp + dxBar - 6, yHapp + 2 * dyBar, wBar + 10, 38);676 MakeRed(Offscreen, xHapp + dxBar - 6, yHapp + 2 * dyBar, wBar + 10, 38); 700 677 CountBar(offscreen, xHapp + dxBar, yHapp + 2 * dyBar, wBar, 18, 701 678 Phrases.Lookup('LACK'), -Report.HappinessBalance, RedTex); … … 722 699 else 723 700 begin 724 MakeRed( xFood + dxBar - 6, yFood + 2 * dyBar, wBar + 10, 38);701 MakeRed(Offscreen, xFood + dxBar - 6, yFood + 2 * dyBar, wBar + 10, 38); 725 702 CountBar(offscreen, xFood + dxBar, yFood + 2 * dyBar, wBar, 1, 726 703 Phrases.Lookup('LACK'), -Report.FoodSurplus, RedTex); … … 755 732 else 756 733 begin 757 MakeRed( xProd + dxBar - 6, yProd + dyBar + 17, wBar + 10, 38);734 MakeRed(Offscreen, xProd + dxBar - 6, yProd + dyBar + 17, wBar + 10, 38); 758 735 CountBar(offscreen, xProd + dxBar, yProd + dyBar + 16, wBar, 3, 759 736 Phrases.Lookup('LACK'), -Report.Production, RedTex);
Note:
See TracChangeset
for help on using the changeset viewer.