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

Method Load

src/Utilities/Constructs.cpp:63–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61}
62
63bool CustomPalette::Load(PhobosStreamReader& Stm, bool RegisterForChange)
64{
65 this->Clear();
66
67 bool hasPalette = false;
68 auto ret = Stm.Load(this->Mode) && Stm.Load(hasPalette);
69
70 if (ret && hasPalette)
71 {
72 this->Palette.reset(GameCreate<BytePalette>());
73 ret = Stm.Load(*this->Palette);
74
75 if (ret)
76 {
77 this->CreateConvert();
78 }
79 }
80
81 return ret;
82}
83
84bool CustomPalette::Save(PhobosStreamWriter& Stm) const
85{

Callers 1

loadMethod · 0.45

Calls 6

ClearMethod · 0.95
CreateConvertMethod · 0.95
ExistsMethod · 0.95
ReadPhobosStreamFunction · 0.85
resetMethod · 0.80
dataMethod · 0.45

Tested by

no test coverage detected