mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-16 14:50:17 +00:00
TONY: Some bugfixes and cleanup for the music support code
This commit is contained in:
parent
d2061f29be
commit
aa775b4497
@ -26,7 +26,6 @@
|
||||
namespace Tony {
|
||||
|
||||
Globals::Globals() {
|
||||
Common::fill(_nextMusic, _nextMusic + MAX_PATH, 0);
|
||||
_nextLoop = false;
|
||||
_nextChannel = 0;
|
||||
_nextSync = 0;
|
||||
|
@ -43,8 +43,6 @@ namespace Tony {
|
||||
#define TAPPETI_MARE 6
|
||||
#define TAPPETI_MAREMETA 7
|
||||
|
||||
#define MAX_PATH 255
|
||||
|
||||
struct CharacterStruct {
|
||||
uint32 _code;
|
||||
RMItem *_item;
|
||||
@ -168,7 +166,7 @@ class Globals {
|
||||
public:
|
||||
Globals();
|
||||
|
||||
char _nextMusic[MAX_PATH];
|
||||
Common::String _nextMusic;
|
||||
bool _nextLoop;
|
||||
int _nextChannel;
|
||||
int _nextSync;
|
||||
|
@ -1053,7 +1053,8 @@ void FPStream::prefetch() {
|
||||
return;
|
||||
}
|
||||
#else
|
||||
error("lpBuf isn't set");
|
||||
// Return, since lpBuf hasn't been set
|
||||
return;
|
||||
#endif
|
||||
|
||||
// Uncompress the data from the stream directly into the locked buffer
|
||||
|
@ -208,12 +208,14 @@ void TonyEngine::playMusic(int nChannel, const Common::String &fname, int nFX, b
|
||||
GLOBALS._curChannel = nChannel;
|
||||
GLOBALS._nextLoop = bLoop;
|
||||
GLOBALS._nextSync = nSync;
|
||||
GLOBALS._nextMusic = fname;
|
||||
|
||||
if (GLOBALS._flipflop)
|
||||
GLOBALS._nextChannel = nChannel - 1;
|
||||
else
|
||||
GLOBALS._nextChannel = nChannel + 1;
|
||||
|
||||
uint32 hThread = CoroScheduler.createProcess(doNextMusic, &_stream, sizeof(FPStream ***));
|
||||
uint32 hThread = CoroScheduler.createProcess(doNextMusic, NULL, 0);
|
||||
assert(hThread != CORO_INVALID_PID_VALUE);
|
||||
|
||||
} else if (nFX == 44) { // Cambia canale e lascia finire il primo
|
||||
@ -254,7 +256,7 @@ void TonyEngine::doNextMusic(CORO_PARAM, const void *param) {
|
||||
Common::String fn;
|
||||
CORO_END_CONTEXT(_ctx);
|
||||
|
||||
FPStream **streams = *(FPStream ***)param;
|
||||
FPStream **streams = _vm->_stream;
|
||||
|
||||
CORO_BEGIN_CODE(_ctx);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user