diff options
| author | Einar Johan Trøan Sømåen | 2012-07-26 04:12:58 +0200 |
|---|---|---|
| committer | Einar Johan Trøan Sømåen | 2012-07-26 04:12:58 +0200 |
| commit | 38507fa9895620639d8733dbb4e085dfb2282a33 (patch) | |
| tree | 2b246fa93ce4ec173ac3db77e8cbacc562c6bb20 /engines/wintermute/math | |
| parent | 1ad859a468415cc7fd93adaa84beba02aae29ad8 (diff) | |
| download | scummvm-rg350-38507fa9895620639d8733dbb4e085dfb2282a33.tar.gz scummvm-rg350-38507fa9895620639d8733dbb4e085dfb2282a33.tar.bz2 scummvm-rg350-38507fa9895620639d8733dbb4e085dfb2282a33.zip | |
WINTERMUTE: AStyle-formatting.
Diffstat (limited to 'engines/wintermute/math')
| -rw-r--r-- | engines/wintermute/math/math_util.cpp | 4 | ||||
| -rw-r--r-- | engines/wintermute/math/math_util.h | 4 | ||||
| -rw-r--r-- | engines/wintermute/math/matrix4.cpp | 4 | ||||
| -rw-r--r-- | engines/wintermute/math/matrix4.h | 4 | ||||
| -rw-r--r-- | engines/wintermute/math/rect32.h | 36 | ||||
| -rw-r--r-- | engines/wintermute/math/vector2.cpp | 4 | ||||
| -rw-r--r-- | engines/wintermute/math/vector2.h | 4 |
7 files changed, 34 insertions, 26 deletions
diff --git a/engines/wintermute/math/math_util.cpp b/engines/wintermute/math/math_util.cpp index d9449294fb..fe7325baa4 100644 --- a/engines/wintermute/math/math_util.cpp +++ b/engines/wintermute/math/math_util.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/math/math_util.h b/engines/wintermute/math/math_util.h index db814a59ac..258d9bd67b 100644 --- a/engines/wintermute/math/math_util.h +++ b/engines/wintermute/math/math_util.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/math/matrix4.cpp b/engines/wintermute/math/matrix4.cpp index a716e937f4..379c219ec3 100644 --- a/engines/wintermute/math/matrix4.cpp +++ b/engines/wintermute/math/matrix4.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/math/matrix4.h b/engines/wintermute/math/matrix4.h index 5def8dfe97..4f65fe5779 100644 --- a/engines/wintermute/math/matrix4.h +++ b/engines/wintermute/math/matrix4.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/math/rect32.h b/engines/wintermute/math/rect32.h index e0babcbbb9..428d49290c 100644 --- a/engines/wintermute/math/rect32.h +++ b/engines/wintermute/math/rect32.h @@ -8,18 +8,18 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ - + #ifndef WINTERMUTE_RECT32_H #define WINTERMUTE_RECT32_H @@ -33,24 +33,32 @@ struct Point32 { }; struct Rect32 { - int32 top, left; ///< The point at the top left of the rectangle (part of the rect). - int32 bottom, right; ///< The point at the bottom right of the rectangle (not part of the rect). - + int32 top, left; ///< The point at the top left of the rectangle (part of the rect). + int32 bottom, right; ///< The point at the bottom right of the rectangle (not part of the rect). + Rect32() : top(0), left(0), bottom(0), right(0) {} Rect32(int16 w, int16 h) : top(0), left(0), bottom(h), right(w) {} Rect32(int16 x1, int16 y1, int16 x2, int16 y2) : top(y1), left(x1), bottom(y2), right(x2) { assert(isValidRect()); } - bool operator==(const Rect32 &rhs) const { return equals(rhs); } - bool operator!=(const Rect32 &rhs) const { return !equals(rhs); } - - int16 width() const { return right - left; } - int16 height() const { return bottom - top; } - + bool operator==(const Rect32 &rhs) const { + return equals(rhs); + } + bool operator!=(const Rect32 &rhs) const { + return !equals(rhs); + } + + int16 width() const { + return right - left; + } + int16 height() const { + return bottom - top; + } + void setWidth(int16 aWidth) { right = left + aWidth; } - + void setHeight(int16 aHeight) { bottom = top + aHeight; } @@ -75,7 +83,7 @@ struct Rect32 { bool equals(const Rect32 &r) const { return (left == r.left) && (right == r.right) && (top == r.top) && (bottom == r.bottom); } - + bool isValidRect() const { return (left <= right && top <= bottom); } diff --git a/engines/wintermute/math/vector2.cpp b/engines/wintermute/math/vector2.cpp index 9906a59429..ecf2f1e8e4 100644 --- a/engines/wintermute/math/vector2.cpp +++ b/engines/wintermute/math/vector2.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/math/vector2.h b/engines/wintermute/math/vector2.h index 96d3a3827d..ca4f499794 100644 --- a/engines/wintermute/math/vector2.h +++ b/engines/wintermute/math/vector2.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
