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