Entire Dxbx project group builds witn Delphi XE6

Still some warning, but that's fine for now.
This commit is contained in:
PatrickvL 2016-12-30 10:52:19 +01:00
parent 74f9a356d6
commit 58d03538c6
17 changed files with 49 additions and 34 deletions

3
.gitignore vendored
View file

@ -6,4 +6,5 @@
*.exe
*.map
*.dcu
*.drc
*.drc
*.dll

View file

@ -20,7 +20,6 @@ program Dxbx;
{$INCLUDE Dxbx.inc}
{$R 'DxbxResources.res' '..\..\..\Resources\DxbxResources.rc'}
{$R 'SvnRevision.res' '..\..\..\Resources\SvnRevision.rc'}
uses
SysUtils,

View file

@ -54,7 +54,7 @@
<DCC_DependencyCheckOutputName>..\..\..\Source\Delphi\Bin\Dxbx.exe</DCC_DependencyCheckOutputName>
</PropertyGroup>
<PropertyGroup Condition="'$(Base_Win32)'!=''">
<DCC_Namespace>Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)</DCC_Namespace>
<DCC_Namespace>System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Bde;$(DCC_Namespace)</DCC_Namespace>
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
<Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
<VerInfo_Locale>1033</VerInfo_Locale>
@ -153,10 +153,6 @@
<ContainerId>RC</ContainerId>
<Form>DxbxResources.res</Form>
</RcCompile>
<RcCompile Include="..\..\..\Resources\SvnRevision.rc">
<ContainerId>RC</ContainerId>
<Form>SvnRevision.res</Form>
</RcCompile>
<DCCReference Include="..\..\..\Source\Delphi\src\uEmuShared.pas"/>
<DCCReference Include="..\..\..\Source\Delphi\src\uError.pas"/>
<DCCReference Include="..\..\..\Source\Delphi\src\ufrm_About.pas">

View file

@ -32,8 +32,9 @@ library DxbxKrnl;
{$IFDEF USE_SVN}
{$R 'SvnRevision.res' '..\..\..\Resources\SvnRevision.rc'}
{$ENDIF}
uses
Windows,

View file

@ -48,7 +48,7 @@
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
<Debugger_HostApplication>..\..\bin\Dxbx.exe</Debugger_HostApplication>
<VerInfo_Locale>1033</VerInfo_Locale>
<DCC_Namespace>Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)</DCC_Namespace>
<DCC_Namespace>System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)</DCC_Namespace>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_1)'!=''">
<DCC_UnitSearchPath>..\..\..\Libraries\Pascal\GlScene</DCC_UnitSearchPath>
@ -121,7 +121,6 @@
</Delphi.Personality>
<ModelSupport>False</ModelSupport>
<Platforms>
<Platform value="OSX32">False</Platform>
<Platform value="Win32">True</Platform>
<Platform value="Win64">False</Platform>
</Platforms>
@ -132,10 +131,6 @@
<DelphiCompile Include="$(MainSource)">
<MainSource>MainSource</MainSource>
</DelphiCompile>
<RcCompile Include="..\..\..\Resources\SvnRevision.rc">
<ContainerId>RC</ContainerId>
<Form>SvnRevision.res</Form>
</RcCompile>
<DCCReference Include="..\..\..\Source\Delphi\src\DxbxKrnl\EmuD3D8\uConvert.pas"/>
<DCCReference Include="..\..\..\Source\Delphi\src\DxbxKrnl\EmuD3D8\uMiniport.pas"/>
<DCCReference Include="..\..\..\Source\Delphi\src\DxbxKrnl\EmuD3D8\uNV2A.pas"/>

View file

@ -1182,7 +1182,7 @@ begin
if Type_ = PARAM_VALUE then
begin
Result := Format('%f', [GetConstValue]);
if Pos(DecimalSeparator, Result) > 0 then
if Pos(FormatSettings.DecimalSeparator, Result) > 0 then
Result := Result + 'f';
Exit;

View file

