Ticket #8991: Gob_Strangerke_090407.patch
File Gob_Strangerke_090407.patch, 35.0 KB (added by , 15 years ago) |
---|
-
dists/msvc9/gob.vcproj
284 284 > 285 285 </File> 286 286 <File 287 RelativePath="..\..\engines\gob\draw_fascin.cpp" 288 > 289 </File> 290 <File 287 291 RelativePath="..\..\engines\gob\draw_v1.cpp" 288 292 > 289 293 </File> … … 404 408 > 405 409 </File> 406 410 <File 411 RelativePath="..\..\engines\gob\inter_fascin.cpp" 412 > 413 </File> 414 <File 407 415 RelativePath="..\..\engines\gob\inter_v1.cpp" 408 416 > 409 417 </File> -
engines/gob/draw.h
211 211 virtual ~Draw_Bargon() {} 212 212 }; 213 213 214 class Draw_Fascin: public Draw_v2 { 215 public: 216 virtual void initScreen(); 217 218 Draw_Fascin(GobEngine *vm); 219 virtual ~Draw_Fascin() {} 220 }; 221 214 222 // Draw operations 215 223 216 224 #define DRAW_BLITSURF 0 -
engines/gob/draw_fascin.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 "gob/gob.h" 27 #include "gob/draw.h" 28 #include "gob/global.h" 29 #include "gob/video.h" 30 31 namespace Gob { 32 33 Draw_Fascin::Draw_Fascin(GobEngine *vm) : Draw_v2(vm) { 34 } 35 36 void Draw_Fascin::initScreen(void) { 37 _vm->_global->_videoMode = 0x14; 38 _vm->_video->_surfWidth = 640; 39 _vm->_video->initPrimary(_vm->_global->_videoMode); 40 41 Draw_v2::initScreen(); 42 } 43 44 } // End of namespace Gob -
engines/gob/game.cpp
Property changes on: engines\gob\draw_fascin.cpp ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:keywords + Date Rev Author URL Id Added: svn:eol-style + native
557 557 _vm->_inter->_variables = 0; 558 558 559 559 strncpy0(_curTotFile, newTotFile, 9); 560 strcat(_curTotFile, ".TOT"); 560 if (_vm->getGameType() == kGameTypeGeisha) 561 strcat(_curTotFile, ".0OT"); 562 else 563 strcat(_curTotFile, ".TOT"); 561 564 562 565 if (_vm->_inter->_terminate != 0) 563 566 return; -
engines/gob/game_v1.cpp
71 71 _vm->_draw->_fontToSprite[i].height = -1; 72 72 } 73 73 74 if (_vm->getPlatform() == Common::kPlatformMacintosh) 74 if ((_vm->getPlatform() == Common::kPlatformMacintosh)|| 75 (_vm->getPlatform() == Common::kPlatformWindows)) 75 76 _vm->_sound->adlibStop(); 76 77 else 77 78 _vm->_sound->cdStop(); -
engines/gob/gob.cpp
106 106 // Stop all mixer streams (except for the permanent ones). 107 107 _vm->_mixer->stopAll(); 108 108 109 delete[] _startStk; 109 110 delete[] _startTot; 110 delete[] _startTot0;111 111 } 112 112 113 113 const char *GobEngine::getLangDesc(int16 language) const { … … 249 249 } 250 250 _global->_languageWanted = _global->_language; 251 251 252 _init->initGame( 0);252 _init->initGame(); 253 253 254 254 return Common::kNoError; 255 255 } … … 285 285 _sound = new Sound(this); 286 286 287 287 switch (_gameType) { 288 case kGameTypeGob1: 289 _init = new Init_v1(this); 290 _video = new Video_v1(this); 291 _inter = new Inter_v1(this); 292 _parse = new Parse_v1(this); 293 _mult = new Mult_v1(this); 294 _draw = new Draw_v1(this); 295 _game = new Game_v1(this); 296 _map = new Map_v1(this); 297 _goblin = new Goblin_v1(this); 298 _scenery = new Scenery_v1(this); 299 break; 288 case kGameTypeGeisha: 289 case kGameTypeGob1: 290 _init = new Init_v1(this); 291 _video = new Video_v1(this); 292 _inter = new Inter_v1(this); 293 _parse = new Parse_v1(this); 294 _mult = new Mult_v1(this); 295 _draw = new Draw_v1(this); 296 _game = new Game_v1(this); 297 _map = new Map_v1(this); 298 _goblin = new Goblin_v1(this); 299 _scenery = new Scenery_v1(this); 300 break; 300 301 301 case kGameTypeGob2:302 303 304 _inter = new Inter_v2(this);305 _parse = new Parse_v2(this);306 307 308 309 310 311 312 313 302 case kGameTypeFascination: 303 _init = new Init_v2(this); 304 _video = new Video_v2(this); 305 _inter = new Inter_Fascination(this); 306 _parse = new Parse_v1(this); 307 _mult = new Mult_v2(this); 308 _draw = new Draw_v2(this); 309 _game = new Game_v2(this); 310 _map = new Map_v2(this); 311 _goblin = new Goblin_v2(this); 312 _scenery = new Scenery_v2(this); 313 _saveLoad = new SaveLoad_v2(this, _targetName.c_str()); 314 break; 314 315 315 case kGameTypeBargon:316 317 318 _inter = new Inter_Bargon(this);319 320 321 _draw = new Draw_Bargon(this);322 323 324 325 326 327 316 case kGameTypeGob2: 317 _init = new Init_v2(this); 318 _video = new Video_v2(this); 319 _inter = new Inter_v2(this); 320 _parse = new Parse_v2(this); 321 _mult = new Mult_v2(this); 322 _draw = new Draw_v2(this); 323 _game = new Game_v2(this); 324 _map = new Map_v2(this); 325 _goblin = new Goblin_v2(this); 326 _scenery = new Scenery_v2(this); 327 _saveLoad = new SaveLoad_v2(this, _targetName.c_str()); 328 break; 328 329 329 case kGameTypeWeen:330 331 332 _inter = new Inter_v2(this);333 334 335 _draw = new Draw_v2(this);336 337 338 339 340 341 330 case kGameTypeBargon: 331 _init = new Init_v2(this); 332 _video = new Video_v2(this); 333 _inter = new Inter_Bargon(this); 334 _parse = new Parse_v2(this); 335 _mult = new Mult_v2(this); 336 _draw = new Draw_Bargon(this); 337 _game = new Game_v2(this); 338 _map = new Map_v2(this); 339 _goblin = new Goblin_v2(this); 340 _scenery = new Scenery_v2(this); 341 _saveLoad = new SaveLoad_v2(this, _targetName.c_str()); 342 break; 342 343 343 case kGameTypeGob3: 344 case kGameTypeInca2: 345 _init = new Init_v3(this); 346 _video = new Video_v2(this); 347 _inter = new Inter_v3(this); 348 _parse = new Parse_v2(this); 349 _mult = new Mult_v2(this); 350 _draw = new Draw_v2(this); 351 _game = new Game_v2(this); 352 _map = new Map_v2(this); 353 _goblin = new Goblin_v3(this); 354 _scenery = new Scenery_v2(this); 355 _saveLoad = new SaveLoad_v3(this, _targetName.c_str()); 356 break; 344 case kGameTypeWeen: 345 _init = new Init_v2(this); 346 _video = new Video_v2(this); 347 _inter = new Inter_v2(this); 348 _parse = new Parse_v2(this); 349 _mult = new Mult_v2(this); 350 _draw = new Draw_v2(this); 351 _game = new Game_v2(this); 352 _map = new Map_v2(this); 353 _goblin = new Goblin_v2(this); 354 _scenery = new Scenery_v2(this); 355 _saveLoad = new SaveLoad_v2(this, _targetName.c_str()); 356 break; 357 357 358 case kGameTypeLostInTime: 359 _init = new Init_v3(this); 360 _video = new Video_v2(this); 361 _inter = new Inter_v3(this); 362 _parse = new Parse_v2(this); 363 _mult = new Mult_v2(this); 364 _draw = new Draw_v2(this); 365 _game = new Game_v2(this); 366 _map = new Map_v2(this); 367 _goblin = new Goblin_v3(this); 368 _scenery = new Scenery_v2(this); 369 _saveLoad = new SaveLoad_v3(this, _targetName.c_str(), 4768, 0, 50); 370 break; 358 case kGameTypeGob3: 359 case kGameTypeInca2: 360 _init = new Init_v3(this); 361 _video = new Video_v2(this); 362 _inter = new Inter_v3(this); 363 _parse = new Parse_v2(this); 364 _mult = new Mult_v2(this); 365 _draw = new Draw_v2(this); 366 _game = new Game_v2(this); 367 _map = new Map_v2(this); 368 _goblin = new Goblin_v3(this); 369 _scenery = new Scenery_v2(this); 370 _saveLoad = new SaveLoad_v3(this, _targetName.c_str()); 371 break; 371 372 372 case kGameTypeWoodruff:373 374 375 _inter = new Inter_v4(this);376 377 378 379 380 _map = new Map_v4(this);381 _goblin = new Goblin_v4(this);382 383 _saveLoad = new SaveLoad_v4(this, _targetName.c_str());384 373 case kGameTypeLostInTime: 374 _init = new Init_v3(this); 375 _video = new Video_v2(this); 376 _inter = new Inter_v3(this); 377 _parse = new Parse_v2(this); 378 _mult = new Mult_v2(this); 379 _draw = new Draw_v2(this); 380 _game = new Game_v2(this); 381 _map = new Map_v2(this); 382 _goblin = new Goblin_v3(this); 383 _scenery = new Scenery_v2(this); 384 _saveLoad = new SaveLoad_v3(this, _targetName.c_str(), 4768, 0, 50); 385 break; 385 386 386 case kGameTypeDynasty: 387 _init = new Init_v3(this); 388 _video = new Video_v2(this); 389 _inter = new Inter_v5(this); 390 _parse = new Parse_v2(this); 391 _mult = new Mult_v2(this); 392 _draw = new Draw_v2(this); 393 _game = new Game_v2(this); 394 _map = new Map_v4(this); 395 _goblin = new Goblin_v4(this); 396 _scenery = new Scenery_v2(this); 397 _saveLoad = new SaveLoad_v4(this, _targetName.c_str()); 398 break; 387 case kGameTypeArchibald: 388 case kGameTypeSpirou: 389 case kGameTypeWoodruff: 390 _init = new Init_v3(this); 391 _video = new Video_v2(this); 392 _inter = new Inter_v4(this); 393 _parse = new Parse_v2(this); 394 _mult = new Mult_v2(this); 395 _draw = new Draw_v2(this); 396 _game = new Game_v2(this); 397 _map = new Map_v4(this); 398 _goblin = new Goblin_v4(this); 399 _scenery = new Scenery_v2(this); 400 _saveLoad = new SaveLoad_v4(this, _targetName.c_str()); 401 break; 399 402 400 case kGameTypeUrban:401 402 _video = new Video_v6(this);403 _inter = new Inter_v6(this);404 405 406 407 _game = new Game_v6(this);408 409 410 411 _saveLoad = new SaveLoad_v6(this, _targetName.c_str());412 403 case kGameTypeDynasty: 404 _init = new Init_v3(this); 405 _video = new Video_v2(this); 406 _inter = new Inter_v5(this); 407 _parse = new Parse_v2(this); 408 _mult = new Mult_v2(this); 409 _draw = new Draw_v2(this); 410 _game = new Game_v2(this); 411 _map = new Map_v4(this); 412 _goblin = new Goblin_v4(this); 413 _scenery = new Scenery_v2(this); 414 _saveLoad = new SaveLoad_v4(this, _targetName.c_str()); 415 break; 413 416 414 default: 415 deinitGameParts(); 416 return false; 417 break; 417 case kGameTypeAdibou4: 418 case kGameTypeUrban: 419 _init = new Init_v3(this); 420 _video = new Video_v6(this); 421 _inter = new Inter_v6(this); 422 _parse = new Parse_v2(this); 423 _mult = new Mult_v2(this); 424 _draw = new Draw_v2(this); 425 _game = new Game_v6(this); 426 _map = new Map_v4(this); 427 _goblin = new Goblin_v4(this); 428 _scenery = new Scenery_v2(this); 429 _saveLoad = new SaveLoad_v6(this, _targetName.c_str()); 430 break; 431 432 default: 433 deinitGameParts(); 434 return false; 435 break; 418 436 } 419 437 420 438 if (is640()) { -
engines/gob/gob.h
95 95 kGameTypeLostInTime, 96 96 kGameTypeInca2, 97 97 kGameTypeDynasty, 98 kGameTypeUrban 98 kGameTypeUrban, 99 kGameTypeArchibald, 100 kGameTypeSpirou, 101 kGameTypeFascination, 102 kGameTypeGeisha, 103 kGameTypeAdibou4 99 104 }; 100 105 101 106 enum Features { … … 208 213 uint16 _height; 209 214 uint8 _mode; 210 215 216 char *_startStk; 211 217 char *_startTot; 212 char *_startTot0;213 218 bool _copyProtection; 214 219 bool _noMusic; 215 220 -
engines/gob/init.cpp
55 55 _vm->_dataIO->closeDataFile(); 56 56 } 57 57 58 void Init::initGame( const char *totName) {58 void Init::initGame() { 59 59 int16 handle2; 60 60 int16 handle; 61 61 int16 imdHandle; … … 66 66 67 67 initVideo(); 68 68 69 // The Lost In Time demo uses different file prefix 70 if (_vm->getGameType() == kGameTypeLostInTime) { 71 handle2 = _vm->_dataIO->openData("demo.stk"); 72 if (handle2 >= 0) { 73 _vm->_dataIO->closeData(handle2); 74 _vm->_dataIO->openDataFile("demo.stk"); 75 } 76 } 77 78 handle2 = _vm->_dataIO->openData("intro.stk"); 69 handle2 = _vm->_dataIO->openData(_vm->_startStk); 79 70 if (handle2 >= 0) { 80 71 _vm->_dataIO->closeData(handle2); 81 _vm->_dataIO->openDataFile( "intro.stk");72 _vm->_dataIO->openDataFile(_vm->_startStk); 82 73 } 83 74 84 75 _vm->_util->initInput(); … … 142 133 delete[] infBuf; 143 134 } 144 135 145 if (totName) { 146 strncpy0(buffer, totName, 15); 147 strcat(buffer, ".tot"); 148 } else 149 strncpy0(buffer, _vm->_startTot, 19); 150 136 strcpy(buffer, _vm->_startTot); 151 137 handle = _vm->_dataIO->openData(buffer); 152 138 153 139 if (handle >= 0) { -
engines/gob/init.h
32 32 33 33 class Init { 34 34 public: 35 void initGame( const char *totFile);35 void initGame(); 36 36 37 37 virtual void initVideo() = 0; 38 38 -
engines/gob/init_v2.cpp
51 51 _vm->_global->_colorCount = 16; 52 52 if (!_vm->isEGA() && 53 53 ((_vm->getPlatform() == Common::kPlatformPC) || 54 (_vm->getPlatform() == Common::kPlatformMacintosh)) && 54 (_vm->getPlatform() == Common::kPlatformMacintosh) || 55 (_vm->getPlatform() == Common::kPlatformWindows)) && 55 56 ((_vm->_global->_videoMode == 0x13) || 56 57 (_vm->_global->_videoMode == 0x14))) 57 58 _vm->_global->_colorCount = 256; -
engines/gob/inter.cpp
231 231 break; 232 232 233 233 // WORKAROUND: 234 // The EGA and Mac versions of gob1 doesn't add a delay after showing235 // images between levels. We manually add it here.234 // The EGA, Mac and Windows versions of gob1 doesn't add a delay after 235 // showing images between levels. We manually add it here. 236 236 if ((_vm->getGameType() == kGameTypeGob1) && 237 (_vm->isEGA() || (_vm->getPlatform() == Common::kPlatformMacintosh))) { 237 ( _vm->isEGA() || 238 (_vm->getPlatform() == Common::kPlatformMacintosh) || 239 (_vm->getPlatform() == Common::kPlatformWindows))) { 238 240 239 241 int addr = _vm->_global->_inter_execPtr-_vm->_game->_totFileData; 240 242 -
engines/gob/inter.h
451 451 void oBargon_intro9(OpGobParams ¶ms); 452 452 }; 453 453 454 class Inter_Fascination : public Inter_v2 { 455 public: 456 Inter_Fascination(GobEngine *vm); 457 virtual ~Inter_Fascination() {} 458 459 protected: 460 typedef void (Inter_Fascination::*OpcodeDrawProcFascination)(); 461 typedef bool (Inter_Fascination::*OpcodeFuncProcFascination)(OpFuncParams &); 462 typedef void (Inter_Fascination::*OpcodeGoblinProcFascination)(OpGobParams &); 463 struct OpcodeDrawEntryFascination { 464 OpcodeDrawProcFascination proc; 465 const char *desc; 466 }; 467 struct OpcodeFuncEntryFascination { 468 OpcodeFuncProcFascination proc; 469 const char *desc; 470 }; 471 struct OpcodeGoblinEntryFascination { 472 OpcodeGoblinProcFascination proc; 473 const char *desc; 474 }; 475 const OpcodeDrawEntryFascination *_opcodesDrawFascination; 476 const OpcodeFuncEntryFascination *_opcodesFuncFascination; 477 const OpcodeGoblinEntryFascination *_opcodesGoblinFascination; 478 static const int _goblinFuncLookUp[][2]; 479 480 virtual void setupOpcodes(); 481 virtual void executeDrawOpcode(byte i); 482 virtual bool executeFuncOpcode(byte i, byte j, OpFuncParams ¶ms); 483 virtual void executeGoblinOpcode(int i, OpGobParams ¶ms); 484 virtual const char *getOpcodeDrawDesc(byte i); 485 virtual const char *getOpcodeFuncDesc(byte i, byte j); 486 virtual const char *getOpcodeGoblinDesc(int i); 487 488 void o2_geUnknown2(OpGobParams ¶ms); 489 void o2_geUnknown3(OpGobParams ¶ms); 490 void o2_geUnknown4(OpGobParams ¶ms); 491 void o2_geUnknown10(OpGobParams ¶ms); 492 bool o2_feUnknown4(OpFuncParams ¶ms); 493 void o2_cdUnknown3(); 494 void o2_cdUnknown4(); 495 void o2_cdUnknown5(); 496 void o2_cdUnknown6(); 497 void o2_cdUnknown11(); 498 }; 499 454 500 class Inter_v3 : public Inter_v2 { 455 501 public: 456 502 Inter_v3(GobEngine *vm); -
engines/gob/inter_fascin.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/endian.h" 27 28 #include "gob/gob.h" 29 #include "gob/inter.h" 30 #include "gob/global.h" 31 #include "gob/util.h" 32 #include "gob/dataio.h" 33 #include "gob/draw.h" 34 #include "gob/parse.h" 35 #include "gob/game.h" 36 #include "gob/palanim.h" 37 #include "gob/video.h" 38 #include "gob/videoplayer.h" 39 #include "gob/sound/sound.h" 40 41 namespace Gob { 42 43 #define OPCODE(x) _OPCODE(Inter_Fascination, x) 44 45 const int Inter_Fascination::_goblinFuncLookUp[][2] = { 46 {1, 0}, 47 {2, 1}, 48 {3, 2}, 49 {4, 3}, 50 {5, 4}, 51 {6, 5}, 52 {7, 6}, 53 {8, 7}, 54 {9, 8}, 55 {10, 9}, 56 {11, 10}, 57 {12, 11}, 58 {13, 12}, 59 {14, 13}, 60 {15, 14}, 61 {16, 15}, 62 {21, 16}, 63 {22, 17}, 64 {23, 18}, 65 {24, 19}, 66 {25, 20}, 67 {26, 21}, 68 {27, 22}, 69 {28, 23}, 70 {29, 24}, 71 {30, 25}, 72 {32, 26}, 73 {33, 27}, 74 {34, 28}, 75 {35, 29}, 76 {36, 30}, 77 {37, 31}, 78 {40, 32}, 79 {41, 33}, 80 {42, 34}, 81 {43, 35}, 82 {44, 36}, 83 {50, 37}, 84 {52, 38}, 85 {53, 39}, 86 {100, 40}, 87 {152, 41}, 88 {200, 42}, 89 {201, 43}, 90 {202, 44}, 91 {203, 45}, 92 {204, 46}, 93 {250, 47}, 94 {251, 48}, 95 {252, 49}, 96 {500, 50}, 97 {502, 51}, 98 {503, 52}, 99 {600, 53}, 100 {601, 54}, 101 {602, 55}, 102 {603, 56}, 103 {604, 57}, 104 {605, 58}, 105 {1000, 59}, 106 {1001, 60}, 107 {1002, 61}, 108 {1003, 62}, 109 {1004, 63}, 110 {1005, 64}, 111 {1006, 65}, 112 {1008, 66}, 113 {1009, 67}, 114 {1010, 68}, 115 {1011, 69}, 116 {1015, 70}, 117 {2005, 71} 118 }; 119 120 Inter_Fascination::Inter_Fascination(GobEngine *vm) : Inter_v2(vm) { 121 setupOpcodes(); 122 } 123 124 void Inter_Fascination::setupOpcodes() { 125 static const OpcodeDrawEntryFascination opcodesDraw[256] = { 126 /* 00 */ 127 OPCODE(o1_loadMult), 128 OPCODE(o2_playMult), 129 OPCODE(o1_freeMultKeys), 130 OPCODE(o2_cdUnknown3), 131 /* 04 */ 132 OPCODE(o2_cdUnknown4), 133 OPCODE(o2_cdUnknown5), 134 OPCODE(o2_cdUnknown6), 135 OPCODE(o1_initCursor), 136 /* 08 */ 137 OPCODE(o1_initCursorAnim), 138 OPCODE(o1_clearCursorAnim), 139 OPCODE(o2_setRenderFlags), 140 OPCODE(o2_cdUnknown11), 141 /* 0C */ 142 {NULL, ""}, 143 {NULL, ""}, 144 {NULL, ""}, 145 {NULL, ""}, 146 /* 10 */ 147 OPCODE(o1_loadAnim), 148 OPCODE(o1_freeAnim), 149 OPCODE(o1_updateAnim), 150 OPCODE(o2_multSub), 151 /* 14 */ 152 OPCODE(o2_initMult), 153 OPCODE(o1_freeMult), 154 OPCODE(o1_animate), 155 OPCODE(o2_loadMultObject), 156 /* 18 */ 157 OPCODE(o1_getAnimLayerInfo), 158 OPCODE(o1_getObjAnimSize), 159 OPCODE(o1_loadStatic), 160 OPCODE(o1_freeStatic), 161 /* 1C */ 162 OPCODE(o2_renderStatic), 163 OPCODE(o2_loadCurLayer), 164 {NULL, ""}, 165 {NULL, ""}, 166 /* 20 */ 167 OPCODE(o2_playCDTrack), 168 OPCODE(o2_waitCDTrackEnd), 169 OPCODE(o2_stopCD), 170 OPCODE(o2_readLIC), 171 /* 24 */ 172 OPCODE(o2_freeLIC), 173 OPCODE(o2_getCDTrackPos), 174 {NULL, ""}, 175 {NULL, ""}, 176 /* 28 */ 177 {NULL, ""}, 178 {NULL, ""}, 179 {NULL, ""}, 180 {NULL, ""}, 181 /* 2C */ 182 {NULL, ""}, 183 {NULL, ""}, 184 {NULL, ""}, 185 {NULL, ""}, 186 /* 30 */ 187 OPCODE(o2_loadFontToSprite), 188 OPCODE(o1_freeFontToSprite), 189 {NULL, ""}, 190 {NULL, ""}, 191 /* 34 */ 192 {NULL, ""}, 193 {NULL, ""}, 194 {NULL, ""}, 195 {NULL, ""}, 196 /* 38 */ 197 {NULL, ""}, 198 {NULL, ""}, 199 {NULL, ""}, 200 {NULL, ""}, 201 /* 3C */ 202 {NULL, ""}, 203 {NULL, ""}, 204 {NULL, ""}, 205 {NULL, ""}, 206 /* 40 */ 207 OPCODE(o2_totSub), 208 OPCODE(o2_switchTotSub), 209 OPCODE(o2_pushVars), 210 OPCODE(o2_popVars), 211 /* 44 */ 212 {NULL, ""}, 213 {NULL, ""}, 214 {NULL, ""}, 215 {NULL, ""}, 216 /* 48 */ 217 {NULL, ""}, 218 {NULL, ""}, 219 {NULL, ""}, 220 {NULL, ""}, 221 /* 4C */ 222 {NULL, ""}, 223 {NULL, ""}, 224 {NULL, ""}, 225 {NULL, ""}, 226 /* 50 */ 227 {NULL, ""},//OPCODE(o2_loadMapObjects), 228 {NULL, ""},//OPCODE(o2_freeGoblins), 229 {NULL, ""},//OPCODE(o2_moveGoblin), 230 {NULL, ""},//OPCODE(o2_writeGoblinPos), 231 /* 54 */ 232 {NULL, ""},//OPCODE(o2_stopGoblin), 233 {NULL, ""},//OPCODE(o2_setGoblinState), 234 {NULL, ""},//OPCODE(o2_placeGoblin), 235 {NULL, ""}, 236 /* 58 */ 237 {NULL, ""}, 238 {NULL, ""}, 239 {NULL, ""}, 240 {NULL, ""}, 241 /* 5C */ 242 {NULL, ""}, 243 {NULL, ""}, 244 {NULL, ""}, 245 {NULL, ""}, 246 /* 60 */ 247 {NULL, ""}, 248 {NULL, ""}, 249 {NULL, ""}, 250 {NULL, ""}, 251 /* 64 */ 252 {NULL, ""}, 253 {NULL, ""}, 254 {NULL, ""}, 255 {NULL, ""}, 256 /* 68 */ 257 {NULL, ""}, 258 {NULL, ""}, 259 {NULL, ""}, 260 {NULL, ""}, 261 /* 6C */ 262 {NULL, ""}, 263 {NULL, ""}, 264 {NULL, ""}, 265 {NULL, ""}, 266 /* 70 */ 267 {NULL, ""}, 268 {NULL, ""}, 269 {NULL, ""}, 270 {NULL, ""}, 271 /* 74 */ 272 {NULL, ""}, 273 {NULL, ""}, 274 {NULL, ""}, 275 {NULL, ""}, 276 /* 78 */ 277 {NULL, ""}, 278 {NULL, ""}, 279 {NULL, ""}, 280 {NULL, ""}, 281 /* 7C */ 282 {NULL, ""}, 283 {NULL, ""}, 284 {NULL, ""}, 285 {NULL, ""}, 286 /* 80 */ 287 {NULL, ""},//OPCODE(o2_initScreen), 288 {NULL, ""},//OPCODE(o2_scroll), 289 {NULL, ""},//OPCODE(o2_setScrollOffset), 290 {NULL, ""},//OPCODE(o2_playImd), 291 /* 84 */ 292 {NULL, ""},//OPCODE(o2_getImdInfo), 293 {NULL, ""},//OPCODE(o2_openItk), 294 {NULL, ""},//OPCODE(o2_closeItk), 295 {NULL, ""},//OPCODE(o2_setImdFrontSurf), 296 /* 88 */ 297 {NULL, ""},//OPCODE(o2_resetImdFrontSurf), 298 {NULL, ""}, 299 {NULL, ""}, 300 {NULL, ""}, 301 /* 8C */ 302 {NULL, ""}, 303 {NULL, ""}, 304 {NULL, ""}, 305 {NULL, ""}, 306 /* 90 */ 307 {NULL, ""}, 308 {NULL, ""}, 309 {NULL, ""}, 310 {NULL, ""}, 311 /* 94 */ 312 {NULL, ""}, 313 {NULL, ""}, 314 {NULL, ""}, 315 {NULL, ""}, 316 /* 98 */ 317 {NULL, ""}, 318 {NULL, ""}, 319 {NULL, ""}, 320 {NULL, ""}, 321 /* 9C */ 322 {NULL, ""}, 323 {NULL, ""}, 324 {NULL, ""}, 325 {NULL, ""}, 326 /* A0 */ 327 {NULL, ""}, 328 {NULL, ""}, 329 {NULL, ""}, 330 {NULL, ""}, 331 /* A4 */ 332 {NULL, ""}, 333 {NULL, ""}, 334 {NULL, ""}, 335 {NULL, ""}, 336 /* A8 */ 337 {NULL, ""}, 338 {NULL, ""}, 339 {NULL, ""}, 340 {NULL, ""}, 341 /* AC */ 342 {NULL, ""}, 343 {NULL, ""}, 344 {NULL, ""}, 345 {NULL, ""}, 346 /* B0 */ 347 {NULL, ""}, 348 {NULL, ""}, 349 {NULL, ""}, 350 {NULL, ""}, 351 /* B4 */ 352 {NULL, ""}, 353 {NULL, ""}, 354 {NULL, ""}, 355 {NULL, ""}, 356 /* B8 */ 357 {NULL, ""}, 358 {NULL, ""}, 359 {NULL, ""}, 360 {NULL, ""}, 361 /* BC */ 362 {NULL, ""}, 363 {NULL, ""}, 364 {NULL, ""}, 365 {NULL, ""}, 366 /* C0 */ 367 {NULL, ""}, 368 {NULL, ""}, 369 {NULL, ""}, 370 {NULL, ""}, 371 /* C4 */ 372 {NULL, ""}, 373 {NULL, ""}, 374 {NULL, ""}, 375 {NULL, ""}, 376 /* C8 */ 377 {NULL, ""}, 378 {NULL, ""}, 379 {NULL, ""}, 380 {NULL, ""}, 381 /* CC */ 382 {NULL, ""}, 383 {NULL, ""}, 384 {NULL, ""}, 385 {NULL, ""}, 386 /* D0 */ 387 {NULL, ""}, 388 {NULL, ""}, 389 {NULL, ""}, 390 {NULL, ""}, 391 /* D4 */ 392 {NULL, ""}, 393 {NULL, ""}, 394 {NULL, ""}, 395 {NULL, ""}, 396 /* D8 */ 397 {NULL, ""}, 398 {NULL, ""}, 399 {NULL, ""}, 400 {NULL, ""}, 401 /* DC */ 402 {NULL, ""}, 403 {NULL, ""}, 404 {NULL, ""}, 405 {NULL, ""}, 406 /* E0 */ 407 {NULL, ""}, 408 {NULL, ""}, 409 {NULL, ""}, 410 {NULL, ""}, 411 /* E4 */ 412 {NULL, ""}, 413 {NULL, ""}, 414 {NULL, ""}, 415 {NULL, ""}, 416 /* E8 */ 417 {NULL, ""}, 418 {NULL, ""}, 419 {NULL, ""}, 420 {NULL, ""}, 421 /* EC */ 422 {NULL, ""}, 423 {NULL, ""}, 424 {NULL, ""}, 425 {NULL, ""}, 426 /* F0 */ 427 {NULL, ""}, 428 {NULL, ""}, 429 {NULL, ""}, 430 {NULL, ""}, 431 /* F4 */ 432 {NULL, ""}, 433 {NULL, ""}, 434 {NULL, ""}, 435 {NULL, ""}, 436 /* F8 */ 437 {NULL, ""}, 438 {NULL, ""}, 439 {NULL, ""}, 440 {NULL, ""}, 441 /* FC */ 442 {NULL, ""}, 443 {NULL, ""}, 444 {NULL, ""}, 445 {NULL, ""} 446 }; 447 448 static const OpcodeFuncEntryFascination opcodesFunc[80] = { 449 /* 00 */ 450 OPCODE(o1_callSub), 451 OPCODE(o1_callSub), 452 OPCODE(o1_printTotText), 453 OPCODE(o1_loadCursor), 454 /* 04 */ 455 {NULL, ""}, 456 OPCODE(o1_switch), 457 OPCODE(o1_repeatUntil), 458 OPCODE(o1_whileDo), 459 /* 08 */ 460 OPCODE(o1_if), 461 OPCODE(o2_evaluateStore), 462 OPCODE(o1_loadSpriteToPos), 463 {NULL, ""}, 464 /* 0C */ 465 {NULL, ""}, 466 {NULL, ""}, 467 {NULL, ""}, 468 {NULL, ""}, 469 /* 10 */ 470 {NULL, ""}, 471 OPCODE(o2_printText), 472 OPCODE(o1_loadTot), 473 OPCODE(o1_palLoad), 474 /* 14 */ 475 OPCODE(o1_keyFunc), 476 OPCODE(o1_capturePush), 477 OPCODE(o1_capturePop), 478 OPCODE(o2_animPalInit), 479 /* 18 */ 480 OPCODE(o2_addCollision), 481 OPCODE(o2_freeCollision), 482 {NULL, ""}, 483 {NULL, ""}, 484 /* 1C */ 485 {NULL, ""}, 486 {NULL, ""}, 487 OPCODE(o1_drawOperations), 488 OPCODE(o1_setcmdCount), 489 /* 20 */ 490 OPCODE(o1_return), 491 OPCODE(o1_renewTimeInVars), 492 OPCODE(o1_speakerOn), 493 OPCODE(o1_speakerOff), 494 /* 24 */ 495 OPCODE(o1_putPixel), 496 OPCODE(o2_goblinFunc), 497 OPCODE(o1_createSprite), 498 OPCODE(o1_freeSprite), 499 /* 28 */ 500 {NULL, ""}, 501 {NULL, ""}, 502 {NULL, ""}, 503 {NULL, ""}, 504 /* 2C */ 505 {NULL, ""}, 506 {NULL, ""}, 507 {NULL, ""}, 508 {NULL, ""}, 509 /* 30 */ 510 OPCODE(o1_returnTo), 511 OPCODE(o1_loadSpriteContent), 512 OPCODE(o1_copySprite), 513 OPCODE(o1_fillRect), 514 /* 34 */ 515 OPCODE(o1_drawLine), 516 OPCODE(o1_strToLong), 517 OPCODE(o1_invalidate), 518 OPCODE(o1_setBackDelta), 519 /* 38 */ 520 OPCODE(o1_playSound), 521 OPCODE(o2_stopSound), 522 OPCODE(o2_loadSound), 523 OPCODE(o1_freeSoundSlot), 524 /* 3C */ 525 OPCODE(o1_waitEndPlay), 526 OPCODE(o1_playComposition), 527 OPCODE(o2_getFreeMem), 528 OPCODE(o2_checkData), 529 /* 40 */ 530 {NULL, ""}, 531 OPCODE(o1_prepareStr), 532 OPCODE(o1_insertStr), 533 OPCODE(o1_cutStr), 534 /* 44 */ 535 OPCODE(o1_strstr), 536 OPCODE(o1_istrlen), 537 OPCODE(o1_setMousePos), 538 OPCODE(o1_setFrameRate), 539 /* 48 */ 540 OPCODE(o1_animatePalette), 541 OPCODE(o1_animateCursor), 542 OPCODE(o1_blitCursor), 543 OPCODE(o1_loadFont), 544 /* 4C */ 545 OPCODE(o1_freeFont), 546 OPCODE(o2_readData), 547 OPCODE(o2_writeData), 548 OPCODE(o1_manageDataFile), 549 }; 550 551 static const OpcodeGoblinEntryFascination opcodesGoblin[71] = { 552 /* 00 */ 553 {NULL, ""},//OPCODE(o2_loadInfogramesIns), 554 {NULL, ""},//OPCODE(o2_startInfogrames), 555 OPCODE(o2_geUnknown2),//OPCODE(o2_stopInfogrames), 556 OPCODE(o2_geUnknown3), // OPCODE(o2_startInfogrames), 557 /* 04 */ 558 OPCODE(o2_geUnknown4), 559 OPCODE(o2_playProtracker), //OPCODE(o2_geUnknown5), 560 OPCODE(o2_stopProtracker), //OPCODE(o2_geUnknown6), 561 {NULL, ""}, 562 /* 08 */ 563 {NULL, ""}, 564 OPCODE(o2_geUnknown10), // OPCODE(o2_playInfogrames), 565 {NULL, ""}, 566 {NULL, ""}, 567 /* 0C */ 568 {NULL, ""}, 569 {NULL, ""}, 570 {NULL, ""}, 571 {NULL, ""}, 572 /* 10 */ 573 {NULL, ""}, 574 {NULL, ""}, 575 {NULL, ""}, 576 {NULL, ""}, 577 /* 14 */ 578 {NULL, ""}, 579 {NULL, ""}, 580 {NULL, ""}, 581 {NULL, ""}, 582 /* 18 */ 583 {NULL, ""}, 584 {NULL, ""}, 585 {NULL, ""}, 586 {NULL, ""}, 587 /* 1C */ 588 {NULL, ""}, 589 {NULL, ""}, 590 {NULL, ""}, 591 {NULL, ""}, 592 /* 20 */ 593 {NULL, ""}, 594 {NULL, ""}, 595 {NULL, ""}, 596 {NULL, ""}, 597 /* 24 */ 598 {NULL, ""}, 599 {NULL, ""}, 600 {NULL, ""}, 601 {NULL, ""}, //OPCODE(o2_handleGoblins), 602 /* 28 */ 603 {NULL, ""}, //OPCODE(o2_playProtracker), 604 {NULL, ""}, //OPCODE(o2_stopProtracker), 605 {NULL, ""}, 606 {NULL, ""}, 607 /* 2C */ 608 {NULL, ""}, 609 {NULL, ""}, 610 {NULL, ""}, 611 {NULL, ""}, 612 /* 30 */ 613 {NULL, ""}, 614 {NULL, ""}, 615 {NULL, ""}, 616 {NULL, ""}, 617 /* 34 */ 618 {NULL, ""}, 619 {NULL, ""}, 620 {NULL, ""}, 621 {NULL, ""}, 622 /* 38 */ 623 {NULL, ""}, 624 {NULL, ""}, 625 {NULL, ""}, 626 {NULL, ""}, 627 /* 3C */ 628 {NULL, ""}, 629 {NULL, ""}, 630 {NULL, ""}, 631 {NULL, ""}, 632 /* 40 */ 633 {NULL, ""}, 634 {NULL, ""}, 635 {NULL, ""}, 636 {NULL, ""}, 637 /* 44 */ 638 {NULL, ""}, 639 {NULL, ""}, 640 {NULL, ""}, 641 }; 642 643 _opcodesDrawFascination = opcodesDraw; 644 _opcodesFuncFascination = opcodesFunc; 645 _opcodesGoblinFascination = opcodesGoblin; 646 } 647 648 void Inter_Fascination::executeDrawOpcode(byte i) { 649 debugC(1, kDebugDrawOp, "opcodeDraw %d [0x%X] (%s)", 650 i, i, getOpcodeDrawDesc(i)); 651 652 OpcodeDrawProcFascination op = _opcodesDrawFascination[i].proc; 653 654 if (op == NULL) 655 warning("Not yet implemented Fascination opcodeDraw: %d", i); 656 else 657 (this->*op) (); 658 } 659 660 void Inter_Fascination::o2_geUnknown2(OpGobParams ¶ms) { 661 warning("Fascination Unknown GE Function 2\n"); 662 } 663 664 void Inter_Fascination::o2_geUnknown3(OpGobParams ¶ms) { 665 warning("Fascination Unknown GE Function 3\n"); 666 } 667 668 void Inter_Fascination::o2_geUnknown4(OpGobParams ¶ms) { 669 warning("Fascination Unknown GE Function 4\n"); 670 } 671 672 void Inter_Fascination::o2_geUnknown10(OpGobParams ¶ms) { 673 warning("Fascination Unknown GE Function 10\n"); 674 } 675 676 bool Inter_Fascination::o2_feUnknown4(OpFuncParams ¶ms) { 677 warning("Fascination Unknown FE Function 4\n"); 678 return true; 679 } 680 681 void Inter_Fascination::o2_cdUnknown3() { 682 uint16 resVar, resVar2; 683 int16 retVal1, retVal2, retVal3, retVal4, retVal5, retVal6, retVal7; 684 685 warning("Fascination Unknown CD Function 3 (sub_EDBB)\n"); 686 687 resVar = (uint16) load16(); 688 resVar2 = (uint16) load16(); 689 retVal1 = _vm->_parse->parseVarIndex(); 690 retVal2 = _vm->_parse->parseVarIndex(); 691 retVal3 = _vm->_parse->parseVarIndex(); 692 retVal4 = _vm->_parse->parseVarIndex(); 693 retVal5 = _vm->_parse->parseVarIndex(); 694 retVal6 = _vm->_parse->parseVarIndex(); 695 retVal7 = _vm->_parse->parseVarIndex(); 696 warning ("Input %d %d\n",resVar, resVar2); 697 warning ("Fetched variables %d %d %d %d %d %d %d\n", retVal1, retVal2, retVal3, retVal4, retVal5, retVal6, retVal7); 698 } 699 700 void Inter_Fascination::o2_cdUnknown4() { 701 warning("Fascination Unknown CD Function 4 (sub_EE04)\n"); 702 } 703 704 void Inter_Fascination::o2_cdUnknown5() { 705 warning("Fascination Unknown CD Function 5 (sub_EE29)\n"); 706 } 707 708 void Inter_Fascination::o2_cdUnknown6() { 709 bool resFlag; 710 int16 retVal1; 711 warning("Fascination Unknown CD Function 6 (sub_EE46)\n"); 712 resFlag = evalBoolResult(); 713 retVal1 = _vm->_parse->parseVarIndex(); 714 warning ("Fetched variable %d\n",retVal1); 715 } 716 717 void Inter_Fascination::o2_cdUnknown11() { 718 bool resFlag; 719 warning("Fascination Unknown CD Function 11 (loc_66E6) - AX=0E6h\n"); 720 721 resFlag = evalBoolResult(); 722 } 723 724 bool Inter_Fascination::executeFuncOpcode(byte i, byte j, OpFuncParams ¶ms) { 725 debugC(1, kDebugFuncOp, "opcodeFunc %d.%d [0x%X.0x%X] (%s)", 726 i, j, i, j, getOpcodeFuncDesc(i, j)); 727 728 if ((i > 4) || (j > 16)) { 729 warning("Invalid opcodeFunc: %d.%d", i, j); 730 return false; 731 } 732 733 OpcodeFuncProcFascination op = _opcodesFuncFascination[i*16 + j].proc; 734 735 if (op == NULL) 736 warning("unimplemented opcodeFunc: %d.%d", i, j); 737 else 738 return (this->*op) (params); 739 740 return false; 741 } 742 743 void Inter_Fascination::executeGoblinOpcode(int i, OpGobParams ¶ms) { 744 debugC(1, kDebugGobOp, "opcodeGoblin %d [0x%X] (%s)", 745 i, i, getOpcodeGoblinDesc(i)); 746 747 OpcodeGoblinProcFascination op = NULL; 748 749 for (int j = 0; j < ARRAYSIZE(_goblinFuncLookUp); j++) 750 if (_goblinFuncLookUp[j][0] == i) { 751 op = _opcodesGoblinFascination[_goblinFuncLookUp[j][1]].proc; 752 break; 753 } 754 755 if (op == NULL) { 756 int16 val; 757 758 _vm->_global->_inter_execPtr -= 2; 759 val = load16(); 760 _vm->_global->_inter_execPtr += val << 1; 761 warning("unimplemented opcodeGob: %d", i); 762 } else 763 (this->*op) (params); 764 } 765 766 const char *Inter_Fascination::getOpcodeDrawDesc(byte i) { 767 return _opcodesDrawFascination[i].desc; 768 } 769 770 const char *Inter_Fascination::getOpcodeFuncDesc(byte i, byte j) { 771 if ((i > 4) || (j > 15)) 772 return ""; 773 774 return _opcodesFuncFascination[i*16 + j].desc; 775 } 776 777 const char *Inter_Fascination::getOpcodeGoblinDesc(int i) { 778 for (int j = 0; j < ARRAYSIZE(_goblinFuncLookUp); j++) 779 if (_goblinFuncLookUp[j][0] == i) 780 return _opcodesGoblinFascination[_goblinFuncLookUp[j][1]].desc; 781 warning("Error in getOpcodeGoblinDesc %d\n",i); 782 return ""; 783 } 784 785 } // End of namespace Gob -
engines/gob/inter_v1.cpp
Property changes on: engines\gob\inter_fascin.cpp ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:keywords + Date Rev Author URL Id Added: svn:eol-style + native
1142 1142 } 1143 1143 // Skipping the copy protection screen in Gobliins 2 1144 1144 if (!_vm->_copyProtection && (_vm->getGameType() == kGameTypeGob2) && (offset == 1746) 1145 && !scumm_stricmp(_vm->_game->_curTotFile, _vm->_startTot0)) {1145 && !scumm_stricmp(_vm->_game->_curTotFile, "intro0.tot")) { 1146 1146 debugC(2, kDebugGameFlow, "Skipping copy protection screen"); 1147 1147 return false; 1148 1148 } … … 1436 1436 buf[size] = 0; 1437 1437 } 1438 1438 1439 strcat(buf, ".tot"); 1439 if (_vm->getGameType() == kGameTypeGeisha) 1440 strcat(buf, ".0ot"); 1441 else 1442 strcat(buf, ".tot"); 1440 1443 if (_terminate != 2) 1441 1444 _terminate = 1; 1442 1445 strcpy(_vm->_game->_totToLoad, buf); -
engines/gob/module.mk
7 7 draw_v1.o \ 8 8 draw_v2.o \ 9 9 draw_bargon.o \ 10 draw_fascin.o \ 10 11 driver_vga.o \ 11 12 game.o \ 12 13 game_v1.o \ … … 30 31 inter_v1.o \ 31 32 inter_v2.o \ 32 33 inter_bargon.o \ 34 inter_fascin.o \ 33 35 inter_v3.o \ 34 36 inter_v4.o \ 35 37 inter_v5.o \