Compare commits
8
Commits
kbm
...
e00f0215cc
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e00f0215cc | ||
|
|
baabec77f7 | ||
|
|
4c50659091 | ||
|
|
fdc89a23ea | ||
|
|
e2f5f4c545 | ||
|
|
2c2c7b8075 | ||
|
|
d767a810e8 | ||
|
|
3df111d9a3 |
No files matched your search
@@ -239,9 +239,9 @@
|
|||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<Optimization>MaxSpeed</Optimization>
|
<Optimization>Full</Optimization>
|
||||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
<IntrinsicFunctions>false</IntrinsicFunctions>
|
||||||
<PreprocessorDefinitions>_WINDOWS64;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_WINDOWS64;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>true</SDLCheck>
|
<SDLCheck>true</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>../Headers/Windows64;../Headers;$(ProjectDir);$(ProjectDir)Windows64\vendor\SDL\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>../Headers/Windows64;../Headers;$(ProjectDir);$(ProjectDir)Windows64\vendor\SDL\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
@@ -249,6 +249,7 @@
|
|||||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||||
<CompileAs>CompileAsCpp</CompileAs>
|
<CompileAs>CompileAsCpp</CompileAs>
|
||||||
|
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Windows</SubSystem>
|
<SubSystem>Windows</SubSystem>
|
||||||
|
|||||||
@@ -293,9 +293,6 @@
|
|||||||
</ClInclude>
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="Windows64\4J_Input.cpp">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="Windows64\INP_ForceFeedback.cpp">
|
<ClCompile Include="Windows64\INP_ForceFeedback.cpp">
|
||||||
<Filter>Source Files</Filter>
|
<Filter>Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
@@ -314,5 +311,8 @@
|
|||||||
<ClCompile Include="stdafx.cpp">
|
<ClCompile Include="stdafx.cpp">
|
||||||
<Filter>Source Files</Filter>
|
<Filter>Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="Windows64\4J_Input.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
@@ -1,13 +1,17 @@
|
|||||||
#ifndef PCH_H
|
#ifndef PCH_H
|
||||||
#define PCH_H
|
#define PCH_H
|
||||||
|
|
||||||
|
#ifdef _WIN64
|
||||||
#define WIN32_LEAN_AND_MEAN
|
#define WIN32_LEAN_AND_MEAN
|
||||||
#include <Windows.h>
|
#include <Windows.h>
|
||||||
|
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <Xinput.h>
|
#include <Xinput.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef _XBOX
|
||||||
#include "extraX64.h"
|
#include "extraX64.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif //PCH_H
|
#endif //PCH_H
|
||||||
@@ -121,7 +121,7 @@
|
|||||||
<SDLCheck>true</SDLCheck>
|
<SDLCheck>true</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>../Headers/Windows64;../Headers;$(ProjectDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>../Headers/Windows64;../Headers;$(ProjectDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<ForcedIncludeFiles>stdafx.h</ForcedIncludeFiles>
|
<ForcedIncludeFiles>stdafx.h</ForcedIncludeFiles>
|
||||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||||
<MinimalRebuild>false</MinimalRebuild>
|
<MinimalRebuild>false</MinimalRebuild>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
@@ -153,15 +153,16 @@
|
|||||||
<ClCompile>
|
<ClCompile>
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||||
<Optimization>MaxSpeed</Optimization>
|
<Optimization>Full</Optimization>
|
||||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
<IntrinsicFunctions>false</IntrinsicFunctions>
|
||||||
<PreprocessorDefinitions>_WINDOWS64;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_WINDOWS64;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>true</SDLCheck>
|
<SDLCheck>true</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>../Headers/Windows64;../Headers;$(ProjectDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>../Headers/Windows64;../Headers;$(ProjectDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<ForcedIncludeFiles>stdafx.h</ForcedIncludeFiles>
|
<ForcedIncludeFiles>stdafx.h</ForcedIncludeFiles>
|
||||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||||
|
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Windows</SubSystem>
|
<SubSystem>Windows</SubSystem>
|
||||||
|
|||||||
@@ -23,6 +23,46 @@ SOFTWARE.
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "4J_Profile.h"
|
#include "4J_Profile.h"
|
||||||
|
#include <Windows.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
C_4JProfile ProfileManager;
|
C_4JProfile ProfileManager;
|
||||||
|
|
||||||
|
//str1k3r - GetSettings is basically snatched from smartCMD
|
||||||
|
void GetSettings(wchar_t *outPath, DWORD size)
|
||||||
|
{
|
||||||
|
GetModuleFileNameW(NULL, outPath, size); //str1k3r - unlike smartCMD we use wide so we can handle non english characters
|
||||||
|
wchar_t *lastSlash = wcsrchr(outPath, '\\');
|
||||||
|
if (lastSlash) *(lastSlash + 1) = '\0';
|
||||||
|
wcsncat_s(outPath, size, L"settings.dat", _TRUNCATE);
|
||||||
|
}
|
||||||
|
|
||||||
|
void C_4JProfile::LoadSettings(void* gs, size_t gsSize)
|
||||||
|
{
|
||||||
|
if (!gs || gsSize == 0) return;
|
||||||
|
|
||||||
|
wchar_t settingsPath[MAX_PATH] = {};
|
||||||
|
GetSettings(settingsPath, MAX_PATH);
|
||||||
|
|
||||||
|
FILE *file = NULL;
|
||||||
|
if (_wfopen_s(&file, settingsPath, L"rb") == 0 && file) //str1k3r - fun fact theres a version of fopen_s but for wide :3
|
||||||
|
{
|
||||||
|
fread(gs, 1, gsSize, file);
|
||||||
|
fclose(file);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void C_4JProfile::SaveSettings(void* gs, size_t gsSize)
|
||||||
|
{
|
||||||
|
if (!gs || gsSize == 0) return;
|
||||||
|
|
||||||
|
wchar_t settingsPath[MAX_PATH] = {};
|
||||||
|
GetSettings(settingsPath, MAX_PATH);
|
||||||
|
|
||||||
|
FILE *file = NULL;
|
||||||
|
if (_wfopen_s(&file, settingsPath, L"wb") == 0 && file)
|
||||||
|
{
|
||||||
|
fwrite(gs, 1, gsSize, file);
|
||||||
|
fclose(file);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,13 +1,17 @@
|
|||||||
#ifndef PCH_H
|
#ifndef PCH_H
|
||||||
#define PCH_H
|
#define PCH_H
|
||||||
|
|
||||||
|
#ifdef _WIN64
|
||||||
#define WIN32_LEAN_AND_MEAN
|
#define WIN32_LEAN_AND_MEAN
|
||||||
#include <Windows.h>
|
#include <Windows.h>
|
||||||
|
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <Xinput.h>
|
#include <Xinput.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef _XBOX
|
||||||
#include "extraX64.h"
|
#include "extraX64.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif //PCH_H
|
#endif //PCH_H
|
||||||
@@ -187,9 +187,9 @@
|
|||||||
<ClCompile>
|
<ClCompile>
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||||
<Optimization>MaxSpeed</Optimization>
|
<Optimization>Full</Optimization>
|
||||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
<IntrinsicFunctions>false</IntrinsicFunctions>
|
||||||
<PreprocessorDefinitions>_WINDOWS64;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_WINDOWS64;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>true</SDLCheck>
|
<SDLCheck>true</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>../Headers/Windows64;../Headers;$(ProjectDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>../Headers/Windows64;../Headers;$(ProjectDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
@@ -197,6 +197,7 @@
|
|||||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
<CompileAs>CompileAsCpp</CompileAs>
|
<CompileAs>CompileAsCpp</CompileAs>
|
||||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||||
|
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Windows</SubSystem>
|
<SubSystem>Windows</SubSystem>
|
||||||
|
|||||||
@@ -28,6 +28,9 @@ SOFTWARE.
|
|||||||
|
|
||||||
C4JRender RenderManager;
|
C4JRender RenderManager;
|
||||||
|
|
||||||
|
//str1k3r - set VSync to true by default
|
||||||
|
bool C4JRender::m_VSyncState = true;
|
||||||
|
|
||||||
void C4JRender::Tick()
|
void C4JRender::Tick()
|
||||||
{
|
{
|
||||||
InternalRenderManager.CBuffTick();
|
InternalRenderManager.CBuffTick();
|
||||||
@@ -38,6 +41,16 @@ void C4JRender::UpdateGamma(unsigned short usGamma)
|
|||||||
InternalRenderManager.UpdateGamma(usGamma);
|
InternalRenderManager.UpdateGamma(usGamma);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void C4JRender::SetVSync(bool vs)
|
||||||
|
{
|
||||||
|
m_VSyncState = vs;
|
||||||
|
}
|
||||||
|
|
||||||
|
int C4JRender::GetVSync()
|
||||||
|
{
|
||||||
|
return m_VSyncState ? 1 : 0;
|
||||||
|
}
|
||||||
|
|
||||||
void C4JRender::MatrixMode(int type)
|
void C4JRender::MatrixMode(int type)
|
||||||
{
|
{
|
||||||
InternalRenderManager.MatrixMode(type);
|
InternalRenderManager.MatrixMode(type);
|
||||||
@@ -133,6 +146,11 @@ void C4JRender::SetClearColour(const float colourRGBA[4])
|
|||||||
InternalRenderManager.SetClearColour(colourRGBA);
|
InternalRenderManager.SetClearColour(colourRGBA);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void C4JRender::setResolution(int ScreenWidth, int ScreenHeight)
|
||||||
|
{
|
||||||
|
InternalRenderManager.setResolution(ScreenWidth, ScreenHeight);
|
||||||
|
}
|
||||||
|
|
||||||
bool C4JRender::IsWidescreen()
|
bool C4JRender::IsWidescreen()
|
||||||
{
|
{
|
||||||
return InternalRenderManager.IsWidescreen();
|
return InternalRenderManager.IsWidescreen();
|
||||||
|
|||||||
@@ -75,6 +75,7 @@ public:
|
|||||||
void Present();
|
void Present();
|
||||||
void Clear(int flags, D3D11_RECT *pRect);
|
void Clear(int flags, D3D11_RECT *pRect);
|
||||||
void SetClearColour(const float colourRGBA[4]);
|
void SetClearColour(const float colourRGBA[4]);
|
||||||
|
void setResolution(int ScreenWidth, int ScreenHeight);
|
||||||
bool IsWidescreen();
|
bool IsWidescreen();
|
||||||
bool IsHiDef();
|
bool IsHiDef();
|
||||||
void CaptureThumbnail(ImageFileBuffer *pngOut);
|
void CaptureThumbnail(ImageFileBuffer *pngOut);
|
||||||
|
|||||||
@@ -55,8 +55,8 @@ D3D11_PRIMITIVE_TOPOLOGY Renderer::g_topologies[C4JRender::PRIMITIVE_TYPE_COUNT]
|
|||||||
};
|
};
|
||||||
|
|
||||||
static const unsigned int kVertexBufferSize = 0x100000;
|
static const unsigned int kVertexBufferSize = 0x100000;
|
||||||
static const unsigned int kScreenGrabWidth = 1920;
|
static unsigned int kScreenWidth = 1920;
|
||||||
static const unsigned int kScreenGrabHeight = 1080;
|
static unsigned int kScreenHeight = 1080;
|
||||||
static const unsigned int kThumbnailSize = 64;
|
static const unsigned int kThumbnailSize = 64;
|
||||||
|
|
||||||
static const unsigned int g_vertexStrides[C4JRender::VERTEX_TYPE_COUNT] = { 32, 16, 32, 32 };
|
static const unsigned int g_vertexStrides[C4JRender::VERTEX_TYPE_COUNT] = { 32, 16, 32, 32 };
|
||||||
@@ -854,14 +854,27 @@ ID3D11DeviceContext *Renderer::InitialiseContext(bool fromPresent)
|
|||||||
return deviceContext;
|
return deviceContext;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//str1k3r - yo fuck you 4J and your hardcoded ass game
|
||||||
|
void Renderer::setResolution(int ScreenWidth, int ScreenHeight)
|
||||||
|
{
|
||||||
|
if(kScreenHeight != ScreenHeight || kScreenWidth != ScreenWidth)
|
||||||
|
{
|
||||||
|
kScreenHeight = ScreenHeight;
|
||||||
|
kScreenWidth = ScreenWidth;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
bool Renderer::IsHiDef()
|
bool Renderer::IsHiDef()
|
||||||
{
|
{
|
||||||
return true;
|
return (kScreenHeight >= 720 && kScreenWidth >= 1280);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Renderer::IsWidescreen()
|
bool Renderer::IsWidescreen()
|
||||||
{
|
{
|
||||||
return true;
|
if (kScreenHeight == 0) return false;
|
||||||
|
|
||||||
|
float aspectRatio = static_cast<float>(kScreenWidth) / kScreenHeight;
|
||||||
|
return (aspectRatio >= 1.56f);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Renderer::Present()
|
void Renderer::Present()
|
||||||
@@ -872,7 +885,7 @@ void Renderer::Present()
|
|||||||
{
|
{
|
||||||
PROFILER_SCOPE("Renderer::Present", "ScreenGrab", MP_MAGENTA);
|
PROFILER_SCOPE("Renderer::Present", "ScreenGrab", MP_MAGENTA);
|
||||||
|
|
||||||
unsigned char *linearData = new unsigned char[kScreenGrabWidth * kScreenGrabHeight * 4];
|
unsigned char *linearData = new unsigned char[kScreenWidth * kScreenHeight * 4];
|
||||||
|
|
||||||
ID3D11Resource *backBufferResource = NULL;
|
ID3D11Resource *backBufferResource = NULL;
|
||||||
ID3D11Texture2D *backBuffer = NULL;
|
ID3D11Texture2D *backBuffer = NULL;
|
||||||
@@ -898,13 +911,13 @@ void Renderer::Present()
|
|||||||
m_pDeviceContext->Map(stagingTexture, 0, D3D11_MAP_READ_WRITE, 0, &mapped);
|
m_pDeviceContext->Map(stagingTexture, 0, D3D11_MAP_READ_WRITE, 0, &mapped);
|
||||||
const unsigned char* src = reinterpret_cast<const unsigned char*>(mapped.pData);
|
const unsigned char* src = reinterpret_cast<const unsigned char*>(mapped.pData);
|
||||||
|
|
||||||
for (UINT y = 0; y < kScreenGrabHeight; ++y)
|
for (UINT y = 0; y < kScreenHeight; ++y)
|
||||||
{
|
{
|
||||||
unsigned char *dstRow = linearData + y * kScreenGrabWidth * 4;
|
unsigned char *dstRow = linearData + y * kScreenWidth * 4;
|
||||||
const unsigned char *srcRow = src + y * mapped.RowPitch;
|
const unsigned char *srcRow = src + y * mapped.RowPitch;
|
||||||
std::memcpy(dstRow, srcRow, kScreenGrabWidth * 4);
|
std::memcpy(dstRow, srcRow, kScreenWidth * 4);
|
||||||
|
|
||||||
for (UINT x = 0; x < kScreenGrabWidth; ++x)
|
for (UINT x = 0; x < kScreenWidth; ++x)
|
||||||
dstRow[x * 4 + 3] = 0xFF;
|
dstRow[x * 4 + 3] = 0xFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -926,8 +939,8 @@ void Renderer::Present()
|
|||||||
UTCSysTime.wSecond);
|
UTCSysTime.wSecond);
|
||||||
|
|
||||||
D3DXIMAGE_INFO info;
|
D3DXIMAGE_INFO info;
|
||||||
info.Width = kScreenGrabWidth;
|
info.Width = kScreenWidth;
|
||||||
info.Height = kScreenGrabHeight;
|
info.Height = kScreenHeight;
|
||||||
SaveTextureData(fileName, &info, reinterpret_cast<int*>(linearData));
|
SaveTextureData(fileName, &info, reinterpret_cast<int*>(linearData));
|
||||||
|
|
||||||
delete[] linearData;
|
delete[] linearData;
|
||||||
@@ -935,7 +948,7 @@ void Renderer::Present()
|
|||||||
m_bShouldScreenGrabNextFrame = false;
|
m_bShouldScreenGrabNextFrame = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_pSwapChain->Present(1, 0);
|
m_pSwapChain->Present(C4JRender::GetVSync(), 0);
|
||||||
++presentCount;
|
++presentCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1046,4 +1059,3 @@ Renderer::Context &Renderer::getContext()
|
|||||||
{
|
{
|
||||||
return *reinterpret_cast<Renderer::Context*>(TlsGetValue(Renderer::tlsIdx));
|
return *reinterpret_cast<Renderer::Context*>(TlsGetValue(Renderer::tlsIdx));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
#ifndef PCH_H
|
#ifndef PCH_H
|
||||||
#define PCH_H
|
#define PCH_H
|
||||||
|
|
||||||
|
#ifdef _WIN64
|
||||||
#define WIN32_LEAN_AND_MEAN
|
#define WIN32_LEAN_AND_MEAN
|
||||||
#include <Windows.h>
|
#include <Windows.h>
|
||||||
|
|
||||||
@@ -11,7 +12,10 @@
|
|||||||
#include <d3d11.h>
|
#include <d3d11.h>
|
||||||
#include <d3d11_1.h>
|
#include <d3d11_1.h>
|
||||||
#include <DirectXMath.h>
|
#include <DirectXMath.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef _XBOX
|
||||||
#include "extraX64.h"
|
#include "extraX64.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif //PCH_H
|
#endif //PCH_H
|
||||||
@@ -149,15 +149,16 @@
|
|||||||
<ClCompile>
|
<ClCompile>
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||||
<Optimization>MaxSpeed</Optimization>
|
<Optimization>Full</Optimization>
|
||||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
<IntrinsicFunctions>false</IntrinsicFunctions>
|
||||||
<PreprocessorDefinitions>_WINDOWS64;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_WINDOWS64;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>true</SDLCheck>
|
<SDLCheck>true</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>../Headers/Windows64;../Headers;$(ProjectDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>../Headers/Windows64;../Headers;$(ProjectDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<ForcedIncludeFiles>stdafx.h</ForcedIncludeFiles>
|
<ForcedIncludeFiles>stdafx.h</ForcedIncludeFiles>
|
||||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||||
|
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Windows</SubSystem>
|
<SubSystem>Windows</SubSystem>
|
||||||
|
|||||||
@@ -218,7 +218,7 @@ void C4JStorage::RegisterMarketplaceCountsCallback(int (*Func)(LPVOID lpParam, C
|
|||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
void C4JStorage::SetDLCPackageRoot(char *pszDLCRoot)
|
void C4JStorage::SetDLCPackageRoot(wchar_t *pszDLCRoot)
|
||||||
{
|
{
|
||||||
InternalStorageManager.m_DLC.SetPackageRoot(pszDLCRoot);
|
InternalStorageManager.m_DLC.SetPackageRoot(pszDLCRoot);
|
||||||
}
|
}
|
||||||
@@ -268,22 +268,22 @@ XCONTENT_DATA &C4JStorage::GetDLC(DWORD dw)
|
|||||||
return InternalStorageManager.m_DLC.GetDLC(dw);
|
return InternalStorageManager.m_DLC.GetDLC(dw);
|
||||||
}
|
}
|
||||||
|
|
||||||
DWORD C4JStorage::MountInstalledDLC(int iPad, DWORD dwDLC, int (*Func)(LPVOID, int, DWORD, DWORD), LPVOID lpParam, LPCSTR szMountDrive)
|
DWORD C4JStorage::MountInstalledDLC(int iPad, DWORD dwDLC, int (*Func)(LPVOID, int, DWORD, DWORD), LPVOID lpParam, LPCWSTR szMountDrive)
|
||||||
{
|
{
|
||||||
return InternalStorageManager.m_DLC.MountInstalledDLC(iPad, dwDLC, Func, lpParam, szMountDrive);
|
return InternalStorageManager.m_DLC.MountInstalledDLC(iPad, dwDLC, Func, lpParam, szMountDrive);
|
||||||
}
|
}
|
||||||
|
|
||||||
DWORD C4JStorage::UnmountInstalledDLC(LPCSTR szMountDrive)
|
DWORD C4JStorage::UnmountInstalledDLC(LPCWSTR szMountDrive)
|
||||||
{
|
{
|
||||||
return InternalStorageManager.m_DLC.UnmountInstalledDLC(szMountDrive);
|
return InternalStorageManager.m_DLC.UnmountInstalledDLC(szMountDrive);
|
||||||
}
|
}
|
||||||
|
|
||||||
void C4JStorage::GetMountedDLCFileList(const char *szMountDrive, std::vector<std::string> &fileList)
|
void C4JStorage::GetMountedDLCFileList(const char *szMountDrive, std::vector<std::wstring> &fileList)
|
||||||
{
|
{
|
||||||
InternalStorageManager.m_DLC.GetMountedDLCFileList(szMountDrive, fileList);
|
InternalStorageManager.m_DLC.GetMountedDLCFileList(szMountDrive, fileList);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string C4JStorage::GetMountedPath(std::string szMount)
|
std::wstring C4JStorage::GetMountedPath(std::wstring szMount)
|
||||||
{
|
{
|
||||||
return InternalStorageManager.m_DLC.GetMountedPath(szMount);
|
return InternalStorageManager.m_DLC.GetMountedPath(szMount);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -63,10 +63,10 @@ C4JStorage::EDLCStatus CDLC::GetInstalledDLC(int iPad, int (*Func)(LPVOID, int,
|
|||||||
m_iHasNewInstalledDLCs = true;
|
m_iHasNewInstalledDLCs = true;
|
||||||
|
|
||||||
bool ret = false;
|
bool ret = false;
|
||||||
DWORD atts = GetFileAttributesA("Windows64Media/DLC");
|
DWORD atts = GetFileAttributesW(L"Windows64Media/DLC");
|
||||||
if (atts == -1)
|
if (atts == -1)
|
||||||
{
|
{
|
||||||
atts = GetFileAttributesA("Windows64/DLC");
|
atts = GetFileAttributesW(L"Windows64/DLC");
|
||||||
ret = true;
|
ret = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -77,38 +77,38 @@ C4JStorage::EDLCStatus CDLC::GetInstalledDLC(int iPad, int (*Func)(LPVOID, int,
|
|||||||
return C4JStorage::EDLC_Error;
|
return C4JStorage::EDLC_Error;
|
||||||
}
|
}
|
||||||
|
|
||||||
_WIN32_FIND_DATAA hFind;
|
_WIN32_FIND_DATAW hFind;
|
||||||
HANDLE hFindFile;
|
HANDLE hFindFile;
|
||||||
if (ret)
|
if (ret)
|
||||||
{
|
{
|
||||||
hFindFile = FindFirstFileA("Windows64/DLC/*", &hFind);
|
hFindFile = FindFirstFileW(L"Windows64/DLC/*", &hFind);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
hFindFile = FindFirstFileA("Windows64Media/DLC/*", &hFind);
|
hFindFile = FindFirstFileW(L"Windows64Media/DLC/*", &hFind);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hFindFile != (HANDLE)-1LL)
|
if (hFindFile != INVALID_HANDLE_VALUE)
|
||||||
{
|
{
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
atts = hFind.dwFileAttributes;
|
atts = hFind.dwFileAttributes;
|
||||||
|
|
||||||
bool isArt = hFind.dwFileAttributes != -1 && (hFind.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY);
|
bool isArt = hFind.dwFileAttributes != -1 && (hFind.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY);
|
||||||
if (isArt && hFind.cFileName[0] != '.')
|
if (isArt && hFind.cFileName[0] != L'.')
|
||||||
{
|
{
|
||||||
XCONTENT_DATA data;
|
XCONTENT_DATA data;
|
||||||
|
|
||||||
if (ret)
|
if (ret)
|
||||||
{
|
{
|
||||||
sprintf(data.szFileName, "Windows64/DLC/%s", hFind.cFileName);
|
swprintf_s(data.szFileName, _countof(data.szFileName), L"Windows64/DLC/%s", hFind.cFileName);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
sprintf(data.szFileName, "Windows64Media/DLC/%s", hFind.cFileName);
|
swprintf_s(data.szFileName, _countof(data.szFileName), L"Windows64Media/DLC/%s", hFind.cFileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
swprintf(data.szDisplayName, 256, L"%S", hFind.cFileName);
|
swprintf_s(data.szDisplayName, 256, L"%s", hFind.cFileName);
|
||||||
int displayNameLen = wcslen(data.szDisplayName);
|
int displayNameLen = wcslen(data.szDisplayName);
|
||||||
|
|
||||||
data.DeviceID = 0;
|
data.DeviceID = 0;
|
||||||
@@ -116,14 +116,14 @@ C4JStorage::EDLCStatus CDLC::GetInstalledDLC(int iPad, int (*Func)(LPVOID, int,
|
|||||||
|
|
||||||
AddInstalled(&data);
|
AddInstalled(&data);
|
||||||
}
|
}
|
||||||
} while (FindNextFileA(hFindFile, &hFind));
|
} while (FindNextFileW(hFindFile, &hFind));
|
||||||
FindClose(hFindFile);
|
FindClose(hFindFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
return C4JStorage::EDLC_Idle;
|
return C4JStorage::EDLC_Idle;
|
||||||
}
|
}
|
||||||
|
|
||||||
DWORD CDLC::MountInstalledDLC(int iPad, DWORD dwDLC, int (*Func)(LPVOID, int, DWORD, DWORD), LPVOID lpParam, LPCSTR szMountDrive)
|
DWORD CDLC::MountInstalledDLC(int iPad, DWORD dwDLC, int (*Func)(LPVOID, int, DWORD, DWORD), LPVOID lpParam, LPCWSTR szMountDrive)
|
||||||
{
|
{
|
||||||
this->m_pMountedDLCFunc = Func;
|
this->m_pMountedDLCFunc = Func;
|
||||||
this->m_pMountedDLCParam = lpParam;
|
this->m_pMountedDLCParam = lpParam;
|
||||||
@@ -139,7 +139,7 @@ DWORD CDLC::MountInstalledDLC(int iPad, DWORD dwDLC, int (*Func)(LPVOID, int, DW
|
|||||||
|
|
||||||
this->m_uiCurrentMappedDLC = dwDLC;
|
this->m_uiCurrentMappedDLC = dwDLC;
|
||||||
|
|
||||||
char *dlcdirPath = m_vInstalledDLCs[m_uiCurrentMappedDLC].szFileName;
|
wchar_t *dlcdirPath = m_vInstalledDLCs[m_uiCurrentMappedDLC].szFileName;
|
||||||
m_vDLCDriveMappings.push_back(DriveMapping(dlcdirPath, m_szMountPath));
|
m_vDLCDriveMappings.push_back(DriveMapping(dlcdirPath, m_szMountPath));
|
||||||
|
|
||||||
m_iHasNewMountedDLCs = true;
|
m_iHasNewMountedDLCs = true;
|
||||||
@@ -147,9 +147,9 @@ DWORD CDLC::MountInstalledDLC(int iPad, DWORD dwDLC, int (*Func)(LPVOID, int, DW
|
|||||||
return 997;
|
return 997;
|
||||||
}
|
}
|
||||||
|
|
||||||
DWORD CDLC::UnmountInstalledDLC(LPCSTR szMountDrive)
|
DWORD CDLC::UnmountInstalledDLC(LPCWSTR szMountDrive)
|
||||||
{
|
{
|
||||||
LPCSTR szDrive = nullptr;
|
LPCWSTR szDrive = nullptr;
|
||||||
|
|
||||||
if (szMountDrive)
|
if (szMountDrive)
|
||||||
{
|
{
|
||||||
@@ -172,49 +172,48 @@ DWORD CDLC::UnmountInstalledDLC(LPCSTR szMountDrive)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CDLC::GetMountedDLCFileList(const char *szMountDrive, std::vector<std::string> &fileList)
|
void CDLC::GetMountedDLCFileList(const char *szMountDrive, std::vector<std::wstring> &fileList)
|
||||||
{
|
{
|
||||||
char *dlcdirPath = new char[256];
|
wchar_t dlcdirPath[256];
|
||||||
sprintf(dlcdirPath, "%s/*", m_vInstalledDLCs[m_uiCurrentMappedDLC].szFileName);
|
swprintf_s(dlcdirPath, 256, L"%s/*", m_vInstalledDLCs[m_uiCurrentMappedDLC].szFileName);
|
||||||
|
|
||||||
_WIN32_FIND_DATAA atts;
|
_WIN32_FIND_DATAW atts;
|
||||||
HANDLE hFind = FindFirstFileA(dlcdirPath, &atts);
|
HANDLE hFind = FindFirstFileW(dlcdirPath, &atts);
|
||||||
if (hFind != (HANDLE)-1LL)
|
if (hFind != INVALID_HANDLE_VALUE)
|
||||||
{
|
{
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
if (atts.dwFileAttributes == -1 || (atts.dwFileAttributes & 0x10) != 0x10)
|
if (atts.dwFileAttributes == -1 || (atts.dwFileAttributes & 0x10) != 0x10)
|
||||||
{
|
{
|
||||||
char dir[256];
|
wchar_t dir[256];
|
||||||
sprintf(dir, "%s/%s", m_vInstalledDLCs[m_uiCurrentMappedDLC].szFileName, atts.cFileName);
|
swprintf_s(dir, _countof(dir), L"%s/%s", m_vInstalledDLCs[m_uiCurrentMappedDLC].szFileName, atts.cFileName);
|
||||||
|
|
||||||
fileList.push_back(dir);
|
fileList.push_back(dir);
|
||||||
}
|
}
|
||||||
} while (FindNextFileA(hFind, &atts));
|
} while (FindNextFileW(hFind, &atts));
|
||||||
FindClose(hFind);
|
FindClose(hFind);
|
||||||
}
|
}
|
||||||
delete[] dlcdirPath;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string CDLC::GetMountedPath(std::string szMount)
|
std::wstring CDLC::GetMountedPath(std::wstring szMount)
|
||||||
{
|
{
|
||||||
for (int ch = 0; ch < szMount.size(); ++ch)
|
for (int ch = 0; ch < szMount.size(); ++ch)
|
||||||
{
|
{
|
||||||
if (szMount[ch] == '/' || szMount[ch] == '\\')
|
if (szMount[ch] == '/' || szMount[ch] == '\\')
|
||||||
{
|
{
|
||||||
return "";
|
return L"";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (szMount[ch] == ':')
|
if (szMount[ch] == ':')
|
||||||
{
|
{
|
||||||
std::string driveName = szMount.substr(0, ch);
|
std::wstring driveName = szMount.substr(0, ch);
|
||||||
for (int i = 0; i < m_vDLCDriveMappings.size(); i++)
|
for (int i = 0; i < m_vDLCDriveMappings.size(); i++)
|
||||||
{
|
{
|
||||||
if (m_vDLCDriveMappings[i].m_szMountPath == driveName)
|
if (m_vDLCDriveMappings[i].m_szMountPath == driveName)
|
||||||
{
|
{
|
||||||
std::string newPath = m_vDLCDriveMappings[i].m_szDirectoryPath;
|
std::wstring newPath = m_vDLCDriveMappings[i].m_szDirectoryPath;
|
||||||
|
|
||||||
newPath.append(szMount.substr(ch + 1, -1));
|
newPath.append(szMount.substr(ch + 1));
|
||||||
|
|
||||||
return newPath;
|
return newPath;
|
||||||
}
|
}
|
||||||
@@ -223,7 +222,7 @@ std::string CDLC::GetMountedPath(std::string szMount)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return "";
|
return L"";
|
||||||
}
|
}
|
||||||
|
|
||||||
void CDLC::SetDLCProductCode(const char *szProductCode)
|
void CDLC::SetDLCProductCode(const char *szProductCode)
|
||||||
@@ -241,9 +240,9 @@ int CDLC::GetAvailableDLCCount(int iPad)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CDLC::SetPackageRoot(char *pszDLCRoot)
|
void CDLC::SetPackageRoot(wchar_t *pszDLCRoot)
|
||||||
{
|
{
|
||||||
strcpy(this->m_szPackageRoot, pszDLCRoot);
|
wcscpy(this->m_szPackageRoot, pszDLCRoot);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CDLC::Tick(void)
|
void CDLC::Tick(void)
|
||||||
|
|||||||
@@ -30,13 +30,13 @@ class CDLC
|
|||||||
public:
|
public:
|
||||||
struct DriveMapping
|
struct DriveMapping
|
||||||
{
|
{
|
||||||
DriveMapping(std::string szDirectoryPath, std::string szMountPath) : m_szDirectoryPath(szDirectoryPath), m_szMountPath(szMountPath)
|
DriveMapping(std::wstring szDirectoryPath, std::wstring szMountPath) : m_szDirectoryPath(szDirectoryPath), m_szMountPath(szMountPath)
|
||||||
{
|
{
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string m_szMountPath;
|
std::wstring m_szMountPath;
|
||||||
std::string m_szDirectoryPath;
|
std::wstring m_szDirectoryPath;
|
||||||
};
|
};
|
||||||
|
|
||||||
XCONTENT_DATA &GetDLC(DWORD dw);
|
XCONTENT_DATA &GetDLC(DWORD dw);
|
||||||
@@ -46,15 +46,15 @@ public:
|
|||||||
DWORD dwOfferTypesBitmask = XMARKETPLACE_OFFERING_TYPE_CONTENT);
|
DWORD dwOfferTypesBitmask = XMARKETPLACE_OFFERING_TYPE_CONTENT);
|
||||||
void ClearOffers();
|
void ClearOffers();
|
||||||
C4JStorage::EDLCStatus GetInstalledDLC(int iPad, int (*Func)(LPVOID, int, int), LPVOID lpParam);
|
C4JStorage::EDLCStatus GetInstalledDLC(int iPad, int (*Func)(LPVOID, int, int), LPVOID lpParam);
|
||||||
DWORD MountInstalledDLC(int iPad, DWORD dwDLC, int (*Func)(LPVOID, int, DWORD, DWORD), LPVOID lpParam, LPCSTR szMountDrive = NULL);
|
DWORD MountInstalledDLC(int iPad, DWORD dwDLC, int (*Func)(LPVOID, int, DWORD, DWORD), LPVOID lpParam, LPCWSTR szMountDrive = NULL);
|
||||||
DWORD UnmountInstalledDLC(LPCSTR szMountDrive = NULL);
|
DWORD UnmountInstalledDLC(LPCWSTR szMountDrive = NULL);
|
||||||
void GetMountedDLCFileList(const char *szMountDrive, std::vector<std::string> &fileList);
|
void GetMountedDLCFileList(const char *szMountDrive, std::vector<std::wstring> &fileList);
|
||||||
std::string GetMountedPath(std::string szMount);
|
std::wstring GetMountedPath(std::wstring szMount);
|
||||||
|
|
||||||
void SetDLCProductCode(const char *szProductCode);
|
void SetDLCProductCode(const char *szProductCode);
|
||||||
void SetProductUpgradeKey(const char *szProductCode);
|
void SetProductUpgradeKey(const char *szProductCode);
|
||||||
int GetAvailableDLCCount(int iPad);
|
int GetAvailableDLCCount(int iPad);
|
||||||
void SetPackageRoot(char *pszDLCRoot);
|
void SetPackageRoot(wchar_t *pszDLCRoot);
|
||||||
|
|
||||||
void Tick(void);
|
void Tick(void);
|
||||||
void AddInstalled(XCONTENT_DATA *data);
|
void AddInstalled(XCONTENT_DATA *data);
|
||||||
@@ -70,10 +70,10 @@ public:
|
|||||||
DWORD m_iHasNewMountedDLCs;
|
DWORD m_iHasNewMountedDLCs;
|
||||||
int (*m_pMountedDLCFunc)(LPVOID, int, DWORD, DWORD);
|
int (*m_pMountedDLCFunc)(LPVOID, int, DWORD, DWORD);
|
||||||
LPVOID m_pMountedDLCParam;
|
LPVOID m_pMountedDLCParam;
|
||||||
std::string m_szMountPath;
|
std::wstring m_szMountPath;
|
||||||
DWORD m_uiCurrentMappedDLC;
|
DWORD m_uiCurrentMappedDLC;
|
||||||
DWORD m_dwLicenseMask;
|
DWORD m_dwLicenseMask;
|
||||||
char m_szPackageRoot[40];
|
wchar_t m_szPackageRoot[40];
|
||||||
DWORD dwordC0;
|
DWORD dwordC0;
|
||||||
std::vector<DriveMapping> m_vDLCDriveMappings;
|
std::vector<DriveMapping> m_vDLCDriveMappings;
|
||||||
char m_szDLCProductCode[16];
|
char m_szDLCProductCode[16];
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
#ifndef PCH_H
|
#ifndef PCH_H
|
||||||
#define PCH_H
|
#define PCH_H
|
||||||
|
|
||||||
|
#ifdef _WIN64
|
||||||
#define WIN32_LEAN_AND_MEAN
|
#define WIN32_LEAN_AND_MEAN
|
||||||
#include <Windows.h>
|
#include <Windows.h>
|
||||||
|
|
||||||
@@ -8,6 +9,11 @@
|
|||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <Xinput.h>
|
#include <Xinput.h>
|
||||||
|
|
||||||
|
#include <cwchar>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef _XBOX
|
||||||
#include "extraX64.h"
|
#include "extraX64.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif //PCH_H
|
#endif //PCH_H
|
||||||
@@ -96,7 +96,7 @@
|
|||||||
<SDLCheck>true</SDLCheck>
|
<SDLCheck>true</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>../Headers;$(ProjectDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>../Headers;$(ProjectDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<ForcedIncludeFiles>stdafx.h</ForcedIncludeFiles>
|
<ForcedIncludeFiles>stdafx.h</ForcedIncludeFiles>
|
||||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Windows</SubSystem>
|
<SubSystem>Windows</SubSystem>
|
||||||
@@ -126,14 +126,15 @@
|
|||||||
<ClCompile>
|
<ClCompile>
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||||
<Optimization>MaxSpeed</Optimization>
|
<Optimization>Full</Optimization>
|
||||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
<IntrinsicFunctions>false</IntrinsicFunctions>
|
||||||
<PreprocessorDefinitions>_WINDOWS64;_CRT_SECURE_NO_WARNINGS</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_WINDOWS64;_CRT_SECURE_NO_WARNINGS</PreprocessorDefinitions>
|
||||||
<SDLCheck>true</SDLCheck>
|
<SDLCheck>true</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>../Headers;$(ProjectDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>../Headers;$(ProjectDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<ForcedIncludeFiles>stdafx.h</ForcedIncludeFiles>
|
<ForcedIncludeFiles>stdafx.h</ForcedIncludeFiles>
|
||||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
|
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Windows</SubSystem>
|
<SubSystem>Windows</SubSystem>
|
||||||
|
|||||||
@@ -97,6 +97,10 @@ public:
|
|||||||
void ResetProfileProcessState(); // after a sign out from the primary player, call this
|
void ResetProfileProcessState(); // after a sign out from the primary player, call this
|
||||||
void Tick( void );
|
void Tick( void );
|
||||||
|
|
||||||
|
// SETTINGS
|
||||||
|
void LoadSettings(void* gs, size_t gsSize);
|
||||||
|
void SaveSettings(void* gs, size_t gsSize);
|
||||||
|
|
||||||
// ACHIEVEMENTS & AWARDS
|
// ACHIEVEMENTS & AWARDS
|
||||||
|
|
||||||
void RegisterAward(int iAwardNumber,int iGamerconfigID, eAwardType eType, bool bLeaderboardAffected=false,
|
void RegisterAward(int iAwardNumber,int iGamerconfigID, eAwardType eType, bool bLeaderboardAffected=false,
|
||||||
|
|||||||
@@ -57,6 +57,11 @@ public:
|
|||||||
void Tick();
|
void Tick();
|
||||||
void UpdateGamma(unsigned short usGamma);
|
void UpdateGamma(unsigned short usGamma);
|
||||||
|
|
||||||
|
// VSync
|
||||||
|
static bool m_VSyncState;
|
||||||
|
static void SetVSync(bool vs);
|
||||||
|
static int GetVSync();
|
||||||
|
|
||||||
// Matrix stack
|
// Matrix stack
|
||||||
void MatrixMode(int type);
|
void MatrixMode(int type);
|
||||||
void MatrixSetIdentity();
|
void MatrixSetIdentity();
|
||||||
@@ -79,6 +84,7 @@ public:
|
|||||||
void Present();
|
void Present();
|
||||||
void Clear(int flags, D3D11_RECT *pRect = NULL);
|
void Clear(int flags, D3D11_RECT *pRect = NULL);
|
||||||
void SetClearColour(const float colourRGBA[4]);
|
void SetClearColour(const float colourRGBA[4]);
|
||||||
|
void setResolution(int ScreenWidth, int ScreenHeight);
|
||||||
bool IsWidescreen();
|
bool IsWidescreen();
|
||||||
bool IsHiDef();
|
bool IsHiDef();
|
||||||
void CaptureThumbnail(ImageFileBuffer *pngOut);
|
void CaptureThumbnail(ImageFileBuffer *pngOut);
|
||||||
|
|||||||
@@ -285,7 +285,7 @@ public:
|
|||||||
|
|
||||||
// DLC
|
// DLC
|
||||||
void RegisterMarketplaceCountsCallback(int (*Func)(LPVOID lpParam, C4JStorage::DLC_TMS_DETAILS*, int), LPVOID lpParam);
|
void RegisterMarketplaceCountsCallback(int (*Func)(LPVOID lpParam, C4JStorage::DLC_TMS_DETAILS*, int), LPVOID lpParam);
|
||||||
void SetDLCPackageRoot(char* pszDLCRoot);
|
void SetDLCPackageRoot(wchar_t* pszDLCRoot);
|
||||||
C4JStorage::EDLCStatus GetDLCOffers(int iPad, int(*Func)(LPVOID, int, DWORD, int), LPVOID lpParam, DWORD dwOfferTypesBitmask = XMARKETPLACE_OFFERING_TYPE_CONTENT);
|
C4JStorage::EDLCStatus GetDLCOffers(int iPad, int(*Func)(LPVOID, int, DWORD, int), LPVOID lpParam, DWORD dwOfferTypesBitmask = XMARKETPLACE_OFFERING_TYPE_CONTENT);
|
||||||
DWORD CancelGetDLCOffers();
|
DWORD CancelGetDLCOffers();
|
||||||
void ClearDLCOffers();
|
void ClearDLCOffers();
|
||||||
@@ -296,10 +296,10 @@ public:
|
|||||||
|
|
||||||
C4JStorage::EDLCStatus GetInstalledDLC(int iPad, int(*Func)(LPVOID, int, int), LPVOID lpParam);
|
C4JStorage::EDLCStatus GetInstalledDLC(int iPad, int(*Func)(LPVOID, int, int), LPVOID lpParam);
|
||||||
XCONTENT_DATA& GetDLC(DWORD dw);
|
XCONTENT_DATA& GetDLC(DWORD dw);
|
||||||
DWORD MountInstalledDLC(int iPad, DWORD dwDLC, int(*Func)(LPVOID, int, DWORD, DWORD), LPVOID lpParam, LPCSTR szMountDrive = NULL);
|
DWORD MountInstalledDLC(int iPad, DWORD dwDLC, int(*Func)(LPVOID, int, DWORD, DWORD), LPVOID lpParam, LPCWSTR szMountDrive = NULL);
|
||||||
DWORD UnmountInstalledDLC(LPCSTR szMountDrive = NULL);
|
DWORD UnmountInstalledDLC(LPCWSTR szMountDrive = NULL);
|
||||||
void GetMountedDLCFileList(const char* szMountDrive, std::vector<std::string>& fileList);
|
void GetMountedDLCFileList(const char* szMountDrive, std::vector<std::wstring>& fileList);
|
||||||
std::string GetMountedPath(std::string szMount);
|
std::wstring GetMountedPath(std::wstring szMount);
|
||||||
|
|
||||||
// Global title storage
|
// Global title storage
|
||||||
C4JStorage::ETMSStatus ReadTMSFile(int iQuadrant, eGlobalStorage eStorageFacility, C4JStorage::eTMS_FileType eFileType,
|
C4JStorage::ETMSStatus ReadTMSFile(int iQuadrant, eGlobalStorage eStorageFacility, C4JStorage::eTMS_FileType eFileType,
|
||||||
|
|||||||
+1
-1
@@ -354,7 +354,7 @@ typedef struct _XCONTENT_DATA
|
|||||||
XCONTENTDEVICEID DeviceID;
|
XCONTENTDEVICEID DeviceID;
|
||||||
DWORD dwContentType;
|
DWORD dwContentType;
|
||||||
WCHAR szDisplayName[XCONTENT_MAX_DISPLAYNAME_LENGTH];
|
WCHAR szDisplayName[XCONTENT_MAX_DISPLAYNAME_LENGTH];
|
||||||
CHAR szFileName[XCONTENT_MAX_FILENAME_LENGTH];
|
WCHAR szFileName[XCONTENT_MAX_FILENAME_LENGTH];
|
||||||
} XCONTENT_DATA, *PXCONTENT_DATA;
|
} XCONTENT_DATA, *PXCONTENT_DATA;
|
||||||
#endif //__PS3__
|
#endif //__PS3__
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
# 4JLibs-VS2012
|
# 4JLibs-VS2012
|
||||||
|
|
||||||
|
## WARNING
|
||||||
|
This needs the [Windows 10 SDK](https://learn.microsoft.com/en-us/windows/apps/windows-sdk/downloads#windows-10) to build `4J_Render`.
|
||||||
|
|
||||||
## Implementation
|
## Implementation
|
||||||
|
|
||||||
For implementation details, please look at the [IMPLEMENTATION_GUIDE.md](.gitea/IMPLEMENTATION_GUIDE.md) file
|
For implementation details, please look at the [IMPLEMENTATION_GUIDE.md](.gitea/IMPLEMENTATION_GUIDE.md) file
|
||||||
|
|||||||
Reference in new issue
Block a user