diff options
author | Matthew Stewart | 2018-05-23 01:01:36 -0400 |
---|---|---|
committer | Eugene Sandulenko | 2018-08-09 08:37:30 +0200 |
commit | bd79e4d653f9476de1501de149589e583e47411d (patch) | |
tree | 99de3438a254bdead699ea458bd5c914d4df3544 /engines/startrek/action.h | |
parent | 66b4ec36bdfb19a5242325e58c3180bc79574c89 (diff) | |
download | scummvm-rg350-bd79e4d653f9476de1501de149589e583e47411d.tar.gz scummvm-rg350-bd79e4d653f9476de1501de149589e583e47411d.tar.bz2 scummvm-rg350-bd79e4d653f9476de1501de149589e583e47411d.zip |
STARTREK: Begin on room-specific code for room 1
Diffstat (limited to 'engines/startrek/action.h')
-rw-r--r-- | engines/startrek/action.h | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/engines/startrek/action.h b/engines/startrek/action.h new file mode 100644 index 0000000000..68d5823000 --- /dev/null +++ b/engines/startrek/action.h @@ -0,0 +1,65 @@ +/* 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 STARTREK_ACTION_H +#define STARTREK_ACTION_H + + +enum Acton { + ACTION_TICK = 0, + + ACTION_WALK = 1, // Actions 1-5 are directly usable on away missions. + ACTION_USE = 2, + ACTION_GET = 3, + ACTION_LOOK = 4, + ACTION_TALK = 5, + + ACTION_TOUCHED_WARP = 6, + ACTION_TOUCHED_HOTSPOT = 7, // Doors? (Or just hotspots activated by Kirk moving there?) + ACTION_FINISHED_BEAMING_IN = 10, + ACTION_FINISHED_ENTERING_ROOM = 12, + ACTION_OPTIONS = 13 // Not really an action, but selectable from action menu +}; + +struct Action { + byte type; + byte b1; + byte b2; + byte b3; + + Action(byte _type, byte _b1, byte _b2, byte _b3) + : type(_type), + b1(_b1), + b2(_b2), + b3(_b3) {} + + + // ACTION_USE, ACTION_GET, ACTION_LOOK, ACTION_TALK + byte activeObject() { return b1; } + byte passiveObject() { return b2; } + + bool operator==(const Action &a) const { + return type == a.type && b1 == a.b1 && b2 == a.b2 && b3 == a.b3; + } +}; + +#endif |