Skip to content

Commit

Permalink
thcrap_tasofro: Adapt 12.3 code to use new VFS changes correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
zero318 committed Jul 30, 2024
1 parent 69edd97 commit 1160616
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions thcrap_tasofro/src/nsml.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ int nsml_init()
if (game_id == TH105) {
char *bgm_fn = fn_for_game("data/csv/system/music.cv1.jdiff");
jsonvfs_add(bgm_fn, { "themes.js" }, bgm_generator);
SAFE_FREE(bgm_fn);
free(bgm_fn);

jsonvfs_game_add_map("data/csv/*/spellcard.cv1.jdiff", { "spells.js" });
jsonvfs_game_add_map("data/csv/*/storyspell.cv1.jdiff", { "spells.js" });
Expand All @@ -112,19 +112,19 @@ int nsml_init()

char *bgm_fn = fn_for_game("data/csv/system/music*.cv1.jdiff");
jsonvfs_add_map(bgm_fn, { "themes.js" });
SAFE_FREE(bgm_fn);
free(bgm_fn);

char *pattern_spell = fn_for_game("data/csv/*/spellcard.cv1.jdiff");
char *pattern_story = fn_for_game("data/csv/*/storyspell.cv1.jdiff");
char *spells_th123 = fn_for_game("spells.js");
char *spellcomments_th123 = fn_for_game("spellcomments.js");
jsonvfs_add_map(pattern_spell, { spells_th123, "th105/spells.js"});
jsonvfs_add_map(pattern_story, { spells_th123, "th105/spells.js" });
jsonvfs_add_map(pattern_spell, { "th105/spells.js", spells_th123 });
jsonvfs_add_map(pattern_story, { "th105/spells.js", spells_th123 });
jsonvfs_add(pattern_spell, { "th105/spellcomments.js", spellcomments_th123 }, th105_spellcomment_generator);
SAFE_FREE(pattern_spell);
SAFE_FREE(pattern_story);
SAFE_FREE(spells_th123);
SAFE_FREE(spellcomments_th123);
free(pattern_spell);
free(pattern_story);
free(spells_th123);
free(spellcomments_th123);
}
return 0;
}
Expand Down

0 comments on commit 1160616

Please sign in to comment.