diff options
author | Matthew Hoops | 2007-09-23 02:15:48 +0000 |
---|---|---|
committer | Matthew Hoops | 2007-09-23 02:15:48 +0000 |
commit | 352566ee646e3a6b9399bc928d4c10a4f5a8fcc8 (patch) | |
tree | 7cc1cb0ed25b7b666db59c2fffc8dff0ab83c80f /engines | |
parent | f45cf700d80e2bc4d1c9ad5c4dc3591959782e00 (diff) | |
download | scummvm-rg350-352566ee646e3a6b9399bc928d4c10a4f5a8fcc8.tar.gz scummvm-rg350-352566ee646e3a6b9399bc928d4c10a4f5a8fcc8.tar.bz2 scummvm-rg350-352566ee646e3a6b9399bc928d4c10a4f5a8fcc8.zip |
allow Winnie C64 to start, although there are problems with the images (probably wrong offset) and logo.pic/intro.pic are not working, so the intro is skipped
svn-id: r29037
Diffstat (limited to 'engines')
-rw-r--r-- | engines/agi/detection.cpp | 17 | ||||
-rw-r--r-- | engines/agi/preagi_winnie.cpp | 20 | ||||
-rw-r--r-- | engines/agi/preagi_winnie.h | 9 |
3 files changed, 37 insertions, 9 deletions
diff --git a/engines/agi/detection.cpp b/engines/agi/detection.cpp index 38dadf296b..c43e1052a3 100644 --- a/engines/agi/detection.cpp +++ b/engines/agi/detection.cpp @@ -1668,6 +1668,23 @@ static const AGIGameDescription gameDescriptions[] = { }, { + // Winnie the Pooh in the Hundred Acre Wood + // preagi game + { + "winnie", + "", + AD_ENTRY1("title.pic", "d4eb97cffc866110f71e1ec9f84fe643"), + Common::EN_ANY, + Common::kPlatformC64, + Common::ADGF_NO_FLAGS + }, + GID_WINNIE, + GType_PreAGI, + 0, + 0x0000, + }, + + { // Xmas Card 1986 (PC) [AGI 2.272] { "xmascard", diff --git a/engines/agi/preagi_winnie.cpp b/engines/agi/preagi_winnie.cpp index 8b035e88af..edbfb9f6ed 100644 --- a/engines/agi/preagi_winnie.cpp +++ b/engines/agi/preagi_winnie.cpp @@ -55,6 +55,9 @@ void Winnie::initVars() { mist = -1; doWind = false; winnie_event = false; + + if (_vm->getPlatform() == Common::kPlatformC64) + _vm->_picture->setPictureVersion(AGIPIC_C64); } uint32 Winnie::readRoom(int iRoom, uint8 *buffer, WTP_ROOM_HDR &roomHdr) { @@ -63,18 +66,24 @@ uint32 Winnie::readRoom(int iRoom, uint8 *buffer, WTP_ROOM_HDR &roomHdr) { sprintf(szFile, IDS_WTP_ROOM_DOS, iRoom); else if (_vm->getPlatform() == Common::kPlatformAmiga) sprintf(szFile, IDS_WTP_ROOM_AMIGA, iRoom); + else if (_vm->getPlatform() == Common::kPlatformC64) + sprintf(szFile, IDS_WTP_ROOM_C64, iRoom); Common::File file; if (!file.open(szFile)) { warning ("Could not open file \'%s\'", szFile); return 0; } uint32 filelen = file.size(); + if (_vm->getPlatform() == Common::kPlatformC64) { //Skip the loading address + filelen -= 2; + file.seek(2, SEEK_CUR); + } memset(buffer, 0, sizeof(buffer)); file.read(buffer, filelen); file.close(); memcpy(&roomHdr, buffer, sizeof(WTP_ROOM_HDR)); - if (_vm->getPlatform() == Common::kPlatformPC) { + if (_vm->getPlatform() == Common::kPlatformPC || _vm->getPlatform() == Common::kPlatformC64) { roomHdr.ofsPic = TO_LE_16(roomHdr.ofsPic); roomHdr.fileLen = TO_LE_16(roomHdr.fileLen); roomHdr.reserved0 = TO_LE_16(roomHdr.reserved0); @@ -113,6 +122,8 @@ uint32 Winnie::readObj(int iObj, uint8 *buffer) { sprintf(szFile, IDS_WTP_OBJ_DOS, iObj); else if (_vm->getPlatform() == Common::kPlatformAmiga) sprintf(szFile, IDS_WTP_OBJ_AMIGA, iObj); + else if (_vm->getPlatform() == Common::kPlatformC64) + sprintf(szFile, IDS_WTP_OBJ_C64, iObj); Common::File file; if (!file.open(szFile)) { warning ("Could not open file \'%s\'", szFile); @@ -1057,7 +1068,7 @@ void Winnie::drawRoomPic() { // read room picture readRoom(room, buffer, roomhdr); - if (_vm->getPlatform() == Common::kPlatformPC) + if (_vm->getPlatform() == Common::kPlatformPC || _vm->getPlatform() == Common::kPlatformC64) roomhdr.ofsPic = roomhdr.ofsPic - IDI_WTP_OFS_ROOM; // draw room picture @@ -1065,7 +1076,7 @@ void Winnie::drawRoomPic() { _vm->_picture->showPic(IDI_WTP_PIC_X0, IDI_WTP_PIC_Y0, IDI_WTP_PIC_WIDTH, IDI_WTP_PIC_HEIGHT); // draw object picture - if (!_vm->getPlatform() == Common::kPlatformAmiga) + if (!_vm->getPlatform() == Common::kPlatformAmiga && !_vm->getPlatform() == Common::kPlatformC64) drawObjPic(iObj, IDI_WTP_PIC_X0 + roomhdr.objX, IDI_WTP_PIC_Y0 + roomhdr.objY); free(buffer); @@ -1152,7 +1163,8 @@ void Winnie::init() { void Winnie::run() { randomize(); - intro(); + if (!_vm->getPlatform() == Common::kPlatformC64) + intro(); gameLoop(); } diff --git a/engines/agi/preagi_winnie.h b/engines/agi/preagi_winnie.h index 60f8f5855f..31b539ed21 100644 --- a/engines/agi/preagi_winnie.h +++ b/engines/agi/preagi_winnie.h @@ -36,11 +36,13 @@ namespace Agi { #define IDS_WTP_ROOM_DOS "rooms\\rm.%02d" #define IDS_WTP_ROOM_AMIGA "room.%d" +#define IDS_WTP_ROOM_C64 "room%02d" #define IDS_WTP_OBJ_DOS "obj.%02d" #define IDS_WTP_OBJ_AMIGA "object.%d" -#define IDS_WTP_PATH_SND "snd.%02d" +#define IDS_WTP_OBJ_C64 "object%02d" +#define IDS_WTP_SND_DOS "snd.%02d" #define IDS_WTP_SND_AMIGA "Sounds" -#define IDS_WTP_PATH "%s" +#define IDS_WTP_SND_C64 "sound.obj" #define IDS_WTP_FILE_LOGO "logo" #define IDS_WTP_FILE_TITLE "title" @@ -84,9 +86,6 @@ namespace Agi { // COMMODORE 64 version strings -#define IDS_WTP_PATH_ROOM_C64 "%sroom%02d" -#define IDS_WTP_PATH_OBJ_C64 "%sobject%02d" -#define IDS_WTP_PATH_SND_C64 "%ssound.obj" #define IDS_WTP_FILE_SAVEGAME_C64 "saved game" #define IDS_WTP_DISK_ERROR_C64 "There is a problem with your disk drive.Please make sure your disk is in the drive correctly." #define IDS_WTP_HELP_0_C64 "The <SPACE BAR> moves the pointer. Press <RETURN> when it is by the choice you want. <F1> brings back what you have already read." |