[Scummvm-cvs-logs] SF.net SVN: scummvm: [29027] scummvm/trunk/engines/agi

mthreepwood at users.sourceforge.net mthreepwood at users.sourceforge.net
Sat Sep 22 22:16:24 CEST 2007


Revision: 29027
          http://scummvm.svn.sourceforge.net/scummvm/?rev=29027&view=rev
Author:   mthreepwood
Date:     2007-09-22 13:16:24 -0700 (Sat, 22 Sep 2007)

Log Message:
-----------
some cleanup involving Winnie Amiga, however it still only shows the intro

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-22 19:31:24 UTC (rev 29026)
+++ scummvm/trunk/engines/agi/preagi_winnie.cpp	2007-09-22 20:16:24 UTC (rev 29027)
@@ -59,10 +59,15 @@
 
 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::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::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 @@
 	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();

Modified: scummvm/trunk/engines/agi/preagi_winnie.h
===================================================================
--- scummvm/trunk/engines/agi/preagi_winnie.h	2007-09-22 19:31:24 UTC (rev 29026)
+++ scummvm/trunk/engines/agi/preagi_winnie.h	2007-09-22 20:16:24 UTC (rev 29027)
@@ -34,13 +34,16 @@
 
 #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"
 


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