diff options
author | Ľubomír Remák | 2018-03-18 15:28:46 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2018-08-25 23:12:01 +0200 |
commit | 54c2c0aee6e371f8058c50e0a4113f5b5492169e (patch) | |
tree | ae551cedc20fa03f179340aae9f7497193c80b6e /engines/mutationofjb/commands/labelcommand.h | |
parent | 523f973e0a4ba16b278d546da9267a693924f957 (diff) | |
download | scummvm-rg350-54c2c0aee6e371f8058c50e0a4113f5b5492169e.tar.gz scummvm-rg350-54c2c0aee6e371f8058c50e0a4113f5b5492169e.tar.bz2 scummvm-rg350-54c2c0aee6e371f8058c50e0a4113f5b5492169e.zip |
MUTATIONOFJB: Add support for labels and goto.
Diffstat (limited to 'engines/mutationofjb/commands/labelcommand.h')
-rw-r--r-- | engines/mutationofjb/commands/labelcommand.h | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/engines/mutationofjb/commands/labelcommand.h b/engines/mutationofjb/commands/labelcommand.h new file mode 100644 index 0000000000..389c759946 --- /dev/null +++ b/engines/mutationofjb/commands/labelcommand.h @@ -0,0 +1,51 @@ +/* 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 MUTATIONOFJB_LABELCOMMAND_H +#define MUTATIONOFJB_LABELCOMMAND_H + +#include "mutationofjb/commands/seqcommand.h" +#include "common/str.h" + +namespace MutationOfJB { + +class LabelCommandParser : public SeqCommandParser { +public: + LabelCommandParser() {} + + virtual bool parse(const Common::String &line, ScriptParseContext &parseCtx, Command *&command); +}; + +class LabelCommand : public SeqCommand { +public: + LabelCommand(const Common::String &name) : _name(name) {} + const Common::String &getName() const; + + virtual ExecuteResult execute(GameData &gameData) override; + virtual Common::String debugString() const override; +private: + Common::String _name; +}; + +} + +#endif |