Newer
Older
Import / research / match3 / state.h
@John John on 29 Dec 2020 617 bytes bulk import from macbookpro checkouts
//  DescriptionHere - state.h
//  Created by John Ryland (jryland@xiaofrog.com), 08/11/2017
//  Copyright (c) 2017 InvertedLogic
//  All rights reserved.
#pragma once


#include <string>


// Add to here the values that need to be saved and restored
#define ALL_STATE_MEMBERS(macro) \
  /* start of members */ \
    macro(int,           highestScore)    \
    macro(std::string,   playerName)      \
  /* end of members */


#define DECLARE_MACRO(type, var)  type m_##var;


struct SavedState
{
  ALL_STATE_MEMBERS(DECLARE_MACRO)
};


bool saveState(const SavedState& a_state);
bool loadState(SavedState& a_state);