2014-03-18 16:17:38 +01:00
|
|
|
/* ScummVM - Graphic Adventure Engine
|
|
|
|
*
|
|
|
|
* ScummVM is the legal property of its developers, whose names
|
|
|
|
* are too numerous to list here. Please refer to the COPYRIGHT
|
|
|
|
* file distributed with this source distribution.
|
|
|
|
*
|
|
|
|
* 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef ILLUSIONS_SEQUENCEOPCODES_H
|
|
|
|
#define ILLUSIONS_SEQUENCEOPCODES_H
|
|
|
|
|
|
|
|
#include "common/func.h"
|
|
|
|
|
|
|
|
namespace Illusions {
|
|
|
|
|
|
|
|
class IllusionsEngine;
|
|
|
|
class Control;
|
|
|
|
struct OpCall;
|
|
|
|
|
|
|
|
typedef Common::Functor2<Control*, OpCall&, void> SequenceOpcode;
|
|
|
|
|
|
|
|
class SequenceOpcodes {
|
|
|
|
public:
|
|
|
|
SequenceOpcodes(IllusionsEngine *vm);
|
|
|
|
~SequenceOpcodes();
|
|
|
|
void execOpcode(Control *control, OpCall &opCall);
|
|
|
|
protected:
|
|
|
|
IllusionsEngine *_vm;
|
|
|
|
SequenceOpcode *_opcodes[256];
|
2018-05-29 22:30:54 +10:00
|
|
|
Common::String _opcodeNames[256];
|
2014-03-18 16:17:38 +01:00
|
|
|
void initOpcodes();
|
|
|
|
void freeOpcodes();
|
|
|
|
|
2014-03-19 13:59:13 +01:00
|
|
|
// Opcodes
|
2014-04-02 13:16:01 +02:00
|
|
|
void opYield(Control *control, OpCall &opCall);
|
2014-03-19 13:59:13 +01:00
|
|
|
void opSetFrameIndex(Control *control, OpCall &opCall);
|
|
|
|
void opEndSequence(Control *control, OpCall &opCall);
|
2014-03-28 21:53:21 +01:00
|
|
|
void opIncFrameDelay(Control *control, OpCall &opCall);
|
2014-03-19 13:59:13 +01:00
|
|
|
void opSetRandomFrameDelay(Control *control, OpCall &opCall);
|
2018-06-26 22:35:31 +10:00
|
|
|
void opSetFrameSpeed(Control *control, OpCall &opCall);
|
2014-03-19 13:59:13 +01:00
|
|
|
void opJump(Control *control, OpCall &opCall);
|
2014-03-27 18:55:41 +01:00
|
|
|
void opJumpRandom(Control *control, OpCall &opCall);
|
2014-03-19 13:59:13 +01:00
|
|
|
void opGotoSequence(Control *control, OpCall &opCall);
|
2014-03-27 18:55:41 +01:00
|
|
|
void opStartForeignSequence(Control *control, OpCall &opCall);
|
2014-03-19 13:59:13 +01:00
|
|
|
void opBeginLoop(Control *control, OpCall &opCall);
|
|
|
|
void opNextLoop(Control *control, OpCall &opCall);
|
2015-12-02 16:52:05 +01:00
|
|
|
void opSetActorIndex(Control *control, OpCall &opCall);
|
2014-03-20 13:24:33 +01:00
|
|
|
void opSwitchActorIndex(Control *control, OpCall &opCall);
|
|
|
|
void opSwitchFacing(Control *control, OpCall &opCall);
|
2014-03-28 21:53:21 +01:00
|
|
|
void opAppearActor(Control *control, OpCall &opCall);
|
2014-03-24 10:15:04 +01:00
|
|
|
void opDisappearActor(Control *control, OpCall &opCall);
|
2014-03-30 09:31:53 +02:00
|
|
|
void opAppearForeignActor(Control *control, OpCall &opCall);
|
|
|
|
void opDisappearForeignActor(Control *control, OpCall &opCall);
|
2014-04-14 17:10:21 +02:00
|
|
|
void opSetNamedPointPosition(Control *control, OpCall &opCall);
|
2014-04-08 19:43:17 +02:00
|
|
|
void opMoveDelta(Control *control, OpCall &opCall);
|
2014-04-12 18:46:53 +02:00
|
|
|
void opFaceActor(Control *control, OpCall &opCall);
|
2014-03-19 13:59:13 +01:00
|
|
|
void opNotifyThreadId1(Control *control, OpCall &opCall);
|
|
|
|
void opSetPathCtrY(Control *control, OpCall &opCall);
|
2018-05-23 19:44:26 +10:00
|
|
|
void opDisablePathWalkPoints(Control *control, OpCall &opCall);
|
2014-03-19 13:59:13 +01:00
|
|
|
void opSetPathWalkPoints(Control *control, OpCall &opCall);
|
2014-04-12 18:46:53 +02:00
|
|
|
void opDisableAutoScale(Control *control, OpCall &opCall);
|
2014-03-30 09:31:53 +02:00
|
|
|
void opSetScale(Control *control, OpCall &opCall);
|
2014-03-19 13:59:13 +01:00
|
|
|
void opSetScaleLayer(Control *control, OpCall &opCall);
|
2014-04-08 19:43:17 +02:00
|
|
|
void opDeactivatePathWalkRects(Control *control, OpCall &opCall);
|
2014-03-19 13:59:13 +01:00
|
|
|
void opSetPathWalkRects(Control *control, OpCall &opCall);
|
|
|
|
void opSetPriority(Control *control, OpCall &opCall);
|
|
|
|
void opSetPriorityLayer(Control *control, OpCall &opCall);
|
2014-04-14 12:04:58 +02:00
|
|
|
void opDisableAutoRegionLayer(Control *control, OpCall &opCall);
|
|
|
|
void opSetRegionLayer(Control *control, OpCall &opCall);
|
2014-04-26 00:08:37 +02:00
|
|
|
void opSetPalette(Control *control, OpCall &opCall);
|
2014-04-14 15:49:11 +02:00
|
|
|
void opShiftPalette(Control *control, OpCall &opCall);
|
2014-03-19 13:59:13 +01:00
|
|
|
void opPlaySound(Control *control, OpCall &opCall);
|
2014-03-27 18:55:41 +01:00
|
|
|
void opStopSound(Control *control, OpCall &opCall);
|
2014-04-02 10:53:40 +02:00
|
|
|
void opStartScriptThread(Control *control, OpCall &opCall);
|
2014-03-30 09:31:53 +02:00
|
|
|
void opPlaceSubActor(Control *control, OpCall &opCall);
|
|
|
|
void opStartSubSequence(Control *control, OpCall &opCall);
|
2018-06-04 08:03:35 +10:00
|
|
|
void opStopSubSequence(Control *control, OpCall &opCall);
|
|
|
|
|
2014-03-18 16:17:38 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
} // End of namespace Illusions
|
|
|
|
|
|
|
|
#endif // ILLUSIONS_SEQUENCEOPCODES_H
|