Saveload: Tidy up logging of chunk IDs

Add helper to dump chunk IDs as strings
Avoid duplicate logging of load steps for upstream load paths
This commit is contained in:
Jonathan G Rennison
2024-02-21 18:22:27 +00:00
parent ba1fa3ad29
commit bd2358f6cc
2 changed files with 53 additions and 35 deletions

View File

@@ -125,6 +125,13 @@ struct ChunkHandler {
ChunkSaveLoadSpecialProc *special_proc = nullptr;
};
struct ChunkIDDumper {
const char *operator()(uint32_t id);
private:
char buffer[5];
};
template <typename F>
void SlExecWithSlVersion(SaveLoadVersion use_version, F proc)
{