diff options
author | Filippos Karapetis | 2019-12-27 01:33:02 +0200 |
---|---|---|
committer | Filippos Karapetis | 2019-12-27 01:33:28 +0200 |
commit | f7a5c21d4de443f861544db17b18c958cea2811f (patch) | |
tree | fab74f9d0e1008b626f466d5b17c1fbf9fc32b32 /engines/startrek/room.h | |
parent | 26fcce1e4174d528829d42196a27667c0996108d (diff) | |
download | scummvm-rg350-f7a5c21d4de443f861544db17b18c958cea2811f.tar.gz scummvm-rg350-f7a5c21d4de443f861544db17b18c958cea2811f.tar.bz2 scummvm-rg350-f7a5c21d4de443f861544db17b18c958cea2811f.zip |
STARTREK: Move isPointInPolygon() inside the Room class
This accesses the room data, so it's better to move it inside the Room
class, to reduce direct visibility of the room vertex data
Diffstat (limited to 'engines/startrek/room.h')
-rw-r--r-- | engines/startrek/room.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/engines/startrek/room.h b/engines/startrek/room.h index 6aeed92c41..be88008c4d 100644 --- a/engines/startrek/room.h +++ b/engines/startrek/room.h @@ -142,6 +142,7 @@ public: * all rooms). */ Common::Point getBeamInPosition(int crewmanIndex); + /** * This is analagous to above, but instead of beaming in, they just appear in a spot. * Used sparingly, ie. in feather's serpent when appearing in cave after Quetzecoatl @@ -149,6 +150,16 @@ public: */ Common::Point getSpawnPosition(int crewmanIndex); + /** + * Returns true if the given position is contained in a polygon. + * + * The data passed contains the following words in this order: + * * Index of polygon (unused here) + * * Number of vertices in polygon + * * For each vertex: x and y coordinates. + */ + bool isPointInPolygon(int16 offset, int16 x, int16 y); + byte *_rdfData; private: |