Ticket #8991: Gob_Strangerke_090401.patch

File Gob_Strangerke_090401.patch, 27.5 KB (added by Strangerke, 15 years ago)

GOB: Skeleton for Fascination + MD5s

  • dists/msvc9/gob.vcproj

     
    284284                        >
    285285                </File>
    286286                <File
     287                        RelativePath="..\..\engines\gob\draw_fascin.cpp"
     288                        >
     289                </File>
     290                <File
    287291                        RelativePath="..\..\engines\gob\draw_v1.cpp"
    288292                        >
    289293                </File>
     
    404408                        >
    405409                </File>
    406410                <File
     411                        RelativePath="..\..\engines\gob\inter_fascin.cpp"
     412                        >
     413                </File>
     414                <File
    407415                        RelativePath="..\..\engines\gob\inter_v1.cpp"
    408416                        >
    409417                </File>
  • engines/gob/detection.cpp

     
    5959        {"woodruff", "The Bizarre Adventures of Woodruff and the Schnibble"},
    6060        {"dynasty", "The Last Dynasty"},
    6161        {"urban", "Urban Runner"},
     62        {"archibald", "Playtoon 1 - Uncle Archibald"},
     63        {"spirou", "Playtoon 2 - Spirou"},
     64        {"Fascin", "Fascination"},
     65        {"Geisha", "Geisha"},
    6266        {0, 0}
    6367};
    6468
     
    12711275        },
    12721276        {
    12731277                {
     1278                        "Fascin256",
     1279                        "VGA",
     1280                        AD_ENTRY1("disk0.stk","a50a8495e1b2d67699fb562cb98fc3e2"),
     1281                        UNK_LANG,
     1282                        kPlatformPC,
     1283                        ADGF_NO_FLAGS,
     1284                },
     1285                kGameTypeFascin,
     1286                kFeaturesNone,
     1287                "intro"
     1288        },
     1289        {
     1290                {
     1291                        "Fascin",
     1292                        "VGA",
     1293                        AD_ENTRY1("disk0.stk","e8ab4f200a2304849f462dc901705599"),
     1294                        UNK_LANG,
     1295                        kPlatformPC,
     1296                        ADGF_NO_FLAGS,
     1297                },
     1298                kGameTypeFascin,
     1299                kFeaturesNone,
     1300                "intro"
     1301        },
     1302        {
     1303                {
     1304                        "Geisha",
     1305                        "VGA",
     1306                        AD_ENTRY1("disk1.stk","6eebbb98ad90cd3c44549fc2ab30f632"),
     1307                        UNK_LANG,
     1308                        kPlatformPC,
     1309                        ADGF_NO_FLAGS,
     1310                },
     1311                kGameTypeGeisha,
     1312                kFeaturesNone,
     1313                "intro"
     1314        },
     1315        {
     1316                {
    12741317                        "lostintime",
    12751318                        "Demo",
    12761319                        AD_ENTRY1("demo.stk", "c06f8cc20eb239d4c71f225ce3093edf"),
     
    20792122                kFeatures640,
    20802123                "intro"
    20812124        },
     2125        {
     2126                {
     2127                        "spirou",
     2128                        "",
     2129                        AD_ENTRY1s("intro2.stk", "5e214cec5041d6a4a810feba8ddaaa92",247576),
     2130                        UNK_LANG,
     2131                        kPlatformPC,
     2132                        ADGF_NO_FLAGS
     2133                },
     2134                kGameTypeSpirou,
     2135                kFeatures640,
     2136                "intro"
     2137        },
     2138        {
     2139                {
     2140                        "archibald",
     2141                        "",
     2142                        AD_ENTRY1s("intro2.stk", "9aa412f5b8a1ee1761cb7b26e97fbd56",247094),
     2143                        UNK_LANG,
     2144                        kPlatformPC,
     2145                        ADGF_NO_FLAGS
     2146                },
     2147                kGameTypeArchibald,
     2148                kFeatures640,
     2149                "intro"
     2150        },
     2151       
    20822152        { // Supplied by gamin in the forums
    20832153                {
    20842154                        "urban",
     
    22822352        { &fallbackDescs[10], { "intro.stk", "commun1.itk", "musmac1.mid", 0 } },
    22832353        { &fallbackDescs[11], { "intro.stk", "commun1.itk", "lost.lic", 0 } },
    22842354        { &fallbackDescs[12], { "intro.stk", "cd1.itk", "objet1.itk", 0 } },
     2355        { &fallbackDescs[13], { "disk0.stk", "disk1.stk", "disk2.stk", "disk3.stk", 0 } },
     2356        { &fallbackDescs[13], { "disk0.stk", "disk1.stk", "disk2.stk", "disk3.stk", "disk4.stk", 0 } },
    22852357        { 0, { 0 } }
    22862358};
    22872359
     
    23532425                _startTot0 = new char[11];
    23542426                strcpy(_startTot, "intro.tot");
    23552427                strcpy(_startTot0, "intro0.tot");
    2356         } else {
     2428        }
     2429        else {
    23572430                _startTot = new char[strlen(gd->startTotBase) + 5];
    23582431                _startTot0 = new char[strlen(gd->startTotBase) + 6];
    23592432                strcpy(_startTot, gd->startTotBase);
    23602433                strcpy(_startTot0, gd->startTotBase);
    2361                 strcat(_startTot, ".tot");
    2362                 strcat(_startTot0, "0.tot");
     2434                if (gd->gameType == kGameTypeGeisha) {
     2435                        strcat(_startTot, ".0ot");
     2436                        strcat(_startTot0, "0.0ot");
     2437                }
     2438                else {
     2439                        strcat(_startTot, ".tot");
     2440                        strcat(_startTot0, "0.tot");
     2441                }
    23632442        }
    23642443
    23652444        _gameType = gd->gameType;
     
    23672446        _language = gd->desc.language;
    23682447        _platform = gd->desc.platform;
    23692448}
    2370 
    23712449} // End of namespace Gob
  • engines/gob/draw.h

     
    211211        virtual ~Draw_Bargon() {}
    212212};
    213213
     214class Draw_Fascin: public Draw_v2 {
     215public:
     216        virtual void initScreen();
     217
     218        Draw_Fascin(GobEngine *vm);
     219        virtual ~Draw_Fascin() {}
     220};
     221
    214222// Draw operations
    215223
    216224#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
     31namespace Gob {
     32
     33Draw_Fascin::Draw_Fascin(GobEngine *vm) : Draw_v2(vm) {
     34}
     35
     36void 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
    
     
    557557                _vm->_inter->_variables = 0;
    558558
    559559        strncpy0(_curTotFile, newTotFile, 9);
    560         strcat(_curTotFile, ".TOT");
     560        if (_vm->getGameType() == kGameTypeGeisha)
     561                strcat(_curTotFile, ".0OT");
     562        else
     563                strcat(_curTotFile, ".TOT");
    561564
    562565        if (_vm->_inter->_terminate != 0)
    563566                return;
  • engines/gob/gob.cpp

     
    298298                        _scenery = new Scenery_v1(this);
    299299                        break;
    300300
    301                 case kGameTypeGob2:
     301                        case kGameTypeFascin:
    302302                        _init = new Init_v2(this);
    303303                        _video = new Video_v2(this);
     304                        _inter = new Inter_Fascin(this);
     305                        _parse = new Parse_v2(this);
     306                        _mult = new Mult_v2(this);
     307                        _draw = new Draw_v2(this);
     308                        _game = new Game_v2(this);
     309                        _map = new Map_v2(this);
     310                        _goblin = new Goblin_v2(this);
     311                        _scenery = new Scenery_v2(this);
     312                        _saveLoad = new SaveLoad_v2(this, _targetName.c_str());
     313                        break;
     314
     315                        case kGameTypeGeisha:
     316                        case kGameTypeGob2:
     317                        _init = new Init_v2(this);
     318                        _video = new Video_v2(this);
    304319                        _inter = new Inter_v2(this);
    305320                        _parse = new Parse_v2(this);
    306321                        _mult = new Mult_v2(this);
     
    397412                        _saveLoad = new SaveLoad_v4(this, _targetName.c_str());
    398413                        break;
    399414
     415                case kGameTypeArchibald:
     416                case kGameTypeSpirou:
    400417                case kGameTypeUrban:
    401418                        _init = new Init_v3(this);
    402419                        _video = new Video_v6(this);
  • engines/gob/gob.h

     
    9595        kGameTypeLostInTime,
    9696        kGameTypeInca2,
    9797        kGameTypeDynasty,
    98         kGameTypeUrban
     98        kGameTypeUrban,
     99        kGameTypeArchibald,
     100        kGameTypeSpirou,
     101        kGameTypeFascin,
     102        kGameTypeGeisha
    99103};
    100104
    101105enum Features {
  • engines/gob/init.cpp

     
    6666
    6767        initVideo();
    6868
     69/**
     70 * Depending on the game type, the initial STK is not the same
     71 */
     72       
     73        switch(_vm->getGameType()) {
    6974        // The Lost In Time demo uses different file prefix
    70         if (_vm->getGameType() == kGameTypeLostInTime) {
     75        case kGameTypeLostInTime :
    7176                handle2 = _vm->_dataIO->openData("demo.stk");
    7277                if (handle2 >= 0) {
    7378                        _vm->_dataIO->closeData(handle2);
    7479                        _vm->_dataIO->openDataFile("demo.stk");
    7580                }
     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        default :
     106                handle2 = _vm->_dataIO->openData("intro.stk");
     107                if (handle2 >= 0) {
     108                        _vm->_dataIO->closeData(handle2);
     109                        _vm->_dataIO->openDataFile("intro.stk");
     110                }
     111                break;
    76112        }
    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 
    84113        _vm->_util->initInput();
    85114
    86115        _vm->_video->initPrimary(_vm->_global->_videoMode);
     
    144173
    145174        if (totName) {
    146175                strncpy0(buffer, totName, 15);
    147                 strcat(buffer, ".tot");
     176                if (_vm->getGameType() == kGameTypeGeisha)
     177                        strcat(buffer, ".0ot");
     178                else
     179                        strcat(buffer, ".tot");
    148180        } else
    149181                strncpy0(buffer, _vm->_startTot, 19);
    150182
  • engines/gob/inter.h

     
    451451        void oBargon_intro9(OpGobParams &params);
    452452};
    453453
     454class Inter_Fascin : public Inter_v2 {
     455public:
     456        Inter_Fascin(GobEngine *vm);
     457        virtual ~Inter_Fascin() {}
     458
     459protected:
     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 &params);
     483        virtual void executeGoblinOpcode(int i, OpGobParams &params);
     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 &params);
     489        void o2_geUnknown5(OpGobParams &params);
     490        void o2_geUnknown6(OpGobParams &params);
     491        void o2_cdUnknown3();
     492        void o2_cdUnknown11();
     493};
     494
    454495class Inter_v3 : public Inter_v2 {
    455496public:
    456497        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/game.h"
     35#include "gob/palanim.h"
     36#include "gob/video.h"
     37#include "gob/videoplayer.h"
     38#include "gob/sound/sound.h"
     39
     40namespace Gob {
     41
     42#define OPCODE(x) _OPCODE(Inter_Fascin, x)
     43
     44const int Inter_Fascin::_goblinFuncLookUp[][2] = {
     45        {1, 0},
     46        {2, 1},
     47        {3, 2},
     48        {4, 3},
     49        {5, 4},
     50        {6, 5},
     51        {7, 6},
     52        {8, 7},
     53        {9, 8},
     54        {10, 9},
     55        {11, 10},
     56        {12, 11},
     57        {13, 12},
     58        {14, 13},
     59        {15, 14},
     60        {16, 15},
     61        {21, 16},
     62        {22, 17},
     63        {23, 18},
     64        {24, 19},
     65        {25, 20},
     66        {26, 21},
     67        {27, 22},
     68        {28, 23},
     69        {29, 24},
     70        {30, 25},
     71        {32, 26},
     72        {33, 27},
     73        {34, 28},
     74        {35, 29},
     75        {36, 30},
     76        {37, 31},
     77        {40, 32},
     78        {41, 33},
     79        {42, 34},
     80        {43, 35},
     81        {44, 36},
     82        {50, 37},
     83        {52, 38},
     84        {53, 39},
     85        {100, 40},
     86        {152, 41},
     87        {200, 42},
     88        {201, 43},
     89        {202, 44},
     90        {203, 45},
     91        {204, 46},
     92        {250, 47},
     93        {251, 48},
     94        {252, 49},
     95        {500, 50},
     96        {502, 51},
     97        {503, 52},
     98        {600, 53},
     99        {601, 54},
     100        {602, 55},
     101        {603, 56},
     102        {604, 57},
     103        {605, 58},
     104        {1000, 59},
     105        {1001, 60},
     106        {1002, 61},
     107        {1003, 62},
     108        {1004, 63},
     109        {1005, 64},
     110        {1006, 65},
     111        {1008, 66},
     112        {1009, 67},
     113        {1010, 68},
     114        {1011, 69},
     115        {1015, 70},
     116        {2005, 71}
     117};
     118
     119Inter_Fascin::Inter_Fascin(GobEngine *vm) : Inter_v2(vm) {
     120        setupOpcodes();
     121}
     122
     123void Inter_Fascin::setupOpcodes() {
     124        static const OpcodeDrawEntryFascin opcodesDraw[256] = {
     125                /* 00 */
     126                OPCODE(o1_loadMult),
     127                OPCODE(o2_playMult),
     128                OPCODE(o1_freeMultKeys),
     129                OPCODE(o2_cdUnknown3),
     130                /* 04 */
     131                {NULL, ""},
     132                {NULL, ""},
     133                {NULL, ""},
     134                OPCODE(o1_initCursor),
     135                /* 08 */
     136                OPCODE(o1_initCursorAnim),
     137                OPCODE(o1_clearCursorAnim),
     138                OPCODE(o2_setRenderFlags),
     139                OPCODE(o2_cdUnknown11),
     140                /* 0C */
     141                {NULL, ""},
     142                {NULL, ""},
     143                {NULL, ""},
     144                {NULL, ""},
     145                /* 10 */
     146                OPCODE(o1_loadAnim),
     147                OPCODE(o1_freeAnim),
     148                OPCODE(o1_updateAnim),
     149                {NULL, ""},//OPCODE(o2_multSub),
     150                /* 14 */
     151                OPCODE(o2_initMult),
     152                OPCODE(o1_freeMult),
     153                OPCODE(o1_animate),
     154                OPCODE(o2_loadMultObject),
     155                /* 18 */
     156                OPCODE(o1_getAnimLayerInfo),
     157                OPCODE(o1_getObjAnimSize),
     158                OPCODE(o1_loadStatic),
     159                OPCODE(o1_freeStatic),
     160                /* 1C */
     161                OPCODE(o2_renderStatic),
     162                OPCODE(o2_loadCurLayer),
     163                {NULL, ""},
     164                {NULL, ""},
     165                /* 20 */
     166                {NULL, ""},//OPCODE(o2_playCDTrack),
     167                {NULL, ""},//OPCODE(o2_waitCDTrackEnd),
     168                {NULL, ""},//OPCODE(o2_stopCD),
     169                {NULL, ""},//OPCODE(o2_readLIC),
     170                /* 24 */
     171                {NULL, ""},//OPCODE(o2_freeLIC),
     172                {NULL, ""},//OPCODE(o2_getCDTrackPos),
     173                {NULL, ""},
     174                {NULL, ""},
     175                /* 28 */
     176                {NULL, ""},
     177                {NULL, ""},
     178                {NULL, ""},
     179                {NULL, ""},
     180                /* 2C */
     181                {NULL, ""},
     182                {NULL, ""},
     183                {NULL, ""},
     184                {NULL, ""},
     185                /* 30 */
     186                OPCODE(o2_loadFontToSprite),
     187                OPCODE(o1_freeFontToSprite),
     188                {NULL, ""},
     189                {NULL, ""},
     190                /* 34 */
     191                {NULL, ""},
     192                {NULL, ""},
     193                {NULL, ""},
     194                {NULL, ""},
     195                /* 38 */
     196                {NULL, ""},
     197                {NULL, ""},
     198                {NULL, ""},
     199                {NULL, ""},
     200                /* 3C */
     201                {NULL, ""},
     202                {NULL, ""},
     203                {NULL, ""},
     204                {NULL, ""},
     205                /* 40 */
     206                {NULL, ""},//OPCODE(o2_totSub),
     207                {NULL, ""},//OPCODE(o2_switchTotSub),
     208                {NULL, ""},//OPCODE(o2_pushVars),
     209                {NULL, ""},//OPCODE(o2_popVars),
     210                /* 44 */
     211                {NULL, ""},
     212                {NULL, ""},
     213                {NULL, ""},
     214                {NULL, ""},
     215                /* 48 */
     216                {NULL, ""},
     217                {NULL, ""},
     218                {NULL, ""},
     219                {NULL, ""},
     220                /* 4C */
     221                {NULL, ""},
     222                {NULL, ""},
     223                {NULL, ""},
     224                {NULL, ""},
     225                /* 50 */
     226                {NULL, ""},//OPCODE(o2_loadMapObjects),
     227                {NULL, ""},//OPCODE(o2_freeGoblins),
     228                {NULL, ""},//OPCODE(o2_moveGoblin),
     229                {NULL, ""},//OPCODE(o2_writeGoblinPos),
     230                /* 54 */
     231                {NULL, ""},//OPCODE(o2_stopGoblin),
     232                {NULL, ""},//OPCODE(o2_setGoblinState),
     233                {NULL, ""},//OPCODE(o2_placeGoblin),
     234                {NULL, ""},
     235                /* 58 */
     236                {NULL, ""},
     237                {NULL, ""},
     238                {NULL, ""},
     239                {NULL, ""},
     240                /* 5C */
     241                {NULL, ""},
     242                {NULL, ""},
     243                {NULL, ""},
     244                {NULL, ""},
     245                /* 60 */
     246                {NULL, ""},
     247                {NULL, ""},
     248                {NULL, ""},
     249                {NULL, ""},
     250                /* 64 */
     251                {NULL, ""},
     252                {NULL, ""},
     253                {NULL, ""},
     254                {NULL, ""},
     255                /* 68 */
     256                {NULL, ""},
     257                {NULL, ""},
     258                {NULL, ""},
     259                {NULL, ""},
     260                /* 6C */
     261                {NULL, ""},
     262                {NULL, ""},
     263                {NULL, ""},
     264                {NULL, ""},
     265                /* 70 */
     266                {NULL, ""},
     267                {NULL, ""},
     268                {NULL, ""},
     269                {NULL, ""},
     270                /* 74 */
     271                {NULL, ""},
     272                {NULL, ""},
     273                {NULL, ""},
     274                {NULL, ""},
     275                /* 78 */
     276                {NULL, ""},
     277                {NULL, ""},
     278                {NULL, ""},
     279                {NULL, ""},
     280                /* 7C */
     281                {NULL, ""},
     282                {NULL, ""},
     283                {NULL, ""},
     284                {NULL, ""},
     285                /* 80 */
     286                {NULL, ""},//OPCODE(o2_initScreen),
     287                {NULL, ""},//OPCODE(o2_scroll),
     288                {NULL, ""},//OPCODE(o2_setScrollOffset),
     289                {NULL, ""},//OPCODE(o2_playImd),
     290                /* 84 */
     291                {NULL, ""},//OPCODE(o2_getImdInfo),
     292                {NULL, ""},//OPCODE(o2_openItk),
     293                {NULL, ""},//OPCODE(o2_closeItk),
     294                {NULL, ""},//OPCODE(o2_setImdFrontSurf),
     295                /* 88 */
     296                {NULL, ""},//OPCODE(o2_resetImdFrontSurf),
     297                {NULL, ""},
     298                {NULL, ""},
     299                {NULL, ""},
     300                /* 8C */
     301                {NULL, ""},
     302                {NULL, ""},
     303                {NULL, ""},
     304                {NULL, ""},
     305                /* 90 */
     306                {NULL, ""},
     307                {NULL, ""},
     308                {NULL, ""},
     309                {NULL, ""},
     310                /* 94 */
     311                {NULL, ""},
     312                {NULL, ""},
     313                {NULL, ""},
     314                {NULL, ""},
     315                /* 98 */
     316                {NULL, ""},
     317                {NULL, ""},
     318                {NULL, ""},
     319                {NULL, ""},
     320                /* 9C */
     321                {NULL, ""},
     322                {NULL, ""},
     323                {NULL, ""},
     324                {NULL, ""},
     325                /* A0 */
     326                {NULL, ""},
     327                {NULL, ""},
     328                {NULL, ""},
     329                {NULL, ""},
     330                /* A4 */
     331                {NULL, ""},
     332                {NULL, ""},
     333                {NULL, ""},
     334                {NULL, ""},
     335                /* A8 */
     336                {NULL, ""},
     337                {NULL, ""},
     338                {NULL, ""},
     339                {NULL, ""},
     340                /* AC */
     341                {NULL, ""},
     342                {NULL, ""},
     343                {NULL, ""},
     344                {NULL, ""},
     345                /* B0 */
     346                {NULL, ""},
     347                {NULL, ""},
     348                {NULL, ""},
     349                {NULL, ""},
     350                /* B4 */
     351                {NULL, ""},
     352                {NULL, ""},
     353                {NULL, ""},
     354                {NULL, ""},
     355                /* B8 */
     356                {NULL, ""},
     357                {NULL, ""},
     358                {NULL, ""},
     359                {NULL, ""},
     360                /* BC */
     361                {NULL, ""},
     362                {NULL, ""},
     363                {NULL, ""},
     364                {NULL, ""},
     365                /* C0 */
     366                {NULL, ""},
     367                {NULL, ""},
     368                {NULL, ""},
     369                {NULL, ""},
     370                /* C4 */
     371                {NULL, ""},
     372                {NULL, ""},
     373                {NULL, ""},
     374                {NULL, ""},
     375                /* C8 */
     376                {NULL, ""},
     377                {NULL, ""},
     378                {NULL, ""},
     379                {NULL, ""},
     380                /* CC */
     381                {NULL, ""},
     382                {NULL, ""},
     383                {NULL, ""},
     384                {NULL, ""},
     385                /* D0 */
     386                {NULL, ""},
     387                {NULL, ""},
     388                {NULL, ""},
     389                {NULL, ""},
     390                /* D4 */
     391                {NULL, ""},
     392                {NULL, ""},
     393                {NULL, ""},
     394                {NULL, ""},
     395                /* D8 */
     396                {NULL, ""},
     397                {NULL, ""},
     398                {NULL, ""},
     399                {NULL, ""},
     400                /* DC */
     401                {NULL, ""},
     402                {NULL, ""},
     403                {NULL, ""},
     404                {NULL, ""},
     405                /* E0 */
     406                {NULL, ""},
     407                {NULL, ""},
     408                {NULL, ""},
     409                {NULL, ""},
     410                /* E4 */
     411                {NULL, ""},
     412                {NULL, ""},
     413                {NULL, ""},
     414                {NULL, ""},
     415                /* E8 */
     416                {NULL, ""},
     417                {NULL, ""},
     418                {NULL, ""},
     419                {NULL, ""},
     420                /* EC */
     421                {NULL, ""},
     422                {NULL, ""},
     423                {NULL, ""},
     424                {NULL, ""},
     425                /* F0 */
     426                {NULL, ""},
     427                {NULL, ""},
     428                {NULL, ""},
     429                {NULL, ""},
     430                /* F4 */
     431                {NULL, ""},
     432                {NULL, ""},
     433                {NULL, ""},
     434                {NULL, ""},
     435                /* F8 */
     436                {NULL, ""},
     437                {NULL, ""},
     438                {NULL, ""},
     439                {NULL, ""},
     440                /* FC */
     441                {NULL, ""},
     442                {NULL, ""},
     443                {NULL, ""},
     444                {NULL, ""}
     445        };
     446
     447        static const OpcodeFuncEntryFascin opcodesFunc[80] = {
     448                /* 00 */
     449                OPCODE(o1_callSub),
     450                OPCODE(o1_callSub),
     451                OPCODE(o1_printTotText),
     452                OPCODE(o1_loadCursor),
     453                /* 04 */
     454                {NULL, ""},
     455                OPCODE(o1_switch),
     456                OPCODE(o1_repeatUntil),
     457                OPCODE(o1_whileDo),
     458                /* 08 */
     459                OPCODE(o1_if),
     460                OPCODE(o2_evaluateStore),
     461                OPCODE(o1_loadSpriteToPos),
     462                {NULL, ""},
     463                /* 0C */
     464                {NULL, ""},
     465                {NULL, ""},
     466                {NULL, ""},
     467                {NULL, ""},
     468                /* 10 */
     469                {NULL, ""},
     470                OPCODE(o2_printText),
     471                OPCODE(o1_loadTot),
     472                OPCODE(o1_palLoad),
     473                /* 14 */
     474                OPCODE(o1_keyFunc),
     475                OPCODE(o1_capturePush),
     476                OPCODE(o1_capturePop),
     477                OPCODE(o2_animPalInit),
     478                /* 18 */
     479                OPCODE(o2_addCollision),
     480                OPCODE(o2_freeCollision),
     481                {NULL, ""},
     482                {NULL, ""},
     483                /* 1C */
     484                {NULL, ""},
     485                {NULL, ""},
     486                OPCODE(o1_drawOperations),
     487                OPCODE(o1_setcmdCount),
     488                /* 20 */
     489                OPCODE(o1_return),
     490                OPCODE(o1_renewTimeInVars),
     491                OPCODE(o1_speakerOn),
     492                OPCODE(o1_speakerOff),
     493                /* 24 */
     494                OPCODE(o1_putPixel),
     495                OPCODE(o2_goblinFunc),
     496                OPCODE(o1_createSprite),
     497                OPCODE(o1_freeSprite),
     498                /* 28 */
     499                {NULL, ""},
     500                {NULL, ""},
     501                {NULL, ""},
     502                {NULL, ""},
     503                /* 2C */
     504                {NULL, ""},
     505                {NULL, ""},
     506                {NULL, ""},
     507                {NULL, ""},
     508                /* 30 */
     509                OPCODE(o1_returnTo),
     510                OPCODE(o1_loadSpriteContent),
     511                OPCODE(o1_copySprite),
     512                OPCODE(o1_fillRect),
     513                /* 34 */
     514                OPCODE(o1_drawLine),
     515                OPCODE(o1_strToLong),
     516                OPCODE(o1_invalidate),
     517                OPCODE(o1_setBackDelta),
     518                /* 38 */
     519                OPCODE(o1_playSound),
     520                OPCODE(o2_stopSound),
     521                OPCODE(o2_loadSound),
     522                OPCODE(o1_freeSoundSlot),
     523                /* 3C */
     524                OPCODE(o1_waitEndPlay),
     525                OPCODE(o1_playComposition),
     526                OPCODE(o2_getFreeMem),
     527                OPCODE(o2_checkData),
     528                /* 40 */
     529                {NULL, ""},
     530                OPCODE(o1_prepareStr),
     531                OPCODE(o1_insertStr),
     532                OPCODE(o1_cutStr),
     533                /* 44 */
     534                OPCODE(o1_strstr),
     535                OPCODE(o1_istrlen),
     536                OPCODE(o1_setMousePos),
     537                OPCODE(o1_setFrameRate),
     538                /* 48 */
     539                OPCODE(o1_animatePalette),
     540                OPCODE(o1_animateCursor),
     541                OPCODE(o1_blitCursor),
     542                OPCODE(o1_loadFont),
     543                /* 4C */
     544                OPCODE(o1_freeFont),
     545                OPCODE(o2_readData),
     546                OPCODE(o2_writeData),
     547                OPCODE(o1_manageDataFile),
     548        };
     549
     550        static const OpcodeGoblinEntryFascin opcodesGoblin[71] = {
     551                /* 00 */
     552                OPCODE(o2_loadInfogramesIns),
     553                OPCODE(o2_startInfogrames),
     554                OPCODE(o2_stopInfogrames),
     555                OPCODE(o2_geUnknown3),//{NULL, ""},
     556                /* 04 */
     557                {NULL, ""},
     558                OPCODE(o2_geUnknown5),//{NULL, ""},
     559                OPCODE(o2_geUnknown6),//{NULL, ""},
     560                {NULL, ""},
     561                /* 08 */
     562                {NULL, ""},
     563                OPCODE(o2_playInfogrames),
     564                {NULL, ""},
     565                {NULL, ""},
     566                /* 0C */
     567                {NULL, ""},
     568                {NULL, ""},
     569                {NULL, ""},
     570                {NULL, ""},
     571                /* 10 */
     572                {NULL, ""},
     573                {NULL, ""},
     574                {NULL, ""},
     575                {NULL, ""},
     576                /* 14 */
     577                {NULL, ""},
     578                {NULL, ""},
     579                {NULL, ""},
     580                {NULL, ""},
     581                /* 18 */
     582                {NULL, ""},
     583                {NULL, ""},
     584                {NULL, ""},
     585                {NULL, ""},
     586                /* 1C */
     587                {NULL, ""},
     588                {NULL, ""},
     589                {NULL, ""},
     590                {NULL, ""},
     591                /* 20 */
     592                {NULL, ""},
     593                {NULL, ""},
     594                {NULL, ""},
     595                {NULL, ""},
     596                /* 24 */
     597                {NULL, ""},
     598                {NULL, ""},
     599                {NULL, ""},
     600                OPCODE(o2_handleGoblins),
     601                /* 28 */
     602                OPCODE(o2_playProtracker),
     603                OPCODE(o2_stopProtracker),
     604                {NULL, ""},
     605                {NULL, ""},
     606                /* 2C */
     607                {NULL, ""},
     608                {NULL, ""},
     609                {NULL, ""},
     610                {NULL, ""},
     611                /* 30 */
     612                {NULL, ""},
     613                {NULL, ""},
     614                {NULL, ""},
     615                {NULL, ""},
     616                /* 34 */
     617                {NULL, ""},
     618                {NULL, ""},
     619                {NULL, ""},
     620                {NULL, ""},
     621                /* 38 */
     622                {NULL, ""},
     623                {NULL, ""},
     624                {NULL, ""},
     625                {NULL, ""},
     626                /* 3C */
     627                {NULL, ""},
     628                {NULL, ""},
     629                {NULL, ""},
     630                {NULL, ""},
     631                /* 40 */
     632                {NULL, ""},
     633                {NULL, ""},
     634                {NULL, ""},
     635                {NULL, ""},
     636                /* 44 */
     637                {NULL, ""},
     638                {NULL, ""},
     639                {NULL, ""},
     640        };
     641
     642        _opcodesDrawFascin = opcodesDraw;
     643        _opcodesFuncFascin = opcodesFunc;
     644        _opcodesGoblinFascin = opcodesGoblin;   
     645}
     646
     647void Inter_Fascin::executeDrawOpcode(byte i) {
     648        debugC(1, kDebugDrawOp, "opcodeDraw %d [0x%X] (%s)",
     649                        i, i, getOpcodeDrawDesc(i));
     650
     651        OpcodeDrawProcFascin op = _opcodesDrawFascin[i].proc;
     652
     653        if (op == NULL)
     654                warning("unimplemented Fascin opcodeDraw: %d", i);
     655        else
     656                (this->*op) ();
     657}
     658void Inter_Fascin::o2_geUnknown3(OpGobParams &params) {
     659        warning("ABOU GE Unknown 3\n");
     660}
     661void Inter_Fascin::o2_geUnknown5(OpGobParams &params) {
     662        warning("ABOU GE Unknown 5\n");
     663}
     664void Inter_Fascin::o2_geUnknown6(OpGobParams &params) {
     665        warning("ABOU GE Unknown 6\n");
     666}
     667void Inter_Fascin::o2_cdUnknown3() {
     668        warning("ABOU CD Unknown 3\n");
     669        uint16 resVar = (uint16) load16();
     670        uint16 resVar2 = (uint16) load16();
     671}
     672void Inter_Fascin::o2_cdUnknown11() {
     673        warning("ABOU CD Unknown 11\n");       
     674        _vm->_global->_inter_execPtr += 4;
     675//      uint16 resVar = (uint16) load16();
     676//      _vm->_global->_inter_execPtr += 4;
     677}
     678
     679bool Inter_Fascin::executeFuncOpcode(byte i, byte j, OpFuncParams &params) {
     680        debugC(1, kDebugFuncOp, "opcodeFunc %d.%d [0x%X.0x%X] (%s)",
     681                        i, j, i, j, getOpcodeFuncDesc(i, j));
     682
     683        if ((i > 4) || (j > 16)) {
     684                warning("Invalid opcodeFunc: %d.%d", i, j);
     685                return false;
     686        }
     687
     688        OpcodeFuncProcFascin op = _opcodesFuncFascin[i*16 + j].proc;
     689
     690        if (op == NULL)
     691                warning("unimplemented opcodeFunc: %d.%d", i, j);
     692        else
     693                return (this->*op) (params);
     694
     695        return false;
     696}
     697
     698void Inter_Fascin::executeGoblinOpcode(int i, OpGobParams &params) {
     699        debugC(1, kDebugGobOp, "opcodeGoblin %d [0x%X] (%s)",
     700                        i, i, getOpcodeGoblinDesc(i));
     701
     702        OpcodeGoblinProcFascin op = NULL;
     703
     704        for (int j = 0; j < ARRAYSIZE(_goblinFuncLookUp); j++)
     705                if (_goblinFuncLookUp[j][0] == i) {
     706                        op = _opcodesGoblinFascin[_goblinFuncLookUp[j][1]].proc;
     707                        break;
     708                }
     709
     710        if (op == NULL) {
     711                int16 val;
     712
     713                _vm->_global->_inter_execPtr -= 2;
     714                val = load16();
     715                _vm->_global->_inter_execPtr += val << 1;
     716                warning("unimplemented opcodeGob: %d", i);
     717        } else
     718                (this->*op) (params);
     719}
     720
     721const char *Inter_Fascin::getOpcodeDrawDesc(byte i) {
     722        return _opcodesDrawFascin[i].desc;
     723}
     724
     725const char *Inter_Fascin::getOpcodeFuncDesc(byte i, byte j) {
     726        if ((i > 4) || (j > 15))
     727                return "";
     728
     729        return _opcodesFuncFascin[i*16 + j].desc;
     730}
     731
     732const char *Inter_Fascin::getOpcodeGoblinDesc(int i) {
     733        for (int j = 0; j < ARRAYSIZE(_goblinFuncLookUp); j++)
     734                if (_goblinFuncLookUp[j][0] == i)
     735                        return _opcodesGoblinFascin[_goblinFuncLookUp[j][1]].desc;
     736        warning("Error in getOpcodeGoblinDesc %d\n",i);
     737        return "";
     738}
     739
     740} // 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
    
     
    11461146                debugC(2, kDebugGameFlow, "Skipping copy protection screen");
    11471147                return false;
    11481148        }
    1149 
    11501149        _vm->_global->_inter_execPtr = _vm->_game->_totFileData + offset;
    11511150
    11521151        if ((params.counter == params.cmdCount) && (params.retFlag == 2))
     
    14231422bool Inter_v1::o1_loadTot(OpFuncParams &params) {
    14241423        char buf[20];
    14251424        int8 size;
    1426 
     1425 
    14271426        if ((*_vm->_global->_inter_execPtr & 0x80) != 0) {
    14281427                _vm->_global->_inter_execPtr++;
    14291428                evalExpr(0);
     
    14361435                buf[size] = 0;
    14371436        }
    14381437
    1439         strcat(buf, ".tot");
     1438        if (_vm->getGameType() == kGameTypeGeisha)
     1439                strcat(buf, ".0ot");
     1440        else
     1441                strcat(buf, ".tot");
    14401442        if (_terminate != 2)
    14411443                _terminate = 1;
    14421444        strcpy(_vm->_game->_totToLoad, buf);
  • engines/gob/inter_v2.cpp

     
    21232123                int16 totSize;
    21242124
    21252125                source = SOUND_TOT;
    2126 
     2126       
    21272127                dataPtr = (byte *) _vm->_game->loadTotResource(id, &totSize);
    21282128                dataSize = (uint32) ((int32) totSize);
    21292129        }
  • engines/gob/module.mk

     
    77        draw_v1.o \
    88        draw_v2.o \
    99        draw_bargon.o \
     10        draw_fascin.o \
    1011        driver_vga.o \
    1112        game.o \
    1213        game_v1.o \
     
    3031        inter_v1.o \
    3132        inter_v2.o \
    3233        inter_bargon.o \
     34        inter_fascin.o \
    3335        inter_v3.o \
    3436        inter_v4.o \
    3537        inter_v5.o \