From 8bed134ad6a155ec6b35e3cba4a212e016bf3c90 Mon Sep 17 00:00:00 2001 From: Tobia Tesan Date: Sun, 7 Jul 2013 23:11:32 +0200 Subject: WINTERMUTE: Force angle normalization This fixes the issues in J.U.L.I.A. --- engines/wintermute/base/base_sub_frame.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/engines/wintermute/base/base_sub_frame.cpp b/engines/wintermute/base/base_sub_frame.cpp index b51b723f61..eb1c859c2f 100644 --- a/engines/wintermute/base/base_sub_frame.cpp +++ b/engines/wintermute/base/base_sub_frame.cpp @@ -235,6 +235,12 @@ 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 += 360.0f; + } + rotate = fmod(rotate, 360.0f); + if (!_surface) { return STATUS_OK; } -- cgit v1.2.3