aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/Classes/UPlatformWindows.pas
diff options
context:
space:
mode:
authortobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-04-06 11:36:03 +0000
committertobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-04-06 11:36:03 +0000
commitb2a824d8f4fcf4d9038e2a360ac586fb0279e739 (patch)
tree79c473600e6ada136c7b2e63c8725565f8c4c521 /Game/Code/Classes/UPlatformWindows.pas
parentda94f9cb1798038b5bbf898b1a92ab03c3a1628e (diff)
downloadusdx-b2a824d8f4fcf4d9038e2a360ac586fb0279e739.tar.gz
usdx-b2a824d8f4fcf4d9038e2a360ac586fb0279e739.tar.xz
usdx-b2a824d8f4fcf4d9038e2a360ac586fb0279e739.zip
removed lazarus dependencies
- added an implementation of AllocateHWnd/DeallocateHWnd to UCommon for the Win32 only units DirWatch and Midi... (do not use AllocateHWnd somewhere else) - added an own implementation of ShowMessage to UCommon (uses MessageBox in Windows, console-output otherwise) - linux still needs lresources for the lrs-file (will be removed soon) - the FPC windows version uses windows resources now (instead of lrs ones). compile them with windres (in FPC's "bin" dir) or delphi (a batch-file for windres will follow soon) - changed path-separator from '\' to '/' in RC-file for windres compatibility git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1006 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'Game/Code/Classes/UPlatformWindows.pas')
-rw-r--r--Game/Code/Classes/UPlatformWindows.pas55
1 files changed, 27 insertions, 28 deletions
diff --git a/Game/Code/Classes/UPlatformWindows.pas b/Game/Code/Classes/UPlatformWindows.pas
index 3d1713ee..a0192b57 100644
--- a/Game/Code/Classes/UPlatformWindows.pas
+++ b/Game/Code/Classes/UPlatformWindows.pas
@@ -23,15 +23,14 @@ type
procedure halt;
function GetLogPath : WideString;
- function GetGameSharedPath : WideString;
- function GetGameUserPath : WideString;
+ function GetGameSharedPath : WideString;
+ function GetGameUserPath : WideString;
end;
implementation
uses SysUtils,
- Windows,
- Forms;
+ Windows;
type
@@ -198,30 +197,30 @@ begin
end;
function TPlatformWindows.GetLogPath : WideString;
-begin
- result := ExtractFilePath(ParamStr(0));
-end;
-
-function TPlatformWindows.GetGameSharedPath : WideString;
-begin
- result := ExtractFilePath(ParamStr(0));
-end;
-
-function TPlatformWindows.GetGameUserPath : WideString;
-begin
- result := ExtractFilePath(ParamStr(0));
-end;
-
- function TPlatformWindows.FindSongFile(Dir, Mask: widestring): widestring;
- var
- SR: TSearchRec; // for parsing song directory
-begin
- Result := '';
- if SysUtils.FindFirst(Dir + Mask, faDirectory, SR) = 0 then begin
- Result := SR.Name;
- end; // if
- SysUtils.FindClose(SR);
-end;
+begin
+ result := ExtractFilePath(ParamStr(0));
+end;
+
+function TPlatformWindows.GetGameSharedPath : WideString;
+begin
+ result := ExtractFilePath(ParamStr(0));
+end;
+
+function TPlatformWindows.GetGameUserPath : WideString;
+begin
+ result := ExtractFilePath(ParamStr(0));
+end;
+
+function TPlatformWindows.FindSongFile(Dir, Mask: widestring): widestring;
+var
+ SR: TSearchRec; // for parsing song directory
+begin
+ Result := '';
+ if SysUtils.FindFirst(Dir + Mask, faDirectory, SR) = 0 then begin
+ Result := SR.Name;
+ end; // if
+ SysUtils.FindClose(SR);
+end;
end.