Changeset 531 for trunk/LocalPlayer
- Timestamp:
- Mar 27, 2024, 12:31:14 PM (8 months ago)
- Location:
- trunk/LocalPlayer
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LocalPlayer/CityType.pas
r530 r531 23 23 procedure FormClose(Sender: TObject; var Action: TCloseAction); 24 24 procedure DeleteBtnClick(Sender: TObject); 25 public26 procedure ShowNewContent(NewMode: TWindowMode);27 25 protected 28 26 procedure OffscreenPaint; override; … … 30 28 nPool, dragiix, ctype: Integer; 31 29 Pooliix: array [0 .. nImp - 1] of Integer; 32 listed: Set of 0 .. nImp;30 Listed: set of 0 .. nImp; 33 31 Changed: Boolean; 34 32 procedure LoadType(NewType: Integer); 35 33 procedure SaveType; 34 public 35 procedure ShowNewContent(NewMode: TWindowMode); 36 36 end; 37 37 … … 158 158 nPool := 0; 159 159 for iix := nWonder to nImp - 1 do 160 if not(iix in listed) and (Imp[iix].Kind = ikCommon) and (iix <> imTrGoods)160 if not(iix in Listed) and (Imp[iix].Kind = ikCommon) and (iix <> imTrGoods) 161 161 and (Imp[iix].Preq <> preNA) and 162 162 ((Imp[iix].Preq = preNone) or (MyRO.Tech[Imp[iix].Preq] >= tsApplicable)) … … 195 195 begin 196 196 ctype := NewType; 197 listed := [];197 Listed := []; 198 198 I := 0; 199 199 while MyData.ImpOrder[ctype, I] >= 0 do 200 200 begin 201 Include( listed, MyData.ImpOrder[ctype, I]);201 Include(Listed, MyData.ImpOrder[ctype, I]); 202 202 Inc(I); 203 203 end; … … 295 295 Assert(MyData.ImpOrder[ctype, I] = iix); 296 296 Move(MyData.ImpOrder[ctype, I + 1], MyData.ImpOrder[ctype, I], nImp - I); 297 Exclude( listed, iix);297 Exclude(Listed, iix); 298 298 end; 299 299 … … 308 308 (Y < yList + nListRow * 32) then 309 309 begin 310 if dragiix in listed then310 if dragiix in Listed then 311 311 UnList(dragiix); 312 312 I := (X - xList) div 42 + (Y - yList) div 32 * nListCol; … … 316 316 nImp - I - 1); 317 317 MyData.ImpOrder[ctype, I] := dragiix; 318 Include( listed, dragiix);318 Include(Listed, dragiix); 319 319 Changed := True; 320 320 end 321 else if (dragiix in listed) and (X >= xPool) and (X < xPool + nPoolCol * 42)321 else if (dragiix in Listed) and (X >= xPool) and (X < xPool + nPoolCol * 42) 322 322 and (Y >= yPool) and (Y < yPool + nPoolRow * 32) then 323 323 begin … … 340 340 begin 341 341 FillChar(MyData.ImpOrder[ctype], SizeOf(MyData.ImpOrder[ctype]), Byte(-1)); 342 listed := [];342 Listed := []; 343 343 Changed := True; 344 344 SmartUpdateContent; -
trunk/LocalPlayer/ClientTools.pas
r522 r531 446 446 eDied - job done and died (thurst) } 447 447 var 448 stage, NextJob, Tile: Integer;449 Done: set of jNone ..jPoll;448 Stage, NextJob, Tile: Integer; 449 Done: set of jNone..jPoll; 450 450 begin 451 451 Done := []; … … 470 470 while (Result <> eOK) and (Result <> eDied) do 471 471 begin 472 stage := -1;472 Stage := -1; 473 473 repeat 474 if stage = -1 then474 if Stage = -1 then 475 475 NextJob := jPoll 476 476 else 477 NextJob := Jobs[Tile and fTerrain, stage];477 NextJob := Jobs[Tile and fTerrain, Stage]; 478 478 if (NextJob = jNone) or not (NextJob in Done) then 479 479 Break; 480 Inc( stage);481 until stage = 5;482 if ( stage = 5) or (NextJob = jNone) then480 Inc(Stage); 481 until Stage = 5; 482 if (Stage = 5) or (NextJob = jNone) then 483 483 begin 484 484 Result := eJobDone; -
trunk/LocalPlayer/Draft.pas
r530 r531 27 27 procedure PaintBox1MouseUp(Sender: TObject; Button: TMouseButton; 28 28 Shift: TShiftState; X, Y: Integer); 29 public30 procedure ShowNewContent(NewMode: TWindowMode);31 protected32 procedure OffscreenPaint; override;33 29 private 34 30 Domain, MaxLines, Lines, Cut, yDomain, yFeature, yWeight, yTotal, yView, … … 38 34 function IsFeatureInList(D, I: Integer): Boolean; 39 35 procedure SetDomain(D: Integer); 36 protected 37 procedure OffscreenPaint; override; 38 public 39 procedure ShowNewContent(NewMode: TWindowMode); 40 40 end; 41 41 … … 211 211 Y := yTotal + 76; 212 212 LoweredTextOut(Offscreen.Canvas, -1, MainTexture, xTotal - 2, Y, 213 Phrases.Lookup('COSTDIFF' + char(48 + G.Difficulty[Me])));213 Phrases.Lookup('COSTDIFF' + Char(48 + G.Difficulty[Me]))); 214 214 LoweredTextOut(Offscreen.Canvas, -1, MainTexture, 215 215 xTotal2 + 148 + 30, Y, '='); -
trunk/LocalPlayer/Enhance.pas
r496 r531 39 39 private 40 40 NoMap: TIsoMap; 41 public42 procedure ShowNewContent(NewMode: TWindowMode; TerrType: Integer = -1);43 41 protected 44 42 Page: Integer; 45 43 procedure OffscreenPaint; override; 44 public 45 procedure ShowNewContent(NewMode: TWindowMode; TerrType: Integer = -1); 46 46 end; 47 47 -
trunk/LocalPlayer/Help.pas
r530 r531 113 113 procedure FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); 114 114 procedure SearchBtnClick(Sender: TObject); 115 protected116 procedure OffscreenPaint; override;117 115 private 118 116 Kind: TLinkCategory; … … 141 139 procedure OnScroll(var Msg: TMessage); message WM_VSCROLL; 142 140 procedure OnMouseLeave(var Msg: TMessage); message CM_MOUSELEAVE; 141 protected 142 procedure OffscreenPaint; override; 143 143 public 144 144 HistItems: THistItems; -
trunk/LocalPlayer/NatStat.pas
r530 r531 32 32 procedure ScrollDownBtnClick(Sender: TObject); 33 33 procedure TellAIBtnClick(Sender: TObject); 34 public35 procedure CheckAge;36 procedure ShowNewContent(NewMode: TWindowMode; P: Integer = -1);37 procedure EcoChange;38 34 protected 39 35 procedure OffscreenPaint; override; … … 50 46 ReportText: TStringList; 51 47 procedure GenerateReportText; 48 public 49 procedure CheckAge; 50 procedure ShowNewContent(NewMode: TWindowMode; P: Integer = -1); 51 procedure EcoChange; 52 52 end; 53 53 … … 244 244 if ExtinctPart then 245 245 S := '(' + S + ')'; 246 ReportText.Add( char(48 + Treaty) + S);246 ReportText.Add(Char(48 + Treaty) + S); 247 247 end; 248 248 end; -
trunk/LocalPlayer/Nego.pas
r522 r531 481 481 procedure TNegoDlg.OffscreenPaint; 482 482 var 483 I, cred: Integer;483 I, Cred: Integer; 484 484 S: string; 485 485 OkEnabled: Boolean; … … 600 600 // show credibility 601 601 Offscreen.Canvas.Font.Assign(UniFont[ftTiny]); 602 cred := MyRO.EnemyReport[DipMem[Me].pContact].Credibility;603 case cred of602 Cred := MyRO.EnemyReport[DipMem[Me].pContact].Credibility; 603 case Cred of 604 604 0 .. 49: 605 605 I := 3; … … 609 609 I := 1; 610 610 end; 611 PaintProgressBar(Offscreen.Canvas, I, xCred0, yCred0 + 17, ( cred + 2) div 5,611 PaintProgressBar(Offscreen.Canvas, I, xCred0, yCred0 + 17, (Cred + 2) div 5, 612 612 0, 20, MainTexture); 613 S := IntToStr( cred);613 S := IntToStr(Cred); 614 614 RisedTextOut(Offscreen.Canvas, xCred0 + 10 - 615 615 (BiColorTextWidth(Offscreen.Canvas, S) + 1) div 2, yCred0, S); -
trunk/LocalPlayer/Rates.pas
r530 r531 45 45 procedure TRatesDlg.OffscreenPaint; 46 46 var 47 P, X, Y, current, Max, I: Integer;47 P, X, Y, Current, Max, I: Integer; 48 48 S, s1: string; 49 49 begin … … 112 112 X := 16; 113 113 Y := 81; 114 current := (100 - MyRO.LuxRate - MyRO.TaxRate) * 120 div 100;114 Current := (100 - MyRO.LuxRate - MyRO.TaxRate) * 120 div 100; 115 115 Max := 120; 116 116 Frame(Offscreen.Canvas, X - 1, Y - 1, X + Max, Y + 7, $000000, $000000); … … 119 119 with Offscreen.Canvas do 120 120 begin 121 for I := 0 to current div 8 - 1 do121 for I := 0 to Current div 8 - 1 do 122 122 BitBltBitmap(Offscreen, X + Max - 8 - I * 8, Y, 8, 7, 123 123 HGrSystem.Data, 104, 9 + 8 * 2); 124 BitBltBitmap(Offscreen, X + Max - current, Y, current - 8 * (current div 8), 7,124 BitBltBitmap(Offscreen, X + Max - Current, Y, Current - 8 * (Current div 8), 7, 125 125 HGrSystem.Data, 104, 9 + 8 * 2); 126 126 Brush.Color := $000000; 127 FillRect(Rect(X, Y, X + Max - current, Y + 7));127 FillRect(Rect(X, Y, X + Max - Current, Y + 7)); 128 128 Brush.Style := TBrushStyle.bsClear; 129 129 end; -
trunk/LocalPlayer/Select.pas
r530 r531 1073 1073 PPicture, PTestPicture: ^TModelPicture; 1074 1074 ModelOk: array [0 .. 4095] of Boolean; 1075 ok: Boolean;1075 Ok: Boolean; 1076 1076 begin 1077 1077 for I := 0 to MaxLayer - 1 do … … 1108 1108 begin 1109 1109 { if MyModel[i].Kind=mkSlaves then 1110 ok:= MyRO.Wonder[woPyramids].EffectiveOwner=Me1110 Ok:= MyRO.Wonder[woPyramids].EffectiveOwner=Me 1111 1111 else } if MyModel[I].Domain = dSea then 1112 1112 begin 1113 ok := False;1113 Ok := False; 1114 1114 for dx := -2 to 2 do 1115 1115 for dy := -2 to 2 do … … 1120 1120 ((MyMap[Loc1] and fTerrain = fShore) or 1121 1121 (MyMap[Loc1] and fCanal > 0)) then 1122 ok := True;1122 Ok := True; 1123 1123 end; 1124 1124 end 1125 1125 else 1126 ok := True;1127 if ok then1126 Ok := True; 1127 if Ok then 1128 1128 begin 1129 1129 if MyModel[I].Status and msObsolete = 0 then … … 1163 1163 Inc(Lines[0]); 1164 1164 end; 1165 ok := False;1165 Ok := False; 1166 1166 for I := 0 to nDomains - 1 do 1167 1167 if (upgrade[I, 0].Preq = preNone) or 1168 1168 (MyRO.Tech[upgrade[I, 0].Preq] >= tsApplicable) then 1169 ok := True;1170 if ok then { new unit class }1169 Ok := True; 1170 if Ok then { new unit class } 1171 1171 begin 1172 1172 Code[0, Lines[0]] := adMilitary; … … 1255 1255 for I := 0 to nAdv - 1 do 1256 1256 begin 1257 ok := (MyRO.Tech[I] <> tsNA) or (MyRO.ResearchTech = I);1257 Ok := (MyRO.Tech[I] <> tsNA) or (MyRO.ResearchTech = I); 1258 1258 for J := 1 to nColumn - 1 do 1259 1259 with MyRO.EnemyReport[Column[J]]^ do 1260 1260 if (Tech[I] <> tsNA) or (TurnOfCivilReport >= 0) and 1261 1261 (ResearchTech = I) then 1262 ok := True;1263 if ok then1262 Ok := True; 1263 if Ok then 1264 1264 begin 1265 1265 Code[0, Lines[0]] := I; … … 1269 1269 SortTechs; 1270 1270 1271 ok := MyRO.ResearchTech = adMilitary;1271 Ok := MyRO.ResearchTech = adMilitary; 1272 1272 for J := 1 to nColumn - 1 do 1273 1273 with MyRO.EnemyReport[Column[J]]^ do 1274 1274 if (MyRO.Alive and (1 shl Column[J]) <> 0) and 1275 1275 (TurnOfCivilReport >= 0) and (ResearchTech = adMilitary) then 1276 ok := True;1277 if ok then1276 Ok := True; 1277 if Ok then 1278 1278 begin 1279 1279 Code[0, Lines[0]] := adMilitary; … … 1330 1330 begin // check if opponent already has this model 1331 1331 MakeModelInfo(Me, mix, MyModel[mix], mi); 1332 ok := True;1332 Ok := True; 1333 1333 for emix := 0 to MyRO.nEnemyModel - 1 do 1334 1334 if (MyRO.EnemyModel[emix].Owner = DipMem[Me].pContact) and 1335 1335 IsSameModel(MyRO.EnemyModel[emix], mi) then 1336 ok := False;1337 if ok then1336 Ok := False; 1337 if Ok then 1338 1338 begin 1339 1339 Code[0, Lines[0]] := mix; … … 1414 1414 if not Assigned(PPicture.HGr) then 1415 1415 InitEnemyModel(emix); 1416 ok := True;1416 Ok := True; 1417 1417 if MainScreen.mNames.Checked then 1418 1418 for J := 0 to Lines[0] - 1 do … … 1426 1426 begin 1427 1427 Code[1, J] := 1; 1428 ok := False;1428 Ok := False; 1429 1429 Break; 1430 1430 end; 1431 1431 end; 1432 if ok then1432 if Ok then 1433 1433 begin 1434 1434 Code[0, Lines[0]] := emix; -
trunk/LocalPlayer/Term.pas
r530 r531 421 421 procedure UpdateKeyShortcuts; 422 422 procedure SetFullScreen(Active: Boolean); 423 procedure PaintZoomedTile( dst: TBitmap; X, Y, Loc: Integer);423 procedure PaintZoomedTile(Dst: TBitmap; X, Y, Loc: Integer); 424 424 public 425 425 UsedOffscreenWidth: Integer; … … 850 850 function AttackSound(Code: Integer): string; 851 851 begin 852 Result := 'ATTACK_' + char(48 + Code div 100 mod 10) +853 char(48 + Code div 10 mod 10) + char(48 + Code mod 10);852 Result := 'ATTACK_' + Char(48 + Code div 100 mod 10) + 853 Char(48 + Code div 10 mod 10) + Char(48 + Code mod 10); 854 854 end; 855 855 … … 931 931 else OpenSound:=AttackSound(ModelCode(mi)); } 932 932 if MyModel[MyData.ToldModels].Kind = mkSelfDeveloped then 933 OpenSound := 'NEWMODEL_' + char(48 + Age);933 OpenSound := 'NEWMODEL_' + Char(48 + Age); 934 934 MessgText := Phrases.Lookup('MODELAVAILABLE'); 935 935 if GameMode = cMovie then … … 989 989 end; 990 990 991 procedure TMainScreen.PaintZoomedTile( dst: TBitmap; X, Y, Loc: Integer);991 procedure TMainScreen.PaintZoomedTile(Dst: TBitmap; X, Y, Loc: Integer); 992 992 993 993 procedure TSprite(xDst, yDst, xSrc, ySrc: Integer); 994 994 begin 995 995 with NoMapPanel do 996 Sprite( dst, HGrTerrain, X + xDst, Y + yDst, xxt * 2, yyt * 3,996 Sprite(Dst, HGrTerrain, X + xDst, Y + yDst, xxt * 2, yyt * 3, 997 997 1 + xSrc * (xxt * 2 + 1), 1 + ySrc * (yyt * 3 + 1)); 998 998 end; … … 1001 1001 begin 1002 1002 with NoMapPanel do begin 1003 Sprite( dst, HGrTerrain, X + xxt, Y + yyt + 2, xxt * 2, yyt * 2 - 2,1003 Sprite(Dst, HGrTerrain, X + xxt, Y + yyt + 2, xxt * 2, yyt * 2 - 2, 1004 1004 1 + xSrc * (xxt * 2 + 1), 3 + yyt + ySrc * (yyt * 3 + 1)); 1005 Sprite( dst, HGrTerrain, X + 4, Y + 2 * yyt, xxt * 2 - 4, yyt * 2,1005 Sprite(Dst, HGrTerrain, X + 4, Y + 2 * yyt, xxt * 2 - 4, yyt * 2, 1006 1006 5 + xSrc * (xxt * 2 + 1), 1 + yyt + ySrc * (yyt * 3 + 1)); 1007 Sprite( dst, HGrTerrain, X + xxt * 2, Y + 2 * yyt, xxt * 2 - 4, yyt * 2,1007 Sprite(Dst, HGrTerrain, X + xxt * 2, Y + 2 * yyt, xxt * 2 - 4, yyt * 2, 1008 1008 1 + xSrc * (xxt * 2 + 1), 1 + yyt + ySrc * (yyt * 3 + 1)); 1009 Sprite( dst, HGrTerrain, X + xxt, Y + yyt * 3, xxt * 2, yyt * 2 - 2,1009 Sprite(Dst, HGrTerrain, X + xxt, Y + yyt * 3, xxt * 2, yyt * 2 - 2, 1010 1010 1 + xSrc * (xxt * 2 + 1), 1 + yyt + ySrc * (yyt * 3 + 1)); 1011 1011 end; … … 1519 1519 Color: TColor; 1520 1520 Name: string; 1521 ok: Boolean;1521 Ok: Boolean; 1522 1522 begin 1523 1523 UnusedTribeFiles.Clear; 1524 ok := FindFirst(LocalizedFilePath('Tribes') + DirectorySeparator + '*' + CevoTribeExt,1524 Ok := FindFirst(LocalizedFilePath('Tribes') + DirectorySeparator + '*' + CevoTribeExt, 1525 1525 faArchive + faReadOnly, SearchRec) = 0; 1526 if not ok then1526 if not Ok then 1527 1527 begin 1528 1528 FindClose(SearchRec); 1529 ok := FindFirst(LocalizedFilePath('Tribes' + DirectorySeparator + '*' + CevoTribeExt),1529 Ok := FindFirst(LocalizedFilePath('Tribes' + DirectorySeparator + '*' + CevoTribeExt), 1530 1530 faArchive + faReadOnly, SearchRec) = 0; 1531 1531 end; 1532 if ok then1532 if Ok then 1533 1533 repeat 1534 1534 SearchRec.Name := Copy(SearchRec.Name, 1, Length(SearchRec.Name) - Length(CevoTribeExt)); … … 2078 2078 else 2079 2079 begin 2080 S := Tribe[Me].TPhrase('AGE' + char(48 + Age));2080 S := Tribe[Me].TPhrase('AGE' + Char(48 + Age)); 2081 2081 MessgText := Format(S, [TurnToString(MyRO.Turn)]); 2082 2082 end; … … 2086 2086 { else begin Kind:=mkOkHelp; HelpKind:=hkAdv; HelpNo:=AgePreq[age]; end }; 2087 2087 CenterTo := NewAgeCenterTo; 2088 OpenSound := 'AGE_' + char(48 + Age);2088 OpenSound := 'AGE_' + Char(48 + Age); 2089 2089 Application.ProcessMessages; 2090 2090 ShowModal; … … 2250 2250 Item := 'RESEARCH_GENERAL'; 2251 2251 if GameMode <> cMovie then 2252 OpenSound := 'NEWADVANCE_' + char(48 + Age);2252 OpenSound := 'NEWADVANCE_' + Char(48 + Age); 2253 2253 Item2 := Phrases.Lookup('ADVANCES', ad); 2254 2254 if ad in FutureTech then … … 2444 2444 begin // !!! Shinkansen 2445 2445 MoveResult := eOK; 2446 ok := True;2446 Ok := True; 2447 2447 for I := 0 to MoveAdviceData.nStep - 1 do 2448 2448 begin … … 2454 2454 // don't attack during auto move 2455 2455 begin 2456 ok := False;2457 Break 2456 Ok := False; 2457 Break; 2458 2458 end 2459 2459 else … … 2471 2471 then 2472 2472 begin 2473 ok := False;2473 Ok := False; 2474 2474 Break; 2475 2475 end; … … 2478 2478 Stop := not ok or (Loc = MoveAdviceData.ToLoc) or 2479 2479 (MoveAdviceData.ToLoc = maNextCity) and 2480 (MyMap[Loc] and fCity <> 0) 2480 (MyMap[Loc] and fCity <> 0); 2481 2481 end 2482 2482 else … … 2977 2977 with MessgExDlg do 2978 2978 begin 2979 OpenSound := 'CONTACT_' + char(48 + MyRO.EnemyReport[Integer(Data)2979 OpenSound := 'CONTACT_' + Char(48 + MyRO.EnemyReport[Integer(Data) 2980 2980 ].Attitude); 2981 2981 MessgText := Tribe[Integer(Data)].TPhrase('FRCONTACT'); … … 3005 3005 InitTurn(NewPlayer); 3006 3006 if Command = scDipStart then 3007 Play('CONTACT_' + char(48 + MyRO.Attitude[DipMem[NewPlayer]3007 Play('CONTACT_' + Char(48 + MyRO.Attitude[DipMem[NewPlayer] 3008 3008 .pContact])) 3009 3009 else if Command = scDipCancelTreaty then … … 4718 4718 var 4719 4719 ProcessOptions: Integer; 4720 rec: TRect;4720 Rec: TRect; 4721 4721 DoInvalidate: Boolean; 4722 4722 begin … … 4759 4759 Exit; { map window not moved } 4760 4760 Offscreen.Canvas.Font.Assign(UniFont[ftSmall]); 4761 rec := Rect(0, 0, MapWidth, MapHeight);4761 Rec := Rect(0, 0, MapWidth, MapHeight); 4762 4762 {$IFDEF WINDOWS} 4763 4763 ScrollDC(Offscreen.Canvas.Handle, (xwd - xw) * (xxt * 2), (ywd - yw) * yyt, … … 4766 4766 {$IFDEF UNIX} 4767 4767 ScrollDC(Offscreen.Canvas, (xwd - xw) * (xxt * 2), (ywd - yw) * yyt, 4768 rec, rec, 0, nil);4768 Rec, Rec, 0, nil); 4769 4769 {$ENDIF} 4770 4770 for DoInvalidate := False to FastScrolling do begin 4771 4771 if DoInvalidate then begin 4772 rec.Bottom := MapHeight - Overlap;4772 Rec.Bottom := MapHeight - Overlap; 4773 4773 {$IFDEF WINDOWS} 4774 4774 ScrollDC(Canvas.Handle, (xwd - xw) * (xxt * 2), (ywd - yw) * yyt, rec, … … 4777 4777 {$IFDEF UNIX} 4778 4778 ScrollDC(Canvas, (xwd - xw) * (xxt * 2), (ywd - yw) * yyt, 4779 rec, rec, 0, nil);4779 Rec, Rec, 0, nil); 4780 4780 {$ENDIF} 4781 4781 ProcessOptions := prInvalidate; … … 7153 7153 else if BHelp.Test(ShortCut) then mHelp.Click; 7154 7154 (*if Shift = [ssCtrl] then 7155 case char(Key) of7155 case Char(Key) of 7156 7156 'A': 7157 7157 begin // auto symmetry -
trunk/LocalPlayer/Tribes.pas
r468 r531 430 430 I := 0; 431 431 while (I < Count) and (Copy(Strings[I], 1, 6) <> 432 '#AGE' + char(48 + Age) + ' ') do432 '#AGE' + Char(48 + Age) + ' ') do 433 433 Inc(I); 434 434 if I < Count then … … 489 489 var 490 490 I: Integer; 491 ok: Boolean;491 Ok: Boolean; 492 492 begin 493 493 with Info do … … 516 516 517 517 // read model name from tribe script 518 ok := False;518 Ok := False; 519 519 for I := 0 to Script.Count - 1 do 520 520 begin 521 521 Input := Script[I]; 522 522 if Input = '#UNITS ' + ExtractFileNameOnly(GrName) then 523 ok := True523 Ok := True 524 524 else if (Input <> '') and (Input[1] = '#') then 525 ok := False526 else if ok and (GetNum = pix) then525 Ok := False 526 else if Ok and (GetNum = pix) then 527 527 begin 528 528 Get; -
trunk/LocalPlayer/UnitStat.pas
r530 r531 293 293 end; 294 294 295 procedure FeatureBar( dst: TBitmap; X, Y: Integer; const mi: TModelInfo;295 procedure FeatureBar(Dst: TBitmap; X, Y: Integer; const mi: TModelInfo; 296 296 T: TTexture); 297 297 var 298 I, W, dx, num: Integer;298 I, W, dx, Num: Integer; 299 299 S: string; 300 300 begin 301 DarkGradient( dst.Canvas, X - 6, Y + 1, 180, 1);302 with dst.Canvas do301 DarkGradient(Dst.Canvas, X - 6, Y + 1, 180, 1); 302 with Dst.Canvas do 303 303 if mi.Kind >= $10 then 304 304 begin … … 315 315 for I := 3 to nFeature - 1 do 316 316 begin 317 num := 0;317 Num := 0; 318 318 case I of 319 319 mcSeaTrans: 320 320 if mi.Domain = dSea then 321 num := mi.TTrans;321 Num := mi.TTrans; 322 322 mcCarrier: 323 323 if mi.Domain = dSea then 324 num := mi.ATrans_Fuel;324 Num := mi.ATrans_Fuel; 325 325 mcBombs: 326 num := mi.Bombs;326 Num := mi.Bombs; 327 327 mcFuel: 328 328 if mi.Domain = dAir then 329 num := mi.ATrans_Fuel;329 Num := mi.ATrans_Fuel; 330 330 mcAirTrans: 331 331 if mi.Domain = dAir then 332 num := mi.TTrans;332 Num := mi.TTrans; 333 333 mcFirstNonCap .. nFeature - 1: 334 334 if mi.Cap and (1 shl (I - mcFirstNonCap)) <> 0 then 335 num := 1;335 Num := 1; 336 336 end; 337 if ( num > 0) and337 if (Num > 0) and 338 338 ((I <> mcSE) or (mi.Cap and (1 shl (mcNP - mcFirstNonCap)) = 0)) 339 339 then 340 340 begin 341 if num > 1 then341 if Num > 1 then 342 342 begin 343 S := IntToStr( num);343 S := IntToStr(Num); 344 344 W := TextWidth(S); 345 345 Brush.Color := $FFFFFF; … … 352 352 FrameRect(Rect(X - 3 + dx, Y + 2, X + 11 + dx, Y + 16)); 353 353 Brush.Style := TBrushStyle.bsClear; 354 Sprite( dst, HGrSystem, X - 1 + dx, Y + 4, 10, 10,354 Sprite(Dst, HGrSystem, X - 1 + dx, Y + 4, 10, 10, 355 355 66 + I mod 11 * 11, 137 + I div 11 * 11); 356 356 Inc(dx, 15); … … 360 360 end; 361 361 362 procedure NumberBarS( dst: TBitmap; X, Y: Integer; Cap, S: string; T: TTexture);363 begin 364 DLine( dst.Canvas, X - 2, X + 170, Y + 16, T.ColorBevelShade, T.ColorBevelLight);365 LoweredTextOut( dst.Canvas, -1, T, X - 2, Y, Cap);366 RisedTextout( dst.Canvas, X + 170 - BiColorTextWidth(dst.Canvas, S), Y, S);362 procedure NumberBarS(Dst: TBitmap; X, Y: Integer; Cap, S: string; T: TTexture); 363 begin 364 DLine(Dst.Canvas, X - 2, X + 170, Y + 16, T.ColorBevelShade, T.ColorBevelLight); 365 LoweredTextOut(Dst.Canvas, -1, T, X - 2, Y, Cap); 366 RisedTextout(Dst.Canvas, X + 170 - BiColorTextWidth(Dst.Canvas, S), Y, S); 367 367 end; 368 368
Note:
See TracChangeset
for help on using the changeset viewer.