the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
at main 42 lines 1.3 kB view raw
1#pragma once 2 3#include "DLCGameRules.h" 4#include "..\GameRules\LevelGenerationOptions.h" 5 6class DLCGameRulesHeader : public DLCGameRules, public JustGrSource 7{ 8private: 9 10 // GR-Header 11 PBYTE m_pbData; 12 DWORD m_dwBytes; 13 14 bool m_hasData; 15 16public: 17 virtual bool requiresTexturePack() {return m_bRequiresTexturePack;} 18 virtual UINT getRequiredTexturePackId() {return m_requiredTexturePackId;} 19 virtual wstring getDefaultSaveName() {return m_defaultSaveName;} 20 virtual LPCWSTR getWorldName() {return m_worldName.c_str();} 21 virtual LPCWSTR getDisplayName() {return m_displayName.c_str();} 22 virtual wstring getGrfPath() {return L"GameRules.grf";} 23 24 virtual void setRequiresTexturePack(bool x) {m_bRequiresTexturePack = x;} 25 virtual void setRequiredTexturePackId(UINT x) {m_requiredTexturePackId = x;} 26 virtual void setDefaultSaveName(const wstring &x) {m_defaultSaveName = x;} 27 virtual void setWorldName(const wstring & x) {m_worldName = x;} 28 virtual void setDisplayName(const wstring & x) {m_displayName = x;} 29 virtual void setGrfPath(const wstring & x) {m_grfPath = x;} 30 31 LevelGenerationOptions *lgo; 32 33public: 34 DLCGameRulesHeader(const wstring &path); 35 36 virtual void addData(PBYTE pbData, DWORD dwBytes); 37 virtual PBYTE getData(DWORD &dwBytes); 38 39 void setGrfData(PBYTE fData, DWORD fSize, StringTable *); 40 41 virtual bool ready() { return m_hasData; } 42};