SHERLOCK: Use IS_3DO in more places
This commit is contained in:
parent
25e729efe0
commit
7e6539f400
12 changed files with 22 additions and 22 deletions
|
@ -54,7 +54,7 @@ void Events::loadCursors(const Common::String &filename) {
|
|||
hideCursor();
|
||||
delete _cursorImages;
|
||||
|
||||
if (_vm->getPlatform() != Common::kPlatform3DO) {
|
||||
if (!IS_3DO) {
|
||||
// PC
|
||||
_cursorImages = new ImageFile(filename);
|
||||
} else {
|
||||
|
@ -88,7 +88,7 @@ void Events::setCursor(CursorId cursorId) {
|
|||
|
||||
void Events::setCursor(const Graphics::Surface &src, int hotspotX, int hotspotY) {
|
||||
_cursorId = INVALID_CURSOR;
|
||||
if (_vm->getPlatform() != Common::kPlatform3DO) {
|
||||
if (!IS_3DO) {
|
||||
// PC 8-bit palettized
|
||||
CursorMan.replaceCursor(src.getPixels(), src.w, src.h, hotspotX, hotspotY, 0xff);
|
||||
} else {
|
||||
|
|
|
@ -107,7 +107,7 @@ void Inventory::loadGraphics() {
|
|||
int invNum = findInv((*this)[idx]._name);
|
||||
Common::String filename = Common::String::format("item%02d.vgs", invNum + 1);
|
||||
|
||||
if (_vm->getPlatform() != Common::kPlatform3DO) {
|
||||
if (!IS_3DO) {
|
||||
// PC
|
||||
_invShapes[idx - _invIndex] = new ImageFile(filename);
|
||||
} else {
|
||||
|
|
|
@ -352,7 +352,7 @@ bool Music::playMusic(const Common::String &name) {
|
|||
|
||||
debugC(kDebugLevelMusic, "Music: playMusic('%s')", name.c_str());
|
||||
|
||||
if (_vm->getPlatform() != Common::kPlatform3DO) {
|
||||
if (!IS_3DO) {
|
||||
// MIDI based
|
||||
if (!_midiDriver)
|
||||
return false;
|
||||
|
@ -450,7 +450,7 @@ bool Music::playMusic(const Common::String &name) {
|
|||
|
||||
void Music::stopMusic() {
|
||||
if (isPlaying()) {
|
||||
if (_vm->getPlatform() != Common::kPlatform3DO)
|
||||
if (!IS_3DO)
|
||||
_midiParser->stopPlaying();
|
||||
else
|
||||
_mixer->stopHandle(_digitalMusicHandle);
|
||||
|
@ -486,7 +486,7 @@ void Music::waitTimerRoland(uint time) {
|
|||
}
|
||||
|
||||
bool Music::isPlaying() {
|
||||
if (_vm->getPlatform() != Common::kPlatform3DO) {
|
||||
if (!IS_3DO) {
|
||||
// MIDI based
|
||||
return _midiParser->isPlaying();
|
||||
} else {
|
||||
|
@ -497,7 +497,7 @@ bool Music::isPlaying() {
|
|||
|
||||
// Returns the current music position in milliseconds
|
||||
uint32 Music::getCurrentPosition() {
|
||||
if (_vm->getPlatform() != Common::kPlatform3DO) {
|
||||
if (!IS_3DO) {
|
||||
// MIDI based
|
||||
return (_midiParser->getTick() * 1000) / 60; // translate tick to millisecond
|
||||
} else {
|
||||
|
|
|
@ -89,7 +89,7 @@ Resources::Resources(SherlockEngine *vm) : _vm(vm), _cache(vm) {
|
|||
_resourceIndex = -1;
|
||||
|
||||
if (_vm->_interactiveFl) {
|
||||
if (_vm->getPlatform() != Common::kPlatform3DO) {
|
||||
if (!IS_3DO) {
|
||||
addToCache("vgs.lib");
|
||||
addToCache("talk.lib");
|
||||
addToCache("journal.txt");
|
||||
|
@ -226,7 +226,7 @@ void Resources::loadLibraryIndex(const Common::String &libFilename,
|
|||
stream->seek(4);
|
||||
int count = 0;
|
||||
|
||||
if (_vm->getPlatform() != Common::kPlatform3DO) {
|
||||
if (!IS_3DO) {
|
||||
// PC
|
||||
count = stream->readUint16LE();
|
||||
|
||||
|
|
|
@ -240,7 +240,7 @@ void SaveManager::createThumbnail() {
|
|||
|
||||
_saveThumb = new Graphics::Surface();
|
||||
|
||||
if (_vm->getPlatform() != Common::kPlatform3DO) {
|
||||
if (!IS_3DO) {
|
||||
uint8 thumbPalette[PALETTE_SIZE];
|
||||
_vm->_screen->getPalette(thumbPalette);
|
||||
::createThumbnail(_saveThumb, (const byte *)_vm->_screen->getPixels(), SHERLOCK_SCREEN_WIDTH, SHERLOCK_SCREEN_HEIGHT, thumbPalette);
|
||||
|
|
|
@ -142,7 +142,7 @@ int ScalpelMap::show() {
|
|||
|
||||
// Load the entire map
|
||||
ImageFile *bigMap = NULL;
|
||||
if (_vm->getPlatform() != Common::kPlatform3DO) {
|
||||
if (!IS_3DO) {
|
||||
// PC
|
||||
bigMap = new ImageFile("bigmap.vgs");
|
||||
screen.setPalette(bigMap->_palette);
|
||||
|
@ -154,7 +154,7 @@ int ScalpelMap::show() {
|
|||
// Load need sprites
|
||||
setupSprites();
|
||||
|
||||
if (_vm->getPlatform() != Common::kPlatform3DO) {
|
||||
if (!IS_3DO) {
|
||||
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)[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
|
||||
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)[1], Common::Point(-_bigPos.x, SHERLOCK_SCREEN_HEIGHT - _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;
|
||||
_savedPos.x = -1;
|
||||
|
||||
if (_vm->getPlatform() != Common::kPlatform3DO) {
|
||||
if (!IS_3DO) {
|
||||
// PC
|
||||
_mapCursors = new ImageFile("omouse.vgs");
|
||||
_shapes = new ImageFile("mapicon.vgs");
|
||||
|
|
|
@ -452,7 +452,7 @@ bool ScalpelPeople::loadWalk() {
|
|||
if (_data[HOLMES]->_walkLoaded) {
|
||||
return false;
|
||||
} else {
|
||||
if (_vm->getPlatform() != Common::kPlatform3DO) {
|
||||
if (!IS_3DO) {
|
||||
_data[HOLMES]->_images = new ImageFile("walk.vgs");
|
||||
} else {
|
||||
// Load walk.anim on 3DO, which is a cel animation file
|
||||
|
|
|
@ -582,7 +582,7 @@ int ScalpelScene::startCAnim(int cAnimNum, int playRate) {
|
|||
}
|
||||
|
||||
// Now load the resource as an image
|
||||
if (_vm->getPlatform() != Common::kPlatform3DO) {
|
||||
if (!IS_3DO) {
|
||||
cObj._images = new ImageFile(fname);
|
||||
} else {
|
||||
cObj._images = new ImageFile3DO(fname, kImageFile3DOType_RoomFormat);
|
||||
|
|
|
@ -543,7 +543,7 @@ void ScalpelTalk::talkWait(const byte *&str) {
|
|||
}
|
||||
|
||||
void ScalpelTalk::talk3DOMovieTrigger(int subIndex) {
|
||||
if (_vm->getPlatform() != Common::kPlatform3DO) {
|
||||
if (!IS_3DO) {
|
||||
// No 3DO? No movie!
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -67,7 +67,7 @@ const char *const PRESS_KEY_TO_CONTINUE = "Press any Key to Continue.";
|
|||
|
||||
ScalpelUserInterface::ScalpelUserInterface(SherlockEngine *vm): UserInterface(vm) {
|
||||
if (_vm->_interactiveFl) {
|
||||
if (_vm->getPlatform() != Common::kPlatform3DO) {
|
||||
if (!IS_3DO) {
|
||||
// PC
|
||||
_controls = new ImageFile("menu.all");
|
||||
_controlPanel = new ImageFile("controls.vgs");
|
||||
|
|
|
@ -337,7 +337,7 @@ bool Scene::loadScene(const Common::String &filename) {
|
|||
// Load the room resource file for the scene
|
||||
//
|
||||
|
||||
if (_vm->getPlatform() != Common::kPlatform3DO) {
|
||||
if (!IS_3DO) {
|
||||
// PC version
|
||||
Common::String roomFilename = filename + ".rrm";
|
||||
_roomFilename = roomFilename;
|
||||
|
@ -1262,7 +1262,7 @@ void Scene::transitionToScene() {
|
|||
|
||||
// Actually do the transition
|
||||
if (screen._fadeStyle) {
|
||||
if (_vm->getPlatform() != Common::kPlatform3DO) {
|
||||
if (!IS_3DO) {
|
||||
// do pixel-transition for PC
|
||||
screen.randomTransition();
|
||||
} else {
|
||||
|
|
|
@ -126,7 +126,7 @@ bool Sound::playSound(const Common::String &name, WaitType waitType, int priorit
|
|||
|
||||
Common::String filename = name;
|
||||
if (!filename.contains('.')) {
|
||||
if (_vm->getPlatform() != Common::kPlatform3DO) {
|
||||
if (!IS_3DO) {
|
||||
if (IS_SERRATED_SCALPEL) {
|
||||
filename += ".SND";
|
||||
} else {
|
||||
|
@ -147,7 +147,7 @@ bool Sound::playSound(const Common::String &name, WaitType waitType, int priorit
|
|||
|
||||
Audio::AudioStream *audioStream;
|
||||
|
||||
if (_vm->getPlatform() != Common::kPlatform3DO) {
|
||||
if (!IS_3DO) {
|
||||
if (IS_SERRATED_SCALPEL) {
|
||||
stream->skip(2);
|
||||
int size = stream->readUint32BE();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue