Something went wrong. Try again.
the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
Something went wrong. Try again.
9.2 kB · 487 lines
C
at main
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487#pragma once
#pragma message("UIStructs.h")
#include "UIEnums.h"
class Container;class Inventory;class BrewingStandTileEntity;class DispenserTileEntity;class FurnaceTileEntity;class SignTileEntity;class LevelGenerationOptions;class LocalPlayer;class Merchant;class EntityHorse;class BeaconTileEntity;class Slot;class AbstractContainerMenu;
// 4J Stu - Structs shared by Iggy and Xui scenes.typedef struct _UIVec2D{ float x; float y;
_UIVec2D& operator+=(const _UIVec2D &rhs) { x += rhs.x; y += rhs.y; return *this; }} UIVec2D;
// Brewingtypedef struct _BrewingScreenInput{ shared_ptr<Inventory> inventory; shared_ptr<BrewingStandTileEntity> brewingStand; int iPad; bool bSplitscreen;} BrewingScreenInput;
// Chesttypedef struct _ContainerScreenInput{ shared_ptr<Container> inventory; shared_ptr<Container> container; int iPad; bool bSplitscreen;} ContainerScreenInput;
// Dispensertypedef struct _TrapScreenInput{ shared_ptr<Container> inventory; shared_ptr<DispenserTileEntity> trap; int iPad; bool bSplitscreen;} TrapScreenInput;
// Inventory and creative inventorytypedef struct _InventoryScreenInput{ shared_ptr<LocalPlayer> player; bool bNavigateBack; // If we came here from the crafting screen, go back to it, rather than closing the xui menus int iPad; bool bSplitscreen;} InventoryScreenInput;
// Enchanting typedef struct _EnchantingScreenInput{ shared_ptr<Inventory> inventory; Level *level; int x; int y; int z; int iPad; bool bSplitscreen; wstring name;} EnchantingScreenInput;
// Furnacetypedef struct _FurnaceScreenInput{ shared_ptr<Inventory> inventory; shared_ptr<FurnaceTileEntity> furnace; int iPad; bool bSplitscreen;} FurnaceScreenInput;
// Craftingtypedef struct _CraftingPanelScreenInput{ shared_ptr<LocalPlayer> player; int iContainerType; // RECIPE_TYPE_2x2 or RECIPE_TYPE_3x3 bool bSplitscreen; int iPad; int x; int y; int z;} CraftingPanelScreenInput;
// Fireworkstypedef struct _FireworksScreenInput{ shared_ptr<LocalPlayer> player; bool bSplitscreen; int iPad; int x; int y; int z;} FireworksScreenInput;
// Tradingtypedef struct _TradingScreenInput{ shared_ptr<Inventory> inventory; shared_ptr<Merchant> trader; Level *level; int iPad; bool bSplitscreen;}TradingScreenInput;
// Anviltypedef struct _AnvilScreenInput{ shared_ptr<Inventory> inventory; Level *level; int x; int y; int z; int iPad; bool bSplitscreen;}AnvilScreenInput;
// Hoppertypedef struct _HopperScreenInput{ shared_ptr<Inventory> inventory; shared_ptr<Container> hopper; int iPad; bool bSplitscreen;}HopperScreenInput;
// Horsetypedef struct _HorseScreenInput{ shared_ptr<Inventory> inventory; shared_ptr<Container> container; shared_ptr<EntityHorse> horse; int iPad; bool bSplitscreen;}HorseScreenInput;
// Beacontypedef struct _BeaconScreenInput{ shared_ptr<Inventory> inventory; shared_ptr<BeaconTileEntity> beacon; int iPad; bool bSplitscreen;}BeaconScreenInput;
// Signtypedef struct _SignEntryScreenInput{ shared_ptr<SignTileEntity> sign; int iPad;} SignEntryScreenInput;
// Connecting progresstypedef struct _ConnectionProgressParams{ int iPad; int stringId; bool showTooltips; bool setFailTimer; int timerTime; void (*cancelFunc)(LPVOID param); LPVOID cancelFuncParam;
_ConnectionProgressParams() { iPad = 0; stringId = -1; showTooltips = false; setFailTimer = false; timerTime = 0; cancelFunc = NULL; cancelFuncParam = NULL; }} ConnectionProgressParams;
// Fullscreen progresstypedef struct _UIFullscreenProgressCompletionData{ BOOL bRequiresUserAction; BOOL bShowBackground; BOOL bShowLogo; BOOL bShowTips; ProgressionCompletionType type; int iPad; EUIScene scene;
_UIFullscreenProgressCompletionData() { bRequiresUserAction = FALSE; bShowBackground = TRUE; bShowLogo = TRUE; bShowTips = TRUE; type = e_ProgressCompletion_NoAction; }} UIFullscreenProgressCompletionData;
// Create worldtypedef struct _CreateWorldMenuInitData{ BOOL bOnline; BOOL bIsPrivate; int iPad;} CreateWorldMenuInitData;
// Join/Load saves listtypedef struct _SaveListDetails{ int saveId; PBYTE pbThumbnailData; DWORD dwThumbnailSize;#ifdef _DURANGO wchar_t UTF16SaveName[128]; wchar_t UTF16SaveFilename[MAX_SAVEFILENAME_LENGTH];#else char UTF8SaveName[128];#ifndef _XBOX char UTF8SaveFilename[MAX_SAVEFILENAME_LENGTH];#endif#endif
_SaveListDetails() { saveId = 0; pbThumbnailData = NULL; dwThumbnailSize = 0;#ifdef _DURANGO ZeroMemory(UTF16SaveName,sizeof(wchar_t)*128); ZeroMemory(UTF16SaveFilename,sizeof(wchar_t)*MAX_SAVEFILENAME_LENGTH);#else ZeroMemory(UTF8SaveName,128);#ifndef _XBOX ZeroMemory(UTF8SaveFilename,MAX_SAVEFILENAME_LENGTH);#endif#endif }
} SaveListDetails;
// Load worldtypedef struct _LoadMenuInitData{ int iPad; int iSaveGameInfoIndex; LevelGenerationOptions *levelGen; SaveListDetails *saveDetails;} LoadMenuInitData;
// Join Gamestypedef struct _JoinMenuInitData{ FriendSessionInfo *selectedSession; int iPad;} JoinMenuInitData;
// More Optionstypedef struct _LaunchMoreOptionsMenuInitData{ bool bOnlineGame; bool bInviteOnly; bool bAllowFriendsOfFriends;
bool bGenerateOptions; bool bStructures; bool bFlatWorld; bool bBonusChest;
bool bPVP; bool bTrust; bool bFireSpreads; bool bTNT;
bool bHostPrivileges; bool bResetNether;
bool bMobGriefing; bool bKeepInventory; bool bDoMobSpawning; bool bDoMobLoot; bool bDoTileDrops; bool bNaturalRegeneration; bool bDoDaylightCycle;
bool bOnlineSettingChangedBySystem;
int iPad;
DWORD dwTexturePack;
wstring seed; int worldSize; bool bDisableSaving;
EGameHostOptionWorldSize currentWorldSize; EGameHostOptionWorldSize newWorldSize; bool newWorldSizeOverwriteEdges;
_LaunchMoreOptionsMenuInitData() { memset(this,0,sizeof(_LaunchMoreOptionsMenuInitData)); bOnlineGame = true; bAllowFriendsOfFriends = true; bPVP = true; bFireSpreads = true; bTNT = true; iPad = -1; worldSize = 3; seed = L""; bDisableSaving = false; newWorldSize = e_worldSize_Unknown; newWorldSizeOverwriteEdges = false;
bMobGriefing = true; bKeepInventory = false; bDoMobSpawning = true; bDoMobLoot = true; bDoTileDrops = true; bNaturalRegeneration = true; bDoDaylightCycle = true; }} LaunchMoreOptionsMenuInitData;
typedef struct _LoadingInputParams{ C4JThreadStartFunc* func; LPVOID lpParam; UIFullscreenProgressCompletionData *completionData;
int cancelText; void (*cancelFunc)(LPVOID param); void (*completeFunc)(LPVOID param); LPVOID m_cancelFuncParam; LPVOID m_completeFuncParam; bool waitForThreadToDelete;
_LoadingInputParams() { func = NULL; lpParam = NULL; completionData = NULL;
cancelText = -1; cancelFunc = NULL; completeFunc = NULL; m_cancelFuncParam = NULL; m_completeFuncParam = NULL; waitForThreadToDelete = false; }} LoadingInputParams;
// Tutorial#ifndef _XBOXclass UIScene;#endifclass Tutorial;typedef struct _TutorialPopupInfo{#ifdef _XBOX CXuiScene *interactScene;#else UIScene *interactScene;#endif LPCWSTR desc; LPCWSTR title; int icon; int iAuxVal /* = 0 */; bool isFoil /* = false */; bool allowFade /* = true */; bool isReminder /*= false*/; Tutorial *tutorial;
_TutorialPopupInfo() { interactScene = NULL; desc = L""; title = L""; icon = -1; iAuxVal = 0; isFoil = false; allowFade = true; isReminder = false; tutorial = NULL; }
} TutorialPopupInfo;
// Quadrant sign intypedef struct _SignInInfo{ int( *Func)(LPVOID,const bool, const int iPad); LPVOID lpParam; bool requireOnline;} SignInInfo;
// Creditstypedef struct { LPCWSTR m_Text; // Should contain string, optionally with %s to add in translated string ... e.g. "Andy West - %s" int m_iStringID[2]; // May be NO_TRANSLATED_STRING if we do not require to add any translated string. ECreditTextTypes m_eType;}SCreditTextItemDef;
// Message boxtypedef struct _MessageBoxInfo{ UINT uiTitle; UINT uiText; UINT *uiOptionA; UINT uiOptionC; DWORD dwPad; int( *Func)(LPVOID,int,const C4JStorage::EMessageResult); LPVOID lpParam; //C4JStringTable *pStringTable; // 4J Stu - We don't need this for our internal message boxes WCHAR *pwchFormatString; DWORD dwFocusButton;} MessageBoxInfo;
typedef struct _DLCOffersParam{ int iPad; int iOfferC; int iType; } DLCOffersParam;
typedef struct _InGamePlayerOptionsInitData{ int iPad; BYTE networkSmallId; unsigned int playerPrivileges;} InGamePlayerOptionsInitData;
typedef struct _DebugSetCameraPosition{ int player; double m_camX, m_camY, m_camZ, m_yRot, m_elev;} DebugSetCameraPosition;
typedef struct _TeleportMenuInitData{ int iPad; bool teleportToPlayer;} TeleportMenuInitData;
typedef struct _CustomDrawData{ float x0, y0, x1, y1; // the bounding box of the original DisplayObject, in object space float mat[16];} CustomDrawData;
typedef struct _ItemEditorInput{ int iPad; Slot *slot; AbstractContainerMenu *menu;} ItemEditorInput;