3
0
mirror of https://github.com/CrazyRedMachine/popnhax.git synced 2024-11-27 15:30:50 +01:00

fix unlocks

This commit is contained in:
CrazyRedMachine 2024-11-17 00:01:45 +01:00
parent 041d2903ac
commit eaab5dc718
2 changed files with 7 additions and 3 deletions

View File

@ -2549,6 +2549,10 @@ bool force_unlock_songs() {
break;
}
if ((entry->mask & 0x00020000) != 0) {
LOG("[%04d][JF] Unlocking %s\n", i, entry->title_ptr);
}
if ((entry->mask & 0x08000000) != 0) {
LOG("[%04d] Unlocking %s\n", i, entry->title_ptr);
music_unlocks++;
@ -2559,8 +2563,8 @@ bool force_unlock_songs() {
chart_unlocks++;
}
if ((entry->mask & 0x08000080) != 0) {
uint32_t new_mask = entry->mask & ~0x08000080;
if ((entry->mask & 0x08020080) != 0) {
uint32_t new_mask = entry->mask & ~0x08020080;
patch_memory((uint64_t)&entry->mask, (char *)&new_mask, 4);
}

View File

@ -1362,7 +1362,7 @@ void musichax_core_init(struct popnhax_config *config,
if (force_unlocks) {
music_entry *m = (music_entry *)*new_music_table;
for (uint64_t i = 0; i < *new_music_size; i++) {
uint32_t new_mask = m[i].mask & ~0x8000080;
uint32_t new_mask = m[i].mask & ~0x8020080;
if (m[i].title_ptr != NULL && new_mask != m[i].mask) {
printf("Unlocking [%04lld] %s... %08x -> %08x\n", i, m[i].title_ptr, m[i].mask,