MCPcopy Create free account
hub / github.com/EasyRPG/Player / GetLogoCount

Method GetLogoCount

src/exe_reader.cpp:427–441  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

425}
426
427uint32_t EXEReader::GetLogoCount() {
428 if (!resource_ofs) {
429 return 0;
430 }
431
432 uint32_t resourcesIDEs = GetU16(resource_ofs + 0x0C);
433 if (resourcesIDEs == 1) {
434 uint32_t resourcesIDEbase = resource_ofs + 0x10;
435 if (ResNameCheck(exe_reader_roffset(resource_ofs, GetU32(resourcesIDEbase)), "XYZ")) {
436 uint32_t xyz_logo_base = exe_reader_roffset(resource_ofs, GetU32(resourcesIDEbase + 4));
437 return static_cast<uint32_t>(GetU16(xyz_logo_base + 0x0C));
438 }
439 }
440 return 0;
441}
442
443bool EXEReader::ResNameCheck(uint32_t i, const char* p) {
444 if (GetU16(i) != strlen(p))

Callers

nothing calls this directly

Calls 1

exe_reader_roffsetFunction · 0.85

Tested by

no test coverage detected