mirror of
https://github.com/risingPhil/PokeMe64.git
synced 2026-03-29 13:46:00 -05:00
59 lines
1.6 KiB
C++
59 lines
1.6 KiB
C++
#ifndef _DATACOPYSCENE_H
|
|
#define _DATACOPYSCENE_H
|
|
|
|
#include "scenes/SceneWithProgressBar.h"
|
|
#include "transferpak/TransferPakManager.h"
|
|
#include "transferpak/TransferPakRomReader.h"
|
|
#include "transferpak/TransferPakSaveManager.h"
|
|
#include "transferpak/TransferPakDataCopier.h"
|
|
|
|
enum class DataCopyOperation
|
|
{
|
|
BACKUP_SAVE,
|
|
BACKUP_ROM,
|
|
RESTORE_SAVE,
|
|
WIPE_SAVE
|
|
};
|
|
|
|
typedef struct DataCopySceneContext
|
|
{
|
|
DataCopyOperation operation;
|
|
ManagedString saveToRestorePath;
|
|
} DataCopySceneContext;
|
|
|
|
class DataCopyScene : public SceneWithProgressBar
|
|
{
|
|
public:
|
|
DataCopyScene(SceneDependencies& deps, void* context);
|
|
virtual ~DataCopyScene();
|
|
|
|
void init() override;
|
|
void destroy() override;
|
|
|
|
void processUserInput() override;
|
|
void render(RDPQGraphics& gfx, const Rectangle& sceneBounds) override;
|
|
|
|
void onDialogDone();
|
|
protected:
|
|
void setupDialog(DialogWidgetStyle& style) override;
|
|
void setupProgressBar(ProgressBarWidgetStyle& style) override;
|
|
private:
|
|
TransferPakRomReader romReader_;
|
|
TransferPakSaveManager saveManager_;
|
|
DataCopySceneContext* sceneContext_;
|
|
ITransferPakDataCopySource* copySource_;
|
|
ITransferPakDataCopyDestination* copyDestination_;
|
|
TransferPakDataCopier* copier_;
|
|
sprite_t* dialogWidgetSprite_;
|
|
sprite_t* progressBackgroundSprite_;
|
|
DialogData diag_;
|
|
uint32_t totalBytesToCopy_;
|
|
bool needsValidation_;
|
|
bool isValidating_;
|
|
bool shouldResetRTC_;
|
|
char savOutputPath_[4096];
|
|
};
|
|
|
|
void deleteDataCopySceneContext(void* context);
|
|
|
|
#endif |