refactor: remove the need for gl_stubs.h

This commit is contained in:
Tropical 2026-03-03 16:22:01 -06:00
parent 867b47e842
commit 4c3afed824
6 changed files with 38 additions and 17 deletions

View file

@ -2,7 +2,7 @@
#include "DemoLevel.h"
#include "../Minecraft.World/net.minecraft.world.level.storage.h"
const LevelSettings DemoLevel::DEMO_LEVEL_SETTINGS = LevelSettings(
LevelSettings DemoLevel::DEMO_LEVEL_SETTINGS = LevelSettings(
DemoLevel::DEMO_LEVEL_SEED,
GameType::SURVIVAL,
false,

View file

@ -5,10 +5,10 @@ class DemoLevel : public Level
{
private:
static const __int64 DEMO_LEVEL_SEED = 0; // 4J - TODO - was "Don't Look Back".hashCode();
static const LevelSettings DEMO_LEVEL_SETTINGS;
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);

View file

@ -3,10 +3,9 @@
#pragma once
#include "gl_stubs.h"
#include "d3d11_stubs.h"
#include "iggy_stubs.h"
#include "winapi_stubs.h"
#include "d3d11_stubs.h"
#include "xbox_stubs.h"
#include "iggy_stubs.h"
#endif // STUBS_H

View file

@ -34,4 +34,38 @@ 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

View file

@ -1,10 +0,0 @@
#ifndef GLSTUBS_H
#define GLSTUBS_H
#pragma once
#define GL_ONE 1
#define GL_SRC_ALPHA 0x0302
#define GL_ONE_MINUS_SRC_ALPHA 0x0303
#endif // GLSTUBS_H

View file

@ -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;