@ -3224,7 +3224,7 @@ begin
{$IFDEF DXBX_USE_D3D9}
Result := g_pD3DDevice.CreateStateBlock(Type_, PIDirect3DStateBlock9(pToken));
{$ELSE}
Result := g_pD3DDevice.CreateStateBlock(Type_, {out}pToken^);
Result := g_pD3DDevice.CreateStateBlock(Type_, {out}DWord(pToken^));
{$ENDIF}
if (FAILED(Result)) then
@ -3348,7 +3348,7 @@ begin
{$IFDEF DXBX_USE_D3D9}
Result := g_pD3DDevice.EndStateBlock(PIDirect3DStateBlock(pToken));
{$ELSE}
Result := g_pD3DDevice.EndStateBlock({out}pToken^);
Result := g_pD3DDevice.EndStateBlock({out}DWord(pToken^));
{$ENDIF}
EmuSwapFS(fsXbox);
@ -5386,7 +5386,7 @@ begin
if DxbxTextureStageStateInfo[Type_VersionIndependent].X then
PValue^ := XTL_EmuD3DDeferredTextureState[Stage, Ord(Type_)]
else
IDirect3DDevice_GetTextureStageState(g_pD3DDevice, Stage, Type_VersionIndependent, {out}pValue^);
IDirect3DDevice_GetTextureStageState(g_pD3DDevice, Stage, Type_VersionIndependent, {out}DWORD(pValue^));
end;
Result := D3D_OK;
@ -5596,7 +5596,7 @@ begin
if DxbxRenderStateInfo[State_VersionIndependent].PC = D3DRS_UNSUPPORTED then // Xbox extensions have no PC state
PValue^ := XTL_EmuMappedD3DRenderState[State_VersionIndependent]^
else
g_pD3DDevice.GetRenderState(DxbxRenderStateInfo[State_VersionIndependent].PC, {out}PValue^);
g_pD3DDevice.GetRenderState(DxbxRenderStateInfo[State_VersionIndependent].PC, {out}DWord(PValue^));
end;
Result := S_OK;

View file

@ -1677,7 +1677,7 @@ begin
_(pdwSpeakerConfig, 'pdwSpeakerConfig').
LogEnd();
Result := IDirectSound(g_pDSound8).GetSpeakerConfig({out}pdwSpeakerConfig^);
Result := IDirectSound(g_pDSound8).GetSpeakerConfig({out}DWORD(pdwSpeakerConfig^));
// Convert return value from native to Xbox :
if Result = DS_OK then
@ -3420,7 +3420,7 @@ begin
if (Self <> nil) and (Self.EmuDirectSoundBuffer8 <> nil) then
begin
hRet := IDirectSoundBuffer(Self.EmuDirectSoundBuffer8).GetStatus({out}pdwStatus^);
hRet := IDirectSoundBuffer(Self.EmuDirectSoundBuffer8).GetStatus({out}DWORD(pdwStatus^));
end
else
begin

View file

@ -1021,7 +1021,7 @@ begin
_(lpExitCode, 'lpExitCode').
LogEnd();
Result := BOOL(GetExitCodeThread(hThread, {var}lpExitCode^));
Result := BOOL(GetExitCodeThread(hThread, {var}DWORD(lpExitCode^)));
EmuSwapFS(fsXbox);
end;
@ -1322,7 +1322,7 @@ begin
_(bWait, 'bWait').
LogEnd();
Result := BOOL(GetOverlappedResult(hFile, lpOverlapped^, {var}lpNumberOfBytesTransferred^, JwaWinType.BOOL(bWait)));
Result := BOOL(GetOverlappedResult(hFile, lpOverlapped^, {var}DWORD(lpNumberOfBytesTransferred^), JwaWinType.BOOL(bWait)));
if MayLog(lfUnit) then
DbgPrintf('EmuXapi : EmuGetOverlappedResult lpNumberOfBytesTransferred^ = 0x%.08X', [lpNumberOfBytesTransferred^]);

View file

@ -55,6 +55,9 @@
{$ENDIF}
{$UNDEF USE_SVN} // Define when this repository is hosted on subversion
{$DEFINE USE_GITHUB} // Define when this repository is hosted on github
{.$DEFINE DXBX_RECTYPE} // Include RecType info in PatternTrie
{.$DEFINE DXBX_TRIE_COMPRESS_STRINGS} // Apply prefix reduction to string stored in the Trie
{.$DEFINE DXBX_TRACE_MEMLEAKS} // Enable memleak-tracing (FastMM4 needed)
@ -177,6 +180,10 @@
{$WARN UNSAFE_CAST OFF}
{$ENDIF}
{$IFDEF SUPPORTS_POINTERMATH}
{$POINTERMATH ON}
{$ENDIF}
{$IFDEF COMPILER12_UP} // TODO : Use SUPPORTS_WEAKLINKRTTI once jedi.inc offers this
// Reduce executable size by leaving out all compiler-generated RTTI :
{$WEAKLINKRTTI ON}

View file

@ -26,7 +26,7 @@ uses
Windows, // ERROR_SUCCESS
SysUtils, // CompareStr, FreeAndNil
Classes, // TList
Forms, // Application
Vcl.Forms, // Application
Contnrs, // TObjectList
Math, // Min
// Dxbx

View file

