SHERLOCK: Use IS_3DO in more places

This commit is contained in:
Filippos Karapetis 2015-06-16 10:02:32 +03:00
parent 25e729efe0
commit 7e6539f400
12 changed files with 22 additions and 22 deletions

View file

@ -54,7 +54,7 @@ void Events::loadCursors(const Common::String &filename) {
hideCursor(); hideCursor();
delete _cursorImages; delete _cursorImages;
if (_vm->getPlatform() != Common::kPlatform3DO) { if (!IS_3DO) {
// PC // PC
_cursorImages = new ImageFile(filename); _cursorImages = new ImageFile(filename);
} else { } else {
@ -88,7 +88,7 @@ void Events::setCursor(CursorId cursorId) {
void Events::setCursor(const Graphics::Surface &src, int hotspotX, int hotspotY) { void Events::setCursor(const Graphics::Surface &src, int hotspotX, int hotspotY) {
_cursorId = INVALID_CURSOR; _cursorId = INVALID_CURSOR;
if (_vm->getPlatform() != Common::kPlatform3DO) { if (!IS_3DO) {
// PC 8-bit palettized // PC 8-bit palettized
CursorMan.replaceCursor(src.getPixels(), src.w, src.h, hotspotX, hotspotY, 0xff); CursorMan.replaceCursor(src.getPixels(), src.w, src.h, hotspotX, hotspotY, 0xff);
} else { } else {

View file

@ -107,7 +107,7 @@ void Inventory::loadGraphics() {
int invNum = findInv((*this)[idx]._name); int invNum = findInv((*this)[idx]._name);
Common::String filename = Common::String::format("item%02d.vgs", invNum + 1); Common::String filename = Common::String::format("item%02d.vgs", invNum + 1);
if (_vm->getPlatform() != Common::kPlatform3DO) { if (!IS_3DO) {
// PC // PC
_invShapes[idx - _invIndex] = new ImageFile(filename); _invShapes[idx - _invIndex] = new ImageFile(filename);
} else { } else {

View file

@ -352,7 +352,7 @@ bool Music::playMusic(const Common::String &name) {
debugC(kDebugLevelMusic, "Music: playMusic('%s')", name.c_str()); debugC(kDebugLevelMusic, "Music: playMusic('%s')", name.c_str());
if (_vm->getPlatform() != Common::kPlatform3DO) { if (!IS_3DO) {
// MIDI based // MIDI based
if (!_midiDriver) if (!_midiDriver)
return false; return false;
@ -450,7 +450,7 @@ bool Music::playMusic(const Common::String &name) {
void Music::stopMusic() { void Music::stopMusic() {
if (isPlaying()) { if (isPlaying()) {
if (_vm->getPlatform() != Common::kPlatform3DO) if (!IS_3DO)
_midiParser->stopPlaying(); _midiParser->stopPlaying();
else else
_mixer->stopHandle(_digitalMusicHandle); _mixer->stopHandle(_digitalMusicHandle);
@ -486,7 +486,7 @@ void Music::waitTimerRoland(uint time) {
} }
bool Music::isPlaying() { bool Music::isPlaying() {
if (_vm->getPlatform() != Common::kPlatform3DO) { if (!IS_3DO) {
// MIDI based // MIDI based
return _midiParser->isPlaying(); return _midiParser->isPlaying();
} else { } else {
@ -497,7 +497,7 @@ bool Music::isPlaying() {
// Returns the current music position in milliseconds // Returns the current music position in milliseconds
uint32 Music::getCurrentPosition() { uint32 Music::getCurrentPosition() {
if (_vm->getPlatform() != Common::kPlatform3DO) { if (!IS_3DO) {
// MIDI based // MIDI based
return (_midiParser->getTick() * 1000) / 60; // translate tick to millisecond return (_midiParser->getTick() * 1000) / 60; // translate tick to millisecond
} else { } else {

View file

@ -89,7 +89,7 @@ Resources::Resources(SherlockEngine *vm) : _vm(vm), _cache(vm) {
_resourceIndex = -1; _resourceIndex = -1;
if (_vm->_interactiveFl) { if (_vm->_interactiveFl) {
if (_vm->getPlatform() != Common::kPlatform3DO) { if (!IS_3DO) {
addToCache("vgs.lib"); addToCache("vgs.lib");
addToCache("talk.lib"); addToCache("talk.lib");
addToCache("journal.txt"); addToCache("journal.txt");
@ -226,7 +226,7 @@ void Resources::loadLibraryIndex(const Common::String &libFilename,
stream->seek(4); stream->seek(4);
int count = 0; int count = 0;
if (_vm->getPlatform() != Common::kPlatform3DO) { if (!IS_3DO) {
// PC // PC
count = stream->readUint16LE(); count = stream->readUint16LE();

View file

@ -240,7 +240,7 @@ void SaveManager::createThumbnail() {
_saveThumb = new Graphics::Surface(); _saveThumb = new Graphics::Surface();
if (_vm->getPlatform() != Common::kPlatform3DO) { if (!IS_3DO) {
uint8 thumbPalette[PALETTE_SIZE]; uint8 thumbPalette[PALETTE_SIZE];
_vm->_screen->getPalette(thumbPalette); _vm->_screen->getPalette(thumbPalette);
::createThumbnail(_saveThumb, (const byte *)_vm->_screen->getPixels(), SHERLOCK_SCREEN_WIDTH, SHERLOCK_SCREEN_HEIGHT, thumbPalette); ::createThumbnail(_saveThumb, (const byte *)_vm->_screen->getPixels(), SHERLOCK_SCREEN_WIDTH, SHERLOCK_SCREEN_HEIGHT, thumbPalette);

View file

@ -142,7 +142,7 @@ int ScalpelMap::show() {
// Load the entire map // Load the entire map
ImageFile *bigMap = NULL; ImageFile *bigMap = NULL;
if (_vm->getPlatform() != Common::kPlatform3DO) { if (!IS_3DO) {
// PC // PC
bigMap = new ImageFile("bigmap.vgs"); bigMap = new ImageFile("bigmap.vgs");
screen.setPalette(bigMap->_palette); screen.setPalette(bigMap->_palette);
@ -154,7 +154,7 @@ int ScalpelMap::show() {
// Load need sprites // Load need sprites
setupSprites(); setupSprites();
if (_vm->getPlatform() != Common::kPlatform3DO) { if (!IS_3DO) {
screen._backBuffer1.blitFrom((*bigMap)[0], Common::Point(-_bigPos.x, -_bigPos.y)); screen._backBuffer1.blitFrom((*bigMap)[0], Common::Point(-_bigPos.x, -_bigPos.y));
screen._backBuffer1.blitFrom((*bigMap)[1], Common::Point(-_bigPos.x, SHERLOCK_SCREEN_HEIGHT - _bigPos.y)); screen._backBuffer1.blitFrom((*bigMap)[1], Common::Point(-_bigPos.x, SHERLOCK_SCREEN_HEIGHT - _bigPos.y));
screen._backBuffer1.blitFrom((*bigMap)[2], Common::Point(SHERLOCK_SCREEN_WIDTH - _bigPos.x, -_bigPos.y)); screen._backBuffer1.blitFrom((*bigMap)[2], Common::Point(SHERLOCK_SCREEN_WIDTH - _bigPos.x, -_bigPos.y));
@ -220,7 +220,7 @@ int ScalpelMap::show() {
// Map has scrolled, so redraw new map view // Map has scrolled, so redraw new map view
changed = false; changed = false;
if (_vm->getPlatform() != Common::kPlatform3DO) { if (!IS_3DO) {
screen._backBuffer1.blitFrom((*bigMap)[0], Common::Point(-_bigPos.x, -_bigPos.y)); screen._backBuffer1.blitFrom((*bigMap)[0], Common::Point(-_bigPos.x, -_bigPos.y));
screen._backBuffer1.blitFrom((*bigMap)[1], Common::Point(-_bigPos.x, SHERLOCK_SCREEN_HEIGHT - _bigPos.y)); screen._backBuffer1.blitFrom((*bigMap)[1], Common::Point(-_bigPos.x, SHERLOCK_SCREEN_HEIGHT - _bigPos.y));
screen._backBuffer1.blitFrom((*bigMap)[2], Common::Point(SHERLOCK_SCREEN_WIDTH - _bigPos.x, -_bigPos.y)); screen._backBuffer1.blitFrom((*bigMap)[2], Common::Point(SHERLOCK_SCREEN_WIDTH - _bigPos.x, -_bigPos.y));
@ -300,7 +300,7 @@ void ScalpelMap::setupSprites() {
Scene &scene = *_vm->_scene; Scene &scene = *_vm->_scene;
_savedPos.x = -1; _savedPos.x = -1;
if (_vm->getPlatform() != Common::kPlatform3DO) { if (!IS_3DO) {
// PC // PC
_mapCursors = new ImageFile("omouse.vgs"); _mapCursors = new ImageFile("omouse.vgs");
_shapes = new ImageFile("mapicon.vgs"); _shapes = new ImageFile("mapicon.vgs");

View file

@ -452,7 +452,7 @@ bool ScalpelPeople::loadWalk() {
if (_data[HOLMES]->_walkLoaded) { if (_data[HOLMES]->_walkLoaded) {
return false; return false;
} else { } else {
if (_vm->getPlatform() != Common::kPlatform3DO) { if (!IS_3DO) {
_data[HOLMES]->_images = new ImageFile("walk.vgs"); _data[HOLMES]->_images = new ImageFile("walk.vgs");
} else { } else {
// Load walk.anim on 3DO, which is a cel animation file // Load walk.anim on 3DO, which is a cel animation file

View file

@ -582,7 +582,7 @@ int ScalpelScene::startCAnim(int cAnimNum, int playRate) {
} }
// Now load the resource as an image // Now load the resource as an image
if (_vm->getPlatform() != Common::kPlatform3DO) { if (!IS_3DO) {
cObj._images = new ImageFile(fname); cObj._images = new ImageFile(fname);
} else { } else {
cObj._images = new ImageFile3DO(fname, kImageFile3DOType_RoomFormat); cObj._images = new ImageFile3DO(fname, kImageFile3DOType_RoomFormat);

View file

@ -543,7 +543,7 @@ void ScalpelTalk::talkWait(const byte *&str) {
} }
void ScalpelTalk::talk3DOMovieTrigger(int subIndex) { void ScalpelTalk::talk3DOMovieTrigger(int subIndex) {
if (_vm->getPlatform() != Common::kPlatform3DO) { if (!IS_3DO) {
// No 3DO? No movie! // No 3DO? No movie!
return; return;
} }

View file

@ -67,7 +67,7 @@ const char *const PRESS_KEY_TO_CONTINUE = "Press any Key to Continue.";
ScalpelUserInterface::ScalpelUserInterface(SherlockEngine *vm): UserInterface(vm) { ScalpelUserInterface::ScalpelUserInterface(SherlockEngine *vm): UserInterface(vm) {
if (_vm->_interactiveFl) { if (_vm->_interactiveFl) {
if (_vm->getPlatform() != Common::kPlatform3DO) { if (!IS_3DO) {
// PC // PC
_controls = new ImageFile("menu.all"); _controls = new ImageFile("menu.all");
_controlPanel = new ImageFile("controls.vgs"); _controlPanel = new ImageFile("controls.vgs");

View file

@ -337,7 +337,7 @@ bool Scene::loadScene(const Common::String &filename) {
// Load the room resource file for the scene // Load the room resource file for the scene
// //
if (_vm->getPlatform() != Common::kPlatform3DO) { if (!IS_3DO) {
// PC version // PC version
Common::String roomFilename = filename + ".rrm"; Common::String roomFilename = filename + ".rrm";
_roomFilename = roomFilename; _roomFilename = roomFilename;
@ -1262,7 +1262,7 @@ void Scene::transitionToScene() {
// Actually do the transition // Actually do the transition
if (screen._fadeStyle) { if (screen._fadeStyle) {
if (_vm->getPlatform() != Common::kPlatform3DO) { if (!IS_3DO) {
// do pixel-transition for PC // do pixel-transition for PC
screen.randomTransition(); screen.randomTransition();
} else { } else {

View file

@ -126,7 +126,7 @@ bool Sound::playSound(const Common::String &name, WaitType waitType, int priorit
Common::String filename = name; Common::String filename = name;
if (!filename.contains('.')) { if (!filename.contains('.')) {
if (_vm->getPlatform() != Common::kPlatform3DO) { if (!IS_3DO) {
if (IS_SERRATED_SCALPEL) { if (IS_SERRATED_SCALPEL) {
filename += ".SND"; filename += ".SND";
} else { } else {
@ -147,7 +147,7 @@ bool Sound::playSound(const Common::String &name, WaitType waitType, int priorit
Audio::AudioStream *audioStream; Audio::AudioStream *audioStream;
if (_vm->getPlatform() != Common::kPlatform3DO) { if (!IS_3DO) {
if (IS_SERRATED_SCALPEL) { if (IS_SERRATED_SCALPEL) {
stream->skip(2); stream->skip(2);
int size = stream->readUint32BE(); int size = stream->readUint32BE();