Ticket #8865: rtz_saturn_8-4-08.diff
File rtz_saturn_8-4-08.diff, 22.5 KB (added by , 16 years ago) |
---|
-
common/util.cpp
288 288 {"macintosh", "mac", "mac", "Macintosh", kPlatformMacintosh}, 289 289 {"pce", "pce", "pce", "PC-Engine", kPlatformPCEngine }, 290 290 {"nes", "nes", "nes", "NES", kPlatformNES}, 291 {"saturn", "saturn", "saturn", "Sega Saturn", kPlatformSaturn}, 291 292 {"segacd", "segacd", "sega", "SegaCD", kPlatformSegaCD}, 292 293 {"windows", "win", "win", "Windows", kPlatformWindows}, 293 294 -
common/util.h
207 207 kPlatformSegaCD, 208 208 kPlatform3DO, 209 209 kPlatformPCEngine, 210 211 210 kPlatformApple2GS, 212 211 kPlatformPC98, 212 kPlatformSaturn, 213 213 214 214 kPlatformUnknown = -1 215 215 }; -
engines/made/cpkplayer.cpp
1 /* ScummVM - Graphic Adventure Engine 2 * 3 * ScummVM is the legal property of its developers, whose names 4 * are too numerous to list here. Please refer to the COPYRIGHT 5 * file distributed with this source distribution. 6 * 7 * This program is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU General Public License 9 * as published by the Free Software Foundation; either version 2 10 * of the License, or (at your option) any later version. 11 12 * This program is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 17 * You should have received a copy of the GNU General Public License 18 * along with this program; if not, write to the Free Software 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 20 * 21 * $URL$ 22 * $Id$ 23 * 24 */ 25 26 #include "common/scummsys.h" 27 #include "common/endian.h" 28 29 #include "made/cpkplayer.h" 30 #include "made/screen.h" 31 32 #include "sound/adpcm.h" 33 34 namespace Made { 35 36 CpkPlayer::CpkPlayer(MadeEngine *vm, Audio::Mixer *mixer) : _fd(NULL), _vm(vm), _mixer(mixer) { 37 } 38 39 CpkPlayer::~CpkPlayer() { 40 } 41 42 struct SampleTableEntry { 43 uint32 offset; 44 uint32 length; 45 uint32 sampleInfo1; 46 uint32 sampleInfo2; 47 }; 48 49 void CpkPlayer::play(const char *filename) { 50 51 // Note: Most of this code is based off the document from http://wiki.multimedia.cx/index.php?title=Sega_FILM 52 53 _abort = false; 54 _surface = new Graphics::Surface(); 55 56 _fd = new Common::File(); 57 _fd->open(filename); 58 59 // FILM Chunk 60 assert(_fd->readUint32BE() == MKID_BE('FILM')); 61 uint32 filmHeaderLength = _fd->readUint32BE(); 62 uint32 filmVersion = _fd->readUint32BE(); 63 _fd->readUint32BE(); // Reserved??? 64 65 // FDSC Chunk 66 assert(_fd->readUint32BE() == MKID_BE('FDSC')); 67 uint32 fdscChunkSize = _fd->readUint32BE(); 68 uint32 videoCodec = _fd->readUint32BE(); 69 uint32 height = _fd->readUint32BE(); 70 uint32 width = _fd->readUint32BE(); 71 _fd->readByte(); // Unknown 72 byte audioChannels = _fd->readByte(); 73 byte audioSamplingBits = _fd->readByte(); 74 _fd->readByte(); // Unknown 75 uint16 audioFrequency = _fd->readUint16BE(); 76 77 // STAB Chunk 78 assert(_fd->readUint32BE() == MKID_BE('STAB')); 79 uint32 stabChunkSize = _fd->readUint32BE(); 80 uint32 frameRateBaseFreq = _fd->readUint32BE(); 81 uint32 sampleTableEntryCount = _fd->readUint32BE(); 82 SampleTableEntry *sampleTableEntries = new SampleTableEntry[sampleTableEntryCount]; 83 for (uint32 i = 0; i < sampleTableEntryCount; i++) { 84 sampleTableEntries[i].offset = _fd->readUint32BE(); 85 sampleTableEntries[i].length = _fd->readUint32BE(); 86 sampleTableEntries[i].sampleInfo1 = _fd->readUint32BE(); 87 sampleTableEntries[i].sampleInfo2 = _fd->readUint32BE(); 88 } 89 90 // Where's the actual frame rate? There is none! It's variable and can differ between frames. 91 92 _mixer->stopAll(); 93 94 byte audioFlags = 0; 95 if (audioChannels == 2) 96 audioFlags |= Audio::Mixer::FLAG_STEREO; 97 if (audioSamplingBits == 16) 98 audioFlags |= Audio::Mixer::FLAG_16BITS; 99 100 _audioStream = Audio::makeAppendableAudioStream(audioFrequency, audioFlags); 101 102 103 // Uh-oh.... is it 8bpp??? 104 _surface->create(width, height, 1); 105 106 for (uint32 i = 0; i < sampleTableEntryCount && !_abort && !_fd->eof(); i++) { 107 _fd->seek(sampleTableEntries[i].offset + filmHeaderLength); 108 109 // Audio Data 110 if (sampleTableEntries[i].sampleInfo1 == (uint32)~0) { 111 Common::SeekableSubReadStream *soundData = new Common::SeekableSubReadStream(_fd, 0, sampleTableEntries[i].length); 112 Audio::AudioStream *adpcmStream = Audio::makeADPCMStream(soundData, false, 0, Audio::kADPCMMS, audioFrequency, audioChannels, 0); 113 // TODO: L R L R L R L R 114 // The Sound data alternates left/right 115 } else { 116 // Video Data 117 // TODO: Cinepak for SEGA 118 } 119 120 handleEvents(); 121 updateScreen(); 122 } 123 124 _audioStream->finish(); 125 _mixer->stopHandle(_audioStreamHandle); 126 127 //delete _audioStream; 128 delete _fd; 129 delete _surface; 130 131 } 132 133 void CpkPlayer::handleEvents() { 134 Common::Event event; 135 while (_vm->_system->getEventManager()->pollEvent(event)) { 136 switch (event.type) { 137 case Common::EVENT_KEYDOWN: 138 if (event.kbd.keycode == Common::KEYCODE_ESCAPE) 139 _abort = true; 140 break; 141 case Common::EVENT_QUIT: 142 _vm->_quit = true; 143 _abort = true; 144 break; 145 default: 146 break; 147 } 148 } 149 } 150 151 void CpkPlayer::updateScreen() { 152 _vm->_system->copyRectToScreen((const byte*)_surface->pixels, _surface->pitch, 153 (320 - _surface->w) / 2, (200 - _surface->h) / 2, _surface->w, _surface->h); 154 _vm->_system->updateScreen(); 155 } 156 157 } -
engines/made/cpkplayer.h
Property changes on: engines\made\cpkplayer.cpp ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:keywords + Date Rev Author URL Id Name: svn:eol-style + native
1 /* ScummVM - Graphic Adventure Engine 2 * 3 * ScummVM is the legal property of its developers, whose names 4 * are too numerous to list here. Please refer to the COPYRIGHT 5 * file distributed with this source distribution. 6 * 7 * This program is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU General Public License 9 * as published by the Free Software Foundation; either version 2 10 * of the License, or (at your option) any later version. 11 12 * This program is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 17 * You should have received a copy of the GNU General Public License 18 * along with this program; if not, write to the Free Software 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 20 * 21 * $URL$ 22 * $Id$ 23 * 24 */ 25 26 #ifndef MADE_CPKPLAYER_H 27 #define MADE_CPKPLAYER_H 28 29 #include "common/system.h" 30 #include "common/events.h" 31 #include "common/file.h" 32 #include "common/endian.h" 33 #include "graphics/surface.h" 34 #include "sound/mixer.h" 35 #include "sound/audiostream.h" 36 37 #include "made/graphics.h" 38 #include "made/sound.h" 39 #include "made/made.h" 40 41 namespace Made { 42 43 class MadeEngine; 44 45 class CpkPlayer { 46 public: 47 CpkPlayer(MadeEngine *vm, Audio::Mixer *mixer); 48 ~CpkPlayer(); 49 void play(const char *filename); 50 protected: 51 MadeEngine *_vm; 52 Audio::Mixer *_mixer; 53 Common::File *_fd; 54 Audio::AppendableAudioStream *_audioStream; 55 Audio::SoundHandle _audioStreamHandle; 56 Graphics::Surface *_surface; 57 bool _abort; 58 void handleEvents(); 59 void updateScreen(); 60 }; 61 62 } 63 64 #endif -
engines/made/database.cpp
Property changes on: engines\made\cpkplayer.h ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:keywords + Date Rev Author URL Id Name: svn:eol-style + native
242 242 return _objData + 6; 243 243 } 244 244 245 int ObjectSegaSaturn::load(Common::SeekableReadStream &source) { 246 _freeData = true; 247 source.readUint16BE(); // skip flags 248 uint16 type = source.readUint16BE(); 249 if (type == 0x7FFF) { 250 _objSize = source.readUint16BE(); 251 } else if (type == 0x7FFE) { 252 _objSize = source.readUint16BE() * 2; 253 } else if (type < 0x7FFE) { 254 byte count1 = source.readByte(); 255 byte count2 = source.readByte(); 256 _objSize = (count1 + count2) * 2; 257 } 258 source.seek(-6, SEEK_CUR); 259 _objSize += 6; 260 _objData = new byte[_objSize]; 261 source.read(_objData, _objSize); 262 return _objSize; 263 } 245 264 265 int ObjectSegaSaturn::load(byte *source) { 266 _objData = source; 267 _freeData = false; 268 if (getClass() < 0x7FFE) { 269 _objSize = (getCount1() + getCount2()) * 2; 270 } else { 271 _objSize = getSize(); 272 } 273 _objSize += 6; 274 return _objSize; 275 } 246 276 277 int ObjectSegaSaturn::save(Common::WriteStream &dest) { 278 // Not implemented/used for version 3 objects 279 return 0; 280 } 281 282 uint16 ObjectSegaSaturn::getFlags() { 283 return READ_BE_UINT16(_objData); 284 } 285 286 uint16 ObjectSegaSaturn::getClass() { 287 return READ_BE_UINT16(_objData + 2); 288 } 289 290 uint16 ObjectSegaSaturn::getSize() { 291 return READ_BE_UINT16(_objData + 4); 292 } 293 294 byte ObjectSegaSaturn::getCount1() { 295 return _objData[4]; 296 } 297 298 byte ObjectSegaSaturn::getCount2() { 299 return _objData[5]; 300 } 301 302 byte *ObjectSegaSaturn::getData() { 303 return _objData + 6; 304 } 305 306 int16 ObjectSegaSaturn::getVectorItem(int16 index) { 307 if (getClass() == 0x7FFF) { 308 byte *vector = (byte*)getData(); 309 return vector[index]; 310 } else if (getClass() == 0x7FFE) { 311 int16 *vector = (int16*)getData(); 312 return READ_BE_UINT16(&vector[index]); 313 } else if (getClass() < 0x7FFE) { 314 int16 *vector = (int16*)getData(); 315 return READ_BE_UINT16(&vector[index]); 316 } else { 317 // should never reach here 318 error("Unknown object class"); 319 return 0; 320 } 321 } 322 323 void ObjectSegaSaturn::setVectorItem(int16 index, int16 value) { 324 if (getClass() == 0x7FFF) { 325 byte *vector = (byte*)getData(); 326 vector[index] = value; 327 } else if (getClass() <= 0x7FFE) { 328 int16 *vector = (int16*)getData(); 329 WRITE_BE_UINT16(&vector[index], value); 330 } 331 } 332 333 247 334 GameDatabase::GameDatabase(MadeEngine *vm) : _vm(vm) { 248 335 } 249 336 … … 678 765 return NULL; 679 766 } 680 767 768 // GameDatabaseSegaSaturn 769 770 GameDatabaseSegaSaturn::GameDatabaseSegaSaturn(MadeEngine *vm) : GameDatabase(vm) { 771 } 772 773 int16 GameDatabaseSegaSaturn::getVar(int16 index) { 774 return (int16)READ_BE_UINT16(_gameState + index * 2); 775 } 776 777 void GameDatabaseSegaSaturn::setVar(int16 index, int16 value) { 778 WRITE_BE_UINT16(_gameState + index * 2, value); 779 } 780 781 int16 GameDatabaseSegaSaturn::getObjectProperty(int16 objectIndex, int16 propertyId) { 782 if (objectIndex == 0) 783 return 0; 784 785 int16 propertyFlag; 786 int16 *property = findObjectProperty(objectIndex, propertyId, propertyFlag); 787 788 if (property) { 789 return (int16)READ_BE_UINT16(property); 790 } else { 791 return 0; 792 } 793 } 794 795 int16 GameDatabaseSegaSaturn::setObjectProperty(int16 objectIndex, int16 propertyId, int16 value) { 796 if (objectIndex == 0) 797 return 0; 798 799 int16 propertyFlag; 800 int16 *property = findObjectProperty(objectIndex, propertyId, propertyFlag); 801 802 if (property) { 803 if (propertyFlag == 1) { 804 WRITE_BE_UINT16(property, value); 805 } else { 806 warning("GameDatabase::setObjectProperty(%04X, %04X, %04X) Trying to set constant property\n", 807 objectIndex, propertyId, value); 808 } 809 return value; 810 } else { 811 return 0; 812 } 813 } 814 815 void GameDatabaseSegaSaturn::load(Common::SeekableReadStream &sourceS) { 816 // TODO: Read/verify header 817 818 sourceS.seek(0x1E); 819 820 uint32 objectIndexOffs = sourceS.readUint32BE(); 821 uint16 objectCount = sourceS.readUint16BE(); 822 uint32 gameStateOffs = sourceS.readUint32BE(); 823 _gameStateSize = sourceS.readUint32BE(); 824 uint32 objectsOffs = sourceS.readUint32BE(); 825 uint32 objectsSize = sourceS.readUint32BE(); 826 _mainCodeObjectIndex = sourceS.readUint16BE(); 827 828 debug(2, "objectIndexOffs = %08X; objectCount = %d; gameStateOffs = %08X; gameStateSize = %d; objectsOffs = %08X; objectsSize = %d\n", objectIndexOffs, objectCount, gameStateOffs, _gameStateSize, objectsOffs, objectsSize); 829 830 _gameState = new byte[_gameStateSize]; 831 sourceS.seek(gameStateOffs); 832 sourceS.read(_gameState, _gameStateSize); 833 834 Common::Array<uint32> objectOffsets; 835 sourceS.seek(objectIndexOffs); 836 for (uint32 i = 0; i < objectCount; i++) 837 objectOffsets.push_back(sourceS.readUint32BE()); 838 839 for (uint32 i = 0; i < objectCount; i++) { 840 Object *obj = new ObjectSegaSaturn(); 841 842 // The LSB indicates if it's a constant or variable object. 843 // Constant objects are loaded from disk, while variable objects exist 844 // in the _gameState buffer. 845 846 if (objectOffsets[i] & 1) { 847 sourceS.seek(objectsOffs + objectOffsets[i] - 1); 848 obj->load(sourceS); 849 } else { 850 obj->load(_gameState + objectOffsets[i]); 851 } 852 _objects.push_back(obj); 853 } 854 } 855 856 bool GameDatabaseSegaSaturn::getSavegameDescription(const char *filename, Common::String &description) { 857 Common::InSaveFile *in; 858 char desc[64]; 859 if (!(in = g_system->getSavefileManager()->openForLoading(filename))) { 860 return false; 861 } 862 in->skip(4); // TODO: Verify marker 'SGAM' 863 in->skip(4); // TODO: Verify size 864 in->skip(2); // TODO: Verify version 865 in->read(desc, 64); 866 description = desc; 867 delete in; 868 return true; 869 } 870 871 int16 GameDatabaseSegaSaturn::savegame(const char *filename, const char *description, int16 version) { 872 Common::OutSaveFile *out; 873 char desc[64]; 874 int16 result = 0; 875 uint32 size = 4 + 4 + 2 + _gameStateSize; 876 if (!(out = g_system->getSavefileManager()->openForSaving(filename))) { 877 warning("Can't create file '%s', game not saved", filename); 878 return 6; 879 } 880 strncpy(desc, description, 64); 881 out->writeUint32BE(MKID_BE('SGAM')); 882 out->writeUint32LE(size); 883 out->writeUint16LE(version); 884 out->write(desc, 64); 885 out->write(_gameState, _gameStateSize); 886 delete out; 887 return result; 888 } 889 890 int16 GameDatabaseSegaSaturn::loadgame(const char *filename, int16 version) { 891 Common::InSaveFile *in; 892 int16 result = 0; 893 //uint32 expectedSize = 4 + 4 + 2 + _gameStateSize; 894 if (!(in = g_system->getSavefileManager()->openForLoading(filename))) { 895 warning("Can't open file '%s', game not loaded", filename); 896 return 1; 897 } 898 in->skip(4); // TODO: Verify marker 'SGAM' 899 in->skip(4); // TODO: Verify size 900 in->skip(2); // TODO: Verify version 901 in->skip(64); // skip savegame description 902 in->read(_gameState, _gameStateSize); 903 delete in; 904 return result; 905 } 906 907 int16 *GameDatabaseSegaSaturn::findObjectProperty(int16 objectIndex, int16 propertyId, int16 &propertyFlag) { 908 Object *obj = getObject(objectIndex); 909 910 int16 *prop = (int16*)obj->getData(); 911 byte count1 = obj->getCount1(); 912 byte count2 = obj->getCount2(); 913 914 int16 *propPtr1 = prop + count1; 915 int16 *propPtr2 = prop + count2; 916 917 // First see if the property exists in the given object 918 while (count2-- > 0) { 919 if ((READ_BE_UINT16(prop) & 0x3FFF) == propertyId) { 920 if (READ_BE_UINT16(prop) & 0x4000) { 921 propertyFlag = 1; 922 return (int16*)_gameState + READ_BE_UINT16(propPtr1); 923 } else { 924 propertyFlag = obj->getFlags() & 1; 925 return propPtr1; 926 } 927 } 928 prop++; 929 propPtr1++; 930 } 931 932 // Now check in the object hierarchy of the given object 933 int16 parentObjectIndex = obj->getClass(); 934 if (parentObjectIndex == 0) { 935 return NULL; 936 } 937 938 while (parentObjectIndex != 0) { 939 940 obj = getObject(parentObjectIndex); 941 942 prop = (int16*)obj->getData(); 943 count1 = obj->getCount1(); 944 count2 = obj->getCount2(); 945 946 propPtr1 = propPtr2 + count1 - count2; 947 int16 *propertyPtr = prop + count1; 948 949 while (count2-- > 0) { 950 if (!(READ_BE_UINT16(prop) & 0x8000)) { 951 if ((READ_BE_UINT16(prop) & 0x3FFF) == propertyId) { 952 if (READ_BE_UINT16(prop) & 0x4000) { 953 propertyFlag = 1; 954 return (int16*)_gameState + READ_BE_UINT16(propPtr1); 955 } else { 956 propertyFlag = obj->getFlags() & 1; 957 return propPtr1; 958 } 959 } else { 960 propPtr1++; 961 } 962 } else { 963 if ((READ_BE_UINT16(prop) & 0x3FFF) == propertyId) { 964 if (READ_BE_UINT16(prop) & 0x4000) { 965 propertyFlag = 1; 966 return (int16*)_gameState + READ_BE_UINT16(propertyPtr); 967 } else { 968 propertyFlag = obj->getFlags() & 1; 969 return propertyPtr; 970 } 971 } 972 } 973 prop++; 974 propertyPtr++; 975 } 976 977 parentObjectIndex = obj->getClass(); 978 979 } 980 981 return NULL; 982 983 } 984 985 const char *GameDatabaseSegaSaturn::getString(uint16 offset) { 986 // Not used in version 3 games 987 return NULL; 988 } 989 681 990 } // End of namespace Made -
engines/made/database.h
107 107 108 108 }; 109 109 110 class ObjectSegaSaturn : public Object { 111 public: 112 int load(Common::SeekableReadStream &source); 113 int load(byte *source); 114 int save(Common::WriteStream &dest); 115 uint16 getFlags(); 116 uint16 getClass(); 117 uint16 getSize(); 118 byte getCount1(); 119 byte getCount2(); 120 byte *getData(); 121 122 int16 getVectorItem(int16 index); 123 void setVectorItem(int16 index, int16 value); 124 125 bool isConstant() { 126 return !(getFlags() & 1); 127 } 128 129 }; 130 110 131 class GameDatabase { 111 132 public: 112 133 … … 180 201 void load(Common::SeekableReadStream &sourceS); 181 202 }; 182 203 204 class GameDatabaseSegaSaturn : public GameDatabase { 205 public: 206 GameDatabaseSegaSaturn(MadeEngine *vm); 207 int16 *findObjectProperty(int16 objectIndex, int16 propertyId, int16 &propertyFlag); 208 const char *getString(uint16 offset); 209 bool getSavegameDescription(const char *filename, Common::String &description); 210 int16 savegame(const char *filename, const char *description, int16 version); 211 int16 loadgame(const char *filename, int16 version); 212 213 int16 getVar(int16 index); 214 void setVar(int16 index, int16 value); 215 216 int16 getObjectProperty(int16 objectIndex, int16 propertyId); 217 int16 setObjectProperty(int16 objectIndex, int16 propertyId, int16 value); 218 protected: 219 char *_gameText; 220 void load(Common::SeekableReadStream &sourceS); 221 }; 222 183 223 } // End of namespace Made 184 224 185 225 #endif /* MADE_H */ -
engines/made/detection.cpp
228 228 GF_FLOPPY, 229 229 0, 230 230 }, 231 232 { 233 // Return to Zork - Japanese Sega Saturn version 234 { 235 "rtz", 236 "", 237 AD_ENTRY1("rtz.dat", "023e46f6b43913792bd535558cce7bf7"), 238 Common::JA_JPN, 239 Common::kPlatformSaturn, 240 Common::ADGF_NO_FLAGS 241 }, 242 GID_RTZ, 243 0, 244 GF_FLOPPY, 245 0, 246 }, 231 247 232 248 { 233 249 // Return to Zork - Demo -
engines/made/made.cpp
85 85 _system->openCD(cd_num); 86 86 87 87 _pmvPlayer = new PmvPlayer(this, _mixer); 88 _cpkPlayer = new CpkPlayer(this, _mixer); 88 89 _res = new ProjectReader(); 89 90 _screen = new Screen(this); 90 91 91 92 if (getGameID() == GID_LGOP2 || getGameID() == GID_MANHOLE || getGameID() == GID_RODNEY) { 92 93 _dat = new GameDatabaseV2(this); 93 94 } else if (getGameID() == GID_RTZ) { 94 _dat = new GameDatabaseV3(this); 95 if (getPlatform() == Common::kPlatformSaturn) 96 _dat = new GameDatabaseSegaSaturn(this); 97 else 98 _dat = new GameDatabaseV3(this); 95 99 } else { 96 100 error("Unknown GameID"); 97 101 } -
engines/made/made.h
45 45 46 46 #include "engines/engine.h" 47 47 48 #include "made/cpkplayer.h" 49 48 50 namespace Made { 49 51 50 52 enum MadeGameID { … … 66 68 struct MadeGameDescription; 67 69 68 70 class ProjectReader; 71 class CpkPlayer; 69 72 class PmvPlayer; 70 73 class Screen; 71 74 class ScriptInterpreter; … … 98 101 private: 99 102 public: 100 103 PmvPlayer *_pmvPlayer; 104 CpkPlayer *_cpkPlayer; 101 105 ProjectReader *_res; 102 106 Screen *_screen; 103 107 GameDatabase *_dat; -
engines/made/module.mk
1 1 MODULE := engines/made 2 2 3 3 MODULE_OBJS = \ 4 cpkplayer.o \ 4 5 database.o \ 5 6 detection.o \ 6 7 graphics.o \ -
engines/made/scriptfuncs.cpp
45 45 _externalFuncs.push_back(new ExternalScriptFunc(this, &ScriptFunctions::x)); \ 46 46 _externalFuncNames.push_back(#x); 47 47 void ScriptFunctions::setupExternalsTable() { 48 49 48 External(sfSystemCall); 50 49 External(sfInitGraf); 51 50 External(sfRestoreGraf); … … 115 114 } 116 115 117 116 if (_vm->getGameID() == GID_RTZ) { 118 External(sfPrintf); 117 if (_vm->getPlatform() != Common::kPlatformSaturn) 118 External(sfPrintf); 119 119 External(sfClearMono); 120 120 External(sfGetSoundEnergy); 121 121 External(sfClearText); … … 150 150 External(sfReadMenu); 151 151 External(sfDrawMenu); 152 152 External(sfGetMenuCount); 153 External(sfSaveGame); 154 External(sfLoadGame); 155 External(sfGetGameDescription); 153 if (_vm->getPlatform() == Common::kPlatformSaturn) { 154 External(sfFaceIcon); 155 } else { 156 External(sfSaveGame); 157 External(sfLoadGame); 158 External(sfGetGameDescription); 159 } 156 160 External(sfShakeScreen); 157 161 External(sfPlaceMenu); 158 162 External(sfSetSoundVolume); … … 879 883 880 884 } 881 885 886 int16 ScriptFunctions::sfFaceIcon(int16 argc, int16 *argv) { 887 // RTZ Sega Saturn 888 warning("Unimplemented opcode: sfFaceIcon"); 889 return 0; 890 } 891 882 892 int16 ScriptFunctions::sfShakeScreen(int16 argc, int16 *argv) { 883 893 // TODO: Used in RTZ 884 894 warning("Unimplemented opcode: sfShakeScreen"); -
engines/made/scriptfuncs.h
161 161 int16 sfSaveGame(int16 argc, int16 *argv); 162 162 int16 sfLoadGame(int16 argc, int16 *argv); 163 163 int16 sfGetGameDescription(int16 argc, int16 *argv); 164 int16 sfFaceIcon(int16 argc, int16 *argv); 164 165 int16 sfShakeScreen(int16 argc, int16 *argv); 165 166 int16 sfPlaceMenu(int16 argc, int16 *argv); 166 167 int16 sfSetSoundVolume(int16 argc, int16 *argv);