Changeset 531 for trunk/LocalPlayer/Term.pas
- Timestamp:
- Mar 27, 2024, 12:31:14 PM (8 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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
Note:
See TracChangeset
for help on using the changeset viewer.