the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
at main 72 lines 2.7 kB view raw
1#pragma once 2using namespace std; 3#include "../media/xuiscene_debugoverlay.h" 4 5#define DEBUG_OVERLAY_UPDATE_TIME_PERIOD 10000 6 7class RegionFile; 8class DataOutputStream; 9class ConsoleSaveFile; 10#include "..\..\..\Minecraft.World\File.h" 11#include "..\..\..\Minecraft.World\Entity.h" 12 13class CScene_DebugOverlay : public CXuiSceneImpl 14{ 15#ifdef _DEBUG_MENUS_ENABLED 16private: 17 CXuiList m_items, m_mobs, m_enchantments; 18 CXuiControl m_resetTutorial, m_createSchematic, m_toggleRain, m_toggleThunder, m_setCamera; 19 CXuiControl m_setDay, m_setNight; 20 CXuiSlider m_chunkRadius, m_setTime,m_setFov; 21 vector<int> m_itemIds; 22 vector<eINSTANCEOF> m_mobFactories; 23 vector<int> m_enchantmentIds; 24 25protected: 26 // Message map. Here we tie messages to message handlers. 27 XUI_BEGIN_MSG_MAP() 28 XUI_ON_XM_INIT( OnInit ) 29 XUI_ON_XM_NOTIFY_PRESS_EX( OnNotifyPressEx ) 30 XUI_ON_XM_KEYDOWN(OnKeyDown) 31 XUI_ON_XM_NOTIFY_VALUE_CHANGED( OnNotifyValueChanged ) 32 XUI_ON_XM_TIMER( OnTimer ) 33 XUI_END_MSG_MAP() 34 35 // Control mapping to objects 36 BEGIN_CONTROL_MAP() 37 MAP_CONTROL(IDC_ChunkRadius, m_chunkRadius) 38 MAP_CONTROL(IDC_ResetTutorial, m_resetTutorial) 39 MAP_CONTROL(IDC_CreateSchematic, m_createSchematic) 40 MAP_CONTROL(IDC_ToggleRain, m_toggleRain) 41 MAP_CONTROL(IDC_ToggleThunder, m_toggleThunder) 42 MAP_CONTROL(IDC_SetDay, m_setDay) 43 MAP_CONTROL(IDC_SetNight, m_setNight) 44 MAP_CONTROL(IDC_SliderTime, m_setTime) 45 MAP_CONTROL(IDC_SliderFov, m_setFov) 46 MAP_CONTROL(IDC_MobList, m_mobs) 47 MAP_CONTROL(IDC_EnchantmentsList, m_enchantments) 48 MAP_CONTROL(IDC_ItemsList, m_items) 49 MAP_CONTROL(IDC_SetCamera, m_setCamera) 50 END_CONTROL_MAP() 51 52 HRESULT OnInit( XUIMessageInit* pInitData, BOOL& bHandled ); 53 HRESULT OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPress* pNotifyPressData, BOOL& rfHandled); 54 HRESULT OnKeyDown(XUIMessageInput* pInputData, BOOL& rfHandled); 55 HRESULT OnNotifyValueChanged( HXUIOBJ hObjSource, XUINotifyValueChanged *pNotifyValueChangedData, BOOL &bHandled); 56 HRESULT OnTimer( XUIMessageTimer *pTimer, BOOL& bHandled ); 57public: 58 59 // Define the class. The class name must match the ClassOverride property 60 // set for the scene in the UI Authoring tool. 61 XUI_IMPLEMENT_CLASS( CScene_DebugOverlay, L"CScene_DebugOverlay", XUI_CLASS_SCENE ) 62 63private: 64 void SetSpawnToPlayerPos(); 65#ifndef _CONTENT_PACKAGE 66 void SaveLimitedFile(int chunkRadius); 67#endif 68 RegionFile *getRegionFile(unordered_map<File, RegionFile *, FileKeyHash, FileKeyEq> &newFileCache, ConsoleSaveFile *saveFile, const wstring &prefix, int chunkX, int chunkZ); 69 70 DataOutputStream *getChunkDataOutputStream(unordered_map<File, RegionFile *, FileKeyHash, FileKeyEq> &newFileCache, ConsoleSaveFile *saveFile, const wstring &prefix, int chunkX, int chunkZ); 71#endif 72};