0x0046DF56
| 30 | |
| 31 | // 0x0046DF56 |
| 32 | void CurrencyObject::load(const LoadedObjectHandle& handle, std::span<const std::byte> data, ObjectManager::DependentObjects*) |
| 33 | { |
| 34 | auto remainingData = data.subspan(sizeof(CurrencyObject)); |
| 35 | |
| 36 | auto loadString = [&remainingData, &handle](StringId& dst, uint8_t num) { |
| 37 | auto strRes = ObjectManager::loadStringTable(remainingData, handle, num); |
| 38 | dst = strRes.str; |
| 39 | remainingData = remainingData.subspan(strRes.tableLength); |
| 40 | }; |
| 41 | |
| 42 | // Load object strings |
| 43 | loadString(name, 0); |
| 44 | loadString(prefixSymbol, 1); |
| 45 | loadString(suffixSymbol, 2); |
| 46 | |
| 47 | // Load images |
| 48 | auto imageRes = ObjectManager::loadImageTable(remainingData); |
| 49 | objectIcon = imageRes.imageOffset; |
| 50 | |
| 51 | // Ensure we've loaded the entire object |
| 52 | assert(remainingData.size() == imageRes.tableLength); |
| 53 | } |
| 54 | |
| 55 | // 0x0046DF90 |
| 56 | void CurrencyObject::unload() |
nothing calls this directly
no test coverage detected