#pragma once #include #include "Emulator.h" #include "CheatData.h" using namespace concurrency; using namespace Windows::Storage; #define MAX_SAVESTATE_SLOTS 10 #define AUTOSAVESTATE_SLOT 9 namespace VBA10 { extern bool ROMLoaded; extern StorageFile ^ROMFile; extern StorageFolder ^ROMFolder; extern int SavestateSlot; extern Windows::Foundation::Collections::IVector ^ROMCheats; extern bool ShouldApplyNewCheats; extern Platform::Collections::Map^ hidConfigs; Platform::Array ^GetSnapshotBuffer(unsigned char *backbuffer, size_t pitch, int imageWidth, int imageHeight); task ParseVBAIniAsync(); bool IsROMLoaded(void); bool IsGBAROMLoaded(void); task SaveStateAsync(void); task SaveGBAStateAsync(void); task SaveGBStateAsync(void); task LoadStateAsync(int slot); task LoadGBAStateAsync(int slot); task LoadGBStateAsync(int slot); task LoadGBROMAsync(StorageFile ^file, StorageFolder ^folder); task LoadGBAROMAsync(StorageFile ^file, StorageFolder ^folder); task LoadROMAsync(StorageFile ^file, StorageFolder ^folder); void ResetSync(); //task ResetAsync(void); task GetROMBytesFromFileAsync(StorageFile ^file); task SaveSRAMAsync(void); task SaveGBSRAMAsync(void); task SaveGBASRAMAsync(void); task SaveSRAMCopyAsync(void); task SaveGBASRAMCopyAsync(void); task SaveGBSRAMCopyAsync(void); task LoadSRAMAsync(void); task LoadGBASRAMAsync(void); task LoadGBSRAMAsync(void); task RestoreFromApplicationDataAsync(void); task SuspendAsync(void); task ^> LoadCheats(void); task SaveCheats(); void ApplyCheats(Windows::Foundation::Collections::IVector ^cheats); void ApplyCheatsGB(Windows::Foundation::Collections::IVector ^cheats); void ApplyCheatsGBA(Windows::Foundation::Collections::IVector ^cheats); task SaveBytesToFileAsync(StorageFile ^file, unsigned char *bytes, size_t length); task GetBytesFromFileAsync(StorageFile ^file); void SelectSavestateSlot(int slot); int GetSavestateSlot(void); task SaveHidConfig(); task LoadHidConfig(); }