forked from Popn_Tools/popnhax
fix quick retire medal
This commit is contained in:
parent
f59de4f8fa
commit
299c6566fe
@ -209,6 +209,16 @@ void (*real_retrieve_score)();
|
|||||||
void quickretry_retrieve_score()
|
void quickretry_retrieve_score()
|
||||||
{
|
{
|
||||||
__asm("mov %0, esi\n":"=S"(g_score_addr): :);
|
__asm("mov %0, esi\n":"=S"(g_score_addr): :);
|
||||||
|
/* let's force E and fail medal for quick exit
|
||||||
|
* (regular retire or end of song will overwrite)
|
||||||
|
*/
|
||||||
|
uint8_t *clear_type = (uint8_t*)(g_score_addr+0x24);
|
||||||
|
uint8_t *clear_rank = (uint8_t*)(g_score_addr+0x25);
|
||||||
|
if (*clear_type == 0)
|
||||||
|
{
|
||||||
|
*clear_type = 1;
|
||||||
|
*clear_rank = 1;
|
||||||
|
}
|
||||||
real_retrieve_score();
|
real_retrieve_score();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1941,7 +1951,7 @@ static bool patch_quick_retire(bool pfree)
|
|||||||
|
|
||||||
/* instant retry (go back to option select) with numpad 7 */
|
/* instant retry (go back to option select) with numpad 7 */
|
||||||
{
|
{
|
||||||
/* retrieve current stage score addr for cleanup */
|
/* retrieve current stage score addr for cleanup (also used to fix quick retire medal) */
|
||||||
fuzzy_search_task task;
|
fuzzy_search_task task;
|
||||||
|
|
||||||
FUZZY_START(task, 1)
|
FUZZY_START(task, 1)
|
||||||
@ -2014,7 +2024,9 @@ static bool patch_quick_retire(bool pfree)
|
|||||||
(void **)&real_option_screen);
|
(void **)&real_option_screen);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (pfree)
|
||||||
printf("popnhax: quick retry enabled\n");
|
printf("popnhax: quick retry enabled\n");
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user