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

mthreepwood at users.sourceforge.net mthreepwood at users.sourceforge.net
Thu Sep 6 23:48:33 CEST 2007


Revision: 28868
          http://scummvm.svn.sourceforge.net/scummvm/?rev=28868&view=rev
Author:   mthreepwood
Date:     2007-09-06 14:48:33 -0700 (Thu, 06 Sep 2007)

Log Message:
-----------
room strings now work in Winnie

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-06 20:51:40 UTC (rev 28867)
+++ scummvm/trunk/engines/agi/preagi_winnie.cpp	2007-09-06 21:48:33 UTC (rev 28868)
@@ -264,7 +264,8 @@
 			case IDI_WTP_SEL_WEST:
 				iDir = iSel - IDI_WTP_SEL_NORTH;
 				if (hdr.roomNew[iDir] == IDI_WTP_ROOM_NONE) {
-					//PrintMsg(IDS_WTP_CANT_GO);
+					_vm->printStr(IDS_WTP_CANT_GO);
+					_vm->waitAnyKeyChoice();
 				} else {
 					room = hdr.roomNew[iDir];
 					return IDI_WTP_PAR_GOTO;
@@ -272,11 +273,11 @@
 				break;
 			case IDI_WTP_SEL_TAKE:
 				//Winnie_TakeObj(room);
-				//Winnie_SetTakeDrop();
+				setTakeDrop();
 				break;
 			case IDI_WTP_SEL_DROP:
 				//Winnie_DropObj(room);
-				//Winnie_SetTakeDrop();
+				setTakeDrop();
 				break;
 			}
 		}
@@ -296,12 +297,12 @@
 				break;
 			case IDO_WTP_PRINT_MSG:
 				opcode = *(buffer + pc++);
-				//Winnie_PrintRoomStr(room, opcode);
+				printRoomStr(room, opcode);
 				_vm->waitAnyKeyChoice();
 				break;
 			case IDO_WTP_PRINT_STR:
 				opcode = *(buffer + pc++);
-				//Winnie_PrintRoomStr(room, opcode);
+				printRoomStr(room, opcode);
 				break;
 			case IDO_WTP_DROP_OBJ:
 				opcode = *(buffer + pc++);
@@ -702,6 +703,17 @@
 	}
 }
 
+void Winnie::printRoomStr(int iRoom, int iStr) {
+	WTP_ROOM_HDR hdr;
+	uint8 *buffer = (uint8 *)malloc(4096);
+
+	readRoom(iRoom, buffer, 4096);
+	memcpy(&hdr, buffer, sizeof(hdr));
+	_vm->printStrXOR((char *)(buffer + hdr.ofsStr[iStr - 1] - IDI_WTP_OFS_ROOM));
+
+	free(buffer);
+}
+
 Winnie::Winnie(PreAgiEngine* vm) : _vm(vm) {
 
 }

Modified: scummvm/trunk/engines/agi/preagi_winnie.h
===================================================================
--- scummvm/trunk/engines/agi/preagi_winnie.h	2007-09-06 20:51:40 UTC (rev 28867)
+++ scummvm/trunk/engines/agi/preagi_winnie.h	2007-09-06 21:48:33 UTC (rev 28868)
@@ -323,6 +323,7 @@
 	void incMenuSel(int*, int[]);
 	void decMenuSel(int*, int[]);
 	void drawMenu(char*, int, int[]);
+	void printRoomStr(int, int);
 };
 
 }


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