Ticket #8772: hofKyradatSupport.patch
File hofKyradatSupport.patch, 54.1 KB (added by , 16 years ago) |
---|
-
gui_v2.cpp
58 58 memset(colorMap, 0, sizeof(colorMap)); 59 59 _screen->setTextColorMap(colorMap); 60 60 61 const char * const *strings = &_mainMenuStrings[_lang << 2]; 61 const char * const *strings; 62 62 63 Screen::FontId oldFont = _screen->setFont(Screen::FID_8_FNT); 63 64 int charWidthBackUp = _screen->_charWidth; 64 65 65 66 _screen->_charWidth = -2; 66 67 67 if (_flags.gameID == GI_KYRA2) 68 if (_flags.gameID == GI_KYRA2) { 68 69 _screen->setScreenDim(11); 69 else 70 const char * k2strings[4]; 71 k2strings[0] = _sequenceStrings[97]; 72 k2strings[1] = _sequenceStrings[96]; 73 k2strings[2] = _sequenceStrings[95]; 74 k2strings[3] = _sequenceStrings[98]; 75 strings = k2strings; 76 } else { 70 77 _screen->setScreenDim(3); 78 strings = &_mainMenuStrings[_lang << 2]; 79 } 71 80 72 81 int backUpX = _screen->_curDim->sx; 73 82 int backUpY = _screen->_curDim->sy; -
kyra.h
42 42 bool useAltShapeHeader; // alternative shape header (uses 2 bytes more, those are unused though) 43 43 bool isTalkie; 44 44 bool useHiResOverlay; 45 //bool useInstallerPackage; 45 46 byte gameID; 46 47 }; 47 48 … … 53 54 enum { 54 55 GI_KYRA1 = 0, 55 56 GI_KYRA2 = 1, 56 GI_KYRA3 = 2 57 GI_KYRA3 = 2, 58 GI_LOL = 3 57 59 }; 58 60 59 61 struct AudioDataStruct { 60 62 const char * const *_fileList; 61 const uint _fileListLen;63 const int _fileListLen; 62 64 const void * const _cdaTracks; 63 const uint _cdaNumTracks;65 const int _cdaNumTracks; 64 66 }; 65 67 66 68 // TODO: this is just the start of makeing the debug output of the kyra engine a bit more useable -
kyra_v1.cpp
180 180 181 181 initStaticResource(); 182 182 183 const AudioDataStruct *const sndList = (_flags.platform == Common::kPlatformFMTowns || 184 _flags.platform == Common::kPlatformPC98) ? _soundData_TOWNS : _soundData_PC; 185 _sound->setSoundList(sndList); 183 _sound->setSoundList(&_soundData[kMusicIntro]); 186 184 187 185 _trackMap = _dosTrackMap; 188 186 _trackMapSize = _dosTrackMapSize; … … 191 189 error("Couldn't init sound"); 192 190 193 191 _sound->setVolume(255); 194 _sound->loadSoundFile((_flags.platform == Common::kPlatformFMTowns 195 || _flags.platform == Common::kPlatformPC98) ? 0 : 9); 192 _sound->loadSoundFile(0); 196 193 197 194 setupTimers(); 198 195 setupButtonData(); … … 342 339 debugC(9, kDebugLevelMain, "KyraEngine_v1::startup()"); 343 340 static const uint8 colorMap[] = { 0, 0, 0, 0, 12, 12, 12, 0, 0, 0, 0, 0 }; 344 341 _screen->setTextColorMap(colorMap); 342 _sound->setSoundList(&_soundData[kMusicIngame]); 343 _sound->loadSoundFile(0); 345 344 // _screen->setFont(Screen::FID_6_FNT); 346 345 _screen->setAnimBlockPtr(3750); 347 346 memset(_sceneAnimTable, 0, sizeof(_sceneAnimTable)); -
kyra_v1.h
763 763 764 764 const uint8 * const*_specialPalettes; 765 765 766 static const char *_soundFiles[]; 767 static const char *_soundFilesTowns[]; 768 static const int32 _cdaTrackTable[]; 769 static const AudioDataStruct _soundData_PC[]; 770 static const AudioDataStruct _soundData_TOWNS[]; 766 const char *const *_soundFiles; 767 int _soundFilesSize; 768 const char *const *_soundFilesIntro; 769 int _soundFilesIntroSize; 770 const int32 *_cdaTrackTable; 771 int _cdaTrackTableSize; 772 const AudioDataStruct * _soundData; 771 773 772 774 static const int8 _charXPosTable[]; 773 775 static const int8 _charYPosTable[]; -
kyra_v2.cpp
49 49 _activeWSA = 0; 50 50 _activeText = 0; 51 51 _seqWsa = 0; 52 _sequences = 0; 53 _nSequences = 0; 52 54 55 53 56 _gamePlayBuffer = 0; 54 57 _cCodeBuffer = _optionsBuffer = _chapterBuffer = 0; 55 58 … … 93 96 KyraEngine_v2::~KyraEngine_v2() { 94 97 seq_uninit(); 95 98 99 if (_sequences) 100 delete [] _sequences; 101 if (_nSequences) 102 delete [] _nSequences; 103 96 104 delete [] _mouseSHPBuf; 97 105 delete _screen; 98 106 delete _text; … … 112 120 error("_screen->init() failed"); 113 121 114 122 KyraEngine::init(); 123 initStaticResource(); 115 124 116 125 _debugger = new Debugger_v2(this); 117 126 assert(_debugger); … … 132 141 133 142 _abortIntroFlag = false; 134 143 135 // temporary solution until staticres manager support (kyra.dat) is added for kyra 2136 if (_flags.platform == Common::kPlatformFMTowns || _flags.platform == Common::kPlatformPC98) {137 _sequenceSoundList = (const char * const *) _sequenceSoundList_TOWNS;138 _sequenceSoundListSize = _sequenceSoundListSize_TOWNS;139 _sequenceStrings = (const char * const *) _sequenceStrings_TOWNS_EN;140 _sequenceStringsSize = _sequenceStringsSize_TOWNS_EN;141 _sequences = (const Sequence*) _sequences_TOWNS;142 _soundData = (const AudioDataStruct *) _soundData_TOWNS;143 } else if (_flags.isTalkie) {144 _sequenceSoundList = (const char * const *) _sequenceSoundList_PC;145 _sequenceSoundListSize = _sequenceSoundListSize_PC;146 _sequenceStrings = (const char * const *) _sequenceStrings_PC_EN;147 _sequenceStringsSize = _sequenceStringsSize_PC_EN;148 _sequences = (const Sequence*) _sequences_PC;149 _soundData = (const AudioDataStruct *) _soundData_PC;150 } else {151 _sequenceSoundList = (const char * const *) _sequenceSoundList_PCFLOPPY;152 _sequenceSoundListSize = _sequenceSoundListSize_PCFLOPPY;153 _sequenceStrings = (const char * const *) _sequenceStrings_PC_EN;154 _sequenceStringsSize = _sequenceStringsSize_PC_EN;155 _sequences = (const Sequence*) _sequences_PC;156 _soundData = (const AudioDataStruct *) _soundData_PC;157 }158 159 144 for (int i = 0; i < 33; i++) 160 145 _sequenceStringsDuration[i] = (int) strlen(_sequenceStrings[i]) * 8; 161 146 … … 179 164 if (_flags.platform == Common::kPlatformFMTowns || _flags.platform == Common::kPlatformPC98) 180 165 seq_showStarcraftLogo(); 181 166 182 if (_flags.platform == Common::kPlatformPC && _flags.isDemo) { 183 _res->loadPakFile("VOC.PAK"); 184 _menuChoice = 2; 185 } else { 186 seq_playSequences(kSequenceVirgin, kSequenceZanfaun); 187 //seq_playSequences(kSequenceFunters, kSequenceFrash); 167 //seq_playSequences(kSequenceVirgin, kSequenceZanfaun); 168 seq_playSequences(kSequenceFunters, kSequenceFrash); 188 169 189 170 _res->unloadAllPakFiles(); 190 171 191 if (_menuChoice != 4) { 192 // load just the pak files needed for ingame 193 if (_flags.platform == Common::kPlatformPC && _flags.isTalkie) { 194 _res->loadFileList("FILEDATA.FDT"); 195 _res->loadPakFile("KYRA.DAT"); 196 } else if (_flags.platform == Common::kPlatformPC) { 197 // TODO 198 199 } else if (_flags.platform == Common::kPlatformFMTowns || _flags.platform == Common::kPlatformPC98) { 200 char tmpfilename[13]; 201 static const char * pakfiles [] = { "KYRA.DAT", "AUDIO.PAK", "CAULDRON.PAK", 202 "MISC_CPS.PAK", "MISC_EMC.PAK", "OTHER.PAK", "VOC.PAK", "WSCORE.PAK" }; 203 for (int i = 0; i < 8; i++) 204 _res->loadPakFile(pakfiles[i]); 205 for (int i = 1; i < 10; i++) { 206 sprintf(tmpfilename, "COST%d_SH.PAK", i); 207 _res->loadPakFile(tmpfilename); 208 } 209 for (int i = 1; i < 6; i++) { 210 sprintf(tmpfilename, "HOFCH_%d.PAK", i); 211 _res->loadPakFile(tmpfilename); 212 } 213 } 214 } 172 if (_menuChoice != 4) { 173 // load just the pak files needed for ingame 174 _res->loadPakFile(StaticResource::staticDataFilename()); 175 if (_flags.platform == Common::kPlatformPC && _flags.isTalkie) 176 _res->loadFileList("FILEDATA.FDT"); 177 else 178 _res->loadFileList(_ingamePakList, _ingamePakListSize); 215 179 } 216 180 217 181 if (_menuChoice == 1) { … … 221 185 } else if (_menuChoice == 3) { 222 186 // TODO: Load Game 223 187 224 } else if (_menuChoice == 2) {225 // TODO: Run Demo226 227 188 } 228 189 229 190 return 0; -
kyra_v2.h
74 74 kSequenceHand4 75 75 }; 76 76 77 enum kSequencesDemo { 78 kSequenceDemoVirgin = 0, 79 kSequenceDemoWestwood, 80 kSequenceDemoTitle, 81 kSequenceDemoTitle2, 82 kSequenceDemoHill, 83 kSequenceDemoOuthome, 84 kSequenceDemoWharf, 85 kSequenceDemoDinob, 86 kSequenceDemoFisher 87 }; 77 88 89 enum kNestedSequencesDemo { 90 kSequenceDemoWharf2 = 0, 91 kSequenceDemoDinob2, 92 kSequenceDemoWater, 93 kSequenceDemoBail, 94 kSequenceDemoDig, 95 }; 96 97 enum kSequencesLol { 98 kSequenceDemoScene1 = 0, 99 kSequenceDemoText1, 100 kSequenceDemoScene2, 101 kSequenceDemoText2, 102 kSequenceDemoScene3, 103 kSequenceDemoText3, 104 kSequenceDemoScene4, 105 kSequenceDemoText4, 106 kSequenceDemoScene5, 107 kSequenceDemoText5, 108 kSequenceDemoScene1a 109 }; 110 78 111 class WSAMovieV2; 79 112 class KyraEngine_v2; 80 113 class TextDisplayer_v2; 81 114 class Debugger_v2; 82 115 83 struct SequenceControl { 84 int8 frameIndex; 85 int8 frameDelay; 86 }; 116 typedef int (KyraEngine_v2::*Seqproc)(WSAMovieV2*, int, int, int); 87 117 88 118 struct ActiveWSA { 89 119 int16 flags; … … 91 121 uint16 startFrame; 92 122 uint16 endFrame; 93 123 uint16 frameDelay; 94 int (KyraEngine_v2::*callback)(WSAMovieV2*, int, int, int);124 Seqproc callback; 95 125 uint32 nextFrame; 96 126 uint16 currentFrame; 97 127 uint16 lastFrame; 98 128 uint16 x; 99 129 uint16 y; 100 const SequenceControl*control;130 const uint16 *control; 101 131 uint16 startupCommand; 102 132 uint16 finalCommand; 103 133 }; … … 125 155 uint16 frameDelay; 126 156 uint16 xPos; 127 157 uint16 yPos; 128 int (KyraEngine_v2::*callback)(WSAMovieV2*, int, int, int);158 Seqproc callback; 129 159 uint16 duration; 130 160 }; 131 161 … … 135 165 uint16 startframe; 136 166 uint16 endFrame; 137 167 uint16 frameDelay; 138 int (KyraEngine_v2::*callback)(WSAMovieV2*, int, int, int);168 Seqproc callback; 139 169 uint16 x; 140 170 uint16 y; 141 const SequenceControl* wsaControl;171 const uint16 * wsaControl; 142 172 uint16 startupCommand; 143 173 uint16 finalCommand; 144 uint16 unk1;145 174 }; 146 175 147 176 enum kMusicDataID { … … 246 275 247 276 uint8 *_mouseSHPBuf; 248 277 249 250 static const char *_dosSoundFileListIntro[];251 static const char *_dosSoundFileListFinale[];252 static const char *_dosSoundFileList[];253 static const char *_fmtSoundFileListIntro[];254 static const char *_fmtSoundFileListFinale[];255 static const char *_fmtSoundFileList[];256 static const uint8 _cdaTrackTableIntro[];257 static const uint8 _cdaTrackTableIngame[];258 static const uint8 _cdaTrackTableFinale[];259 static const AudioDataStruct _soundData_PC[];260 static const AudioDataStruct _soundData_TOWNS[];261 278 static const int8 _dosTrackMap[]; 262 279 static const int _dosTrackMapSize; 280 263 281 const AudioDataStruct * _soundData; 264 282 265 283 protected: … … 268 286 void runLoop(); 269 287 void cleanup(); 270 288 289 // TODO: get rid of all variables having pointers to the static resources if possible 290 // i.e. let them directly use the _staticres functions 291 void initStaticResource(); 292 271 293 void setupTimers(); 272 294 void setupOpcodeTable(); 273 295 … … 842 864 ActiveWSA *_activeWSA; 843 865 ActiveText *_activeText; 844 866 845 const char *const *_sequenceSoundList; 867 const char *const *_sequencePakList; 868 int _sequencePakListSize; 869 const char *const *_ingamePakList; 870 int _ingamePakListSize; 871 872 const char *const *_musicFileListIntro; 873 int _musicFileListIntroSize; 874 const char *const *_musicFileListFinale; 875 int _musicFileListFinaleSize; 876 const char *const *_musicFileListIngame; 877 int _musicFileListIngameSize; 878 const uint8 *_cdaTrackTableIntro; 879 int _cdaTrackTableIntroSize; 880 const uint8 *_cdaTrackTableIngame; 881 int _cdaTrackTableIngameSize; 882 const uint8 *_cdaTrackTableFinale; 883 int _cdaTrackTableFinaleSize; 884 char * const *_sequenceSoundList; 846 885 int _sequenceSoundListSize; 847 886 const char *const *_sequenceStrings; 848 887 int _sequenceStringsSize; 849 850 static const char *_sequenceSoundList_PC[];851 static const int _sequenceSoundListSize_PC;852 static const char *_sequenceSoundList_PCFLOPPY[];853 static const int _sequenceSoundListSize_PCFLOPPY;854 static const char *_sequenceSoundList_TOWNS[];855 static const int _sequenceSoundListSize_TOWNS;856 static const char *_sequenceStrings_TOWNS_EN[];857 static const int _sequenceStringsSize_TOWNS_EN;858 static const char *_sequenceStrings_PC_EN[];859 static const int _sequenceStringsSize_PC_EN;860 static const char _actorScreenStrings_PC_EN[];861 static const int _actorScreenStringsSize_PC_EN;862 863 888 int _sequenceStringsDuration[33]; 864 889 865 890 static const uint8 _seqTextColorPresets[]; … … 878 903 uint8 _seqTextColor[2]; 879 904 uint8 _seqTextColorMap[16]; 880 905 881 const Sequence *_sequences; 882 883 static const Sequence _sequences_PC[]; 884 static const Sequence _sequences_TOWNS[]; 885 static const NestedSequence _nSequences[]; 886 static const SequenceControl _wsaControlLibrary[]; 887 static const SequenceControl _wsaControlHand1b[]; 888 static const SequenceControl _wsaControlHand1c[]; 889 static const SequenceControl _wsaControlHand2[]; 890 static const SequenceControl _wsaControlHand3[]; 891 static const SequenceControl _wsaControlHand4[]; 906 Sequence * _sequences; 907 NestedSequence * _nSequences; 892 908 }; 893 909 894 910 } // end of namespace Kyra 895 911 896 #endif 897 898 899 912 #endif 913 No newline at end of file -
resource.cpp
67 67 if (!dir.exists() || !dir.isDirectory()) 68 68 error("invalid game path '%s'", dir.getPath().c_str()); 69 69 70 if (_vm->game() == GI_KYRA1) { 71 // we're loading KYRA.DAT here too (but just for Kyrandia 1) 70 if (_vm->game() < GI_KYRA3) { 72 71 if (!loadPakFile(StaticResource::staticDataFilename()) || !StaticResource::checkKyraDat()) { 73 72 Common::String errorMessage = "You're missing the '" + StaticResource::staticDataFilename() + "' file or it got corrupted, (re)get it from the ScummVM website"; 74 73 GUI::MessageDialog errorMsg(errorMessage); 75 74 errorMsg.runModal(); 76 75 error(errorMessage.c_str()); 77 76 } 77 } 78 78 79 if (_vm->game() == GI_KYRA1) { 79 80 // We only need kyra.dat for the demo. 80 81 if (_vm->gameFlags().isDemo) 81 82 return true; … … 83 84 // only VRM file we need in the *whole* game for kyra1 84 85 if (_vm->gameFlags().isTalkie) 85 86 loadPakFile("CHAPTER1.VRM"); 86 } else if (_vm->game() == GI_KYRA3) { 87 88 } else if (_vm->game() == GI_KYRA2) { 89 // mouse pointer, fonts, etc. required for initializing 90 if (_vm->gameFlags().isDemo) { 91 loadPakFile("GENERAL.PAK"); 92 } else { 93 loadPakFile("INTROGEN.PAK"); 94 loadPakFile("OTHER.PAK"); 95 } 96 97 return true; 98 99 } else if (_vm->game() == GI_KYRA3 /*&& _vm->gameFlags().useInstallerPackage*/) { 87 100 // load the installation package file for kyra3 88 101 INSFile *insFile = new INSFile("WESTWOOD.001"); 89 102 assert(insFile); … … 106 119 Common::for_each(list, list + ARRAYSIZE(list), Common::bind1st(Common::mem_fun(&Resource::loadPakFile), this)); 107 120 Common::for_each(_pakfiles.begin(), _pakfiles.end(), Common::bind2nd(Common::mem_fun(&ResourceFile::protect), true)); 108 121 } else { 109 // TODO: Kyra 2 InGame uses a special pak file list shipped with the game "FILEDATA.FDT", so we just have to load110 // the files needed for Kyra 2 intro here. What has to be done is, checking what files are required in the intro111 // and make a list similar to that for Kyra 1 and just load the files from the list and not all pak files we find.112 113 122 for (FSList::const_iterator file = fslist.begin(); file != fslist.end(); ++file) { 114 123 Common::String filename = file->getName(); 115 124 filename.toUppercase(); … … 199 208 return true; 200 209 } 201 210 211 bool Resource::loadFileList(const char * const *filelist, uint32 numFiles) { 212 if (!filelist) 213 return false; 214 215 while (numFiles--) { 216 if (!loadPakFile(filelist[numFiles])) { 217 error("couldn't load file '%s'", filelist[numFiles]); 218 return false; 219 } 220 } 221 222 return true; 223 } 224 202 225 void Resource::unloadPakFile(const Common::String &filename) { 203 226 ResIterator pak = Common::find_if(_pakfiles.begin(), _pakfiles.end(), ResFilenameEqual(Common::hashit_lower(filename))); 204 227 if (pak != _pakfiles.end()) -
resource.h
111 111 Common::String _physfile; 112 112 }; 113 113 114 class INSFileComp : public ResourceFile { 115 protected: 116 struct FileEntry { 117 uint _name; 118 char _archbase[10]; 119 uint32 _filenum; 120 uint32 _start; 121 uint32 _insize; 122 uint32 _outsize; 123 operator uint() const { return _name; } 124 }; 125 126 public: 127 INSFileComp(const char *firstFile); 128 ~INSFileComp(); 129 130 uint8 *getFile(uint hash) const; 131 bool getFileHandle(uint hash, Common::File &filehandle) const; 132 uint32 getFileSize(uint hash) const; 133 134 uint32 cache_allocate(uint32 minFileSize); 135 void cache_release(); 136 137 protected: 138 typedef Common::List<FileEntry>::iterator CompIterator; 139 typedef Common::List<FileEntry>::const_iterator ConstCompIterator; 140 141 bool openFile(Common::File &filehandle, ConstCompIterator file) const; 142 bool expand(uint8 * dst, uint8 * src, uint32 outsize, uint32 insize) const; 143 144 Common::List<FileEntry> _files; 145 146 uint8 * _fileData; 147 }; 148 114 149 class Resource { 115 150 public: 116 151 Resource(KyraEngine *vm); … … 123 158 bool isInPakList(const Common::String &filename) const; 124 159 125 160 bool loadFileList(const Common::String &filedata); 161 bool loadFileList(const char * const *filelist, uint32 numFiles); 126 162 // This unloads *all* pakfiles, even kyra.dat and protected ones 127 163 void unloadAllPakFiles(); 128 164 … … 215 251 kGUIStrings, 216 252 kConfigStrings, 217 253 218 kKyra1TownsSFXTable, 254 kAudioTracks, 255 kAudioTracksIntro, 256 257 kKyra1TownsSFXwdTable, 258 kKyra1TownsSFXbtTable, 259 kKyra1TownsCDATable, 219 260 kCreditsStrings, 220 261 262 k2SeqplayPakFiles, 263 k2SeqplayCredits, 264 k2SeqplayStrings, 265 k2SeqplaySfxFiles, 266 k2SeqplayTlkFiles, 267 k2SeqplaySeqData, 268 k2SeqplayIntroTracks, 269 k2SeqplayFinaleTracks, 270 k2SeqplayIntroCDA, 271 k2SeqplayFinaleCDA, 272 273 k2IngamePakFiles, 274 k2IngameTracks, 275 k2IngameCDA, 276 221 277 kMaxResIDs 222 278 }; 223 279 … … 282 338 kRoomList, 283 339 kShapeList, 284 340 kRawData, 285 kPaletteTable 341 kPaletteTable, 342 343 k2SeqData 286 344 }; 287 345 288 346 struct BuiltinRes { -
saveload_v1.cpp
202 202 // In the first version when this entry was introduced, 203 203 // it wasn't made sure that _curSfxFile was initialized 204 204 // so if it's out of bounds we just set it to 0. 205 if (_curSfxFile >= (int)_soundData_TOWNS->_fileListLen || _curSfxFile < 0) 206 _curSfxFile = 0; 207 208 if (_flags.platform == Common::kPlatformFMTowns || _flags.platform == Common::kPlatformPC98) 205 if (_flags.platform == Common::kPlatformFMTowns || _flags.platform == Common::kPlatformPC98) { 206 if (_curSfxFile >= (int)_soundData->_fileListLen || _curSfxFile < 0) 207 _curSfxFile = 0; 209 208 _sound->loadSoundFile(_curSfxFile); 209 } 210 210 } 211 211 212 212 _screen->_disableScreen = true; -
sequences_v2.cpp
106 106 if (_sequences[seqNum].flags & 4) { 107 107 int cp = _screen->setCurPage(2); 108 108 Screen::FontId cf = _screen->setFont(Screen::FID_GOLDFONT_FNT); 109 int sX = (320 - _screen->getTextWidth(_sequenceStrings[_sequences[seqNum].stringIndex1])) / 2; 110 _screen->printText(_sequenceStrings[_sequences[seqNum].stringIndex1], sX, 100 - _screen->getFontHeight(), 1, 0); 111 sX = (320 - _screen->getTextWidth(_sequenceStrings[_sequences[seqNum].stringIndex2])) / 2; 112 _screen->printText(_sequenceStrings[_sequences[seqNum].stringIndex2], sX, 100, 1, 0); 113 109 if (_sequences[seqNum].stringIndex1 != -1) { 110 int sX = (320 - _screen->getTextWidth(_sequenceStrings[_sequences[seqNum].stringIndex1])) / 2; 111 _screen->printText(_sequenceStrings[_sequences[seqNum].stringIndex1], sX, 100 - _screen->getFontHeight(), 1, 0); 112 } 113 if (_sequences[seqNum].stringIndex2 != -1) { 114 int sX = (320 - _screen->getTextWidth(_sequenceStrings[_sequences[seqNum].stringIndex2])) / 2; 115 _screen->printText(_sequenceStrings[_sequences[seqNum].stringIndex2], sX, 100, 1, 0); 116 } 114 117 _screen->setFont(cf); 115 118 _screen->setCurPage(cp); 116 119 } … … 205 208 uint32 tdiff = _seqEndTime - now; 206 209 uint32 dly = tdiff < _tickLength ? tdiff : _tickLength; 207 210 delay(dly); 208 //_seqEndTime -= dly;209 211 } 210 212 } else { 211 213 loop = loop2 = false; … … 1494 1496 _screen->loadBitmap("finale.cps", 3, 3, _screen->_currentPalette); 1495 1497 _screen->setFont(Screen::FID_GOLDFONT_FNT); 1496 1498 1499 int talkieCreditsSize; 1500 const uint8 * talkieCredits = _staticres->loadRawData(k2SeqplayCredits, talkieCreditsSize); 1501 1497 1502 _sound->setSoundList(&_soundData[kMusicIngame]); 1498 1503 _sound->loadSoundFile(3); 1499 1504 _sound->playTrack(3); … … 1957 1962 _activeWSA[wsaNum].movie->setY(_activeWSA[wsaNum].y); 1958 1963 1959 1964 if (_activeWSA[wsaNum].flags & 0x20) { 1960 _activeWSA[wsaNum].movie->displayFrame(_activeWSA[wsaNum].control[currentFrame ].frameIndex, 0x4000);1961 _activeWSA[wsaNum].frameDelay = _activeWSA[wsaNum].control[currentFrame ].frameDelay;1965 _activeWSA[wsaNum].movie->displayFrame(_activeWSA[wsaNum].control[currentFrame * 2], 0x4000); 1966 _activeWSA[wsaNum].frameDelay = _activeWSA[wsaNum].control[currentFrame * 2 + 1]; 1962 1967 } else { 1963 1968 _activeWSA[wsaNum].movie->displayFrame(currentFrame % _activeWSA[wsaNum].movie->frames(), 0x4000); 1964 1969 } … … 2146 2151 _activeText = new ActiveText[10]; 2147 2152 2148 2153 _res->unloadAllPakFiles(); 2149 _res->loadPakFile("KYRA.DAT"); 2150 _res->loadPakFile("AUDIO.PAK"); 2151 _res->loadPakFile("INTROGEN.PAK"); 2152 _res->loadPakFile("OTHER.PAK"); 2153 _res->loadPakFile("VOC.PAK"); 2154 if (_flags.isTalkie) { 2155 _res->loadPakFile("TALKENG.PAK"); 2156 _res->loadPakFile("TALKGER.PAK"); 2157 _res->loadPakFile("TALKFRE.PAK"); 2158 _res->loadPakFile("INTROTLK.PAK"); 2159 } else { 2160 _res->loadPakFile("INTROVOC.PAK"); 2161 if (_flags.platform == Common::kPlatformFMTowns || _flags.platform == Common::kPlatformPC98) 2162 _res->loadPakFile("WSCORE.PAK"); 2163 } 2154 _res->loadPakFile(StaticResource::staticDataFilename()); 2155 _res->loadFileList(_sequencePakList, _sequencePakListSize); 2164 2156 } 2165 2157 2166 2158 void KyraEngine_v2::seq_uninit() { … … 2284 2276 _screen->showMouse(); 2285 2277 } 2286 2278 2287 // static res2288 // TODO: move to staticres.cpp2289 2290 const Sequence KyraEngine_v2::_sequences_PC[] = {2291 // flags, wsaFile, cpsFile, startupCommand, finalCommand, stringIndex1, stringIndex2,2292 // startFrame, numFrames, frameDelay, xPos, yPos, callback, duration2293 { 2, 0, "virgin.cps", 4, 0, -1, -1, 0, 1, 100, 0, 0, 0, 30 },2294 { 1, "westwood.wsa", 0, 4, 0, -1, -1, 0, 18, 6, 0, 0, &KyraEngine_v2::seq_introWestwood, 160 },2295 { 1, "title.wsa", 0, 4, 0, -1, -1, 0, 26, 6, 0, 0, &KyraEngine_v2::seq_introTitle, 10 },2296 { 2, 0, "over.cps", 4, 0, -1, -1, 0, 1, 3600, 0, 0, &KyraEngine_v2::seq_introOverview, 30 },2297 { 2, 0, "library.cps", 4, 0, -1, -1, 0, 1, 3600, 0, 0, &KyraEngine_v2::seq_introLibrary, 30 },2298 { 2, 0, "hand.cps", 4, 0, -1, -1, 0, 1, 3600, 0, 0, &KyraEngine_v2::seq_introHand, 90 },2299 { 1, "point.wsa", 0, 4, 8, -1, -1, 0, 38, 7, 0, 0, &KyraEngine_v2::seq_introPoint, 200 },2300 { 1, "zanfaun.wsa", 0, 4, 0, -1, -1, 0, 51, 16, 0, 0, &KyraEngine_v2::seq_introZanfaun, 240 },2301 2302 { 1, "funters.wsa", 0, 4, 0, -1, -1, 0, 27, 12, 0, 0, &KyraEngine_v2::seq_finaleFunters, 30 },2303 { 1, "ferb.wsa", 0, 4, 0, -1, -1, 0, 27, 16, 0, 0, &KyraEngine_v2::seq_finaleFerb, 30 },2304 { 1, "fish.wsa", 0, 4, 0, -1, -1, 0, 56, 12, 0, 0, &KyraEngine_v2::seq_finaleFish, 30 },2305 { 1, "fheep.wsa", 0, 4, 0, -1, -1, 0, 11, 12, 0, 0, &KyraEngine_v2::seq_finaleFheep, 30 },2306 { 1, "farmer.wsa", 0, 4, 0, -1, -1, 0, 22, 12, 0, 0, &KyraEngine_v2::seq_finaleFarmer, 100 },2307 { 1, "fuards.wsa", 0, 4, 0, -1, -1, 0, 24, 14, 0, 0, &KyraEngine_v2::seq_finaleFuards, 30 },2308 { 1, "firates.wsa", 0, 4, 0, -1, -1, 0, 37, 12, 0, 0, &KyraEngine_v2::seq_finaleFirates, 30 },2309 { 1, "frash.wsa", 0, 4, 0, -1, -1, 0, 12, 10, 0, 0, &KyraEngine_v2::seq_finaleFrash, 340 }2310 };2311 2312 const Sequence KyraEngine_v2::_sequences_TOWNS[] = {2313 // flags, wsaFile, cpsFile, startupCommand, finalCommand, stringIndex1, stringIndex2,2314 // startFrame, numFrames, frameDelay, xPos, yPos, callback, duration2315 { 2, 0, "virgin.cps", 4, 0, -1, -1, 0, 1, 100, 0, 0, 0, 30 },2316 { 1, "westwood.wsa", 0, 4, 0, -1, -1, 0, 18, 12, 0, 0, &KyraEngine_v2::seq_introWestwood, 160 },2317 { 1, "title.wsa", 0, 4, 0, -1, -1, 0, 26, 12, 0, 0, &KyraEngine_v2::seq_introTitle, 10 },2318 { 2, 0, "over.cps", 4, 0, -1, -1, 0, 1, 3600, 0, 0, &KyraEngine_v2::seq_introOverview, 30 },2319 { 2, 0, "library.cps", 4, 0, -1, -1, 0, 1, 3600, 0, 0, &KyraEngine_v2::seq_introLibrary, 30 },2320 { 2, 0, "hand.cps", 4, 0, -1, -1, 0, 1, 3600, 0, 0, &KyraEngine_v2::seq_introHand, 90 },2321 { 1, "point.wsa", 0, 4, 8, -1, -1, 0, 38, 7, 0, 0, &KyraEngine_v2::seq_introPoint, 200 },2322 { 1, "zanfaun.wsa", 0, 4, 0, -1, -1, 0, 51, 16, 0, 0, &KyraEngine_v2::seq_introZanfaun, 240 },2323 2324 { 1, "funters.wsa", 0, 4, 0, -1, -1, 0, 27, 12, 0, 0, &KyraEngine_v2::seq_finaleFunters, 30 },2325 { 1, "ferb.wsa", 0, 4, 0, -1, -1, 0, 27, 16, 0, 0, &KyraEngine_v2::seq_finaleFerb, 30 },2326 { 1, "fish.wsa", 0, 4, 0, -1, -1, 0, 56, 12, 0, 0, &KyraEngine_v2::seq_finaleFish, 30 },2327 { 1, "fheep.wsa", 0, 4, 0, -1, -1, 0, 11, 12, 0, 0, &KyraEngine_v2::seq_finaleFheep, 30 },2328 { 1, "farmer.wsa", 0, 4, 0, -1, -1, 0, 22, 12, 0, 0, &KyraEngine_v2::seq_finaleFarmer, 100 },2329 { 1, "fuards.wsa", 0, 4, 0, -1, -1, 0, 24, 14, 0, 0, &KyraEngine_v2::seq_finaleFuards, 30 },2330 { 1, "firates.wsa", 0, 4, 0, -1, -1, 0, 37, 12, 0, 0, &KyraEngine_v2::seq_finaleFirates, 30 },2331 { 1, "frash.wsa", 0, 4, 0, -1, -1, 0, 12, 10, 0, 0, &KyraEngine_v2::seq_finaleFrash, 340 }2332 };2333 2334 const NestedSequence KyraEngine_v2::_nSequences[] = {2335 // flags, wsaFile, startframe, endFrame, frameDelay, callback, x, y, wsaControl, startupCommand, finalCommand, unk1;2336 { 0x0C, "figgle.wsa", 0, 3, 60, &KyraEngine_v2::seq_finaleFiggle, 0, 0, 0, 0, 0, 0 },2337 2338 { 8, "over1.wsa", 0, 10, 10, &KyraEngine_v2::seq_introOver1, 0, 0, 0, 0, 0, 0 },2339 { 8, "over2.wsa", 0, 11, 9, &KyraEngine_v2::seq_introOver2, 0, 0, 0, 0, 0, 0 },2340 { 8, "forest.wsa", 0, 22, 6, &KyraEngine_v2::seq_introForest, 0, 0, 0, 1, 3, 0 },2341 { 8, "dragon.wsa", 0, 11, 6, &KyraEngine_v2::seq_introDragon, 0, 0, 0, 2, 0, 0 },2342 { 2, "darm.wsa", 0, 19, 9, &KyraEngine_v2::seq_introDarm, 0, 0, 0, 4, 0, 0 },2343 { 2, "library.wsa", 0, 33, 9, &KyraEngine_v2::seq_introLibrary2, 0, 0, 0, 4, 0, 0 },2344 { 0x2A, "library.wsa", 0, 19, 9, &KyraEngine_v2::seq_introLibrary2, 0, 0, _wsaControlLibrary, 0, 0, 0 },2345 { 0x0A, "marco.wsa", 0, 37, 9, &KyraEngine_v2::seq_introMarco, 0, 0, 0, 4, 0, 0 },2346 { 2, "hand1a.wsa", 0, 34, 9, &KyraEngine_v2::seq_introHand1a, 0, 0, 0, 0, 0, 0 },2347 { 0x2A, "hand1b.wsa", 0, 16, 9, &KyraEngine_v2::seq_introHand1b, 0, 0, _wsaControlHand1b, 0, 0, 0 },2348 { 0x2A, "hand1c.wsa", 0, 9, 9, &KyraEngine_v2::seq_introHand1c, 0, 0, _wsaControlHand1c, 0, 0, 0 },2349 { 0x2C, "hand2.wsa", 0, 2, 9, &KyraEngine_v2::seq_introHand2, 0, 0, _wsaControlHand2, 5, 0, 0 },2350 { 0x2C, "hand3.wsa", 0, 4, 9, &KyraEngine_v2::seq_introHand3, 0, 0, _wsaControlHand3, 5, 0, 0 },2351 { 0x2C, "hand4.wsa", 0, 8, 9, 0, 0, 0, _wsaControlHand4, 5, 0, 0 }2352 };2353 2354 2355 const SequenceControl KyraEngine_v2::_wsaControlLibrary[] = {2356 {0x00, 0x0A}, {0x01, 0x0A}, {0x02, 0x0A}, {0x03, 0x0A}, {0x04, 0x0A}, {0x05, 0x0A},2357 {0x06, 0x0A}, {0x07, 0x0A}, {0x08, 0x0A}, {0x09, 0x0A}, {0x08, 0x0A}, {0x07, 0x0A},2358 {0x06, 0x0A}, {0x05, 0x28}, {0x04, 0x0A}, {0x03, 0x0A}, {0x02, 0x0A}, {0x01, 0x0A}2359 };2360 2361 const SequenceControl KyraEngine_v2::_wsaControlHand1b[] = {2362 {0x00, 0x06}, {0x01, 0x06}, {0x02, 0x06}, {0x03, 0x06}, {0x04, 0x06}, {0x05, 0x06},2363 {0x06, 0x06}, {0x07, 0x06}, {0x08, 0x06}, {0x09, 0x06}, {0x0A, 0x06}, {0x0B, 0x06},2364 {0x0B, 0x0C}, {0x0C, 0x0C}, {0x0D, 0x0C}, {0x0C, 0x0C}, {0x0B, 0x0C}2365 };2366 2367 const SequenceControl KyraEngine_v2::_wsaControlHand1c[] = {2368 {0x00, 0x06}, {0x01, 0x06}, {0x02, 0x06}, {0x03, 0x06}, {0x04, 0x06}, {0x03, 0x06},2369 {0x04, 0x06}, {0x05, 0x40}, {0x05, 0x06}2370 };2371 2372 const SequenceControl KyraEngine_v2::_wsaControlHand2[] = {2373 {0x00, 0x06}, {0x01, 0x06}, {0x00, 0x06}, {0x01, 0x06}, {0x00, 0x06}, {0x01, 0x06},2374 {0x00, 0x06}, {0x01, 0x06}, {0x00, 0x06}, {0x01, 0x06}, {0x00, 0x06}, {0x01, 0x06},2375 {0x00, 0x06}, {0x01, 0x06}, {0x00, 0x06}, {0x01, 0x06}2376 };2377 2378 const SequenceControl KyraEngine_v2::_wsaControlHand3[] = {2379 {0x00, 0x06}, {0x01, 0x06}, {0x02, 0x06}, {0x01, 0x06}, {0x00, 0x01}2380 };2381 2382 const SequenceControl KyraEngine_v2::_wsaControlHand4[] = {2383 {0x00, 0x06}, {0x01, 0x06}, {0x02, 0x06}, {0x03, 0x06}, {0x04, 0x06},2384 {0x03, 0x06}, {0x02, 0x06}, {0x01, 0x06}2385 };2386 2387 2279 } // end of namespace Kyra 2388 2280 2389 2281 -
sound.h
397 397 398 398 Common::Mutex _mutex; 399 399 400 static const uint8 _sfxBTTable[256];400 const uint8 *_sfxBTTable; 401 401 const uint8 *_sfxWDTable; 402 402 }; 403 403 -
sound_towns.cpp
1086 1086 1087 1087 SoundTowns::SoundTowns(KyraEngine *vm, Audio::Mixer *mixer) 1088 1088 : Sound(vm, mixer), _lastTrack(-1), _currentSFX(0), _sfxFileData(0), 1089 _sfxFileIndex((uint)-1), _sfxWDTable(0), _ parser(0) {1089 _sfxFileIndex((uint)-1), _sfxWDTable(0), _sfxBTTable(0), _parser(0) { 1090 1090 1091 1091 _driver = new SoundTowns_EuphonyDriver(_mixer); 1092 1092 int ret = open(); … … 1109 1109 bool SoundTowns::init() { 1110 1110 _vm->checkCD(); 1111 1111 int unused = 0; 1112 _sfxWDTable = _vm->staticres()->loadRawData(kKyra1TownsSFXTable, unused); 1112 _sfxWDTable = _vm->staticres()->loadRawData(kKyra1TownsSFXwdTable, unused); 1113 _sfxBTTable = _vm->staticres()->loadRawData(kKyra1TownsSFXbtTable, unused); 1113 1114 1114 1115 return loadInstruments(); 1115 1116 } … … 1355 1356 return (float) sampleRate * 10.0f * rateshift / outputRate; 1356 1357 } 1357 1358 1358 const uint8 SoundTowns::_sfxBTTable[256] = {1359 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x8D, 0x8E, 0x8F,1360 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9A, 0x9B, 0x9C, 0x9D, 0x9E, 0x9F,1361 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7, 0xA8, 0xA9, 0xAA, 0xAB, 0xAC, 0xAD, 0xAE, 0xAF,1362 0xB0, 0xB1, 0xB2, 0xB3, 0xB4, 0xB5, 0xB6, 0xB7, 0xB8, 0xB9, 0xBA, 0xBB, 0xBC, 0xBD, 0xBE, 0xBF,1363 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF,1364 0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xD7, 0xD8, 0xD9, 0xDA, 0xDB, 0xDC, 0xDD, 0xDE, 0xDF,1365 0xE0, 0xE1, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7, 0xE8, 0xE9, 0xEA, 0xEB, 0xEC, 0xED, 0xEE, 0xEF,1366 0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7, 0xF8, 0xF9, 0xFA, 0xFB, 0xFC, 0xFD, 0xFE, 0xFE,1367 0x7F, 0x7F, 0x7E, 0x7D, 0x7C, 0x7B, 0x7A, 0x79, 0x78, 0x77, 0x76, 0x75, 0x74, 0x73, 0x72, 0x71,1368 0x70, 0x6F, 0x6E, 0x6D, 0x6C, 0x6B, 0x6A, 0x69, 0x68, 0x67, 0x66, 0x65, 0x64, 0x63, 0x62, 0x61,1369 0x60, 0x5F, 0x5E, 0x5D, 0x5C, 0x5B, 0x5A, 0x59, 0x58, 0x57, 0x56, 0x55, 0x54, 0x53, 0x52, 0x51,1370 0x50, 0x4F, 0x4E, 0x4D, 0x4C, 0x4B, 0x4A, 0x49, 0x48, 0x47, 0x46, 0x45, 0x44, 0x43, 0x42, 0x41,1371 0x40, 0x3F, 0x3E, 0x3D, 0x3C, 0x3B, 0x3A, 0x39, 0x38, 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31,1372 0x30, 0x2F, 0x2E, 0x2D, 0x2C, 0x2B, 0x2A, 0x29, 0x28, 0x27, 0x26, 0x25, 0x24, 0x23, 0x22, 0x21,1373 0x20, 0x1F, 0x1E, 0x1D, 0x1C, 0x1B, 0x1A, 0x19, 0x18, 0x17, 0x16, 0x15, 0x14, 0x13, 0x12, 0x11,1374 0x10, 0x0F, 0x0E, 0x0D, 0x0C, 0x0B, 0x0A, 0x09, 0x08, 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x011375 };1376 1377 1359 // KYRA 2 1378 1360 1379 1361 SoundTowns_v2::SoundTowns_v2(KyraEngine *vm, Audio::Mixer *mixer) … … 1413 1395 if (track == _lastTrack && _musicEnabled) 1414 1396 return; 1415 1397 1416 const uint 8 * const cdaTracks = (const uint8* const) cdaData();1398 const uint16 * const cdaTracks = (const uint16 * const) cdaData(); 1417 1399 1418 1400 int trackNum = -1; 1419 1401 for (uint32 i = 0; i < cdaTrackNum(); i++) { -
staticres.cpp
35 35 36 36 namespace Kyra { 37 37 38 #define RESFILE_VERSION 1 738 #define RESFILE_VERSION 18 39 39 40 40 bool StaticResource::checkKyraDat() { 41 41 Common::File kyraDat; … … 211 211 // PALETTE table 212 212 { kPaletteList, kPaletteTable, "1 33 PALTABLE" }, 213 213 214 // AUDIO files 215 { kAudioTracks, kStringList, "TRACKS.TXT" }, 216 { kAudioTracksIntro, kStringList, "TRACKSINT.TXT" }, 217 214 218 // FM-TOWNS specific 215 { kKyra1TownsSFXTable, kRawData, "SFXTABLE" }, 219 { kKyra1TownsSFXwdTable, kRawData, "SFXWDTABLE" }, 220 { kKyra1TownsSFXbtTable, kRawData, "SFXBTTABLE" }, 221 { kKyra1TownsCDATable, kRawData, "CDATABLE" }, 216 222 { kCreditsStrings, kRawData, "CREDITS" }, 217 223 218 224 { 0, 0, 0 } 219 225 }; 220 226 227 static const FilenameTable kyra2StaticRes[] = { 228 // Sequence Player 229 { k2SeqplayPakFiles, kStringList, "S_PAKFILES.TXT" }, 230 { k2SeqplayCredits, kRawData, "S_CREDITS.TXT" }, 231 { k2SeqplayStrings, kLanguageList, "S_STRINGS." }, 232 { k2SeqplaySfxFiles, kStringList, "S_SFXFILES.TXT" }, 233 { k2SeqplayTlkFiles, kLanguageList, "S_TLKFILES." }, 234 { k2SeqplaySeqData, kRawData, "S_DATA.SEQ" }, 235 { k2SeqplayIntroTracks, kStringList, "S_INTRO.TRA" }, 236 { k2SeqplayFinaleTracks, kStringList, "S_FINALE.TRA" }, 237 { k2SeqplayIntroCDA, kRawData, "S_INTRO.CDA" }, 238 { k2SeqplayFinaleCDA, kRawData, "S_FINALE.CDA" }, 239 240 // Ingame 241 { k2IngamePakFiles, kStringList, "I_PAKFILES.TXT" }, 242 { k2IngameTracks, kStringList, "I_TRACKS.TRA" }, 243 { k2IngameCDA, kRawData, "I_TRACKS.CDA" }, 244 245 { 0, 0, 0 } 246 }; 247 221 248 if (_vm->game() == GI_KYRA1) { 222 249 _builtIn = 0; 223 250 _filenameTable = kyra1StaticRes; 224 } else if (_vm->game() == GI_KYRA2 || _vm->game() == GI_KYRA3) { 251 } else if (_vm->game() == GI_KYRA2) { 252 _builtIn = 0; 253 _filenameTable = kyra2StaticRes; 254 } else if (_vm->game() == GI_KYRA3) { 225 255 return true; 226 256 } else { 227 257 error("unknown game ID"); … … 601 631 uint8 *StaticResource::getFile(const char *name, int &size) { 602 632 char buffer[64]; 603 633 const char *ext = ""; 634 if (_vm->gameFlags().gameID == GI_KYRA2) 635 ext = ".K2"; 636 snprintf(buffer, 64, "%s%s", name, ext); 637 ext = ""; 638 604 639 if (_vm->gameFlags().isTalkie) 605 640 ext = ".CD"; 606 641 else if (_vm->gameFlags().isDemo) … … 609 644 ext = ".TNS"; 610 645 else if (_vm->gameFlags().platform == Common::kPlatformAmiga) 611 646 ext = ".AMG"; 612 s nprintf(buffer, 64, "%s%s", name, ext);647 strcat(buffer, ext); 613 648 uint32 tempSize = 0; 614 649 uint8 *data = _vm->resource()->fileData(buffer, &tempSize); 615 650 size = tempSize; … … 680 715 _guiStrings = _staticres->loadStrings(kGUIStrings, _guiStringsSize); 681 716 _configStrings = _staticres->loadStrings(kConfigStrings, _configStringsSize); 682 717 718 _soundFiles = _staticres->loadStrings(kAudioTracks, _soundFilesSize); 719 _soundFilesIntro = _staticres->loadStrings(kAudioTracksIntro, _soundFilesIntroSize); 720 _cdaTrackTable = (const int32*) _staticres->loadRawData(kKyra1TownsCDATable, _cdaTrackTableSize); 721 683 722 // copied static res 684 723 685 724 // room list … … 707 746 708 747 _staticres->unloadId(kDefaultShapes); 709 748 } 749 750 // audio data tables 751 static const AudioDataStruct soundData_PC[] = { 752 { _soundFilesIntro, _soundFilesIntroSize, 0, 0 }, 753 { _soundFiles, _soundFilesSize, 0, 0 }, 754 { 0, 0, 0, 0} 755 }; 756 757 static const AudioDataStruct soundData_TOWNS[] = { 758 { _soundFiles, _soundFilesSize, _cdaTrackTable, _cdaTrackTableSize }, 759 { _soundFiles, _soundFilesSize, _cdaTrackTable, _cdaTrackTableSize }, 760 { 0, 0, 0, 0} 761 }; 762 _soundData = (_flags.platform == Common::kPlatformPC) ? soundData_PC : soundData_TOWNS; 710 763 } 711 764 712 765 void KyraEngine_v1::loadMouseShapes() { … … 854 907 _screen->copyRegion(0, 0, 0, 0, 320, 200, page, 0); 855 908 } 856 909 910 void KyraEngine_v2::initStaticResource() { 911 int tmp = 0; 912 913 _sequencePakList = _staticres->loadStrings(k2SeqplayPakFiles, _sequencePakListSize); 914 _ingamePakList = _staticres->loadStrings(k2IngamePakFiles, _ingamePakListSize); 915 _sequenceStrings = _staticres->loadStrings(k2SeqplayStrings, _sequenceStringsSize); 916 _sequenceSoundList = (char* const*)_staticres->loadStrings(k2SeqplaySfxFiles, _sequenceSoundListSize); 917 _musicFileListIntro = _staticres->loadStrings(k2SeqplayIntroTracks, _musicFileListIntroSize); 918 _musicFileListIngame = _staticres->loadStrings(k2IngameTracks, _musicFileListIngameSize); 919 _musicFileListFinale = _staticres->loadStrings(k2SeqplayFinaleTracks, _musicFileListFinaleSize); 920 _cdaTrackTableIntro = _staticres->loadRawData(k2SeqplayIntroCDA, _cdaTrackTableIntroSize); 921 _cdaTrackTableIngame = _staticres->loadRawData(k2IngameCDA, _cdaTrackTableIngameSize); 922 _cdaTrackTableFinale = _staticres->loadRawData(k2SeqplayFinaleCDA, _cdaTrackTableFinaleSize); 923 924 // replace sequence talkie files with localized versions and cut off .voc 925 // suffix from voc files so as to allow compression specific file extensions 926 const char* const* tlkfiles = _staticres->loadStrings(k2SeqplayTlkFiles, tmp); 927 for (int i = 0; i < _sequenceSoundListSize; i++) { 928 uint32 len = strlen(_sequenceSoundList[i]); 929 if (_flags.platform == Common::kPlatformPC) 930 len -= 4; 931 932 if (tlkfiles) { 933 for (int ii = 0; ii < tmp; ii++) { 934 if (!stricmp(&_sequenceSoundList[i][1], &tlkfiles[ii][1])) 935 strcpy(_sequenceSoundList[i], tlkfiles[ii]); 936 } 937 } 938 939 *(&_sequenceSoundList[i][len]) = 0; 940 } 941 942 // assign music data 943 static const char *fmtMusicFileListIntro[] = { "intro" }; 944 static const char *fmtMusicFileListFinale[] = { "finale" }; 945 static const char *fmtMusicFileListIngame[] = { "k2" }; 946 947 static const AudioDataStruct soundData_PC[] = { 948 { _musicFileListIntro, _musicFileListIntroSize, 0, 0 }, 949 { _musicFileListIngame, _musicFileListIngameSize, 0, 0}, 950 { _musicFileListFinale, _musicFileListIntroSize, 0, 0 } 951 }; 952 953 static const AudioDataStruct soundData_TOWNS[] = { 954 { fmtMusicFileListIntro, 1, _cdaTrackTableIntro, _cdaTrackTableIntroSize >> 1 }, 955 { fmtMusicFileListIngame, 1, _cdaTrackTableIngame, _cdaTrackTableIngameSize >> 1 }, 956 { fmtMusicFileListFinale, 1, _cdaTrackTableFinale, _cdaTrackTableFinaleSize >> 1 } 957 }; 958 _soundData = (_flags.platform == Common::kPlatformPC) ? soundData_PC : soundData_TOWNS; 959 960 // setup sequence data 961 const uint8 *seqData = _staticres->loadRawData(k2SeqplaySeqData, tmp); 962 963 static const Seqproc hofSequenceCallbacks[] = { 0, 964 &KyraEngine_v2::seq_introWestwood, 965 &KyraEngine_v2::seq_introTitle, &KyraEngine_v2::seq_introOverview, 966 &KyraEngine_v2::seq_introLibrary, &KyraEngine_v2::seq_introHand, 967 &KyraEngine_v2::seq_introPoint, &KyraEngine_v2::seq_introZanfaun, 968 &KyraEngine_v2::seq_finaleFunters, &KyraEngine_v2::seq_finaleFerb, 969 &KyraEngine_v2::seq_finaleFish, &KyraEngine_v2::seq_finaleFheep, 970 &KyraEngine_v2::seq_finaleFarmer, &KyraEngine_v2::seq_finaleFuards, 971 &KyraEngine_v2::seq_finaleFirates, &KyraEngine_v2::seq_finaleFrash 972 }; 973 974 static const Seqproc hofNestedSequenceCallbacks[] = { 975 &KyraEngine_v2::seq_finaleFiggle, &KyraEngine_v2::seq_introOver1, 976 &KyraEngine_v2::seq_introOver2, &KyraEngine_v2::seq_introForest, 977 &KyraEngine_v2::seq_introDragon, &KyraEngine_v2::seq_introDarm, 978 &KyraEngine_v2::seq_introLibrary2, &KyraEngine_v2::seq_introLibrary2, 979 &KyraEngine_v2::seq_introMarco, &KyraEngine_v2::seq_introHand1a, 980 &KyraEngine_v2::seq_introHand1b, &KyraEngine_v2::seq_introHand1c, 981 &KyraEngine_v2::seq_introHand2, &KyraEngine_v2::seq_introHand3, 0 982 }; 983 984 static const Seqproc hofDemoSequenceCallbacks[] = { 985 0 // XXX 986 }; 987 988 static const Seqproc hofDemoNestedSequenceCallbacks[] = { 989 0 // XXX 990 }; 991 992 static const Seqproc lolDemoSequenceCallbacks[] = { 993 0 // XXX 994 }; 995 996 uint16 *hdr = (uint16*) seqData; 997 uint16 numSeq = READ_LE_UINT16(hdr++); 998 uint16 hdrSize = READ_LE_UINT16(hdr) - 1; 999 1000 const Seqproc * cb = hofSequenceCallbacks; 1001 const Seqproc * ncb = hofNestedSequenceCallbacks; 1002 1003 _sequences = new Sequence[numSeq]; 1004 for (int i = 0; i < numSeq; i++) { 1005 uint8 *offset = (uint8 *) (seqData + READ_LE_UINT16(hdr++)); 1006 _sequences[i].flags = READ_LE_UINT16(offset); 1007 offset += 2; 1008 _sequences[i].wsaFile = (const char *) offset; 1009 offset += 14; 1010 _sequences[i].cpsFile = (const char *) offset; 1011 offset += 14; 1012 _sequences[i].startupCommand = *offset++; 1013 _sequences[i].finalCommand = *offset++; 1014 _sequences[i].stringIndex1 = READ_LE_UINT16(offset); 1015 offset += 2; 1016 _sequences[i].stringIndex2 = READ_LE_UINT16(offset); 1017 offset += 2; 1018 _sequences[i].startFrame = READ_LE_UINT16(offset); 1019 offset += 2; 1020 _sequences[i].numFrames = READ_LE_UINT16(offset); 1021 offset += 2; 1022 _sequences[i].frameDelay = READ_LE_UINT16(offset); 1023 offset += 2; 1024 _sequences[i].xPos = READ_LE_UINT16(offset); 1025 offset += 2; 1026 _sequences[i].yPos = READ_LE_UINT16(offset); 1027 offset += 2; 1028 _sequences[i].duration = READ_LE_UINT16(offset); 1029 _sequences[i].callback = cb[i]; 1030 } 1031 1032 if (hdr > ((uint16*)(seqData + hdrSize))) 1033 return; 1034 1035 numSeq = READ_LE_UINT16(hdr++); 1036 _nSequences = new NestedSequence[numSeq]; 1037 for (int i = 0; i < numSeq; i++) { 1038 uint8 *offset = (uint8 *) (seqData + READ_LE_UINT16(hdr++)); 1039 _nSequences[i].flags = READ_LE_UINT16(offset); 1040 offset += 2; 1041 _nSequences[i].wsaFile = (const char *) offset; 1042 offset += 14; 1043 _nSequences[i].startframe = READ_LE_UINT16(offset); 1044 offset += 2; 1045 _nSequences[i].endFrame = READ_LE_UINT16(offset); 1046 offset += 2; 1047 _nSequences[i].frameDelay = READ_LE_UINT16(offset); 1048 offset += 2; 1049 _nSequences[i].x = READ_LE_UINT16(offset); 1050 offset += 2; 1051 _nSequences[i].y = READ_LE_UINT16(offset); 1052 offset += 2; 1053 uint16 ctrlOffs = READ_LE_UINT16(offset); 1054 offset += 2; 1055 _nSequences[i].startupCommand = READ_LE_UINT16(offset); 1056 offset += 2; 1057 _nSequences[i].finalCommand = READ_LE_UINT16(offset); 1058 _nSequences[i].callback = ncb[i]; 1059 _nSequences[i].wsaControl = ctrlOffs ? (uint16*) (seqData + ctrlOffs) : 0; 1060 } 1061 } 1062 857 1063 const ScreenDim Screen::_screenDimTable[] = { 858 1064 { 0x00, 0x00, 0x28, 0xC8, 0x0F, 0x0C, 0x00, 0x00 }, 859 1065 { 0x08, 0x48, 0x18, 0x38, 0x0F, 0x0C, 0x00, 0x00 }, … … 904 1110 0, -2, -2, -2, 0, 2, 2, 2 905 1111 }; 906 1112 907 const char *KyraEngine_v1::_soundFiles[] = {908 "KYRA1A",909 "KYRA1B",910 "KYRA2A",911 "KYRA3A",912 "KYRA4A",913 "KYRA4B",914 "KYRA5A",915 "KYRA5B",916 "KYRAMISC",917 "INTRO"918 };919 920 const char *KyraEngine_v1::_soundFilesTowns[] = {921 "TW_INTRO.SFX",922 "TW_SCEN1.SFX",923 "TW_SCEN2.SFX",924 "TW_SCEN3.SFX",925 "TW_SCEN4.SFX",926 "TW_SCEN5.SFX"927 };928 929 const int32 KyraEngine_v1::_cdaTrackTable[] = {930 0x04000, 1, 0, 0x05480, 1, 6, 0x05E70, 0, 1,931 0x06D90, 1, 3, 0x072C0, 0, -1, 0x075F0, 1, -1,932 0x07880, 1, -1, 0x089C0, 0, -1, 0x09080, 0, -1,933 0x091D0, 1, 4, 0x0A880, 1, 5, 0x0AF50, 0, -1,934 0x0B1A0, 1, -1, 0x0B870, 0, -1, 0x0BCF0, 1, -1,935 0x0C5D0, 1, 7, 0x0D3E0, 1, 8, 0x0e7b0, 1, 2,936 0x0edc0, 0, -1, 0x0eef0, 1, 9, 0x10540, 1, 10,937 0x10d80, 0, -1, 0x10E30, 0, -1, 0x10FC0, 0, -1,938 0x11310, 1, -1, 0x11A20, 1, -1, 0x12380, 0, -1,939 0x12540, 1, -1, 0x12730, 1, -1, 0x12A90, 1, 11,940 0x134D0, 0, -1, 0x00000, 0, -1, 0x13770, 0, -1,941 0x00000, 0, -1, 0x00000, 0, -1, 0x00000, 0, -1,942 0x00000, 0, -1, 0x14710, 1, 12, 0x15DF0, 1, 13,943 0x16030, 1, 14, 0x17030, 0, -1, 0x17650, 0, -1,944 0x134D0, 0, -1, 0x178E0, 1, -1, 0x18200, 0, -1,945 0x18320, 0, -1, 0x184A0, 0, -1, 0x18BB0, 0, -1,946 0x19040, 0, 19, 0x19B50, 0, 20, 0x17650, 0, -1,947 0x1A730, 1, 21, 0x00000, 0, -1, 0x12380, 0, -1,948 0x1B810, 0, -1, 0x1BA50, 0, 15, 0x1C190, 0, 16,949 0x1CA50, 0, 17, 0x1D100, 0, 18950 };951 952 const AudioDataStruct KyraEngine_v1::_soundData_PC[] = {953 { _soundFiles, ARRAYSIZE(_soundFiles), 0, 0 },954 { 0, 0, 0, 0}955 };956 957 const AudioDataStruct KyraEngine_v1::_soundData_TOWNS[] = {958 { _soundFilesTowns, ARRAYSIZE(_soundFilesTowns), _cdaTrackTable, ARRAYSIZE(_cdaTrackTable) },959 { 0, 0, 0, 0}960 };961 1113 const int8 KyraEngine_v1::_charXPosTable[] = { 962 1114 0, 4, 4, 4, 0, -4, -4, -4 963 1115 }; … … 1182 1334 1183 1335 // kyra 2 static res 1184 1336 1185 const char *KyraEngine_v2::_sequenceStrings_PC_EN[] = {1186 "Kyrandia is disappearing!",1187 "Rock by rock...",1188 "...and tree by tree.",1189 "Kyrandia ceases to exist!",1190 "The Royal Mystics are baffled.",1191 "Every reference has been consulted.",1192 "Even Marko and his new valet have been allowed into the conference.",1193 "Luckily, the Hand was experienced in these matters.",1194 "And finally a plan was approved...",1195 "...that required a magic Anchor Stone...",1196 "...to be retrieved from the center of the world.",1197 "Zanthia, youngest of the Kyrandian Mystics, has been selected to retrieve the Stone.",1198 "Thank you for playing The Hand of Fate.",1199 "This should be enough blueberries to open a portal to the center of the world.",1200 " DUMMY STRING... ",1201 " DUMMY STRING... ",1202 "Hey! All my equipment has been stolen!",1203 " DUMMY STRING... ",1204 "If they think I'm going to walk all the way down there, they're nuts!",1205 " DUMMY STRING... ",1206 " DUMMY STRING... ",1207 "Hurry up Faun!",1208 1209 "Boy, that was a close call!",1210 "You said it pal. I, for one, am never going hunting again!",1211 "Ribbit.",1212 "How many times do I have to tell you? You're a toad.",1213 "Oh no! We're out of cheese!",1214 "Let's try this earwax. It's orange.",1215 "Mommy, when do I get the ivy?",1216 "Get out of here, shoo!",1217 "You cut, and I'll choose.",1218 "No. You cut and I'll choose.",1219 "I still say it was derivative drivel.",1220 "Aw, you still wouldn't recognize iambic pentameter if it bit you on the butt!",1221 1222 "Executive Producer",1223 "Brett W. Sperry",1224 "Direction & Design",1225 "Rick Gush",1226 "Lead Programmer",1227 "Michael Legg",1228 "Art Management",1229 "Louis Castle",1230 "Joseph B. Hewitt IV",1231 "Lead Artist",1232 "Rick Parks",1233 "Additional Coding by",1234 "Philip W. Gorrow",1235 "Mike Grayford",1236 "Mark McCubbin",1237 "Artists",1238 "Cameron Chun",1239 "Cary Averett",1240 "Cindy Chinn",1241 "Elie Arabian",1242 "Fei Cheng",1243 "Ferby Miguel",1244 "Frank Mendeola",1245 "Jack Martin",1246 "Jerry Moore",1247 "DUMMY STRING... ",1248 "Judith Peterson",1249 "Larry Miller",1250 "Lenny Lee",1251 "Louise Sandoval",1252 "Ren Olsen",1253 "Music & Sounds by",1254 "Paul Mudra",1255 "Frank Klepacki",1256 "Dwight Okahara",1257 "Pat Collins",1258 "Quality Assurance by",1259 "Glenn Sperry",1260 "Michael Lightner",1261 "William Foster",1262 "Jesse Clemit",1263 "Jeff Fillhaber",1264 "Manual, Package Design",1265 "& Fulfillment",1266 "Eydie Laramore",1267 "Lisa Marcinko",1268 "Lauren Rifkin",1269 "Congratulations!",1270 "Thank you for playing The Hand of Fate!",1271 "Guest Coding",1272 "Producer Liaison",1273 "Scott Duckett",1274 "Irvine Testers",1275 "Chris McFarland",1276 "Paul Moore",1277 "Chad Soares",1278 "Jared Brinkley",1279 "Jon Willliams",1280 "Chris Toft",1281 "Joe Kucan's Hair by",1282 "Theodore A. Morris",1283 "Load a game",1284 "Introduction",1285 "Start a new game",1286 "Exit the game",1287 "Special Thanks, to",1288 "Sake Joe Bostic-san",1289 "Tim Fritz",1290 "Kenny Dunne",1291 "Thank you for playing \"The Hand of Fate\"."1292 };1293 1294 const char *KyraEngine_v2::_sequenceStrings_TOWNS_EN[] = {1295 "Kyrandia is disappearing!",1296 "Rock by rock...",1297 "...and tree by tree.",1298 "Kyrandia ceases to exist!",1299 "The Royal Mystics are baffled.",1300 "Every reference has been consulted.",1301 "Even Marko and his new valet have been allowed into the conference.",1302 "Luckily, the Hand was experienced in these matters.",1303 "And finally a plan was approved...",1304 "...that required a magic Anchor Stone...",1305 "...to be retrieved from the center of the world.",1306 "Zanthia, youngest of the Kyrandian Mystics, has been selected to retrieve the Stone.",1307 "Thank you for playing The Hand of Fate.",1308 "This should be enough blueberries to open a portal to the center of the world.",1309 " DUMMY STRING... ",1310 " DUMMY STRING... ",1311 "Hey! All my equipment has been stolen!",1312 " DUMMY STRING... ",1313 "If they think I'm going to walk all the way down there, they're nuts!",1314 " DUMMY STRING... ",1315 " DUMMY STRING... ",1316 "Hurry up Faun!",1317 1318 "Boy, that was a close call!",1319 "You said it pal. I, for one, am never going hunting again!",1320 "Ribbit.",1321 "How many times do I have to tell you? You're a toad.",1322 "Oh no! We're out of cheese!",1323 "Let's try this earwax. It's orange.",1324 "Mommy, when do I get the ivy?",1325 "Get out of here, shoo!",1326 "You cut, and I'll choose.",1327 "No. You cut and I'll choose.",1328 "I still say it was derivative drivel.",1329 "Aw, you still wouldn't recognize iambic pentameter if it bit you on the butt!",1330 1331 "Executive Producer",1332 "Brett W. Sperry",1333 "Designed & Directed by",1334 "Rick Gush",1335 "Lead Programmer",1336 "Michael Legg",1337 "Art Management",1338 "Louis Castle",1339 "Joseph B. Hewitt IV",1340 "Lead Artist",1341 "Rick Parks",1342 "Additional Coding by",1343 "Philip W. Gorrow",1344 "Matt Collins",1345 "Mark McCubbin",1346 "Artists",1347 "Cameron Chun",1348 "Cary Averett",1349 "Cindy Chinn",1350 "Elie Arabian",1351 "Fei Cheng",1352 "Ferby Miguel",1353 "Frank Mendeola",1354 "Jack Martin",1355 "Jerry Moore",1356 "",1357 "Judith Peterson",1358 "Larry Miller",1359 "Lenny Lee",1360 "Louise Sandoval",1361 "Ren Olsen",1362 "Music & Sounds by",1363 "Paul Mudra",1364 "Frank Klepacki",1365 "Dwight Okahara",1366 "Pat Collins",1367 "Qualilty Assurance by",1368 "Glenn Sperry",1369 "Michael Lightner",1370 "William Foster",1371 "Jesse Clemit",1372 "Jeff Fillhaber",1373 "Manual, Package Design",1374 "& Fulfillment",1375 "Eydie Laramore",1376 "Lisa Marcinko",1377 "Lauren Rifkin",1378 "Congratulations!",1379 "Thank you for playing The Hand of Fate!",1380 "Guest Coding",1381 "Producer Liaison",1382 "Scott Duckett",1383 "Irvine Testers",1384 "Chris McFarland",1385 "Paul Moore",1386 "Chad Soares",1387 "Jared Brinkley",1388 "Jon Willliams",1389 "Chris Toft",1390 "Chris's Hair by",1391 "Cumulo Nimbus",1392 "Load a game",1393 "Introduction",1394 "Start a new game",1395 "Exit the game",1396 "Special Thanks to",1397 "Sake Joe Bostic-san",1398 "Tim Fritz",1399 "Kenny Dunne",1400 "Yukio Sekiguchi (Japan)",1401 "Takeshi Abo (Japan)"1402 };1403 1404 const int KyraEngine_v2::_sequenceStringsSize_PC_EN = ARRAYSIZE(KyraEngine_v2::_sequenceStrings_PC_EN);1405 const int KyraEngine_v2::_sequenceStringsSize_TOWNS_EN = ARRAYSIZE(KyraEngine_v2::_sequenceStrings_TOWNS_EN);1406 1407 const char *KyraEngine_v2::_sequenceSoundList_PC[] = {1408 "eintro1",1409 "eintro2",1410 "eintro3",1411 "eintro4",1412 "eintro5",1413 "eintro6",1414 "eintro7",1415 "eintro8",1416 "eintro9",1417 "eintro10",1418 "eintro11",1419 "eintro12",1420 "eglow",1421 "0000210",1422 "0000130",1423 "0000180",1424 "0000160",1425 1426 "asong",1427 "crowcaw",1428 "eyerub2",1429 "pluck3",1430 "rodnreel",1431 "frog1",1432 "scavmov2",1433 "lambmom3",1434 "lambkid1",1435 "thunder2",1436 "thunder3",1437 "wind6",1438 "h2odrop2",1439 "gasleak",1440 "polgulp1",1441 "hndslap1",1442 "burp1",1443 "0000220",1444 "0000230",1445 "0000250",1446 "0000260",1447 "0000270",1448 "0000280",1449 "0000290",1450 "0000300",1451 "0000310",1452 "0000320",1453 "0000330",1454 "scream1",1455 "theend"1456 };1457 1458 const char *KyraEngine_v2::_sequenceSoundList_PCFLOPPY[] = {1459 "intro1",1460 "intro2",1461 "intro3",1462 "intro4",1463 "intro5",1464 "intro6",1465 "intro7",1466 "intro8",1467 "intro9",1468 "intro10",1469 "intro11",1470 "intro12",1471 "glow",1472 1473 "asong",1474 "crowcaw",1475 "eyerub2",1476 "pluck3",1477 "rodnreel",1478 "frog1",1479 "scavmov2",1480 "lambmom3",1481 "lambkid1",1482 "thunder2",1483 "thunder3",1484 "wind6",1485 "h2odrop2",1486 "gasleak",1487 "polgulp1",1488 "hndslap1",1489 "burp1",1490 "scream1",1491 "theend"1492 };1493 1494 const char *KyraEngine_v2::_sequenceSoundList_TOWNS[] = {1495 "intro1.pcm",1496 "intro2.pcm",1497 "intro3.pcm",1498 "intro4.pcm",1499 "intro5.pcm",1500 "intro6.pcm",1501 "intro7.pcm",1502 "intro8.pcm",1503 "intro9.pcm",1504 "intro10.pcm",1505 "intro11.pcm",1506 "intro12.pcm",1507 "glow.pcm",1508 1509 "asong.pcm",1510 "crowcaw.pcm",1511 "eyerub2.pcm",1512 "pluck3.pcm",1513 "rodnreel.pcm",1514 "frog1.pcm",1515 "scavmov2.pcm",1516 "lambmom3.pcm",1517 "lambkid1.pcm",1518 "thunder2.pcm",1519 "thunder3.pcm",1520 "wind6.pcm",1521 "h2odrop2.pcm",1522 "gasleak.pcm",1523 "polgulp1.pcm",1524 "hndslap1.pcm",1525 "burp1.pcm",1526 "scream1.pcm",1527 "theend.pcm"1528 };1529 1530 const int KyraEngine_v2::_sequenceSoundListSize_PC = ARRAYSIZE(KyraEngine_v2::_sequenceSoundList_PC);1531 const int KyraEngine_v2::_sequenceSoundListSize_PCFLOPPY = ARRAYSIZE(KyraEngine_v2::_sequenceSoundList_PCFLOPPY);1532 const int KyraEngine_v2::_sequenceSoundListSize_TOWNS = ARRAYSIZE(KyraEngine_v2::_sequenceSoundList_TOWNS);1533 1534 1337 const uint8 KyraEngine_v2::_seqTextColorPresets[] = { 0x01, 0x01, 0x00, 0x3f, 0x3f, 0x3f }; 1535 1338 1536 1339 const char *KyraEngine_v2::_languageExtension[] = { … … 1586 1389 0, 2, 0, 0, 0, 0, 0, 0 1587 1390 }; 1588 1391 1589 const char *KyraEngine_v2::_dosSoundFileListIntro[] = { "K2INTRO" };1590 const char *KyraEngine_v2::_dosSoundFileListFinale[] = { "K2FINALE" };1591 1592 const char *KyraEngine_v2::_dosSoundFileList[] = {1593 "K2TEST1",1594 "K2TEST2",1595 "K2TEST3",1596 "K2TEST4",1597 "K2TEST5",1598 "K2TEST6",1599 "K2TEST7",1600 "K2TEST8",1601 "K2TEST9",1602 "K2TEST10",1603 "K2TEST11",1604 "K2TEST12",1605 "K2TEST13",1606 "K2TEST14",1607 "K2TEST15"1608 };1609 1610 const char *KyraEngine_v2::_fmtSoundFileListIntro[] = { "intro" };1611 const char *KyraEngine_v2::_fmtSoundFileListFinale[] = { "finale" };1612 const char *KyraEngine_v2::_fmtSoundFileList[] = { "k2" };1613 1614 const uint8 KyraEngine_v2::_cdaTrackTableIntro[] = {1615 0x03, 0x01, 0x04, 0x02, 0x05, 0x03, 0x06, 0x04, 0x07, 0x05, 0x08, 0x061616 };1617 1618 const uint8 KyraEngine_v2::_cdaTrackTableIngame[] = {1619 0x02, 0x07, 0x03, 0x08, 0x04, 0x09, 0x07, 0x0A, 0x0C, 0x0B, 0x0D, 0x0C, 0x0E, 0x0D, 0x0F, 0x0E,1620 0x10, 0x0F, 0x12, 0x10, 0x13, 0x11, 0x15, 0x12, 0x17, 0x13, 0x18, 0x14, 0x19, 0x15, 0x1A, 0x16,1621 0x1B, 0x17, 0x1C, 0x18, 0x1D, 0x19, 0x1E, 0x1A, 0x1F, 0x1B, 0x21, 0x1C, 0x22, 0x1D, 0x23, 0x1E,1622 0x24, 0x1F, 0x25, 0x20, 0x26, 0x21, 0x27, 0x22, 0x28, 0x23, 0x29, 0x24, 0x2A, 0x25, 0x2B, 0x26,1623 0x2C, 0x27, 0x2D, 0x28, 0x2E, 0x29, 0x2F, 0x2A, 0x30, 0x2B, 0x31, 0x2C, 0x32, 0x2D, 0x33, 0x2E,1624 0x34, 0x2F, 0x35, 0x30, 0x36, 0x31, 0x37, 0x32, 0x38, 0x33, 0x39, 0x34, 0x3A, 0x35, 0x3B, 0x36,1625 0x3C, 0x37, 0x3D, 0x38, 0x3E, 0x39, 0x3F, 0x3A, 0x40, 0x3B, 0x41, 0x3C, 0x42, 0x3D, 0x43, 0x3E,1626 0x44, 0x3F, 0x45, 0x40, 0x46, 0x41, 0x47, 0x42, 0x48, 0x43, 0x49, 0x44, 0x4A, 0x45, 0x4B, 0x46,1627 0x4C, 0x47, 0x4D, 0x48, 0x4E, 0x49, 0x4F, 0x4A, 0x50, 0x4B, 0x51, 0x4C, 0x52, 0x4D, 0x53, 0x4E,1628 0x54, 0x4F, 0x55, 0x50, 0x56, 0x51, 0x57, 0x521629 };1630 1631 const uint8 KyraEngine_v2::_cdaTrackTableFinale[] = {1632 0x03, 0x53, 0x04, 0x541633 };1634 1635 const AudioDataStruct KyraEngine_v2::_soundData_PC[] = {1636 { _dosSoundFileListIntro, ARRAYSIZE(_dosSoundFileListIntro), 0, 0 },1637 { _dosSoundFileList, ARRAYSIZE(_dosSoundFileList), 0, 0},1638 { _dosSoundFileListFinale, ARRAYSIZE(_dosSoundFileListFinale), 0, 0 }1639 };1640 1641 const AudioDataStruct KyraEngine_v2::_soundData_TOWNS[] = {1642 { _fmtSoundFileListIntro, ARRAYSIZE(_fmtSoundFileListIntro), _cdaTrackTableIntro, ARRAYSIZE(_cdaTrackTableIntro) >> 1 },1643 { _fmtSoundFileList, ARRAYSIZE(_fmtSoundFileList),_cdaTrackTableIngame, ARRAYSIZE(_cdaTrackTableIngame) >> 1 },1644 { _fmtSoundFileListFinale, ARRAYSIZE(_fmtSoundFileListFinale),_cdaTrackTableFinale, ARRAYSIZE(_cdaTrackTableFinale) >> 1 }1645 };1646 1647 1392 const int KyraEngine_v2::_itemStringMapSize = ARRAYSIZE(KyraEngine_v2::_itemStringMap); 1648 1393 1649 1394 const int8 KyraEngine_v2::_dosTrackMap[] = {