forked from cafeberry/cafeberry
merge upstream
This commit is contained in:
@@ -59,7 +59,7 @@ void SoundEngine::playMusicTick() {};
|
||||
#ifdef _WINDOWS64
|
||||
char SoundEngine::m_szSoundPath[]={"Windows64Media\\Sound\\"};
|
||||
char SoundEngine::m_szMusicPath[]={"music\\"};
|
||||
char SoundEngine::m_szRedistName[]={"redist64"};
|
||||
char SoundEngine::m_szRedistName[]={"Windows64\\redist64"}; //str1k3r - moved this to a the Windows64 dir so its out of plain view
|
||||
#elif defined _DURANGO
|
||||
char SoundEngine::m_szSoundPath[]={"Sound\\"};
|
||||
char SoundEngine::m_szMusicPath[]={"music\\"};
|
||||
@@ -791,7 +791,9 @@ void SoundEngine::play(int iSound, float x, float y, float z, float volume, floa
|
||||
char *SoundName = (char *)ConvertSoundPathToName(name);
|
||||
strcat((char *)szSoundName,SoundName);
|
||||
|
||||
// app.DebugPrintf(6,"PlaySound - %d - %s - %s (%f %f %f, vol %f, pitch %f)\n",iSound, SoundName, szSoundName,x,y,z,volume,pitch);
|
||||
#ifdef _DEBUG
|
||||
app.DebugPrintf(6,"PlaySound - %d - %s - %s (%f %f %f, vol %f, pitch %f)\n",iSound, SoundName, szSoundName,x,y,z,volume,pitch);
|
||||
#endif
|
||||
|
||||
AUDIO_INFO AudioInfo;
|
||||
AudioInfo.x=x;
|
||||
@@ -846,9 +848,11 @@ void SoundEngine::playUI(int iSound, float volume, float pitch)
|
||||
|
||||
char *SoundName = (char *)ConvertSoundPathToName(name);
|
||||
strcat((char *)szSoundName,SoundName);
|
||||
// app.DebugPrintf("UI: Playing %s, volume %f, pitch %f\n",SoundName,volume,pitch);
|
||||
|
||||
//app.DebugPrintf("PlaySound - %d - %s\n",iSound, SoundName);
|
||||
#ifdef _DEBUG
|
||||
app.DebugPrintf("UI: Playing %s, volume %f, pitch %f\n",SoundName,volume,pitch);
|
||||
app.DebugPrintf("PlaySound - %d - %s\n",iSound, SoundName);
|
||||
#endif
|
||||
|
||||
AUDIO_INFO AudioInfo;
|
||||
memset(&AudioInfo,0,sizeof(AUDIO_INFO));
|
||||
@@ -1136,10 +1140,12 @@ int SoundEngine::OpenStreamThreadProc( void* lpParameter )
|
||||
SoundEngine *soundEngine = (SoundEngine *)lpParameter;
|
||||
soundEngine->m_hStream = AIL_open_stream(soundEngine->m_hDriver,soundEngine->m_szStreamName,0);
|
||||
|
||||
#ifdef _DEBUG
|
||||
if(soundEngine->m_hStream==0)
|
||||
{
|
||||
app.DebugPrintf("SoundEngine::OpenStreamThreadProc - Could not open - %s\n",soundEngine->m_szStreamName);
|
||||
}
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -26,7 +26,7 @@ foreach ($dir in $directories) {
|
||||
$folderCopies = @(
|
||||
@{ Source = "Common\Media"; Dest = "Common\Media" },
|
||||
@{ Source = "Common\res"; Dest = "Common\res" },
|
||||
@{ Source = "Durango\Sound"; Dest = "Sound" },
|
||||
@{ Source = "DurangoMedia\Sound"; Dest = "Sound" },
|
||||
@{ Source = "DurangoMedia\DLC"; Dest = "DLC" },
|
||||
@{ Source = "DurangoMedia\Tutorial"; Dest = "Tutorial" },
|
||||
@{ Source = "music"; Dest = "music" },
|
||||
@@ -40,6 +40,8 @@ foreach ($copy in $folderCopies) {
|
||||
|
||||
if (Test-Path $src) {
|
||||
xcopy /q /y /i /s /e /d "$src" "$dst" 2>$null
|
||||
} else {
|
||||
Write-Host "Durango Postbuild: Folder not found, skipping: $src"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,7 +55,9 @@ foreach ($copy in $fileCopies) {
|
||||
$dst = Join-Path $OutDir $copy.Dest
|
||||
if (Test-Path $src) {
|
||||
Copy-Item -Path $src -Destination $dst -Force
|
||||
}
|
||||
} else {
|
||||
Write-Host "Durango Postbuild: File not found, skipping: $src"
|
||||
}
|
||||
}
|
||||
|
||||
$deleteDirs = @(
|
||||
|
||||
@@ -22,15 +22,15 @@ foreach ($dir in $directories) {
|
||||
}
|
||||
|
||||
$folderCopies = @(
|
||||
@{ Source = "music"; Dest = "PS4_GAME\music" },
|
||||
@{ Source = "Common\Media"; Dest = "PS4_GAME\Common\Media" },
|
||||
@{ Source = "Common\res"; Dest = "PS4_GAME\Common\res" },
|
||||
@{ Source = "Orbis\Sound"; Dest = "PS4_GAME\Orbis\Sound" },
|
||||
@{ Source = "OrbisMedia\DLC"; Dest = "PS4_GAME\Orbis\DLC" },
|
||||
@{ Source = "Orbis\DLCImages"; Dest = "PS4_GAME\Orbis\DLCImages" },
|
||||
@{ Source = "music"; Dest = "PS4_GAME\music" },
|
||||
@{ Source = "Common\Media"; Dest = "PS4_GAME\Common\Media" },
|
||||
@{ Source = "Common\res"; Dest = "PS4_GAME\Common\res" },
|
||||
@{ Source = "OrbisMedia\Sound"; Dest = "PS4_GAME\Orbis\Sound" },
|
||||
@{ Source = "OrbisMedia\DLC"; Dest = "PS4_GAME\Orbis\DLC" },
|
||||
@{ Source = "Orbis\DLCImages"; Dest = "PS4_GAME\Orbis\DLCImages" },
|
||||
@{ Source = "OrbisMedia\Tutorial"; Dest = "PS4_GAME\Orbis\Tutorial" },
|
||||
@{ Source = "$env:SCE_ORBIS_SDK_DIR\target\sce_module"; Dest = "PS4_GAME\sce_module" },
|
||||
@{ Source = Join-Path $PSScriptRoot "Contents\Orbis\sce_gls"; Dest = "PS4_GAME\sce_gls" },
|
||||
@{ Source = "$env:SCE_ORBIS_SDK_DIR\target\sce_module"; Dest = "PS4_GAME\sce_module" },
|
||||
@{ Source = Join-Path $PSScriptRoot "Contents\Orbis\sce_gls"; Dest = "PS4_GAME\sce_gls" },
|
||||
@{ Source = Join-Path $PSScriptRoot "Contents\Orbis\sce_sys"; Dest = "PS4_GAME\sce_sys" }
|
||||
)
|
||||
|
||||
@@ -44,7 +44,9 @@ foreach ($copy in $folderCopies) {
|
||||
|
||||
if (Test-Path $src) {
|
||||
xcopy /q /y /i /s /e /d "$src" "$dst" 2>$null
|
||||
}
|
||||
} else {
|
||||
Write-Host "Orbis Postbuild: Folder not found, skipping: $src"
|
||||
}
|
||||
}
|
||||
|
||||
$fileCopies = @(
|
||||
@@ -57,7 +59,9 @@ foreach ($copy in $fileCopies) {
|
||||
$dst = Join-Path $OutDir $copy.Dest
|
||||
if (Test-Path $src) {
|
||||
Copy-Item -Path $src -Destination $dst -Force
|
||||
}
|
||||
} else {
|
||||
Write-Host "Orbis Postbuild: File not found, skipping: $src"
|
||||
}
|
||||
}
|
||||
|
||||
$builtFile = Join-Path $OutDir "Minecraft.Client.elf"
|
||||
|
||||
@@ -24,18 +24,24 @@ $folderCopies = @(
|
||||
@{ Source = "Common\Media"; Dest = "PS3_GAME\USRDIR\Common\Media" },
|
||||
@{ Source = "Common\res"; Dest = "PS3_GAME\USRDIR\Common\res" },
|
||||
@{ Source = "PS3Media\DLC"; Dest = "PS3_GAME\USRDIR\DLC" },
|
||||
@{ Source = "PS3\Sound"; Dest = "PS3_GAME\USRDIR\PS3\Sound" },
|
||||
@{ Source = "PS3Media\Sound"; Dest = "PS3_GAME\USRDIR\PS3\Sound" },
|
||||
#@{ Source = "PSVita\Tutorial"; Dest = "PS3_GAME\USRDIR\PS3\Tutorial" }, # str1k3r - softlocks game
|
||||
@{ Source = Join-Path $PSScriptRoot "Contents\PS3\PS3_GAME\LICDIR"; Dest = "PS3_GAME\LICDIR" },
|
||||
@{ Source = Join-Path $PSScriptRoot "Contents\PS3\PS3_GAME\TROPDIR"; Dest = "PS3_GAME\TROPDIR" }
|
||||
)
|
||||
|
||||
foreach ($copy in $folderCopies) {
|
||||
$src = Join-Path $ProjectDir $copy.Source
|
||||
if ([System.IO.Path]::IsPathRooted($copy.Source)) {
|
||||
$src = $copy.Source
|
||||
} else {
|
||||
$src = Join-Path $ProjectDir $copy.Source
|
||||
}
|
||||
$dst = Join-Path $OutDir $copy.Dest
|
||||
|
||||
if (Test-Path $src) {
|
||||
xcopy /q /y /i /s /e /d "$src" "$dst" 2>$null
|
||||
} else {
|
||||
Write-Host "PS3 Postbuild: Folder not found, skipping: $src"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,7 +63,9 @@ foreach ($copy in $fileCopies) {
|
||||
$dst = Join-Path $OutDir $copy.Dest
|
||||
if (Test-Path $src) {
|
||||
Copy-Item -Path $src -Destination $dst -Force
|
||||
}
|
||||
} else {
|
||||
Write-Host "PS3 Postbuild: File not found, skipping: $src"
|
||||
}
|
||||
}
|
||||
|
||||
if ($Configuration -match "ContentPackage") {
|
||||
|
||||
@@ -20,14 +20,14 @@ foreach ($dir in $directories) {
|
||||
}
|
||||
|
||||
$folderCopies = @(
|
||||
@{ Source = "music"; Dest = "PSVITA_GAME\music" },
|
||||
@{ Source = "Common\Media"; Dest = "PSVITA_GAME\Common\Media" },
|
||||
@{ Source = "Common\res"; Dest = "PSVITA_GAME\Common\res" },
|
||||
@{ Source = "PSVita\Sound"; Dest = "PSVITA_GAME\PSVita\Sound" },
|
||||
@{ Source = "PSVitaMedia\DLC"; Dest = "PSVITA_GAME\PSVita\DLC" },
|
||||
@{ Source = "PSVita\Tutorial"; Dest = "PSVITA_GAME\PSVita\Tutorial" },
|
||||
@{ Source = "$env:SCE_PSP2_SDK_DIR\target\sce_module"; Dest = "PSVITA_GAME\sce_module" },
|
||||
@{ Source = Join-Path $PSScriptRoot "Contents\PSVita\sce_sys"; Dest = "PSVITA_GAME\sce_sys" }
|
||||
@{ Source = "music"; Dest = "PSVITA_GAME\music" },
|
||||
@{ Source = "Common\Media"; Dest = "PSVITA_GAME\Common\Media" },
|
||||
@{ Source = "Common\res"; Dest = "PSVITA_GAME\Common\res" },
|
||||
@{ Source = "PSVitaMedia\Sound"; Dest = "PSVITA_GAME\PSVita\Sound" },
|
||||
@{ Source = "PSVitaMedia\DLC"; Dest = "PSVITA_GAME\PSVita\DLC" },
|
||||
@{ Source = "PSVita\Tutorial"; Dest = "PSVITA_GAME\PSVita\Tutorial" },
|
||||
@{ Source = "$env:SCE_PSP2_SDK_DIR\target\sce_module"; Dest = "PSVITA_GAME\sce_module" },
|
||||
@{ Source = Join-Path $PSScriptRoot "Contents\PSVita\sce_sys"; Dest = "PSVITA_GAME\sce_sys" }
|
||||
)
|
||||
|
||||
foreach ($copy in $folderCopies) {
|
||||
@@ -40,7 +40,9 @@ foreach ($copy in $folderCopies) {
|
||||
|
||||
if (Test-Path $src) {
|
||||
xcopy /q /y /i /s /e /d "$src" "$dst" 2>$null
|
||||
}
|
||||
} else {
|
||||
Write-Host "PSVita Postbuild: Folder not found, skipping: $src"
|
||||
}
|
||||
}
|
||||
|
||||
$fileCopies = @(
|
||||
@@ -54,7 +56,9 @@ foreach ($copy in $fileCopies) {
|
||||
if (Test-Path $src) {
|
||||
New-Item -ItemType Directory -Path (Split-Path $dst -Parent) -Force | Out-Null
|
||||
Copy-Item -Path $src -Destination $dst -Force
|
||||
}
|
||||
} else {
|
||||
Write-Host "PSVita Postbuild: File not found, skipping: $src"
|
||||
}
|
||||
}
|
||||
|
||||
$builtFile = Join-Path $OutDir "Minecraft.Client.self"
|
||||
|
||||
@@ -20,28 +20,34 @@ foreach ($dir in $directories) {
|
||||
|
||||
$folderCopies = @(
|
||||
@{ Source = "music"; Dest = "music" },
|
||||
@{ Source = "Common\Media"; Dest = "Common\Media" },
|
||||
@{ Source = "Common\res"; Dest = "Common\res" },
|
||||
@{ Source = "Common\Media"; Dest = "Common\Media" },
|
||||
@{ Source = "DurangoMedia"; Dest = "Windows64Media" },
|
||||
@{ Source = "Windows64Media"; Dest = "Windows64Media" },
|
||||
#@{ Source = "PSVita\Tutorial"; Dest = "Windows64Media\Tutorial" }, # str1k3r - doesnt even work bru
|
||||
@{ Source = "Windows64\Sound"; Dest = "Windows64Media\Sound" },
|
||||
@{ Source = Join-Path $PSScriptRoot "Contents\Windows64\redist64"; Dest = "redist64" }
|
||||
@{ Source = "Windows64Media\Sound"; Dest = "Windows64Media\Sound" },
|
||||
#@{ Source = "PSVita\Tutorial"; Dest = "Windows64Media\Tutorial" }, # str1k3r - doesnt even work bru
|
||||
@{ Source = "Windows64\Miles\lib\redist64"; Dest = "Windows64\redist64" }
|
||||
)
|
||||
|
||||
foreach ($copy in $folderCopies) {
|
||||
$src = Join-Path $ProjectDir $copy.Source
|
||||
if ([System.IO.Path]::IsPathRooted($copy.Source)) {
|
||||
$src = $copy.Source
|
||||
} else {
|
||||
$src = Join-Path $ProjectDir $copy.Source
|
||||
}
|
||||
$dst = Join-Path $OutDir $copy.Dest
|
||||
|
||||
if (Test-Path $src) {
|
||||
xcopy /q /y /i /s /e /d "$src" "$dst" 2>$null
|
||||
} else {
|
||||
Write-Host "Windows64 Postbuild: Folder not found, skipping: $src"
|
||||
}
|
||||
}
|
||||
|
||||
$fileCopies = @(
|
||||
@{ Source = Join-Path $ProjectDir "Windows64\4JLibs\4J_Input\Windows64\vendor\SDL\lib\x64\SDL3.dll"; Dest = "SDL3.dll" },
|
||||
@{ Source = Join-Path $PSScriptRoot "Contents\Windows64\iggy_w64.dll"; Dest = "iggy_w64.dll" },
|
||||
@{ Source = Join-Path $PSScriptRoot "Contents\Windows64\mss64.dll"; Dest = "mss64.dll" }
|
||||
@{ Source = Join-Path $PSScriptRoot "Contents\Windows64\mss64.dll"; Dest = "mss64.dll" },
|
||||
@{ Source = "Windows64\Iggy\lib\redist64\iggy_w64.dll"; Dest = "iggy_w64.dll" }
|
||||
)
|
||||
|
||||
foreach ($copy in $fileCopies) {
|
||||
@@ -50,7 +56,7 @@ foreach ($copy in $fileCopies) {
|
||||
if (Test-Path $src) {
|
||||
Copy-Item -Path $src -Destination $dst -Force
|
||||
} else {
|
||||
Write-Host "Windows64 Postbuild: source not found, skipping: $src"
|
||||
Write-Host "Windows64 Postbuild: File not found, skipping: $src"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -24,6 +24,8 @@ foreach ($copy in $copies) {
|
||||
|
||||
if (Test-Path $src) {
|
||||
xcopy /q /y /i /s /e /d "$src" "$dst" 2>$null
|
||||
} else {
|
||||
Write-Host "Xbox Postbuild: Folder not found, skipping: $src"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,5 +50,7 @@ foreach ($copy in $fileCopies) {
|
||||
$dst = Join-Path $OutDir $copy.Dest
|
||||
if (Test-Path $src) {
|
||||
Copy-Item -Path $src -Destination $dst -Force
|
||||
}
|
||||
} else {
|
||||
Write-Host "Xbox Postbuild: File not found, skipping: $src"
|
||||
}
|
||||
}
|
||||
@@ -406,6 +406,12 @@ bool DLCManager::processDLCDataFile(DWORD &dwFilesProcessed, PBYTE pbData, DWORD
|
||||
unsigned int uiVersion=*(unsigned int *)pbData;
|
||||
uiCurrentByte+=sizeof(int);
|
||||
|
||||
if(uiVersion > CURRENT_DLC_VERSION_NUM)
|
||||
{
|
||||
if(pbData!=NULL) delete [] pbData;
|
||||
app.DebugPrintf("DLC version of %d is newer than this build can read (%d)\n", uiVersion, CURRENT_DLC_VERSION_NUM);
|
||||
return false;
|
||||
}
|
||||
if(uiVersion < CURRENT_DLC_VERSION_NUM)
|
||||
{
|
||||
if(pbData!=NULL) delete [] pbData;
|
||||
@@ -613,6 +619,11 @@ DWORD DLCManager::retrievePackID(PBYTE pbData, DWORD dwLength, DLCPack *pack)
|
||||
unsigned int uiVersion=*(unsigned int *)pbData;
|
||||
uiCurrentByte+=sizeof(int);
|
||||
|
||||
if(uiVersion > CURRENT_DLC_VERSION_NUM)
|
||||
{
|
||||
app.DebugPrintf("DLC version of %d is newer than this build can read (%d)\n", uiVersion, CURRENT_DLC_VERSION_NUM);
|
||||
return 0;
|
||||
}
|
||||
if(uiVersion < CURRENT_DLC_VERSION_NUM)
|
||||
{
|
||||
app.DebugPrintf("DLC version of %d is too old to be read\n", uiVersion);
|
||||
|
||||
@@ -454,12 +454,7 @@ void CXuiSceneAbstractContainer::SetPointerText(vector<HtmlString> *description,
|
||||
return;
|
||||
}
|
||||
|
||||
wstring combinedText;
|
||||
for(size_t i = 0; i < description->size(); ++i)
|
||||
{
|
||||
combinedText += (*description)[i].text;
|
||||
if(i + 1 < description->size()) combinedText += L"\n";
|
||||
}
|
||||
wstring combinedText = HtmlString::Compose(description);
|
||||
|
||||
vector<wstring> unformattedStrings;
|
||||
for(size_t i = 0; i < description->size(); ++i)
|
||||
|
||||
@@ -482,6 +482,7 @@
|
||||
<IncludePath>$(SCE_PSP2_SDK_DIR)/target\src\npToolkit\include;$(ProjectDir)..\Minecraft.Client\PSVita\Assert;$(ProjectDir);$(ProjectDir)..\Minecraft.World\x64headers;$(ProjectDir)\..\Minecraft.Client\PSVita\PSVitaExtras</IncludePath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LocalDebuggerWorkingDirectory>$(OutDir)</LocalDebuggerWorkingDirectory>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<IncludePath>$(ProjectDir)\..\Minecraft.World\x64headers;$(ProjectDir)\Windows64\Sentient\Include;$(IncludePath)</IncludePath>
|
||||
</PropertyGroup>
|
||||
@@ -501,6 +502,7 @@
|
||||
</CustomBuildBeforeTargets>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LocalDebuggerWorkingDirectory>$(OutDir)</LocalDebuggerWorkingDirectory>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<IncludePath>$(ProjectDir)\..\Minecraft.World\x64headers;$(ProjectDir)\Windows64\Sentient\Include;$(IncludePath)</IncludePath>
|
||||
</PropertyGroup>
|
||||
@@ -592,21 +594,25 @@
|
||||
<IncludePath>$(ProjectDir)..\Minecraft.World\x64headers;$(ProjectDir)\..\Minecraft.Client\PSVita\PSVitaExtras</IncludePath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ContentPackage|x64'">
|
||||
<LocalDebuggerWorkingDirectory>$(OutDir)</LocalDebuggerWorkingDirectory>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutputFile>$(OutDir)default$(TargetExt)</OutputFile>
|
||||
<IncludePath>$(ProjectDir)\..\Minecraft.World\x64headers;$(ProjectDir)\Windows64\Sentient\Include;$(IncludePath)</IncludePath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='CONTENTPACKAGE_SYMBOLS|x64'">
|
||||
<LocalDebuggerWorkingDirectory>$(OutDir)</LocalDebuggerWorkingDirectory>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutputFile>$(OutDir)default$(TargetExt)</OutputFile>
|
||||
<IncludePath>$(ProjectDir)\..\Minecraft.World\x64headers;$(ProjectDir)\Windows64\Sentient\Include;$(IncludePath)</IncludePath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseForArt|x64'">
|
||||
<LocalDebuggerWorkingDirectory>$(OutDir)</LocalDebuggerWorkingDirectory>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutputFile>$(OutDir)default$(TargetExt)</OutputFile>
|
||||
<IncludePath>$(ProjectDir)\..\Minecraft.World\x64headers;$(ProjectDir)\Windows64\Sentient\Include;$(IncludePath)</IncludePath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ContentPackage_NO_TU|x64'">
|
||||
<LocalDebuggerWorkingDirectory>$(OutDir)</LocalDebuggerWorkingDirectory>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutputFile>$(OutDir)default$(TargetExt)</OutputFile>
|
||||
<IncludePath>$(ProjectDir)\..\Minecraft.World\x64headers;$(ProjectDir)\Windows64\Sentient\Include;$(IncludePath)</IncludePath>
|
||||
@@ -932,7 +938,7 @@
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
|
||||
<AdditionalDependencies>d3d11.lib;..\Minecraft.World\x64_$(Configuration)\Minecraft.World.lib;XInput9_1_0.lib;Windows64\Iggy\lib\iggy_w64.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>d3d11.lib;..\Minecraft.World\x64_$(Configuration)\Minecraft.World.lib;XInput9_1_0.lib;Windows64\Iggy\lib\iggy_w64.lib;XInput9_1_0.lib;..\Minecraft.Client\Windows64\Miles\Lib\mss64.lib;wsock32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<ShowProgress>NotSet</ShowProgress>
|
||||
<SuppressStartupBanner>false</SuppressStartupBanner>
|
||||
</Link>
|
||||
@@ -1044,7 +1050,7 @@ xcopy /q /y /i /s /e $(ProjectDir)DurangoMedia\CU $(LayoutDir)Image\Loose\CU</C
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
|
||||
<AdditionalDependencies>d3d11.lib;..\Minecraft.World\x64_$(Configuration)\Minecraft.World.lib;XInput9_1_0.lib;Windows64\Iggy\lib\iggy_w64.lib;;XInput9_1_0.lib;..\Minecraft.Client\Windows64\Miles\Lib\mss64.lib;wsock32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>d3d11.lib;..\Minecraft.World\x64_$(Configuration)\Minecraft.World.lib;XInput9_1_0.lib;Windows64\Iggy\lib\iggy_w64.lib;XInput9_1_0.lib;..\Minecraft.Client\Windows64\Miles\Lib\mss64.lib;wsock32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<ShowProgress>NotSet</ShowProgress>
|
||||
<SuppressStartupBanner>false</SuppressStartupBanner>
|
||||
</Link>
|
||||
@@ -1741,7 +1747,7 @@ xcopy /q /y /i /s /e $(ProjectDir)DurangoMedia\CU $(LayoutDir)Image\Loose\CU</C
|
||||
<OptimizeReferences>false</OptimizeReferences>
|
||||
<ProgramDatabaseFile>$(OutDir)default.pdb</ProgramDatabaseFile>
|
||||
<SetChecksum>true</SetChecksum>
|
||||
<AdditionalDependencies>d3d11.lib;..\Minecraft.World\x64_$(Configuration)\Minecraft.World.lib;XInput9_1_0.lib;Windows64\Iggy\lib\iggy_w64.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>d3d11.lib;..\Minecraft.World\x64_$(Configuration)\Minecraft.World.lib;XInput9_1_0.lib;Windows64\Iggy\lib\iggy_w64.lib;XInput9_1_0.lib;..\Minecraft.Client\Windows64\Miles\Lib\mss64.lib;wsock32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<IgnoreSpecificDefaultLibraries>
|
||||
</IgnoreSpecificDefaultLibraries>
|
||||
<GenerateMapFile>false</GenerateMapFile>
|
||||
@@ -1785,7 +1791,7 @@ xcopy /q /y /i /s /e $(ProjectDir)DurangoMedia\CU $(LayoutDir)Image\Loose\CU</C
|
||||
<OptimizeReferences>false</OptimizeReferences>
|
||||
<ProgramDatabaseFile>$(OutDir)default.pdb</ProgramDatabaseFile>
|
||||
<SetChecksum>true</SetChecksum>
|
||||
<AdditionalDependencies>d3d11.lib;..\Minecraft.World\x64_$(Configuration)\Minecraft.World.lib;XInput9_1_0.lib;Windows64\Iggy\lib\iggy_w64.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>d3d11.lib;..\Minecraft.World\x64_$(Configuration)\Minecraft.World.lib;XInput9_1_0.lib;Windows64\Iggy\lib\iggy_w64.lib;XInput9_1_0.lib;..\Minecraft.Client\Windows64\Miles\Lib\mss64.lib;wsock32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<IgnoreSpecificDefaultLibraries>xapilib.lib</IgnoreSpecificDefaultLibraries>
|
||||
<GenerateMapFile>false</GenerateMapFile>
|
||||
<MapExports>false</MapExports>
|
||||
@@ -1824,7 +1830,7 @@ xcopy /q /y /i /s /e $(ProjectDir)DurangoMedia\CU $(LayoutDir)Image\Loose\CU</C
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
|
||||
<AdditionalDependencies>d3d11.lib;..\Minecraft.World\x64_$(Configuration)\Minecraft.World.lib;XInput9_1_0.lib;Windows64\Iggy\lib\iggy_w64.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>d3d11.lib;..\Minecraft.World\x64_$(Configuration)\Minecraft.World.lib;XInput9_1_0.lib;Windows64\Iggy\lib\iggy_w64.lib;XInput9_1_0.lib;..\Minecraft.Client\Windows64\Miles\Lib\mss64.lib;wsock32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<ShowProgress>NotSet</ShowProgress>
|
||||
<SuppressStartupBanner>false</SuppressStartupBanner>
|
||||
</Link>
|
||||
@@ -1865,7 +1871,7 @@ xcopy /q /y /i /s /e $(ProjectDir)DurangoMedia\CU $(LayoutDir)Image\Loose\CU</C
|
||||
<OptimizeReferences>false</OptimizeReferences>
|
||||
<ProgramDatabaseFile>$(OutDir)default.pdb</ProgramDatabaseFile>
|
||||
<SetChecksum>true</SetChecksum>
|
||||
<AdditionalDependencies>d3d11.lib;..\Minecraft.World\x64_$(Configuration)\Minecraft.World.lib;XInput9_1_0.lib;Windows64\Iggy\lib\iggy_w64.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>d3d11.lib;..\Minecraft.World\x64_$(Configuration)\Minecraft.World.lib;XInput9_1_0.lib;Windows64\Iggy\lib\iggy_w64.lib;XInput9_1_0.lib;..\Minecraft.Client\Windows64\Miles\Lib\mss64.lib;wsock32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<IgnoreSpecificDefaultLibraries>xapilib.lib</IgnoreSpecificDefaultLibraries>
|
||||
<GenerateMapFile>false</GenerateMapFile>
|
||||
<MapExports>false</MapExports>
|
||||
|
||||
Binary file not shown.
@@ -4,6 +4,7 @@
|
||||
#include "stdafx.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <shellapi.h>
|
||||
#include "GameConfig\Minecraft.spa.h"
|
||||
#include "..\MinecraftServer.h"
|
||||
#include "..\LocalPlayer.h"
|
||||
@@ -24,10 +25,6 @@
|
||||
#include "..\..\Minecraft.World\ThreadName.h"
|
||||
#include "..\..\Minecraft.Client\StatsCounter.h"
|
||||
#include "..\ConnectScreen.h"
|
||||
//#include "Social\SocialManager.h"
|
||||
//#include "Leaderboards\LeaderboardManager.h"
|
||||
//#include "XUI\XUI_Scene_Container.h"
|
||||
//#include "NetworkManager.h"
|
||||
#include "..\..\Minecraft.Client\Tesselator.h"
|
||||
#include "..\..\Minecraft.Client\Options.h"
|
||||
#include "Sentient\SentientManager.h"
|
||||
@@ -42,12 +39,11 @@
|
||||
|
||||
HINSTANCE hMyInst;
|
||||
LRESULT CALLBACK DlgProc(HWND hWndDlg, UINT Msg, WPARAM wParam, LPARAM lParam);
|
||||
WINDOWPLACEMENT g_wpPrev = { sizeof(g_wpPrev) };
|
||||
|
||||
char chGlobalText[256];
|
||||
uint16_t ui16GlobalText[256];
|
||||
|
||||
#define THEME_NAME "584111F70AAAAAAA"
|
||||
#define THEME_FILESIZE 2797568
|
||||
|
||||
//#define THREE_MB 3145728 // minimum save size (checking for this on a selected device)
|
||||
//#define FIVE_MB 5242880 // minimum save size (checking for this on a selected device)
|
||||
//#define FIFTY_TWO_MB (1024*1024*52) // Maximum TCR space required for a save (checking for this on a selected device)
|
||||
@@ -58,27 +54,51 @@ uint16_t ui16GlobalText[256];
|
||||
#define NUM_PROFILE_SETTINGS 4
|
||||
DWORD dwProfileSettingsA[NUM_PROFILE_VALUES]=
|
||||
{
|
||||
#ifdef _XBOX
|
||||
XPROFILE_OPTION_CONTROLLER_VIBRATION,
|
||||
XPROFILE_GAMER_YAXIS_INVERSION,
|
||||
XPROFILE_GAMER_CONTROL_SENSITIVITY,
|
||||
XPROFILE_GAMER_ACTION_MOVEMENT_CONTROL,
|
||||
XPROFILE_TITLE_SPECIFIC1,
|
||||
#else
|
||||
0,0,0,0,0
|
||||
#endif
|
||||
};
|
||||
|
||||
//-------------------------------------------------------------------------------------
|
||||
// Time Since fAppTime is a float, we need to keep the quadword app time
|
||||
// as a LARGE_INTEGER so that we don't lose precision after running
|
||||
// for a long time.
|
||||
//-------------------------------------------------------------------------------------
|
||||
//str1k3r - request dedicated GPU from AMD and NVIDIA drivers
|
||||
extern "C"
|
||||
{
|
||||
__declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 1;
|
||||
__declspec(dllexport) unsigned long NvOptimusEnablement = 0x00000001;
|
||||
}
|
||||
|
||||
BOOL g_isFullscreen = FALSE;
|
||||
BOOL g_bWidescreen = TRUE;
|
||||
BOOL g_bResolutionSetByCMD = FALSE;
|
||||
|
||||
int g_iScreenWidth = 1920;
|
||||
int g_iScreenHeight = 1080;
|
||||
|
||||
static Windows64LaunchArgs ParseLaunchArgs()
|
||||
{
|
||||
Windows64LaunchArgs args = {};
|
||||
args.resolution = 0;
|
||||
|
||||
int argc = 0;
|
||||
LPWSTR* argv = CommandLineToArgvW(GetCommandLineW(), &argc);
|
||||
if (argv == nullptr)
|
||||
return args;
|
||||
|
||||
if (argc > 1 && lstrlenW(argv[1]) == 1)
|
||||
{
|
||||
if (argv[1][0] >= L'1' && argv[1][0] <= L'6')
|
||||
args.resolution = argv[1][0] - L'0';
|
||||
}
|
||||
|
||||
for (int i = 1; i < argc; ++i)
|
||||
{
|
||||
if (_wcsicmp(argv[i], L"-fullscreen") == 0)
|
||||
{
|
||||
args.fullscreen = true;
|
||||
}
|
||||
}
|
||||
|
||||
LocalFree(argv);
|
||||
return args;
|
||||
}
|
||||
|
||||
void DefineActions(void)
|
||||
{
|
||||
// The app needs to define the actions required, and the possible mappings for these
|
||||
@@ -622,6 +642,39 @@ void Render()
|
||||
g_pSwapChain->Present( 0, 0 );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------
|
||||
// Toggle borderless fullscreen
|
||||
// Credits to the smartCMD repo for this
|
||||
// This is the proper way to do this therefore we just took it
|
||||
//--------------------------------------------------------------------------------------
|
||||
void ToggleFullscreen()
|
||||
{
|
||||
const DWORD dwStyle = GetWindowLong(g_hWnd, GWL_STYLE);
|
||||
if (!g_isFullscreen)
|
||||
{
|
||||
MONITORINFO mi = { sizeof(mi) };
|
||||
if (GetWindowPlacement(g_hWnd, &g_wpPrev) &&
|
||||
GetMonitorInfo(MonitorFromWindow(g_hWnd, MONITOR_DEFAULTTOPRIMARY), &mi))
|
||||
{
|
||||
SetWindowLong(g_hWnd, GWL_STYLE, dwStyle & ~WS_OVERLAPPEDWINDOW);
|
||||
SetWindowPos(g_hWnd, HWND_TOP,
|
||||
mi.rcMonitor.left, mi.rcMonitor.top,
|
||||
mi.rcMonitor.right - mi.rcMonitor.left,
|
||||
mi.rcMonitor.bottom - mi.rcMonitor.top,
|
||||
SWP_NOOWNERZORDER | SWP_FRAMECHANGED);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
SetWindowLong(g_hWnd, GWL_STYLE, dwStyle | WS_OVERLAPPEDWINDOW);
|
||||
SetWindowPlacement(g_hWnd, &g_wpPrev);
|
||||
SetWindowPos(g_hWnd, nullptr, 0, 0, 0, 0,
|
||||
SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_NOOWNERZORDER | SWP_FRAMECHANGED);
|
||||
}
|
||||
g_isFullscreen = !g_isFullscreen;
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------
|
||||
// Clean up the objects we've created
|
||||
//--------------------------------------------------------------------------------------
|
||||
@@ -635,8 +688,6 @@ void CleanupDevice()
|
||||
if( g_pd3dDevice ) g_pd3dDevice->Release();
|
||||
}
|
||||
|
||||
|
||||
|
||||
int APIENTRY _tWinMain(_In_ HINSTANCE hInstance,
|
||||
_In_opt_ HINSTANCE hPrevInstance,
|
||||
_In_ LPTSTR lpCmdLine,
|
||||
@@ -645,44 +696,46 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance,
|
||||
UNREFERENCED_PARAMETER(hPrevInstance);
|
||||
UNREFERENCED_PARAMETER(lpCmdLine);
|
||||
|
||||
if(lpCmdLine)
|
||||
Windows64LaunchArgs launchArgs = ParseLaunchArgs();
|
||||
|
||||
if(launchArgs.resolution != 0)
|
||||
{
|
||||
if(lpCmdLine[0] == '1')
|
||||
if(launchArgs.resolution == 1)
|
||||
{
|
||||
// 2160p
|
||||
g_iScreenWidth = 3840;
|
||||
g_iScreenHeight = 2160;
|
||||
g_bResolutionSetByCMD = TRUE;
|
||||
}
|
||||
else if(lpCmdLine[0] == '2')
|
||||
else if(launchArgs.resolution == 2)
|
||||
{
|
||||
// 1440p
|
||||
g_iScreenWidth = 2560;
|
||||
g_iScreenHeight = 1440;
|
||||
g_bResolutionSetByCMD = TRUE;
|
||||
}
|
||||
else if (lpCmdLine[0] == '3')
|
||||
else if (launchArgs.resolution == 3)
|
||||
{
|
||||
// 1080p
|
||||
g_iScreenWidth = 1920;
|
||||
g_iScreenHeight = 1080;
|
||||
g_bResolutionSetByCMD = TRUE;
|
||||
}
|
||||
else if(lpCmdLine[0] == '4')
|
||||
else if(launchArgs.resolution == 4)
|
||||
{
|
||||
// 720p
|
||||
g_iScreenWidth = 1280;
|
||||
g_iScreenHeight = 720;
|
||||
g_bResolutionSetByCMD = TRUE;
|
||||
}
|
||||
else if(lpCmdLine[0] == '5')
|
||||
else if(launchArgs.resolution == 5)
|
||||
{
|
||||
// 480p
|
||||
g_iScreenWidth = 640;
|
||||
g_iScreenHeight = 480;
|
||||
g_bResolutionSetByCMD = TRUE;
|
||||
}
|
||||
else if(lpCmdLine[0] == '6')
|
||||
else if(launchArgs.resolution == 6)
|
||||
{
|
||||
// Vita Native, 544p
|
||||
g_iScreenWidth = 960;
|
||||
@@ -691,7 +744,6 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Initialize global strings
|
||||
MyRegisterClass(hInstance);
|
||||
|
||||
@@ -709,6 +761,11 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance,
|
||||
return 0;
|
||||
}
|
||||
|
||||
if(launchArgs.fullscreen)
|
||||
{
|
||||
ToggleFullscreen();
|
||||
}
|
||||
|
||||
#if 0
|
||||
// Main message loop
|
||||
MSG msg = {0};
|
||||
@@ -999,7 +1056,10 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance,
|
||||
|
||||
app.UpdateTime();
|
||||
PIXBeginNamedEvent(0,"Input manager tick");
|
||||
InputManager.Tick();
|
||||
if (GetFocus())
|
||||
{
|
||||
InputManager.Tick();
|
||||
}
|
||||
PIXEndNamedEvent();
|
||||
PIXBeginNamedEvent(0,"Profile manager tick");
|
||||
// ProfileManager.Tick();
|
||||
@@ -1190,6 +1250,18 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance,
|
||||
#if 0
|
||||
PIXEndNamedEvent();
|
||||
#endif
|
||||
isF11Pressed = (GetAsyncKeyState(VK_F11) & 0x8000) != 0;
|
||||
|
||||
if(isF11Pressed && !wasF11Pressed && GetFocus())
|
||||
{
|
||||
ToggleFullscreen();
|
||||
}
|
||||
else if(isF11Pressed && !wasF11Pressed && GetFocus())
|
||||
{
|
||||
ToggleFullscreen();
|
||||
}
|
||||
|
||||
wasF11Pressed = isF11Pressed;
|
||||
|
||||
// 4J-PB - Update the trial timer display if we are in the trial version
|
||||
if(!ProfileManager.IsFullVersion())
|
||||
|
||||
@@ -2,13 +2,22 @@
|
||||
|
||||
#include <d3d11.h>
|
||||
|
||||
static bool isF11Pressed = false;
|
||||
static bool wasF11Pressed = false;
|
||||
|
||||
extern BOOL g_bWidescreen;
|
||||
|
||||
extern int g_iScreenWidth;
|
||||
extern int g_iScreenHeight;
|
||||
|
||||
BOOL g_bResolutionSetByCMD = FALSE;
|
||||
extern BOOL g_bResolutionSetByCMD;
|
||||
|
||||
extern ID3D11Device* g_pd3dDevice;
|
||||
|
||||
void CleanupDevice();
|
||||
void CleanupDevice();
|
||||
|
||||
struct Windows64LaunchArgs
|
||||
{
|
||||
bool fullscreen;
|
||||
int resolution;
|
||||
};
|
||||
Reference in New Issue
Block a user