From a0aa7df19c7ce3ce4912286dc646a6ea1495d07d Mon Sep 17 00:00:00 2001 From: Strangerke Date: Wed, 4 Jun 2014 07:10:27 +0200 Subject: CGE2: Remove useless 'void' --- engines/cge2/bitmap.h | 4 ++-- engines/cge2/vga13h.cpp | 6 +++--- engines/cge2/vga13h.h | 21 ++++++++++++--------- 3 files changed, 17 insertions(+), 14 deletions(-) (limited to 'engines') diff --git a/engines/cge2/bitmap.h b/engines/cge2/bitmap.h index 102fb1c8ca..88ab3d8bd8 100644 --- a/engines/cge2/bitmap.h +++ b/engines/cge2/bitmap.h @@ -82,8 +82,8 @@ public: void xShow(int16 x, int16 y); bool solidAt(int16 x, int16 y); void xLatPos(V2D& p); - bool moveHi(void); - bool moveLo(void); + bool moveHi(); + bool moveLo(); }; diff --git a/engines/cge2/vga13h.cpp b/engines/cge2/vga13h.cpp index d7f8fb23fe..fee570a237 100644 --- a/engines/cge2/vga13h.cpp +++ b/engines/cge2/vga13h.cpp @@ -56,7 +56,7 @@ Seq *getConstantSeq(bool seqFlag) { return seq; } -void(*Sprite::notify) (void) = nullptr; +void (*Sprite::notify)() = nullptr; byte Sprite::_constY = 0; byte Sprite::_follow = 0; @@ -427,7 +427,7 @@ Sprite *Sprite::contract() { return this; } -void Sprite::backShow(void) { +void Sprite::backShow() { expand(); show(2); show(1); @@ -496,7 +496,7 @@ void Sprite::gotoxyz(int x, int y, int z) { gotoxyz(V3D(x, y, z)); } -void Sprite::gotoxyz(void) { +void Sprite::gotoxyz() { gotoxyz(_pos3D); } diff --git a/engines/cge2/vga13h.h b/engines/cge2/vga13h.h index 391c56c9c1..583cf73a7d 100644 --- a/engines/cge2/vga13h.h +++ b/engines/cge2/vga13h.h @@ -55,7 +55,7 @@ namespace CGE2 { class V3D { public: double _x, _y, _z; - V3D(void) { } + V3D() { } V3D(double x, double y, double z = 0) : _x(x), _y(y), _z(z) { } V3D(const V3D &p) : _x(p._x), _y(p._y), _z(p._z) { } V3D operator+(const V3D &p) const { return V3D(_x + p._x, _y + p._y, _z + p._z); } @@ -72,6 +72,8 @@ class V2D : public Common::Point { CGE2Engine *_vm; public: V2D& operator=(const V3D &p3) { + if (p3._z == 200) + warning(""); double m = _vm->_eye->_z / (p3._z - _vm->_eye->_z); x = round(_vm->_eye->_x + (_vm->_eye->_x - p3._x) * m); y = round(_vm->_eye->_y + (_vm->_eye->_y - p3._y) * m); @@ -86,16 +88,17 @@ public: 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); } - uint16 area(void) { return x * y; } + uint16 area() { return x * y; } bool limited(const V2D &p) { return (uint16(x) < uint16(p.x)) && (uint16(y) < uint16(p.y)); } V2D scale(int z) { double m = _vm->_eye->_z / (_vm->_eye->_z - z); + warning("scale: %f %f %f, x, y, m"); return V2D(_vm, trunc(m * x), trunc(m * y)); } static double trunc(double d) { return (d > 0) ? floor(d) : ceil(d); } - static double round(double number) { return number < 0.0 ? ceil(number - 0.5) : floor(number + 0.5); } + static double round(double number) { return number < 0.0 ? ceil(number) : floor(number); } }; struct Seq { @@ -172,18 +175,18 @@ public: virtual ~Sprite(); BitmapPtr getShp(); void setShapeList(BitmapPtr *shp, int cnt); - void moveShapesHi(void); - void moveShapesLo(void); + void moveShapesHi(); + void moveShapesLo(); int labVal(Action snq, int lab); Sprite *expand(); Sprite *contract(); - void backShow(void); + void backShow(); void setName(char *newName); inline char *name() { return (_ext) ? _ext->_name : NULL; } void gotoxyz(int x, int y, int z = 0); - void gotoxyz(void); + void gotoxyz(); void gotoxyz(V2D pos); void gotoxyz_(V2D pos); void gotoxyz(V3D pos); @@ -200,10 +203,10 @@ public: CommandHandler::Command *snList(Action type); virtual void touch(uint16 mask, int x, int y, Common::KeyCode keyCode); virtual void tick(); - void clrHide(void) { if (_ext) _ext->_b0 = NULL; } + void clrHide() { if (_ext) _ext->_b0 = NULL; } void sync(Common::Serializer &s); - static void (*notify) (void); + static void (*notify) (); }; class Queue { -- cgit v1.2.3