@ -24,7 +24,7 @@ uses
Windows,
SysUtils,
Classes,
Graphics,
Vcl.Graphics,
ShlObj, // SHGetSpecialFolderPath
// Jedi
JwaWinType,

View file

@ -89,11 +89,11 @@ var
procedure PrepareXBoxMemoryMap;
var
ExeNtHeader: PImageNtHeaders32;
ExeOptionalHeader: PImageOptionalHeader;
ExeOptionalHeader: PImageOptionalHeader32;
ExeHeaderSize: DWord;
NewNtHeader: PImageNtHeaders32;
NewOptionalHeader: PImageOptionalHeader;
NewOptionalHeader: PImageOptionalHeader32;
ExeSectionHeader: PImageSectionHeader;
NewSectionHeader: PImageSectionHeader;
@ -182,7 +182,7 @@ end;
procedure DxbxKrnlSetup();
begin
DecimalSeparator := '.'; // Dxbx addition, to log floats with dots
FormatSettings.DecimalSeparator := '.'; // Dxbx addition, to log floats with dots
CreateLogs(KernelDebugMode, string(KernelDebugFileName)); // Initialize logging interface
WriteLog('Dxbx was started using the commandline:');
WriteLog(CommandLine);

View file

@ -23,7 +23,7 @@ interface
uses
// Delphi
Types, SysUtils, Classes, Controls, ExtCtrls, Forms, Graphics, jpeg,
Types, SysUtils, Classes, Controls, ExtCtrls, Forms, Graphics, Vcl.Imaging.jpeg,
// Dxbx
uConsts,
uDxbxUtils;

View file

@ -87,6 +87,10 @@ object fmConfiguration: TfmConfiguration
OnChange = ConfigControlChange
object TabSheet1: TTabSheet
Caption = 'Controller'
ExplicitLeft = 0
ExplicitTop = 0
ExplicitWidth = 0
ExplicitHeight = 0
object Image1: TImage
Left = 0
Top = 0
@ -294,6 +298,10 @@ object fmConfiguration: TfmConfiguration
object TabSheet2: TTabSheet
Caption = 'Video'
ImageIndex = 1
ExplicitLeft = 0
ExplicitTop = 0
ExplicitWidth = 0
ExplicitHeight = 0
DesignSize = (
546
410)
@ -405,6 +413,10 @@ object fmConfiguration: TfmConfiguration
object TabSheet4: TTabSheet
Caption = 'Sound'
ImageIndex = 3
ExplicitLeft = 0
ExplicitTop = 0
ExplicitWidth = 0
ExplicitHeight = 0
DesignSize = (
546
410)
@ -457,6 +469,10 @@ object fmConfiguration: TfmConfiguration
object TabSheet3: TTabSheet
Caption = 'Logging'
ImageIndex = 2
ExplicitLeft = 0
ExplicitTop = 0
ExplicitWidth = 0
ExplicitHeight = 0
object GroupBox2: TGroupBox
Left = 3
Top = 0
@ -529,7 +545,7 @@ object fmConfiguration: TfmConfiguration
Left = 32
Top = 220
Bitmap = {
494C010103000500140010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600
494C010103000500040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600
0000000000003600000028000000400000001000000001002000000000000010
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000

View file

@ -24,7 +24,7 @@ interface
uses
// Delphi
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ComCtrls, ExtCtrls, jpeg, IniFiles
Dialogs, StdCtrls, ComCtrls, ExtCtrls, Vcl.Imaging.jpeg, IniFiles
// DirectX
, DirectDraw
, DirectSound
@ -35,7 +35,7 @@ uses
, uXBController
, uXbVideo
, uXBSound
, uEmuShared, ImgList, Menus, ActnList
, uEmuShared, ImgList, Menus, ActnList, System.Actions
;
// The Xbox controller image is borrowed from http://halo.wikia.com/wiki/Halo_Controls

View file

@ -25,7 +25,7 @@ uses
// Delphi
Windows, SysUtils, StrUtils, Classes, Messages, Controls, StdCtrls, ComCtrls, ExtCtrls,
Types, GraphUtil,
Grids, Menus, ActnList, Forms, Dialogs, Graphics, jpeg,
Grids, Menus, ActnList, Forms, Dialogs, Graphics, Vcl.Imaging.jpeg,
ShellAPI, IniFiles, ShlObj,
xmldom, XMLIntf, msxmldom, XMLDoc,
// Jedi Win32API
@ -46,7 +46,7 @@ uses
uData,
ufrm_Configuration,
uImportGames,
ufrm_About;
ufrm_About, System.Actions;
const
clXboxGreen = $22CC88;//22BB77;//27BB73;//00DE97;//0DB366;//0FB869;