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 */ 22 23 #ifndef ILLUSIONS_SEQUENCEOPCODES_H 24 #define ILLUSIONS_SEQUENCEOPCODES_H 25 26 #include "common/func.h" 27 28 namespace Illusions { 29 30 class IllusionsEngine; 31 class Control; 32 struct OpCall; 33 34 typedef Common::Functor2<Control*, OpCall&, void> SequenceOpcode; 35 36 class SequenceOpcodes { 37 public: 38 SequenceOpcodes(IllusionsEngine *vm); 39 ~SequenceOpcodes(); 40 void execOpcode(Control *control, OpCall &opCall); 41 protected: 42 IllusionsEngine *_vm; 43 SequenceOpcode *_opcodes[256]; 44 Common::String _opcodeNames[256]; 45 void initOpcodes(); 46 void freeOpcodes(); 47 48 // Opcodes 49 void opYield(Control *control, OpCall &opCall); 50 void opSetFrameIndex(Control *control, OpCall &opCall); 51 void opEndSequence(Control *control, OpCall &opCall); 52 void opIncFrameDelay(Control *control, OpCall &opCall); 53 void opSetRandomFrameDelay(Control *control, OpCall &opCall); 54 void opSetFrameSpeed(Control *control, OpCall &opCall); 55 void opJump(Control *control, OpCall &opCall); 56 void opJumpRandom(Control *control, OpCall &opCall); 57 void opGotoSequence(Control *control, OpCall &opCall); 58 void opStartForeignSequence(Control *control, OpCall &opCall); 59 void opBeginLoop(Control *control, OpCall &opCall); 60 void opNextLoop(Control *control, OpCall &opCall); 61 void opSetActorIndex(Control *control, OpCall &opCall); 62 void opSwitchActorIndex(Control *control, OpCall &opCall); 63 void opSwitchFacing(Control *control, OpCall &opCall); 64 void opAppearActor(Control *control, OpCall &opCall); 65 void opDisappearActor(Control *control, OpCall &opCall); 66 void opAppearForeignActor(Control *control, OpCall &opCall); 67 void opDisappearForeignActor(Control *control, OpCall &opCall); 68 void opSetNamedPointPosition(Control *control, OpCall &opCall); 69 void opMoveDelta(Control *control, OpCall &opCall); 70 void opFaceActor(Control *control, OpCall &opCall); 71 void opNotifyThreadId1(Control *control, OpCall &opCall); 72 void opSetPathCtrY(Control *control, OpCall &opCall); 73 void opDisablePathWalkPoints(Control *control, OpCall &opCall); 74 void opSetPathWalkPoints(Control *control, OpCall &opCall); 75 void opDisableAutoScale(Control *control, OpCall &opCall); 76 void opSetScale(Control *control, OpCall &opCall); 77 void opSetScaleLayer(Control *control, OpCall &opCall); 78 void opDeactivatePathWalkRects(Control *control, OpCall &opCall); 79 void opSetPathWalkRects(Control *control, OpCall &opCall); 80 void opSetPriority(Control *control, OpCall &opCall); 81 void opSetPriorityLayer(Control *control, OpCall &opCall); 82 void opDisableAutoRegionLayer(Control *control, OpCall &opCall); 83 void opSetRegionLayer(Control *control, OpCall &opCall); 84 void opSetPalette(Control *control, OpCall &opCall); 85 void opShiftPalette(Control *control, OpCall &opCall); 86 void opPlaySound(Control *control, OpCall &opCall); 87 void opStopSound(Control *control, OpCall &opCall); 88 void opStartScriptThread(Control *control, OpCall &opCall); 89 void opPlaceSubActor(Control *control, OpCall &opCall); 90 void opStartSubSequence(Control *control, OpCall &opCall); 91 void opStopSubSequence(Control *control, OpCall &opCall); 92 93 }; 94 95 } // End of namespace Illusions 96 97 #endif // ILLUSIONS_SEQUENCEOPCODES_H 98