Duckstation/src/core/achievements.h

61 lines
1.2 KiB
C
Raw Normal View History

#pragma once
#include "common/types.h"
class StateWrapper;
class CDImage;
namespace Achievements {
#ifdef WITH_CHEEVOS
// Implemented in Host.
extern bool ConfirmSystemReset();
extern void ResetRuntime();
extern bool DoState(StateWrapper& sw);
extern void GameChanged(const std::string& path, CDImage* image);
/// Re-enables hardcode mode if it is enabled in the settings.
2022-10-08 10:59:18 +00:00
extern bool ResetChallengeMode();
/// Forces hardcore mode off until next reset.
extern void DisableChallengeMode();
/// Prompts the user to disable hardcore mode, if they agree, returns true.
extern bool ConfirmChallengeModeDisable(const char* trigger);
/// Returns true if features such as save states should be disabled.
extern bool ChallengeModeActive();
#else
// Make noops when compiling without cheevos.
static inline bool ConfirmSystemReset()
{
return true;
}
static inline void ResetRuntime() {}
static inline bool DoState(StateWrapper& sw)
{
return true;
}
static constexpr inline bool ChallengeModeActive()
{
return false;
}
2022-10-08 10:59:18 +00:00
static inline bool ResetChallengeMode()
{
return false;
}
static inline void DisableChallengeMode() {}
static inline bool ConfirmChallengeModeDisable(const char* trigger)
{
return true;
}
#endif
} // namespace Achievements