MCPcopy Create free account
hub / github.com/DaedalusX64/daedalus / Patch_PatchAll

Function Patch_PatchAll

Source/OSHLE/patch.cpp:168–205  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

166
167
168void Patch_PatchAll()
169{
170 gNumOfOSFunctions = 0;
171
172 if (!gPatchesApplied)
173 {
174 Patch_ApplyPatches();
175 }
176#ifdef DUMPOSFUNCTIONS
177 FILE *fp;
178 IO::Filename path;
179 Dump_GetDumpDirectory(path, "");
180 IO::Path::Append(path, "n64.cfg");
181 fp = fopen(path, "w");
182#endif
183 for (u32 i = 0; i < nPatchSymbols; i++)
184 {
185 if (g_PatchSymbols[i]->Found)
186 {
187#ifdef DUMPOSFUNCTIONS
188 IO::Filename buf;
189 PatchSymbol * ps = g_PatchSymbols[i];
190 Dump_GetDumpDirectory(buf, "oshle");
191 IO::Path::Append(buf, ps->Name);
192
193 Dump_Disassemble(PHYS_TO_K0(ps->Location), PHYS_TO_K0(ps->Location) + ps->Signatures->NumOps * sizeof(OpCode),
194 buf);
195
196 fprintf(fp, "%s 0x%08x\n", ps->Name, PHYS_TO_K0(ps->Location));
197#endif
198 gNumOfOSFunctions++;
199 Patch_ApplyPatch(i);
200 }
201 }
202#ifdef DUMPOSFUNCTIONS
203 fclose(fp);
204#endif
205}
206
207void Patch_ApplyPatch(u32 i)
208{

Callers 2

Dynamo.cppFile · 0.85
SaveState_LoadFromFileFunction · 0.85

Calls 5

Patch_ApplyPatchesFunction · 0.85
Dump_GetDumpDirectoryFunction · 0.85
Dump_DisassembleFunction · 0.85
Patch_ApplyPatchFunction · 0.85
AppendFunction · 0.50

Tested by

no test coverage detected