Subversion Repositories spacemission

Compare Revisions

Regard whitespace Rev 57 → Rev 21

/VCL_DELPHIX_D6/DXPlay.pas
1,15 → 1,13
unit DXPlay;
 
interface
 
{$INCLUDE DelphiXcfg.inc}
 
{$IFNDEF UseDirectPlay}
// If you want to use DXPlay.pas, please enable the IFDEF UseDirectPlay in DelphiXcfg.inc
interface
implementation
{$ELSE} // !UseDirectPlay
{$IFNDEF UseDirectPlay} // Daniel Marschall 12.04.2024 Added to avoid Windows showing "This app requires DirectPlay"
{$MESSAGE ERROR 'If you want to use DXPlay.pas, please enable the IFDEF UseDirectPlay in DelphiXcfg.inc'}
{$ENDIF}
 
interface
 
uses
Windows, SysUtils, Classes, Forms, DXClass, ActiveX, DXETable,
{$IfDef StandardDX}
1234,6 → 1232,4
CoInitialize(nil);
finalization
CoUninitialize;
{$ENDIF} // UseDirectPlay
 
end.
/VCL_DELPHIX_D6/DelphiXcfg.inc
911,7 → 911,7
{only for special purpose, multimonitors etc.}
{.$DEFINE _DMO_}
 
{When you need DirectPlay, please remove this definition. It is not enabled by default, because}
{When you need DirectPlay, please remove the dot. It is not enabled by default, because}
{DirectPlay is not shipped with Windows by default, and the user might receive a warning}
{that the app might not work if DirectPlay is not installed.}
{.$Define UseDirectPlay}
/VCL_DELPHIX_D6/DirectPlay.pas
1,13 → 1,5
unit DirectPlay;
 
{$INCLUDE DelphiXcfg.inc}
 
{$IFNDEF UseDirectPlay}
// If you want to use DirectPlay.pas, please enable the IFDEF UseDirectPlay in DelphiXcfg.inc
interface
implementation
{$ELSE} // !UseDirectPlay
 
(*==========================================================================;
*
* Copyright (C) Microsoft Corporation. All Rights Reserved.
26,6 → 18,12
 
interface
 
{$INCLUDE DelphiXcfg.inc}
 
{$IFNDEF UseDirectPlay} // Daniel Marschall 12.04.2024 Added to avoid Windows showing "This app requires DirectPlay"
{$MESSAGE ERROR 'If you want to use DXPlay.pas, please enable the IFDEF UseDirectPlay in DelphiXcfg.inc'}
{$ENDIF}
 
{$MINENUMSIZE 4}
{$ALIGN ON}
 
2516,6 → 2514,4
if DPlayDLL <> 0 then FreeLibrary(DPlayDLL);
end;
 
{$ENDIF} // UseDirectPlay
 
end.
/VCL_DELPHIX_D6/DXReg.pas
222,9 → 222,7
 
RegisterComponentEditor(TCustomDXInput, TDXInputEditor);
 
{$IFDEF UseDirectPlay}
RegisterPropertyEditor(TypeInfo(string), TCustomDXPlay, 'GUID', TGUIDProperty);
{$ENDIF} // UseDirectPlay
 
RegisterPropertyEditor(TypeInfo(TImageSprite), NIL, '', TSpriteProperty);
RegisterPropertyEditor(TypeInfo(TImageSpriteEx), NIL, '', TSpriteProperty);
246,9 → 244,7
TDXWave,
TDXWaveList,
TDXInput,
{$IFDEF UseDirectPlay}
TDXPlay,
{$ENDIF} // UseDirectPlay
TDXSpriteEngine,
TDXTimer,
TDXPaintBox,
/VCL_DELPHIX_D6/DXSounds.pas
3243,11 → 3243,8
end;
 
procedure TMusicListCollectionItem.SaveToFile(const MidiFileName: string);
var F: file; BakFileMode: integer;
var F: file;
begin
BakFileMode := FileMode;
FileMode := 1; // Read/Write
try
AssignFile(F, MidiFileName);
Rewrite(F, 1);
try
3255,17 → 3252,11
finally
CloseFile(F);
end;
finally
FileMode := BakFileMode;
end;
end;
 
procedure TMusicListCollectionItem.LoadFromFile(const MidiFileName: string);
var F: file; S: string; I: Integer; BakFileMode: integer;
var F: file; S: string; I: Integer;
begin
BakFileMode := FileMode;
FileMode := 0; // Read only
try
AssignFile(F, MidiFileName);
Reset(F, 1);
try
3279,10 → 3270,7
CloseFile(F);
end;
Name := ExtractFileName(MidiFileName);
finally
FileMode := BakFileMode;
end;
end;
 
function TMusicListCollectionItem.Size: Integer;
begin
/VCL_DELPHIX_D6/DXETable.pas
32,9 → 32,7
{$ENDIF}
function DSoundErrorMsg(ErrorCode: HRESULT): string;
function DInputErrorMsg(ErrorCode: HRESULT): string;
{$IFDEF UseDirectPlay}
function DPlayErrorMsg(ErrorCode: HRESULT): string;
{$EndIf} // UseDirectPlay
 
implementation
 
297,7 → 295,6
Result := WindowsErrorMsg(ErrorCode);
end;
end;
{$IFDEF UseDirectPlay}
{$IfDef DX9}
function DPlayErrorMsg(ErrorCode: HRESULT): string;
begin
431,5 → 428,4
end;
end;
{$EndIf}
{$EndIf} // UseDirectPlay
end.
end.
/VCL_DELPHIX_D6/DXPlayFm.pas
1,15 → 1,7
unit DXPlayFm;
 
interface
{$INCLUDE DelphiXcfg.inc}
 
{$IFNDEF UseDirectPlay}
// If you want to use DXPlayFm.pas, please enable the IFDEF UseDirectPlay in DelphiXcfg.inc
interface
implementation
{$ELSE} // !UseDirectPlay
 
interface
 
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, ExtCtrls, DXPlay, ActiveX, DXETable, DIB,
436,7 → 428,5
end;
end;
 
{$ENDIF} // UseDirectPlay
 
end.