the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
at main 127 lines 4.1 kB view raw
1#pragma once 2 3#include "IUIScene_StartGame.h" 4 5class UIScene_LoadMenu : public IUIScene_StartGame 6{ 7private: 8 enum EControls 9 { 10 eControl_GameMode, 11 eControl_Difficulty, 12 eControl_MoreOptions, 13 eControl_LoadWorld, 14 eControl_TexturePackList, 15 eControl_OnlineGame, 16 }; 17 18 static int m_iDifficultyTitleSettingA[4]; 19 20 UIControl m_controlMainPanel; 21 UIControl_Label m_labelGameName, m_labelSeed, m_labelCreatedMode; 22 UIControl_Button m_buttonGamemode, m_buttonMoreOptions, m_buttonLoadWorld; 23 UIControl_Slider m_sliderDifficulty; 24 UIControl_BitmapIcon m_bitmapIcon; 25 26 UIControl_CheckBox m_checkboxOnline; 27 28 UI_BEGIN_MAP_ELEMENTS_AND_NAMES(IUIScene_StartGame) 29 UI_MAP_ELEMENT( m_controlMainPanel, "MainPanel" ) 30 UI_BEGIN_MAP_CHILD_ELEMENTS( m_controlMainPanel ) 31 UI_MAP_ELEMENT( m_labelGameName, "GameName") 32 UI_MAP_ELEMENT( m_labelCreatedMode, "CreatedMode") 33 UI_MAP_ELEMENT( m_labelSeed, "Seed") 34 UI_MAP_ELEMENT( m_texturePackList, "TexturePackSelector") 35 UI_MAP_ELEMENT( m_buttonGamemode, "GameModeToggle") 36 UI_MAP_ELEMENT( m_checkboxOnline, "CheckboxOnline") 37 UI_MAP_ELEMENT( m_buttonMoreOptions, "MoreOptions") 38 UI_MAP_ELEMENT( m_buttonLoadWorld, "LoadSettings") 39 UI_MAP_ELEMENT( m_sliderDifficulty, "Difficulty") 40 UI_MAP_ELEMENT( m_bitmapIcon, "LevelIcon") 41 UI_END_MAP_CHILD_ELEMENTS() 42 UI_END_MAP_ELEMENTS_AND_NAMES() 43 44 LevelGenerationOptions *m_levelGen; 45 DLCPack * m_pDLCPack; 46 47 int m_iSaveGameInfoIndex; 48 int m_CurrentDifficulty; 49 bool m_bGameModeCreative; 50 int m_iGameModeId; 51 bool m_bHasBeenInCreative; 52 bool m_bIsSaveOwner; 53 bool m_bRetrievingSaveThumbnail; 54 bool m_bSaveThumbnailReady; 55 bool m_bMultiplayerAllowed; 56 bool m_bShowTimer; 57 bool m_bAvailableTexturePacksChecked; 58 bool m_bRequestQuadrantSignin; 59 bool m_bIsCorrupt; 60 bool m_bThumbnailGetFailed; 61 __int64 m_seed; 62 63#ifdef __PS3__ 64 std::vector<SonyCommerce::ProductInfo>*m_pvProductInfo; 65#endif 66 //int *m_iConfigA; // track the texture packs that we don't have installed 67 68 PBYTE m_pbThumbnailData; 69 unsigned int m_uiThumbnailSize; 70 wstring m_thumbnailName; 71 72 bool m_bRebuildTouchBoxes; 73public: 74 UIScene_LoadMenu(int iPad, void *initData, UILayer *parentLayer); 75 76 virtual void updateTooltips(); 77 virtual void updateComponents(); 78 79 virtual EUIScene getSceneType() { return eUIScene_LoadMenu;} 80 81 virtual void tick(); 82 83 virtual UIControl* GetMainPanel(); 84 85 virtual void handleTouchBoxRebuild(); 86 87protected: 88 // TODO: This should be pure virtual in this class 89 virtual wstring getMoviePath(); 90 91public: 92 // INPUT 93 virtual void handleInput(int iPad, int key, bool repeat, bool pressed, bool released, bool &handled); 94 virtual void handleTimerComplete(int id); 95 96protected: 97 void handlePress(F64 controlId, F64 childId); 98 void handleSliderMove(F64 sliderId, F64 currentValue); 99 virtual void handleGainFocus(bool navBack); 100 101private: 102 void StartSharedLaunchFlow(); 103 virtual void checkStateAndStartGame(); 104 void LaunchGame(void); 105 106#ifdef _DURANGO 107 static void checkPrivilegeCallback(LPVOID lpParam, bool hasPrivilege, int iPad); 108#endif 109 110 static int ConfirmLoadReturned(void *pParam,int iPad,C4JStorage::EMessageResult result); 111 static void StartGameFromSave(UIScene_LoadMenu* pClass, DWORD dwLocalUsersMask); 112 static int LoadSaveDataReturned(void *pParam,bool bIsCorrupt, bool bIsOwner); 113 static int TrophyDialogReturned(void *pParam,int iPad,C4JStorage::EMessageResult result); 114 static int LoadDataComplete(void *pParam); 115 static int LoadSaveDataThumbnailReturned(LPVOID lpParam,PBYTE pbThumbnail,DWORD dwThumbnailBytes); 116 static int CheckResetNetherReturned(void *pParam,int iPad,C4JStorage::EMessageResult result); 117 static int DeleteSaveDialogReturned(void *pParam,int iPad,C4JStorage::EMessageResult result); 118 static int DeleteSaveDataReturned(void *pParam,bool bSuccess); 119 static int MustSignInReturnedPSN(void *pParam,int iPad,C4JStorage::EMessageResult result); 120#ifdef __ORBIS__ 121 //static int PSPlusReturned(void *pParam,int iPad,C4JStorage::EMessageResult result); 122 static int ContinueOffline(void *pParam,int iPad,C4JStorage::EMessageResult result); 123#endif 124 125public: 126 static int StartGame_SignInReturned(LPVOID pParam, bool, int); 127};