/* 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. * * $URL: https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/trunk/engines/mohawk/myst_scripts.h $ * $Id: myst_scripts.h 47541 2010-01-25 01:39:44Z lordhoto $ * */ #ifndef MYST_SCRIPTS_SELENITIC_H #define MYST_SCRIPTS_SELENITIC_H #include "common/scummsys.h" #include "common/util.h" #include "mohawk/myst_scripts.h" namespace Mohawk { #define DECLARE_OPCODE(x) void x(uint16 op, uint16 var, uint16 argc, uint16 *argv) class MohawkEngine_Myst; class MystResourceType8; struct MystScriptEntry; class MystScriptParser_Selenitic : public MystScriptParser { public: MystScriptParser_Selenitic(MohawkEngine_Myst *vm); ~MystScriptParser_Selenitic(); void disableInitOpcodes(); void runPersistentOpcodes(); private: void setupOpcodes(); uint16 getVar(uint16 var); void toggleVar(uint16 var); bool setVarValue(uint16 var, uint16 value); void o_203_soundReceiver_run(); void o_203_soundReceiver_disable(); DECLARE_OPCODE(opcode_100); DECLARE_OPCODE(opcode_101); DECLARE_OPCODE(o_102_soundReceiverSigma); DECLARE_OPCODE(o_103_soundReceiverRight); DECLARE_OPCODE(o_104_soundReceiverLeft); DECLARE_OPCODE(o_105_109_soundReceiverSource); DECLARE_OPCODE(opcode_110); DECLARE_OPCODE(o_111_soundReceiverUpdateSound); DECLARE_OPCODE(o_112_soundLockMove); DECLARE_OPCODE(o_113_soundLockStartMove); DECLARE_OPCODE(o_114_soundLockEndMove); DECLARE_OPCODE(o_115_soundLockButton); DECLARE_OPCODE(o_117_soundReceiverEndMove); DECLARE_OPCODE(opcode_200); DECLARE_OPCODE(opcode_201); DECLARE_OPCODE(opcode_202); DECLARE_OPCODE(o_203_soundReceiver_init); DECLARE_OPCODE(o_204_soundLock_init); DECLARE_OPCODE(opcode_205); DECLARE_OPCODE(opcode_206); bool _sound_receiver_sigma_pressed; // 6 MystResource *_sound_receiver_sources[5]; // 92 -> 108 MystResource *_sound_receiver_current_source; // 112 uint16 *_sound_receiver_position; // 116 uint16 _sound_receiver_direction; // 120 uint16 _sound_receiver_speed; // 122 uint32 _sound_receiver_start_time; //124 MystResourceType8 *_sound_receiver_viewer; // 128 MystResource *_sound_receiver_right_button; // 132 MystResource *_sound_receiver_left_button; // 136 MystResource *_sound_receiver_angle_1; // 140 MystResource *_sound_receiver_angle_2; // 144 MystResource *_sound_receiver_angle_3; // 148 MystResource *_sound_receiver_angle_4; // 152 MystResource *_sound_receiver_sigma_button; // 156 MystResource *_sound_lock_slider_1; // 164 MystResource *_sound_lock_slider_2; // 168 MystResource *_sound_lock_slider_3; // 172 MystResource *_sound_lock_slider_4; // 176 MystResource *_sound_lock_slider_5; // 180 MystResource *_sound_lock_button; // 184 void sound_receiver_left_right(uint direction); void sound_receiver_update(); void sound_receiver_draw_view(); void sound_receiver_draw_angle(); void sound_receiver_increase_speed(); void sound_receiver_update_sound(); uint16 sound_receiver_current_sound(uint16 source, uint16 position); void sound_receiver_solution(uint16 source, uint16 &solution, bool &enabled); void soundLockSliderSetPosition(MystResource* slider, uint16 value); void draw_digit(MystResource *_resource); }; } #undef DECLARE_OPCODE #endif