ksys/gdt: Add getBool helper

This commit is contained in:
Léo Lam 2020-11-07 19:06:12 +01:00
parent dd8ef71390
commit bfa4a2553e
No known key found for this signature in database
GPG Key ID: 0DF30F9081000741
1 changed files with 13 additions and 1 deletions

View File

@ -2,4 +2,16 @@
#include "KingSystem/GameData/gdtManager.h"
namespace ksys::gdt {} // namespace ksys::gdt
namespace ksys::gdt {
inline bool getBool(FlagHandle handle, bool debug = false) {
bool value{};
auto* mgr = Manager::instance();
if (mgr)
mgr->getBool(handle, &value, debug);
return value;
}
} // namespace ksys::gdt