forked from cafeberry/cafeberry
96 lines
2.3 KiB
C++
96 lines
2.3 KiB
C++
#include "stdafx.h"
|
|
#include "Windows64_Minecraft.h"
|
|
#include "..\Common\Consoles_App.h"
|
|
#include "..\User.h"
|
|
#include "..\..\Minecraft.Client\Minecraft.h"
|
|
#include "..\..\Minecraft.Client\MinecraftServer.h"
|
|
#include "..\..\Minecraft.Client\PlayerList.h"
|
|
#include "..\..\Minecraft.Client\ServerPlayer.h"
|
|
#include "..\..\Minecraft.World\Level.h"
|
|
#include "..\..\Minecraft.World\LevelSettings.h"
|
|
#include "..\..\Minecraft.World\BiomeSource.h"
|
|
#include "..\..\Minecraft.World\LevelType.h"
|
|
|
|
CConsoleMinecraftApp app;
|
|
|
|
CConsoleMinecraftApp::CConsoleMinecraftApp() : CMinecraftApp()
|
|
{
|
|
}
|
|
|
|
void CConsoleMinecraftApp::SetRichPresenceContext(int iPad, int contextId)
|
|
{
|
|
ProfileManager.SetRichPresenceContextValue(iPad,CONTEXT_GAME_STATE,contextId);
|
|
}
|
|
|
|
void CConsoleMinecraftApp::StoreLaunchData()
|
|
{
|
|
}
|
|
void CConsoleMinecraftApp::ExitGame()
|
|
{
|
|
if (g_pd3dDevice != NULL)
|
|
{
|
|
g_pd3dDevice->Release();
|
|
g_pd3dDevice = NULL;
|
|
}
|
|
|
|
CleanupDevice();
|
|
|
|
ExitProcess(0);
|
|
}
|
|
void CConsoleMinecraftApp::FatalLoadError()
|
|
{
|
|
}
|
|
|
|
void CConsoleMinecraftApp::CaptureSaveThumbnail()
|
|
{
|
|
RenderManager.CaptureThumbnail(&m_ThumbnailBuffer);
|
|
}
|
|
void CConsoleMinecraftApp::GetSaveThumbnail(PBYTE *pbData,DWORD *pdwSize)
|
|
{
|
|
if (m_ThumbnailBuffer.Allocated())
|
|
{
|
|
if (pbData)
|
|
{
|
|
*pbData = new BYTE[m_ThumbnailBuffer.GetBufferSize()];
|
|
*pdwSize = m_ThumbnailBuffer.GetBufferSize();
|
|
memcpy(*pbData, m_ThumbnailBuffer.GetBufferPointer(), *pdwSize);
|
|
}
|
|
m_ThumbnailBuffer.Release();
|
|
}
|
|
}
|
|
void CConsoleMinecraftApp::ReleaseSaveThumbnail()
|
|
{
|
|
}
|
|
|
|
void CConsoleMinecraftApp::GetScreenshot(int iPad,PBYTE *pbData,DWORD *pdwSize)
|
|
{
|
|
}
|
|
|
|
int CConsoleMinecraftApp::GetLocalTMSFileIndex(WCHAR *wchTMSFile,bool bFilenameIncludesExtension,eFileExtensionType eEXT)
|
|
{
|
|
return -1;
|
|
}
|
|
|
|
int CConsoleMinecraftApp::LoadLocalTMSFile(WCHAR *wchTMSFile)
|
|
{
|
|
return -1;
|
|
}
|
|
|
|
int CConsoleMinecraftApp::LoadLocalTMSFile(WCHAR *wchTMSFile, eFileExtensionType eExt)
|
|
{
|
|
return -1;
|
|
}
|
|
|
|
void CConsoleMinecraftApp::FreeLocalTMSFiles(eTMSFileType eType)
|
|
{
|
|
}
|
|
|
|
std::wstring CConsoleMinecraftApp::UTF8ToWide(const char* utf8)
|
|
{
|
|
int size = MultiByteToWideChar(CP_UTF8, 0, utf8, -1, nullptr, 0);
|
|
std::wstring wstr(size, 0);
|
|
MultiByteToWideChar(CP_UTF8, 0, utf8, -1, &wstr[0], size);
|
|
wstr.resize(size - 1);
|
|
return wstr;
|
|
}
|