MinecraftConsoles/Minecraft.Client/Common/DLC/DLCGameRulesHeader.h
Riley M. c0da06e4ee
major: Switch to forward slashes(+more) to fix compilation on Linux (#1403)
Notably also adds some metadata files for NixOS 

* add support for linux clang cross compiles

* add linux clang instructions

* un-capitalize Mob.horse.*

* update the description in flake.nix

---------

Co-authored-by: Loki <lokirautio@gmail.com>
2026-04-14 16:47:37 -05:00

65 lines
1.4 KiB
C++

#pragma once
#include "DLCGameRules.h"
#include "../GameRules/LevelGenerationOptions.h"
class DLCGameRulesHeader : public DLCGameRules, public JustGrSource
{
private:
// GR-Header
PBYTE m_pbData;
DWORD m_dwBytes;
bool m_hasData;
public:
bool requiresTexturePack() override
{return m_bRequiresTexturePack;}
UINT getRequiredTexturePackId() override
{return m_requiredTexturePackId;}
wstring getDefaultSaveName() override
{return m_defaultSaveName;}
LPCWSTR getWorldName() override
{return m_worldName.c_str();}
LPCWSTR getDisplayName() override
{return m_displayName.c_str();}
wstring getGrfPath() override
{return L"GameRules.grf";}
void setRequiresTexturePack(bool x) override
{m_bRequiresTexturePack = x;}
void setRequiredTexturePackId(UINT x) override
{m_requiredTexturePackId = x;}
void setDefaultSaveName(const wstring &x) override
{m_defaultSaveName = x;}
void setWorldName(const wstring & x) override
{m_worldName = x;}
void setDisplayName(const wstring & x) override
{m_displayName = x;}
void setGrfPath(const wstring & x) override
{m_grfPath = x;}
LevelGenerationOptions *lgo;
public:
DLCGameRulesHeader(const wstring &path);
void addData(PBYTE pbData, DWORD dwBytes) override;
PBYTE getData(DWORD &dwBytes) override;
void setGrfData(PBYTE fData, DWORD fSize, StringTable *);
bool ready() override
{ return m_hasData; }
};