Changeset 17
- Timestamp:
- Jan 8, 2017, 11:21:02 AM (8 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 37 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/CityProcessing.pas
r6 r17 1 {$INCLUDE switches}1 {$INCLUDE Switches} 2 2 unit CityProcessing; 3 3 -
trunk/CmdList.pas
r6 r17 1 {$INCLUDE switches}1 {$INCLUDE Switches} 2 2 unit CmdList; 3 3 -
trunk/GameServer.pas
r10 r17 7 7 8 8 uses 9 Protocol, Database, dynlibs, Windows;9 Protocol, Database, dynlibs, Platform, dateutils; 10 10 11 11 const … … 127 127 AIInfo: array [0 .. nPl - 1] of string; 128 128 Notify: TNotifyFunction; 129 PerfFreq, LastClientTime: int64;129 LastClientTime: TDateTime; 130 130 {$IFOPT O-}HandoverStack: array [0 .. 31] of Cardinal; {$ENDIF} 131 131 AutoSaveExists, LoadOK, WinOnAlone, PreviewElevation, MovieStopped: boolean; … … 320 320 var 321 321 p: integer; 322 T: int64;322 T: TDateTime; 323 323 begin 324 QueryPerformanceCounter(T);324 T := NowPrecise; 325 325 PutMessage(1 shl 16 + 2, Format('CLIENT: took %.1f ms', 326 [{$IFDEF VER100}(T.LowPart - LastClientTime.LowPart) 327 {$ELSE}(T - LastClientTime){$ENDIF} * 1000.0 / PerfFreq])); 326 [MilliSecondOf(T - LastClientTime)])); 328 327 LastClientTime := T; 329 328 PutMessage(1 shl 16 + 2, Format('CLIENT: calling %d (%s)', … … 4472 4471 initialization 4473 4472 4474 QueryPerformanceFrequency(PerfFreq);4475 4473 FindFirst(ParamStr(0), $21, ExeInfo); 4476 4474 -
trunk/IPQ.pas
r2 r17 2 2 code contributed by Rassim Eminli} 3 3 4 {$INCLUDE switches.pas}4 {$INCLUDE Switches.pas} 5 5 6 6 unit IPQ; -
trunk/Integrated.lpi
r15 r17 86 86 </Item2> 87 87 </RequiredPackages> 88 <Units Count="4 1">88 <Units Count="42"> 89 89 <Unit0> 90 90 <Filename Value="Integrated.lpr"/> … … 309 309 <HasResources Value="True"/> 310 310 </Unit40> 311 <Unit41> 312 <Filename Value="Platform.pas"/> 313 <IsPartOfProject Value="True"/> 314 </Unit41> 311 315 </Units> 312 316 </ProjectOptions> … … 338 342 <StackChecks Value="True"/> 339 343 </Checks> 340 <VerifyObjMethodCallValidity Value="True"/>341 <TargetCPU Value="i386"/>342 <TargetOS Value="win32"/>343 344 </CodeGeneration> 344 345 <Linking> -
trunk/Integrated.lpr
r10 r17 45 45 TechTree in 'LocalPlayer\TechTree.pas' {TechTreeDlg}; 46 46 47 {$R cevo. RES}47 {$R cevo.res} 48 48 49 49 {$IFDEF DEBUG} -
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 -
trunk/Messg.pas
r9 r17 92 92 else 93 93 begin 94 if integer( Msg.LParamHi) >= Top + TitleHeight then94 if integer((Msg.LParam shr 16) and $ffff) >= Top + TitleHeight then 95 95 Msg.result := HTCLIENT 96 96 else … … 100 100 begin 101 101 ControlBounds := Controls[i].BoundsRect; 102 if (integer(Msg.LParam Lo) >= Left + ControlBounds.Left) and103 (integer(Msg.LParam Lo) < Left + ControlBounds.Right) and104 (integer( Msg.LParamHi) >= Top + ControlBounds.Top) and105 (integer( Msg.LParamHi) < Top + ControlBounds.Bottom) then102 if (integer(Msg.LParam and $ffff) >= Left + ControlBounds.Left) and 103 (integer(Msg.LParam and $ffff) < Left + ControlBounds.Right) and 104 (integer((Msg.LParam shr 16 ) and $ffff) >= Top + ControlBounds.Top) and 105 (integer((Msg.LParam shr 16) and $ffff) < Top + ControlBounds.Bottom) then 106 106 begin 107 107 Msg.result := HTCLIENT; -
trunk/NoTerm.pas
r6 r17 1 {$INCLUDE switches}1 {$INCLUDE Switches.pas} 2 2 unit NoTerm; 3 3 … … 5 5 6 6 uses 7 ScreenTools, Protocol, Messg, 8 9 Windows,Messages, SysUtils, Classes, Graphics, Controls, Forms,7 ScreenTools, Protocol, Messg, LCLIntf, LCLType, dateutils, Platform, 8 9 Messages, SysUtils, Classes, Graphics, Controls, Forms, 10 10 ButtonBase, ButtonB; 11 11 … … 23 23 private 24 24 me, Active, ToldAlive, Round: integer; 25 PerfFreq, LastShowYearTime, LastShowTurnChange, LastNewTurn: int64;25 LastShowYearTime, LastShowTurnChange, LastNewTurn: TDateTime; 26 26 TurnTime, TotalStatTime: extended; 27 27 G: TNewGameData; … … 47 47 uses GameServer, log, Start; 48 48 49 {$R *. DFM}49 {$R *.dfm} 50 50 51 51 const … … 81 81 TitleHeight := 36; 82 82 InitButtons(); 83 QueryPerformanceFrequency(PerfFreq);84 83 LastShowYearTime := 0; 85 84 end; … … 139 138 ShipComplete: boolean; 140 139 r: TRect; 141 now : int64;140 nowt: TDateTime; 142 141 begin 143 142 case Command of … … 213 212 end; // should not happen 214 213 215 QueryPerformanceCounter(now);216 if {$IFDEF VER100}(now.LowPart - LastShowYearTime.LowPart){$ELSE}(now - LastShowYearTime){$ENDIF} / PerfFreq>= UpdateInterval then214 nowt := NowPrecise; 215 if SecondOf(nowt - LastShowYearTime) >= UpdateInterval then 217 216 begin 218 217 ShowYear; 219 LastShowYearTime := now ;218 LastShowYearTime := nowt; 220 219 end; 221 TurnTime := 222 {$IFDEF VER100}(now.LowPart - LastNewTurn.LowPart){$ELSE}(now - LastNewTurn){$ENDIF} / PerfFreq; 223 LastNewTurn := now; 220 TurnTime := SecondOf(nowt - LastNewTurn); 221 LastNewTurn := nowt; 224 222 if (G.RO[me].Alive <> ToldAlive) then 225 223 begin … … 267 265 cShowTurnChange: 268 266 begin 269 QueryPerformanceCounter(now);267 nowt := NowPrecise; 270 268 if Active >= 0 then 271 269 begin 272 ActiveDuration := 273 {$IFDEF VER100}(now.LowPart - LastShowTurnChange.LowPart){$ELSE}(now - LastShowTurnChange){$ENDIF} / PerfFreq; 270 ActiveDuration := SecondOf(nowt - LastShowTurnChange); 274 271 TimeStat[Active] := TimeStat[Active] + ActiveDuration; 275 272 TotalStatTime := TotalStatTime + ActiveDuration; … … 279 276 (ActiveDuration < ShowActiveThreshold); 280 277 end; 281 LastShowTurnChange := now ;278 LastShowTurnChange := nowt; 282 279 283 280 Active := integer(Data); -
trunk/Protocol.pas
r15 r17 1 {$INCLUDE switches.pas}1 {$INCLUDE Switches.pas} 2 2 {$HINTS OFF} 3 3 unit Protocol; -
trunk/ScreenTools.pas
r15 r17 5 5 6 6 uses 7 Windows,StringTables,7 StringTables, 8 8 LCLIntf, LCLType, LMessages, Messages, SysUtils, Classes, Graphics, Controls, 9 9 Forms, Menus; … … 16 16 end; 17 17 18 {$IFDEF WINDOWS} 18 19 function ChangeResolution(x, y, bpp, freq: integer): boolean; 20 {$ENDIF} 19 21 procedure RestoreResolution; 20 22 function Play(Item: string; Index: integer = -1): boolean; … … 192 194 193 195 var 196 {$IFDEF WINDOWS} 194 197 StartResolution: TDeviceMode; 198 {$ENDIF} 195 199 ResolutionChanged: boolean; 196 200 … … 198 202 GammaLUT: array [0 .. 255] of Byte; 199 203 204 {$IFDEF WINDOWS} 200 205 function ChangeResolution(x, y, bpp, freq: integer): boolean; 201 206 var … … 213 218 ResolutionChanged := true; 214 219 end; 220 {$ENDIF} 215 221 216 222 procedure RestoreResolution; 217 223 begin 224 {$IFDEF WINDOWS} 218 225 if ResolutionChanged then 219 226 ChangeDisplaySettings(StartResolution, 0); 227 {$ENDIF} 220 228 ResolutionChanged := false; 221 229 end; … … 1476 1484 end; 1477 1485 1486 {$IFDEF WINDOWS} 1478 1487 EnumDisplaySettings(nil, $FFFFFFFF, StartResolution); 1488 {$ENDIF} 1479 1489 ResolutionChanged := false; 1480 1490 -
trunk/Sound.pas
r6 r17 4 4 5 5 uses 6 Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, MMSystem;6 Messages, SysUtils, Classes, Graphics, Controls, Forms {$IFDEF WINDOWS}, MMSystem{$ENDIF}; 7 7 8 8 function PrepareSound(FileName: string): integer; … … 12 12 TSoundPlayer = class(TForm) 13 13 private 14 procedure OnMCI(var m: TMessage); message MM_MCINOTIFY; 14 {$IFDEF WINDOWS} 15 procedure OnMCI(var m: TMessage); message MM_MCINOTIFY;} 16 {$ENDIF} 15 17 end; 16 18 17 19 implementation 18 20 19 {$R *. DFM}21 {$R *.dfm} 20 22 21 23 type … … 32 34 33 35 constructor TSound.Create(const FileName: string); 36 {$IFDEF WINDOWS} 34 37 var 35 38 OpenParm: TMCI_Open_Parms; 39 {$ENDIF} 36 40 begin 41 {$IFDEF WINDOWS} 37 42 FDeviceID := 0; 38 43 FFileName := FileName; … … 46 51 FDeviceID := OpenParm.wDeviceID; 47 52 end 53 {$ENDIF} 48 54 end; 49 55 50 56 destructor TSound.Destroy; 51 57 begin 58 {$IFDEF WINDOWS} 52 59 if FDeviceID <> 0 then 53 mciSendCommand(FDeviceID, MCI_CLOSE, MCI_WAIT, 0); 60 mciSendCommand(FDeviceID, MCI_CLOSE, MCI_WAIT, 0);} 61 {$ENDIF} 54 62 inherited Destroy; 55 63 end; 56 64 57 65 procedure TSound.Play(HWND: DWORD); 66 {$IFDEF WINDOWS} 58 67 var 59 68 PlayParm: TMCI_Play_Parms; 69 {$ENDIF} 60 70 begin 71 {$IFDEF WINDOWS} 61 72 if FDeviceID <> 0 then 62 73 begin … … 64 75 mciSendCommand(FDeviceID, MCI_PLAY, MCI_NOTIFY, integer(@PlayParm)); 65 76 end 77 {$ENDIF} 66 78 end; 67 79 68 80 procedure TSound.Stop; 69 81 begin 82 {$IFDEF WINDOWS} 70 83 mciSendCommand(FDeviceID, MCI_STOP, 0, 0); 84 {$ENDIF} 71 85 end; 72 86 73 87 procedure TSound.Reset; 74 88 begin 89 {$IFDEF WINDOWS} 75 90 mciSendCommand(FDeviceID, MCI_SEEK, MCI_SEEK_TO_START, 0); 91 {$ENDIF} 76 92 end; 77 93 … … 85 101 PlayingSound: TSound; 86 102 103 {$IFDEF WINDOWS} 87 104 procedure TSoundPlayer.OnMCI(var m: TMessage); 88 105 begin … … 93 110 end; 94 111 end; 112 {$ENDIF} 95 113 96 114 function PrepareSound(FileName: string): integer; -
trunk/Start.pas
r15 r17 249 249 if Reg.ValueExists('ResolutionFreq') then 250 250 ResolutionFreq := Reg.ReadInteger('ResolutionFreq'); 251 {$IFDEF WINDOWS} 251 252 if ScreenMode = 2 then 252 253 ChangeResolution(ResolutionX, ResolutionY, ResolutionBPP, 253 254 ResolutionFreq); 255 {$ENDIF} 254 256 Reg.closekey; 255 257 end; -
trunk/StringTables.pas
r6 r17 1 {$INCLUDE switches}1 {$INCLUDE Switches} 2 2 unit StringTables; 3 3 -
trunk/UnitProcessing.pas
r6 r17 1 {$INCLUDE switches}1 {$INCLUDE Switches} 2 2 unit UnitProcessing; 3 3
Note:
See TracChangeset
for help on using the changeset viewer.