From 72914aafabf88cd7b56ff2a10036e470a8d2f05b Mon Sep 17 00:00:00 2001 From: Strangerke Date: Fri, 19 Jul 2013 17:29:33 +0200 Subject: MORTEVIELLE: Simplify the way skip info is computed, as pointed by LordHoto --- engines/mortevielle/outtext.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/engines/mortevielle/outtext.cpp b/engines/mortevielle/outtext.cpp index 6bb775a423..d9d47a9fd3 100644 --- a/engines/mortevielle/outtext.cpp +++ b/engines/mortevielle/outtext.cpp @@ -133,11 +133,9 @@ void TextHandler::loadDesFile(Common::String filename, int32 skipSize, int lengt if (!f.open(filename)) error("Missing file %s", filename.c_str()); - int skipBlock = 0; - while (skipSize > 127) { - ++skipBlock; - skipSize -= 128; - } + int skipBlock = skipSize / 128; + skipSize %= 128; + if (skipBlock != 0) f.seek(skipBlock * 0x80); -- cgit v1.2.3