nuke d3d11_stubs

This commit is contained in:
Tropical 2026-04-07 18:05:45 -05:00
parent d9f2cb03c7
commit 559b207ee2
4 changed files with 69 additions and 59 deletions

View file

@ -6,6 +6,7 @@
#include "app/common/DLC/DLCSkinFile.h"
#include "app/linux/LinuxGame.h"
#include "app/linux/Linux_UIController.h"
#include "app/linux/Stubs/winapi_stubs.h"
#include "minecraft/client/Minecraft.h"
#include "minecraft/client/skins/TexturePack.h"
#include "minecraft/client/skins/TexturePackRepository.h"

View file

@ -11,11 +11,12 @@
#include "util/Timer.h"
#ifdef __linux__
#include "app/linux/Iggy/include/iggy.h"
#ifndef _ENABLEIGGY
#include "app/linux/Stubs/iggy_stubs.h"
#endif
#include "app/linux/Stubs/d3d11_stubs.h"
#elif defined(_WINDOWS64)
#include "app/windows/Iggy/include/iggy.h"
#endif
@ -41,6 +42,15 @@ class C4JThread;
class Tutorial;
class UIScene;
// 4jcraft, used to be D3D11_RECT.
// This was the only class that used it, so it's here now.
struct RECT {
long left;
long top;
long right;
long bottom;
};
// Base class for all shared functions between UIControllers
class UIController : public IUIController {
public:
@ -187,7 +197,7 @@ private:
int m_accumulatedTicks;
uint64_t m_lastUiSfx; // Tracks time (ms) of last UI sound effect
D3D11_RECT m_customRenderingClearRect;
RECT m_customRenderingClearRect;
std::unordered_map<size_t, UIScene*>
m_registeredCallbackScenes; // A collection of scenes and unique id's

View file

@ -2,7 +2,6 @@
#define STUBS_H
#pragma once
#include "d3d11_stubs.h"
#include "winapi_stubs.h"
#ifndef _ENABLEIGGY
#include "iggy_stubs.h"

View file

@ -1,64 +1,64 @@
#ifndef D3D11STUBS_H
#define D3D11STUBS_H
// #ifndef D3D11STUBS_H
// #define D3D11STUBS_H
#pragma once
// #pragma once
#include "winapi_stubs.h"
// #include "winapi_stubs.h"
typedef struct _RECT {
LONG left;
LONG top;
LONG right;
LONG bottom;
} RECT, *PRECT;
// 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)( void* lpThreadParameter);
// typedef PTHREAD_START_ROUTINE LPTHREAD_START_ROUTINE;
// // 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)( void* 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;
// // 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_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
};
// 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
// #endif // D3D11STUBS_H