// Token: 0x060007DB RID: 2011 RVA: 0x00044FE4 File Offset: 0x000431E4 private static void AoStorageDeleteStart() { AppMain.AOS_STORAGE aos_STORAGE = AppMain.aoStorageGetGlobal(); if (aos_STORAGE.state != 0) { AppMain.aoStorageSetError(5); return; } AppMain.AoStorageClearError(); string text = AppMain.aoStorageAllocSaveFilePath(); try { if (!File.Exists(text)) { aos_STORAGE.del_success = false; } else { File.Delete(text); aos_STORAGE.del_success = true; } } catch (Exception) { aos_STORAGE.del_success = false; } AppMain.aoStorageFreeSaveFilePath(text); aos_STORAGE.state = 0; }
// Token: 0x060007E6 RID: 2022 RVA: 0x00045278 File Offset: 0x00043478 private static void aoStorageLoadTaskProcedure(AppMain.AMS_TCB tcb) { AppMain.AOS_STORAGE aos_STORAGE = AppMain.aoStorageGetGlobal(); AppMain.amTaskDelete(tcb); aos_STORAGE.load_buf = null; aos_STORAGE.load_size = 0U; aos_STORAGE.state = 0; aos_STORAGE.tcb = null; }
// Token: 0x060007E5 RID: 2021 RVA: 0x00045230 File Offset: 0x00043430 private static void aoStorageLoadThread() { AppMain.AOS_STORAGE aos_STORAGE = AppMain.aoStorageGetGlobal(); string path = AppMain.aoStorageAllocSaveFilePath(); uint num = AppMain.AoStorageLoadMm(path, aos_STORAGE.load_buf, aos_STORAGE.load_size); AppMain.aoStorageFreeSaveFilePath(path); uint num2 = num; if (num2 == 0U) { aos_STORAGE.load_success = true; return; } AppMain.aoStorageSetError(1); }
// Token: 0x060007D3 RID: 2003 RVA: 0x00044EA0 File Offset: 0x000430A0 private static void AoStorageSaveStart(byte[] data, uint size, bool is_first, bool is_new) { AppMain.AOS_STORAGE aos_STORAGE = AppMain.aoStorageGetGlobal(); if (aos_STORAGE.state != 0) { AppMain.aoStorageSetError(5); return; } aos_STORAGE.state = 1; aos_STORAGE.save_success = false; aos_STORAGE.save_buf = data; aos_STORAGE.save_size = size; AppMain.aoStorageSaveThread(); aos_STORAGE.tcb = AppMain.amTaskMake(new AppMain.TaskProc(AppMain.aoStorageSaveTaskProcedure), null, 0U, 0U, 0U, "aoStorage::Save"); AppMain.amTaskStart(aos_STORAGE.tcb); }
// Token: 0x060007D7 RID: 2007 RVA: 0x00044F40 File Offset: 0x00043140 private static void AoStorageLoadStart(byte[] data) { uint load_size = (uint)data.Length; AppMain.AOS_STORAGE aos_STORAGE = AppMain.aoStorageGetGlobal(); if (aos_STORAGE.state != 0) { AppMain.aoStorageSetError(5); return; } aos_STORAGE.state = 2; aos_STORAGE.load_success = false; aos_STORAGE.load_buf = data; aos_STORAGE.load_size = load_size; AppMain.aoStorageLoadThread(); aos_STORAGE.tcb = AppMain.amTaskMake(new AppMain.TaskProc(AppMain.aoStorageLoadTaskProcedure), null, 0U, 0U, 0U, "aoStorage::Load"); AppMain.amTaskStart(aos_STORAGE.tcb); }
// Token: 0x060007CC RID: 1996 RVA: 0x00044D80 File Offset: 0x00042F80 private static void AoStorageInit() { AppMain.AOS_STORAGE aos_STORAGE = AppMain.aoStorageGetGlobal(); if (aos_STORAGE.initialized) { return; } aos_STORAGE.initialized = false; aos_STORAGE.state = 0; aos_STORAGE.save_success = false; aos_STORAGE.save_buf = null; aos_STORAGE.save_size = 0U; aos_STORAGE.load_success = false; aos_STORAGE.load_buf = null; aos_STORAGE.load_size = 0U; aos_STORAGE.del_success = false; aos_STORAGE.tcb = null; aos_STORAGE.initialized = true; }
// Token: 0x060007CD RID: 1997 RVA: 0x00044DEC File Offset: 0x00042FEC private static void AoStorageExit() { AppMain.AOS_STORAGE aos_STORAGE = AppMain.aoStorageGetGlobal(); if (aos_STORAGE.initialized) { if (aos_STORAGE.tcb != null) { AppMain.amTaskDelete(aos_STORAGE.tcb); aos_STORAGE.tcb = null; } aos_STORAGE.initialized = false; aos_STORAGE.state = 0; aos_STORAGE.save_success = false; aos_STORAGE.save_buf = null; aos_STORAGE.save_size = 0U; aos_STORAGE.load_success = false; aos_STORAGE.load_buf = null; aos_STORAGE.load_size = 0U; aos_STORAGE.del_success = false; aos_STORAGE.tcb = null; aos_STORAGE.initialized = false; } }
// Token: 0x060007DC RID: 2012 RVA: 0x00045064 File Offset: 0x00043264 private static bool AoStorageDeleteIsFinished() { AppMain.AOS_STORAGE aos_STORAGE = AppMain.aoStorageGetGlobal(); return(aos_STORAGE.state != 3); }