| 353 | GraphicsSet::~GraphicsSet() = default; |
| 354 | |
| 355 | bool GraphicsSet::FillSetDetails(const IniFile &ini, const std::string &path, const std::string &full_filename) |
| 356 | { |
| 357 | if (!this->BaseSet<GraphicsSet>::FillSetDetails(ini, path, full_filename, false)) return false; |
| 358 | |
| 359 | const IniGroup *metadata = ini.GetGroup("metadata"); |
| 360 | assert(metadata != nullptr); /* already checked by the inherited FillSetDetails. */ |
| 361 | const IniItem *item; |
| 362 | |
| 363 | item = this->GetMandatoryItem(full_filename, *metadata, "palette"); |
| 364 | if (item == nullptr) return false; |
| 365 | this->palette = ((*item->value)[0] == 'D' || (*item->value)[0] == 'd') ? PAL_DOS : PAL_WINDOWS; |
| 366 | |
| 367 | /* Get optional blitter information. */ |
| 368 | item = metadata->GetItem("blitter"); |
| 369 | this->blitter = (item != nullptr && (*item->value)[0] == '3') ? BLT_32BPP : BLT_8BPP; |
| 370 | |
| 371 | return true; |
| 372 | } |
| 373 | |
| 374 | /** |
| 375 | * Return configuration for the extra GRF, or lazily create it. |
nothing calls this directly
no test coverage detected