diff options
author | uruk | 2014-08-11 20:32:56 +0200 |
---|---|---|
committer | uruk | 2014-08-11 20:32:56 +0200 |
commit | 02f3418d6f0382791c44dec8a5e232caa12109e9 (patch) | |
tree | 0428428628e9e796a5f9acf172bda3bd6d0a7139 /engines/cge2 | |
parent | 3e3430ed5de5155fadd6d23ea719f413bcc4e6e6 (diff) | |
download | scummvm-rg350-02f3418d6f0382791c44dec8a5e232caa12109e9.tar.gz scummvm-rg350-02f3418d6f0382791c44dec8a5e232caa12109e9.tar.bz2 scummvm-rg350-02f3418d6f0382791c44dec8a5e232caa12109e9.zip |
CGE2: Fix some more formatting in vga13h.h.
Diffstat (limited to 'engines/cge2')
-rw-r--r-- | engines/cge2/vga13h.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/engines/cge2/vga13h.h b/engines/cge2/vga13h.h index 652727cb32..749374fd24 100644 --- a/engines/cge2/vga13h.h +++ b/engines/cge2/vga13h.h @@ -56,17 +56,17 @@ class FXP { public: FXP(void) : v(0) {} FXP (int i0, int f0 = 0) : v((i0 * 256) + ((i0 < 0) ? -f0 : f0)) {} - FXP operator=(const int& x) { v = x << 8; return *this; } - FXP operator+(const FXP& x) const { FXP y; y.v = v + x.v; return y; } - FXP operator-(const FXP& x) const { FXP y; y.v = v - x.v; return y; } - FXP operator*(const FXP& x) const; - FXP operator/(const FXP& x) const; + FXP operator=(const int &x) { v = x << 8; return *this; } + FXP operator+(const FXP &x) const { FXP y; y.v = v + x.v; return y; } + FXP operator-(const FXP &x) const { FXP y; y.v = v - x.v; return y; } + FXP operator*(const FXP &x) const; + FXP operator/(const FXP &x) const; //int& operator = (int& a, const FXP& b) { return a = b.i; } - friend int &operator+=(int& a, const FXP& b) { return a += b.trunc(); } - friend int &operator-=(int& a, const FXP& b) { return a -= b.trunc(); } - friend FXP &operator+=(FXP& a, const int& b) { a.v += b << 8; return a; } - friend FXP &operator-=(FXP& a, const int& b) { a.v -= b << 8; return a; } + friend int &operator+=(int &a, const FXP &b) { return a += b.trunc(); } + friend int &operator-=(int &a, const FXP &b) { return a -= b.trunc(); } + friend FXP &operator+=(FXP &a, const int &b) { a.v += b << 8; return a; } + friend FXP &operator-=(FXP &a, const int &b) { a.v -= b << 8; return a; } friend bool operator==(const FXP &a, const FXP &b) { return a.v == b.v; } friend bool operator!=(const FXP &a, const FXP &b) { return a.v != b.v; } friend bool operator<(const FXP &a, const FXP &b) { return a.v < b.v; } @@ -108,9 +108,9 @@ public: V2D(CGE2Engine *vm) : _vm(vm) { } V2D(CGE2Engine *vm, const V3D &p3) : _vm(vm) { *this = p3; } V2D(CGE2Engine *vm, int posx, int posy) : _vm(vm), Common::Point(posx, posy) { } - bool operator<(const V2D &p) const { return (x < p.x) && (y < p.y); } + bool operator<(const V2D &p) const { return (x < p.x) && (y < p.y); } bool operator<=(const V2D &p) const { return (x <= p.x) && (y <= p.y); } - bool operator>(const V2D &p) const { return (x > p.x) && (y > p.y); } + bool operator>(const V2D &p) const { return (x > p.x) && (y > p.y); } bool operator>=(const V2D &p) const { return (x >= p.x) && (y >= p.y); } V2D operator+(const V2D &p) const { return V2D(_vm, x + p.x, y + p.y); } V2D operator-(const V2D &p) const { return V2D(_vm, x - p.x, y - p.y); } |