From 651f9f2ad7367ab1e57d51ea179dacf3025bcf3c Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Mon, 9 Oct 2006 15:42:55 +0000 Subject: Casting 'buffer' to uint32 makes absolutely no sense to me. As far as I can tell, we just want to add an offset to a byte pointer. svn-id: r24254 --- engines/agos/res_ami.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/engines/agos/res_ami.cpp b/engines/agos/res_ami.cpp index 30a2e7b6c7..f4b9a2d949 100644 --- a/engines/agos/res_ami.cpp +++ b/engines/agos/res_ami.cpp @@ -275,9 +275,9 @@ void AGOSEngine::convertAmiga(byte *srcBuf, int32 fileSize) { bufptrout = bufferout; clipnumber = 0; while(1) { - clipoffset = READ_BE_UINT32(bufptr); bufptr +=4; - clipheight = READ_BE_UINT16(bufptr); bufptr +=2; - clipwidth = READ_BE_UINT16(bufptr); bufptr +=2; + clipoffset = READ_BE_UINT32(bufptr); bufptr += 4; + clipheight = READ_BE_UINT16(bufptr); bufptr += 2; + clipwidth = READ_BE_UINT16(bufptr); bufptr += 2; if (clipoffset != 0) break; WRITE_BE_UINT32(bufptrout, 0); bufptrout += 4; @@ -285,7 +285,7 @@ void AGOSEngine::convertAmiga(byte *srcBuf, int32 fileSize) { clipnumber++; } - clipsend = (byte *)(clipoffset + (uint32)buffer); + clipsend = buffer + clipoffset; bufoutend = clipoffset; while (bufptr <= clipsend) { if (clipoffset != 0) { @@ -294,9 +294,9 @@ void AGOSEngine::convertAmiga(byte *srcBuf, int32 fileSize) { WRITE_BE_UINT32(bufptrout, 0); bufptrout += 4; WRITE_BE_UINT32(bufptrout, 0); bufptrout += 4; } - clipoffset = READ_BE_UINT32(bufptr); bufptr +=4; - clipheight = READ_BE_UINT16(bufptr); bufptr +=2; - clipwidth = READ_BE_UINT16(bufptr); bufptr +=2; + clipoffset = READ_BE_UINT32(bufptr); bufptr += 4; + clipheight = READ_BE_UINT16(bufptr); bufptr += 2; + clipwidth = READ_BE_UINT16(bufptr); bufptr += 2; clipnumber++; } outlength = bufoutend; -- cgit v1.2.3