mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-08 20:07:11 +00:00
GROOVIE: some cleanup
This commit is contained in:
parent
7e53331044
commit
c7e4c851f6
@ -345,10 +345,10 @@ void Cursor_v2::decodeFrame(byte *pal, byte *data, byte *dest) {
|
||||
|
||||
// Decode pixel
|
||||
if (alpha) {
|
||||
*ptr = alpha;
|
||||
*(ptr + 1) = r;
|
||||
*(ptr + 2) = g;
|
||||
*(ptr + 3) = b;
|
||||
ptr[0] = alpha;
|
||||
ptr[1] = r;
|
||||
ptr[2] = g;
|
||||
ptr[3] = b;
|
||||
}
|
||||
ptr += 4;
|
||||
}
|
||||
@ -359,7 +359,7 @@ void Cursor_v2::decodeFrame(byte *pal, byte *data, byte *dest) {
|
||||
ptr = tmp;
|
||||
for (int y = 0; y < _height; y++) {
|
||||
for (int x = 0; x < _width; x++) {
|
||||
*(uint32 *)dest = _format.ARGBToColor(*ptr, *(ptr + 1), *(ptr + 2), *(ptr + 3));
|
||||
*(uint32 *)dest = _format.ARGBToColor(ptr[0], ptr[1], ptr[2], ptr[3]);
|
||||
dest += 4;
|
||||
ptr += 4;
|
||||
}
|
||||
|
@ -42,6 +42,7 @@ static const DebugChannelDef debugFlagList[] = {
|
||||
{Groovie::kDebugScriptvars, "Scriptvars", "Print out any change to script variables"},
|
||||
{Groovie::kDebugCell, "Cell", "Debug the cell game (in the microscope)"},
|
||||
{Groovie::kDebugFast, "Fast", "Play videos quickly, with no sound (unstable)"},
|
||||
{Groovie::kDebugTlcGame, "TLCGame", "Debug the questionnaires in TLC"},
|
||||
DEBUG_CHANNEL_END
|
||||
};
|
||||
|
||||
|
@ -170,30 +170,29 @@ Common::Error GroovieEngine::run() {
|
||||
|
||||
switch (_gameDescription->version) {
|
||||
case kGroovieT7G:
|
||||
// Detect ScummVM Music Enhancement Project presence (T7G only)
|
||||
if (Common::File::exists("gu16.ogg")) {
|
||||
// Load player for external files
|
||||
_musicPlayer = new MusicPlayerIOS(this);
|
||||
break;
|
||||
}
|
||||
case kGroovieT11H:
|
||||
case kGroovieCDY:
|
||||
case kGroovieUHP:
|
||||
// Detect ScummVM Music Enhancement Project presence (T7G only)
|
||||
if (Common::File::exists("gu16.ogg") && _gameDescription->version == kGroovieT7G) {
|
||||
// Load player for external files
|
||||
// Create the music player
|
||||
switch (getPlatform()) {
|
||||
case Common::kPlatformMacintosh:
|
||||
if (_gameDescription->version == kGroovieT7G)
|
||||
_musicPlayer = new MusicPlayerMac_t7g(this);
|
||||
else
|
||||
_musicPlayer = new MusicPlayerMac_v2(this);
|
||||
break;
|
||||
case Common::kPlatformIOS:
|
||||
_musicPlayer = new MusicPlayerIOS(this);
|
||||
}
|
||||
else {
|
||||
// Create the music player
|
||||
switch (getPlatform()) {
|
||||
case Common::kPlatformMacintosh:
|
||||
if (_gameDescription->version == kGroovieT7G)
|
||||
_musicPlayer = new MusicPlayerMac_t7g(this);
|
||||
else
|
||||
_musicPlayer = new MusicPlayerMac_v2(this);
|
||||
break;
|
||||
case Common::kPlatformIOS:
|
||||
_musicPlayer = new MusicPlayerIOS(this);
|
||||
break;
|
||||
default:
|
||||
_musicPlayer = new MusicPlayerXMI(this, _gameDescription->version == kGroovieT7G ? "fat" : "sample");
|
||||
break;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
_musicPlayer = new MusicPlayerXMI(this, _gameDescription->version == kGroovieT7G ? "fat" : "sample");
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
@ -202,7 +201,6 @@ Common::Error GroovieEngine::run() {
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
// Load volume levels
|
||||
syncSoundSettings();
|
||||
|
||||
|
@ -790,7 +790,7 @@ bool MusicPlayerTlc::load(uint32 fileref, bool loop) {
|
||||
|
||||
Audio::AudioStream *audStream = seekStream;
|
||||
|
||||
// Loop if requested
|
||||
// TODO: Loop if requested
|
||||
if (loop || 1)
|
||||
audStream = Audio::makeLoopingAudioStream(seekStream, 0);
|
||||
|
||||
|
@ -333,12 +333,12 @@ bool ROQPlayer::playFrameInternal() {
|
||||
waitFrame();
|
||||
|
||||
if (_dirty) {
|
||||
// Update the screen
|
||||
// TODO: Update the screen
|
||||
void *src = (_alpha && 0) ? _bg->getPixels() : _screen->getPixels();
|
||||
_syst->copyRectToScreen(src, _screen->pitch, 0, (_syst->getHeight() - _screen->h) / 2, _screen->w, _screen->h);
|
||||
_syst->updateScreen();
|
||||
|
||||
// For overlay videos, set the background buffer when the video ends
|
||||
// TODO: For overlay videos, set the background buffer when the video ends
|
||||
if (_alpha && (!_flagTwo || _file->eos())) {
|
||||
//_bg->copyFrom(*_fg);
|
||||
}
|
||||
@ -496,7 +496,7 @@ bool ROQPlayer::processBlockInfo(ROQBlockHeader &blockHeader) {
|
||||
else if (_screen->h == 480 && height != 480)
|
||||
_vm->_graphicsMan->switchToFullScreen(false);
|
||||
|
||||
// Clear the buffers with black
|
||||
// TODO: Clear the buffers with black
|
||||
if (!_alpha && 0) {
|
||||
_currBuf->fillRect(Common::Rect(width, height), _vm->_pixelFormat.RGBToColor(0, 0, 0));
|
||||
_prevBuf->fillRect(Common::Rect(width, height), _vm->_pixelFormat.RGBToColor(0, 0, 0));
|
||||
|
@ -1871,7 +1871,7 @@ void Script::o2_midicontrol() {
|
||||
break;
|
||||
|
||||
case 3:
|
||||
// Set Volume? Or is it some kind of fade in / out
|
||||
// TODO: Set Volume? Or is it some kind of fade in / out
|
||||
debugC(1, kDebugScript, "Groovie::Script: MIDI %d: Set volume/time: %d", arg1, arg2);
|
||||
//_vm->_musicPlayer->setUserVolume(arg2);
|
||||
break;
|
||||
|
@ -43,11 +43,11 @@ public:
|
||||
void setVariables(byte *scriptVariables);
|
||||
|
||||
void opGallery();
|
||||
byte opGallerySub(int one, byte *field);
|
||||
|
||||
private:
|
||||
Common::RandomSource _random;
|
||||
|
||||
byte opGallerySub(int one, byte *field);
|
||||
void inline setScriptVar(uint16 var, byte value);
|
||||
void inline setScriptVar16(uint16 var, uint16 value);
|
||||
uint16 inline getScriptVar16(uint16 var);
|
||||
|
Loading…
x
Reference in New Issue
Block a user