mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-05-22 08:02:59 +00:00
chore: Merge remote-tracking branch 'tropical' into dev
This commit is contained in:
commit
57c1aaaccb
|
|
@ -1242,8 +1242,6 @@ set(Windows64
|
|||
"Windows64/Resource.h"
|
||||
"Windows64/Windows64_App.cpp"
|
||||
"Windows64/Windows64_App.h"
|
||||
"Windows64/Windows64_UIController.cpp"
|
||||
"Windows64/Windows64_UIController.h"
|
||||
)
|
||||
source_group("Windows64" FILES ${Windows64})
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
#include "../../windows64/Miles/include/mss.h"
|
||||
#elif defined(__linux__)
|
||||
// (DecalOverdose)HACK + TODO: Find native Linux headers and libs for this, but for now I'm using Win64 ones
|
||||
// #include "../../windows64/Miles/include/mss.h"
|
||||
#include "../../Windows64/Miles/include/mss.h"
|
||||
#else // PS4
|
||||
// 4J Stu - Temp define to get Miles to link, can likely be removed when we get a new version of Miles
|
||||
#define _SEKRIT2
|
||||
|
|
|
|||
|
|
@ -3,12 +3,6 @@ class Mob;
|
|||
class Options;
|
||||
using namespace std;
|
||||
#include "../../../Minecraft.World/SoundTypes.h"
|
||||
#ifdef __linux__
|
||||
typedef float F32;
|
||||
typedef HANDLE HMSOUNDBANK;
|
||||
typedef HANDLE HDIGDRIVER;
|
||||
typedef unsigned int HSTREAM;
|
||||
#endif // __linux__
|
||||
|
||||
enum eMUSICFILES
|
||||
{
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
unordered_map<wstring,eMinecraftColour> ColourTable::s_colourNamesMap;
|
||||
|
||||
wchar_t *ColourTable::ColourTableElements[eMinecraftColour_COUNT] =
|
||||
const wchar_t *ColourTable::ColourTableElements[eMinecraftColour_COUNT] =
|
||||
{
|
||||
L"NOTSET",
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ class ColourTable
|
|||
private:
|
||||
unsigned int m_colourValues[eMinecraftColour_COUNT];
|
||||
|
||||
static wchar_t *ColourTableElements[eMinecraftColour_COUNT];
|
||||
static const wchar_t *ColourTableElements[eMinecraftColour_COUNT];
|
||||
static unordered_map<wstring,eMinecraftColour> s_colourNamesMap;
|
||||
|
||||
public:
|
||||
|
|
|
|||
|
|
@ -66,11 +66,6 @@
|
|||
#ifdef __ORBIS__
|
||||
#include <save_data_dialog.h>
|
||||
#endif
|
||||
#include "../Linux/LinuxStubs.h"
|
||||
|
||||
#if defined(__linux__)
|
||||
#define S_OK 0
|
||||
#endif // __linux__
|
||||
|
||||
#include "../Common/Leaderboards/LeaderboardManager.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
#include "../../Minecraft.h"
|
||||
#include "../../TexturePackRepository.h"
|
||||
|
||||
WCHAR *DLCManager::wchTypeNamesA[]=
|
||||
const WCHAR *DLCManager::wchTypeNamesA[]=
|
||||
{
|
||||
L"DISPLAYNAME",
|
||||
L"THEMENAME",
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ public:
|
|||
e_DLCParamType_Max,
|
||||
|
||||
};
|
||||
static WCHAR *wchTypeNamesA[e_DLCParamType_Max];
|
||||
const static WCHAR *wchTypeNamesA[e_DLCParamType_Max];
|
||||
|
||||
private:
|
||||
vector<DLCPack *> m_packs;
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
#include "ConsoleGameRules.h"
|
||||
#include "GameRuleManager.h"
|
||||
|
||||
WCHAR *GameRuleManager::wchTagNameA[] =
|
||||
const WCHAR *GameRuleManager::wchTagNameA[] =
|
||||
{
|
||||
L"", // eGameRuleType_Root
|
||||
L"MapOptions", // eGameRuleType_LevelGenerationOptions
|
||||
|
|
@ -34,7 +34,7 @@ WCHAR *GameRuleManager::wchTagNameA[] =
|
|||
L"UpdatePlayer", // eGameRuleType_UpdatePlayerRule
|
||||
};
|
||||
|
||||
WCHAR *GameRuleManager::wchAttrNameA[] =
|
||||
const WCHAR *GameRuleManager::wchAttrNameA[] =
|
||||
{
|
||||
L"descriptionName", // eGameRuleAttr_descriptionName
|
||||
L"promptName", // eGameRuleAttr_promptName
|
||||
|
|
|
|||
|
|
@ -24,8 +24,8 @@ class WstringLookup;
|
|||
class GameRuleManager
|
||||
{
|
||||
public:
|
||||
static WCHAR *wchTagNameA[ConsoleGameRules::eGameRuleType_Count];
|
||||
static WCHAR *wchAttrNameA[ConsoleGameRules::eGameRuleAttr_Count];
|
||||
static const WCHAR *wchTagNameA[ConsoleGameRules::eGameRuleType_Count];
|
||||
static const WCHAR *wchAttrNameA[ConsoleGameRules::eGameRuleAttr_Count];
|
||||
|
||||
static const short version_number = 2;
|
||||
|
||||
|
|
|
|||
|
|
@ -12,9 +12,6 @@
|
|||
#ifdef __ORBIS__
|
||||
#include <pad.h>
|
||||
#endif
|
||||
#ifdef __linux__
|
||||
#include <math.h>
|
||||
#endif
|
||||
IUIScene_AbstractContainerMenu::IUIScene_AbstractContainerMenu()
|
||||
{
|
||||
m_menu = NULL;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,9 @@
|
|||
#pragma once
|
||||
using namespace std;
|
||||
#include <vector>
|
||||
#ifndef __linux__
|
||||
#include <qnet.h>
|
||||
#endif // __linux__
|
||||
#include "../Media/xuiscene_multi_gameinfo.h"
|
||||
|
||||
class FriendSessionInfo;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,16 @@
|
|||
#include "DemoLevel.h"
|
||||
#include "../Minecraft.World/net.minecraft.world.level.storage.h"
|
||||
|
||||
DemoLevel::DemoLevel(shared_ptr<LevelStorage> levelStorage, const wstring& levelName) : Level(levelStorage, levelName, DEMO_LEVEL_SEED)
|
||||
LevelSettings DemoLevel::DEMO_LEVEL_SETTINGS = LevelSettings(
|
||||
DemoLevel::DEMO_LEVEL_SEED,
|
||||
GameType::SURVIVAL,
|
||||
false,
|
||||
false,
|
||||
false, LevelType::lvl_normal_1_1, LEVEL_MAX_WIDTH,
|
||||
1.0
|
||||
);
|
||||
|
||||
DemoLevel::DemoLevel(shared_ptr<LevelStorage> levelStorage, const wstring& levelName) : Level(levelStorage, levelName, &DEMO_LEVEL_SETTINGS)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,10 +4,11 @@
|
|||
class DemoLevel : public Level
|
||||
{
|
||||
private:
|
||||
static const __int64 DEMO_LEVEL_SEED = 0; // 4J - TODO - was "Don't Look Back".hashCode();
|
||||
static const __int64 DEMO_LEVEL_SEED = 0; // 4J - TODO - was "Don't Look Back".hashCode();
|
||||
static const int DEMO_SPAWN_X = 796;
|
||||
static const int DEMO_SPAWN_Y = 72;
|
||||
static const int DEMO_SPAWN_Z = -731;
|
||||
static LevelSettings DEMO_LEVEL_SETTINGS;
|
||||
public:
|
||||
DemoLevel(shared_ptr<LevelStorage> levelStorage, const wstring& levelName);
|
||||
DemoLevel(Level *level, Dimension *dimension);
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#include "stdafx.h"
|
||||
#include "DragonModel.h"
|
||||
#include "../Minecraft.World/Mth.h"
|
||||
#include "../Minecraft.World/Enderdragon.h"
|
||||
#include "../Minecraft.World/EnderDragon.h"
|
||||
|
||||
DragonModel::DragonModel(float g) : Model()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@
|
|||
#include "ExperienceOrbRenderer.h"
|
||||
#include "SilverfishRenderer.h"
|
||||
#include "MushroomCowRenderer.h"
|
||||
#include "SnowmanRenderer.h"
|
||||
#include "SnowManRenderer.h"
|
||||
#include "LavaSlimeRenderer.h"
|
||||
#include "VillagerRenderer.h"
|
||||
#include "EnderDragonRenderer.h"
|
||||
|
|
|
|||
|
|
@ -67,10 +67,10 @@ void XShowAchievementsUI(int i) {}
|
|||
DWORD XBackgroundDownloadSetMode(XBACKGROUND_DOWNLOAD_MODE Mode) { return 0; }
|
||||
|
||||
#ifndef _DURANGO
|
||||
void PIXAddNamedCounter(int a, char *b, ...) {}
|
||||
void PIXAddNamedCounter(int a, const char *b, ...) {}
|
||||
//#define PS3_USE_PIX_EVENTS
|
||||
//#define PS4_USE_PIX_EVENTS
|
||||
void PIXBeginNamedEvent(int a, char *b, ...)
|
||||
void PIXBeginNamedEvent(int a, const char *b, ...)
|
||||
{
|
||||
#ifdef PS4_USE_PIX_EVENTS
|
||||
char buf[512];
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#include "stdafx.h"
|
||||
#include "ItemRenderer.h"
|
||||
#include "TileRenderer.h"
|
||||
#include "entityRenderDispatcher.h"
|
||||
#include "EntityRenderDispatcher.h"
|
||||
#include "../Minecraft.World/JavaMath.h"
|
||||
#include "../Minecraft.World/net.minecraft.world.entity.item.h"
|
||||
#include "../Minecraft.World/net.minecraft.world.item.h"
|
||||
|
|
|
|||
54
Minecraft.Client/Linux/Linux_UIController.cpp
Normal file
54
Minecraft.Client/Linux/Linux_UIController.cpp
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
#include "stdafx.h"
|
||||
#include "Linux_UIController.h"
|
||||
|
||||
#define _ENABLEIGGY
|
||||
|
||||
ConsoleUIController ui;
|
||||
|
||||
void ConsoleUIController::init(S32 w, S32 h)
|
||||
{
|
||||
#ifdef _ENABLEIGGY
|
||||
// Shared init
|
||||
preInit(w,h);
|
||||
postInit();
|
||||
#endif
|
||||
}
|
||||
|
||||
void ConsoleUIController::render()
|
||||
{
|
||||
}
|
||||
|
||||
void ConsoleUIController::beginIggyCustomDraw4J(IggyCustomDrawCallbackRegion *region, CustomDrawData *customDrawRegion)
|
||||
{
|
||||
}
|
||||
|
||||
CustomDrawData *ConsoleUIController::setupCustomDraw(UIScene *scene, IggyCustomDrawCallbackRegion *region)
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
CustomDrawData *ConsoleUIController::calculateCustomDraw(IggyCustomDrawCallbackRegion *region)
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void ConsoleUIController::endCustomDraw(IggyCustomDrawCallbackRegion *region)
|
||||
{
|
||||
}
|
||||
|
||||
void ConsoleUIController::setTileOrigin(S32 xPos, S32 yPos)
|
||||
{
|
||||
}
|
||||
|
||||
GDrawTexture *ConsoleUIController::getSubstitutionTexture(int textureId)
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void ConsoleUIController::destroySubstitutionTexture(void *destroyCallBackData, GDrawTexture *handle)
|
||||
{
|
||||
}
|
||||
|
||||
void ConsoleUIController::shutdown()
|
||||
{
|
||||
}
|
||||
27
Minecraft.Client/Linux/Linux_UIController.h
Normal file
27
Minecraft.Client/Linux/Linux_UIController.h
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
#pragma once
|
||||
|
||||
#include "../Common/UI/UIController.h"
|
||||
|
||||
class ConsoleUIController : public UIController
|
||||
{
|
||||
public:
|
||||
void init(S32 w, S32 h);
|
||||
|
||||
void render();
|
||||
void beginIggyCustomDraw4J(IggyCustomDrawCallbackRegion *region, CustomDrawData *customDrawRegion);
|
||||
virtual CustomDrawData *setupCustomDraw(UIScene *scene, IggyCustomDrawCallbackRegion *region);
|
||||
virtual CustomDrawData *calculateCustomDraw(IggyCustomDrawCallbackRegion *region);
|
||||
virtual void endCustomDraw(IggyCustomDrawCallbackRegion *region);
|
||||
|
||||
protected:
|
||||
virtual void setTileOrigin(S32 xPos, S32 yPos);
|
||||
|
||||
public:
|
||||
GDrawTexture *getSubstitutionTexture(int textureId);
|
||||
void destroySubstitutionTexture(void *destroyCallBackData, GDrawTexture *handle);
|
||||
|
||||
public:
|
||||
void shutdown();
|
||||
};
|
||||
|
||||
extern ConsoleUIController ui;
|
||||
370
Minecraft.Client/Linux/Stubs/DirectXMath/DirectXCollision.h
Normal file
370
Minecraft.Client/Linux/Stubs/DirectXMath/DirectXCollision.h
Normal file
|
|
@ -0,0 +1,370 @@
|
|||
//-------------------------------------------------------------------------------------
|
||||
// DirectXCollision.h -- C++ Collision Math library
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
//
|
||||
// http://go.microsoft.com/fwlink/?LinkID=615560
|
||||
//-------------------------------------------------------------------------------------
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "DirectXMath.h"
|
||||
|
||||
namespace DirectX
|
||||
{
|
||||
|
||||
enum ContainmentType
|
||||
{
|
||||
DISJOINT = 0,
|
||||
INTERSECTS = 1,
|
||||
CONTAINS = 2
|
||||
};
|
||||
|
||||
enum PlaneIntersectionType
|
||||
{
|
||||
FRONT = 0,
|
||||
INTERSECTING = 1,
|
||||
BACK = 2
|
||||
};
|
||||
|
||||
struct BoundingBox;
|
||||
struct BoundingOrientedBox;
|
||||
struct BoundingFrustum;
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable:4324 4820)
|
||||
// C4324: alignment padding warnings
|
||||
// C4820: Off by default noise
|
||||
#endif
|
||||
|
||||
//-------------------------------------------------------------------------------------
|
||||
// Bounding sphere
|
||||
//-------------------------------------------------------------------------------------
|
||||
struct BoundingSphere
|
||||
{
|
||||
XMFLOAT3 Center; // Center of the sphere.
|
||||
float Radius; // Radius of the sphere.
|
||||
|
||||
// Creators
|
||||
BoundingSphere() noexcept : Center(0, 0, 0), Radius(1.f) {}
|
||||
|
||||
BoundingSphere(const BoundingSphere&) = default;
|
||||
BoundingSphere& operator=(const BoundingSphere&) = default;
|
||||
|
||||
BoundingSphere(BoundingSphere&&) = default;
|
||||
BoundingSphere& operator=(BoundingSphere&&) = default;
|
||||
|
||||
constexpr BoundingSphere(_In_ const XMFLOAT3& center, _In_ float radius) noexcept
|
||||
: Center(center), Radius(radius) {}
|
||||
|
||||
// Methods
|
||||
void XM_CALLCONV Transform(_Out_ BoundingSphere& Out, _In_ FXMMATRIX M) const noexcept;
|
||||
void XM_CALLCONV Transform(_Out_ BoundingSphere& Out, _In_ float Scale, _In_ FXMVECTOR Rotation, _In_ FXMVECTOR Translation) const noexcept;
|
||||
// Transform the sphere
|
||||
|
||||
ContainmentType XM_CALLCONV Contains(_In_ FXMVECTOR Point) const noexcept;
|
||||
ContainmentType XM_CALLCONV Contains(_In_ FXMVECTOR V0, _In_ FXMVECTOR V1, _In_ FXMVECTOR V2) const noexcept;
|
||||
ContainmentType Contains(_In_ const BoundingSphere& sh) const noexcept;
|
||||
ContainmentType Contains(_In_ const BoundingBox& box) const noexcept;
|
||||
ContainmentType Contains(_In_ const BoundingOrientedBox& box) const noexcept;
|
||||
ContainmentType Contains(_In_ const BoundingFrustum& fr) const noexcept;
|
||||
|
||||
bool Intersects(_In_ const BoundingSphere& sh) const noexcept;
|
||||
bool Intersects(_In_ const BoundingBox& box) const noexcept;
|
||||
bool Intersects(_In_ const BoundingOrientedBox& box) const noexcept;
|
||||
bool Intersects(_In_ const BoundingFrustum& fr) const noexcept;
|
||||
|
||||
bool XM_CALLCONV Intersects(_In_ FXMVECTOR V0, _In_ FXMVECTOR V1, _In_ FXMVECTOR V2) const noexcept;
|
||||
// Triangle-sphere test
|
||||
|
||||
PlaneIntersectionType XM_CALLCONV Intersects(_In_ FXMVECTOR Plane) const noexcept;
|
||||
// Plane-sphere test
|
||||
|
||||
bool XM_CALLCONV Intersects(_In_ FXMVECTOR Origin, _In_ FXMVECTOR Direction, _Out_ float& Dist) const noexcept;
|
||||
// Ray-sphere test
|
||||
|
||||
ContainmentType XM_CALLCONV ContainedBy(_In_ FXMVECTOR Plane0, _In_ FXMVECTOR Plane1, _In_ FXMVECTOR Plane2,
|
||||
_In_ GXMVECTOR Plane3, _In_ HXMVECTOR Plane4, _In_ HXMVECTOR Plane5) const noexcept;
|
||||
// Test sphere against six planes (see BoundingFrustum::GetPlanes)
|
||||
|
||||
// Static methods
|
||||
static void CreateMerged(_Out_ BoundingSphere& Out, _In_ const BoundingSphere& S1, _In_ const BoundingSphere& S2) noexcept;
|
||||
|
||||
static void CreateFromBoundingBox(_Out_ BoundingSphere& Out, _In_ const BoundingBox& box) noexcept;
|
||||
static void CreateFromBoundingBox(_Out_ BoundingSphere& Out, _In_ const BoundingOrientedBox& box) noexcept;
|
||||
|
||||
static void CreateFromPoints(_Out_ BoundingSphere& Out, _In_ size_t Count,
|
||||
_In_reads_bytes_(sizeof(XMFLOAT3) + Stride * (Count - 1)) const XMFLOAT3* pPoints, _In_ size_t Stride) noexcept;
|
||||
|
||||
static void CreateFromFrustum(_Out_ BoundingSphere& Out, _In_ const BoundingFrustum& fr) noexcept;
|
||||
};
|
||||
|
||||
//-------------------------------------------------------------------------------------
|
||||
// Axis-aligned bounding box
|
||||
//-------------------------------------------------------------------------------------
|
||||
struct BoundingBox
|
||||
{
|
||||
static constexpr size_t CORNER_COUNT = 8;
|
||||
|
||||
XMFLOAT3 Center; // Center of the box.
|
||||
XMFLOAT3 Extents; // Distance from the center to each side.
|
||||
|
||||
// Creators
|
||||
BoundingBox() noexcept : Center(0, 0, 0), Extents(1.f, 1.f, 1.f) {}
|
||||
|
||||
BoundingBox(const BoundingBox&) = default;
|
||||
BoundingBox& operator=(const BoundingBox&) = default;
|
||||
|
||||
BoundingBox(BoundingBox&&) = default;
|
||||
BoundingBox& operator=(BoundingBox&&) = default;
|
||||
|
||||
constexpr BoundingBox(_In_ const XMFLOAT3& center, _In_ const XMFLOAT3& extents) noexcept
|
||||
: Center(center), Extents(extents) {}
|
||||
|
||||
// Methods
|
||||
void XM_CALLCONV Transform(_Out_ BoundingBox& Out, _In_ FXMMATRIX M) const noexcept;
|
||||
void XM_CALLCONV Transform(_Out_ BoundingBox& Out, _In_ float Scale, _In_ FXMVECTOR Rotation, _In_ FXMVECTOR Translation) const noexcept;
|
||||
|
||||
void GetCorners(_Out_writes_(8) XMFLOAT3* Corners) const noexcept;
|
||||
// Gets the 8 corners of the box
|
||||
|
||||
ContainmentType XM_CALLCONV Contains(_In_ FXMVECTOR Point) const noexcept;
|
||||
ContainmentType XM_CALLCONV Contains(_In_ FXMVECTOR V0, _In_ FXMVECTOR V1, _In_ FXMVECTOR V2) const noexcept;
|
||||
ContainmentType Contains(_In_ const BoundingSphere& sh) const noexcept;
|
||||
ContainmentType Contains(_In_ const BoundingBox& box) const noexcept;
|
||||
ContainmentType Contains(_In_ const BoundingOrientedBox& box) const noexcept;
|
||||
ContainmentType Contains(_In_ const BoundingFrustum& fr) const noexcept;
|
||||
|
||||
bool Intersects(_In_ const BoundingSphere& sh) const noexcept;
|
||||
bool Intersects(_In_ const BoundingBox& box) const noexcept;
|
||||
bool Intersects(_In_ const BoundingOrientedBox& box) const noexcept;
|
||||
bool Intersects(_In_ const BoundingFrustum& fr) const noexcept;
|
||||
|
||||
bool XM_CALLCONV Intersects(_In_ FXMVECTOR V0, _In_ FXMVECTOR V1, _In_ FXMVECTOR V2) const noexcept;
|
||||
// Triangle-Box test
|
||||
|
||||
PlaneIntersectionType XM_CALLCONV Intersects(_In_ FXMVECTOR Plane) const noexcept;
|
||||
// Plane-box test
|
||||
|
||||
bool XM_CALLCONV Intersects(_In_ FXMVECTOR Origin, _In_ FXMVECTOR Direction, _Out_ float& Dist) const noexcept;
|
||||
// Ray-Box test
|
||||
|
||||
ContainmentType XM_CALLCONV ContainedBy(_In_ FXMVECTOR Plane0, _In_ FXMVECTOR Plane1, _In_ FXMVECTOR Plane2,
|
||||
_In_ GXMVECTOR Plane3, _In_ HXMVECTOR Plane4, _In_ HXMVECTOR Plane5) const noexcept;
|
||||
// Test box against six planes (see BoundingFrustum::GetPlanes)
|
||||
|
||||
// Static methods
|
||||
static void CreateMerged(_Out_ BoundingBox& Out, _In_ const BoundingBox& b1, _In_ const BoundingBox& b2) noexcept;
|
||||
|
||||
static void CreateFromSphere(_Out_ BoundingBox& Out, _In_ const BoundingSphere& sh) noexcept;
|
||||
|
||||
static void XM_CALLCONV CreateFromPoints(_Out_ BoundingBox& Out, _In_ FXMVECTOR pt1, _In_ FXMVECTOR pt2) noexcept;
|
||||
static void CreateFromPoints(_Out_ BoundingBox& Out, _In_ size_t Count,
|
||||
_In_reads_bytes_(sizeof(XMFLOAT3) + Stride * (Count - 1)) const XMFLOAT3* pPoints, _In_ size_t Stride) noexcept;
|
||||
};
|
||||
|
||||
//-------------------------------------------------------------------------------------
|
||||
// Oriented bounding box
|
||||
//-------------------------------------------------------------------------------------
|
||||
struct BoundingOrientedBox
|
||||
{
|
||||
static constexpr size_t CORNER_COUNT = 8;
|
||||
|
||||
XMFLOAT3 Center; // Center of the box.
|
||||
XMFLOAT3 Extents; // Distance from the center to each side.
|
||||
XMFLOAT4 Orientation; // Unit quaternion representing rotation (box -> world).
|
||||
|
||||
// Creators
|
||||
BoundingOrientedBox() noexcept : Center(0, 0, 0), Extents(1.f, 1.f, 1.f), Orientation(0, 0, 0, 1.f) {}
|
||||
|
||||
BoundingOrientedBox(const BoundingOrientedBox&) = default;
|
||||
BoundingOrientedBox& operator=(const BoundingOrientedBox&) = default;
|
||||
|
||||
BoundingOrientedBox(BoundingOrientedBox&&) = default;
|
||||
BoundingOrientedBox& operator=(BoundingOrientedBox&&) = default;
|
||||
|
||||
constexpr BoundingOrientedBox(_In_ const XMFLOAT3& center, _In_ const XMFLOAT3& extents, _In_ const XMFLOAT4& orientation) noexcept
|
||||
: Center(center), Extents(extents), Orientation(orientation) {}
|
||||
|
||||
// Methods
|
||||
void XM_CALLCONV Transform(_Out_ BoundingOrientedBox& Out, _In_ FXMMATRIX M) const noexcept;
|
||||
void XM_CALLCONV Transform(_Out_ BoundingOrientedBox& Out, _In_ float Scale, _In_ FXMVECTOR Rotation, _In_ FXMVECTOR Translation) const noexcept;
|
||||
|
||||
void GetCorners(_Out_writes_(8) XMFLOAT3* Corners) const noexcept;
|
||||
// Gets the 8 corners of the box
|
||||
|
||||
ContainmentType XM_CALLCONV Contains(_In_ FXMVECTOR Point) const noexcept;
|
||||
ContainmentType XM_CALLCONV Contains(_In_ FXMVECTOR V0, _In_ FXMVECTOR V1, _In_ FXMVECTOR V2) const noexcept;
|
||||
ContainmentType Contains(_In_ const BoundingSphere& sh) const noexcept;
|
||||
ContainmentType Contains(_In_ const BoundingBox& box) const noexcept;
|
||||
ContainmentType Contains(_In_ const BoundingOrientedBox& box) const noexcept;
|
||||
ContainmentType Contains(_In_ const BoundingFrustum& fr) const noexcept;
|
||||
|
||||
bool Intersects(_In_ const BoundingSphere& sh) const noexcept;
|
||||
bool Intersects(_In_ const BoundingBox& box) const noexcept;
|
||||
bool Intersects(_In_ const BoundingOrientedBox& box) const noexcept;
|
||||
bool Intersects(_In_ const BoundingFrustum& fr) const noexcept;
|
||||
|
||||
bool XM_CALLCONV Intersects(_In_ FXMVECTOR V0, _In_ FXMVECTOR V1, _In_ FXMVECTOR V2) const noexcept;
|
||||
// Triangle-OrientedBox test
|
||||
|
||||
PlaneIntersectionType XM_CALLCONV Intersects(_In_ FXMVECTOR Plane) const noexcept;
|
||||
// Plane-OrientedBox test
|
||||
|
||||
bool XM_CALLCONV Intersects(_In_ FXMVECTOR Origin, _In_ FXMVECTOR Direction, _Out_ float& Dist) const noexcept;
|
||||
// Ray-OrientedBox test
|
||||
|
||||
ContainmentType XM_CALLCONV ContainedBy(_In_ FXMVECTOR Plane0, _In_ FXMVECTOR Plane1, _In_ FXMVECTOR Plane2,
|
||||
_In_ GXMVECTOR Plane3, _In_ HXMVECTOR Plane4, _In_ HXMVECTOR Plane5) const noexcept;
|
||||
// Test OrientedBox against six planes (see BoundingFrustum::GetPlanes)
|
||||
|
||||
// Static methods
|
||||
static void CreateFromBoundingBox(_Out_ BoundingOrientedBox& Out, _In_ const BoundingBox& box) noexcept;
|
||||
|
||||
static void CreateFromPoints(_Out_ BoundingOrientedBox& Out, _In_ size_t Count,
|
||||
_In_reads_bytes_(sizeof(XMFLOAT3) + Stride * (Count - 1)) const XMFLOAT3* pPoints, _In_ size_t Stride) noexcept;
|
||||
};
|
||||
|
||||
//-------------------------------------------------------------------------------------
|
||||
// Bounding frustum
|
||||
//-------------------------------------------------------------------------------------
|
||||
struct BoundingFrustum
|
||||
{
|
||||
static constexpr size_t CORNER_COUNT = 8;
|
||||
|
||||
XMFLOAT3 Origin; // Origin of the frustum (and projection).
|
||||
XMFLOAT4 Orientation; // Quaternion representing rotation.
|
||||
|
||||
float RightSlope; // Positive X (X/Z)
|
||||
float LeftSlope; // Negative X
|
||||
float TopSlope; // Positive Y (Y/Z)
|
||||
float BottomSlope; // Negative Y
|
||||
float Near, Far; // Z of the near plane and far plane.
|
||||
|
||||
// Creators
|
||||
BoundingFrustum() noexcept :
|
||||
Origin(0, 0, 0), Orientation(0, 0, 0, 1.f), RightSlope(1.f), LeftSlope(-1.f),
|
||||
TopSlope(1.f), BottomSlope(-1.f), Near(0), Far(1.f) {}
|
||||
|
||||
BoundingFrustum(const BoundingFrustum&) = default;
|
||||
BoundingFrustum& operator=(const BoundingFrustum&) = default;
|
||||
|
||||
BoundingFrustum(BoundingFrustum&&) = default;
|
||||
BoundingFrustum& operator=(BoundingFrustum&&) = default;
|
||||
|
||||
constexpr BoundingFrustum(_In_ const XMFLOAT3& origin, _In_ const XMFLOAT4& orientation,
|
||||
_In_ float rightSlope, _In_ float leftSlope, _In_ float topSlope, _In_ float bottomSlope,
|
||||
_In_ float nearPlane, _In_ float farPlane) noexcept
|
||||
: Origin(origin), Orientation(orientation),
|
||||
RightSlope(rightSlope), LeftSlope(leftSlope), TopSlope(topSlope), BottomSlope(bottomSlope),
|
||||
Near(nearPlane), Far(farPlane) {}
|
||||
BoundingFrustum(_In_ CXMMATRIX Projection, bool rhcoords = false) noexcept;
|
||||
|
||||
// Methods
|
||||
void XM_CALLCONV Transform(_Out_ BoundingFrustum& Out, _In_ FXMMATRIX M) const noexcept;
|
||||
void XM_CALLCONV Transform(_Out_ BoundingFrustum& Out, _In_ float Scale, _In_ FXMVECTOR Rotation, _In_ FXMVECTOR Translation) const noexcept;
|
||||
|
||||
void GetCorners(_Out_writes_(8) XMFLOAT3* Corners) const noexcept;
|
||||
// Gets the 8 corners of the frustum
|
||||
|
||||
ContainmentType XM_CALLCONV Contains(_In_ FXMVECTOR Point) const noexcept;
|
||||
ContainmentType XM_CALLCONV Contains(_In_ FXMVECTOR V0, _In_ FXMVECTOR V1, _In_ FXMVECTOR V2) const noexcept;
|
||||
ContainmentType Contains(_In_ const BoundingSphere& sp) const noexcept;
|
||||
ContainmentType Contains(_In_ const BoundingBox& box) const noexcept;
|
||||
ContainmentType Contains(_In_ const BoundingOrientedBox& box) const noexcept;
|
||||
ContainmentType Contains(_In_ const BoundingFrustum& fr) const noexcept;
|
||||
// Frustum-Frustum test
|
||||
|
||||
bool Intersects(_In_ const BoundingSphere& sh) const noexcept;
|
||||
bool Intersects(_In_ const BoundingBox& box) const noexcept;
|
||||
bool Intersects(_In_ const BoundingOrientedBox& box) const noexcept;
|
||||
bool Intersects(_In_ const BoundingFrustum& fr) const noexcept;
|
||||
|
||||
bool XM_CALLCONV Intersects(_In_ FXMVECTOR V0, _In_ FXMVECTOR V1, _In_ FXMVECTOR V2) const noexcept;
|
||||
// Triangle-Frustum test
|
||||
|
||||
PlaneIntersectionType XM_CALLCONV Intersects(_In_ FXMVECTOR Plane) const noexcept;
|
||||
// Plane-Frustum test
|
||||
|
||||
bool XM_CALLCONV Intersects(_In_ FXMVECTOR rayOrigin, _In_ FXMVECTOR Direction, _Out_ float& Dist) const noexcept;
|
||||
// Ray-Frustum test
|
||||
|
||||
ContainmentType XM_CALLCONV ContainedBy(_In_ FXMVECTOR Plane0, _In_ FXMVECTOR Plane1, _In_ FXMVECTOR Plane2,
|
||||
_In_ GXMVECTOR Plane3, _In_ HXMVECTOR Plane4, _In_ HXMVECTOR Plane5) const noexcept;
|
||||
// Test frustum against six planes (see BoundingFrustum::GetPlanes)
|
||||
|
||||
void GetPlanes(_Out_opt_ XMVECTOR* NearPlane, _Out_opt_ XMVECTOR* FarPlane, _Out_opt_ XMVECTOR* RightPlane,
|
||||
_Out_opt_ XMVECTOR* LeftPlane, _Out_opt_ XMVECTOR* TopPlane, _Out_opt_ XMVECTOR* BottomPlane) const noexcept;
|
||||
// Create 6 Planes representation of Frustum
|
||||
|
||||
// Static methods
|
||||
static void XM_CALLCONV CreateFromMatrix(_Out_ BoundingFrustum& Out, _In_ FXMMATRIX Projection, bool rhcoords = false) noexcept;
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Triangle intersection testing routines.
|
||||
//-----------------------------------------------------------------------------
|
||||
namespace TriangleTests
|
||||
{
|
||||
bool XM_CALLCONV Intersects(_In_ FXMVECTOR Origin, _In_ FXMVECTOR Direction, _In_ FXMVECTOR V0, _In_ GXMVECTOR V1, _In_ HXMVECTOR V2, _Out_ float& Dist) noexcept;
|
||||
// Ray-Triangle
|
||||
|
||||
bool XM_CALLCONV Intersects(_In_ FXMVECTOR A0, _In_ FXMVECTOR A1, _In_ FXMVECTOR A2, _In_ GXMVECTOR B0, _In_ HXMVECTOR B1, _In_ HXMVECTOR B2) noexcept;
|
||||
// Triangle-Triangle
|
||||
|
||||
PlaneIntersectionType XM_CALLCONV Intersects(_In_ FXMVECTOR V0, _In_ FXMVECTOR V1, _In_ FXMVECTOR V2, _In_ GXMVECTOR Plane) noexcept;
|
||||
// Plane-Triangle
|
||||
|
||||
ContainmentType XM_CALLCONV ContainedBy(_In_ FXMVECTOR V0, _In_ FXMVECTOR V1, _In_ FXMVECTOR V2,
|
||||
_In_ GXMVECTOR Plane0, _In_ HXMVECTOR Plane1, _In_ HXMVECTOR Plane2,
|
||||
_In_ CXMVECTOR Plane3, _In_ CXMVECTOR Plane4, _In_ CXMVECTOR Plane5) noexcept;
|
||||
// Test a triangle against six planes at once (see BoundingFrustum::GetPlanes)
|
||||
}
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* Implementation
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4068 4365 4616 6001)
|
||||
// C4068/4616: ignore unknown pragmas
|
||||
// C4365: Off by default noise
|
||||
// C6001: False positives
|
||||
#endif
|
||||
|
||||
#ifdef _PREFAST_
|
||||
#pragma prefast(push)
|
||||
#pragma prefast(disable : 25000, "FXMVECTOR is 16 bytes")
|
||||
#pragma prefast(disable : 26495, "Union initialization confuses /analyze")
|
||||
#endif
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wfloat-equal"
|
||||
#pragma clang diagnostic ignored "-Wunknown-warning-option"
|
||||
#pragma clang diagnostic ignored "-Wunsafe-buffer-usage"
|
||||
#endif
|
||||
|
||||
#include "DirectXCollision.inl"
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
#ifdef _PREFAST_
|
||||
#pragma prefast(pop)
|
||||
#endif
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
} // namespace DirectX
|
||||
|
||||
4816
Minecraft.Client/Linux/Stubs/DirectXMath/DirectXCollision.inl
Normal file
4816
Minecraft.Client/Linux/Stubs/DirectXMath/DirectXCollision.inl
Normal file
File diff suppressed because it is too large
Load diff
312
Minecraft.Client/Linux/Stubs/DirectXMath/DirectXColors.h
Normal file
312
Minecraft.Client/Linux/Stubs/DirectXMath/DirectXColors.h
Normal file
|
|
@ -0,0 +1,312 @@
|
|||
//-------------------------------------------------------------------------------------
|
||||
// DirectXColors.h -- C++ Color Math library
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
//
|
||||
// http://go.microsoft.com/fwlink/?LinkID=615560
|
||||
//-------------------------------------------------------------------------------------
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "DirectXMath.h"
|
||||
|
||||
namespace DirectX
|
||||
{
|
||||
|
||||
namespace Colors
|
||||
{
|
||||
// Standard colors (Red/Green/Blue/Alpha) in sRGB colorspace
|
||||
XMGLOBALCONST XMVECTORF32 AliceBlue = { { { 0.941176534f, 0.972549081f, 1.f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 AntiqueWhite = { { { 0.980392218f, 0.921568692f, 0.843137324f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Aqua = { { { 0.f, 1.f, 1.f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Aquamarine = { { { 0.498039246f, 1.f, 0.831372619f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Azure = { { { 0.941176534f, 1.f, 1.f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Beige = { { { 0.960784376f, 0.960784376f, 0.862745166f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Bisque = { { { 1.f, 0.894117713f, 0.768627524f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Black = { { { 0.f, 0.f, 0.f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 BlanchedAlmond = { { { 1.f, 0.921568692f, 0.803921640f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Blue = { { { 0.f, 0.f, 1.f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 BlueViolet = { { { 0.541176498f, 0.168627456f, 0.886274576f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Brown = { { { 0.647058845f, 0.164705887f, 0.164705887f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 BurlyWood = { { { 0.870588303f, 0.721568644f, 0.529411793f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 CadetBlue = { { { 0.372549027f, 0.619607866f, 0.627451003f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Chartreuse = { { { 0.498039246f, 1.f, 0.f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Chocolate = { { { 0.823529482f, 0.411764741f, 0.117647067f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Coral = { { { 1.f, 0.498039246f, 0.313725501f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 CornflowerBlue = { { { 0.392156899f, 0.584313750f, 0.929411829f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Cornsilk = { { { 1.f, 0.972549081f, 0.862745166f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Crimson = { { { 0.862745166f, 0.078431375f, 0.235294133f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Cyan = { { { 0.f, 1.f, 1.f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 DarkBlue = { { { 0.f, 0.f, 0.545098066f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 DarkCyan = { { { 0.f, 0.545098066f, 0.545098066f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 DarkGoldenrod = { { { 0.721568644f, 0.525490224f, 0.043137256f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 DarkGray = { { { 0.662745118f, 0.662745118f, 0.662745118f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 DarkGreen = { { { 0.f, 0.392156899f, 0.f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 DarkKhaki = { { { 0.741176486f, 0.717647076f, 0.419607878f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 DarkMagenta = { { { 0.545098066f, 0.f, 0.545098066f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 DarkOliveGreen = { { { 0.333333343f, 0.419607878f, 0.184313729f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 DarkOrange = { { { 1.f, 0.549019635f, 0.f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 DarkOrchid = { { { 0.600000024f, 0.196078449f, 0.800000072f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 DarkRed = { { { 0.545098066f, 0.f, 0.f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 DarkSalmon = { { { 0.913725555f, 0.588235319f, 0.478431404f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 DarkSeaGreen = { { { 0.560784340f, 0.737254918f, 0.545098066f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 DarkSlateBlue = { { { 0.282352954f, 0.239215702f, 0.545098066f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 DarkSlateGray = { { { 0.184313729f, 0.309803933f, 0.309803933f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 DarkTurquoise = { { { 0.f, 0.807843208f, 0.819607913f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 DarkViolet = { { { 0.580392182f, 0.f, 0.827451050f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 DeepPink = { { { 1.f, 0.078431375f, 0.576470613f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 DeepSkyBlue = { { { 0.f, 0.749019623f, 1.f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 DimGray = { { { 0.411764741f, 0.411764741f, 0.411764741f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 DodgerBlue = { { { 0.117647067f, 0.564705908f, 1.f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Firebrick = { { { 0.698039234f, 0.133333340f, 0.133333340f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 FloralWhite = { { { 1.f, 0.980392218f, 0.941176534f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 ForestGreen = { { { 0.133333340f, 0.545098066f, 0.133333340f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Fuchsia = { { { 1.f, 0.f, 1.f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Gainsboro = { { { 0.862745166f, 0.862745166f, 0.862745166f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 GhostWhite = { { { 0.972549081f, 0.972549081f, 1.f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Gold = { { { 1.f, 0.843137324f, 0.f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Goldenrod = { { { 0.854902029f, 0.647058845f, 0.125490203f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Gray = { { { 0.501960814f, 0.501960814f, 0.501960814f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Green = { { { 0.f, 0.501960814f, 0.f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 GreenYellow = { { { 0.678431392f, 1.f, 0.184313729f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Honeydew = { { { 0.941176534f, 1.f, 0.941176534f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 HotPink = { { { 1.f, 0.411764741f, 0.705882370f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 IndianRed = { { { 0.803921640f, 0.360784322f, 0.360784322f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Indigo = { { { 0.294117659f, 0.f, 0.509803951f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Ivory = { { { 1.f, 1.f, 0.941176534f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Khaki = { { { 0.941176534f, 0.901960850f, 0.549019635f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Lavender = { { { 0.901960850f, 0.901960850f, 0.980392218f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 LavenderBlush = { { { 1.f, 0.941176534f, 0.960784376f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 LawnGreen = { { { 0.486274540f, 0.988235354f, 0.f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 LemonChiffon = { { { 1.f, 0.980392218f, 0.803921640f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 LightBlue = { { { 0.678431392f, 0.847058892f, 0.901960850f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 LightCoral = { { { 0.941176534f, 0.501960814f, 0.501960814f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 LightCyan = { { { 0.878431439f, 1.f, 1.f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 LightGoldenrodYellow = { { { 0.980392218f, 0.980392218f, 0.823529482f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 LightGray = { { { 0.827451050f, 0.827451050f, 0.827451050f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 LightGreen = { { { 0.564705908f, 0.933333397f, 0.564705908f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 LightPink = { { { 1.f, 0.713725507f, 0.756862819f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 LightSalmon = { { { 1.f, 0.627451003f, 0.478431404f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 LightSeaGreen = { { { 0.125490203f, 0.698039234f, 0.666666687f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 LightSkyBlue = { { { 0.529411793f, 0.807843208f, 0.980392218f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 LightSlateGray = { { { 0.466666698f, 0.533333361f, 0.600000024f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 LightSteelBlue = { { { 0.690196097f, 0.768627524f, 0.870588303f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 LightYellow = { { { 1.f, 1.f, 0.878431439f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Lime = { { { 0.f, 1.f, 0.f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 LimeGreen = { { { 0.196078449f, 0.803921640f, 0.196078449f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Linen = { { { 0.980392218f, 0.941176534f, 0.901960850f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Magenta = { { { 1.f, 0.f, 1.f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Maroon = { { { 0.501960814f, 0.f, 0.f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 MediumAquamarine = { { { 0.400000036f, 0.803921640f, 0.666666687f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 MediumBlue = { { { 0.f, 0.f, 0.803921640f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 MediumOrchid = { { { 0.729411781f, 0.333333343f, 0.827451050f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 MediumPurple = { { { 0.576470613f, 0.439215720f, 0.858823597f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 MediumSeaGreen = { { { 0.235294133f, 0.701960802f, 0.443137288f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 MediumSlateBlue = { { { 0.482352972f, 0.407843173f, 0.933333397f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 MediumSpringGreen = { { { 0.f, 0.980392218f, 0.603921592f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 MediumTurquoise = { { { 0.282352954f, 0.819607913f, 0.800000072f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 MediumVioletRed = { { { 0.780392230f, 0.082352944f, 0.521568656f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 MidnightBlue = { { { 0.098039225f, 0.098039225f, 0.439215720f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 MintCream = { { { 0.960784376f, 1.f, 0.980392218f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 MistyRose = { { { 1.f, 0.894117713f, 0.882353008f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Moccasin = { { { 1.f, 0.894117713f, 0.709803939f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 NavajoWhite = { { { 1.f, 0.870588303f, 0.678431392f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Navy = { { { 0.f, 0.f, 0.501960814f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 OldLace = { { { 0.992156923f, 0.960784376f, 0.901960850f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Olive = { { { 0.501960814f, 0.501960814f, 0.f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 OliveDrab = { { { 0.419607878f, 0.556862772f, 0.137254909f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Orange = { { { 1.f, 0.647058845f, 0.f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 OrangeRed = { { { 1.f, 0.270588249f, 0.f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Orchid = { { { 0.854902029f, 0.439215720f, 0.839215755f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 PaleGoldenrod = { { { 0.933333397f, 0.909803987f, 0.666666687f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 PaleGreen = { { { 0.596078455f, 0.984313786f, 0.596078455f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 PaleTurquoise = { { { 0.686274529f, 0.933333397f, 0.933333397f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 PaleVioletRed = { { { 0.858823597f, 0.439215720f, 0.576470613f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 PapayaWhip = { { { 1.f, 0.937254965f, 0.835294187f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 PeachPuff = { { { 1.f, 0.854902029f, 0.725490212f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Peru = { { { 0.803921640f, 0.521568656f, 0.247058839f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Pink = { { { 1.f, 0.752941251f, 0.796078503f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Plum = { { { 0.866666734f, 0.627451003f, 0.866666734f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 PowderBlue = { { { 0.690196097f, 0.878431439f, 0.901960850f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Purple = { { { 0.501960814f, 0.f, 0.501960814f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Red = { { { 1.f, 0.f, 0.f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 RosyBrown = { { { 0.737254918f, 0.560784340f, 0.560784340f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 RoyalBlue = { { { 0.254901975f, 0.411764741f, 0.882353008f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 SaddleBrown = { { { 0.545098066f, 0.270588249f, 0.074509807f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Salmon = { { { 0.980392218f, 0.501960814f, 0.447058856f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 SandyBrown = { { { 0.956862807f, 0.643137276f, 0.376470625f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 SeaGreen = { { { 0.180392161f, 0.545098066f, 0.341176480f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 SeaShell = { { { 1.f, 0.960784376f, 0.933333397f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Sienna = { { { 0.627451003f, 0.321568638f, 0.176470593f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Silver = { { { 0.752941251f, 0.752941251f, 0.752941251f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 SkyBlue = { { { 0.529411793f, 0.807843208f, 0.921568692f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 SlateBlue = { { { 0.415686309f, 0.352941185f, 0.803921640f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 SlateGray = { { { 0.439215720f, 0.501960814f, 0.564705908f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Snow = { { { 1.f, 0.980392218f, 0.980392218f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 SpringGreen = { { { 0.f, 1.f, 0.498039246f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 SteelBlue = { { { 0.274509817f, 0.509803951f, 0.705882370f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Tan = { { { 0.823529482f, 0.705882370f, 0.549019635f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Teal = { { { 0.f, 0.501960814f, 0.501960814f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Thistle = { { { 0.847058892f, 0.749019623f, 0.847058892f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Tomato = { { { 1.f, 0.388235331f, 0.278431386f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Transparent = { { { 0.f, 0.f, 0.f, 0.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Turquoise = { { { 0.250980407f, 0.878431439f, 0.815686345f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Violet = { { { 0.933333397f, 0.509803951f, 0.933333397f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Wheat = { { { 0.960784376f, 0.870588303f, 0.701960802f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 White = { { { 1.f, 1.f, 1.f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 WhiteSmoke = { { { 0.960784376f, 0.960784376f, 0.960784376f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Yellow = { { { 1.f, 1.f, 0.f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 YellowGreen = { { { 0.603921592f, 0.803921640f, 0.196078449f, 1.f } } };
|
||||
|
||||
} // namespace Colors
|
||||
|
||||
namespace ColorsLinear
|
||||
{
|
||||
// Standard colors (Red/Green/Blue/Alpha) in linear colorspace
|
||||
XMGLOBALCONST XMVECTORF32 AliceBlue = { { { 0.871367335f, 0.938685894f, 1.f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 AntiqueWhite = { { { 0.955973506f, 0.830770075f, 0.679542601f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Aqua = { { { 0.f, 1.f, 1.f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Aquamarine = { { { 0.212230787f, 1.f, 0.658374965f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Azure = { { { 0.871367335f, 1.f, 1.f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Beige = { { { 0.913098991f, 0.913098991f, 0.715693772f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Bisque = { { { 1.f, 0.775822461f, 0.552011609f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Black = { { { 0.f, 0.f, 0.f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 BlanchedAlmond = { { { 1.f, 0.830770075f, 0.610495746f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Blue = { { { 0.f, 0.f, 1.f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 BlueViolet = { { { 0.254152179f, 0.024157630f, 0.760524750f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Brown = { { { 0.376262218f, 0.023153365f, 0.023153365f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 BurlyWood = { { { 0.730461001f, 0.479320228f, 0.242281199f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 CadetBlue = { { { 0.114435382f, 0.341914445f, 0.351532698f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Chartreuse = { { { 0.212230787f, 1.f, 0.f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Chocolate = { { { 0.644479871f, 0.141263321f, 0.012983031f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Coral = { { { 1.f, 0.212230787f, 0.080219828f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 CornflowerBlue = { { { 0.127437726f, 0.300543845f, 0.846873462f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Cornsilk = { { { 1.f, 0.938685894f, 0.715693772f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Crimson = { { { 0.715693772f, 0.006995410f, 0.045186214f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Cyan = { { { 0.f, 1.f, 1.f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 DarkBlue = { { { 0.f, 0.f, 0.258182913f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 DarkCyan = { { { 0.f, 0.258182913f, 0.258182913f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 DarkGoldenrod = { { { 0.479320228f, 0.238397658f, 0.003346536f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 DarkGray = { { { 0.396755308f, 0.396755308f, 0.396755308f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 DarkGreen = { { { 0.f, 0.127437726f, 0.f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 DarkKhaki = { { { 0.508881450f, 0.473531544f, 0.147027299f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 DarkMagenta = { { { 0.258182913f, 0.f, 0.258182913f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 DarkOliveGreen = { { { 0.090841733f, 0.147027299f, 0.028426038f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 DarkOrange = { { { 1.f, 0.262250721f, 0.f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 DarkOrchid = { { { 0.318546832f, 0.031896040f, 0.603827536f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 DarkRed = { { { 0.258182913f, 0.f, 0.f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 DarkSalmon = { { { 0.814846814f, 0.304987371f, 0.194617867f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 DarkSeaGreen = { { { 0.274677366f, 0.502886593f, 0.258182913f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 DarkSlateBlue = { { { 0.064803280f, 0.046665095f, 0.258182913f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 DarkSlateGray = { { { 0.028426038f, 0.078187428f, 0.078187428f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 DarkTurquoise = { { { 0.f, 0.617206752f, 0.637597024f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 DarkViolet = { { { 0.296138316f, 0.f, 0.651405811f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 DeepPink = { { { 1.f, 0.006995410f, 0.291770697f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 DeepSkyBlue = { { { 0.f, 0.520995677f, 1.f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 DimGray = { { { 0.141263321f, 0.141263321f, 0.141263321f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 DodgerBlue = { { { 0.012983031f, 0.278894335f, 1.f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Firebrick = { { { 0.445201248f, 0.015996292f, 0.015996292f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 FloralWhite = { { { 1.f, 0.955973506f, 0.871367335f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 ForestGreen = { { { 0.015996292f, 0.258182913f, 0.015996292f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Fuchsia = { { { 1.f, 0.f, 1.f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Gainsboro = { { { 0.715693772f, 0.715693772f, 0.715693772f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 GhostWhite = { { { 0.938685894f, 0.938685894f, 1.f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Gold = { { { 1.f, 0.679542601f, 0.f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Goldenrod = { { { 0.701102138f, 0.376262218f, 0.014443844f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Gray = { { { 0.215860531f, 0.215860531f, 0.215860531f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Green = { { { 0.f, 0.215860531f, 0.f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 GreenYellow = { { { 0.417885154f, 1.f, 0.028426038f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Honeydew = { { { 0.871367335f, 1.f, 0.871367335f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 HotPink = { { { 1.f, 0.141263321f, 0.456411064f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 IndianRed = { { { 0.610495746f, 0.107023112f, 0.107023112f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Indigo = { { { 0.070360109f, 0.f, 0.223227978f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Ivory = { { { 1.f, 1.f, 0.871367335f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Khaki = { { { 0.871367335f, 0.791298151f, 0.262250721f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Lavender = { { { 0.791298151f, 0.791298151f, 0.955973506f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 LavenderBlush = { { { 1.f, 0.871367335f, 0.913098991f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 LawnGreen = { { { 0.201556295f, 0.973445475f, 0.f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 LemonChiffon = { { { 1.f, 0.955973506f, 0.610495746f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 LightBlue = { { { 0.417885154f, 0.686685443f, 0.791298151f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 LightCoral = { { { 0.871367335f, 0.215860531f, 0.215860531f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 LightCyan = { { { 0.745404482f, 1.f, 1.f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 LightGoldenrodYellow = { { { 0.955973506f, 0.955973506f, 0.644479871f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 LightGray = { { { 0.651405811f, 0.651405811f, 0.651405811f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 LightGreen = { { { 0.278894335f, 0.854992807f, 0.278894335f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 LightPink = { { { 1.f, 0.467783839f, 0.533276618f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 LightSalmon = { { { 1.f, 0.351532698f, 0.194617867f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 LightSeaGreen = { { { 0.014443844f, 0.445201248f, 0.401977867f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 LightSkyBlue = { { { 0.242281199f, 0.617206752f, 0.955973506f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 LightSlateGray = { { { 0.184475034f, 0.246201396f, 0.318546832f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 LightSteelBlue = { { { 0.434153706f, 0.552011609f, 0.730461001f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 LightYellow = { { { 1.f, 1.f, 0.745404482f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Lime = { { { 0.f, 1.f, 0.f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 LimeGreen = { { { 0.031896040f, 0.610495746f, 0.031896040f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Linen = { { { 0.955973506f, 0.871367335f, 0.791298151f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Magenta = { { { 1.f, 0.f, 1.f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Maroon = { { { 0.215860531f, 0.f, 0.f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 MediumAquamarine = { { { 0.132868364f, 0.610495746f, 0.401977867f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 MediumBlue = { { { 0.f, 0.f, 0.610495746f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 MediumOrchid = { { { 0.491020888f, 0.090841733f, 0.651405811f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 MediumPurple = { { { 0.291770697f, 0.162029430f, 0.708376050f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 MediumSeaGreen = { { { 0.045186214f, 0.450785846f, 0.165132239f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 MediumSlateBlue = { { { 0.198069349f, 0.138431653f, 0.854992807f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 MediumSpringGreen = { { { 0.f, 0.955973506f, 0.323143244f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 MediumTurquoise = { { { 0.064803280f, 0.637597024f, 0.603827536f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 MediumVioletRed = { { { 0.571125031f, 0.007499032f, 0.234550655f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 MidnightBlue = { { { 0.009721218f, 0.009721218f, 0.162029430f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 MintCream = { { { 0.913098991f, 1.f, 0.955973506f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 MistyRose = { { { 1.f, 0.775822461f, 0.752942443f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Moccasin = { { { 1.f, 0.775822461f, 0.462077051f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 NavajoWhite = { { { 1.f, 0.730461001f, 0.417885154f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Navy = { { { 0.f, 0.f, 0.215860531f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 OldLace = { { { 0.982250869f, 0.913098991f, 0.791298151f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Olive = { { { 0.215860531f, 0.215860531f, 0.f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 OliveDrab = { { { 0.147027299f, 0.270497859f, 0.016807375f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Orange = { { { 1.f, 0.376262218f, 0.f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 OrangeRed = { { { 1.f, 0.059511241f, 0.f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Orchid = { { { 0.701102138f, 0.162029430f, 0.672443330f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 PaleGoldenrod = { { { 0.854992807f, 0.806952477f, 0.401977867f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 PaleGreen = { { { 0.313988745f, 0.964686573f, 0.313988745f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 PaleTurquoise = { { { 0.428690553f, 0.854992807f, 0.854992807f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 PaleVioletRed = { { { 0.708376050f, 0.162029430f, 0.291770697f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 PapayaWhip = { { { 1.f, 0.863157392f, 0.665387452f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 PeachPuff = { { { 1.f, 0.701102138f, 0.485149980f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Peru = { { { 0.610495746f, 0.234550655f, 0.049706575f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Pink = { { { 1.f, 0.527115345f, 0.597202003f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Plum = { { { 0.723055363f, 0.351532698f, 0.723055363f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 PowderBlue = { { { 0.434153706f, 0.745404482f, 0.791298151f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Purple = { { { 0.215860531f, 0.f, 0.215860531f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Red = { { { 1.f, 0.f, 0.f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 RosyBrown = { { { 0.502886593f, 0.274677366f, 0.274677366f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 RoyalBlue = { { { 0.052860655f, 0.141263321f, 0.752942443f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 SaddleBrown = { { { 0.258182913f, 0.059511241f, 0.006512091f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Salmon = { { { 0.955973506f, 0.215860531f, 0.168269455f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 SandyBrown = { { { 0.904661357f, 0.371237785f, 0.116970696f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 SeaGreen = { { { 0.027320892f, 0.258182913f, 0.095307484f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 SeaShell = { { { 1.f, 0.913098991f, 0.854992807f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Sienna = { { { 0.351532698f, 0.084376216f, 0.026241222f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Silver = { { { 0.527115345f, 0.527115345f, 0.527115345f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 SkyBlue = { { { 0.242281199f, 0.617206752f, 0.830770075f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 SlateBlue = { { { 0.144128501f, 0.102241747f, 0.610495746f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 SlateGray = { { { 0.162029430f, 0.215860531f, 0.278894335f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Snow = { { { 1.f, 0.955973506f, 0.955973506f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 SpringGreen = { { { 0.f, 1.f, 0.212230787f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 SteelBlue = { { { 0.061246071f, 0.223227978f, 0.456411064f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Tan = { { { 0.644479871f, 0.456411064f, 0.262250721f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Teal = { { { 0.f, 0.215860531f, 0.215860531f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Thistle = { { { 0.686685443f, 0.520995677f, 0.686685443f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Tomato = { { { 1.f, 0.124771863f, 0.063010029f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Transparent = { { { 0.f, 0.f, 0.f, 0.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Turquoise = { { { 0.051269468f, 0.745404482f, 0.630757332f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Violet = { { { 0.854992807f, 0.223227978f, 0.854992807f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Wheat = { { { 0.913098991f, 0.730461001f, 0.450785846f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 White = { { { 1.f, 1.f, 1.f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 WhiteSmoke = { { { 0.913098991f, 0.913098991f, 0.913098991f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 Yellow = { { { 1.f, 1.f, 0.f, 1.f } } };
|
||||
XMGLOBALCONST XMVECTORF32 YellowGreen = { { { 0.323143244f, 0.610495746f, 0.031896040f, 1.f } } };
|
||||
|
||||
} // namespace ColorsLinear
|
||||
|
||||
} // namespace DirectX
|
||||
|
||||
2295
Minecraft.Client/Linux/Stubs/DirectXMath/DirectXMath.h
Normal file
2295
Minecraft.Client/Linux/Stubs/DirectXMath/DirectXMath.h
Normal file
File diff suppressed because it is too large
Load diff
2201
Minecraft.Client/Linux/Stubs/DirectXMath/DirectXMathConvert.inl
Normal file
2201
Minecraft.Client/Linux/Stubs/DirectXMath/DirectXMathConvert.inl
Normal file
File diff suppressed because it is too large
Load diff
3554
Minecraft.Client/Linux/Stubs/DirectXMath/DirectXMathMatrix.inl
Normal file
3554
Minecraft.Client/Linux/Stubs/DirectXMath/DirectXMathMatrix.inl
Normal file
File diff suppressed because it is too large
Load diff
2493
Minecraft.Client/Linux/Stubs/DirectXMath/DirectXMathMisc.inl
Normal file
2493
Minecraft.Client/Linux/Stubs/DirectXMath/DirectXMathMisc.inl
Normal file
File diff suppressed because it is too large
Load diff
14869
Minecraft.Client/Linux/Stubs/DirectXMath/DirectXMathVector.inl
Normal file
14869
Minecraft.Client/Linux/Stubs/DirectXMath/DirectXMathVector.inl
Normal file
File diff suppressed because it is too large
Load diff
1259
Minecraft.Client/Linux/Stubs/DirectXMath/DirectXPackedVector.h
Normal file
1259
Minecraft.Client/Linux/Stubs/DirectXMath/DirectXPackedVector.h
Normal file
File diff suppressed because it is too large
Load diff
4503
Minecraft.Client/Linux/Stubs/DirectXMath/DirectXPackedVector.inl
Normal file
4503
Minecraft.Client/Linux/Stubs/DirectXMath/DirectXPackedVector.inl
Normal file
File diff suppressed because it is too large
Load diff
2941
Minecraft.Client/Linux/Stubs/DirectXMath/sal.h
Normal file
2941
Minecraft.Client/Linux/Stubs/DirectXMath/sal.h
Normal file
File diff suppressed because it is too large
Load diff
36
Minecraft.Client/Linux/Stubs/LinuxStubs.h
Normal file
36
Minecraft.Client/Linux/Stubs/LinuxStubs.h
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
#ifndef STUBS_H
|
||||
#define STUBS_H
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include <cstring>
|
||||
#include <cstdlib>
|
||||
#include <string>
|
||||
#include <cerrno>
|
||||
#include <atomic>
|
||||
#include <climits>
|
||||
#include <cfloat>
|
||||
#include <cmath>
|
||||
#include <pthread.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
#include <dirent.h>
|
||||
#include <fnmatch.h>
|
||||
#include <time.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/time.h>
|
||||
#include <unistd.h>
|
||||
#include <locale>
|
||||
#include <linux/mman.h>
|
||||
#include <sys/mman.h>
|
||||
#include <codecvt>
|
||||
|
||||
#include "winapi_stubs.h"
|
||||
#include "d3d11_stubs.h"
|
||||
#include "xbox_stubs.h"
|
||||
#include "iggy_stubs.h"
|
||||
|
||||
#endif // STUBS_H
|
||||
71
Minecraft.Client/Linux/Stubs/d3d11_stubs.h
Normal file
71
Minecraft.Client/Linux/Stubs/d3d11_stubs.h
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
#ifndef D3D11STUBS_H
|
||||
#define D3D11STUBS_H
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "winapi_stubs.h"
|
||||
#include "DirectXMath/DirectXMath.h"
|
||||
|
||||
using namespace DirectX;
|
||||
|
||||
typedef struct _RECT
|
||||
{
|
||||
LONG left;
|
||||
LONG top;
|
||||
LONG right;
|
||||
LONG bottom;
|
||||
} RECT, *PRECT;
|
||||
|
||||
// stole- i mean borrowed from OrbisStubs.h
|
||||
typedef void ID3D11Device;
|
||||
typedef void ID3D11DeviceContext;
|
||||
typedef void IDXGISwapChain;
|
||||
typedef RECT D3D11_RECT;
|
||||
typedef void ID3D11RenderTargetView;
|
||||
typedef void ID3D11DepthStencilView;
|
||||
typedef void ID3D11Buffer;
|
||||
// typedef DWORD (*PTHREAD_START_ROUTINE)( LPVOID lpThreadParameter);
|
||||
// typedef PTHREAD_START_ROUTINE LPTHREAD_START_ROUTINE;
|
||||
|
||||
// Used only by windows/durango gdraw and UIController. Will be unnecessary once we have our own
|
||||
// UIController stubs.
|
||||
typedef void ID3D11ShaderResourceView;
|
||||
typedef void ID3D11Resource;
|
||||
typedef void ID3D11Texture2D;
|
||||
typedef void D3D11_TEXTURE2D_DESC;
|
||||
|
||||
enum D3D11_BLEND
|
||||
{
|
||||
D3D11_BLEND_ZERO = 1,
|
||||
D3D11_BLEND_ONE = 2,
|
||||
D3D11_BLEND_SRC_COLOR = 3,
|
||||
D3D11_BLEND_INV_SRC_COLOR = 4,
|
||||
D3D11_BLEND_SRC_ALPHA = 5,
|
||||
D3D11_BLEND_INV_SRC_ALPHA = 6,
|
||||
D3D11_BLEND_DEST_ALPHA = 7,
|
||||
D3D11_BLEND_INV_DEST_ALPHA = 8,
|
||||
D3D11_BLEND_DEST_COLOR = 9,
|
||||
D3D11_BLEND_INV_DEST_COLOR = 10,
|
||||
D3D11_BLEND_SRC_ALPHA_SAT = 11,
|
||||
D3D11_BLEND_BLEND_FACTOR = 14,
|
||||
D3D11_BLEND_INV_BLEND_FACTOR = 15,
|
||||
D3D11_BLEND_SRC1_COLOR = 16,
|
||||
D3D11_BLEND_INV_SRC1_COLOR = 17,
|
||||
D3D11_BLEND_SRC1_ALPHA = 18,
|
||||
D3D11_BLEND_INV_SRC1_ALPHA = 19
|
||||
};
|
||||
|
||||
|
||||
enum D3D11_COMPARISON_FUNC
|
||||
{
|
||||
D3D11_COMPARISON_NEVER = 1,
|
||||
D3D11_COMPARISON_LESS = 2,
|
||||
D3D11_COMPARISON_EQUAL = 3,
|
||||
D3D11_COMPARISON_LESS_EQUAL = 4,
|
||||
D3D11_COMPARISON_GREATER = 5,
|
||||
D3D11_COMPARISON_NOT_EQUAL = 6,
|
||||
D3D11_COMPARISON_GREATER_EQUAL = 7,
|
||||
D3D11_COMPARISON_ALWAYS = 8
|
||||
};
|
||||
|
||||
#endif // D3D11STUBS_H
|
||||
162
Minecraft.Client/Linux/Stubs/iggy_stubs.h
Normal file
162
Minecraft.Client/Linux/Stubs/iggy_stubs.h
Normal file
|
|
@ -0,0 +1,162 @@
|
|||
#ifndef IGGYSTUBS_H
|
||||
#define IGGYSTUBS_H
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
#include "../../Windows64/Iggy/include/iggy.h"
|
||||
|
||||
#define STUBBED {}
|
||||
|
||||
RADEXPFUNC inline IggyValuePath * RADEXPLINK IggyPlayerRootPath(Iggy *f) {
|
||||
STUBBED;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
RADEXPFUNC inline IggyResult RADEXPLINK IggyPlayerCallMethodRS(Iggy *f, IggyDataValue *result, IggyValuePath *target, IggyName methodname, S32 numargs, IggyDataValue *args) {
|
||||
STUBBED;
|
||||
return IGGY_RESULT_SUCCESS;
|
||||
}
|
||||
|
||||
RADEXPFUNC inline void RADEXPLINK IggyPlayerDestroy(Iggy *player) {
|
||||
STUBBED;
|
||||
}
|
||||
RADEXPFUNC inline void RADEXPLINK IggyPlayerSetDisplaySize(Iggy *f, S32 w, S32 h) {
|
||||
STUBBED;
|
||||
}
|
||||
|
||||
RADEXPFUNC inline void RADEXPLINK IggyPlayerDrawTilesStart(Iggy *f) {
|
||||
STUBBED;
|
||||
}
|
||||
|
||||
RADEXPFUNC inline void RADEXPLINK IggyPlayerDrawTile(Iggy *f, S32 x0, S32 y0, S32 x1, S32 y1, S32 padding) {
|
||||
STUBBED;
|
||||
}
|
||||
RADEXPFUNC inline void RADEXPLINK IggyPlayerDrawTilesEnd(Iggy *f) {
|
||||
STUBBED;
|
||||
}
|
||||
|
||||
static int thing = 0;
|
||||
|
||||
RADEXPFUNC inline Iggy * RADEXPLINK IggyPlayerCreateFromMemory(
|
||||
void const * data,
|
||||
U32 data_size_in_bytes,
|
||||
IggyPlayerConfig *config) {
|
||||
STUBBED;
|
||||
return (Iggy*)&thing;
|
||||
}
|
||||
|
||||
|
||||
RADEXPFUNC inline void RADEXPLINK IggyPlayerInitializeAndTickRS(Iggy *player) {
|
||||
STUBBED;
|
||||
}
|
||||
|
||||
static IggyProperties properties;
|
||||
|
||||
RADEXPFUNC inline IggyProperties * RADEXPLINK IggyPlayerProperties(Iggy *player) {
|
||||
STUBBED;
|
||||
return &properties;
|
||||
}
|
||||
RADEXPFUNC inline void RADEXPLINK IggyPlayerSetUserdata(Iggy *player, void *userdata) {
|
||||
STUBBED;
|
||||
}
|
||||
RADEXPFUNC inline IggyName RADEXPLINK IggyPlayerCreateFastName(Iggy *f, IggyUTF16 const *name, S32 len) {
|
||||
STUBBED;
|
||||
return 0;
|
||||
}
|
||||
RADEXPFUNC inline rrbool RADEXPLINK IggyDebugGetMemoryUseInfo(Iggy *player, IggyLibrary lib, char const *category_string, S32 category_stringlen, S32 iteration, IggyMemoryUseInfo *data) {
|
||||
STUBBED;
|
||||
return false;
|
||||
}
|
||||
RADEXPFUNC inline rrbool RADEXPLINK IggyPlayerReadyToTick(Iggy *player) {
|
||||
STUBBED;
|
||||
return false;
|
||||
}
|
||||
RADEXPFUNC inline void RADEXPLINK IggyPlayerTickRS(Iggy *player) {
|
||||
STUBBED;
|
||||
}
|
||||
RADEXPFUNC inline void RADEXPLINK IggyPlayerDraw(Iggy *f) {
|
||||
STUBBED;
|
||||
}
|
||||
RADEXPFUNC inline void RADEXPLINK IggyMakeEventKey(IggyEvent *event, IggyKeyevent event_type, IggyKeycode keycode, IggyKeyloc keyloc) {
|
||||
STUBBED;
|
||||
}
|
||||
RADEXPFUNC inline rrbool RADEXPLINK IggyPlayerDispatchEventRS(Iggy *player, IggyEvent *event, IggyEventResult *result) {
|
||||
STUBBED;
|
||||
return false;
|
||||
}
|
||||
RADEXPFUNC inline void RADEXPLINK IggyFontRemoveUTF8(const char *fontname, S32 namelen_in_bytes, U32 fontflags) {
|
||||
STUBBED;
|
||||
}
|
||||
RADEXPFUNC inline void RADEXPLINK IggyFontInstallBitmapUTF8(const IggyBitmapFontProvider *bmf, const char *fontname, S32 namelen_in_bytes, U32 fontflags) {
|
||||
STUBBED;
|
||||
}
|
||||
RADEXPFUNC inline void RADEXPLINK IggyFontSetIndirectUTF8(const char *request_name, S32 request_namelen, U32 request_flags, const char *result_name, S32 result_namelen, U32 result_flags) {
|
||||
STUBBED;
|
||||
}
|
||||
RADEXPFUNC inline void RADEXPLINK IggyFontInstallTruetypeUTF8(const void *truetype_storage, S32 ttc_index, const char *fontname, S32 namelen_in_bytes, U32 fontflags) {
|
||||
STUBBED;
|
||||
}
|
||||
RADEXPFUNC inline rrbool RADEXPLINK IggyValuePathMakeNameRef(IggyValuePath *result, IggyValuePath *parent, char const *text_utf8) {
|
||||
STUBBED;
|
||||
return false;
|
||||
}
|
||||
RADEXPFUNC inline IggyResult RADEXPLINK IggyValueGetBooleanRS(IggyValuePath *var, IggyName sub_name, char const *sub_name_utf8, rrbool *result) {
|
||||
STUBBED;
|
||||
return IGGY_RESULT_SUCCESS;
|
||||
}
|
||||
RADEXPFUNC inline void RADEXPLINK IggyFontInstallTruetypeFallbackCodepointUTF8(const char *fontname, S32 len, U32 fontflags, S32 fallback_codepoint) {
|
||||
STUBBED;
|
||||
}
|
||||
RADEXPFUNC inline IggyResult RADEXPLINK IggyValueGetF64RS(IggyValuePath *var, IggyName sub_name, char const *sub_name_utf8, F64 *result) {
|
||||
STUBBED;
|
||||
return IGGY_RESULT_SUCCESS;
|
||||
}
|
||||
RADEXPFUNC inline rrbool RADEXPLINK IggyValueSetBooleanRS(IggyValuePath *var, IggyName sub_name, char const *sub_name_utf8, rrbool value) {
|
||||
STUBBED;
|
||||
return false;
|
||||
}
|
||||
RADEXPFUNC inline void RADEXPLINK IggyInit(IggyAllocator *allocator) {
|
||||
STUBBED;
|
||||
}
|
||||
RADEXPFUNC inline void RADEXPLINK IggySetWarningCallback(Iggy_WarningFunction *error, void *user_callback_data) {
|
||||
STUBBED;
|
||||
}
|
||||
RADEXPFUNC inline void RADEXPLINK IggySetTraceCallbackUTF8(Iggy_TraceFunctionUTF8 *trace_utf8, void *user_callback_data) {
|
||||
STUBBED;
|
||||
}
|
||||
RADEXPFUNC inline void RADEXPLINK IggySetFontCachingCalculationBuffer(
|
||||
S32 max_chars,
|
||||
void *optional_temp_buffer,
|
||||
S32 optional_temp_buffer_size_in_bytes) {
|
||||
STUBBED;
|
||||
}
|
||||
RADEXPFUNC inline void RADEXPLINK IggySetCustomDrawCallback(Iggy_CustomDrawCallback *custom_draw, void *user_callback_data) {
|
||||
STUBBED;
|
||||
}
|
||||
RADEXPFUNC inline void RADEXPLINK IggySetAS3ExternalFunctionCallbackUTF16(Iggy_AS3ExternalFunctionUTF16 *as3_external_function_utf16, void *user_callback_data) {
|
||||
STUBBED;
|
||||
}
|
||||
RADEXPFUNC inline void RADEXPLINK IggyMakeEventMouseMove(IggyEvent *event, S32 x, S32 y) {
|
||||
STUBBED;
|
||||
}
|
||||
RADEXPFUNC inline void RADEXPLINK IggySetTextureSubstitutionCallbacks(Iggy_TextureSubstitutionCreateCallback *texture_create, Iggy_TextureSubstitutionDestroyCallback *texture_destroy, void *user_callback_data) {
|
||||
STUBBED;
|
||||
}
|
||||
RADEXPFUNC inline void * RADEXPLINK IggyPlayerGetUserdata(Iggy *player) {
|
||||
STUBBED;
|
||||
return 0;
|
||||
}
|
||||
RADEXPFUNC inline IggyLibrary RADEXPLINK IggyLibraryCreateFromMemoryUTF16(
|
||||
IggyUTF16 const * url_utf16_null_terminated,
|
||||
void const * data,
|
||||
U32 data_size_in_bytes,
|
||||
IggyPlayerConfig *config) {
|
||||
STUBBED;
|
||||
return 0;
|
||||
}
|
||||
RADEXPFUNC inline void RADEXPLINK IggyLibraryDestroy(IggyLibrary lib) {
|
||||
STUBBED;
|
||||
}
|
||||
|
||||
#endif // IGGYSTUBS_H
|
||||
|
|
@ -1,27 +1,9 @@
|
|||
#ifndef LINUXSTUBS_H
|
||||
#define LINUXSTUBS_H
|
||||
#ifndef WINAPISTUBS_H
|
||||
#define WINAPISTUBS_H
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include <cstring>
|
||||
#include <cstdlib>
|
||||
#include <string>
|
||||
#include <cerrno>
|
||||
#include <atomic>
|
||||
#include <climits>
|
||||
#include <cfloat>
|
||||
#include <cmath>
|
||||
#include <pthread.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
#include <dirent.h>
|
||||
#include <fnmatch.h>
|
||||
#include <time.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/time.h>
|
||||
#include <cassert>
|
||||
|
||||
#define TRUE true
|
||||
#define FALSE false
|
||||
|
|
@ -32,6 +14,7 @@
|
|||
#define __cdecl
|
||||
#define _vsnprintf_s vsnprintf;
|
||||
|
||||
#define S_OK 0
|
||||
typedef unsigned int DWORD;
|
||||
typedef const char *LPCSTR;
|
||||
typedef bool BOOL;
|
||||
|
|
@ -59,11 +42,19 @@ typedef void VOID;
|
|||
typedef ULONGLONG PlayerUID;
|
||||
typedef DWORD WORD;
|
||||
typedef DWORD* PDWORD;
|
||||
|
||||
typedef struct {
|
||||
DWORD LowPart;
|
||||
LONG HighPart;
|
||||
long long QuadPart;
|
||||
} LARGE_INTEGER;
|
||||
|
||||
typedef struct {
|
||||
DWORD LowPart;
|
||||
LONG HighPart;
|
||||
long long QuadPart;
|
||||
} ULARGE_INTEGER;
|
||||
|
||||
typedef long long LONGLONG;
|
||||
typedef size_t SIZE_T;
|
||||
typedef std::wstring LPWSTR;
|
||||
|
|
@ -84,6 +75,8 @@ typedef float FLOAT;
|
|||
//#define S_OK ((HRESULT)0x00000000L)
|
||||
#define S_FALSE ((HRESULT)0x00000001L)
|
||||
|
||||
#define INFINITE 0xFFFFFFFF // Infinite timeout
|
||||
|
||||
#define PAGE_READWRITE 0x04
|
||||
#define MEM_LARGE_PAGES 0x20000000
|
||||
#define MAXULONG_PTR ((ULONG_PTR)~0UL)
|
||||
|
|
@ -105,6 +98,14 @@ typedef float FLOAT;
|
|||
#define TRUNCATE_EXISTING 5
|
||||
#define WAIT_TIMEOUT 258
|
||||
|
||||
#define FILE_FLAG_WRITE_THROUGH 0x80000000
|
||||
#define FILE_FLAG_OVERLAPPED 0x40000000
|
||||
#define FILE_FLAG_NO_BUFFERING 0x20000000
|
||||
#define FILE_FLAG_RANDOM_ACCESS 0x10000000
|
||||
#define FILE_FLAG_SEQUENTIAL_SCAN 0x08000000
|
||||
#define FILE_FLAG_DELETE_ON_CLOSE 0x04000000
|
||||
#define FILE_FLAG_BACKUP_SEMANTICS 0x02000000
|
||||
|
||||
#define FILE_ATTRIBUTE_READONLY 0x00000001
|
||||
#define FILE_ATTRIBUTE_HIDDEN 0x00000002
|
||||
#define FILE_ATTRIBUTE_SYSTEM 0x00000004
|
||||
|
|
@ -120,6 +121,32 @@ typedef float FLOAT;
|
|||
#define FILE_CURRENT SEEK_CUR
|
||||
#define FILE_END SEEK_END
|
||||
|
||||
#define PAGE_NOACCESS 0x01
|
||||
#define PAGE_READONLY 0x02
|
||||
#define PAGE_READWRITE 0x04
|
||||
#define PAGE_WRITECOPY 0x08
|
||||
#define PAGE_EXECUTE 0x10
|
||||
#define PAGE_EXECUTE_READ 0x20
|
||||
#define PAGE_EXECUTE_READWRITE 0x40
|
||||
#define PAGE_EXECUTE_WRITECOPY 0x80
|
||||
#define PAGE_GUARD 0x100
|
||||
#define PAGE_NOCACHE 0x200
|
||||
#define PAGE_WRITECOMBINE 0x400
|
||||
#define PAGE_USER_READONLY 0x1000
|
||||
#define PAGE_USER_READWRITE 0x2000
|
||||
#define MEM_COMMIT 0x1000
|
||||
#define MEM_RESERVE 0x2000
|
||||
#define MEM_DECOMMIT 0x4000
|
||||
#define MEM_RELEASE 0x8000
|
||||
#define MEM_FREE 0x10000
|
||||
#define MEM_PRIVATE 0x20000
|
||||
#define MEM_RESET 0x80000
|
||||
#define MEM_TOP_DOWN 0x100000
|
||||
#define MEM_NOZERO 0x800000
|
||||
#define MEM_LARGE_PAGES 0x20000000
|
||||
#define MEM_HEAP 0x40000000
|
||||
#define MEM_16MB_PAGES 0x80000000
|
||||
|
||||
#define INVALID_HANDLE_VALUE ((HANDLE)(ULONG_PTR)-1)
|
||||
|
||||
// https://learn.microsoft.com/en-us/windows/win32/api/minwinbase/ns-minwinbase-filetime
|
||||
|
|
@ -196,6 +223,22 @@ typedef struct _SYSTEMTIME {
|
|||
// https://learn.microsoft.com/en-us/cpp/c-runtime-library/truncate?view=msvc-170
|
||||
#define _TRUNCATE ((size_t)-1)
|
||||
|
||||
#define DECLARE_HANDLE(name) typedef HANDLE name
|
||||
DECLARE_HANDLE(HINSTANCE);
|
||||
|
||||
typedef HINSTANCE HMODULE;
|
||||
|
||||
#define _HRESULT_TYPEDEF_(_sc) _sc
|
||||
|
||||
#define FAILED(Status) ((HRESULT)(Status)<0)
|
||||
#define MAKE_HRESULT(sev,fac,code) \
|
||||
((HRESULT) (((unsigned int)(sev)<<31) | ((unsigned int)(fac)<<16) | ((unsigned int)(code))) )
|
||||
#define MAKE_SCODE(sev,fac,code) \
|
||||
((SCODE) (((unsigned int)(sev)<<31) | ((unsigned int)(fac)<<16) | ((unsigned int)(code))) )
|
||||
#define E_FAIL _HRESULT_TYPEDEF_(0x80004005L)
|
||||
#define E_ABORT _HRESULT_TYPEDEF_(0x80004004L)
|
||||
#define E_NOINTERFACE _HRESULT_TYPEDEF_(0x80004002L)
|
||||
|
||||
typedef pthread_mutex_t RTL_CRITICAL_SECTION;
|
||||
typedef pthread_mutex_t* PRTL_CRITICAL_SECTION;
|
||||
|
||||
|
|
@ -690,7 +733,7 @@ typedef struct {
|
|||
int manual_reset;
|
||||
} Event;
|
||||
|
||||
HANDLE CreateEvent(int manual_reset, int initial_state) {
|
||||
static inline HANDLE CreateEvent(int manual_reset, int initial_state) {
|
||||
Event* ev = (Event*)malloc(sizeof(Event));
|
||||
pthread_mutex_init(&ev->mutex, NULL);
|
||||
pthread_cond_init(&ev->cond, NULL);
|
||||
|
|
@ -699,30 +742,15 @@ HANDLE CreateEvent(int manual_reset, int initial_state) {
|
|||
return (HANDLE)ev;
|
||||
}
|
||||
|
||||
// d3d11 stubs
|
||||
static inline HMODULE GetModuleHandle(LPCSTR lpModuleName) { return 0; }
|
||||
|
||||
typedef struct _RECT
|
||||
{
|
||||
LONG left;
|
||||
LONG top;
|
||||
LONG right;
|
||||
LONG bottom;
|
||||
} RECT, *PRECT;
|
||||
static inline LPVOID VirtualAlloc(LPVOID lpAddress, SIZE_T dwSize, DWORD flAllocationType, DWORD flProtect) {
|
||||
assert(0 && "FIXME: implement VirtualAlloc");
|
||||
}
|
||||
|
||||
// stole- i mean borrowed from OrbisStubs.h
|
||||
typedef void ID3D11Device;
|
||||
typedef void ID3D11DeviceContext;
|
||||
typedef void ID3D11ShaderResourceView; // used only by windows/durango gdraw and uicontroller
|
||||
typedef void IDXGISwapChain;
|
||||
typedef RECT D3D11_RECT;
|
||||
typedef void ID3D11RenderTargetView;
|
||||
typedef void ID3D11DepthStencilView;
|
||||
typedef void ID3D11Buffer;
|
||||
typedef DWORD (*PTHREAD_START_ROUTINE)( LPVOID lpThreadParameter);
|
||||
typedef PTHREAD_START_ROUTINE LPTHREAD_START_ROUTINE;
|
||||
static inline BOOL VirtualFree(LPVOID lpAddress, SIZE_T dwSize, DWORD dwFreeType) {
|
||||
assert(0 && "FIXME: implement VirtualFree");
|
||||
}
|
||||
|
||||
//typedef bool rrbool;
|
||||
|
||||
#define S_OK 0
|
||||
|
||||
#endif // LINUXSTUBS_H
|
||||
#endif // WINAPISTUBS_H
|
||||
|
|
@ -20,7 +20,7 @@ typedef unsigned int uint;
|
|||
typedef unsigned long long int uint64;
|
||||
typedef long long int int64;
|
||||
|
||||
#define FORCEINLINE
|
||||
#define FORCEINLINE inline
|
||||
|
||||
// Content creation/open flags
|
||||
#define XCONTENTFLAG_NONE 0x00
|
||||
|
|
@ -1,153 +0,0 @@
|
|||
#include "../Windows64/Iggy/include/iggy.h"
|
||||
|
||||
#define STUBBED {}
|
||||
|
||||
RADEXPFUNC IggyValuePath * RADEXPLINK IggyPlayerRootPath(Iggy *f) {
|
||||
STUBBED;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
RADEXPFUNC IggyResult RADEXPLINK IggyPlayerCallMethodRS(Iggy *f, IggyDataValue *result, IggyValuePath *target, IggyName methodname, S32 numargs, IggyDataValue *args) {
|
||||
STUBBED;
|
||||
return IGGY_RESULT_SUCCESS;
|
||||
}
|
||||
|
||||
RADEXPFUNC void RADEXPLINK IggyPlayerDestroy(Iggy *player) {
|
||||
STUBBED;
|
||||
}
|
||||
RADEXPFUNC void RADEXPLINK IggyPlayerSetDisplaySize(Iggy *f, S32 w, S32 h) {
|
||||
STUBBED;
|
||||
}
|
||||
|
||||
RADEXPFUNC void RADEXPLINK IggyPlayerDrawTilesStart(Iggy *f) {
|
||||
STUBBED;
|
||||
}
|
||||
|
||||
RADEXPFUNC void RADEXPLINK IggyPlayerDrawTile(Iggy *f, S32 x0, S32 y0, S32 x1, S32 y1, S32 padding) {
|
||||
STUBBED;
|
||||
}
|
||||
RADEXPFUNC void RADEXPLINK IggyPlayerDrawTilesEnd(Iggy *f) {
|
||||
STUBBED;
|
||||
}
|
||||
|
||||
int thing = 0;
|
||||
|
||||
RADEXPFUNC Iggy * RADEXPLINK IggyPlayerCreateFromMemory(
|
||||
void const * data,
|
||||
U32 data_size_in_bytes,
|
||||
IggyPlayerConfig *config) {
|
||||
STUBBED;
|
||||
return (Iggy*)&thing;
|
||||
}
|
||||
|
||||
|
||||
RADEXPFUNC void RADEXPLINK IggyPlayerInitializeAndTickRS(Iggy *player) {
|
||||
STUBBED;
|
||||
}
|
||||
|
||||
IggyProperties properties;
|
||||
|
||||
RADEXPFUNC IggyProperties * RADEXPLINK IggyPlayerProperties(Iggy *player) {
|
||||
STUBBED;
|
||||
return &properties;
|
||||
}
|
||||
RADEXPFUNC void RADEXPLINK IggyPlayerSetUserdata(Iggy *player, void *userdata) {
|
||||
STUBBED;
|
||||
}
|
||||
RADEXPFUNC IggyName RADEXPLINK IggyPlayerCreateFastName(Iggy *f, IggyUTF16 const *name, S32 len) {
|
||||
STUBBED;
|
||||
return 0;
|
||||
}
|
||||
RADEXPFUNC rrbool RADEXPLINK IggyDebugGetMemoryUseInfo(Iggy *player, IggyLibrary lib, char const *category_string, S32 category_stringlen, S32 iteration, IggyMemoryUseInfo *data) {
|
||||
STUBBED;
|
||||
return false;
|
||||
}
|
||||
RADEXPFUNC rrbool RADEXPLINK IggyPlayerReadyToTick(Iggy *player) {
|
||||
STUBBED;
|
||||
return false;
|
||||
}
|
||||
RADEXPFUNC void RADEXPLINK IggyPlayerTickRS(Iggy *player) {
|
||||
STUBBED;
|
||||
}
|
||||
RADEXPFUNC void RADEXPLINK IggyPlayerDraw(Iggy *f) {
|
||||
STUBBED;
|
||||
}
|
||||
RADEXPFUNC void RADEXPLINK IggyMakeEventKey(IggyEvent *event, IggyKeyevent event_type, IggyKeycode keycode, IggyKeyloc keyloc) {
|
||||
STUBBED;
|
||||
}
|
||||
RADEXPFUNC rrbool RADEXPLINK IggyPlayerDispatchEventRS(Iggy *player, IggyEvent *event, IggyEventResult *result) {
|
||||
STUBBED;
|
||||
return false;
|
||||
}
|
||||
RADEXPFUNC void RADEXPLINK IggyFontRemoveUTF8(const char *fontname, S32 namelen_in_bytes, U32 fontflags) {
|
||||
STUBBED;
|
||||
}
|
||||
RADEXPFUNC void RADEXPLINK IggyFontInstallBitmapUTF8(const IggyBitmapFontProvider *bmf, const char *fontname, S32 namelen_in_bytes, U32 fontflags) {
|
||||
STUBBED;
|
||||
}
|
||||
RADEXPFUNC void RADEXPLINK IggyFontSetIndirectUTF8(const char *request_name, S32 request_namelen, U32 request_flags, const char *result_name, S32 result_namelen, U32 result_flags) {
|
||||
STUBBED;
|
||||
}
|
||||
RADEXPFUNC void RADEXPLINK IggyFontInstallTruetypeUTF8(const void *truetype_storage, S32 ttc_index, const char *fontname, S32 namelen_in_bytes, U32 fontflags) {
|
||||
STUBBED;
|
||||
}
|
||||
RADEXPFUNC rrbool RADEXPLINK IggyValuePathMakeNameRef(IggyValuePath *result, IggyValuePath *parent, char const *text_utf8) {
|
||||
STUBBED;
|
||||
return false;
|
||||
}
|
||||
RADEXPFUNC IggyResult RADEXPLINK IggyValueGetBooleanRS(IggyValuePath *var, IggyName sub_name, char const *sub_name_utf8, rrbool *result) {
|
||||
STUBBED;
|
||||
return IGGY_RESULT_SUCCESS;
|
||||
}
|
||||
RADEXPFUNC void RADEXPLINK IggyFontInstallTruetypeFallbackCodepointUTF8(const char *fontname, S32 len, U32 fontflags, S32 fallback_codepoint) {
|
||||
STUBBED;
|
||||
}
|
||||
RADEXPFUNC IggyResult RADEXPLINK IggyValueGetF64RS(IggyValuePath *var, IggyName sub_name, char const *sub_name_utf8, F64 *result) {
|
||||
STUBBED;
|
||||
return IGGY_RESULT_SUCCESS;
|
||||
}
|
||||
RADEXPFUNC rrbool RADEXPLINK IggyValueSetBooleanRS(IggyValuePath *var, IggyName sub_name, char const *sub_name_utf8, rrbool value) {
|
||||
STUBBED;
|
||||
return false;
|
||||
}
|
||||
RADEXPFUNC void RADEXPLINK IggyInit(IggyAllocator *allocator) {
|
||||
STUBBED;
|
||||
}
|
||||
RADEXPFUNC void RADEXPLINK IggySetWarningCallback(Iggy_WarningFunction *error, void *user_callback_data) {
|
||||
STUBBED;
|
||||
}
|
||||
RADEXPFUNC void RADEXPLINK IggySetTraceCallbackUTF8(Iggy_TraceFunctionUTF8 *trace_utf8, void *user_callback_data) {
|
||||
STUBBED;
|
||||
}
|
||||
RADEXPFUNC void RADEXPLINK IggySetFontCachingCalculationBuffer(
|
||||
S32 max_chars,
|
||||
void *optional_temp_buffer,
|
||||
S32 optional_temp_buffer_size_in_bytes) {
|
||||
STUBBED;
|
||||
}
|
||||
RADEXPFUNC void RADEXPLINK IggySetCustomDrawCallback(Iggy_CustomDrawCallback *custom_draw, void *user_callback_data) {
|
||||
STUBBED;
|
||||
}
|
||||
RADEXPFUNC void RADEXPLINK IggySetAS3ExternalFunctionCallbackUTF16(Iggy_AS3ExternalFunctionUTF16 *as3_external_function_utf16, void *user_callback_data) {
|
||||
STUBBED;
|
||||
}
|
||||
RADEXPFUNC void RADEXPLINK IggyMakeEventMouseMove(IggyEvent *event, S32 x, S32 y) {
|
||||
STUBBED;
|
||||
}
|
||||
RADEXPFUNC void RADEXPLINK IggySetTextureSubstitutionCallbacks(Iggy_TextureSubstitutionCreateCallback *texture_create, Iggy_TextureSubstitutionDestroyCallback *texture_destroy, void *user_callback_data) {
|
||||
STUBBED;
|
||||
}
|
||||
RADEXPFUNC void * RADEXPLINK IggyPlayerGetUserdata(Iggy *player) {
|
||||
STUBBED;
|
||||
}
|
||||
RADEXPFUNC IggyLibrary RADEXPLINK IggyLibraryCreateFromMemoryUTF16(
|
||||
IggyUTF16 const * url_utf16_null_terminated,
|
||||
void const * data,
|
||||
U32 data_size_in_bytes,
|
||||
IggyPlayerConfig *config) {
|
||||
STUBBED;
|
||||
return 0;
|
||||
}
|
||||
RADEXPFUNC void RADEXPLINK IggyLibraryDestroy(IggyLibrary lib) {
|
||||
STUBBED;
|
||||
}
|
||||
|
|
@ -6,7 +6,7 @@
|
|||
#include "../Minecraft.World/net.minecraft.world.entity.projectile.h"
|
||||
#include "../Minecraft.World/StringHelpers.h"
|
||||
#include "../Minecraft.World/Mth.h"
|
||||
#include "entityRenderDispatcher.h"
|
||||
#include "EntityRenderDispatcher.h"
|
||||
|
||||
MobRenderer::MobRenderer(Model *model, float shadow) : EntityRenderer()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#include "stdafx.h"
|
||||
#include "PaintingRenderer.h"
|
||||
#include "entityRenderDispatcher.h"
|
||||
#include "EntityRenderDispatcher.h"
|
||||
#include "../Minecraft.World/net.minecraft.world.entity.h"
|
||||
#include "../Minecraft.World/net.minecraft.world.level.h"
|
||||
#include "../Minecraft.World/Random.h"
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
#include "PlayerList.h"
|
||||
#include "MinecraftServer.h"
|
||||
#include "../Minecraft.World/net.minecraft.network.h"
|
||||
#include "../Minecraft.World/pos.h"
|
||||
#include "../Minecraft.World/Pos.h"
|
||||
#include "../Minecraft.World/net.minecraft.world.level.dimension.h"
|
||||
#include "../Minecraft.World/net.minecraft.world.level.storage.h"
|
||||
#include "../Minecraft.World/net.minecraft.world.item.h"
|
||||
|
|
|
|||
|
|
@ -25,8 +25,8 @@
|
|||
#include "../Minecraft.World/net.minecraft.h"
|
||||
#include "EntityTracker.h"
|
||||
#include "ServerConnection.h"
|
||||
#include "..\Minecraft.World\GenericStats.h"
|
||||
#include "..\Minecraft.World\JavaMath.h"
|
||||
#include "../Minecraft.World/GenericStats.h"
|
||||
#include "../Minecraft.World/JavaMath.h"
|
||||
|
||||
// 4J Added
|
||||
#include "../Minecraft.World/net.minecraft.world.item.crafting.h"
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
#include "ModelPart.h"
|
||||
#include "LocalPlayer.h"
|
||||
#include "MultiPlayerLocalPlayer.h"
|
||||
#include "entityRenderDispatcher.h"
|
||||
#include "EntityRenderDispatcher.h"
|
||||
#include "../Minecraft.World/net.minecraft.world.entity.h"
|
||||
#include "../Minecraft.World/net.minecraft.world.entity.player.h"
|
||||
#include "../Minecraft.World/net.minecraft.world.item.h"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#include "stdafx.h"
|
||||
#include "SnowmanModel.h"
|
||||
#include "SnowManModel.h"
|
||||
#include "../Minecraft.World/Mth.h"
|
||||
#include "ModelPart.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ bool Textures::MIPMAP = true;
|
|||
C4JRender::eTextureFormat Textures::TEXTURE_FORMAT = C4JRender::TEXTURE_FORMAT_RxGyBzAw;
|
||||
|
||||
int Textures::preLoadedIdx[TN_COUNT];
|
||||
wchar_t *Textures::preLoaded[TN_COUNT] =
|
||||
const wchar_t *Textures::preLoaded[TN_COUNT] =
|
||||
{
|
||||
L"%blur%misc/pumpkinblur",
|
||||
// L"%blur%/misc/vignette", // Not currently used
|
||||
|
|
|
|||
|
|
@ -205,7 +205,7 @@ public:
|
|||
static C4JRender::eTextureFormat TEXTURE_FORMAT;
|
||||
|
||||
private:
|
||||
static wchar_t *preLoaded[TN_COUNT];
|
||||
static const wchar_t *preLoaded[TN_COUNT];
|
||||
static int preLoadedIdx[TN_COUNT];
|
||||
|
||||
unordered_map<wstring, int> idMap;
|
||||
|
|
|
|||
|
|
@ -18,7 +18,9 @@
|
|||
#include "PlayerList.h"
|
||||
#include "EntityTracker.h"
|
||||
#include "PlayerChunkMap.h"
|
||||
#ifndef __linux__
|
||||
#include <qnet.h>
|
||||
#endif // __linux__
|
||||
|
||||
TrackedEntity::TrackedEntity(shared_ptr<Entity> e, int range, int updateInterval, bool trackDelta)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#include "stdafx.h"
|
||||
#include "vertex.h"
|
||||
#include "Vertex.h"
|
||||
|
||||
Vertex::Vertex(float x, float y, float z, float u, float v)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#pragma once
|
||||
#include "Culler.h"
|
||||
#include "../Minecraft.World/mob.h"
|
||||
#include "../Minecraft.World/Mob.h"
|
||||
|
||||
class Mob;
|
||||
class ViewportCuller : public Culler
|
||||
|
|
|
|||
|
|
@ -247,7 +247,6 @@ const int CLEAR_COLOUR_FLAG = 2;
|
|||
const int GL_DEPTH_BUFFER_BIT = CLEAR_DEPTH_FLAG;
|
||||
const int GL_COLOR_BUFFER_BIT = CLEAR_COLOUR_FLAG;
|
||||
|
||||
#ifndef __linux__
|
||||
const int GL_SRC_ALPHA = D3D11_BLEND_SRC_ALPHA;
|
||||
const int GL_ONE_MINUS_SRC_ALPHA = D3D11_BLEND_INV_SRC_ALPHA;
|
||||
const int GL_ONE = D3D11_BLEND_ONE;
|
||||
|
|
@ -265,7 +264,6 @@ const int GL_EQUAL = D3D11_COMPARISON_EQUAL;
|
|||
const int GL_LEQUAL = D3D11_COMPARISON_LESS_EQUAL;
|
||||
const int GL_GEQUAL = D3D11_COMPARISON_GREATER_EQUAL;
|
||||
const int GL_ALWAYS = D3D11_COMPARISON_ALWAYS;
|
||||
#endif // __linux__
|
||||
|
||||
const int GL_TEXTURE_MIN_FILTER = 1;
|
||||
const int GL_TEXTURE_MAG_FILTER = 2;
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ EXPGROUP(_RootGroup)
|
|||
// IS_SPU for PS3 SPU
|
||||
// IS_WII for Wii
|
||||
|
||||
#include "rrCore.h"
|
||||
#include "rrcore.h"
|
||||
|
||||
//#define MILES_CHECK_OFFSETS
|
||||
#ifdef MILES_CHECK_OFFSETS
|
||||
|
|
|
|||
|
|
@ -60,9 +60,9 @@
|
|||
#include <stdlib.h>
|
||||
#include <unordered_map>
|
||||
#include <unordered_set>
|
||||
#include <vector>
|
||||
#include "Linux/LinuxStubs.h"
|
||||
#include "Linux/xbox_valve.h"
|
||||
#include <vector>
|
||||
|
||||
#include "Linux/Stubs/LinuxStubs.h"
|
||||
#else
|
||||
#define AUTO_VAR(_var, _val) auto _var = _val
|
||||
#include <unordered_map>
|
||||
|
|
@ -305,11 +305,9 @@ typedef XUID GameSessionUID;
|
|||
#include "Windows64/XML/ATGXmlParser.h"
|
||||
#include "Windows64/Social/SocialManager.h"
|
||||
#include "Common/Audio/SoundEngine.h"
|
||||
// DecalOverdose: DONT (according to localcc)
|
||||
#include "Linux/iggy_stub.h"
|
||||
//#include "Windows64/Iggy/include/iggy.h"
|
||||
#include "Windows64/Iggy/gdraw/gdraw_d3d11.h"
|
||||
#include "Windows64/Windows64_UIController.h"
|
||||
#include "Linux/Linux_UIController.h"
|
||||
#elif defined __PSVITA__
|
||||
#include "PSVita/PSVita_App.h"
|
||||
#include "PSVitaMedia/strings.h" // TODO - create PSVita-specific version of this
|
||||
|
|
|
|||
|
|
@ -60,145 +60,145 @@ public:
|
|||
return TAG_Compound;
|
||||
}
|
||||
|
||||
void put(wchar_t *name, Tag *tag)
|
||||
void put(const wchar_t *name, Tag *tag)
|
||||
{
|
||||
tags[name] = tag->setName(wstring( name ));
|
||||
}
|
||||
|
||||
void putByte(wchar_t * name, byte value)
|
||||
void putByte(const wchar_t * name, byte value)
|
||||
{
|
||||
tags[name] = (new ByteTag(name,value));
|
||||
}
|
||||
|
||||
void putShort(wchar_t * name, short value)
|
||||
void putShort(const wchar_t * name, short value)
|
||||
{
|
||||
tags[name] = (new ShortTag(name,value));
|
||||
}
|
||||
|
||||
void putInt(wchar_t * name, int value)
|
||||
void putInt(const wchar_t * name, int value)
|
||||
{
|
||||
tags[name] = (new IntTag(name,value));
|
||||
}
|
||||
|
||||
void putLong(wchar_t * name, __int64 value)
|
||||
void putLong(const wchar_t * name, __int64 value)
|
||||
{
|
||||
tags[name] = (new LongTag(name,value));
|
||||
}
|
||||
|
||||
void putFloat(wchar_t * name, float value)
|
||||
void putFloat(const wchar_t * name, float value)
|
||||
{
|
||||
tags[name] = (new FloatTag(name,value));
|
||||
}
|
||||
|
||||
void putDouble(wchar_t * name, double value)
|
||||
void putDouble(const wchar_t * name, double value)
|
||||
{
|
||||
tags[name] = (new DoubleTag(name,value));
|
||||
}
|
||||
|
||||
void putString(wchar_t *name, const wstring& value)
|
||||
void putString(const wchar_t *name, const wstring& value)
|
||||
{
|
||||
tags[name] = (new StringTag(name,value));
|
||||
}
|
||||
|
||||
void putByteArray(wchar_t * name, byteArray value)
|
||||
void putByteArray(const wchar_t * name, byteArray value)
|
||||
{
|
||||
tags[name] = (new ByteArrayTag(name,value));
|
||||
}
|
||||
|
||||
void putIntArray(wchar_t * name, intArray value)
|
||||
void putIntArray(const wchar_t * name, intArray value)
|
||||
{
|
||||
tags[name] = (new IntArrayTag(name, value));
|
||||
}
|
||||
|
||||
void putCompound(wchar_t * name, CompoundTag *value)
|
||||
void putCompound(const wchar_t * name, CompoundTag *value)
|
||||
{
|
||||
tags[name] = value->setName( wstring( name ) );
|
||||
}
|
||||
|
||||
void putBoolean(wchar_t * string, bool val)
|
||||
void putBoolean(const wchar_t * string, bool val)
|
||||
{
|
||||
putByte(string, val?static_cast<byte>(1):static_cast<byte>(0));
|
||||
}
|
||||
|
||||
Tag *get(wchar_t *name)
|
||||
Tag *get(const wchar_t *name)
|
||||
{
|
||||
AUTO_VAR(it, tags.find(name));
|
||||
if(it != tags.end()) return it->second;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
bool contains(wchar_t * name)
|
||||
bool contains(const wchar_t * name)
|
||||
{
|
||||
return tags.find(name) != tags.end();
|
||||
}
|
||||
|
||||
byte getByte(wchar_t * name)
|
||||
byte getByte(const wchar_t * name)
|
||||
{
|
||||
if (tags.find(name) == tags.end()) return (byte)0;
|
||||
return ((ByteTag *) tags[name])->data;
|
||||
}
|
||||
|
||||
short getShort(wchar_t * name)
|
||||
short getShort(const wchar_t * name)
|
||||
{
|
||||
if (tags.find(name) == tags.end()) return (short)0;
|
||||
return ((ShortTag *) tags[name])->data;
|
||||
}
|
||||
|
||||
int getInt(wchar_t * name)
|
||||
int getInt(const wchar_t * name)
|
||||
{
|
||||
if (tags.find(name) == tags.end()) return (int)0;
|
||||
return ((IntTag *) tags[name])->data;
|
||||
}
|
||||
|
||||
__int64 getLong(wchar_t * name)
|
||||
__int64 getLong(const wchar_t * name)
|
||||
{
|
||||
if (tags.find(name) == tags.end()) return (__int64)0;
|
||||
return ((LongTag *) tags[name])->data;
|
||||
}
|
||||
|
||||
float getFloat(wchar_t * name)
|
||||
float getFloat(const wchar_t * name)
|
||||
{
|
||||
if (tags.find(name) == tags.end()) return (float)0;
|
||||
return ((FloatTag *) tags[name])->data;
|
||||
}
|
||||
|
||||
double getDouble(wchar_t * name)
|
||||
double getDouble(const wchar_t * name)
|
||||
{
|
||||
if (tags.find(name) == tags.end()) return (double)0;
|
||||
return ((DoubleTag *) tags[name])->data;
|
||||
}
|
||||
|
||||
wstring getString(wchar_t * name)
|
||||
wstring getString(const wchar_t * name)
|
||||
{
|
||||
if (tags.find(name) == tags.end()) return wstring( L"" );
|
||||
return ((StringTag *) tags[name])->data;
|
||||
}
|
||||
|
||||
byteArray getByteArray(wchar_t * name)
|
||||
byteArray getByteArray(const wchar_t * name)
|
||||
{
|
||||
if (tags.find(name) == tags.end()) return byteArray();
|
||||
return ((ByteArrayTag *) tags[name])->data;
|
||||
}
|
||||
|
||||
intArray getIntArray(wchar_t * name)
|
||||
intArray getIntArray(const wchar_t * name)
|
||||
{
|
||||
if (tags.find(name) == tags.end()) return intArray(0);
|
||||
return ((IntArrayTag *) tags[name])->data;
|
||||
}
|
||||
|
||||
CompoundTag *getCompound(wchar_t * name)
|
||||
CompoundTag *getCompound(const wchar_t * name)
|
||||
{
|
||||
if (tags.find(name) == tags.end()) return new CompoundTag(name);
|
||||
return (CompoundTag *) tags[name];
|
||||
}
|
||||
|
||||
ListTag<Tag> *getList(wchar_t * name)
|
||||
ListTag<Tag> *getList(const wchar_t * name)
|
||||
{
|
||||
if (tags.find(name) == tags.end()) return new ListTag<Tag>(name);
|
||||
return (ListTag<Tag> *) tags[name];
|
||||
}
|
||||
|
||||
bool getBoolean(wchar_t *string)
|
||||
bool getBoolean(const wchar_t *string)
|
||||
{
|
||||
return getByte(string) != static_cast<byte>(0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,12 +17,6 @@ int Connection::writeThreads = 0;
|
|||
int Connection::readSizes[256];
|
||||
int Connection::writeSizes[256];
|
||||
|
||||
#if defined(__linux__)
|
||||
#define INFINITE 999999999
|
||||
#define WAIT_TIMEOUT 258
|
||||
#include <unistd.h>
|
||||
#endif //__linux__
|
||||
|
||||
void Connection::_init()
|
||||
{
|
||||
// printf("Con:0x%x init\n",this);
|
||||
|
|
@ -314,7 +308,7 @@ bool Connection::readTick()
|
|||
// printf("Con:0x%x readTick close EOS\n",this);
|
||||
|
||||
// 4J Stu - Remove this line
|
||||
// Fix for #10410 - UI: If the player is removed from a splitscreened host’s game, the next game that player joins will produce a message stating that the host has left.
|
||||
// Fix for #10410 - UI: If the player is removed from a splitscreened host<EFBFBD>s game, the next game that player joins will produce a message stating that the host has left.
|
||||
//close(DisconnectPacket::eDisconnect_EndOfStream);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -11,39 +11,21 @@
|
|||
#include "../Minecraft.World/LevelData.h"
|
||||
#include "../Minecraft.Client/Common/GameRules/LevelGenerationOptions.h"
|
||||
#include "../Minecraft.World/net.minecraft.world.level.chunk.storage.h"
|
||||
#include <ctime>
|
||||
|
||||
#ifdef _XBOX
|
||||
#define RESERVE_ALLOCATION MEM_RESERVE | MEM_LARGE_PAGES
|
||||
#define COMMIT_ALLOCATION MEM_COMMIT | MEM_LARGE_PAGES
|
||||
#elif !defined(__linux__)
|
||||
#else
|
||||
#define RESERVE_ALLOCATION MEM_RESERVE
|
||||
#define COMMIT_ALLOCATION MEM_COMMIT
|
||||
#else
|
||||
#include "../Minecraft.Client/Windows64/Windows64_App.h"
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
#include <locale>
|
||||
#include <fcntl.h>
|
||||
#include <linux/mman.h>
|
||||
#include <sys/mman.h>
|
||||
#include <fcntl.h>
|
||||
#define RESERVE_ALLOCATION 0
|
||||
#define COMMIT_ALLOCATION MAP_PRIVATE | MAP_ANONYMOUS
|
||||
#define PAGE_READWRITE O_RDWR
|
||||
#include <codecvt>
|
||||
#endif
|
||||
|
||||
extern CConsoleMinecraftApp app;
|
||||
|
||||
unsigned int ConsoleSaveFileOriginal::pagesCommitted = 0;
|
||||
void *ConsoleSaveFileOriginal::pvHeap = NULL;
|
||||
|
||||
ConsoleSaveFileOriginal::ConsoleSaveFileOriginal(const wstring &fileName, LPVOID pvSaveData /*= NULL*/, DWORD dFileSize /*= 0*/, bool forceCleanSave /*= false*/, ESavePlatform plat /*= SAVE_FILE_PLATFORM_LOCAL*/)
|
||||
{
|
||||
#ifndef __linux__
|
||||
InitializeCriticalSectionAndSpinCount(&m_lock,5120);
|
||||
#endif // __linux__
|
||||
|
||||
// One time initialise of static stuff required for our storage
|
||||
if( pvHeap == NULL )
|
||||
|
|
@ -55,7 +37,7 @@ ConsoleSaveFileOriginal::ConsoleSaveFileOriginal(const wstring &fileName, LPVOID
|
|||
// AP - The Vita doesn't have virtual memory so a pretend system has been implemented in PSVitaStubs.cpp.
|
||||
// All access to the memory must be done via the access function as the pointer returned from VirtualAlloc
|
||||
// can't be used directly.
|
||||
pvHeap = mmap(NULL, NULL, MAX_PAGE_COUNT * CSF_PAGE_SIZE, RESERVE_ALLOCATION, PAGE_READWRITE, NULL );
|
||||
pvHeap = VirtualAlloc(NULL, MAX_PAGE_COUNT * CSF_PAGE_SIZE, RESERVE_ALLOCATION, PAGE_READWRITE );
|
||||
}
|
||||
|
||||
pvSaveMem = pvHeap;
|
||||
|
|
@ -91,7 +73,7 @@ ConsoleSaveFileOriginal::ConsoleSaveFileOriginal(const wstring &fileName, LPVOID
|
|||
|
||||
unsigned int pagesRequired = ( heapSize + (CSF_PAGE_SIZE - 1 ) ) / CSF_PAGE_SIZE;
|
||||
|
||||
void *pvRet = mmap(NULL, pvHeap, pagesRequired * CSF_PAGE_SIZE, COMMIT_ALLOCATION, PAGE_READWRITE, NULL);
|
||||
void *pvRet = VirtualAlloc(pvHeap, pagesRequired * CSF_PAGE_SIZE, COMMIT_ALLOCATION, PAGE_READWRITE);
|
||||
if( pvRet == NULL )
|
||||
{
|
||||
#ifndef _CONTENT_PACKAGE
|
||||
|
|
@ -131,7 +113,7 @@ ConsoleSaveFileOriginal::ConsoleSaveFileOriginal(const wstring &fileName, LPVOID
|
|||
#ifdef __PS3__
|
||||
StorageManager.FreeSaveData();
|
||||
#endif
|
||||
printf("Filesize - %d, Adjusted size - %d\n",fileSize,storageLength);
|
||||
app.DebugPrintf("Filesize - %d, Adjusted size - %d\n",fileSize,storageLength);
|
||||
fileSize = storageLength;
|
||||
}
|
||||
|
||||
|
|
@ -168,7 +150,7 @@ ConsoleSaveFileOriginal::ConsoleSaveFileOriginal(const wstring &fileName, LPVOID
|
|||
if(decompSize == 0)
|
||||
{
|
||||
// 4J Stu - Saves created between 2/12/2011 and 7/12/2011 will have this problem
|
||||
printf("Invalid save data format\n");
|
||||
app.DebugPrintf("Invalid save data format\n");
|
||||
ZeroMemory( pvSourceData, fileSize );
|
||||
// Clear the first 8 bytes that reference the header
|
||||
header.WriteHeader( pvSourceData );
|
||||
|
|
@ -197,7 +179,7 @@ ConsoleSaveFileOriginal::ConsoleSaveFileOriginal(const wstring &fileName, LPVOID
|
|||
if( desiredSize > currentHeapSize )
|
||||
{
|
||||
unsigned int pagesRequired = ( desiredSize + (CSF_PAGE_SIZE - 1 ) ) / CSF_PAGE_SIZE;
|
||||
void *pvRet = mmap(NULL, pvHeap, pagesRequired * CSF_PAGE_SIZE, COMMIT_ALLOCATION, PAGE_READWRITE, NULL);
|
||||
void *pvRet = VirtualAlloc(pvHeap, pagesRequired * CSF_PAGE_SIZE, COMMIT_ALLOCATION, PAGE_READWRITE);
|
||||
if( pvRet == NULL )
|
||||
{
|
||||
// Out of physical memory
|
||||
|
|
@ -227,9 +209,7 @@ ConsoleSaveFileOriginal::ConsoleSaveFileOriginal(const wstring &fileName, LPVOID
|
|||
|
||||
ConsoleSaveFileOriginal::~ConsoleSaveFileOriginal()
|
||||
{
|
||||
#ifndef __linux__
|
||||
VirtualFree( pvHeap, MAX_PAGE_COUNT * CSF_PAGE_SIZE, MEM_DECOMMIT );
|
||||
#endif
|
||||
pagesCommitted = 0;
|
||||
// Make sure we don't have any thumbnail data still waiting round - we can't need it now we've destroyed the save file anyway
|
||||
#if defined _XBOX
|
||||
|
|
@ -318,25 +298,13 @@ void ConsoleSaveFileOriginal::deleteFile( FileEntry *file )
|
|||
ReleaseSaveAccess();
|
||||
}
|
||||
|
||||
#if defined(__linux__)
|
||||
bool moveToEnd(int fd)
|
||||
{
|
||||
off_t fileSize = lseek(fd, 0, SEEK_END);
|
||||
if (fileSize == (off_t)-1) {
|
||||
perror("lseek failed");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
void ConsoleSaveFileOriginal::setFilePointer(FileEntry *file,LONG lDistanceToMove,PLONG lpDistanceToMoveHigh,DWORD dwMoveMethod)
|
||||
{
|
||||
LockSaveAccess();
|
||||
|
||||
file->currentFilePointer = file->data.startOffset + lDistanceToMove;
|
||||
|
||||
if( moveToEnd(dwMoveMethod))
|
||||
if( dwMoveMethod == FILE_END)
|
||||
{
|
||||
file->currentFilePointer += file->getFileSize();
|
||||
}
|
||||
|
|
@ -519,7 +487,7 @@ void ConsoleSaveFileOriginal::MoveDataBeyond(FileEntry *file, DWORD nNumberOfByt
|
|||
if( desiredSize > currentHeapSize )
|
||||
{
|
||||
unsigned int pagesRequired = ( desiredSize + (CSF_PAGE_SIZE - 1 ) ) / CSF_PAGE_SIZE;
|
||||
void *pvRet = mmap(NULL, pvHeap, pagesRequired * CSF_PAGE_SIZE, COMMIT_ALLOCATION, PAGE_READWRITE, NULL);
|
||||
void *pvRet = VirtualAlloc(pvHeap, pagesRequired * CSF_PAGE_SIZE, COMMIT_ALLOCATION, PAGE_READWRITE);
|
||||
if( pvRet == NULL )
|
||||
{
|
||||
// Out of physical memory
|
||||
|
|
@ -668,14 +636,21 @@ void ConsoleSaveFileOriginal::Flush(bool autosave, bool updateThumbnail )
|
|||
{
|
||||
LockSaveAccess();
|
||||
|
||||
#ifdef __PSVITA__
|
||||
// On Vita we've had problems with saves being corrupted on rapid save/save-exiting so seems prudent to wait for idle
|
||||
while( StorageManager.GetSaveState() != C4JStorage::ESaveGame_Idle )
|
||||
{
|
||||
app.DebugPrintf("Flush wait\n");
|
||||
Sleep(10);
|
||||
}
|
||||
#endif
|
||||
|
||||
finalizeWrite();
|
||||
|
||||
// Get the frequency of the timer
|
||||
LARGE_INTEGER qwTicksPerSec, qwTime, qwNewTime, qwDeltaTime;
|
||||
float fElapsedTime = 0.0f;
|
||||
#ifndef __linux__
|
||||
QueryPerformanceFrequency( &qwTicksPerSec );
|
||||
#endif // __linux__
|
||||
float fSecsPerTick = 1.0f / (float)qwTicksPerSec.QuadPart;
|
||||
|
||||
unsigned int fileSize = header.GetFileSize();
|
||||
|
|
@ -713,23 +688,19 @@ void ConsoleSaveFileOriginal::Flush(bool autosave, bool updateThumbnail )
|
|||
// Pre-calculate the buffer size required for the compressed data
|
||||
PIXBeginNamedEvent(0,"Pre-calc save compression");
|
||||
// Save the start time
|
||||
#if !defined(__linux__)
|
||||
QueryPerformanceCounter( &qwTime );
|
||||
#endif // __linux__
|
||||
#ifdef __PSVITA__
|
||||
// AP - get the compressed size via the access function. This uses a special RLE format
|
||||
VirtualCompress(NULL,&compLength,pvSaveMem,fileSize);
|
||||
#else
|
||||
Compression::getCompression()->Compress(NULL,&compLength,pvSaveMem,fileSize);
|
||||
#endif
|
||||
#if !defined(__linux__)
|
||||
QueryPerformanceCounter( &qwNewTime );
|
||||
#endif // __linux__
|
||||
|
||||
qwDeltaTime.QuadPart = qwNewTime.QuadPart - qwTime.QuadPart;
|
||||
fElapsedTime = fSecsPerTick * ((FLOAT)(qwDeltaTime.QuadPart));
|
||||
|
||||
printf("Check buffer size: Elapsed time %f\n", fElapsedTime);
|
||||
app.DebugPrintf("Check buffer size: Elapsed time %f\n", fElapsedTime);
|
||||
PIXEndNamedEvent();
|
||||
|
||||
// We add 4 bytes to the start so that we can signal compressed data
|
||||
|
|
@ -748,22 +719,19 @@ void ConsoleSaveFileOriginal::Flush(bool autosave, bool updateThumbnail )
|
|||
// Re-compress all save data before we save it to disk
|
||||
PIXBeginNamedEvent(0,"Actual save compression");
|
||||
// Save the start time
|
||||
#if !defined(__linux__)
|
||||
QueryPerformanceCounter( &qwTime );
|
||||
#endif // __LINUX__
|
||||
#ifdef __PSVITA__
|
||||
// AP - compress via the access function. This uses a special RLE format
|
||||
VirtualCompress(compData+8,&compLength,pvSaveMem,fileSize);
|
||||
#else
|
||||
Compression::getCompression()->Compress(compData+8,&compLength,pvSaveMem,fileSize);
|
||||
#endif
|
||||
#if !defined(__linux__)
|
||||
QueryPerformanceCounter( &qwNewTime );
|
||||
#endif // __linux__
|
||||
|
||||
qwDeltaTime.QuadPart = qwNewTime.QuadPart - qwTime.QuadPart;
|
||||
fElapsedTime = fSecsPerTick * ((FLOAT)(qwDeltaTime.QuadPart));
|
||||
|
||||
printf("Compress: Elapsed time %f\n", fElapsedTime);
|
||||
app.DebugPrintf("Compress: Elapsed time %f\n", fElapsedTime);
|
||||
PIXEndNamedEvent();
|
||||
|
||||
ZeroMemory(compData,8);
|
||||
|
|
@ -771,7 +739,7 @@ void ConsoleSaveFileOriginal::Flush(bool autosave, bool updateThumbnail )
|
|||
memcpy( compData, &saveVer, sizeof(int) );
|
||||
memcpy( compData+4, &fileSize, sizeof(int) );
|
||||
|
||||
printf("Save data compressed from %d to %d\n", fileSize, compLength);
|
||||
app.DebugPrintf("Save data compressed from %d to %d\n", fileSize, compLength);
|
||||
#endif
|
||||
|
||||
PBYTE pbThumbnailData=NULL;
|
||||
|
|
@ -825,7 +793,7 @@ void ConsoleSaveFileOriginal::Flush(bool autosave, bool updateThumbnail )
|
|||
#elif (defined __PS3__ || defined __ORBIS__ || defined __PSVITA__ || defined _DURANGO || defined _WINDOWS64)
|
||||
// set the icon and save image
|
||||
StorageManager.SetSaveImages(pbThumbnailData,dwThumbnailDataSize,pbDataSaveImage,dwDataSizeSaveImage,bTextMetadata,iTextMetadataBytes);
|
||||
printf("Save thumbnail size %d\n",dwThumbnailDataSize);
|
||||
app.DebugPrintf("Save thumbnail size %d\n",dwThumbnailDataSize);
|
||||
|
||||
// save the data
|
||||
StorageManager.SaveSaveData( &ConsoleSaveFileOriginal::SaveSaveDataCallback, this );
|
||||
|
|
@ -876,90 +844,52 @@ void ConsoleSaveFileOriginal::DebugFlushToFile(void *compressedData /*= NULL*/,
|
|||
if(!targetFileDir.exists())
|
||||
targetFileDir.mkdir();
|
||||
|
||||
#if defined(_WIN32)
|
||||
wchar_t *fileName = new wchar_t[XCONTENT_MAX_FILENAME_LENGTH+1];
|
||||
#else
|
||||
// DecalOverdose(FIXME):
|
||||
const char* fileName = new char[XCONTENT_MAX_FILENAME_LENGTH + 1];
|
||||
#endif // _wIN32
|
||||
#if defined(_WIN32)
|
||||
|
||||
SYSTEMTIME t;
|
||||
GetSystemTime( &t );
|
||||
#else
|
||||
// DecalOverdose: JARVIS DON'T PULL AN ALIEN SWARM: GLOBAL OFFENSIVE
|
||||
std::time_t t = std::time(0);
|
||||
std::tm* localTime = std::localtime(&t);
|
||||
#endif // _WIN32
|
||||
|
||||
//14 chars for the digits
|
||||
//11 chars for the separators + suffix
|
||||
//25 chars total
|
||||
std::wstring cutFileName = m_fileName;
|
||||
wstring cutFileName = m_fileName;
|
||||
if(m_fileName.length() > XCONTENT_MAX_FILENAME_LENGTH - 25)
|
||||
{
|
||||
cutFileName = m_fileName.substr(0, XCONTENT_MAX_FILENAME_LENGTH - 25);
|
||||
}
|
||||
|
||||
#ifndef __linux__
|
||||
|
||||
swprintf(fileName, XCONTENT_MAX_FILENAME_LENGTH+1, L"\\v%04d-%ls%02d.%02d.%02d.%02d.%02d.mcs",VER_PRODUCTBUILD,cutFileName.c_str(), t.wMonth, t.wDay, t.wHour, t.wMinute, t.wSecond);
|
||||
#else
|
||||
char fileNameBuffer[XCONTENT_MAX_FILENAME_LENGTH + 1];
|
||||
std::memset(fileNameBuffer, 0, sizeof(fileNameBuffer));
|
||||
wcstombs(fileNameBuffer, cutFileName.c_str(), XCONTENT_MAX_FILENAME_LENGTH);
|
||||
snprintf(fileName, XCONTENT_MAX_FILENAME_LENGTH + 1,
|
||||
"\\v%04d-%s%02d.%02d.%02d.%02d.%02d.mcs",
|
||||
VER_PRODUCTBUILD, fileNameBuffer,
|
||||
localTime->tm_mon + 1, localTime->tm_mday,
|
||||
localTime->tm_hour, localTime->tm_min, localTime->tm_sec);
|
||||
#endif // __linux__
|
||||
|
||||
#if defined (_UNICODE)
|
||||
#ifdef _UNICODE
|
||||
wstring wtemp = targetFileDir.getPath() + wstring(fileName);
|
||||
LPCWSTR lpFileName = wtemp.c_str();
|
||||
#elif defined(__linux__)
|
||||
std::wstring wtemp = targetFileDir.getPath();
|
||||
std::wstring wfileName(fileName, fileName + strlen(fileName));
|
||||
wtemp += wfileName;
|
||||
std::wstring_convert<std::codecvt_utf8<wchar_t>> converter;
|
||||
std::string tempStr = converter.to_bytes(wtemp);
|
||||
const char* lpFileName = tempStr.c_str();
|
||||
#else
|
||||
LPCSTR lpFileName = wstringtofilename( targetFileDir.getPath() + wstring(fileName) );
|
||||
#endif
|
||||
#if !defined __PSVITA__ && !defined(__linux__)
|
||||
#ifndef __PSVITA__
|
||||
HANDLE hSaveFile = CreateFile( lpFileName, GENERIC_WRITE, 0, NULL, OPEN_ALWAYS, FILE_FLAG_RANDOM_ACCESS, NULL);
|
||||
#endif
|
||||
|
||||
#if defined(__linux__)
|
||||
int hSaveFile = open(lpFileName, O_RDWR);
|
||||
#endif // __linux__
|
||||
|
||||
if(compressedData != NULL && compressedDataSize > 0)
|
||||
{
|
||||
#if defined __PSVITA__
|
||||
#ifdef __PSVITA__
|
||||
// AP - Use the access function to save
|
||||
VirtualWriteFile( lpFileName, compressedData, compressedDataSize, &numberOfBytesWritten, NULL);
|
||||
#elif !defined(__linux__)
|
||||
WriteFile( hSaveFile,compressedData,compressedDataSize,&numberOfBytesWritten,NULL);
|
||||
#else
|
||||
write(hSaveFile,compressedData,compressedDataSize);
|
||||
WriteFile( hSaveFile,compressedData,compressedDataSize,&numberOfBytesWritten,NULL);
|
||||
#endif
|
||||
assert(numberOfBytesWritten == compressedDataSize);
|
||||
}
|
||||
else
|
||||
{
|
||||
#if defined(__PSVITA__)
|
||||
#ifdef __PSVITA__
|
||||
// AP - Use the access function to save
|
||||
VirtualWriteFile( lpFileName, compressedData, compressedDataSize, &numberOfBytesWritten, NULL);
|
||||
#elif !defined(__linux__)
|
||||
WriteFile(hSaveFile,pvSaveMem,fileSize,&numberOfBytesWritten,NULL);
|
||||
#else
|
||||
write(hSaveFile,compressedData,compressedDataSize);
|
||||
WriteFile(hSaveFile,pvSaveMem,fileSize,&numberOfBytesWritten,NULL);
|
||||
#endif
|
||||
assert(numberOfBytesWritten == fileSize);
|
||||
}
|
||||
#if !defined(__PSVITA__) && !defined(__linux__)
|
||||
#ifndef __PSVITA__
|
||||
CloseHandle( hSaveFile );
|
||||
#endif
|
||||
|
||||
|
|
@ -1119,12 +1049,12 @@ void ConsoleSaveFileOriginal::ConvertToLocalPlatform()
|
|||
wstring suffix(L".mcr");
|
||||
if( fName.compare(fName.length() - suffix.length(), suffix.length(), suffix) == 0 )
|
||||
{
|
||||
printf("Processing a region file: %ls\n",fName.c_str());
|
||||
app.DebugPrintf("Processing a region file: %ls\n",fName.c_str());
|
||||
ConvertRegionFile(File(fe->data.filename) );
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("%ls is not a region file, ignoring\n", fName.c_str());
|
||||
app.DebugPrintf("%ls is not a region file, ignoring\n", fName.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1134,4 +1064,4 @@ void ConsoleSaveFileOriginal::ConvertToLocalPlatform()
|
|||
void *ConsoleSaveFileOriginal::getWritePointer(FileEntry *file)
|
||||
{
|
||||
return (char *)pvSaveMem + file->currentFilePointer;;
|
||||
}
|
||||
}
|
||||
|
|
@ -10,20 +10,6 @@
|
|||
#include <fios2.h>
|
||||
#endif
|
||||
|
||||
#if defined(__linux__)
|
||||
#include <limits.h>
|
||||
#include <sys/stat.h>
|
||||
#include <stdio.h>
|
||||
#include <dirent.h>
|
||||
#include <string.h>
|
||||
#include <vector>
|
||||
#include <sys/types.h>
|
||||
#include <string>
|
||||
#include <unistd.h> // for access()
|
||||
#include <fcntl.h>
|
||||
#define MAX_PATH PATH_MAX
|
||||
#endif
|
||||
|
||||
const wchar_t File::pathSeparator = L'\\';
|
||||
#ifdef _XBOX
|
||||
const wstring File::pathRoot = L"GAME:"; // Path root after pathSeparator has been removed
|
||||
|
|
|
|||
|
|
@ -59,9 +59,7 @@ FileOutputStream::FileOutputStream(const File &file) : m_fileHandle( INVALID_HAN
|
|||
if( m_fileHandle == INVALID_HANDLE_VALUE )
|
||||
{
|
||||
// TODO 4J Stu - Any form of error/exception handling
|
||||
#ifndef __linux__
|
||||
DWORD error = GetLastError();
|
||||
#endif // __linux__
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,9 @@
|
|||
#include "net.minecraft.world.entity.player.h"
|
||||
#include "../Minecraft.Client/ServerPlayer.h"
|
||||
#include "../Minecraft.Client/PlayerConnection.h"
|
||||
#ifndef __linux__
|
||||
#include <qnet.h>
|
||||
#endif // __linux__
|
||||
#include "PacketListener.h"
|
||||
#include "InputOutputStream.h"
|
||||
#include "PlayerInfoPacket.h"
|
||||
|
|
|
|||
|
|
@ -997,7 +997,7 @@ ShapedRecipy *Recipes::addShapedRecipy(ItemInstance *result, ...)
|
|||
|
||||
break;
|
||||
case L'c':
|
||||
wchFrom=va_arg(vl,wchar_t);
|
||||
wchFrom=(wchar_t)va_arg(vl,int);
|
||||
break;
|
||||
case L'z':
|
||||
pItemInstance=va_arg(vl,ItemInstance *);
|
||||
|
|
@ -1014,7 +1014,7 @@ ShapedRecipy *Recipes::addShapedRecipy(ItemInstance *result, ...)
|
|||
mappings->insert(myMap::value_type(wchFrom,pItemInstance));
|
||||
break;
|
||||
case L'g':
|
||||
wchFrom=va_arg(vl,wchar_t);
|
||||
wchFrom=(wchar_t)va_arg(vl,int);
|
||||
switch(wchFrom)
|
||||
{
|
||||
// case L'W':
|
||||
|
|
@ -1112,7 +1112,7 @@ void Recipes::addShapelessRecipy(ItemInstance *result,... )
|
|||
ingredients->push_back(new ItemInstance(pTile));
|
||||
break;
|
||||
case L'g':
|
||||
wchFrom=va_arg(vl,wchar_t);
|
||||
wchFrom=(wchar_t)va_arg(vl,int);
|
||||
switch(wchFrom)
|
||||
{
|
||||
|
||||
|
|
|
|||
|
|
@ -6,9 +6,6 @@
|
|||
#include "../Minecraft.Client/ServerConnection.h"
|
||||
#include <algorithm>
|
||||
#include "../Minecraft.Client/PS3/PS3Extras/ShutdownManager.h"
|
||||
#include "../Minecraft.Client/Windows64/Windows64_App.h"
|
||||
|
||||
extern CConsoleMinecraftApp app;
|
||||
|
||||
// This current socket implementation is for the creation of a single local link. 2 sockets can be created, one for either end of this local
|
||||
// link, the end (0 or 1) is passed as a parameter to the ctor.
|
||||
|
|
@ -25,7 +22,6 @@ void Socket::Initialise(ServerConnection *serverConnection)
|
|||
|
||||
// Only initialise everything else once - just setting up static data, one time xrnm things, thread for ticking sockets
|
||||
static bool init = false;
|
||||
#if !defined(__linux__)
|
||||
if( init )
|
||||
{
|
||||
for( int i = 0; i < 2; i++ )
|
||||
|
|
@ -42,14 +38,11 @@ void Socket::Initialise(ServerConnection *serverConnection)
|
|||
}
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
init = true;
|
||||
|
||||
for( int i = 0; i < 2; i++ )
|
||||
{
|
||||
#if !defined(__linux__)
|
||||
InitializeCriticalSection(&Socket::s_hostQueueLock[i]);
|
||||
#endif
|
||||
s_hostOutStream[i] = new SocketOutputStreamLocal(i);
|
||||
s_hostInStream[i] = new SocketInputStreamLocal(i);
|
||||
}
|
||||
|
|
@ -86,9 +79,7 @@ Socket::Socket(INetworkPlayer *player, bool response /* = false*/, bool hostLoca
|
|||
|
||||
for( int i = 0; i < 2; i++ )
|
||||
{
|
||||
#if !defined(__linux__)
|
||||
InitializeCriticalSection(&m_queueLockNetwork[i]);
|
||||
#endif // __linux__
|
||||
m_inputStream[i] = NULL;
|
||||
m_outputStream[i] = NULL;
|
||||
m_endClosed[i] = false;
|
||||
|
|
@ -136,7 +127,6 @@ void Socket::setPlayer(INetworkPlayer *player)
|
|||
|
||||
void Socket::pushDataToQueue(const BYTE * pbData, DWORD dwDataSize, bool fromHost /*= true*/)
|
||||
{
|
||||
#ifndef __linux__
|
||||
int queueIdx = SOCKET_CLIENT_END;
|
||||
if(!fromHost)
|
||||
queueIdx = SOCKET_SERVER_END;
|
||||
|
|
@ -153,7 +143,6 @@ void Socket::pushDataToQueue(const BYTE * pbData, DWORD dwDataSize, bool fromHos
|
|||
m_queueNetwork[queueIdx].push(*pbData++);
|
||||
}
|
||||
LeaveCriticalSection(&m_queueLockNetwork[queueIdx]);
|
||||
#endif // __linux__
|
||||
}
|
||||
|
||||
void Socket::addIncomingSocket(Socket *socket)
|
||||
|
|
@ -270,7 +259,6 @@ Socket::SocketInputStreamLocal::SocketInputStreamLocal(int queueIdx)
|
|||
// Try and get an input byte, blocking until one is available
|
||||
int Socket::SocketInputStreamLocal::read()
|
||||
{
|
||||
#if !defined(__linux__)
|
||||
while(m_streamOpen && ShutdownManager::ShouldRun(ShutdownManager::eConnectionReadThreads))
|
||||
{
|
||||
if(TryEnterCriticalSection(&s_hostQueueLock[m_queueIdx]))
|
||||
|
|
@ -286,7 +274,6 @@ int Socket::SocketInputStreamLocal::read()
|
|||
}
|
||||
Sleep(1);
|
||||
}
|
||||
#endif // __linux__
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
@ -299,7 +286,6 @@ int Socket::SocketInputStreamLocal::read(byteArray b)
|
|||
// Try and get an input range of bytes, blocking until enough bytes are available
|
||||
int Socket::SocketInputStreamLocal::read(byteArray b, unsigned int offset, unsigned int length)
|
||||
{
|
||||
#ifndef __linux__
|
||||
while(m_streamOpen)
|
||||
{
|
||||
if(TryEnterCriticalSection(&s_hostQueueLock[m_queueIdx]))
|
||||
|
|
@ -318,18 +304,15 @@ int Socket::SocketInputStreamLocal::read(byteArray b, unsigned int offset, unsig
|
|||
}
|
||||
Sleep(1);
|
||||
}
|
||||
#endif // __linux__
|
||||
return -1;
|
||||
}
|
||||
|
||||
void Socket::SocketInputStreamLocal::close()
|
||||
{
|
||||
#ifndef __linux__
|
||||
m_streamOpen = false;
|
||||
EnterCriticalSection(&s_hostQueueLock[m_queueIdx]);
|
||||
s_hostQueue[m_queueIdx].empty();
|
||||
LeaveCriticalSection(&s_hostQueueLock[m_queueIdx]);
|
||||
#endif // __linux__
|
||||
}
|
||||
|
||||
/////////////////////////////////// Socket for output, on local connection ////////////////////
|
||||
|
|
@ -342,7 +325,6 @@ Socket::SocketOutputStreamLocal::SocketOutputStreamLocal(int queueIdx)
|
|||
|
||||
void Socket::SocketOutputStreamLocal::write(unsigned int b)
|
||||
{
|
||||
#ifndef __linux__
|
||||
if( m_streamOpen != true )
|
||||
{
|
||||
return;
|
||||
|
|
@ -350,7 +332,6 @@ void Socket::SocketOutputStreamLocal::write(unsigned int b)
|
|||
EnterCriticalSection(&s_hostQueueLock[m_queueIdx]);
|
||||
s_hostQueue[m_queueIdx].push((byte)b);
|
||||
LeaveCriticalSection(&s_hostQueueLock[m_queueIdx]);
|
||||
#endif // __linux__
|
||||
}
|
||||
|
||||
void Socket::SocketOutputStreamLocal::write(byteArray b)
|
||||
|
|
@ -360,7 +341,6 @@ void Socket::SocketOutputStreamLocal::write(byteArray b)
|
|||
|
||||
void Socket::SocketOutputStreamLocal::write(byteArray b, unsigned int offset, unsigned int length)
|
||||
{
|
||||
#ifndef __linux__
|
||||
if( m_streamOpen != true )
|
||||
{
|
||||
return;
|
||||
|
|
@ -373,17 +353,14 @@ void Socket::SocketOutputStreamLocal::write(byteArray b, unsigned int offset, un
|
|||
}
|
||||
LeaveCriticalSection(&s_hostQueueLock[m_queueIdx]);
|
||||
MemSect(0);
|
||||
#endif // __linux__
|
||||
}
|
||||
|
||||
void Socket::SocketOutputStreamLocal::close()
|
||||
{
|
||||
#ifndef __linux__
|
||||
m_streamOpen = false;
|
||||
EnterCriticalSection(&s_hostQueueLock[m_queueIdx]);
|
||||
s_hostQueue[m_queueIdx].empty();
|
||||
LeaveCriticalSection(&s_hostQueueLock[m_queueIdx]);
|
||||
#endif // __linux__
|
||||
}
|
||||
|
||||
/////////////////////////////////// Socket for input, on network connection ////////////////////
|
||||
|
|
@ -398,7 +375,6 @@ Socket::SocketInputStreamNetwork::SocketInputStreamNetwork(Socket *socket, int q
|
|||
// Try and get an input byte, blocking until one is available
|
||||
int Socket::SocketInputStreamNetwork::read()
|
||||
{
|
||||
#ifndef __linux__
|
||||
while(m_streamOpen && ShutdownManager::ShouldRun(ShutdownManager::eConnectionReadThreads))
|
||||
{
|
||||
if(TryEnterCriticalSection(&m_socket->m_queueLockNetwork[m_queueIdx]))
|
||||
|
|
@ -414,7 +390,6 @@ int Socket::SocketInputStreamNetwork::read()
|
|||
}
|
||||
Sleep(1);
|
||||
}
|
||||
#endif // __linux__
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
@ -427,7 +402,6 @@ int Socket::SocketInputStreamNetwork::read(byteArray b)
|
|||
// Try and get an input range of bytes, blocking until enough bytes are available
|
||||
int Socket::SocketInputStreamNetwork::read(byteArray b, unsigned int offset, unsigned int length)
|
||||
{
|
||||
#ifndef __linux__
|
||||
while(m_streamOpen)
|
||||
{
|
||||
if(TryEnterCriticalSection(&m_socket->m_queueLockNetwork[m_queueIdx]))
|
||||
|
|
@ -446,7 +420,6 @@ int Socket::SocketInputStreamNetwork::read(byteArray b, unsigned int offset, uns
|
|||
}
|
||||
Sleep(1);
|
||||
}
|
||||
#endif // __linux__
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
@ -558,4 +531,4 @@ void Socket::SocketOutputStreamNetwork::writeWithFlags(byteArray b, unsigned int
|
|||
void Socket::SocketOutputStreamNetwork::close()
|
||||
{
|
||||
m_streamOpen = false;
|
||||
}
|
||||
}
|
||||
|
|
@ -149,7 +149,7 @@ Tag *Tag::newTag(byte type, const wstring &name)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
wchar_t *Tag::getTagName(byte type)
|
||||
const wchar_t *Tag::getTagName(byte type)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ public:
|
|||
static Tag *readNamedTag(DataInput *dis);
|
||||
static void writeNamedTag(Tag *tag, DataOutput *dos);
|
||||
static Tag *newTag(byte type, const wstring &name);
|
||||
static wchar_t *getTagName(byte type);
|
||||
static const wchar_t *getTagName(byte type);
|
||||
virtual ~Tag() {}
|
||||
virtual bool equals(Tag *obj); // 4J Brought forward from 1.2
|
||||
virtual Tag *copy() = 0; // 4J Brought foward from 1.2
|
||||
|
|
|
|||
|
|
@ -1,24 +1,15 @@
|
|||
#include "stdafx.h"
|
||||
#include "compression.h"
|
||||
#if defined __ORBIS__ || defined __PS3__ || defined _DURANGO || defined _WIN64
|
||||
#if defined __ORBIS__ || defined __PS3__ || defined _DURANGO || defined _WIN64 || defined __linux__
|
||||
#include "../Minecraft.Client/Common/zlib/zlib.h"
|
||||
#endif
|
||||
|
||||
#if defined(__linux__)
|
||||
#include "../Minecraft.Client/Common/zlib/zlib.h"
|
||||
#include <pthread.h> // TLS shit
|
||||
#endif // __linux__
|
||||
|
||||
#if defined __PSVITA__
|
||||
#include "../Minecraft.Client/PSVita/PSVitaExtras/zlib.h"
|
||||
#elif defined __PS3__
|
||||
#include "../Minecraft.Client/PS3/PS3Extras/EdgeZLib.h"
|
||||
#endif //__PS3__
|
||||
|
||||
#if defined(__linux__)
|
||||
#define S_OK 0
|
||||
#endif // __linux__
|
||||
|
||||
DWORD Compression::tlsIdx = 0;
|
||||
Compression::ThreadStorage *Compression::tlsDefault = NULL;
|
||||
|
||||
|
|
@ -511,10 +502,8 @@ Compression::Compression()
|
|||
#endif
|
||||
m_decompressType = m_localDecompressType;
|
||||
|
||||
#ifndef __linux__
|
||||
InitializeCriticalSection(&rleCompressLock);
|
||||
InitializeCriticalSection(&rleDecompressLock);
|
||||
#endif // __linux__
|
||||
}
|
||||
|
||||
Compression::~Compression()
|
||||
|
|
|
|||
|
|
@ -95,8 +95,7 @@ typedef XUID GameSessionUID;
|
|||
#include <unordered_set>
|
||||
#include <vector>
|
||||
|
||||
#include "../Minecraft.Client/Linux/LinuxStubs.h"
|
||||
#include "../Minecraft.Client/Linux/xbox_valve.h"
|
||||
#include "../Minecraft.Client/Linux/Stubs/LinuxStubs.h"
|
||||
#else
|
||||
#include <unordered_map>
|
||||
#include <unordered_set>
|
||||
|
|
|
|||
|
|
@ -318,10 +318,10 @@ public:
|
|||
#define PIXSetMarkerDeprecated(a, b, ...) PIXSetMarker(a, L ## b, __VA_ARGS__)
|
||||
#define PIXAddNamedCounter(a, b) PIXReportCounter( L ## b, a)
|
||||
#else
|
||||
void PIXAddNamedCounter(int a, char *b, ...);
|
||||
void PIXBeginNamedEvent(int a, char *b, ...);
|
||||
void PIXAddNamedCounter(int a, const char *b, ...);
|
||||
void PIXBeginNamedEvent(int a, const char *b, ...);
|
||||
void PIXEndNamedEvent();
|
||||
void PIXSetMarkerDeprecated(int a, char *b, ...);
|
||||
void PIXSetMarkerDeprecated(int a, const char *b, ...);
|
||||
#endif
|
||||
|
||||
void XSetThreadProcessor(HANDLE a, int b);
|
||||
|
|
|
|||
Loading…
Reference in a new issue