diff options
author | Colin Noga <Tempus@chronometry.ca> | 2012-07-09 22:45:35 -0500 |
---|---|---|
committer | Colin Noga <Tempus@chronometry.ca> | 2012-07-09 22:45:35 -0500 |
commit | 91cc1c2dd9d9c5ec8ca1ac54580f77376d2c0424 (patch) | |
tree | 1c8c28061a87311fdeaf52e8db2e79bbc68f2843 | |
parent | 658a61ba359b87d70a9545b0496b78279c9dac37 (diff) | |
download | kamek-91cc1c2dd9d9c5ec8ca1ac54580f77376d2c0424.tar.gz kamek-91cc1c2dd9d9c5ec8ca1ac54580f77376d2c0424.zip |
Added a name table to the song hack
-rw-r--r-- | src/music.cpp | 80 |
1 files changed, 78 insertions, 2 deletions
diff --git a/src/music.cpp b/src/music.cpp index 6a92a23..669a775 100644 --- a/src/music.cpp +++ b/src/music.cpp @@ -15,6 +15,80 @@ struct Hijacker { }; + +const char* SongNameList [] = { + "AIRSHIP", + "BOSS", + "MENU", + "UNDERWATER", + "ATHLETIC", + "CASTLE", + "MAIN", + "MOUNTAIN", + "TOWER", + "UNDERGROUND", + "DESERT", + "FIRE", + "FOREST", + "FREEZEFLAME", + "JAPAN", + "PUMPKIN", + "SEWER", + "SPACE", + "BOWSER", + "", + "", + "", + "", + "", + "", + "AUTUMN", + "CRYSTALCAVES", + "GHOST_HOUSE", + "GRAVEYARD", + "JUNGLE", + "TROPICAL", + "SKY_CITY", + "SNOW", + "STAR_HAVEN", + "SINGALONG", + "FACTORY", + "TANK", + "TRAIN", + "YOSHIHOUSE", + "FACTORYB", + "", + "", + "", + "", + "", + "CHALLENGE", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "YOSHI ISLAND MAP", + "GOLDWOOD MAP", + "SEWER MAP", + "FULLMAP FRONT", + "FULLMAP REAR", + "MINIMEGA MAP", + "FF VOLCANO MAP", + "CRYSTAL CAVE MAP", + "SPACE MAP", + "SKY CITY MAP", + "KOOPA PLANET MAP", + "KOOPA CORE MAP", + NULL +}; + + + // Offsets are from the start of the INFO block, not the start of the brsar. // INFO begins at 0x212C0, so that has to be subtracted from absolute offsets // within the brsar. @@ -72,8 +146,10 @@ extern "C" u8 after_course_getMusicForZone(u8 realThemeID) { // write the stream's info HijackedStream *stream = &hj->stream[hj->currentStream]; - sprintf(BrsarInfoOffset(stream->stringOffset), "stream/theme%03d.brstm", realThemeID); - sprintf(BrsarInfoOffset(stream->stringOffsetFast), "stream/theme%03d_fast.brstm", realThemeID); + OSReport("%d", realThemeID); + OSReport("%s", SongNameList[realThemeID-99]); + sprintf(BrsarInfoOffset(stream->stringOffset), "new/%s.er", SongNameList[realThemeID-100]); + sprintf(BrsarInfoOffset(stream->stringOffsetFast), "new/%s_F.er", SongNameList[realThemeID-100]); // update filesizes FixFilesize(stream->stringOffset); |