diff options
author | Travis Howell | 2006-10-19 05:37:22 +0000 |
---|---|---|
committer | Travis Howell | 2006-10-19 05:37:22 +0000 |
commit | 8c72861de463e0db36b234750fb19904e5f04d3b (patch) | |
tree | 9b8139009ee2510033fc3392f2daab1d8b737e35 /sound/mods/module.cpp | |
parent | ed3c6871f967ab15321df14ca6a026e08d96fae1 (diff) | |
download | scummvm-rg350-8c72861de463e0db36b234750fb19904e5f04d3b.tar.gz scummvm-rg350-8c72861de463e0db36b234750fb19904e5f04d3b.tar.bz2 scummvm-rg350-8c72861de463e0db36b234750fb19904e5f04d3b.zip |
Add option to load a module via stream
svn-id: r24387
Diffstat (limited to 'sound/mods/module.cpp')
-rw-r--r-- | sound/mods/module.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sound/mods/module.cpp b/sound/mods/module.cpp index f7f343fde5..4c20c3a741 100644 --- a/sound/mods/module.cpp +++ b/sound/mods/module.cpp @@ -46,6 +46,14 @@ bool Module::load(const char *fn) { Common::MemoryReadStream st(buf, bufsz); + bool result = loadStream(st); + + delete[] buf; + + return result; +} + +bool Module::loadStream(Common::SeekableReadStream &st) { st.read(songname, 20); songname[0] = '\0'; @@ -155,8 +163,6 @@ bool Module::load(const char *fn) { assert(st.eos()); - delete[] buf; - return true; } |