aboutsummaryrefslogtreecommitdiff
path: root/engines/agi
diff options
context:
space:
mode:
authorMatthew Hoops2007-09-06 21:48:33 +0000
committerMatthew Hoops2007-09-06 21:48:33 +0000
commit843c35f3a4a4c93ee2b02adf63416a5c810218fb (patch)
tree312ce9b4e86cbb6a0cabbc4692f30963e4aa0587 /engines/agi
parent898043d967e12cad2952ac44295a13d6ae382df7 (diff)
downloadscummvm-rg350-843c35f3a4a4c93ee2b02adf63416a5c810218fb.tar.gz
scummvm-rg350-843c35f3a4a4c93ee2b02adf63416a5c810218fb.tar.bz2
scummvm-rg350-843c35f3a4a4c93ee2b02adf63416a5c810218fb.zip
room strings now work in Winnie
svn-id: r28868
Diffstat (limited to 'engines/agi')
-rw-r--r--engines/agi/preagi_winnie.cpp22
-rw-r--r--engines/agi/preagi_winnie.h1
2 files changed, 18 insertions, 5 deletions
diff --git a/engines/agi/preagi_winnie.cpp b/engines/agi/preagi_winnie.cpp
index 2058f7c6aa..a508b3f1be 100644
--- a/engines/agi/preagi_winnie.cpp
+++ b/engines/agi/preagi_winnie.cpp
@@ -264,7 +264,8 @@ int Winnie::parser(int pc, int index, uint8 *buffer) {
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 @@ int Winnie::parser(int pc, int index, uint8 *buffer) {
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 @@ int Winnie::parser(int pc, int index, uint8 *buffer) {
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::clrMenuSel(int *iSel, int fCanSel[]) {
}
}
+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) {
}
diff --git a/engines/agi/preagi_winnie.h b/engines/agi/preagi_winnie.h
index 8a1ffa07c2..3965212408 100644
--- a/engines/agi/preagi_winnie.h
+++ b/engines/agi/preagi_winnie.h
@@ -323,6 +323,7 @@ private:
void incMenuSel(int*, int[]);
void decMenuSel(int*, int[]);
void drawMenu(char*, int, int[]);
+ void printRoomStr(int, int);
};
}