ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

hotspot.h

Go to the documentation of this file.
00001 /* ResidualVM - A 3D game interpreter
00002  *
00003  * ResidualVM is the legal property of its developers, whose names
00004  * are too numerous to list here. Please refer to the AUTHORS
00005  * file distributed with this source distribution.
00006  *
00007  * This program is free software; you can redistribute it and/or
00008  * modify it under the terms of the GNU General Public License
00009  * as published by the Free Software Foundation; either version 2
00010  * of the License, or (at your option) any later version.
00011  *
00012  * This program is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  * GNU General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU General Public License
00018  * along with this program; if not, write to the Free Software
00019  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00020  *
00021  */
00022 
00023 #ifndef HOTSPOT_H_
00024 #define HOTSPOT_H_
00025 
00026 #include "common/rect.h"
00027 #include "common/array.h"
00028 
00029 namespace Myst3 {
00030 
00031 class GameState;
00032 
00033 struct Opcode {
00034     uint8 op;
00035     Common::Array<int16> args;
00036 };
00037 
00038 struct CondScript {
00039     uint16 condition;
00040     Common::Array<Opcode> script;
00041 };
00042 
00043 struct PolarRect {
00044     int16 centerPitch;
00045     int16 centerHeading;
00046     int16 height;
00047     int16 width;
00048 };
00049 
00050 class HotSpot {
00051 public:
00052     HotSpot();
00053 
00054     int16 condition;
00055     Common::Array<PolarRect> rects;
00056     int16 cursor;
00057     Common::Array<Opcode> script;
00058 
00059     int32 isPointInRectsCube(float pitch, float heading);
00060     int32 isPointInRectsFrame(GameState *state, const Common::Point &p);
00061     bool isEnabled(GameState *state, uint16 var = 0);
00062 
00063 private:
00064     bool isZip() { return cursor == 7; }
00065     int32 isZipDestinationAvailable(GameState *state);
00066 };
00067 
00068 
00069 } // End of namespace Myst3
00070 
00071 #endif // HOTSPOT_H_


Generated on Sat Nov 9 2019 05:00:29 for ResidualVM by doxygen 1.7.1
curved edge   curved edge