disable FunctionCodeIndex during replays
This commit is contained in:
@@ -41,7 +41,8 @@ std::shared_ptr<CompiledFunctionCode> compile_function_code(
|
||||
|
||||
|
||||
struct FunctionCodeIndex {
|
||||
FunctionCodeIndex(const std::string& directory);
|
||||
FunctionCodeIndex() = default;
|
||||
explicit FunctionCodeIndex(const std::string& directory);
|
||||
|
||||
std::unordered_map<std::string, std::shared_ptr<CompiledFunctionCode>> name_to_function;
|
||||
std::unordered_map<uint32_t, std::shared_ptr<CompiledFunctionCode>> index_to_function;
|
||||
@@ -67,7 +68,8 @@ struct DOLFileIndex {
|
||||
std::vector<std::shared_ptr<DOLFile>> item_id_to_file;
|
||||
std::map<std::string, std::shared_ptr<DOLFile>> name_to_file;
|
||||
|
||||
DOLFileIndex(const std::string& directory);
|
||||
DOLFileIndex() = default;
|
||||
explicit DOLFileIndex(const std::string& directory);
|
||||
|
||||
std::vector<MenuItem> menu() const;
|
||||
inline bool empty() const {
|
||||
|
||||
+9
-5
@@ -361,11 +361,15 @@ int main(int argc, char** argv) {
|
||||
config_log.info("Collecting quest metadata");
|
||||
state->quest_index.reset(new QuestIndex("system/quests"));
|
||||
|
||||
config_log.info("Compiling client functions");
|
||||
state->function_code_index.reset(new FunctionCodeIndex("system/ppc"));
|
||||
|
||||
config_log.info("Loading DOL files");
|
||||
state->dol_file_index.reset(new DOLFileIndex("system/dol"));
|
||||
if (!replay_log_filename) {
|
||||
config_log.info("Compiling client functions");
|
||||
state->function_code_index.reset(new FunctionCodeIndex("system/ppc"));
|
||||
config_log.info("Loading DOL files");
|
||||
state->dol_file_index.reset(new DOLFileIndex("system/dol"));
|
||||
} else {
|
||||
state->function_code_index.reset(new FunctionCodeIndex());
|
||||
state->dol_file_index.reset(new DOLFileIndex());
|
||||
}
|
||||
|
||||
config_log.info("Creating menus");
|
||||
state->create_menus(config_json);
|
||||
|
||||
Reference in New Issue
Block a user