diff options
| author | Max Horn | 2002-12-15 20:53:11 +0000 |
|---|---|---|
| committer | Max Horn | 2002-12-15 20:53:11 +0000 |
| commit | 51b00f4bfceacaf756bdb077aae46214cb146321 (patch) | |
| tree | b881d8deb69cc1431c8711cfb8187b52be41f74e | |
| parent | 0760bada9aa17b39169b3311ff52bf120e261f03 (diff) | |
| download | scummvm-rg350-51b00f4bfceacaf756bdb077aae46214cb146321.tar.gz scummvm-rg350-51b00f4bfceacaf756bdb077aae46214cb146321.tar.bz2 scummvm-rg350-51b00f4bfceacaf756bdb077aae46214cb146321.zip | |
added comparision methods for ScummPoint
svn-id: r5981
| -rw-r--r-- | scumm/script_v6.cpp | 2 | ||||
| -rw-r--r-- | scumm/scumm.h | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/scumm/script_v6.cpp b/scumm/script_v6.cpp index 63048bd672..34171c4857 100644 --- a/scumm/script_v6.cpp +++ b/scumm/script_v6.cpp @@ -2061,7 +2061,7 @@ void Scumm::o6_wait() if (camera._cur.x >> 3 != camera._dest.x >> 3) break; } else { - if (camera._dest.x != camera._cur.x || camera._dest.y != camera._cur.y) + if (camera._dest != camera._cur) break; } diff --git a/scumm/scumm.h b/scumm/scumm.h index 5b07286638..3b5827a1f8 100644 --- a/scumm/scumm.h +++ b/scumm/scumm.h @@ -65,6 +65,14 @@ enum { struct ScummPoint { int x, y; + bool operator ==(const ScummPoint &p) const + { + return p.x == x && p.y == y; + } + bool operator !=(const ScummPoint &p) const + { + return p.x != x || p.y != y; + } }; #include "gfx.h" |
