diff options
author | Johannes Schickel | 2010-10-13 03:57:44 +0000 |
---|---|---|
committer | Johannes Schickel | 2010-10-13 03:57:44 +0000 |
commit | 75e8452b6e6a2bf4fb2f588aa00b428a60d873b5 (patch) | |
tree | f29541d55309487a94bd1d38e8b53bb3dde9aec6 /sound/mods | |
parent | 48ee83b88957dab86bc763e9ef21a70179fa8679 (diff) | |
parent | e9f50882ea5b6beeefa994040be9d3bab6a1f107 (diff) | |
download | scummvm-rg350-75e8452b6e6a2bf4fb2f588aa00b428a60d873b5.tar.gz scummvm-rg350-75e8452b6e6a2bf4fb2f588aa00b428a60d873b5.tar.bz2 scummvm-rg350-75e8452b6e6a2bf4fb2f588aa00b428a60d873b5.zip |
OPENGL: Merged from trunk, from rev 52105 to 53396.
This includes an rather hacky attempt to merge all the recent gp2x backend
changes into the branch. I suppose the gp2x backend and probably all new
backends, i.e. gph, dingux etc., might not compile anymore.
Since I have no way of testing those it would be nice if porters could look
into getting those up to speed in this branch.
svn-id: r53399
Diffstat (limited to 'sound/mods')
-rw-r--r-- | sound/mods/tfmx.cpp | 38 |
1 files changed, 21 insertions, 17 deletions
diff --git a/sound/mods/tfmx.cpp b/sound/mods/tfmx.cpp index ad468033c5..b65a998e82 100644 --- a/sound/mods/tfmx.cpp +++ b/sound/mods/tfmx.cpp @@ -36,17 +36,22 @@ // couple debug-functions namespace { - void displayPatternstep(const void *const vptr); - void displayMacroStep(const void *const vptr); - const uint16 noteIntervalls[64] = { +#if 0 +void displayPatternstep(const void * const vptr); +void displayMacroStep(const void * const vptr); +#endif + +static const uint16 noteIntervalls[64] = { 1710, 1614, 1524, 1438, 1357, 1281, 1209, 1141, 1077, 1017, 960, 908, 856, 810, 764, 720, 680, 642, 606, 571, 539, 509, 480, 454, 428, 404, 381, 360, 340, 320, 303, 286, 270, 254, 240, 227, 214, 202, 191, 180, 170, 160, 151, 143, 135, 127, 120, 113, 214, 202, 191, 180, 170, 160, 151, 143, 135, 127, 120, 113, - 214, 202, 191, 180 }; -} + 214, 202, 191, 180 +}; + +} // End of anonymous namespace namespace Audio { @@ -101,7 +106,7 @@ void Tfmx::interrupt() { // externally queued macros if (channel.customMacro) { - const byte *const noteCmd = (const byte *)&channel.customMacro; + const byte * const noteCmd = (const byte *)&channel.customMacro; channel.sfxLocked = false; noteCommand(noteCmd[0], noteCmd[1], (noteCmd[2] & 0xF0) | (uint8)i, noteCmd[3]); channel.customMacro = 0; @@ -1096,10 +1101,11 @@ int Tfmx::doSfx(uint16 sfxIndex, bool unlockChannel) { } // End of namespace Audio // some debugging functions +#if 0 namespace { -#if !defined(NDEBUG) && 0 -void displayMacroStep(const void *const vptr) { - const char *tableMacros[] = { + +void displayMacroStep(const void * const vptr) { + static const char *tableMacros[] = { "DMAoff+Resetxx/xx/xx flag/addset/vol ", "DMAon (start sample at selected begin) ", "SetBegin xxxxxx sample-startadress", @@ -1144,15 +1150,15 @@ void displayMacroStep(const void *const vptr) { "SID stop xx.... flag (1=clear all)" }; - const byte *const macroData = (const byte *const)vptr; + const byte *const macroData = (const byte * const)vptr; if (macroData[0] < ARRAYSIZE(tableMacros)) debug("%s %02X%02X%02X", tableMacros[macroData[0]], macroData[1], macroData[2], macroData[3]); else debug("Unkown Macro #%02X %02X%02X%02X", macroData[0], macroData[1], macroData[2], macroData[3]); } -void displayPatternstep(const void *const vptr) { - const char *tablePatterns[] = { +void displayPatternstep(const void * const vptr) { + static const char *tablePatterns[] = { "End --Next track step--", "Loop[count / step.w]", "Cont[patternno./ step.w]", @@ -1171,7 +1177,7 @@ void displayPatternstep(const void *const vptr) { "NOP!-no operation-------" }; - const byte *const patData = (const byte *const)vptr; + const byte * const patData = (const byte * const)vptr; const byte command = patData[0]; if (command < 0xF0) { // Playnote const byte flags = command >> 6; // 0-1 means note+detune, 2 means wait, 3 means portamento? @@ -1180,10 +1186,8 @@ void displayPatternstep(const void *const vptr) { } else debug("%s %02X%02X%02X",tablePatterns[command & 0xF], patData[1], patData[2], patData[3]); } -#else -void displayMacroStep(const void *const vptr, int chan, int index) {} -void displayPatternstep(const void *const vptr) {} + +} // End of anonymous namespace #endif -} // End of namespace #endif // #if defined(SOUND_MODS_TFMX_H) |