[Scummvm-cvs-logs] SF.net SVN: scummvm: [29049] scummvm/trunk/engines/agi
mthreepwood at users.sourceforge.net
mthreepwood at users.sourceforge.net
Sun Sep 23 14:31:22 CEST 2007
Revision: 29049
http://scummvm.svn.sourceforge.net/scummvm/?rev=29049&view=rev
Author: mthreepwood
Date: 2007-09-23 05:31:21 -0700 (Sun, 23 Sep 2007)
Log Message:
-----------
changes for Winnie Amiga (now playable) and C64
Modified Paths:
--------------
scummvm/trunk/engines/agi/preagi_winnie.cpp
scummvm/trunk/engines/agi/preagi_winnie.h
Modified: scummvm/trunk/engines/agi/preagi_winnie.cpp
===================================================================
--- scummvm/trunk/engines/agi/preagi_winnie.cpp 2007-09-23 12:25:44 UTC (rev 29048)
+++ scummvm/trunk/engines/agi/preagi_winnie.cpp 2007-09-23 12:31:21 UTC (rev 29049)
@@ -385,7 +385,13 @@
}
// jump to the script block of the selected option
- pc = hdr.opt[index].ofsOpt[iSel] - IDI_WTP_OFS_ROOM;
+ if (_vm->getPlatform() == Common::kPlatformPC)
+ pc = hdr.opt[index].ofsOpt[iSel] - IDI_WTP_OFS_ROOM_DOS;
+ else if (_vm->getPlatform() == Common::kPlatformC64)
+ pc = hdr.opt[index].ofsOpt[iSel] - IDI_WTP_OFS_ROOM_C64;
+ else if (_vm->getPlatform() == Common::kPlatformAmiga)
+ pc = hdr.opt[index].ofsOpt[iSel];
+
opcode = *(buffer + pc);
if (!opcode) pc++;
@@ -1022,19 +1028,46 @@
}
phase2:
for (iBlock = 0; iBlock < IDI_WTP_MAX_BLOCK; iBlock++) {
- if (parser(hdr.ofsDesc[iBlock] - IDI_WTP_OFS_ROOM, iBlock, roomdata) == IDI_WTP_PAR_BACK) {
- goto phase1;
+ if (_vm->getPlatform() == Common::kPlatformPC) {
+ if (parser(hdr.ofsDesc[iBlock] - IDI_WTP_OFS_ROOM_DOS, iBlock, roomdata) == IDI_WTP_PAR_BACK)
+ goto phase1;
+ } else if (_vm->getPlatform() == Common::kPlatformC64) {
+ if (parser(hdr.ofsDesc[iBlock] - IDI_WTP_OFS_ROOM_C64, iBlock, roomdata) == IDI_WTP_PAR_BACK)
+ goto phase1;
+ } else if (_vm->getPlatform() == Common::kPlatformAmiga) {
+ if (parser(hdr.ofsDesc[iBlock], iBlock, roomdata) == IDI_WTP_PAR_BACK)
+ goto phase1;
}
}
for (;;) {
for (iBlock = 0; iBlock < IDI_WTP_MAX_BLOCK; iBlock++) {
- switch(parser(hdr.ofsBlock[iBlock] - IDI_WTP_OFS_ROOM, iBlock, roomdata)) {
- case IDI_WTP_PAR_GOTO:
- goto phase0;
- break;
- case IDI_WTP_PAR_BACK:
- goto phase2;
- break;
+ if (_vm->getPlatform() == Common::kPlatformPC) {
+ switch(parser(hdr.ofsBlock[iBlock] - IDI_WTP_OFS_ROOM_DOS, iBlock, roomdata)) {
+ case IDI_WTP_PAR_GOTO:
+ goto phase0;
+ break;
+ case IDI_WTP_PAR_BACK:
+ goto phase2;
+ break;
+ }
+ } else if (_vm->getPlatform() == Common::kPlatformC64) {
+ switch(parser(hdr.ofsBlock[iBlock] - IDI_WTP_OFS_ROOM_C64, iBlock, roomdata)) {
+ case IDI_WTP_PAR_GOTO:
+ goto phase0;
+ break;
+ case IDI_WTP_PAR_BACK:
+ goto phase2;
+ break;
+ }
+ } else if (_vm->getPlatform() == Common::kPlatformAmiga) {
+ switch(parser(hdr.ofsBlock[iBlock], iBlock, roomdata)) {
+ case IDI_WTP_PAR_GOTO:
+ goto phase0;
+ break;
+ case IDI_WTP_PAR_BACK:
+ goto phase2;
+ break;
+ }
}
}
}
@@ -1095,8 +1128,10 @@
// read room picture
readRoom(room, buffer, roomhdr);
- if (_vm->getPlatform() == Common::kPlatformPC || _vm->getPlatform() == Common::kPlatformC64)
- roomhdr.ofsPic = roomhdr.ofsPic - IDI_WTP_OFS_ROOM;
+ if (_vm->getPlatform() == Common::kPlatformPC)
+ roomhdr.ofsPic = roomhdr.ofsPic - IDI_WTP_OFS_ROOM_DOS;
+ else if (_vm->getPlatform() == Common::kPlatformC64)
+ roomhdr.ofsPic = roomhdr.ofsPic - IDI_WTP_OFS_ROOM_C64;
// draw room picture
_vm->_picture->decodePicture(buffer + roomhdr.ofsPic, 4096, 1, IDI_WTP_PIC_WIDTH, IDI_WTP_PIC_HEIGHT);
@@ -1127,7 +1162,12 @@
uint8 *buffer = (uint8 *)malloc(4096);
readRoom(iRoom, buffer, hdr);
- _vm->printStrXOR((char *)(buffer + hdr.ofsStr[iStr - 1] - IDI_WTP_OFS_ROOM));
+ if (_vm->getPlatform() == Common::kPlatformPC)
+ _vm->printStrXOR((char *)(buffer + hdr.ofsStr[iStr - 1] - IDI_WTP_OFS_ROOM_DOS));
+ else if (_vm->getPlatform() == Common::kPlatformC64)
+ _vm->printStrXOR((char *)(buffer + hdr.ofsStr[iStr - 1] - IDI_WTP_OFS_ROOM_C64));
+ else if (_vm->getPlatform() == Common::kPlatformAmiga)
+ _vm->printStrXOR((char *)(buffer + hdr.ofsStr[iStr - 1]));
free(buffer);
}
Modified: scummvm/trunk/engines/agi/preagi_winnie.h
===================================================================
--- scummvm/trunk/engines/agi/preagi_winnie.h 2007-09-23 12:25:44 UTC (rev 29048)
+++ scummvm/trunk/engines/agi/preagi_winnie.h 2007-09-23 12:31:21 UTC (rev 29049)
@@ -134,7 +134,8 @@
// data file offset modifiers
-#define IDI_WTP_OFS_ROOM 0x5400
+#define IDI_WTP_OFS_ROOM_DOS 0x5400
+#define IDI_WTP_OFS_ROOM_C64 0x5400 //FIXME: This number needs to be higher to show the image
#define IDI_WTP_OFS_OBJ 0x0800
// picture
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