2005-05-18 02:32:25 +00:00
|
|
|
/* ScummVM - Scumm Interpreter
|
|
|
|
* Copyright (C) 2001 Ludvig Strigeus
|
|
|
|
* Copyright (C) 2001-2005 The ScummVM project
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
*
|
|
|
|
* $Header$
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2005-06-24 15:23:51 +00:00
|
|
|
#include "common/stdafx.h"
|
2005-05-18 02:32:25 +00:00
|
|
|
#include "scumm/actor.h"
|
|
|
|
#include "scumm/charset.h"
|
|
|
|
#include "scumm/intern.h"
|
|
|
|
#include "scumm/object.h"
|
|
|
|
#include "scumm/scumm.h"
|
|
|
|
#include "scumm/util.h"
|
|
|
|
#include "scumm/verbs.h"
|
|
|
|
|
|
|
|
namespace Scumm {
|
|
|
|
|
|
|
|
#define OPCODE(x) _OPCODE(ScummEngine_c64, x)
|
|
|
|
|
|
|
|
void ScummEngine_c64::setupOpcodes() {
|
|
|
|
static const OpcodeEntryC64 opcodes[256] = {
|
|
|
|
/* 00 */
|
|
|
|
OPCODE(o5_stopObjectCode),
|
|
|
|
OPCODE(o2_putActor),
|
2005-09-06 01:20:01 +00:00
|
|
|
OPCODE(o_askDisk),
|
|
|
|
OPCODE(o_unknown1),
|
2005-05-18 02:32:25 +00:00
|
|
|
/* 04 */
|
2005-09-06 15:40:12 +00:00
|
|
|
OPCODE(o_isGreaterEqual),
|
2005-09-06 01:20:01 +00:00
|
|
|
OPCODE(o_stopCurrentScript),
|
|
|
|
OPCODE(o5_getDist),
|
2005-05-19 14:33:52 +00:00
|
|
|
OPCODE(o5_getActorRoom),
|
2005-05-18 02:32:25 +00:00
|
|
|
/* 08 */
|
2005-09-06 15:40:12 +00:00
|
|
|
OPCODE(o_isNotEqual),
|
2005-09-06 01:20:01 +00:00
|
|
|
OPCODE(o_stopCurrentScript),
|
|
|
|
OPCODE(o_stopCurrentScript),
|
|
|
|
OPCODE(o_setActorBitVar),
|
2005-05-18 02:32:25 +00:00
|
|
|
/* 0C */
|
2005-05-18 15:30:31 +00:00
|
|
|
OPCODE(o_loadSound),
|
2005-09-06 01:20:01 +00:00
|
|
|
OPCODE(o_printEgo_c64),
|
2005-05-19 14:33:52 +00:00
|
|
|
OPCODE(o_putActorAtObject),
|
2005-09-05 14:44:43 +00:00
|
|
|
OPCODE(o2_clearState02),
|
2005-05-18 02:32:25 +00:00
|
|
|
/* 10 */
|
2005-05-20 06:39:18 +00:00
|
|
|
OPCODE(o5_breakHere),
|
2005-05-20 06:47:57 +00:00
|
|
|
OPCODE(o_animateActor),
|
2005-05-18 02:32:25 +00:00
|
|
|
OPCODE(o2_panCameraTo),
|
2005-05-19 14:33:52 +00:00
|
|
|
OPCODE(o_unknown13),
|
2005-05-18 02:32:25 +00:00
|
|
|
/* 14 */
|
2005-09-14 08:20:37 +00:00
|
|
|
OPCODE(o_print_c64),
|
2005-05-18 02:32:25 +00:00
|
|
|
OPCODE(o2_actorFromPos),
|
|
|
|
OPCODE(o5_getRandomNr),
|
2005-09-14 08:20:37 +00:00
|
|
|
OPCODE(o_clearState08),
|
2005-05-18 02:32:25 +00:00
|
|
|
/* 18 */
|
2005-09-06 15:40:12 +00:00
|
|
|
OPCODE(o_jumpRelative),
|
2005-09-06 01:20:01 +00:00
|
|
|
OPCODE(o_stopCurrentScript),
|
|
|
|
OPCODE(o5_move),
|
|
|
|
OPCODE(o_getActorBitVar),
|
2005-05-18 02:32:25 +00:00
|
|
|
/* 1C */
|
|
|
|
OPCODE(o5_startSound),
|
2005-09-06 01:20:01 +00:00
|
|
|
OPCODE(o2_setBitVar),
|
2005-05-18 02:32:25 +00:00
|
|
|
OPCODE(o2_walkActorTo),
|
2005-09-05 14:44:43 +00:00
|
|
|
OPCODE(o2_ifState04),
|
2005-05-18 02:32:25 +00:00
|
|
|
/* 20 */
|
|
|
|
OPCODE(o5_stopMusic),
|
|
|
|
OPCODE(o2_putActor),
|
|
|
|
OPCODE(o5_saveLoadGame),
|
2005-09-06 01:20:01 +00:00
|
|
|
OPCODE(o_stopCurrentScript),
|
2005-05-18 02:32:25 +00:00
|
|
|
/* 24 */
|
2005-09-06 01:20:01 +00:00
|
|
|
OPCODE(o_unknown2),
|
2005-05-18 15:30:31 +00:00
|
|
|
OPCODE(o5_loadRoom),
|
2005-09-06 01:20:01 +00:00
|
|
|
OPCODE(o_getClosestObjActor),
|
2005-05-19 14:33:52 +00:00
|
|
|
OPCODE(o2_getActorY),
|
2005-05-18 02:32:25 +00:00
|
|
|
/* 28 */
|
2005-09-06 15:40:12 +00:00
|
|
|
OPCODE(o_equalZero),
|
2005-05-18 02:32:25 +00:00
|
|
|
OPCODE(o2_setOwnerOf),
|
2005-05-18 15:30:31 +00:00
|
|
|
OPCODE(o2_delay),
|
2005-09-06 01:20:01 +00:00
|
|
|
OPCODE(o_setActorBitVar),
|
2005-05-18 02:32:25 +00:00
|
|
|
/* 2C */
|
2005-09-06 01:20:01 +00:00
|
|
|
OPCODE(o_stopCurrentScript),
|
2005-05-18 02:32:25 +00:00
|
|
|
OPCODE(o5_putActorInRoom),
|
2005-09-06 01:20:01 +00:00
|
|
|
OPCODE(o_print_c64),
|
2005-09-05 14:44:43 +00:00
|
|
|
OPCODE(o2_ifState08),
|
2005-05-18 02:32:25 +00:00
|
|
|
/* 30 */
|
2005-05-19 14:33:52 +00:00
|
|
|
OPCODE(o_loadActor),
|
2005-05-18 02:32:25 +00:00
|
|
|
OPCODE(o2_getBitVar),
|
|
|
|
OPCODE(o2_setCameraAt),
|
2005-05-19 14:33:52 +00:00
|
|
|
OPCODE(o_freezeScript),
|
2005-05-18 02:32:25 +00:00
|
|
|
/* 34 */
|
2005-09-06 01:20:01 +00:00
|
|
|
OPCODE(o5_getDist),
|
|
|
|
OPCODE(o_stopCurrentScript),
|
|
|
|
OPCODE(o2_walkActorToObject),
|
2005-09-05 14:44:43 +00:00
|
|
|
OPCODE(o2_clearState04),
|
2005-05-18 02:32:25 +00:00
|
|
|
/* 38 */
|
2005-09-06 15:40:12 +00:00
|
|
|
OPCODE(o_isLessEqual),
|
2005-09-06 01:20:01 +00:00
|
|
|
OPCODE(o_stopCurrentScript),
|
|
|
|
OPCODE(o2_subtract),
|
|
|
|
OPCODE(o_stopCurrentScript),
|
2005-05-18 02:32:25 +00:00
|
|
|
/* 3C */
|
|
|
|
OPCODE(o5_stopSound),
|
2005-09-06 01:20:01 +00:00
|
|
|
OPCODE(o2_setBitVar),
|
2005-05-18 02:32:25 +00:00
|
|
|
OPCODE(o2_walkActorTo),
|
2005-05-20 06:29:34 +00:00
|
|
|
OPCODE(o2_ifState02),
|
2005-05-18 02:32:25 +00:00
|
|
|
/* 40 */
|
|
|
|
OPCODE(o2_cutscene),
|
|
|
|
OPCODE(o2_putActor),
|
|
|
|
OPCODE(o2_startScript),
|
2005-09-06 01:20:01 +00:00
|
|
|
OPCODE(o_unknown1),
|
2005-05-18 02:32:25 +00:00
|
|
|
/* 44 */
|
2005-09-06 15:40:12 +00:00
|
|
|
OPCODE(o_isLess),
|
2005-09-06 01:20:01 +00:00
|
|
|
OPCODE(o_stopCurrentScript),
|
|
|
|
OPCODE(o5_increment),
|
2005-05-19 14:33:52 +00:00
|
|
|
OPCODE(o2_getActorX),
|
2005-05-18 02:32:25 +00:00
|
|
|
/* 48 */
|
2005-09-06 15:40:12 +00:00
|
|
|
OPCODE(o_isEqual),
|
2005-09-06 01:20:01 +00:00
|
|
|
OPCODE(o_stopCurrentScript),
|
2005-05-19 14:33:52 +00:00
|
|
|
OPCODE(o_loadRoom),
|
2005-09-06 01:20:01 +00:00
|
|
|
OPCODE(o_setActorBitVar),
|
2005-05-18 02:32:25 +00:00
|
|
|
/* 4C */
|
2005-05-18 15:30:31 +00:00
|
|
|
OPCODE(o_loadScript),
|
2005-05-19 14:33:52 +00:00
|
|
|
OPCODE(o_unknown4D),
|
|
|
|
OPCODE(o_putActorAtObject),
|
2005-09-05 14:44:43 +00:00
|
|
|
OPCODE(o2_clearState02),
|
2005-05-18 02:32:25 +00:00
|
|
|
/* 50 */
|
2005-09-06 01:20:01 +00:00
|
|
|
OPCODE(o_nop),
|
2005-05-20 06:47:57 +00:00
|
|
|
OPCODE(o_animateActor),
|
2005-05-18 02:32:25 +00:00
|
|
|
OPCODE(o5_actorFollowCamera),
|
2005-09-06 01:20:01 +00:00
|
|
|
OPCODE(o5_startSound),
|
2005-05-18 02:32:25 +00:00
|
|
|
/* 54 */
|
|
|
|
OPCODE(o5_setObjectName),
|
|
|
|
OPCODE(o2_actorFromPos),
|
2005-09-22 13:34:20 +00:00
|
|
|
OPCODE(o_getActorMoving),
|
2005-09-14 08:20:37 +00:00
|
|
|
OPCODE(o_clearState08),
|
2005-05-18 02:32:25 +00:00
|
|
|
/* 58 */
|
2005-09-06 15:40:12 +00:00
|
|
|
OPCODE(o_beginOverride),
|
2005-09-06 01:20:01 +00:00
|
|
|
OPCODE(o_stopCurrentScript),
|
|
|
|
OPCODE(o2_add),
|
|
|
|
OPCODE(o_getActorBitVar),
|
2005-05-18 02:32:25 +00:00
|
|
|
/* 5C */
|
2005-05-20 06:29:34 +00:00
|
|
|
OPCODE(o5_startSound),
|
2005-09-06 01:20:01 +00:00
|
|
|
OPCODE(o2_setBitVar),
|
2005-05-18 02:32:25 +00:00
|
|
|
OPCODE(o2_walkActorTo),
|
2005-09-05 14:44:43 +00:00
|
|
|
OPCODE(o2_ifState04),
|
2005-05-18 02:32:25 +00:00
|
|
|
/* 60 */
|
2005-05-18 15:30:31 +00:00
|
|
|
OPCODE(o_cursorCommand),
|
2005-05-18 02:32:25 +00:00
|
|
|
OPCODE(o2_putActor),
|
2005-09-06 01:20:01 +00:00
|
|
|
OPCODE(o2_stopScript),
|
|
|
|
OPCODE(o_stopCurrentScript),
|
2005-05-18 02:32:25 +00:00
|
|
|
/* 64 */
|
2005-09-06 01:20:01 +00:00
|
|
|
OPCODE(o_unknown3),
|
|
|
|
OPCODE(o_stopCurrentScript),
|
|
|
|
OPCODE(o_getClosestObjActor),
|
2005-09-05 14:44:43 +00:00
|
|
|
OPCODE(o5_getActorFacing),
|
2005-05-18 02:32:25 +00:00
|
|
|
/* 68 */
|
|
|
|
OPCODE(o5_isScriptRunning),
|
|
|
|
OPCODE(o2_setOwnerOf),
|
2005-09-06 01:20:01 +00:00
|
|
|
OPCODE(o_stopCurrentScript),
|
|
|
|
OPCODE(o_setActorBitVar),
|
2005-05-18 02:32:25 +00:00
|
|
|
/* 6C */
|
2005-09-06 01:20:01 +00:00
|
|
|
OPCODE(o_stopCurrentScript),
|
2005-05-18 02:32:25 +00:00
|
|
|
OPCODE(o5_putActorInRoom),
|
|
|
|
OPCODE(o2_dummy),
|
2005-05-18 15:30:31 +00:00
|
|
|
OPCODE(o2_ifState08),
|
2005-05-18 02:32:25 +00:00
|
|
|
/* 70 */
|
2005-05-18 15:30:31 +00:00
|
|
|
OPCODE(o_lights),
|
2005-09-06 01:20:01 +00:00
|
|
|
OPCODE(o2_getBitVar),
|
|
|
|
OPCODE(o_nop),
|
|
|
|
OPCODE(o5_getObjectOwner),
|
2005-05-18 02:32:25 +00:00
|
|
|
/* 74 */
|
2005-09-06 01:20:01 +00:00
|
|
|
OPCODE(o5_getDist),
|
2005-09-14 08:20:37 +00:00
|
|
|
OPCODE(o_printEgo_c64),
|
2005-09-06 01:20:01 +00:00
|
|
|
OPCODE(o2_walkActorToObject),
|
2005-09-05 14:44:43 +00:00
|
|
|
OPCODE(o2_clearState04),
|
2005-05-18 02:32:25 +00:00
|
|
|
/* 78 */
|
2005-09-06 15:40:12 +00:00
|
|
|
OPCODE(o_isGreater),
|
2005-09-06 01:20:01 +00:00
|
|
|
OPCODE(o_stopCurrentScript),
|
|
|
|
OPCODE(o_stopCurrentScript),
|
|
|
|
OPCODE(o_stopCurrentScript),
|
2005-05-18 02:32:25 +00:00
|
|
|
/* 7C */
|
|
|
|
OPCODE(o5_isSoundRunning),
|
2005-09-06 01:20:01 +00:00
|
|
|
OPCODE(o2_setBitVar),
|
2005-05-18 02:32:25 +00:00
|
|
|
OPCODE(o2_walkActorTo),
|
2005-09-05 14:44:43 +00:00
|
|
|
OPCODE(o2_ifNotState02),
|
2005-05-18 02:32:25 +00:00
|
|
|
/* 80 */
|
2005-09-06 01:20:01 +00:00
|
|
|
OPCODE(o_stopCurrentScript),
|
2005-05-18 02:32:25 +00:00
|
|
|
OPCODE(o2_putActor),
|
2005-09-06 01:20:01 +00:00
|
|
|
OPCODE(o_stopCurrentScript),
|
|
|
|
OPCODE(o_unknown1),
|
2005-05-18 02:32:25 +00:00
|
|
|
/* 84 */
|
2005-09-06 15:40:12 +00:00
|
|
|
OPCODE(o_isGreaterEqual),
|
2005-09-06 01:20:01 +00:00
|
|
|
OPCODE(o_stopCurrentScript),
|
2005-09-05 14:44:43 +00:00
|
|
|
OPCODE(o_badOpcode),
|
2005-05-19 14:33:52 +00:00
|
|
|
OPCODE(o5_getActorRoom),
|
2005-05-18 02:32:25 +00:00
|
|
|
/* 88 */
|
2005-09-06 15:40:12 +00:00
|
|
|
OPCODE(o_isNotEqual),
|
2005-09-06 01:20:01 +00:00
|
|
|
OPCODE(o_stopCurrentScript),
|
|
|
|
OPCODE(o_stopCurrentScript),
|
|
|
|
OPCODE(o_setActorBitVar),
|
2005-05-18 02:32:25 +00:00
|
|
|
/* 8C */
|
2005-09-06 01:20:01 +00:00
|
|
|
OPCODE(o_loadSound),
|
|
|
|
OPCODE(o_stopCurrentScript),
|
2005-05-19 14:33:52 +00:00
|
|
|
OPCODE(o_putActorAtObject),
|
2005-09-05 14:44:43 +00:00
|
|
|
OPCODE(o2_setState02),
|
2005-05-18 02:32:25 +00:00
|
|
|
/* 90 */
|
2005-09-06 01:20:01 +00:00
|
|
|
OPCODE(o2_pickupObject),
|
2005-05-20 06:47:57 +00:00
|
|
|
OPCODE(o_animateActor),
|
2005-05-18 02:32:25 +00:00
|
|
|
OPCODE(o2_panCameraTo),
|
2005-05-19 14:33:52 +00:00
|
|
|
OPCODE(o_unknown93),
|
2005-05-18 02:32:25 +00:00
|
|
|
/* 94 */
|
|
|
|
OPCODE(o5_print),
|
|
|
|
OPCODE(o2_actorFromPos),
|
2005-09-06 01:20:01 +00:00
|
|
|
OPCODE(o_stopCurrentScript),
|
2005-09-14 08:20:37 +00:00
|
|
|
OPCODE(o_setState08),
|
2005-05-18 02:32:25 +00:00
|
|
|
/* 98 */
|
|
|
|
OPCODE(o2_restart),
|
2005-09-06 01:20:01 +00:00
|
|
|
OPCODE(o_stopCurrentScript),
|
|
|
|
OPCODE(o5_move),
|
|
|
|
OPCODE(o_getActorBitVar),
|
2005-05-18 02:32:25 +00:00
|
|
|
/* 9C */
|
|
|
|
OPCODE(o5_startSound),
|
2005-09-06 01:20:01 +00:00
|
|
|
OPCODE(o2_setBitVar),
|
2005-05-18 02:32:25 +00:00
|
|
|
OPCODE(o2_walkActorTo),
|
2005-05-20 06:29:34 +00:00
|
|
|
OPCODE(o2_ifNotState04),
|
2005-05-18 02:32:25 +00:00
|
|
|
/* A0 */
|
|
|
|
OPCODE(o5_stopObjectCode),
|
|
|
|
OPCODE(o2_putActor),
|
|
|
|
OPCODE(o5_saveLoadGame),
|
2005-09-06 01:20:01 +00:00
|
|
|
OPCODE(o_stopCurrentScript),
|
2005-05-18 02:32:25 +00:00
|
|
|
/* A4 */
|
2005-09-06 01:20:01 +00:00
|
|
|
OPCODE(o_unknown2),
|
2005-05-20 06:29:34 +00:00
|
|
|
OPCODE(o5_loadRoom),
|
2005-09-06 01:20:01 +00:00
|
|
|
OPCODE(o_stopCurrentScript),
|
2005-05-19 14:33:52 +00:00
|
|
|
OPCODE(o2_getActorY),
|
2005-05-18 02:32:25 +00:00
|
|
|
/* A8 */
|
2005-09-06 15:40:12 +00:00
|
|
|
OPCODE(o_notEqualZero),
|
2005-05-18 02:32:25 +00:00
|
|
|
OPCODE(o2_setOwnerOf),
|
2005-09-06 01:20:01 +00:00
|
|
|
OPCODE(o_stopCurrentScript),
|
|
|
|
OPCODE(o_setActorBitVar),
|
2005-05-18 02:32:25 +00:00
|
|
|
/* AC */
|
2005-09-06 01:20:01 +00:00
|
|
|
OPCODE(o_stopCurrentScript),
|
2005-05-18 02:32:25 +00:00
|
|
|
OPCODE(o5_putActorInRoom),
|
2005-09-06 01:20:01 +00:00
|
|
|
OPCODE(o_print_c64),
|
2005-05-20 06:29:34 +00:00
|
|
|
OPCODE(o2_ifNotState08),
|
2005-05-18 02:32:25 +00:00
|
|
|
/* B0 */
|
2005-05-19 14:33:52 +00:00
|
|
|
OPCODE(o_loadActor),
|
2005-05-18 02:32:25 +00:00
|
|
|
OPCODE(o2_getBitVar),
|
|
|
|
OPCODE(o2_setCameraAt),
|
2005-05-19 14:33:52 +00:00
|
|
|
OPCODE(o_unfreezeScript),
|
2005-05-18 02:32:25 +00:00
|
|
|
/* B4 */
|
2005-09-06 01:20:01 +00:00
|
|
|
OPCODE(o5_getDist),
|
|
|
|
OPCODE(o_stopCurrentScript),
|
|
|
|
OPCODE(o2_walkActorToObject),
|
2005-05-20 06:29:34 +00:00
|
|
|
OPCODE(o2_setState04),
|
2005-05-18 02:32:25 +00:00
|
|
|
/* B8 */
|
2005-09-06 15:40:12 +00:00
|
|
|
OPCODE(o_isLessEqual),
|
2005-09-06 01:20:01 +00:00
|
|
|
OPCODE(o_stopCurrentScript),
|
|
|
|
OPCODE(o2_subtract),
|
|
|
|
OPCODE(o_stopCurrentScript),
|
2005-05-18 02:32:25 +00:00
|
|
|
/* BC */
|
|
|
|
OPCODE(o5_stopSound),
|
2005-09-06 01:20:01 +00:00
|
|
|
OPCODE(o2_setBitVar),
|
2005-05-18 02:32:25 +00:00
|
|
|
OPCODE(o2_walkActorTo),
|
2005-09-05 14:44:43 +00:00
|
|
|
OPCODE(o2_ifNotState02),
|
2005-05-18 02:32:25 +00:00
|
|
|
/* C0 */
|
|
|
|
OPCODE(o2_endCutscene),
|
|
|
|
OPCODE(o2_putActor),
|
|
|
|
OPCODE(o2_startScript),
|
2005-09-06 01:20:01 +00:00
|
|
|
OPCODE(o_unknown1),
|
2005-05-18 02:32:25 +00:00
|
|
|
/* C4 */
|
2005-09-06 15:40:12 +00:00
|
|
|
OPCODE(o_isLess),
|
2005-09-06 01:20:01 +00:00
|
|
|
OPCODE(o_stopCurrentScript),
|
|
|
|
OPCODE(o5_decrement),
|
2005-05-19 14:33:52 +00:00
|
|
|
OPCODE(o2_getActorX),
|
2005-05-18 02:32:25 +00:00
|
|
|
/* C8 */
|
2005-09-06 15:40:12 +00:00
|
|
|
OPCODE(o_isEqual),
|
2005-09-06 01:20:01 +00:00
|
|
|
OPCODE(o_stopCurrentScript),
|
2005-05-19 14:33:52 +00:00
|
|
|
OPCODE(o_loadRoom),
|
2005-09-06 01:20:01 +00:00
|
|
|
OPCODE(o_setActorBitVar),
|
2005-05-18 02:32:25 +00:00
|
|
|
/* CC */
|
2005-05-19 14:33:52 +00:00
|
|
|
OPCODE(o_loadScript),
|
2005-09-06 01:20:01 +00:00
|
|
|
OPCODE(o_unknownCD),
|
2005-05-19 14:33:52 +00:00
|
|
|
OPCODE(o_putActorAtObject),
|
2005-09-05 14:44:43 +00:00
|
|
|
OPCODE(o2_setState02),
|
2005-05-18 02:32:25 +00:00
|
|
|
/* D0 */
|
2005-09-06 01:20:01 +00:00
|
|
|
OPCODE(o_nop),
|
2005-05-20 06:47:57 +00:00
|
|
|
OPCODE(o_animateActor),
|
2005-05-18 02:32:25 +00:00
|
|
|
OPCODE(o5_actorFollowCamera),
|
2005-09-06 01:20:01 +00:00
|
|
|
OPCODE(o5_stopSound),
|
2005-05-18 02:32:25 +00:00
|
|
|
/* D4 */
|
|
|
|
OPCODE(o5_setObjectName),
|
|
|
|
OPCODE(o2_actorFromPos),
|
2005-09-22 13:34:20 +00:00
|
|
|
OPCODE(o_getActorMoving),
|
2005-09-14 08:20:37 +00:00
|
|
|
OPCODE(o_setState08),
|
2005-05-18 02:32:25 +00:00
|
|
|
/* D8 */
|
2005-09-06 01:20:01 +00:00
|
|
|
OPCODE(o_stopCurrentScript),
|
|
|
|
OPCODE(o_stopCurrentScript),
|
|
|
|
OPCODE(o2_add),
|
|
|
|
OPCODE(o_getActorBitVar),
|
2005-05-18 02:32:25 +00:00
|
|
|
/* DC */
|
2005-05-20 06:29:34 +00:00
|
|
|
OPCODE(o5_startSound),
|
2005-09-06 01:20:01 +00:00
|
|
|
OPCODE(o2_setBitVar),
|
2005-05-18 02:32:25 +00:00
|
|
|
OPCODE(o2_walkActorTo),
|
2005-05-20 06:29:34 +00:00
|
|
|
OPCODE(o2_ifNotState04),
|
2005-05-18 02:32:25 +00:00
|
|
|
/* E0 */
|
2005-09-06 01:20:01 +00:00
|
|
|
OPCODE(o_cursorCommand),
|
2005-05-18 02:32:25 +00:00
|
|
|
OPCODE(o2_putActor),
|
2005-09-06 01:20:01 +00:00
|
|
|
OPCODE(o2_stopScript),
|
|
|
|
OPCODE(o_stopCurrentScript),
|
2005-05-18 02:32:25 +00:00
|
|
|
/* E4 */
|
2005-09-06 01:20:01 +00:00
|
|
|
OPCODE(o_unknown3),
|
2005-05-18 02:32:25 +00:00
|
|
|
OPCODE(o2_loadRoomWithEgo),
|
2005-09-06 01:20:01 +00:00
|
|
|
OPCODE(o_stopCurrentScript),
|
2005-09-05 14:44:43 +00:00
|
|
|
OPCODE(o5_getActorFacing),
|
2005-05-18 02:32:25 +00:00
|
|
|
/* E8 */
|
|
|
|
OPCODE(o5_isScriptRunning),
|
|
|
|
OPCODE(o2_setOwnerOf),
|
2005-09-06 01:20:01 +00:00
|
|
|
OPCODE(o_stopCurrentScript),
|
|
|
|
OPCODE(o_setActorBitVar),
|
2005-05-18 02:32:25 +00:00
|
|
|
/* EC */
|
2005-09-06 01:20:01 +00:00
|
|
|
OPCODE(o_stopCurrentScript),
|
2005-05-18 02:32:25 +00:00
|
|
|
OPCODE(o5_putActorInRoom),
|
|
|
|
OPCODE(o2_dummy),
|
2005-05-18 15:30:31 +00:00
|
|
|
OPCODE(o2_ifNotState08),
|
2005-05-18 02:32:25 +00:00
|
|
|
/* F0 */
|
2005-05-19 14:33:52 +00:00
|
|
|
OPCODE(o_lights),
|
2005-09-06 01:20:01 +00:00
|
|
|
OPCODE(o2_getBitVar),
|
|
|
|
OPCODE(o_nop),
|
|
|
|
OPCODE(o5_getObjectOwner),
|
2005-05-18 02:32:25 +00:00
|
|
|
/* F4 */
|
2005-09-06 01:20:01 +00:00
|
|
|
OPCODE(o5_getDist),
|
|
|
|
OPCODE(o_stopCurrentScript),
|
|
|
|
OPCODE(o2_walkActorToObject),
|
2005-05-20 06:29:34 +00:00
|
|
|
OPCODE(o2_setState04),
|
2005-05-18 02:32:25 +00:00
|
|
|
/* F8 */
|
2005-09-06 15:40:12 +00:00
|
|
|
OPCODE(o_isGreater),
|
2005-09-06 01:20:01 +00:00
|
|
|
OPCODE(o_stopCurrentScript),
|
|
|
|
OPCODE(o_stopCurrentScript),
|
|
|
|
OPCODE(o_stopCurrentScript),
|
2005-05-18 02:32:25 +00:00
|
|
|
/* FC */
|
|
|
|
OPCODE(o5_isSoundRunning),
|
2005-09-06 01:20:01 +00:00
|
|
|
OPCODE(o2_setBitVar),
|
2005-05-18 02:32:25 +00:00
|
|
|
OPCODE(o2_walkActorTo),
|
2005-05-19 14:33:52 +00:00
|
|
|
OPCODE(o2_ifState02)
|
2005-05-18 02:32:25 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
_opcodesC64 = opcodes;
|
|
|
|
}
|
|
|
|
|
|
|
|
#define SENTENCE_SCRIPT 2
|
|
|
|
|
|
|
|
#define PARAM_1 0x80
|
|
|
|
#define PARAM_2 0x40
|
|
|
|
#define PARAM_3 0x20
|
|
|
|
|
|
|
|
void ScummEngine_c64::executeOpcode(byte i) {
|
|
|
|
OpcodeProcC64 op = _opcodesC64[i].proc;
|
|
|
|
(this->*op) ();
|
|
|
|
}
|
|
|
|
|
2005-09-06 01:20:01 +00:00
|
|
|
int ScummEngine_c64::getVarOrDirectWord(byte mask) {
|
|
|
|
return getVarOrDirectByte(mask);
|
2005-05-18 15:30:31 +00:00
|
|
|
}
|
|
|
|
|
2005-09-06 01:20:01 +00:00
|
|
|
uint ScummEngine_c64::fetchScriptWord() {
|
|
|
|
return fetchScriptByte();
|
2005-05-18 15:30:31 +00:00
|
|
|
}
|
|
|
|
|
2005-09-06 01:20:01 +00:00
|
|
|
const char *ScummEngine_c64::getOpcodeDesc(byte i) {
|
|
|
|
return _opcodesC64[i].desc;
|
2005-05-18 15:30:31 +00:00
|
|
|
}
|
|
|
|
|
2005-09-14 08:20:37 +00:00
|
|
|
int ScummEngine_c64::getObjectFlag() {
|
|
|
|
if (_opcode & 0x40)
|
|
|
|
return _activeObject;
|
|
|
|
return fetchScriptByte();
|
|
|
|
}
|
|
|
|
|
|
|
|
void ScummEngine_c64::setStateCommon(byte type) {
|
|
|
|
int obj = getObjectFlag();
|
|
|
|
putState(obj, getState(obj) | type);
|
|
|
|
}
|
|
|
|
|
|
|
|
void ScummEngine_c64::clearStateCommon(byte type) {
|
|
|
|
int obj = getObjectFlag();
|
|
|
|
putState(obj, getState(obj) & ~type);
|
|
|
|
}
|
|
|
|
|
|
|
|
void ScummEngine_c64::ifStateCommon(byte type) {
|
|
|
|
int obj = getObjectFlag();
|
|
|
|
|
|
|
|
if ((getState(obj) & type) == 0) {
|
|
|
|
o_jumpRelative();
|
|
|
|
} else {
|
|
|
|
fetchScriptByte();
|
|
|
|
fetchScriptByte();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void ScummEngine_c64::ifNotStateCommon(byte type) {
|
|
|
|
int obj = getObjectFlag();
|
|
|
|
|
|
|
|
if ((getState(obj) & type) != 0) {
|
|
|
|
o_jumpRelative();
|
|
|
|
} else {
|
|
|
|
fetchScriptByte();
|
|
|
|
fetchScriptByte();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void ScummEngine_c64::o_setState08() {
|
|
|
|
int obj = getObjectFlag();
|
|
|
|
putState(obj, getState(obj) | 0x08);
|
|
|
|
markObjectRectAsDirty(obj);
|
|
|
|
clearDrawObjectQueue();
|
|
|
|
}
|
|
|
|
|
|
|
|
void ScummEngine_c64::o_clearState08() {
|
|
|
|
int obj = getObjectFlag();
|
|
|
|
putState(obj, getState(obj) & ~0x08);
|
|
|
|
markObjectRectAsDirty(obj);
|
|
|
|
clearDrawObjectQueue();
|
|
|
|
}
|
|
|
|
|
2005-09-06 01:20:01 +00:00
|
|
|
void ScummEngine_c64::o_stopCurrentScript() {
|
2005-05-20 06:29:34 +00:00
|
|
|
int script;
|
|
|
|
|
2005-09-06 01:20:01 +00:00
|
|
|
script = vm.slot[_currentScript].number;
|
2005-05-20 06:29:34 +00:00
|
|
|
|
|
|
|
if (_currentScript != 0 && vm.slot[_currentScript].number == script)
|
|
|
|
stopObjectCode();
|
|
|
|
else
|
|
|
|
stopScript(script);
|
|
|
|
}
|
|
|
|
|
2005-05-18 15:30:31 +00:00
|
|
|
void ScummEngine_c64::o_loadSound() {
|
|
|
|
int resid = fetchScriptByte();
|
|
|
|
ensureResourceLoaded(rtSound, resid);
|
|
|
|
}
|
|
|
|
|
2005-05-19 14:33:52 +00:00
|
|
|
void ScummEngine_c64::o_unknown13() {
|
|
|
|
debug(0, "o_unknown13 (Actor %d)", fetchScriptByte());
|
|
|
|
}
|
|
|
|
|
|
|
|
void ScummEngine_c64::o_loadActor() {
|
|
|
|
debug(0, "o_loadActor (%d)", getVarOrDirectByte(PARAM_1));
|
|
|
|
}
|
|
|
|
|
|
|
|
void ScummEngine_c64::o_loadRoom() {
|
|
|
|
int resid = getVarOrDirectByte(PARAM_1);
|
|
|
|
ensureResourceLoaded(rtRoom, resid);
|
|
|
|
}
|
|
|
|
|
|
|
|
void ScummEngine_c64::o_unknown4D() {
|
|
|
|
debug(0, "o_unknown4D (Actor %d)", fetchScriptByte());
|
|
|
|
}
|
|
|
|
|
2005-05-18 15:30:31 +00:00
|
|
|
void ScummEngine_c64::o_loadScript() {
|
2005-05-19 14:33:52 +00:00
|
|
|
int resid = getVarOrDirectByte(PARAM_1);
|
2005-05-18 15:30:31 +00:00
|
|
|
ensureResourceLoaded(rtScript, resid);
|
|
|
|
}
|
|
|
|
|
|
|
|
void ScummEngine_c64::o_cursorCommand() {
|
|
|
|
// TODO
|
|
|
|
|
|
|
|
byte state = fetchScriptByte();
|
2005-09-06 01:20:01 +00:00
|
|
|
debug(0, "o_cursorCommand(%d)", state);
|
2005-05-18 15:30:31 +00:00
|
|
|
|
2005-05-19 14:33:52 +00:00
|
|
|
if (state >= 1) {
|
2005-05-18 15:30:31 +00:00
|
|
|
_userPut = 1;
|
|
|
|
_cursor.state = 1;
|
|
|
|
} else {
|
|
|
|
_userPut = 0;
|
|
|
|
_cursor.state = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void ScummEngine_c64::o_lights() {
|
|
|
|
int a;
|
|
|
|
|
|
|
|
a = getVarOrDirectByte(PARAM_1);
|
|
|
|
// Convert older light mode values into
|
|
|
|
// equivalent values.of later games
|
|
|
|
// 0 Darkness
|
|
|
|
// 1 Flashlight
|
|
|
|
// 2 Lighted area
|
|
|
|
if (a == 2)
|
2005-07-30 21:11:48 +00:00
|
|
|
VAR(VAR_CURRENT_LIGHTS) = 11;
|
2005-05-18 15:30:31 +00:00
|
|
|
else if (a == 1)
|
|
|
|
VAR(VAR_CURRENT_LIGHTS) = 4;
|
2005-07-30 21:11:48 +00:00
|
|
|
else
|
2005-05-18 15:30:31 +00:00
|
|
|
VAR(VAR_CURRENT_LIGHTS) = 0;
|
|
|
|
|
2005-08-06 14:34:40 +00:00
|
|
|
_fullRedraw = true;
|
2005-05-18 15:30:31 +00:00
|
|
|
}
|
|
|
|
|
2005-05-19 14:33:52 +00:00
|
|
|
void ScummEngine_c64::o_unknown93() {
|
|
|
|
debug(0, "o_unknown93 (Actor %d)", fetchScriptByte());
|
|
|
|
}
|
|
|
|
|
|
|
|
void ScummEngine_c64::o_freezeScript() {
|
|
|
|
int scr = fetchScriptByte();
|
|
|
|
vm.slot[scr].status &= 0x80;
|
|
|
|
vm.slot[scr].freezeCount = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
void ScummEngine_c64::o_unfreezeScript() {
|
|
|
|
int scr = fetchScriptByte();
|
|
|
|
vm.slot[scr].status &= 0x7F;
|
|
|
|
vm.slot[scr].freezeCount = 0;
|
|
|
|
}
|
|
|
|
|
2005-05-20 06:47:57 +00:00
|
|
|
void ScummEngine_c64::o_animateActor() {
|
|
|
|
int act = getVarOrDirectByte(PARAM_1);
|
|
|
|
int anim = getVarOrDirectByte(PARAM_2);
|
|
|
|
int unk = fetchScriptByte();
|
|
|
|
debug(0,"o_animateActor: unk %d", unk);
|
|
|
|
|
|
|
|
Actor *a = derefActor(act, "o_animateActor");
|
|
|
|
a->animateActor(anim);
|
|
|
|
}
|
|
|
|
|
2005-09-22 13:34:20 +00:00
|
|
|
void ScummEngine_c64::o_getActorMoving() {
|
|
|
|
getResultPos();
|
|
|
|
int act = getVarOrDirectByte(PARAM_1);
|
|
|
|
Actor *a = derefActor(act, "o_getActorMoving");
|
|
|
|
if (a->_moving)
|
|
|
|
setResult(1);
|
|
|
|
else
|
|
|
|
setResult(2);
|
|
|
|
}
|
|
|
|
|
2005-05-19 14:33:52 +00:00
|
|
|
void ScummEngine_c64::o_putActorAtObject() {
|
|
|
|
int obj, x, y;
|
|
|
|
Actor *a;
|
|
|
|
|
|
|
|
a = derefActor(getVarOrDirectByte(PARAM_1), "o_putActorAtObject");
|
|
|
|
|
|
|
|
obj = fetchScriptByte();
|
|
|
|
if (whereIsObject(obj) != WIO_NOT_FOUND)
|
|
|
|
getObjectXYPos(obj, x, y);
|
|
|
|
else {
|
2005-09-06 01:20:01 +00:00
|
|
|
x = 30;
|
|
|
|
y = 60;
|
2005-05-19 14:33:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
a->putActor(x, y, a->_room);
|
|
|
|
}
|
|
|
|
|
2005-09-06 01:20:01 +00:00
|
|
|
void ScummEngine_c64::o_badOpcode() {
|
|
|
|
warning("Bad opcode 0x86 encountered");
|
|
|
|
}
|
|
|
|
|
|
|
|
void ScummEngine_c64::o_nop() {
|
|
|
|
}
|
|
|
|
|
|
|
|
void ScummEngine_c64::o_setActorBitVar() {
|
|
|
|
byte var = fetchScriptByte();
|
|
|
|
byte a = getVarOrDirectByte(PARAM_1);
|
|
|
|
|
|
|
|
int bit_var = var + a;
|
|
|
|
int bit_offset = bit_var & 0x0f;
|
|
|
|
bit_var >>= 4;
|
|
|
|
|
|
|
|
//if (getVarOrDirectByte(PARAM_2))
|
|
|
|
// _scummVars[bit_var] |= (1 << bit_offset);
|
|
|
|
//else
|
|
|
|
// _scummVars[bit_var] &= ~(1 << bit_offset);
|
|
|
|
warning("STUB: o_setActorBitVar(%d, %d, %d)", a, bit_var, bit_offset);
|
|
|
|
}
|
|
|
|
|
|
|
|
void ScummEngine_c64::o_getActorBitVar() {
|
|
|
|
getResultPos();
|
|
|
|
byte var = fetchScriptByte();
|
|
|
|
byte a = getVarOrDirectByte(PARAM_1);
|
|
|
|
|
|
|
|
int bit_var = var + a;
|
|
|
|
int bit_offset = bit_var & 0x0f;
|
|
|
|
bit_var >>= 4;
|
|
|
|
|
|
|
|
//setResult((_scummVars[bit_var] & (1 << bit_offset)) ? 1 : 0);
|
|
|
|
setResult(0);
|
|
|
|
warning("STUB: o_getActorBitVar(%d, %d, %d)", a, bit_var, bit_offset);
|
|
|
|
}
|
|
|
|
|
|
|
|
void ScummEngine_c64::o_print_c64() {
|
2005-09-14 08:20:37 +00:00
|
|
|
_actorToPrintStrFor = fetchScriptByte();
|
2005-09-06 01:20:01 +00:00
|
|
|
decodeParseString();
|
|
|
|
warning("STUB: o_print_c64()");
|
|
|
|
}
|
|
|
|
|
|
|
|
void ScummEngine_c64::o_printEgo_c64() {
|
|
|
|
_actorToPrintStrFor = (byte)VAR(VAR_EGO);
|
|
|
|
decodeParseString();
|
|
|
|
warning("STUB: o_printEgo_c64()");
|
|
|
|
}
|
|
|
|
|
|
|
|
void ScummEngine_c64::o_unknown1() {
|
|
|
|
byte var1 = fetchScriptByte();
|
|
|
|
byte var2 = fetchScriptByte();
|
|
|
|
byte var3 = fetchScriptByte();
|
|
|
|
warning("STUB: o_unknown1(%d, %d, %d)", var1, var2, var3);
|
|
|
|
}
|
|
|
|
|
|
|
|
void ScummEngine_c64::o_unknown2() {
|
|
|
|
byte var1 = fetchScriptByte();
|
|
|
|
warning("STUB: o_unknown2(%d)", var1);
|
|
|
|
}
|
|
|
|
|
|
|
|
void ScummEngine_c64::o_unknown3() {
|
|
|
|
byte var1 = fetchScriptByte();
|
|
|
|
warning("STUB: o_unknown3(%d)", var1);
|
|
|
|
}
|
|
|
|
|
|
|
|
void ScummEngine_c64::o_getClosestObjActor() {
|
2005-05-19 14:33:52 +00:00
|
|
|
int obj;
|
2005-09-06 01:20:01 +00:00
|
|
|
int act;
|
|
|
|
int dist;
|
2005-05-19 14:33:52 +00:00
|
|
|
|
2005-09-06 01:20:01 +00:00
|
|
|
// This code can't detect any actors farther away than 255 units
|
|
|
|
// (pixels in newer games, characters in older ones.) But this is
|
|
|
|
// perfectly OK, as it is exactly how the original behaved.
|
|
|
|
|
|
|
|
int closest_obj = 0xFF, closest_dist = 0xFF;
|
|
|
|
|
|
|
|
getResultPos();
|
|
|
|
|
|
|
|
act = getVarOrDirectByte(PARAM_1);
|
|
|
|
obj = (_opcode & 0x40) ? 25 : 7;
|
|
|
|
|
|
|
|
do {
|
|
|
|
dist = getObjActToObjActDist(act, obj);
|
|
|
|
if (dist < closest_dist) {
|
|
|
|
closest_dist = dist;
|
|
|
|
closest_obj = obj;
|
|
|
|
}
|
|
|
|
} while (--obj);
|
|
|
|
|
|
|
|
setResult(closest_obj);
|
2005-05-19 14:33:52 +00:00
|
|
|
}
|
|
|
|
|
2005-09-06 01:20:01 +00:00
|
|
|
void ScummEngine_c64::o_askDisk() {
|
|
|
|
warning("STUB: o_askDisk");
|
|
|
|
}
|
|
|
|
|
|
|
|
void ScummEngine_c64::o_unknownCD() {
|
|
|
|
debug(0, "o_unknownCD(%d)", fetchScriptByte());
|
2005-09-05 14:44:43 +00:00
|
|
|
}
|
|
|
|
|
2005-09-06 15:40:12 +00:00
|
|
|
void ScummEngine_c64::o_beginOverride() {
|
2005-09-14 10:35:04 +00:00
|
|
|
const int idx = vm.cutSceneStackPointer;
|
|
|
|
assert(0 <= idx && idx < 5);
|
|
|
|
|
|
|
|
vm.cutScenePtr[idx] = _scriptPointer - _scriptOrgPointer;
|
|
|
|
vm.cutSceneScript[idx] = _currentScript;
|
|
|
|
|
|
|
|
// Skip the jump instruction following the override instruction
|
|
|
|
// (the jump is responsible for "skipping" cutscenes, and the reason
|
|
|
|
// why we record the current script position in vm.cutScenePtr).
|
2005-09-06 15:40:12 +00:00
|
|
|
fetchScriptByte();
|
2005-09-14 10:35:04 +00:00
|
|
|
ScummEngine::fetchScriptWord();
|
|
|
|
|
|
|
|
// This is based on disassembly
|
|
|
|
VAR(VAR_OVERRIDE) = 0;
|
2005-09-06 15:40:12 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void ScummEngine_c64::o_isEqual() {
|
|
|
|
int16 a, b;
|
|
|
|
int var;
|
|
|
|
|
|
|
|
var = fetchScriptByte();
|
|
|
|
a = readVar(var);
|
|
|
|
b = getVarOrDirectByte(PARAM_1);
|
|
|
|
|
|
|
|
if (b == a)
|
|
|
|
ScummEngine::fetchScriptWord();
|
|
|
|
else
|
|
|
|
o_jumpRelative();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
void ScummEngine_c64::o_isGreater() {
|
|
|
|
int16 a = getVar();
|
|
|
|
int16 b = getVarOrDirectByte(PARAM_1);
|
|
|
|
if (b > a)
|
|
|
|
ScummEngine::fetchScriptWord();
|
|
|
|
else
|
|
|
|
o_jumpRelative();
|
|
|
|
}
|
|
|
|
|
|
|
|
void ScummEngine_c64::o_isGreaterEqual() {
|
|
|
|
int16 a = getVar();
|
|
|
|
int16 b = getVarOrDirectByte(PARAM_1);
|
|
|
|
if (b >= a)
|
|
|
|
ScummEngine::fetchScriptWord();
|
|
|
|
else
|
|
|
|
o_jumpRelative();
|
|
|
|
}
|
|
|
|
|
|
|
|
void ScummEngine_c64::o_isLess() {
|
|
|
|
int16 a = getVar();
|
|
|
|
int16 b = getVarOrDirectByte(PARAM_1);
|
|
|
|
if (b < a)
|
|
|
|
ScummEngine::fetchScriptWord();
|
|
|
|
else
|
|
|
|
o_jumpRelative();
|
|
|
|
}
|
|
|
|
|
|
|
|
void ScummEngine_c64::o_isLessEqual() {
|
|
|
|
int16 a = getVar();
|
|
|
|
int16 b = getVarOrDirectByte(PARAM_1);
|
|
|
|
|
|
|
|
if (b <= a)
|
|
|
|
ScummEngine::fetchScriptWord();
|
|
|
|
else
|
|
|
|
o_jumpRelative();
|
|
|
|
}
|
|
|
|
|
|
|
|
void ScummEngine_c64::o_isNotEqual() {
|
|
|
|
int16 a = getVar();
|
|
|
|
int16 b = getVarOrDirectByte(PARAM_1);
|
|
|
|
if (b != a)
|
|
|
|
ScummEngine::fetchScriptWord();
|
|
|
|
else
|
|
|
|
o_jumpRelative();
|
|
|
|
}
|
|
|
|
|
|
|
|
void ScummEngine_c64::o_notEqualZero() {
|
|
|
|
int a = getVar();
|
|
|
|
if (a != 0)
|
|
|
|
ScummEngine::fetchScriptWord();
|
|
|
|
else
|
|
|
|
o_jumpRelative();
|
|
|
|
}
|
|
|
|
|
|
|
|
void ScummEngine_c64::o_equalZero() {
|
|
|
|
int a = getVar();
|
|
|
|
if (a == 0)
|
|
|
|
ScummEngine::fetchScriptWord();
|
|
|
|
else
|
|
|
|
o_jumpRelative();
|
|
|
|
}
|
|
|
|
|
|
|
|
void ScummEngine_c64::o_jumpRelative() {
|
|
|
|
int16 offset = (int16)ScummEngine::fetchScriptWord();
|
|
|
|
_scriptPointer += offset;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-05-18 02:32:25 +00:00
|
|
|
#undef PARAM_1
|
|
|
|
#undef PARAM_2
|
|
|
|
#undef PARAM_3
|
|
|
|
|
|
|
|
} // End of namespace Scumm
|