diff options
author | Tobia Tesan | 2013-07-10 11:17:10 +0200 |
---|---|---|
committer | Tobia Tesan | 2013-08-01 00:03:49 +0200 |
commit | dafcef5c9f5ddc27ca804ea1da0ab37720b103c8 (patch) | |
tree | a04e50305dc7691fffdf0f050d1eb4fdeab3a52d | |
parent | 1b9967400dbf28fa34dde175fdb4ad88c39ea623 (diff) | |
download | scummvm-rg350-dafcef5c9f5ddc27ca804ea1da0ab37720b103c8.tar.gz scummvm-rg350-dafcef5c9f5ddc27ca804ea1da0ab37720b103c8.tar.bz2 scummvm-rg350-dafcef5c9f5ddc27ca804ea1da0ab37720b103c8.zip |
WINTERMUTE: Replace normalization loop with if() for legibility
-rw-r--r-- | engines/wintermute/base/base_sub_frame.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/engines/wintermute/base/base_sub_frame.cpp b/engines/wintermute/base/base_sub_frame.cpp index 0028de1908..6f79d7f3a7 100644 --- a/engines/wintermute/base/base_sub_frame.cpp +++ b/engines/wintermute/base/base_sub_frame.cpp @@ -237,11 +237,11 @@ const char* BaseSubFrame::getSurfaceFilename() { ////////////////////////////////////////////////////////////////////// bool BaseSubFrame::draw(int x, int y, BaseObject *registerOwner, float zoomX, float zoomY, bool precise, uint32 alpha, float rotate, TSpriteBlendMode blendMode) { - while (rotate < 0) { + rotate = fmod(rotate, 360.0f); + if (rotate < 0) { rotate += 360.0f; } - rotate = fmod(rotate, 360.0f); - + if (!_surface) { return STATUS_OK; } |