2022-12-04 11:03:45 +00:00
|
|
|
// SPDX-FileCopyrightText: 2019-2022 Connor McLaughlin <stenzek@gmail.com>
|
|
|
|
// SPDX-License-Identifier: (GPL-3.0 OR CC-BY-NC-ND-4.0)
|
|
|
|
|
2022-07-11 13:03:29 +00:00
|
|
|
#pragma once
|
|
|
|
#include "common/types.h"
|
|
|
|
|
2023-08-13 06:28:28 +00:00
|
|
|
#include <string>
|
|
|
|
|
2022-07-11 13:03:29 +00:00
|
|
|
class StateWrapper;
|
|
|
|
class CDImage;
|
|
|
|
|
|
|
|
namespace Achievements {
|
|
|
|
|
|
|
|
#ifdef WITH_CHEEVOS
|
|
|
|
|
|
|
|
// Implemented in Host.
|
2022-09-21 12:02:54 +00:00
|
|
|
extern bool ConfirmSystemReset();
|
|
|
|
extern void ResetRuntime();
|
2022-07-11 13:03:29 +00:00
|
|
|
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();
|
2022-07-11 13:03:29 +00:00
|
|
|
|
|
|
|
/// 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.
|
2022-09-21 12:02:54 +00:00
|
|
|
static inline bool ConfirmSystemReset()
|
2022-07-11 13:03:29 +00:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
2022-09-21 12:02:54 +00:00
|
|
|
static inline void ResetRuntime() {}
|
2022-07-11 13:03:29 +00:00
|
|
|
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;
|
|
|
|
}
|
2022-07-11 13:03:29 +00:00
|
|
|
|
|
|
|
static inline void DisableChallengeMode() {}
|
|
|
|
|
|
|
|
static inline bool ConfirmChallengeModeDisable(const char* trigger)
|
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
} // namespace Achievements
|