// Copyright (c) 2022 Dominic Masters // // This software is released under the MIT License. // https://opensource.org/licenses/MIT #include "DawnGameSaveManager.hpp" using namespace Dawn; DawnGameSaveManager::DawnGameSaveManager(DawnGame *game) : SaveManager(game) { } bool_t DawnGameSaveManager::validateSave(struct SaveFile raw) { if(!raw.has(POKER_SAVE_KEY_EXAMPLE)) return true; this->currentSave.copy(raw, POKER_SAVE_KEY_EXAMPLE); return false; } void DawnGameSaveManager::setExample(int32_t val) { savedata_t value; value.i32 = val; this->currentSave.set(POKER_SAVE_KEY_EXAMPLE, value); } int32_t DawnGameSaveManager::getExample() { return this->currentSave.get(POKER_SAVE_KEY_EXAMPLE).i32; }