- Timestamp:
- Apr 25, 2022, 6:01:01 PM (3 years ago)
- Location:
- trunk
- Files:
-
- 40 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Direct.pas
r382 r423 7 7 Messg, 8 8 9 LCLIntf, LCLType, {$IFDEF Linux}LMessages, {$ENDIF}Messages, SysUtils, Classes,9 LCLIntf, LCLType, {$IFDEF UNIX}LMessages, {$ENDIF}Messages, SysUtils, Classes, 10 10 Graphics, Controls, Forms, DrawDlg, GameServer; 11 11 … … 153 153 State := -1; 154 154 Show; 155 {$IFDEF LINUX}155 {$IFDEF UNIX} 156 156 // Force shown window repaint on Gtk2 widgetset 157 157 Sleep(1); … … 302 302 Invalidate; 303 303 Update; 304 {$IFDEF LINUX}304 {$IFDEF UNIX} 305 305 Application.ProcessMessages; 306 306 {$ENDIF} -
trunk/LocalPlayer/CityScreen.pas
r417 r423 5 5 6 6 uses 7 {$IFDEF LINUX}LMessages,{$ENDIF}7 {$IFDEF UNIX}LMessages,{$ENDIF} 8 8 Protocol, ClientTools, Term, ScreenTools, IsoEngine, BaseWin, 9 9 LCLIntf, LCLType, Messages, SysUtils, Classes, Graphics, Controls, Forms, ExtCtrls, -
trunk/LocalPlayer/Term.pas
r420 r423 5 5 6 6 uses 7 {$IFDEF W indows}7 {$IFDEF WINDOWS} 8 8 Windows, 9 9 {$ENDIF} 10 {$IFDEF Linux}10 {$IFDEF UNIX} 11 11 LMessages, Messages, 12 12 {$ENDIF} … … 4705 4705 end; 4706 4706 4707 {$IFDEF LINUX}4707 {$IFDEF UNIX} 4708 4708 // Can't do scrolling of DC under Linux, then fallback into BitBlt. 4709 4709 function ScrollDC(Canvas: TCanvas; dx: longint; dy: longint; const lprcScroll:TRect; const lprcClip:TRect; hrgnUpdate:HRGN; lprcUpdate: PRect):Boolean; … … 4763 4763 rec, rec, 0, nil); 4764 4764 {$ENDIF} 4765 {$IFDEF LINUX}4765 {$IFDEF UNIX} 4766 4766 ScrollDC(offscreen.Canvas, (xwd - xw) * (xxt * 2), (ywd - yw) * yyt, 4767 4767 rec, rec, 0, nil); … … 4774 4774 rec, 0, nil); 4775 4775 {$ENDIF} 4776 {$IFDEF LINUX}4776 {$IFDEF UNIX} 4777 4777 ScrollDC(Canvas, (xwd - xw) * (xxt * 2), (ywd - yw) * yyt, 4778 4778 rec, rec, 0, nil); … … 6672 6672 NoMap.PaintUnit(xMoving - xMin, yMoving - yMin, UnitInfo, 0); 6673 6673 PaintBufferToScreen(xMin, yMin, xRange, yRange); 6674 {$IFDEF LINUX}6675 // TODO: Force animation under linux6674 {$IFDEF UNIX} 6675 // TODO: Force animation under UNIX 6676 6676 Application.ProcessMessages; 6677 6677 {$ENDIF} -
trunk/LocalPlayer/UKeyBindings.pas
r418 r423 1 1 unit UKeyBindings; 2 3 {$mode delphi}4 2 5 3 interface -
trunk/Network/UNetworkClient.pas
r382 r423 1 1 unit UNetworkClient; 2 3 {$mode delphi}4 2 5 3 interface 6 4 7 5 uses 8 Classes, SysUtils{$IFDEF LINUX}, fpAsync, fpsock{$ENDIF}, Protocol;6 Classes, SysUtils{$IFDEF UNIX}, fpAsync, fpsock{$ENDIF}, Protocol; 9 7 10 {$IFDEF LINUX}8 {$IFDEF UNIX} 11 9 type 12 10 { TTCPClientThread } … … 48 46 49 47 uses 50 LocalPlayer{$IFDEF LINUX}, Global, UNetworkCommon{$ENDIF};48 LocalPlayer{$IFDEF UNIX}, Global, UNetworkCommon{$ENDIF}; 51 49 52 50 procedure Client(Command, Player: Integer; var Data); 53 {$IFDEF LINUX}51 {$IFDEF UNIX} 54 52 var 55 53 Cmd: TCommand; 56 54 {$ENDIF} 57 55 begin 58 {$IFDEF LINUX}56 {$IFDEF UNIX} 59 57 Cmd := TCommand(Command); 60 58 case Cmd of … … 73 71 end; 74 72 75 {$IFDEF LINUX}73 {$IFDEF UNIX} 76 74 function LocalServer(Command, Player, Subject: Integer; var Data): Integer; stdcall; 77 75 begin -
trunk/Network/UNetworkCommon.pas
r365 r423 1 1 unit UNetworkCommon; 2 3 {$mode delphi}4 2 5 3 interface … … 10 8 procedure StreamAppend(Stream: TStream; SourceStream: TStream); 11 9 procedure StreamRemoveRead(Stream: TMemoryStream); 10 12 11 13 12 implementation -
trunk/Network/UNetworkServer.pas
r382 r423 1 1 unit UNetworkServer; 2 2 3 {$mode delphi}4 5 3 interface 6 4 7 5 uses 8 Classes, SysUtils{$IFDEF LINUX}, fgl, fpAsync, fpsock, fphttpclient{$ENDIF}, Protocol;9 10 {$IFDEF LINUX}6 Classes, SysUtils{$IFDEF UNIX}, fgl, fpAsync, fpsock, fphttpclient{$ENDIF}, Protocol; 7 8 {$IFDEF UNIX} 11 9 type 12 10 TNetworkServer = class; … … 87 85 implementation 88 86 89 {$IFDEF LINUX}87 {$IFDEF UNIX} 90 88 uses 91 89 Global, UNetworkCommon; … … 94 92 procedure Client(Command, Player: integer; var Data); 95 93 begin 96 {$IFDEF LINUX}94 {$IFDEF UNIX} 97 95 if not Assigned(NetworkServer) then begin 98 96 NetworkServer := TNetworkServer.Create; … … 107 105 end; 108 106 109 {$IFDEF LINUX}107 {$IFDEF UNIX} 110 108 111 109 { TNetworkServerPlayers } -
trunk/Packages/CevoComponents/DrawDlg.pas
r413 r423 1 1 unit DrawDlg; 2 2 3 {$mode delphi}{$H+}4 5 3 interface 6 4 7 5 uses 8 Classes, SysUtils, Forms, LCLIntf, LCLType, {$IFDEF LINUX}LMessages,{$ENDIF}6 Classes, SysUtils, Forms, LCLIntf, LCLType, {$IFDEF UNIX}LMessages,{$ENDIF} 9 7 Messages, Graphics, Controls, ButtonBase, ButtonA, ButtonB, Area, ScreenTools 10 8 {$IFDEF LCLGTK2}, Gtk2Globals{$ENDIF}; … … 76 74 MoveActive := False; 77 75 AddHandlerOnVisibleChanged(VisibleChangedHandler); 78 {$IFDEF LINUX}76 {$IFDEF UNIX} 79 77 OnDeactivate := DoDeactivate; 80 78 {$ENDIF} … … 131 129 MousePos1: TPoint; 132 130 MousePos2: TPoint; 133 {$IFDEF LINUX}131 {$IFDEF UNIX} 134 132 MousePosNew: TPoint; 135 133 NewFormPos: TPoint; … … 139 137 inherited; 140 138 MousePos2 := Mouse.CursorPos; 141 {$IFDEF LINUX}139 {$IFDEF UNIX} 142 140 // Only if client is not doing own mouse move handling 143 141 if not Assigned(OnMouseDown) or not Assigned(OnMouseMove) or not Assigned(OnMouseUp) then begin -
trunk/Packages/CevoComponents/ScreenTools.pas
r417 r423 1647 1647 I: Integer; 1648 1648 begin 1649 {$IFDEF LINUX}1649 {$IFDEF UNIX} 1650 1650 // Wait and process messages little bit to avoid crash or force repaint under Gtk2 1651 1651 for I := 0 to 10 do begin -
trunk/Packages/CevoComponents/Sound.pas
r383 r423 7 7 StringTables, Directories, LCLType 8 8 {$IFDEF WINDOWS}, MMSystem, Windows{$ENDIF} 9 {$IFDEF LINUX}, Process, AsyncProcess2{$ENDIF};9 {$IFDEF UNIX}, Process, AsyncProcess2{$ENDIF}; 10 10 11 11 type … … 29 29 TSound = class 30 30 private 31 {$IFDEF LINUX}31 {$IFDEF UNIX} 32 32 PlayCommand: string; 33 33 SoundPlayerAsyncProcess: TAsyncProcess; … … 63 63 {$R *.lfm} 64 64 65 {$IFDEF LINUX}65 {$IFDEF UNIX} 66 66 resourcestring 67 67 SUnableToPlay = 'PlayStyle=%s: Unable to play %s Message:%s'; … … 88 88 end 89 89 {$ENDIF} 90 {$IFDEF LINUX}90 {$IFDEF UNIX} 91 91 PlayCommand := GetNonWindowsPlayCommand; 92 92 FDeviceID := 1; … … 100 100 mciSendCommand(FDeviceID, MCI_CLOSE, MCI_WAIT, 0); 101 101 {$ENDIF} 102 {$IFDEF LINUX}102 {$IFDEF UNIX} 103 103 FreeAndNil(SoundPlayerSyncProcess); 104 104 FreeAndNil(SoundPlayerAsyncProcess); … … 162 162 PlayParm: TMCI_Play_Parms; 163 163 {$ENDIF} 164 {$IFDEF LINUX}164 {$IFDEF UNIX} 165 165 var 166 166 L: TStringList; … … 175 175 end 176 176 {$ENDIF} 177 {$IFDEF LINUX}177 {$IFDEF UNIX} 178 178 // How to play in Linux? Use generic Linux commands 179 179 // Use asyncprocess to play sound as SND_ASYNC … … 232 232 mciSendCommand(FDeviceID, MCI_STOP, 0, 0); 233 233 {$ENDIF} 234 {$IFDEF LINUX}234 {$IFDEF UNIX} 235 235 if SoundPlayerSyncProcess <> nil then SoundPlayerSyncProcess.Terminate(1); 236 236 if SoundPlayerAsyncProcess <> nil then SoundPlayerAsyncProcess.Terminate(1); -
trunk/Packages/Common/StopWatch.pas
r396 r423 5 5 6 6 uses 7 {$IFDEF W indows}Windows,{$ENDIF}7 {$IFDEF WINDOWS}Windows,{$ENDIF} 8 8 SysUtils, DateUtils; 9 9 … … 32 32 end; 33 33 34 34 35 implementation 35 36 … … 40 41 fIsRunning := False; 41 42 42 {$IFDEF W indows}43 {$IFDEF WINDOWS} 43 44 fIsHighResolution := QueryPerformanceFrequency(fFrequency) ; 44 45 {$ELSE} -
trunk/Packages/Common/UAboutDialog.pas
r420 r423 1 1 unit UAboutDialog; 2 3 {$mode delphi}4 2 5 3 interface -
trunk/Packages/Common/UApplicationInfo.pas
r396 r423 1 1 unit UApplicationInfo; 2 3 {$mode delphi}4 2 5 3 interface … … 59 57 procedure Register; 60 58 59 61 60 implementation 62 61 -
trunk/Packages/Common/UCommon.pas
r420 r423 1 1 unit UCommon; 2 2 3 {$mode delphi}4 5 3 interface 6 4 7 5 uses 8 {$ ifdef Windows}Windows,{$endif}9 {$ ifdef Linux}baseunix,{$endif}6 {$IFDEF WINDOWS}Windows,{$ENDIF} 7 {$IFDEF UNIX}baseunix,{$ENDIF} 10 8 Classes, SysUtils, StrUtils, Dialogs, Process, LCLIntf, 11 9 FileUtil; //, ShFolder, ShellAPI; … … 35 33 DLLHandle1: HModule; 36 34 37 {$IFDEF W indows}35 {$IFDEF WINDOWS} 38 36 GetUserNameEx: procedure (NameFormat: DWORD; 39 37 lpNameBuffer: LPSTR; nSize: PULONG); stdcall; … … 302 300 end; 303 301 304 {$IFDEF W indows}302 {$IFDEF WINDOWS} 305 303 function GetUserName: string; 306 304 const … … 323 321 end; 324 322 end; 325 {$ endif}323 {$ENDIF} 326 324 327 325 function ComputerName: string; 328 {$ ifdef mswindows}326 {$IFDEF WINDOWS} 329 327 const 330 328 INFO_BUFFER_SIZE = 32767; … … 341 339 end; 342 340 end; 343 {$ endif}344 {$ ifdef unix}341 {$ENDIF} 342 {$IFDEF UNIX} 345 343 var 346 344 Name: UtsName; … … 349 347 Result := Name.Nodename; 350 348 end; 351 {$ endif}352 353 {$ ifdef windows}349 {$ENDIF} 350 351 {$IFDEF WINDOWS} 354 352 function LoggedOnUserNameEx(Format: TUserNameFormat): string; 355 353 const … … 429 427 procedure LoadLibraries; 430 428 begin 431 {$IFDEF W indows}429 {$IFDEF WINDOWS} 432 430 DLLHandle1 := LoadLibrary('secur32.dll'); 433 431 if DLLHandle1 <> 0 then … … 440 438 procedure FreeLibraries; 441 439 begin 442 {$IFDEF W indows}440 {$IFDEF WINDOWS} 443 441 if DLLHandle1 <> 0 then FreeLibrary(DLLHandle1); 444 442 {$ENDIF} -
trunk/Packages/Common/UDebugLog.pas
r396 r423 1 1 unit UDebugLog; 2 3 {$mode delphi}4 2 5 3 interface … … 44 42 45 43 procedure Register; 44 46 45 47 46 implementation -
trunk/Packages/Common/UDelay.pas
r396 r423 1 1 unit UDelay; 2 3 {$mode delphi}4 2 5 3 interface -
trunk/Packages/Common/UFindFile.pas
r396 r423 59 59 FilterAll = '*.*'; 60 60 {$ENDIF} 61 {$IFDEF LINUX}61 {$IFDEF UNIX} 62 62 FilterAll = '*'; 63 63 {$ENDIF} -
trunk/Packages/Common/UFormAbout.pas
r420 r423 1 1 unit UFormAbout; 2 3 {$mode delphi}4 2 5 3 interface -
trunk/Packages/Common/UGeometric.pas
r396 r423 1 1 unit UGeometric; 2 3 {$mode delphi}4 2 5 3 interface … … 26 24 function RectEnlarge(Rect: TRect; Value: Integer): TRect; 27 25 function ShiftRect(ARect: TRect; Delta: TPoint): TRect; 26 28 27 29 28 implementation -
trunk/Packages/Common/UJobProgressView.pas
r396 r423 1 1 unit UJobProgressView; 2 3 {$MODE Delphi}4 2 5 3 interface -
trunk/Packages/Common/ULanguages.pas
r416 r423 1 1 unit ULanguages; 2 3 {$mode delphi}{$H+}4 2 5 3 interface -
trunk/Packages/Common/ULastOpenedList.pas
r396 r423 1 1 unit ULastOpenedList; 2 3 {$mode delphi}4 2 5 3 interface -
trunk/Packages/Common/UListViewSort.pas
r420 r423 2 2 3 3 // Date: 2019-05-17 4 5 {$mode delphi}6 4 7 5 interface -
trunk/Packages/Common/UMemory.pas
r396 r423 1 1 unit UMemory; 2 3 {$mode Delphi}{$H+}4 2 5 3 interface … … 43 41 property Position: Integer read FPosition write FPosition; 44 42 end; 43 45 44 46 45 implementation -
trunk/Packages/Common/UMetaCanvas.pas
r420 r423 1 1 unit UMetaCanvas; 2 3 {$mode delphi}4 2 5 3 interface -
trunk/Packages/Common/UPersistentForm.pas
r396 r423 1 1 unit UPersistentForm; 2 3 {$mode delphi}4 2 5 3 // Date: 2020-11-26 -
trunk/Packages/Common/UPool.pas
r396 r423 1 1 unit UPool; 2 3 {$mode Delphi}{$H+}4 2 5 3 interface -
trunk/Packages/Common/UPrefixMultiplier.pas
r396 r423 2 2 3 3 // Date: 2010-06-01 4 5 {$mode delphi}6 4 7 5 interface -
trunk/Packages/Common/URegistry.pas
r396 r423 1 1 unit URegistry; 2 3 {$MODE delphi}4 2 5 3 interface … … 132 130 function TRegistryEx.OpenKey(const Key: string; CanCreate: Boolean): Boolean; 133 131 begin 134 {$IFDEF Linux}132 {$IFDEF UNIX} 135 133 //CloseKey; 136 134 {$ENDIF} -
trunk/Packages/Common/UResetableThread.pas
r396 r423 1 1 unit UResetableThread; 2 3 {$mode Delphi}{$H+}4 2 5 3 interface -
trunk/Packages/Common/UScaleDPI.pas
r420 r423 2 2 3 3 { See: http://wiki.lazarus.freepascal.org/High_DPI } 4 5 {$mode delphi}{$H+}6 4 7 5 interface … … 227 225 Temp[I] := TBitmap.Create; 228 226 Temp[I].SetSize(NewWidth, NewHeight); 229 {$IFDEF Linux}227 {$IFDEF UNIX} 230 228 Temp[I].PixelFormat := pf24bit; 231 229 {$ELSE} -
trunk/Packages/Common/USyncCounter.pas
r396 r423 1 1 unit USyncCounter; 2 3 {$mode delphi}4 2 5 3 interface … … 25 23 procedure Assign(Source: TSyncCounter); 26 24 end; 25 27 26 28 27 implementation -
trunk/Packages/Common/UThreading.pas
r420 r423 1 1 unit UThreading; 2 3 {$mode delphi}4 2 5 3 interface -
trunk/Packages/Common/UTranslator.pas
r418 r423 1 1 unit UTranslator; 2 3 {$mode delphi}{$H+}4 2 5 3 interface -
trunk/Packages/Common/UURI.pas
r396 r423 2 2 3 3 // Date: 2011-04-04 4 5 {$mode delphi}6 4 7 5 interface … … 84 82 property AsString: string read GetAsString write SetAsString; 85 83 end; 84 86 85 87 86 implementation -
trunk/Packages/Common/UXMLUtils.pas
r396 r423 1 1 unit UXMLUtils; 2 3 {$mode delphi}4 2 5 3 interface -
trunk/Platform.pas
r290 r423 1 1 unit Platform; 2 3 {$mode delphi}{$H+}4 2 5 3 interface 6 4 7 5 uses 8 {$IFDEF W indows}Windows,{$ENDIF}9 {$IFDEF Linux}Unix,{$ENDIF}6 {$IFDEF WINDOWS}Windows,{$ENDIF} 7 {$IFDEF UNIX}Unix,{$ENDIF} 10 8 Classes, SysUtils, DateUtils, SyncObjs; 11 9 … … 14 12 implementation 15 13 16 {$IFDEF W indows}14 {$IFDEF WINDOWS} 17 15 var 18 16 PerformanceFrequency: Int64; … … 24 22 function NowPrecise: TDateTime; 25 23 var 26 {$IFDEF Linux}T: TimeVal;{$ENDIF}27 {$IFDEF W indows}TimerValue: Int64;{$ENDIF}24 {$IFDEF UNIX}T: TimeVal;{$ENDIF} 25 {$IFDEF WINDOWS}TimerValue: Int64;{$ENDIF} 28 26 begin 29 27 // Result := Now; 30 28 //try 31 29 //NowPreciseLock.Acquire; 32 {$IFDEF W indows}30 {$IFDEF WINDOWS} 33 31 QueryPerformanceCounter(TimerValue); 34 32 //Result := Int64(TimeStampToMSecs(DateTimeToTimeStamp(Now)) * 1000) // an alternative Win32 timebase … … 36 34 {$ENDIF} 37 35 38 {$IFDEF Linux}36 {$IFDEF UNIX} 39 37 fpgettimeofday(@t, nil); 40 38 // Build a 64 bit microsecond tick from the seconds and microsecond longints … … 51 49 initialization 52 50 53 {$IFDEF W indows}51 {$IFDEF WINDOWS} 54 52 QueryPerformanceFrequency(PerformanceFrequency); 55 53 {$ENDIF} -
trunk/Settings.pas
r416 r423 1 1 unit Settings; 2 3 {$mode delphi}4 2 5 3 interface -
trunk/Start.pas
r417 r423 7 7 GameServer, Messg, ButtonBase, ButtonA, ButtonC, ButtonB, Area, Types, 8 8 LCLIntf, LCLType, SysUtils, Classes, Graphics, Controls, Forms, StdCtrls, 9 Menus, Registry, 9 Menus, Registry, DrawDlg, fgl, Protocol, UMiniMap, UBrain, UTranslator; 10 10 11 11 type -
trunk/UBrain.pas
r417 r423 1 1 unit UBrain; 2 3 {$mode delphi}4 2 5 3 interface … … 126 124 DLLName := BasePath + DirectorySeparator + Value 127 125 {$ENDIF}{$ENDIF} 128 {$IFDEF LINUX}{$IFDEF CPU32}126 {$IFDEF UNIX}{$IFDEF CPU32} 129 127 else if Key = '#PATH_LINUX32' then 130 128 DLLName := BasePath + DirectorySeparator + Value 131 129 {$ENDIF}{$ENDIF} 132 {$IFDEF LINUX}{$IFDEF CPU64}130 {$IFDEF UNIX}{$IFDEF CPU64} 133 131 else if Key = '#PATH_LINUX64' then 134 132 DLLName := BasePath + DirectorySeparator + Value
Note:
See TracChangeset
for help on using the changeset viewer.