svn-id: r8494
This commit is contained in:
Max Horn 2003-06-15 01:00:43 +00:00
parent f1fc68773d
commit acec45a483
5 changed files with 25 additions and 11 deletions

View file

@ -21,11 +21,12 @@
#include "stdafx.h" #include "stdafx.h"
#include "dialogs.h" #include "dialogs.h"
#include "sound.h" #include "sound.h"
#include "sound/mididrv.h"
#include "scumm.h" #include "scumm.h"
#include "imuse.h" #include "imuse.h"
#include "player_v2.h" #include "player_v2.h"
#include "verbs.h" #include "verbs.h"
#include "sound/mididrv.h"
#include "sound/mixer.h"
#ifndef DISABLE_HELP #ifndef DISABLE_HELP
#include "help.h" #include "help.h"

View file

@ -90,7 +90,7 @@ static void imus_digital_handler(void *engine) {
} }
IMuseDigital::IMuseDigital(Scumm *scumm) { IMuseDigital::IMuseDigital(Scumm *scumm) {
memset(_channel, 0, sizeof(channel) * MAX_DIGITAL_CHANNELS); memset(_channel, 0, sizeof(Channel) * MAX_DIGITAL_CHANNELS);
_scumm = scumm; _scumm = scumm;
for (int32 l = 0; l < MAX_DIGITAL_CHANNELS; l++) { for (int32 l = 0; l < MAX_DIGITAL_CHANNELS; l++) {
_channel[l]._initialized = false; _channel[l]._initialized = false;

View file

@ -32,19 +32,19 @@ class Scumm;
class IMuseDigital { class IMuseDigital {
private: private:
struct region { struct Region {
uint32 _offset; // begin of region uint32 _offset; // begin of region
uint32 _length; // lenght of region uint32 _length; // length of region
}; };
struct jump { struct Jump {
uint32 _offset; // jump position uint32 _offset; // jump position
uint32 _dest; // jump to uint32 _dest; // jump to
uint32 _id; // id of jump uint32 _id; // id of jump
uint32 _numLoops; // allmost 500 except one value: 2 uint32 _numLoops; // allmost 500 except one value: 2
}; };
struct channel { struct Channel {
int8 _volumeRight; int8 _volumeRight;
int8 _volume; int8 _volume;
int8 _volumeFade; int8 _volumeFade;
@ -54,9 +54,9 @@ private:
bool _isJump; bool _isJump;
uint32 _numLoops; uint32 _numLoops;
uint32 _offsetStop; uint32 _offsetStop;
jump _jump[MAX_IMUSE_JUMPS]; Jump _jump[MAX_IMUSE_JUMPS];
uint32 _numJumps; uint32 _numJumps;
region _region[MAX_IMUSE_REGIONS]; Region _region[MAX_IMUSE_REGIONS];
uint32 _numRegions; uint32 _numRegions;
uint32 _offset; uint32 _offset;
byte *_data; byte *_data;
@ -70,7 +70,9 @@ private:
bool _used; bool _used;
bool _toBeRemoved; bool _toBeRemoved;
bool _initialized; bool _initialized;
} _channel[MAX_DIGITAL_CHANNELS]; };
Channel _channel[MAX_DIGITAL_CHANNELS];
Scumm *_scumm; Scumm *_scumm;
bool _pause; bool _pause;

View file

@ -22,6 +22,7 @@
#include "common/engine.h" #include "common/engine.h"
#include "player_v2.h" #include "player_v2.h"
#include "scumm.h" #include "scumm.h"
#include "sound/mixer.h"
#define FREQ_HZ 236 // Don't change! #define FREQ_HZ 236 // Don't change!

View file

@ -24,8 +24,10 @@
#define PLAYER_V2_H #define PLAYER_V2_H
#include "common/scummsys.h" #include "common/scummsys.h"
#include "sound/mixer.h"
class Scumm; #if !defined(__GNUC__)
#pragma START_PACK_STRUCTS
#endif
struct channel_data { struct channel_data {
uint16 time_left; // 00 uint16 time_left; // 00
@ -52,12 +54,20 @@ struct channel_data {
uint16 music_script_nr; // 48 uint16 music_script_nr; // 48
} GCC_PACK; } GCC_PACK;
#if !defined(__GNUC__)
#pragma END_PACK_STRUCTS
#endif
union ChannelInfo { union ChannelInfo {
channel_data d; channel_data d;
uint16 array[sizeof(channel_data)/2]; uint16 array[sizeof(channel_data)/2];
}; };
class Scumm;
class SoundMixer;
class Player_V2 { class Player_V2 {
public: public: