diff --git a/dist/popnhax/popnhax.xml b/dist/popnhax/popnhax.xml index 2cd0cc4..1c9a79b 100644 --- a/dist/popnhax/popnhax.xml +++ b/dist/popnhax/popnhax.xml @@ -152,8 +152,10 @@ Customs [ol:4][olc:d92f0d]%s - + + + diff --git a/popnhax/config.h b/popnhax/config.h index f99e446..dfd9e9d 100644 --- a/popnhax/config.h +++ b/popnhax/config.h @@ -63,6 +63,7 @@ struct popnhax_config { char custom_category_title[16]; char custom_category_format[64]; char custom_track_title_format[64]; + char custom_track_title_format2[64]; }; #endif diff --git a/popnhax/custom_categs.cc b/popnhax/custom_categs.cc index 8880432..ad29d3c 100644 --- a/popnhax/custom_categs.cc +++ b/popnhax/custom_categs.cc @@ -695,7 +695,7 @@ static bool patch_favorite_categ(const char *game_dll_fn) { //hook result screen to replace 3 functions { - int64_t first_loc = search(data, dllSize, "\xBF\x07\x00\x00\x00\xC6\x85\x61\xD3", 9, 0); + int64_t first_loc = search(data, dllSize, "\x10\xBF\x07\x00\x00\x00\xC6\x85", 8, 0); if (first_loc == -1) { LOG("popnhax: local_favorites: cannot find result screen function\n"); return false; @@ -1035,7 +1035,7 @@ bool patch_custom_categs(const char *dllFilename, struct popnhax_config *config) { g_categformat = config->custom_category_format; } - else + else g_categformat = "%s"; if (!patch_custom_categ(dllFilename)) @@ -1046,11 +1046,13 @@ bool patch_custom_categs(const char *dllFilename, struct popnhax_config *config) print_databases(); } - if ( config->custom_track_title_format[0] != '\0' ) - { + if ( config->game_version < 26 && config->custom_track_title_format2[0] != '\0' ) + g_customformat = config->custom_track_title_format2; + else if ( config->custom_track_title_format[0] != '\0' ) g_customformat = config->custom_track_title_format; + + if ( g_customformat != NULL ) patch_custom_track_format(dllFilename); - } if (config->custom_exclude_from_version) LOG("popnhax: Customs excluded from version folders\n"); //musichax_core_init took care of it diff --git a/popnhax/dllmain.cc b/popnhax/dllmain.cc index 6fba4c2..8c0702b 100644 --- a/popnhax/dllmain.cc +++ b/popnhax/dllmain.cc @@ -32,7 +32,7 @@ #include "SearchFile.h" -#define PROGRAM_VERSION "1.11.beta2" +#define PROGRAM_VERSION "1.11" const char *g_game_dll_fn = NULL; const char *g_config_fn = NULL; @@ -201,6 +201,8 @@ PSMAP_MEMBER_REQ(PSMAP_PROPERTY_TYPE_STR, struct popnhax_config, custom_category "/popnhax/custom_category_format") PSMAP_MEMBER_REQ(PSMAP_PROPERTY_TYPE_STR, struct popnhax_config, custom_track_title_format, "/popnhax/custom_track_title_format") +PSMAP_MEMBER_REQ(PSMAP_PROPERTY_TYPE_STR, struct popnhax_config, custom_track_title_format2, + "/popnhax/custom_track_title_format2") PSMAP_MEMBER_REQ(PSMAP_PROPERTY_TYPE_BOOL, struct popnhax_config, local_favorites, "/popnhax/local_favorites") PSMAP_MEMBER_REQ(PSMAP_PROPERTY_TYPE_BOOL, struct popnhax_config, ignore_music_limit, @@ -5539,7 +5541,7 @@ static bool get_music_limit_from_file(const char *filepath, uint32_t *limit){ } char *data = (char *)lpBasePtr; - uint32_t delta = 0; + int32_t delta = 0; //first retrieve .rdata virtual and raw addresses to compute delta {