the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
at main 88 lines 3.0 kB view raw
1#pragma once 2using namespace std; 3//#include <vector> 4 5#include "..\Media\xuiscene_TransferToXboxOne.h" 6 7 8class CXuiCtrl4JList; 9 10class CScene_TransferToXboxOne : public CXuiSceneImpl 11{ 12protected: 13 14 typedef struct 15 { 16 WCHAR wchSaveTitle[XCONTENT_MAX_DISPLAYNAME_LENGTH]; 17 unsigned int uiImageLength; 18 } 19 SLOTDATA; 20 21 CXuiCtrl4JList *m_pSavesSlotList; 22 CXuiList m_SavesSlotList; 23 CXuiControl m_SavesSlotListTimer; 24 25 XUI_BEGIN_MSG_MAP() 26 XUI_ON_XM_INIT( OnInit ) 27 XUI_ON_XM_DESTROY(OnDestroy) 28 XUI_ON_XM_KEYDOWN(OnKeyDown) 29 XUI_ON_XM_NOTIFY_PRESS_EX(OnNotifyPressEx) 30 XUI_ON_XM_NOTIFY_SELCHANGED(OnNotifySelChanged) 31 XUI_ON_XM_NOTIFY_SET_FOCUS(OnNotifySetFocus) 32 XUI_ON_XM_NOTIFY_KILL_FOCUS(OnNotifyKillFocus) 33 XUI_ON_XM_TRANSITION_START(OnTransitionStart) 34 XUI_ON_XM_FONTRENDERERCHANGE_MESSAGE(OnFontRendererChange) 35 36 XUI_END_MSG_MAP() 37 38 BEGIN_CONTROL_MAP() 39 MAP_CONTROL(IDC_SavesSlotTimer, m_SavesSlotListTimer) 40 MAP_CONTROL(IDC_SavesSlotsList, m_SavesSlotList) 41 END_CONTROL_MAP() 42 43 44 HRESULT OnInit( XUIMessageInit* pInitData, BOOL& bHandled ); 45 HRESULT OnDestroy(); 46 HRESULT OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPress* pNotifyPressData,BOOL& rfHandled); 47 HRESULT OnKeyDown(XUIMessageInput* pInputData, BOOL& rfHandled); 48 HRESULT OnNavReturn(HXUIOBJ hObj,BOOL& rfHandled); 49 HRESULT OnNotifySelChanged(HXUIOBJ hObjSource, XUINotifySelChanged *pNotifySelChangedData, BOOL& bHandled); 50 HRESULT OnNotifySetFocus(HXUIOBJ hObjSource, XUINotifyFocus *pNotifyFocusData, BOOL& bHandled); 51 HRESULT OnNotifyKillFocus(HXUIOBJ hObjSource, XUINotifyFocus *pNotifyFocusData, BOOL& bHandled); 52 HRESULT OnTimer( XUIMessageTimer *pTimer, BOOL& bHandled ); 53 HRESULT OnTransitionStart( XUIMessageTransition *pTransition, BOOL& bHandled ); 54 HRESULT OnFontRendererChange(); 55 56public: 57 58 // Define the class. The class name must match the ClassOverride property 59 // set for the scene in the UI Authoring tool. 60 XUI_IMPLEMENT_CLASS( CScene_TransferToXboxOne, L"CScene_TransferToXboxOne", XUI_CLASS_SCENE ) 61 62 static int TMSPPSlotListReturned(LPVOID pParam,int iPad,int iUserData,C4JStorage::PTMSPP_FILEDATA pFileData, LPCSTR szFilename); 63 static int TMSPPWriteReturned(LPVOID pParam,int iPad,int iUserData); 64 static int TMSPPDeleteReturned(LPVOID pParam,int iPad,int iUserData); 65 static int UploadSaveForXboxOneThreadProc( LPVOID lpParameter ); 66 static int LoadSaveDataReturned(void *pParam,bool bContinue); 67private: 68 HRESULT BuildSlotFile(int iIndexBeingUpdated,PBYTE pbImageData,DWORD dwImageBytes); 69 70 bool m_bIgnoreInput; 71 bool m_bRetrievingSaveInfo; 72 int m_iPad; 73 int m_MaxSlotC; 74 int m_iX; // tooltip for clearing all slots if there are saves in them 75 LoadMenuInitData *m_params; 76 XCONTENT_DATA m_XContentData; 77 PBYTE m_pbImageData; 78 DWORD m_dwImageBytes; 79 HXUIBRUSH m_hXuiBrush; 80 PBYTE m_pbSlotListFile; 81 unsigned int m_uiSlotListFileBytes; 82 SLOTDATA *m_pSlotDataA; 83 bool m_bWaitingForWrite; 84 void *m_pvSaveMem; 85 unsigned int m_uiStorageLength; 86 bool m_bSaveDataReceived; 87 unsigned int m_uiSlotID; 88};