Subversion Repositories spacemission

Compare Revisions

Regard whitespace Rev 21 → Rev 57

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