MCPcopy Create free account
hub / github.com/Phobos-developers/Phobos / LoadFromINI

Method LoadFromINI

src/Utilities/Constructs.cpp:42–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40#include "Debug.h"
41
42bool CustomPalette::LoadFromINI(
43 CCINIClass* pINI, const char* pSection, const char* pKey,
44 const char* pDefault)
45{
46 if (pINI->ReadString(pSection, pKey, pDefault, Phobos::readBuffer))
47 {
48 GeneralUtils::ApplyTheaterSuffixToString(Phobos::readBuffer);
49
50 this->Clear();
51
52 if (auto pPal = FileSystem::AllocatePalette(Phobos::readBuffer))
53 {
54 this->Palette.reset(pPal);
55 this->CreateConvert();
56 }
57
58 return this->Convert != nullptr;
59 }
60 return false;
61}
62
63bool CustomPalette::Load(PhobosStreamReader& Stm, bool RegisterForChange)
64{

Callers

nothing calls this directly

Calls 4

ClearMethod · 0.95
CreateConvertMethod · 0.95
ReadStringMethod · 0.80
resetMethod · 0.80

Tested by

no test coverage detected