the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
at main 487 lines 9.2 kB view raw
1#pragma once 2 3#pragma message("UIStructs.h") 4 5#include "UIEnums.h" 6 7class Container; 8class Inventory; 9class BrewingStandTileEntity; 10class DispenserTileEntity; 11class FurnaceTileEntity; 12class SignTileEntity; 13class LevelGenerationOptions; 14class LocalPlayer; 15class Merchant; 16class EntityHorse; 17class BeaconTileEntity; 18class Slot; 19class AbstractContainerMenu; 20 21// 4J Stu - Structs shared by Iggy and Xui scenes. 22typedef struct _UIVec2D 23{ 24 float x; 25 float y; 26 27 _UIVec2D& operator+=(const _UIVec2D &rhs) 28 { 29 x += rhs.x; 30 y += rhs.y; 31 return *this; 32 } 33} UIVec2D; 34 35// Brewing 36typedef struct _BrewingScreenInput 37{ 38 shared_ptr<Inventory> inventory; 39 shared_ptr<BrewingStandTileEntity> brewingStand; 40 int iPad; 41 bool bSplitscreen; 42} BrewingScreenInput; 43 44// Chest 45typedef struct _ContainerScreenInput 46{ 47 shared_ptr<Container> inventory; 48 shared_ptr<Container> container; 49 int iPad; 50 bool bSplitscreen; 51} ContainerScreenInput; 52 53// Dispenser 54typedef struct _TrapScreenInput 55{ 56 shared_ptr<Container> inventory; 57 shared_ptr<DispenserTileEntity> trap; 58 int iPad; 59 bool bSplitscreen; 60} TrapScreenInput; 61 62// Inventory and creative inventory 63typedef struct _InventoryScreenInput 64{ 65 shared_ptr<LocalPlayer> player; 66 bool bNavigateBack; // If we came here from the crafting screen, go back to it, rather than closing the xui menus 67 int iPad; 68 bool bSplitscreen; 69} InventoryScreenInput; 70 71// Enchanting 72typedef struct _EnchantingScreenInput 73{ 74 shared_ptr<Inventory> inventory; 75 Level *level; 76 int x; 77 int y; 78 int z; 79 int iPad; 80 bool bSplitscreen; 81 wstring name; 82} 83EnchantingScreenInput; 84 85// Furnace 86typedef struct _FurnaceScreenInput 87{ 88 shared_ptr<Inventory> inventory; 89 shared_ptr<FurnaceTileEntity> furnace; 90 int iPad; 91 bool bSplitscreen; 92} FurnaceScreenInput; 93 94// Crafting 95typedef struct _CraftingPanelScreenInput 96{ 97 shared_ptr<LocalPlayer> player; 98 int iContainerType; // RECIPE_TYPE_2x2 or RECIPE_TYPE_3x3 99 bool bSplitscreen; 100 int iPad; 101 int x; 102 int y; 103 int z; 104} 105CraftingPanelScreenInput; 106 107// Fireworks 108typedef struct _FireworksScreenInput 109{ 110 shared_ptr<LocalPlayer> player; 111 bool bSplitscreen; 112 int iPad; 113 int x; 114 int y; 115 int z; 116} 117FireworksScreenInput; 118 119// Trading 120typedef struct _TradingScreenInput 121{ 122 shared_ptr<Inventory> inventory; 123 shared_ptr<Merchant> trader; 124 Level *level; 125 int iPad; 126 bool bSplitscreen; 127} 128TradingScreenInput; 129 130// Anvil 131typedef struct _AnvilScreenInput 132{ 133 shared_ptr<Inventory> inventory; 134 Level *level; 135 int x; 136 int y; 137 int z; 138 int iPad; 139 bool bSplitscreen; 140} 141AnvilScreenInput; 142 143// Hopper 144typedef struct _HopperScreenInput 145{ 146 shared_ptr<Inventory> inventory; 147 shared_ptr<Container> hopper; 148 int iPad; 149 bool bSplitscreen; 150} 151HopperScreenInput; 152 153// Horse 154typedef struct _HorseScreenInput 155{ 156 shared_ptr<Inventory> inventory; 157 shared_ptr<Container> container; 158 shared_ptr<EntityHorse> horse; 159 int iPad; 160 bool bSplitscreen; 161} 162HorseScreenInput; 163 164// Beacon 165typedef struct _BeaconScreenInput 166{ 167 shared_ptr<Inventory> inventory; 168 shared_ptr<BeaconTileEntity> beacon; 169 int iPad; 170 bool bSplitscreen; 171} 172BeaconScreenInput; 173 174// Sign 175typedef struct _SignEntryScreenInput 176{ 177 shared_ptr<SignTileEntity> sign; 178 int iPad; 179} SignEntryScreenInput; 180 181// Connecting progress 182typedef struct _ConnectionProgressParams 183{ 184 int iPad; 185 int stringId; 186 bool showTooltips; 187 bool setFailTimer; 188 int timerTime; 189 void (*cancelFunc)(LPVOID param); 190 LPVOID cancelFuncParam; 191 192 _ConnectionProgressParams() 193 { 194 iPad = 0; 195 stringId = -1; 196 showTooltips = false; 197 setFailTimer = false; 198 timerTime = 0; 199 cancelFunc = NULL; 200 cancelFuncParam = NULL; 201 } 202} ConnectionProgressParams; 203 204// Fullscreen progress 205typedef struct _UIFullscreenProgressCompletionData 206{ 207 BOOL bRequiresUserAction; 208 BOOL bShowBackground; 209 BOOL bShowLogo; 210 BOOL bShowTips; 211 ProgressionCompletionType type; 212 int iPad; 213 EUIScene scene; 214 215 _UIFullscreenProgressCompletionData() 216 { 217 bRequiresUserAction = FALSE; 218 bShowBackground = TRUE; 219 bShowLogo = TRUE; 220 bShowTips = TRUE; 221 type = e_ProgressCompletion_NoAction; 222 } 223} UIFullscreenProgressCompletionData; 224 225// Create world 226typedef struct _CreateWorldMenuInitData 227{ 228 BOOL bOnline; 229 BOOL bIsPrivate; 230 int iPad; 231} 232CreateWorldMenuInitData; 233 234// Join/Load saves list 235typedef struct _SaveListDetails 236{ 237 int saveId; 238 PBYTE pbThumbnailData; 239 DWORD dwThumbnailSize; 240#ifdef _DURANGO 241 wchar_t UTF16SaveName[128]; 242 wchar_t UTF16SaveFilename[MAX_SAVEFILENAME_LENGTH]; 243#else 244 char UTF8SaveName[128]; 245#ifndef _XBOX 246 char UTF8SaveFilename[MAX_SAVEFILENAME_LENGTH]; 247#endif 248#endif 249 250 _SaveListDetails() 251 { 252 saveId = 0; 253 pbThumbnailData = NULL; 254 dwThumbnailSize = 0; 255#ifdef _DURANGO 256 ZeroMemory(UTF16SaveName,sizeof(wchar_t)*128); 257 ZeroMemory(UTF16SaveFilename,sizeof(wchar_t)*MAX_SAVEFILENAME_LENGTH); 258#else 259 ZeroMemory(UTF8SaveName,128); 260#ifndef _XBOX 261 ZeroMemory(UTF8SaveFilename,MAX_SAVEFILENAME_LENGTH); 262#endif 263#endif 264 } 265 266} SaveListDetails; 267 268// Load world 269typedef struct _LoadMenuInitData 270{ 271 int iPad; 272 int iSaveGameInfoIndex; 273 LevelGenerationOptions *levelGen; 274 SaveListDetails *saveDetails; 275} 276LoadMenuInitData; 277 278// Join Games 279typedef struct _JoinMenuInitData 280{ 281 FriendSessionInfo *selectedSession; 282 int iPad; 283} JoinMenuInitData; 284 285// More Options 286typedef struct _LaunchMoreOptionsMenuInitData 287{ 288 bool bOnlineGame; 289 bool bInviteOnly; 290 bool bAllowFriendsOfFriends; 291 292 bool bGenerateOptions; 293 bool bStructures; 294 bool bFlatWorld; 295 bool bBonusChest; 296 297 bool bPVP; 298 bool bTrust; 299 bool bFireSpreads; 300 bool bTNT; 301 302 bool bHostPrivileges; 303 bool bResetNether; 304 305 bool bMobGriefing; 306 bool bKeepInventory; 307 bool bDoMobSpawning; 308 bool bDoMobLoot; 309 bool bDoTileDrops; 310 bool bNaturalRegeneration; 311 bool bDoDaylightCycle; 312 313 bool bOnlineSettingChangedBySystem; 314 315 int iPad; 316 317 DWORD dwTexturePack; 318 319 wstring seed; 320 int worldSize; 321 bool bDisableSaving; 322 323 EGameHostOptionWorldSize currentWorldSize; 324 EGameHostOptionWorldSize newWorldSize; 325 bool newWorldSizeOverwriteEdges; 326 327 _LaunchMoreOptionsMenuInitData() 328 { 329 memset(this,0,sizeof(_LaunchMoreOptionsMenuInitData)); 330 bOnlineGame = true; 331 bAllowFriendsOfFriends = true; 332 bPVP = true; 333 bFireSpreads = true; 334 bTNT = true; 335 iPad = -1; 336 worldSize = 3; 337 seed = L""; 338 bDisableSaving = false; 339 newWorldSize = e_worldSize_Unknown; 340 newWorldSizeOverwriteEdges = false; 341 342 bMobGriefing = true; 343 bKeepInventory = false; 344 bDoMobSpawning = true; 345 bDoMobLoot = true; 346 bDoTileDrops = true; 347 bNaturalRegeneration = true; 348 bDoDaylightCycle = true; 349 } 350} 351LaunchMoreOptionsMenuInitData; 352 353typedef struct _LoadingInputParams 354{ 355 C4JThreadStartFunc* func; 356 LPVOID lpParam; 357 UIFullscreenProgressCompletionData *completionData; 358 359 int cancelText; 360 void (*cancelFunc)(LPVOID param); 361 void (*completeFunc)(LPVOID param); 362 LPVOID m_cancelFuncParam; 363 LPVOID m_completeFuncParam; 364 bool waitForThreadToDelete; 365 366 _LoadingInputParams() 367 { 368 func = NULL; 369 lpParam = NULL; 370 completionData = NULL; 371 372 cancelText = -1; 373 cancelFunc = NULL; 374 completeFunc = NULL; 375 m_cancelFuncParam = NULL; 376 m_completeFuncParam = NULL; 377 waitForThreadToDelete = false; 378 } 379} LoadingInputParams; 380 381// Tutorial 382#ifndef _XBOX 383class UIScene; 384#endif 385class Tutorial; 386typedef struct _TutorialPopupInfo 387{ 388#ifdef _XBOX 389 CXuiScene *interactScene; 390#else 391 UIScene *interactScene; 392#endif 393 LPCWSTR desc; 394 LPCWSTR title; 395 int icon; 396 int iAuxVal /* = 0 */; 397 bool isFoil /* = false */; 398 bool allowFade /* = true */; 399 bool isReminder /*= false*/; 400 Tutorial *tutorial; 401 402 _TutorialPopupInfo() 403 { 404 interactScene = NULL; 405 desc = L""; 406 title = L""; 407 icon = -1; 408 iAuxVal = 0; 409 isFoil = false; 410 allowFade = true; 411 isReminder = false; 412 tutorial = NULL; 413 } 414 415} TutorialPopupInfo; 416 417// Quadrant sign in 418typedef struct _SignInInfo 419{ 420 int( *Func)(LPVOID,const bool, const int iPad); 421 LPVOID lpParam; 422 bool requireOnline; 423} SignInInfo; 424 425// Credits 426typedef struct 427{ 428 LPCWSTR m_Text; // Should contain string, optionally with %s to add in translated string ... e.g. "Andy West - %s" 429 int m_iStringID[2]; // May be NO_TRANSLATED_STRING if we do not require to add any translated string. 430 ECreditTextTypes m_eType; 431} 432SCreditTextItemDef; 433 434// Message box 435typedef struct _MessageBoxInfo 436{ 437 UINT uiTitle; 438 UINT uiText; 439 UINT *uiOptionA; 440 UINT uiOptionC; 441 DWORD dwPad; 442 int( *Func)(LPVOID,int,const C4JStorage::EMessageResult); 443 LPVOID lpParam; 444 //C4JStringTable *pStringTable; // 4J Stu - We don't need this for our internal message boxes 445 WCHAR *pwchFormatString; 446 DWORD dwFocusButton; 447} MessageBoxInfo; 448 449typedef struct _DLCOffersParam 450{ 451 int iPad; 452 int iOfferC; 453 int iType; 454} 455DLCOffersParam; 456 457typedef struct _InGamePlayerOptionsInitData 458{ 459 int iPad; 460 BYTE networkSmallId; 461 unsigned int playerPrivileges; 462} InGamePlayerOptionsInitData; 463 464typedef struct _DebugSetCameraPosition 465{ 466 int player; 467 double m_camX, m_camY, m_camZ, m_yRot, m_elev; 468} DebugSetCameraPosition; 469 470typedef struct _TeleportMenuInitData 471{ 472 int iPad; 473 bool teleportToPlayer; 474} TeleportMenuInitData; 475 476typedef struct _CustomDrawData 477{ 478 float x0, y0, x1, y1; // the bounding box of the original DisplayObject, in object space 479 float mat[16]; 480} CustomDrawData; 481 482typedef struct _ItemEditorInput 483{ 484 int iPad; 485 Slot *slot; 486 AbstractContainerMenu *menu; 487} ItemEditorInput;