Merge pull request #6885 from unknownbrackets/replace-funcs

Move a couple funcs replacements outside of loops
This commit is contained in:
Henrik Rydgård 2014-09-12 23:20:13 +02:00
commit 2580fc625c

View file

@ -626,19 +626,19 @@ static int Hook_narisokonai_download_frame() {
}
static int Hook_kirameki_school_life_download_frame() {
const u32 fb_address = currentMIPS->r[MIPS_REG_S0];
const u32 fb_address = currentMIPS->r[MIPS_REG_A2];
if (Memory::IsVRAMAddress(fb_address)) {
gpu->PerformMemoryDownload(fb_address, 0x00044000);
CBreakPoints::ExecMemCheck(fb_address, true, 0x00044000, currentMIPS->pc);
gpu->PerformMemoryDownload(fb_address, 0x00088000);
CBreakPoints::ExecMemCheck(fb_address, true, 0x00088000, currentMIPS->pc);
}
return 0;
}
static int Hook_orenoimouto_download_frame() {
const u32 fb_address = currentMIPS->r[MIPS_REG_V1];
const u32 fb_address = currentMIPS->r[MIPS_REG_A4];
if (Memory::IsVRAMAddress(fb_address)) {
gpu->PerformMemoryDownload(fb_address, 0x00044000);
CBreakPoints::ExecMemCheck(fb_address, true, 0x00044000, currentMIPS->pc);
gpu->PerformMemoryDownload(fb_address, 0x00088000);
CBreakPoints::ExecMemCheck(fb_address, true, 0x00088000, currentMIPS->pc);
}
return 0;
}
@ -693,8 +693,8 @@ static const ReplacementTableEntry entries[] = {
{ "growlanser_create_saveicon", &Hook_growlanser_create_saveicon, 0, REPFLAG_HOOKENTER, 0x7C },
{ "sd_gundam_g_generation_download_frame", &Hook_sd_gundam_g_generation_download_frame, 0, REPFLAG_HOOKENTER, 0x48},
{ "narisokonai_download_frame", &Hook_narisokonai_download_frame, 0, REPFLAG_HOOKENTER, 0x14 },
{ "kirameki_school_life_download_frame", &Hook_kirameki_school_life_download_frame, 0, REPFLAG_HOOKENTER, 0x304 },
{ "orenoimouto_download_frame", &Hook_orenoimouto_download_frame, 0, REPFLAG_HOOKENTER, 0x88 },
{ "kirameki_school_life_download_frame", &Hook_kirameki_school_life_download_frame, 0, REPFLAG_HOOKENTER },
{ "orenoimouto_download_frame", &Hook_orenoimouto_download_frame, 0, REPFLAG_HOOKENTER },
{}
};