[Scummvm-cvs-logs] CVS: scummvm/queen command.h,1.1,1.2 command.cpp,1.1,1.2
Gregory Montoir
cyx at users.sourceforge.net
Sun Nov 2 08:47:04 CET 2003
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/sword2 build_display.cpp,1.39,1.40 console.cpp,1.25,1.26 console.h,1.11,1.12 debug.cpp,1.19,1.20 debug.h,1.9,1.10 events.cpp,1.14,1.15 events.h,1.9,1.10 function.cpp,1.32,1.33 function.h,1.5,1.6 icons.cpp,1.18,1.19 icons.h,1.7,1.8 logic.h,1.12,1.13 mouse.cpp,1.32,1.33 sound.cpp,1.30,1.31 speech.cpp,1.37,1.38 sword2.cpp,1.71,1.72 sword2.h,1.29,1.30 walker.cpp,1.20,1.21
- Next message: [Scummvm-cvs-logs] CVS: scummvm/queen xref.txt,1.28,1.29
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/queen
In directory sc8-pr-cvs1:/tmp/cvs-serv3577
Modified Files:
command.h command.cpp
Log Message:
fix locking verb crash
Index: command.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/command.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- command.h 31 Oct 2003 13:46:45 -0000 1.1
+++ command.h 2 Nov 2003 16:46:12 -0000 1.2
@@ -51,8 +51,8 @@
};
char _command[MAX_COMMAND_LEN];
- const char* lockedVerbPrefix;
- Graphics* _graphics;
+ Graphics *_graphics;
+ Logic *_logic;
};
Index: command.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/command.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- command.cpp 31 Oct 2003 13:46:45 -0000 1.1
+++ command.cpp 2 Nov 2003 16:46:12 -0000 1.2
@@ -40,7 +40,7 @@
void CmdText::display(uint8 color) {
_graphics->textCurrentColor(color);
- _graphics->textSetCentered(COMMAND_Y_POS, _command);
+ _graphics->textSetCentered(COMMAND_Y_POS, _command, false);
}
@@ -48,7 +48,7 @@
char temp[MAX_COMMAND_LEN];
if (locked) {
- sprintf(temp, "%s%s", lockedVerbPrefix, v.name());
+ sprintf(temp, "%s%s", _logic->lockedVerbPrefix(), v.name());
}
else {
strcpy(temp, v.name());
@@ -58,7 +58,7 @@
strcat(temp, name);
}
_graphics->textCurrentColor(color);
- _graphics->textSetCentered(COMMAND_Y_POS, temp);
+ _graphics->textSetCentered(COMMAND_Y_POS, temp, false);
}
@@ -67,7 +67,7 @@
char temp[MAX_COMMAND_LEN];
sprintf(temp, "%s %s", _command, name);
_graphics->textCurrentColor(color);
- _graphics->textSetCentered(COMMAND_Y_POS, temp);
+ _graphics->textSetCentered(COMMAND_Y_POS, temp, false);
}
@@ -100,7 +100,7 @@
Command::Command(Logic *l, Graphics *g, Input *i, Walk *w)
: _logic(l), _graphics(g), _input(i), _walk(w) {
_cmdText._graphics = _graphics;
- _cmdText.lockedVerbPrefix = _logic->lockedVerbPrefix();
+ _cmdText._logic = _logic;
}
@@ -345,8 +345,9 @@
// l.419-452 execute.c
switch (com->specialSection) {
case 1:
- // XXX l.428-438
+ // XXX l.428-438
warning("Command::executeCurrentAction() - Journal unimplemented");
+ // XXX if(DEMO) SPEAK("This is a demo, so I can't load or save games*14", "JOE", "");
return;
case 2:
_logic->joeUseDress(true);
@@ -807,7 +808,8 @@
warning("Command::executeIfCutaway(%s) unimplemented", description);
- if(scumm_stricmp(description + strlen(description) - 4, ".cut") == 0) {
+ if (strlen(description) > 4 &&
+ scumm_stricmp(description + strlen(description) - 4, ".cut") == 0) {
/* XXX
CUTAWAY(description);
strcpy(Kstr,Paramstr);
@@ -825,7 +827,8 @@
warning("Command::executeIfDialog(%s) unimplemented", description);
- if(scumm_stricmp(description + strlen(description) - 4, ".dog") == 0) {
+ if (strlen(description) > 4 &&
+ scumm_stricmp(description + strlen(description) - 4, ".dog") == 0) {
/* XXX
talk(Kstr);
strcpy(Kstr,Paramstr);
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/sword2 build_display.cpp,1.39,1.40 console.cpp,1.25,1.26 console.h,1.11,1.12 debug.cpp,1.19,1.20 debug.h,1.9,1.10 events.cpp,1.14,1.15 events.h,1.9,1.10 function.cpp,1.32,1.33 function.h,1.5,1.6 icons.cpp,1.18,1.19 icons.h,1.7,1.8 logic.h,1.12,1.13 mouse.cpp,1.32,1.33 sound.cpp,1.30,1.31 speech.cpp,1.37,1.38 sword2.cpp,1.71,1.72 sword2.h,1.29,1.30 walker.cpp,1.20,1.21
- Next message: [Scummvm-cvs-logs] CVS: scummvm/queen xref.txt,1.28,1.29
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list