[Scummvm-cvs-logs] SF.net SVN: scummvm: [29032] scummvm/trunk/engines/agi/preagi_winnie.cpp
mthreepwood at users.sourceforge.net
mthreepwood at users.sourceforge.net
Sun Sep 23 01:36:01 CEST 2007
Revision: 29032
http://scummvm.svn.sourceforge.net/scummvm/?rev=29032&view=rev
Author: mthreepwood
Date: 2007-09-22 16:36:00 -0700 (Sat, 22 Sep 2007)
Log Message:
-----------
allow Winnie Amiga to show room images, still not playable
Modified Paths:
--------------
scummvm/trunk/engines/agi/preagi_winnie.cpp
Modified: scummvm/trunk/engines/agi/preagi_winnie.cpp
===================================================================
--- scummvm/trunk/engines/agi/preagi_winnie.cpp 2007-09-22 22:37:20 UTC (rev 29031)
+++ scummvm/trunk/engines/agi/preagi_winnie.cpp 2007-09-22 23:36:00 UTC (rev 29032)
@@ -1025,15 +1025,21 @@
_vm->_gfx->clearScreen(0);
// read room picture
- readRoom(room, buffer);
+ uint32 size = readRoom(room, buffer);
memcpy(&roomhdr, buffer, sizeof(WTP_ROOM_HDR));
+ if (_vm->getPlatform() == Common::kPlatformAmiga)
+ roomhdr.ofsPic = SWAP_BYTES_16(roomhdr.ofsPic);
+ else if (_vm->getPlatform() == Common::kPlatformPC)
+ roomhdr.ofsPic = roomhdr.ofsPic - IDI_WTP_OFS_ROOM;
+
// draw room picture
- _vm->_picture->decodePicture(buffer + roomhdr.ofsPic - IDI_WTP_OFS_ROOM, 4096, 1, IDI_WTP_PIC_WIDTH, IDI_WTP_PIC_HEIGHT);
+ _vm->_picture->decodePicture(buffer + roomhdr.ofsPic, 4096, 1, IDI_WTP_PIC_WIDTH, IDI_WTP_PIC_HEIGHT);
_vm->_picture->showPic(IDI_WTP_PIC_X0, IDI_WTP_PIC_Y0, IDI_WTP_PIC_WIDTH, IDI_WTP_PIC_HEIGHT);
// draw object picture
- drawObjPic(iObj, IDI_WTP_PIC_X0 + roomhdr.objX, IDI_WTP_PIC_Y0 + roomhdr.objY);
+ if (!_vm->getPlatform() == Common::kPlatformAmiga)
+ drawObjPic(iObj, IDI_WTP_PIC_X0 + roomhdr.objX, IDI_WTP_PIC_Y0 + roomhdr.objY);
free(buffer);
}
@@ -1121,8 +1127,7 @@
void Winnie::run() {
randomize();
intro();
- if (!_vm->getPlatform() == Common::kPlatformAmiga)
- gameLoop();
+ gameLoop();
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list