Changeset 17 for trunk/LocalPlayer
- Timestamp:
- Jan 8, 2017, 11:21:02 AM (8 years ago)
- Location:
- trunk/LocalPlayer
- Files:
-
- 23 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LocalPlayer/BaseWin.pas
r9 r17 1 {$INCLUDE switches.pas}1 {$INCLUDE Switches.pas} 2 2 unit BaseWin; 3 3 -
trunk/LocalPlayer/Battle.pas
r6 r17 1 {$INCLUDE switches}1 {$INCLUDE Switches.pas} 2 2 unit Battle; 3 3 … … 5 5 6 6 uses 7 ScreenTools, Protocol, Messg, ButtonBase, ButtonA, 8 9 Windows,Messages, SysUtils, Classes, Graphics, Controls, Forms;7 ScreenTools, Protocol, Messg, ButtonBase, ButtonA, Types, LCLIntf, LCLType, 8 9 Messages, SysUtils, Classes, Graphics, Controls, Forms; 10 10 11 11 type … … 39 39 Term, ClientTools, IsoEngine; 40 40 41 {$R *. DFM}41 {$R *.dfm} 42 42 43 43 const -
trunk/LocalPlayer/CityScreen.pas
r12 r17 1 {$INCLUDE switches.pas}1 {$INCLUDE Switches.pas} 2 2 unit CityScreen; 3 3 -
trunk/LocalPlayer/CityType.pas
r10 r17 1 {$INCLUDE switches}1 {$INCLUDE Switches.pas} 2 2 unit CityType; 3 3 … … 5 5 6 6 uses 7 Protocol, ClientTools, Term, ScreenTools, BaseWin, 8 9 Windows,Messages, SysUtils, Classes, Graphics, Controls, Forms,7 Protocol, ClientTools, Term, ScreenTools, BaseWin, LCLIntf, LCLType, 8 9 Messages, SysUtils, Classes, Graphics, Controls, Forms, 10 10 ButtonB, ExtCtrls, ButtonA, ButtonBase; 11 11 … … 44 44 uses Help; 45 45 46 {$R *. DFM}46 {$R *.dfm} 47 47 48 48 const … … 345 345 listed := []; 346 346 Changed := true; 347 SmartUpdateContent 347 SmartUpdateContent; 348 348 end; 349 349 -
trunk/LocalPlayer/ClientTools.pas
r10 r17 1 {$INCLUDE switches}1 {$INCLUDE Switches.pas} 2 2 unit ClientTools; 3 3 -
trunk/LocalPlayer/Diagram.pas
r9 r17 1 {$INCLUDE switches.pas}1 {$INCLUDE Switches.pas} 2 2 unit Diagram; 3 3 -
trunk/LocalPlayer/Diplomacy.pas
r6 r17 1 {$INCLUDE switches}1 {$INCLUDE Switches.pas} 2 2 unit Diplomacy; 3 3 -
trunk/LocalPlayer/Draft.pas
r12 r17 1 {$INCLUDE switches.pas}1 {$INCLUDE Switches.pas} 2 2 unit Draft; 3 3 -
trunk/LocalPlayer/Enhance.pas
r6 r17 1 {$INCLUDE switches}1 {$INCLUDE Switches.pas} 2 2 unit Enhance; 3 3 … … 5 5 6 6 uses 7 ScreenTools, BaseWin, Protocol, ClientTools, Term, 8 9 Windows,Messages, SysUtils, Classes, Graphics, Controls, Forms,7 ScreenTools, BaseWin, Protocol, ClientTools, Term, LCLIntf, LCLType, 8 9 Messages, SysUtils, Classes, Graphics, Controls, Forms, 10 10 ButtonBase, ButtonB, ButtonC, Menus; 11 11 … … 45 45 uses Help; 46 46 47 {$R *. DFM}47 {$R *.dfm} 48 48 49 49 procedure TEnhanceDlg.FormCreate(Sender: TObject); -
trunk/LocalPlayer/Help.pas
r12 r17 1 {$INCLUDE switches.pas}1 {$INCLUDE Switches.pas} 2 2 unit Help; 3 3 … … 93 93 procedure Search(SearchString: string); 94 94 procedure OnScroll(var m: TMessage); message WM_VSCROLL; 95 procedure OnMouseWheel(var m: TMessage); message WM_MOUSEWHEEL;95 procedure OnMouseWheel(var m: TMessage); message LM_MOUSEWHEEL; 96 96 procedure OnMouseLeave(var Msg: TMessage); message CM_MOUSELEAVE; 97 97 end; -
trunk/LocalPlayer/IsoEngine.pas
r9 r17 1 {$INCLUDE switches.pas}1 {$INCLUDE Switches.pas} 2 2 unit IsoEngine; 3 3 -
trunk/LocalPlayer/LocalPlayer.pas
r9 r17 1 {$INCLUDE switches.pas}1 {$INCLUDE Switches.pas} 2 2 unit LocalPlayer; 3 3 -
trunk/LocalPlayer/MessgEx.pas
r9 r17 1 {$INCLUDE switches.pas}1 {$INCLUDE Switches.pas} 2 2 unit MessgEx; 3 3 … … 5 5 6 6 uses 7 Messg, Protocol, ScreenTools, Windows,7 Messg, Protocol, ScreenTools, Platform, DateUtils, 8 8 9 9 LCLIntf, LCLType, LMessages, Messages, SysUtils, Classes, Graphics, Controls, Forms, ButtonA, … … 82 82 LostUnitsPerLine = 6; 83 83 84 var85 PerfFreq: int64;86 87 84 procedure TMessgExDlg.FormCreate(Sender: TObject); 88 85 begin … … 203 200 function TMessgExDlg.ShowModal: integer; 204 201 var 205 Ticks0, Ticks: int64;202 Ticks0, Ticks: TDateTime; 206 203 begin 207 204 if GameMode = cMovie then … … 211 208 MovieCancelled := false; 212 209 Show; 213 QueryPerformanceCounter(Ticks0);210 Ticks0 := NowPrecise; 214 211 repeat 215 212 Application.ProcessMessages; 216 213 Sleep(1); 217 QueryPerformanceCounter(Ticks);218 until MovieCancelled or ( (Ticks - Ticks0) * 1000 >= 1500 * PerfFreq);214 Ticks := NowPrecise; 215 until MovieCancelled or (MillisecondOf(Ticks - Ticks0) >= 1500); 219 216 Hide; 220 217 end; … … 563 560 initialization 564 561 565 QueryPerformanceFrequency(PerfFreq);566 567 562 end. -
trunk/LocalPlayer/NatStat.pas
r9 r17 1 {$INCLUDE switches.pas}1 {$INCLUDE Switches.pas} 2 2 unit NatStat; 3 3 -
trunk/LocalPlayer/Nego.pas
r12 r17 1 {$INCLUDE switches.pas}1 {$INCLUDE Switches.pas} 2 2 unit Nego; 3 3 … … 5 5 6 6 uses 7 ScreenTools, BaseWin, Protocol, Term, 8 9 Windows,Messages, SysUtils, Classes, Graphics, Controls, Forms, ButtonA,7 ScreenTools, BaseWin, Protocol, Term, LCLType, 8 9 Messages, SysUtils, Classes, Graphics, Controls, Forms, ButtonA, 10 10 ButtonBase, ButtonB, ButtonC, ButtonN; 11 11 … … 103 103 Messg, ClientTools, Diplomacy, Inp, Select, NatStat, Help, Tribes, MessgEx; 104 104 105 {$R *. DFM}105 {$R *.dfm} 106 106 107 107 const -
trunk/LocalPlayer/PVSB.pas
r9 r17 1 {$INCLUDE switches.pas}1 {$INCLUDE Switches.pas} 2 2 unit PVSB; 3 3 … … 5 5 6 6 uses 7 Windows,LCLIntf, LCLType, LMessages, Messages, SysUtils;7 LCLIntf, LCLType, LMessages, Messages, SysUtils; 8 8 9 9 type … … 28 28 begin 29 29 inc(Count); 30 {$IFDEF WINDOWS} 30 31 sb.h := CreateWindowEx(0, 'SCROLLBAR', pchar('PVSB' + IntToStr(Count)), 31 32 SBS_VERT or WS_CHILD or SBS_RIGHTALIGN, x1 - 100, y0, 100, y1 - y0, 32 33 Handle, 0, 0, nil); 34 {$ENDIF} 33 35 sb.si.cbSize := 28; 34 36 end; … … 60 62 else 61 63 begin 62 if m.wParamLoin [SB_THUMBPOSITION, SB_THUMBTRACK] then64 if (m.wParam and $ffff) in [SB_THUMBPOSITION, SB_THUMBTRACK] then 63 65 begin 64 result := m.wParamHi<> npos;65 npos := m.wParamHi;66 result := ((m.wParam shr 16) and $ffff) <> npos; 67 npos := (m.wParam shr 16) and $ffff; 66 68 end 67 69 else 68 70 begin 69 case m.wParamLoof71 case (m.wParam and $ffff) of 70 72 SB_LINEUP: 71 73 NewPos := npos - 1; … … 84 86 NewPos := nMax - integer(nPage) + 1; 85 87 result := NewPos <> npos; 86 if (NewPos <> npos) or ( m.wParamLo= SB_ENDSCROLL) then88 if (NewPos <> npos) or ((m.wParam and $ffff) = SB_ENDSCROLL) then 87 89 begin 88 90 npos := NewPos; -
trunk/LocalPlayer/Rates.pas
r6 r17 1 {$INCLUDE switches}1 {$INCLUDE Switches.pas} 2 2 unit Rates; 3 3 … … 5 5 6 6 uses 7 Protocol, ScreenTools, BaseWin, 8 9 Windows,Messages, SysUtils, Classes, Graphics, Controls, Forms,7 Protocol, ScreenTools, BaseWin, LCLIntf, LCLType, 8 9 Messages, SysUtils, Classes, Graphics, Controls, Forms, 10 10 ButtonBase, ButtonB, ButtonC; 11 11 … … 34 34 ClientTools, Term, Tribes; 35 35 36 {$R *. DFM}36 {$R *.dfm} 37 37 38 38 const -
trunk/LocalPlayer/Select.pas
r9 r17 1 {$INCLUDE switches.pas}1 {$INCLUDE Switches.pas} 2 2 unit Select; 3 3 … … 69 69 function RenameModel(mix: integer): boolean; 70 70 procedure OnScroll(var m: TMessage); message WM_VSCROLL; 71 procedure OnMouseWheel(var m: TMessage); message WM_MOUSEWHEEL;71 procedure OnMouseWheel(var m: TMessage); message LM_MOUSEWHEEL; 72 72 procedure OnMouseLeave(var Msg: TMessage); message CM_MOUSELEAVE; 73 73 end; -
trunk/LocalPlayer/TechTree.pas
r6 r17 1 {$INCLUDE switches}1 {$INCLUDE Switches.pas} 2 2 unit TechTree; 3 3 … … 5 5 6 6 uses 7 ScreenTools, Messg, 8 9 Windows,Messages, SysUtils, Classes, Graphics, Controls, Forms,7 ScreenTools, Messg, LCLIntf, LCLType, 8 9 Messages, SysUtils, Classes, Graphics, Controls, Forms, 10 10 ButtonBase, ButtonB; 11 11 … … 37 37 Directories; 38 38 39 {$R *. DFM}39 {$R *.dfm} 40 40 41 41 const -
trunk/LocalPlayer/Term.pas
r15 r17 1 {$INCLUDE switches.pas}1 {$INCLUDE Switches.pas} 2 2 unit Term; 3 3 … … 5 5 6 6 uses 7 Windows,Protocol, Tribes, PVSB, ClientTools, ScreenTools, BaseWin, Messg, ButtonBase,7 Protocol, Tribes, PVSB, ClientTools, ScreenTools, BaseWin, Messg, ButtonBase, 8 8 9 9 LCLIntf, LCLType, LMessages, Messages, SysUtils, Classes, Graphics, Controls, Forms, Menus, 10 ExtCtrls, 10 ExtCtrls, dateutils, Platform, 11 11 ButtonA, ButtonB, ButtonC, EOTButton, Area; 12 12 … … 480 480 Jump: array [0 .. nPl - 1] of integer; 481 481 pTurn, pLogo, UnStartLoc, ToldSlavery: integer; 482 PerfFreq: int64;483 482 SmallScreen, GameOK, MapValid, skipped, idle: boolean; 484 483 … … 4205 4204 offscreen.Canvas.Font.Assign(UniFont[ftSmall]); 4206 4205 rec := Rect(0, 0, MapWidth, MapHeight); 4206 {$IFDEF WINDOWS}{TODO Linux} 4207 4207 ScrollDC(offscreen.Canvas.Handle, (xwd - xw) * (xxt * 2), 4208 4208 (ywd - yw) * yyt, rec, rec, 0, nil); 4209 {$ENDIF} 4209 4210 for DoInvalidate := false to FastScrolling do 4210 4211 begin … … 4212 4213 begin 4213 4214 rec.Bottom := MapHeight - overlap; 4215 {$IFDEF WINDOWS}{TODO Linux} 4214 4216 ScrollDC(Canvas.Handle, (xwd - xw) * (xxt * 2), (ywd - yw) * yyt, rec, 4215 4217 rec, 0, nil); 4218 {$ENDIF} 4216 4219 ProcessOptions := prInvalidate; 4217 4220 end … … 6009 6012 SliceCount: integer; 6010 6013 UnitInfo: TUnitInfo; 6011 Ticks0, Ticks: int64;6014 Ticks0, Ticks: TDateTime; 6012 6015 begin 6013 6016 Timer1.Enabled := false; 6014 QueryPerformanceCounter(Ticks0);6017 Ticks0 := NowPrecise; 6015 6018 with ShowMove do 6016 6019 begin … … 6095 6098 Ticks := Ticks0; 6096 6099 repeat 6097 if (SliceCount = 0) or ( (Ticks - Ticks0) * 12000* (SliceCount + 1)6098 div SliceCount < MoveTime * PerfFreq) then6100 if (SliceCount = 0) or (MillisecondOf(Ticks - Ticks0) * 12 * (SliceCount + 1) 6101 div SliceCount < MoveTime) then 6099 6102 begin 6100 6103 if not idle or (GameMode = cMovie) then … … 6103 6106 inc(SliceCount) 6104 6107 end; 6105 QueryPerformanceCounter(Ticks);6106 until (Ticks - Ticks0) * 12000 >= MoveTime * PerfFreq;6108 Ticks := NowPrecise; 6109 until MillisecondOf(Ticks - Ticks0) * 12 >= MoveTime; 6107 6110 Ticks0 := Ticks 6108 6111 end; … … 6466 6469 var 6467 6470 dx, dy: integer; 6468 time0, time1: int64;6471 time0, time1: TDateTime; 6469 6472 begin 6470 6473 if GameMode = cMovie then … … 6551 6554 ' ': 6552 6555 begin // test map repaint time 6553 QueryPerformanceCounter(time0);6556 time0 := NowPrecise; 6554 6557 MapValid := false; 6555 6558 MainOffscreenPaint; 6556 QueryPerformanceCounter(time1);6559 time1 := NowPrecise; 6557 6560 SimpleMessage(Format('Map repaint time: %.3f ms', 6558 [{$IFDEF VER100}(time1.LowPart - time0.LowPart) 6559 {$ELSE}(time1 - time0){$ENDIF} * 1000.0 / PerfFreq])); 6561 [MillisecondOf(time1 - time0)])); 6560 6562 end 6561 6563 end … … 8038 8040 initialization 8039 8041 8040 QueryPerformanceFrequency(PerfFreq);8041 8042 8042 end. -
trunk/LocalPlayer/Tribes.pas
r6 r17 1 {$INCLUDE switches}1 {$INCLUDE Switches.pas} 2 2 unit Tribes; 3 3 -
trunk/LocalPlayer/UnitStat.pas
r9 r17 1 {$INCLUDE switches.pas}1 {$INCLUDE Switches.pas} 2 2 unit UnitStat; 3 3 -
trunk/LocalPlayer/Wonders.pas
r9 r17 1 {$INCLUDE switches.pas}1 {$INCLUDE Switches.pas} 2 2 unit Wonders; 3 3
Note:
See TracChangeset
for help on using the changeset viewer.