2020-12-29 22:44:04 +00:00
|
|
|
#pragma once
|
2021-04-12 06:34:26 +00:00
|
|
|
#include <stdint.h>
|
2020-12-29 22:44:04 +00:00
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
class CEnhancement
|
|
|
|
{
|
|
|
|
public:
|
2021-03-04 03:59:31 +00:00
|
|
|
static const char * CheatIdent;
|
|
|
|
static const char * EnhancementIdent;
|
|
|
|
|
2020-12-29 22:44:04 +00:00
|
|
|
struct CodeEntry
|
|
|
|
{
|
|
|
|
uint32_t Command;
|
|
|
|
std::string Value;
|
|
|
|
};
|
|
|
|
struct CodeOption
|
|
|
|
{
|
|
|
|
std::string Name;
|
|
|
|
uint16_t Value;
|
|
|
|
};
|
|
|
|
typedef std::vector<CodeEntry> CodeEntries;
|
|
|
|
typedef std::vector<CodeOption> CodeOptions;
|
2021-02-11 11:26:09 +00:00
|
|
|
typedef std::vector<std::string> PluginList;
|
2020-12-29 22:44:04 +00:00
|
|
|
|
|
|
|
CEnhancement(const char * Ident);
|
|
|
|
CEnhancement(const char * Ident, const char * Entry);
|
|
|
|
void SetName(const char * Name);
|
|
|
|
void SetNote(const char * Note);
|
|
|
|
void SetEntries(const CodeEntries & Entries);
|
|
|
|
void SetOptions(const CodeOptions & Options);
|
2021-02-11 11:26:09 +00:00
|
|
|
void SetPluginList(const PluginList & List);
|
2020-12-29 22:44:04 +00:00
|
|
|
void SetSelectedOption(uint16_t Value);
|
|
|
|
void SetActive(bool Active);
|
2021-01-17 03:17:58 +00:00
|
|
|
void SetOnByDefault(bool OnByDefault);
|
2021-03-10 07:39:01 +00:00
|
|
|
void SetOverClock(bool OverClock, uint32_t OverClockModifier);
|
2020-12-29 22:44:04 +00:00
|
|
|
|
|
|
|
inline const std::string & GetName(void) const { return m_Name; }
|
|
|
|
inline const std::string & GetNameAndExtension(void) const { return m_NameAndExtension; }
|
|
|
|
inline const std::string & GetNote(void) const { return m_Note; }
|
|
|
|
inline const CodeEntries & GetEntries(void) const { return m_Entries; }
|
|
|
|
inline const CodeOptions & GetOptions(void) const { return m_Options; }
|
2021-02-11 11:26:09 +00:00
|
|
|
inline const PluginList & GetPluginList(void) const { return m_PluginList; }
|
2020-12-29 22:44:04 +00:00
|
|
|
inline uint32_t CodeOptionSize(void) const { return m_CodeOptionSize; }
|
|
|
|
inline bool Valid(void) const { return m_Valid; }
|
|
|
|
inline bool Active(void) const { return m_Active; }
|
2021-01-17 03:17:58 +00:00
|
|
|
inline bool GetOnByDefault(void) const { return m_OnByDefault; }
|
2021-03-10 07:39:01 +00:00
|
|
|
inline bool OverClock(void) const { return m_OverClock; }
|
|
|
|
inline uint32_t OverClockModifier(void) const { return m_OverClockModifier; }
|
2020-12-29 22:44:04 +00:00
|
|
|
bool OptionSelected() const { return (m_SelectedOption & 0xFFFF0000) == 0; }
|
|
|
|
uint16_t SelectedOption() const { return (uint16_t)(m_SelectedOption & 0xFFFF); }
|
|
|
|
|
|
|
|
private:
|
|
|
|
CEnhancement();
|
|
|
|
|
|
|
|
void CheckValid();
|
|
|
|
|
|
|
|
std::string m_Ident;
|
|
|
|
std::string m_Name;
|
|
|
|
std::string m_NameAndExtension;
|
|
|
|
std::string m_Note;
|
2021-02-11 11:26:09 +00:00
|
|
|
PluginList m_PluginList;
|
2020-12-29 22:44:04 +00:00
|
|
|
CodeEntries m_Entries;
|
|
|
|
CodeOptions m_Options;
|
|
|
|
std::string m_OptionValue;
|
|
|
|
uint32_t m_CodeOptionSize;
|
|
|
|
uint32_t m_SelectedOption;
|
2021-01-17 03:17:58 +00:00
|
|
|
bool m_OnByDefault;
|
2021-03-10 07:39:01 +00:00
|
|
|
bool m_OverClock;
|
|
|
|
uint32_t m_OverClockModifier;
|
2020-12-29 22:44:04 +00:00
|
|
|
bool m_Active;
|
|
|
|
bool m_Valid;
|
|
|
|
};
|