aboutsummaryrefslogtreecommitdiff
path: root/engines/agi
diff options
context:
space:
mode:
authorMatthew Hoops2007-09-22 20:16:24 +0000
committerMatthew Hoops2007-09-22 20:16:24 +0000
commitb4ed83166697a7a70a8ff83c64368753023cecd5 (patch)
treee9ebefd4de3556d162b94f5dbc39af7728fc864e /engines/agi
parent50fb8b2734aa1b73f9956643b18599a2168c097a (diff)
downloadscummvm-rg350-b4ed83166697a7a70a8ff83c64368753023cecd5.tar.gz
scummvm-rg350-b4ed83166697a7a70a8ff83c64368753023cecd5.tar.bz2
scummvm-rg350-b4ed83166697a7a70a8ff83c64368753023cecd5.zip
some cleanup involving Winnie Amiga, however it still only shows the intro
svn-id: r29027
Diffstat (limited to 'engines/agi')
-rw-r--r--engines/agi/preagi_winnie.cpp31
-rw-r--r--engines/agi/preagi_winnie.h11
2 files changed, 29 insertions, 13 deletions
diff --git a/engines/agi/preagi_winnie.cpp b/engines/agi/preagi_winnie.cpp
index 84485cb100..8918ef18a3 100644
--- a/engines/agi/preagi_winnie.cpp
+++ b/engines/agi/preagi_winnie.cpp
@@ -59,10 +59,15 @@ void Winnie::initVars() {
uint32 Winnie::readRoom(int iRoom, uint8 *buffer) {
char szFile[256] = {0};
- sprintf(szFile, IDS_WTP_PATH_ROOM, iRoom);
+ if (_vm->getPlatform() == Common::kPlatformPC)
+ sprintf(szFile, IDS_WTP_ROOM_DOS, iRoom);
+ else if (_vm->getPlatform() == Common::kPlatformAmiga)
+ sprintf(szFile, IDS_WTP_ROOM_AMIGA, iRoom);
Common::File file;
- if (!file.open(szFile))
+ if (!file.open(szFile)) {
+ warning ("Could not open file \'%s\'", szFile);
return 0;
+ }
uint32 filelen = file.size();
memset(buffer, 0, sizeof(buffer));
file.read(buffer, filelen);
@@ -72,10 +77,15 @@ uint32 Winnie::readRoom(int iRoom, uint8 *buffer) {
uint32 Winnie::readObj(int iObj, uint8 *buffer) {
char szFile[256] = {0};
- sprintf(szFile, IDS_WTP_PATH_OBJ, iObj);
+ if (_vm->getPlatform() == Common::kPlatformPC)
+ sprintf(szFile, IDS_WTP_OBJ_DOS, iObj);
+ else if (_vm->getPlatform() == Common::kPlatformAmiga)
+ sprintf(szFile, IDS_WTP_OBJ_AMIGA, iObj);
Common::File file;
- if (!file.open(szFile))
+ if (!file.open(szFile)) {
+ warning ("Could not open file \'%s\'", szFile);
return 0;
+ }
uint32 filelen = file.size();
memset(buffer, 0, sizeof(buffer));
file.read(buffer, filelen);
@@ -120,14 +130,14 @@ void Winnie::randomize() {
}
void Winnie::intro() {
- drawPic((!_vm->getPlatform() == Common::kPlatformAmiga) ? IDS_WTP_FILE_LOGO : "logo");
+ drawPic(IDS_WTP_FILE_LOGO);
_vm->printStr(IDS_WTP_INTRO_0);
_vm->_gfx->doUpdate();
_vm->_system->updateScreen();
_vm->_system->delayMillis(0x640);
if (_vm->getPlatform() == Common::kPlatformAmiga)
_vm->_gfx->clearScreen(0);
- drawPic((!_vm->getPlatform() == Common::kPlatformAmiga) ? IDS_WTP_FILE_TITLE : "title");
+ drawPic(IDS_WTP_FILE_TITLE);
_vm->printStr(IDS_WTP_INTRO_1);
_vm->_gfx->doUpdate();
_vm->_system->updateScreen();
@@ -969,10 +979,13 @@ void Winnie::drawPic(const char *szName) {
uint8 *buffer = (uint8 *)malloc(4096);
// construct filename
- sprintf(szFile, IDS_WTP_PATH, szName);
+ if (!_vm->getPlatform() == Common::kPlatformAmiga)
+ sprintf(szFile, "%s.pic", szName);
+ else
+ strcpy(szFile, szName);
Common::File file;
- if (!file.open(szName)) {
- warning ("Could not open file \'%s\'", szName);
+ if (!file.open(szFile)) {
+ warning ("Could not open file \'%s\'", szFile);
return;
}
uint32 size = file.size();
diff --git a/engines/agi/preagi_winnie.h b/engines/agi/preagi_winnie.h
index 654404fed7..b97c165fb1 100644
--- a/engines/agi/preagi_winnie.h
+++ b/engines/agi/preagi_winnie.h
@@ -34,13 +34,16 @@ namespace Agi {
#define IDS_WTP_SELECTION ">"
-#define IDS_WTP_PATH_ROOM "rooms\\rm.%02d"
-#define IDS_WTP_PATH_OBJ "obj.%02d"
+#define IDS_WTP_ROOM_DOS "rooms\\rm.%02d"
+#define IDS_WTP_ROOM_AMIGA "room.%d"
+#define IDS_WTP_OBJ_DOS "obj.%02d"
+#define IDS_WTP_OBJ_AMIGA "object.%d"
#define IDS_WTP_PATH_SND "snd.%02d"
+#define IDS_WTP_SND_AMIGA "Sounds"
#define IDS_WTP_PATH "%s"
-#define IDS_WTP_FILE_LOGO "logo.pic"
-#define IDS_WTP_FILE_TITLE "title.pic"
+#define IDS_WTP_FILE_LOGO "logo"
+#define IDS_WTP_FILE_TITLE "title"
#define IDS_WTP_FILE_SAVEGAME "savegame"
#define IDS_WTP_FILE_RND "rnd"