Ticket #8991: Gob_Strangerke_090403.patch
File Gob_Strangerke_090403.patch, 34.7 KB (added by , 16 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
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 kGameTypeFascin: 303 _init = new Init_v2(this); 304 _video = new Video_v2(this); 305 _inter = new Inter_Fascin(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 388 389 _inter = new Inter_v5(this);390 391 392 393 394 395 396 397 398 387 case kGameTypeWoodruff: 388 _init = new Init_v3(this); 389 _video = new Video_v2(this); 390 _inter = new Inter_v4(this); 391 _parse = new Parse_v2(this); 392 _mult = new Mult_v2(this); 393 _draw = new Draw_v2(this); 394 _game = new Game_v2(this); 395 _map = new Map_v4(this); 396 _goblin = new Goblin_v4(this); 397 _scenery = new Scenery_v2(this); 398 _saveLoad = new SaveLoad_v4(this, _targetName.c_str()); 399 break; 399 400 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 401 case kGameTypeDynasty: 402 _init = new Init_v3(this); 403 _video = new Video_v2(this); 404 _inter = new Inter_v5(this); 405 _parse = new Parse_v2(this); 406 _mult = new Mult_v2(this); 407 _draw = new Draw_v2(this); 408 _game = new Game_v2(this); 409 _map = new Map_v4(this); 410 _goblin = new Goblin_v4(this); 411 _scenery = new Scenery_v2(this); 412 _saveLoad = new SaveLoad_v4(this, _targetName.c_str()); 413 break; 413 414 414 default: 415 deinitGameParts(); 416 return false; 417 break; 415 case kGameTypeAdibou4: 416 case kGameTypeArchibald: 417 case kGameTypeSpirou: 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 kGameTypeFascin, 102 kGameTypeGeisha, 103 kGameTypeAdibou4 99 104 }; 100 105 101 106 enum Features { -
engines/gob/init.cpp
66 66 67 67 initVideo(); 68 68 69 /** 70 * Depending on the game type, the initial STK is not the same 71 */ 72 73 switch(_vm->getGameType()) { 69 74 // The Lost In Time demo uses different file prefix 70 if (_vm->getGameType() == kGameTypeLostInTime) {75 case kGameTypeLostInTime: 71 76 handle2 = _vm->_dataIO->openData("demo.stk"); 72 77 if (handle2 >= 0) { 73 78 _vm->_dataIO->closeData(handle2); 74 79 _vm->_dataIO->openDataFile("demo.stk"); 75 80 } 81 break; 82 //Fascination use disk0 instead of intro 83 case kGameTypeFascin: 84 handle2 = _vm->_dataIO->openData("disk0.stk"); 85 if (handle2 >= 0) { 86 _vm->_dataIO->closeData(handle2); 87 _vm->_dataIO->openDataFile("disk0.stk"); 88 } 89 break; 90 case kGameTypeSpirou: 91 case kGameTypeArchibald: 92 handle2 = _vm->_dataIO->openData("intro2.stk"); 93 if (handle2 >= 0) { 94 _vm->_dataIO->closeData(handle2); 95 _vm->_dataIO->openDataFile("intro2.stk"); 96 } 97 break; 98 case kGameTypeGeisha: 99 handle2 = _vm->_dataIO->openData("disk1.stk"); 100 if (handle2 >= 0) { 101 _vm->_dataIO->closeData(handle2); 102 _vm->_dataIO->openDataFile("disk1.stk"); 103 } 104 break; 105 case kGameTypeDynasty: 106 handle2 = _vm->_dataIO->openData("intro.stk"); 107 if (handle2 >= 0) { 108 _vm->_dataIO->closeData(handle2); 109 _vm->_dataIO->openDataFile("intro.stk"); 110 } else { 111 handle2 = _vm->_dataIO->openData("lda1.stk"); 112 if (handle2 >= 0) { 113 _vm->_dataIO->closeData(handle2); 114 _vm->_dataIO->openDataFile("lda1.stk"); 115 } 116 } 117 break; 118 default : 119 handle2 = _vm->_dataIO->openData("intro.stk"); 120 if (handle2 >= 0) { 121 _vm->_dataIO->closeData(handle2); 122 _vm->_dataIO->openDataFile("intro.stk"); 123 } 124 break; 76 125 } 77 78 handle2 = _vm->_dataIO->openData("intro.stk");79 if (handle2 >= 0) {80 _vm->_dataIO->closeData(handle2);81 _vm->_dataIO->openDataFile("intro.stk");82 }83 84 126 _vm->_util->initInput(); 85 127 86 128 _vm->_video->initPrimary(_vm->_global->_videoMode); … … 144 186 145 187 if (totName) { 146 188 strncpy0(buffer, totName, 15); 147 strcat(buffer, ".tot"); 189 if (_vm->getGameType() == kGameTypeGeisha) 190 strcat(buffer, ".0ot"); 191 else 192 strcat(buffer, ".tot"); 148 193 } else 149 194 strncpy0(buffer, _vm->_startTot, 19); 150 195 -
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
234 234 // The EGA and Mac versions of gob1 doesn't add a delay after showing 235 235 // 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_Fascin : public Inter_v2 { 455 public: 456 Inter_Fascin(GobEngine *vm); 457 virtual ~Inter_Fascin() {} 458 459 protected: 460 typedef void (Inter_Fascin::*OpcodeDrawProcFascin)(); 461 typedef bool (Inter_Fascin::*OpcodeFuncProcFascin)(OpFuncParams &); 462 typedef void (Inter_Fascin::*OpcodeGoblinProcFascin)(OpGobParams &); 463 struct OpcodeDrawEntryFascin { 464 OpcodeDrawProcFascin proc; 465 const char *desc; 466 }; 467 struct OpcodeFuncEntryFascin { 468 OpcodeFuncProcFascin proc; 469 const char *desc; 470 }; 471 struct OpcodeGoblinEntryFascin { 472 OpcodeGoblinProcFascin proc; 473 const char *desc; 474 }; 475 const OpcodeDrawEntryFascin *_opcodesDrawFascin; 476 const OpcodeFuncEntryFascin *_opcodesFuncFascin; 477 const OpcodeGoblinEntryFascin *_opcodesGoblinFascin; 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_geUnknown3(OpGobParams ¶ms); 489 void o2_geUnknown4(OpGobParams ¶ms); 490 void o2_cdUnknown3(); 491 void o2_cdUnknown4(); 492 void o2_cdUnknown5(); 493 void o2_cdUnknown6(); 494 void o2_cdUnknown11(); 495 }; 496 454 497 class Inter_v3 : public Inter_v2 { 455 498 public: 456 499 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_Fascin, x) 44 45 const int Inter_Fascin::_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_Fascin::Inter_Fascin(GobEngine *vm) : Inter_v2(vm) { 121 setupOpcodes(); 122 } 123 124 void Inter_Fascin::setupOpcodes() { 125 static const OpcodeDrawEntryFascin 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 {NULL, ""},//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 {NULL, ""},//OPCODE(o2_playCDTrack), 168 {NULL, ""},//OPCODE(o2_waitCDTrackEnd), 169 {NULL, ""},//OPCODE(o2_stopCD), 170 {NULL, ""},//OPCODE(o2_readLIC), 171 /* 24 */ 172 {NULL, ""},//OPCODE(o2_freeLIC), 173 {NULL, ""},//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 {NULL, ""},//OPCODE(o2_totSub), 208 {NULL, ""},//OPCODE(o2_switchTotSub), 209 {NULL, ""},//OPCODE(o2_pushVars), 210 {NULL, ""},//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 OpcodeFuncEntryFascin 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 OpcodeGoblinEntryFascin opcodesGoblin[71] = { 552 /* 00 */ 553 OPCODE(o2_loadInfogramesIns), 554 OPCODE(o2_startInfogrames), 555 OPCODE(o2_stopInfogrames), 556 OPCODE(o2_geUnknown3), 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_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 OPCODE(o2_handleGoblins), 602 /* 28 */ 603 OPCODE(o2_playProtracker), 604 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 _opcodesDrawFascin = opcodesDraw; 644 _opcodesFuncFascin = opcodesFunc; 645 _opcodesGoblinFascin = opcodesGoblin; 646 } 647 648 void Inter_Fascin::executeDrawOpcode(byte i) { 649 debugC(1, kDebugDrawOp, "opcodeDraw %d [0x%X] (%s)", 650 i, i, getOpcodeDrawDesc(i)); 651 652 OpcodeDrawProcFascin op = _opcodesDrawFascin[i].proc; 653 654 if (op == NULL) 655 warning("unimplemented Fascin opcodeDraw: %d", i); 656 else 657 (this->*op) (); 658 } 659 660 void Inter_Fascin::o2_geUnknown3(OpGobParams ¶ms) { 661 warning("Unknown GE Function 3\n"); 662 } 663 664 void Inter_Fascin::o2_geUnknown4(OpGobParams ¶ms) { 665 warning("Unknown GE Function 4\n"); 666 } 667 668 void Inter_Fascin::o2_cdUnknown3() { 669 uint16 resVar, resVar2; 670 int16 retVal1, retVal2, retVal3, retVal4, retVal5, retVal6, retVal7; 671 672 warning("Unknown CD Function 3 (sub_EDBB)\n"); 673 674 resVar = (uint16) load16(); 675 resVar2 = (uint16) load16(); 676 retVal1 = _vm->_parse->parseVarIndex(); 677 retVal2 = _vm->_parse->parseVarIndex(); 678 retVal3 = _vm->_parse->parseVarIndex(); 679 retVal4 = _vm->_parse->parseVarIndex(); 680 retVal5 = _vm->_parse->parseVarIndex(); 681 retVal6 = _vm->_parse->parseVarIndex(); 682 retVal7 = _vm->_parse->parseVarIndex(); 683 warning ("Input %d %d\n",resVar, resVar2); 684 warning ("Fetched variables %d %d %d %d %d %d %d\n", retVal1, retVal2, retVal3, retVal4, retVal5, retVal6, retVal7); 685 } 686 687 void Inter_Fascin::o2_cdUnknown4() { 688 warning("Unknown CD Function 4 (sub_EE04)\n"); 689 } 690 691 void Inter_Fascin::o2_cdUnknown5() { 692 warning("Unknown CD Function 5 (sub_EE29)\n"); 693 } 694 695 void Inter_Fascin::o2_cdUnknown6() { 696 bool resFlag; 697 int16 retVal1; 698 warning("Unknown CD Function 6 (sub_EE46)\n"); 699 resFlag = evalBoolResult(); 700 retVal1 = _vm->_parse->parseVarIndex(); 701 warning ("Fetched variable %d\n",retVal1); 702 } 703 704 void Inter_Fascin::o2_cdUnknown11() { 705 bool resFlag; 706 warning("Unknown CD Function 11 (loc_66E6) - AX=0E6h\n"); 707 708 resFlag = evalBoolResult(); 709 } 710 711 bool Inter_Fascin::executeFuncOpcode(byte i, byte j, OpFuncParams ¶ms) { 712 debugC(1, kDebugFuncOp, "opcodeFunc %d.%d [0x%X.0x%X] (%s)", 713 i, j, i, j, getOpcodeFuncDesc(i, j)); 714 715 if ((i > 4) || (j > 16)) { 716 warning("Invalid opcodeFunc: %d.%d", i, j); 717 return false; 718 } 719 720 OpcodeFuncProcFascin op = _opcodesFuncFascin[i*16 + j].proc; 721 722 if (op == NULL) 723 warning("unimplemented opcodeFunc: %d.%d", i, j); 724 else 725 return (this->*op) (params); 726 727 return false; 728 } 729 730 void Inter_Fascin::executeGoblinOpcode(int i, OpGobParams ¶ms) { 731 debugC(1, kDebugGobOp, "opcodeGoblin %d [0x%X] (%s)", 732 i, i, getOpcodeGoblinDesc(i)); 733 734 OpcodeGoblinProcFascin op = NULL; 735 736 for (int j = 0; j < ARRAYSIZE(_goblinFuncLookUp); j++) 737 if (_goblinFuncLookUp[j][0] == i) { 738 op = _opcodesGoblinFascin[_goblinFuncLookUp[j][1]].proc; 739 break; 740 } 741 742 if (op == NULL) { 743 int16 val; 744 745 _vm->_global->_inter_execPtr -= 2; 746 val = load16(); 747 _vm->_global->_inter_execPtr += val << 1; 748 warning("unimplemented opcodeGob: %d", i); 749 } else 750 (this->*op) (params); 751 } 752 753 const char *Inter_Fascin::getOpcodeDrawDesc(byte i) { 754 return _opcodesDrawFascin[i].desc; 755 } 756 757 const char *Inter_Fascin::getOpcodeFuncDesc(byte i, byte j) { 758 if ((i > 4) || (j > 15)) 759 return ""; 760 761 return _opcodesFuncFascin[i*16 + j].desc; 762 } 763 764 const char *Inter_Fascin::getOpcodeGoblinDesc(int i) { 765 for (int j = 0; j < ARRAYSIZE(_goblinFuncLookUp); j++) 766 if (_goblinFuncLookUp[j][0] == i) 767 return _opcodesGoblinFascin[_goblinFuncLookUp[j][1]].desc; 768 warning("Error in getOpcodeGoblinDesc %d\n",i); 769 return ""; 770 } 771 772 } // 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
1146 1146 debugC(2, kDebugGameFlow, "Skipping copy protection screen"); 1147 1147 return false; 1148 1148 } 1149 1150 1149 _vm->_global->_inter_execPtr = _vm->_game->_totFileData + offset; 1151 1150 1152 1151 if ((params.counter == params.cmdCount) && (params.retFlag == 2)) … … 1423 1422 bool Inter_v1::o1_loadTot(OpFuncParams ¶ms) { 1424 1423 char buf[20]; 1425 1424 int8 size; 1426 1425 1427 1426 if ((*_vm->_global->_inter_execPtr & 0x80) != 0) { 1428 1427 _vm->_global->_inter_execPtr++; 1429 1428 evalExpr(0); … … 1436 1435 buf[size] = 0; 1437 1436 } 1438 1437 1439 strcat(buf, ".tot"); 1438 if (_vm->getGameType() == kGameTypeGeisha) 1439 strcat(buf, ".0ot"); 1440 else 1441 strcat(buf, ".tot"); 1440 1442 if (_terminate != 2) 1441 1443 _terminate = 1; 1442 1444 strcpy(_vm->_game->_totToLoad, buf); -
engines/gob/inter_v2.cpp
2123 2123 int16 totSize; 2124 2124 2125 2125 source = SOUND_TOT; 2126 2126 2127 2127 dataPtr = (byte *) _vm->_game->loadTotResource(id, &totSize); 2128 2128 dataSize = (uint32) ((int32) totSize); 2129 2129 } -
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 \